Data security control methods, equipment and media for intelligent agent reasoning process
By setting up secure proxy points at multiple data exchange nodes in the agent inference link, and determining the flow control method based on data tags and permissions, the problem of mismatch in data security control in existing technologies is solved, and more efficient data security control is achieved.
Patent Information
- Application Number
- CN202611333638.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-31
- Publication Date
- 2026-11-17
AI Technical Summary
Existing data security control methods in the reasoning process of intelligent agents are difficult to implement appropriate security controls based on the actual flow of data, resulting in a mismatch between the control that data may be subject to during the flow and its security requirements.
Security agent points are set up at multiple data exchange nodes in the intelligent agent inference link to intercept the data to be exchanged. Based on the data tag, the data transmission restriction rules of the target flow and the operation permissions of the access subject, the flow control method is determined to control the transmission of the data to be exchanged.
By implementing flow control at multiple data exchange nodes, the risk of data that does not meet security requirements entering the next processing stage is reduced, and the degree of matching between data security control and actual flow is improved.
Smart Images

Figure CN123122930A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and more specifically, to a data security control method, device, and medium for the reasoning process of an intelligent agent. Background Technology
[0002] With the development of large language models and intelligent agent technology, intelligent agents can invoke knowledge bases, external tools, and business systems during inference tasks, and transfer data between models, retrieval modules, tools, and response modules. The data types, processing stages, and access subjects involved in the inference process are diverse, and some data may contain sensitive information or be subject to specific transmission ranges and operation permissions. Therefore, data security control during intelligent agent inference is receiving increasing attention.
[0003] Existing technologies typically incorporate security verification mechanisms at the input, output, or external system interfaces of the intelligent agent. For example, content filtering is performed before a user requests access to the model, sensitive information detection is performed before the model returns results to the user, or permission verification is performed based on the identity of the accessing entity when calling external tools. Some solutions also manage data interactions between the intelligent agent and external systems through network zone isolation, interface access control, or log auditing.
[0004] However, the data flow path involved in agent reasoning tasks is quite complex. Existing security control methods are usually configured independently for specific boundaries or interfaces, making it difficult to implement appropriate security control according to the actual data flow. This may result in the control of data during the flow process not matching its security requirements. Summary of the Invention
[0005] Based on this, the present invention provides a data security control method, device and medium for the reasoning process of an intelligent agent. During the process of the intelligent agent performing reasoning tasks, it can implement appropriate flow control on the data to be exchanged according to the data tag of the data to be exchanged, the data transmission restriction rules corresponding to the target flow and the operation permissions of the access subject, thereby reducing the risk of data that does not meet security requirements entering the next processing stage.
[0006] In a first aspect, the present invention provides a data security control method for the reasoning process of an intelligent agent. The method includes: during the execution of a reasoning task by the intelligent agent, intercepting data to be exchanged at the current data exchange node and to be transmitted to the next processing stage through security proxy points set at multiple data exchange nodes in the reasoning link of the intelligent agent; obtaining the data tag of the data to be exchanged, the data transmission restriction rules corresponding to the target flow of the data to be exchanged, and the operation permissions of the accessing subject for the data to be exchanged; determining the flow control mode corresponding to the data to be exchanged based on the data tag, the data transmission restriction rules, and the operation permissions; and controlling the transmission of the data to be exchanged according to the flow control mode through the security proxy point at the current data exchange node before the data to be exchanged enters the next processing stage.
[0007] Optionally, the plurality of data exchange nodes includes at least two of the following: a data exchange node before the retrieval result is written into the model context, a data exchange node before the model output is written into the response result, and a data exchange node before the tool call request is sent to the target tool; the security proxy points are respectively set between the corresponding data exchange nodes and the next processing stage.
[0008] In the above implementation process, by setting security agent points between at least two data exchange nodes and the corresponding next processing stage before the retrieval results are written into the model context, before the model output is written into the response results, and before the tool call request is sent to the target tool, the security agent points can intercept the data to be exchanged when the relevant data leaves the current processing stage and has not yet entered the next processing stage. This enables pre-transmission control of data flowing in different directions during the agent's inference process, reducing the control gaps formed by security control only at a single boundary or interface, and reducing the risk of data that does not meet security requirements entering the model context, response results, or target tool.
[0009] Optionally, before the data to be exchanged enters the next processing stage, after controlling the transmission of the data to be exchanged through the security proxy point at the current data exchange node according to the flow control method, the method further includes: generating a security event for the current data exchange node and writing the tracking identifier of the inference task into the security event; if there is a preceding security event with the same tracking identifier as the security event, determining the event identifier of the preceding security event as the parent event identifier of the security event, and determining the event hash of the preceding security event as the pre-chain hash; if there is no preceding security event with the same tracking identifier as the security event, determining the preset initial hash as the pre-chain hash; determining the event hash of the security event according to the event content of the security event and the pre-chain hash; and storing the security event and the event hash of the security event together.
[0010] In the above implementation process, by writing the tracking identifier of the inference task into the security event, security events corresponding to the same inference task can be associated. A parent-child relationship is established based on the event identifier of the preceding security event, and the event hash of the current security event is calculated using the event hash of the preceding security event or a preset initial hash as the chain-front hash, so that each security event forms a chain-like association according to its generation order. Therefore, the security event sequence corresponding to the inference task can be reconstructed based on the tracking identifier and parent event identifier, and the integrity of the security event content and event chain can be verified through the event hash. This facilitates tracking the data security control process of the inference task and locating where security events have been modified or where the event chain has been broken.
[0011] Secondly, the present invention also provides an electronic device, the electronic device including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method described above.
[0012] Thirdly, embodiments of the present invention provide a computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program, which, when executed by a processor, implements the method described above.
[0013] In this invention, data to be exchanged is intercepted at multiple data exchange nodes in the intelligent agent inference link through a security agent point. The flow control method is determined by combining the data tag of the data to be exchanged, the data transmission restriction rules corresponding to the target flow direction, and the operation permissions of the access subject. This allows the security control method to be determined based on the security attributes, actual flow direction, and access subject permissions of the data to be exchanged, reducing the dependence on fixed configurations of specific boundaries or interfaces. Before the data to be exchanged enters the next processing stage, the transmission of the data to be exchanged is controlled according to the determined flow control method. This ensures that the data flow control matches the security requirements of the data to be exchanged, reducing the risk of data that does not meet the data transmission restriction or operation permission requirements continuing to flow. Attached Figure Description
[0014] To more clearly illustrate the technical solutions in the embodiments of the present invention or the conventional technology, the drawings used in the description of the embodiments or the conventional technology will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0015] Figure 1 This is a flowchart of a data security control method for the intelligent agent reasoning process provided in one embodiment of the present invention; Figure 2This is a schematic diagram of the structure of an electronic device provided in another embodiment of the present invention. Detailed Implementation
[0016] The technical solutions of the embodiments of the present invention will now be described with reference to the accompanying drawings. For example, the flowcharts and block diagrams in the drawings illustrate the architecture, functions, and operations of possible implementations 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 may represent a module, program segment, or part of code, which 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 may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or can be implemented using a combination of dedicated hardware and computer instructions. In addition, the functional modules in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0017] This application provides a data security control method for the intelligent agent reasoning process. This method can be executed by an electronic device, which can be a server, computer equipment, intelligent agent operating platform, or other device deployed with intelligent agent reasoning services.
[0018] An intelligent agent can be a program that can invoke models, knowledge bases, or tools to complete a task based on a task request. The agent's inference chain can include multiple processing stages from receiving a task request to generating a task result, such as knowledge retrieval, model inference, tool invocation, and result output. Data transmitted between different processing stages can be considered as data to be exchanged.
[0019] Please see Figure 1 , Figure 1 A flowchart of a data security control method for an agent's reasoning process provided in an embodiment of the present invention; the method may include the following steps: Step S101: During the process of the agent performing the inference task, the agent intercepts the data to be exchanged at the current data exchange node and transmitted to the next processing stage through the security proxy points set at multiple data exchange nodes in the inference link of the agent. Step S102: Obtain the data tag of the data to be exchanged, the data transmission restriction rules corresponding to the target flow of the data to be exchanged, and the operation permissions of the access subject for the data to be exchanged; Step S103: Determine the flow control method corresponding to the data to be exchanged based on the data tag, the data transmission restriction rule, and the operation permission; Step S104: Before the data to be exchanged enters the next processing stage, the transmission of the data to be exchanged is controlled by the security proxy point at the current data exchange node in accordance with the flow control method.
[0020] The following sections provide a detailed explanation of each step.
[0021] For step S101, the data exchange node can be a logical node or interface node that the data to be exchanged passes through when it moves from the current processing stage to the next processing stage. For example, the data exchange node can be set between the knowledge retrieval module and the model context management module, between the model inference module and the response generation module, or between the tool invocation module and the target tool.
[0022] Security proxy points can be implemented through middleware, interface proxies, service gateways, application hooks, or bypass proxies. When an electronic device sends data from the current processing stage to the next, it can redirect the original data transmission request to the security proxy point. Upon receiving the original data transmission request, the security proxy point can temporarily suspend its execution and save the data to be exchanged to a temporary buffer or a processing queue.
[0023] The security broker can also obtain the request path, source address, destination address, interface identifier, access subject identifier, operation type, and task identifier from the original data transmission request, and associate and save the obtained information with the data to be exchanged. Before completing flow control, the security broker does not send the data to be exchanged to the next processing stage.
[0024] For example, after the knowledge retrieval module obtains the search results, it can first send the results to a security proxy point set up between the knowledge retrieval module and the model context management module. The security proxy point temporarily stores the search results in a temporary cache, performs a security check, and then determines whether to allow the search results to enter the model context.
[0025] After setting up security proxy points at multiple data exchange nodes, the data to be exchanged can pass through the corresponding security proxy point when entering another processing stage. Therefore, data security control can operate on the actual data transmission process in the agent's inference chain, and is not limited to a single check when a task request enters the agent or when the task processing result is output.
[0026] In step S102, the data tag can be information used to represent the data attributes of the data to be exchanged. The data tag can include one or more of the following: data category, sensitivity level, business domain, data source, or permitted scope of use. The data tag can be pre-associated with the data to be exchanged, or it can be determined by the data classification and grading module based on the field names, data formats, or data content of the data to be exchanged.
[0027] When the data to be exchanged already carries a data tag, the security agent can directly read the data tag. When the data to be exchanged does not carry a data tag, the security agent can input the data to be exchanged into the data classification and grading module. The data classification and grading module can identify the data category and sensitivity level through field rule matching, keyword recognition, data format recognition, or classification models, and write the recognition results into the data tag.
[0028] The target flow can indicate the next processing stage or data transmission destination to which the data to be exchanged will enter. Security brokers can obtain the target flow from the original data transmission request's target address, interface identifier, service identifier, or task orchestration information.
[0029] Data transmission restriction rules can record the data categories, sensitivity levels, field ranges, or transmission processing requirements allowed to be received for different target flows. Electronic devices can use the target flow to query a preset set of rules to obtain the data transmission restriction rules associated with the target flow.
[0030] The access subject can be a natural person user, intelligent agent, service account, or application initiating the current operation. The security agent point can obtain the access subject identifier from authentication information, access tokens, session information, or task context, and query the permission management system based on the access subject identifier to obtain the access subject's operation permissions for the data to be exchanged.
[0031] For example, when the data to be exchanged is a business record obtained from a business knowledge base, the data classification and grading module can mark the business record as internal business data and label it with the corresponding sensitivity level. When the target flow is an external tool interface, the electronic device can obtain data transmission restriction rules for external regions. Simultaneously, the electronic device can determine whether the accessing subject has permission to transmit business records to external tools based on the current access subject identifier.
[0032] By reading or identifying data tags, parsing the actual target flow, and querying the access subject's operation permissions, input information can be generated to determine the result of this data flow, so that subsequent control no longer depends solely on fixed interfaces or network addresses.
[0033] In step S103, the flow control method can be used to instruct the security agent point how to process the data to be exchanged. The flow control method may include allowing transmission, rejecting transmission, or transmitting after security processing. Security processing may include de-identification, encryption, content reduction, format conversion, or other processing that can make the processed data meet transmission requirements.
[0034] The security decision module can pre-store multiple security decision records. Each security decision record can include data tag conditions, target flow conditions, permission conditions, operation type conditions, and the corresponding flow control method. The security agent point can send the obtained data tags, data transmission restriction rules, operation permissions, and current operation type to the security decision module.
[0035] The security decision module can match data tags, data transmission restriction rules, operation permissions, and current operation types, and determine the flow control method corresponding to the matching record as the flow control method for the data to be exchanged.
[0036] For example, the security decision module can first determine whether the accessing subject has the necessary permissions for the current operation, and then determine whether the data to be exchanged complies with the data transmission restriction rules corresponding to the target flow. If the accessing subject does not have the necessary permissions for the current operation, or if the data transmission restriction rules prohibit the data to be exchanged from being transmitted along the target flow, the security decision module can determine to refuse transmission. If the accessing subject has the necessary permissions for the current operation, and the data to be exchanged complies with the data transmission restriction rules, the security decision module can determine to allow transmission. If the data to be exchanged complies with the data transmission restriction rules after security processing, the security decision module can determine to transmit after performing security processing.
[0037] The security decision module can also prioritize data transmission based on the following order: explicit prohibition, permission after processing, and direct permission. If the data transmission restriction rules explicitly prohibit the transmission of data to be exchanged along the target flow, transmission can be rejected first. If the data to be exchanged can satisfy the data transmission restriction rules after security processing, transmission can be permitted after security processing. If the data to be exchanged does not require security processing and complies with the data transmission restriction rules, transmission can be permitted.
[0038] Data tags reflect the data attributes of the data to be exchanged, data transmission restriction rules reflect the transmission requirements of the target flow, and operation permissions reflect the scope of operations that the accessing subject can perform. The security decision module uses all of the above information simultaneously to reduce erroneous granting or excessive blocking that occurs when determining transmission results solely based on a fixed interface or a fixed accessing subject.
[0039] Specifically, in step S104, when the flow control mode is to allow transmission, the security agent point can release the temporary buffer or the pending queue of data to be exchanged from the temporary buffer or the pending queue, and send the data to be exchanged to the next processing stage according to the target address indicated by the original data transmission request.
[0040] When the flow control method is set to refuse transmission, the security agent can delete the temporarily cached data to be exchanged, or mark the data to be exchanged as prohibited from further transmission, and return a transmission failure result to the current processing stage. The security agent can also send blocking information to the task orchestration module, causing the task orchestration module to terminate the current processing branch or execute a preset exception handling procedure.
[0041] When the data is transmitted after secure processing, the secure agent point can process the data to be exchanged according to the secure processing method specified in the data transfer control method, and send the processed data to the next processing stage.
[0042] For example, when the transmission control method is encrypted, the security agent can obtain the corresponding encryption key or key identifier from the key management system based on the entity identifier of the next processing stage, encrypt the data payload of the data to be exchanged, and send the ciphertext and key identifier to the next processing stage. The next processing stage can obtain the decryption key based on the key identifier and decrypt the ciphertext after the identity verification and authorization verification are passed.
[0043] Before the data to be exchanged enters the next processing stage, the security agent point has already executed the actions of allowing transmission, rejecting transmission, or transmitting after security processing. This can prevent data that does not meet the transmission requirements from entering the next processing stage first and then being remedied, so that data security control takes effect synchronously with the actual transmission process of the data to be exchanged.
[0044] Through steps S101 to S104, data to be exchanged can be intercepted at multiple data exchange nodes in the agent inference link. Before the data to be exchanged enters the next processing stage, flow control is implemented by combining data tags, data transmission restriction rules corresponding to the target flow direction, and the operation permissions of the access subject. When the same data flows to different processing stages or is operated by different access subjects, corresponding flow control methods can be adopted to improve the matching degree between data security control in the agent inference process and the actual data flow situation.
[0045] Optionally, in some embodiments, the multiple data exchange nodes used to intercept the data to be exchanged in step S101 may include at least two of the following: the data exchange node before the retrieval result is written into the model context, the data exchange node before the model output is written into the response result, and the data exchange node before the tool call request is sent to the target tool; the security proxy points are respectively set between the corresponding data exchange nodes and the next processing step.
[0046] Specifically, the model context can be a set of input information provided to the model to support the model in generating inference results. A tool invocation request can be a data request from an agent to a target tool to perform a corresponding function. The response result can be the task processing result returned by the agent to the task requester.
[0047] At the data exchange node before the search results are written to the model context, after the knowledge retrieval module obtains the search results from the knowledge base, vector database, or business database, it can first send the search results to the security proxy point. After the security proxy point completes the flow control, it can write the search results or the search results that have been securely processed into the model context according to the flow control method.
[0048] At the data exchange node before the model output is written to the response result, after the model inference module generates the model output, it can first send the model output to the security proxy point. After the security proxy point completes the flow control, it can decide whether to write the model output or the security-processed model output to the response result.
[0049] At the data exchange node before the tool invocation request is sent to the target tool, after the tool invocation module generates the request, the security proxy point can intercept the tool name, tool address, and tool invocation parameters. After completing flow control, the security proxy point can decide whether to send the tool invocation request to the target tool.
[0050] For example, when an agent retrieves business records from a business knowledge base based on a user query, security controls can be implemented before the business records are written into the model context. When an agent prepares to call an external search tool, security controls can be implemented before the tool call request containing search keywords is sent. When the model generates an answer containing business data, security controls can be implemented again before the answer is written into the response result.
[0051] In this embodiment, the search results, tool call requests, and model outputs correspond to different data flows: entering the model context, being sent to external tools, and forming response results. Setting security proxy points at at least two of these locations allows the corresponding data to be controlled before entering the next processing stage, reducing the risk of overlooking intermediate transmissions when only checking task inputs or final outputs.
[0052] Optionally, in some embodiments, obtaining the data transmission restriction rules corresponding to the target flow in step S102 may include steps S201 to S203. Steps S201 to S203 are used to map the actual target address to the target security zone and obtain the corresponding data transmission requirements based on the target security zone: Step S201: Obtain the target address from the routing information of the data to be exchanged.
[0053] For example, routing information can be information indicating the data transmission path and destination for the data to be exchanged. The destination address can be the network address, interface address, service identifier, storage location, or resource identifier corresponding to the next processing stage. For instance, the destination address can be the model service interface address, knowledge base identifier, tool interface address, log storage address, or file storage address.
[0054] The security proxy can extract the target address from the request path, interface parameters, routing records, or task orchestration information of the data transmission request corresponding to the data to be exchanged. When the data transmission request undergoes address resolution by the service discovery module, the security proxy can also obtain the target address from the service discovery results. The service discovery module can be a program module used to determine the correspondence between service identifiers and actual service addresses.
[0055] Step S202: Determine the target security zone to which the target address belongs based on the mapping relationship between the target address and the security zone.
[0056] A security zone can be a logical or network area defined according to data security boundaries or deployment environment. For example, a security zone can include an internal controlled area, a restricted shared area, and an external area.
[0057] Internally controlled areas may include model services, knowledge bases, and business systems deployed on the same internal network as the agent. Restricted shared areas may include collaborative systems connected via dedicated interfaces and subject to access control. External areas may include public network tools or services not directly controlled by the agent's deployer.
[0058] The mapping relationship between target addresses and security zones can record the correspondence between address ranges, service identifiers, deployment locations, and security zone identifiers. Electronic devices can match target addresses with address ranges or service identifiers in the mapping relationship and determine the security zone corresponding to the matching record as the target security zone.
[0059] When a target address matches multiple records simultaneously, the electronic device can select the record with the most specific address range or the highest degree of service identifier matching. If no secure region is matched for the target address, the electronic device can determine the region to which the target address belongs as an external region or an unidentified region.
[0060] Step S203: Obtain the data transmission restriction rules associated with the target security area from the preset rule set.
[0061] In some examples, the preset rule set can be a set of data that records the data transmission requirements of different security zones. The preset rule set can include the source processing stage, the target security zone, the allowed data categories to be transmitted, the upper limit of the sensitivity level, and the flow processing requirements.
[0062] Electronic devices can use the source processing stage corresponding to the current data exchange node and the target security zone to query a preset rule set to obtain data transmission restriction rules associated with the target security zone. For example, the preset rule set can stipulate that internal business data is allowed to be transmitted to an internal controlled zone, while only public data is allowed to be transmitted to an external zone. When the target address belongs to an external zone, the electronic device can obtain data transmission restriction rules that only allow public data to be transmitted to the external zone.
[0063] In this embodiment, the target address reflects the actual transmission destination, the security zone mapping converts this destination into a corresponding data security boundary, and the preset rule set provides the transmission requirements for this boundary. Address resolution, zone matching, and rule query are performed sequentially to ensure that the corresponding data transmission restriction rules can be obtained when the same data is transmitted to different security zones.
[0064] Optionally, in some embodiments, obtaining the access subject's operation permissions for the data to be exchanged in step S102 may include steps S301 to S303, used to determine the operation permissions applicable to this data exchange by combining the access subject's role permissions and the attribute permissions corresponding to the data to be exchanged and the request environment: Step S301: Obtain role operation permissions from the role permission mapping relationship based on the role of the access subject.
[0065] Specifically, a role can be the functional identity that an accessing entity assumes within an organization, business system, or intelligent agent system. Role-based access permissions can be the operations that the corresponding role is typically allowed to perform.
[0066] Electronic devices can use the access subject identifier to query the identity management system, obtain the role corresponding to the access subject, and use the role to query the role permission mapping relationship to obtain the role's operation permissions. The role permission mapping relationship can record the operations that different roles are allowed to perform.
[0067] When an access subject corresponds to multiple roles, the electronic device can merge the role operation permissions corresponding to multiple roles. When there is an inheritance relationship between roles, the electronic device can also obtain the permissions corresponding to the access subject's direct role and superior role according to the role inheritance relationship, and handle the allowed and denied permissions according to the preset permission conflict rules.
[0068] Step S302: Obtain attribute operation permissions from the attribute access control policy based on the data tag and request environment attributes.
[0069] Specifically, request environment attributes can be information describing the environment in which the current operation request takes place. Request environment attributes may include request time, request source network, terminal security status, device identifier, task type, authentication method, or session risk level.
[0070] Attribute access control policies determine the control rules for allowed operations based on data attributes and the request environment. Attribute access control policies can record the mapping between data tags, request environment attributes, and allowed operations.
[0071] In practical applications, electronic devices can input the data tag of the data to be exchanged and the current request environment attributes into the attribute access control policy engine. The attribute access control policy engine can match policy records that satisfy the current data tag and request environment attributes, and output attribute operation permissions.
[0072] For example, an attribute access control policy can specify that data with a sensitivity level of 2 can only be read within the organization's internal network. When the sensitivity level of the data to be exchanged is 2, and the request originates from the organization's internal network, the attribute access control policy engine can issue a read permission. When the request originates from the internet, the attribute access control policy engine may not issue a read permission.
[0073] Step S303: Determine the intersection of the role operation permission and the attribute operation permission as the operation permission.
[0074] The intersection of role-based operation permissions and attribute-based operation permissions can be the permissions shared by both types of permissions. Electronic devices can compare role-based operation permissions and attribute-based operation permissions according to permission type, and determine the shared permissions as the operation permissions of the access subject for the data to be exchanged. For example, if role-based operation permissions include read, write, and export permissions, and attribute-based operation permissions include read and write permissions, the electronic device can determine read and write permissions as the operation permissions.
[0075] In this embodiment, role-based operation permissions limit the operations that the accessing entity can typically perform, while attribute-based operation permissions limit the operations that can be performed under the current request conditions based on data tags and the current request environment. Using the intersection of these two types of permissions prevents the granting of operation permissions solely based on a fixed role, allowing operation permissions to be adjusted as the data to be exchanged and the request environment change.
[0076] Optionally, in some embodiments, obtaining operation permissions in step S102 can also be done using a temporary authorization method, specifically including steps S401 to S405, used to obtain operation permissions that are only applicable to specified data, specified operations, and limited time periods when the existing permissions of the accessing subject are insufficient: Step S401: If the existing permissions of the access subject do not include the permissions required for the operation request to exchange the data, and the operation request meets the preset temporary authorization conditions, a temporary authorization request is generated.
[0077] An operation request can be a request from the accessing subject to perform read, modify, export, transfer, or call operations on the data to be exchanged. The permissions required for an operation request can be determined based on the operation type.
[0078] Preset temporary authorization conditions may include one or more of the following: the data to be exchanged is allowed temporary access, the access subject belongs to a preset subject range, the operation request belongs to a preset operation range, the reasoning task belongs to a preset task type, and the operation request can be processed by the authorization approval system.
[0079] Electronic devices can compare the existing permissions of the accessing subject with the permissions required for the operation request. If the existing permissions do not include the permissions required for the operation request, the electronic device can continue to determine whether the operation request meets the preset temporary authorization conditions. If the operation request meets the preset temporary authorization conditions, the electronic device can generate a temporary authorization request.
[0080] A temporary authorization request may include the access subject identifier, the data to be exchanged identifier, the operation type, the reason for the request, the task identifier, the target flow, and the validity period of the request.
[0081] Step S402: Obtain the authorization confirmation result for the temporary authorization request from the authorization approval system.
[0082] Electronic devices can send temporary authorization requests to the authorization approval system. The authorization approval system can determine the approval target according to a preset approval process and display the operation type, data tag of the data to be exchanged, target flow, and application validity period to the approval target.
[0083] After the approval process is completed, the authorization approval system can return an authorization confirmation result. The authorization confirmation result can indicate whether authorization is allowed or denied, and may also include the allowed operations, the validity period of the authorization, and the applicable data scope.
[0084] While awaiting authorization confirmation, the security agent can pause the transmission of data to be exchanged and store the data in a pending confirmation queue. If the security agent does not receive authorization confirmation within the preset confirmation period, it can terminate the transmission of data to be exchanged.
[0085] Step S403: If the authorization confirmation result indicates that authorization is permitted, a temporary authorization credential associated with the data to be exchanged and the operation request is generated.
[0086] Temporary authorization credentials can be tokens, digital signature credentials, or temporary permission records that include the scope of authorization and validity period. Electronic devices can write the access subject identifier, the identifier of the data to be exchanged, the operation type, the task identifier, the target flow, the authorization start time, and the authorization end time into the temporary authorization credential, and generate a unique credential identifier for the temporary authorization credential.
[0087] The authorization approval system can also use a preset signature key to digitally sign temporary authorization credentials, allowing security agents to verify the source and integrity of the temporary authorization credentials.
[0088] Step S404: Determine the operation permission based on the temporary authorization credential.
[0089] Electronic devices can verify the validity period of temporary authorization credentials, digital signatures, access subject identifiers, data to be exchanged identifiers, and operation types. When a temporary authorization credential is valid and matches the current access subject, data to be exchanged, and operation request, the electronic device can determine the permissions recorded in the temporary authorization credential as the operation permissions corresponding to this operation.
[0090] If the temporary authorization credential fails verification, the electronic device may refuse to determine the operation permission based on the temporary authorization credential and terminate the transmission of the data to be exchanged.
[0091] Step S405: If the operation corresponding to the operation request is completed or the temporary authorization certificate expires, the temporary authorization certificate is invalidated.
[0092] In other words, electronic devices can update the status of temporary authorization credentials to "used" or "expired" after the operation is completed. Electronic devices can also periodically check the expiration date of temporary authorization credentials and update their status to "expired" when the current time exceeds the authorization end time. Expired temporary authorization credentials cannot be used to determine operation permissions.
[0093] In this embodiment, temporary authorization is initiated only when existing permissions are insufficient and the operation request meets preset conditions. The generated temporary authorization credential is associated with the data to be exchanged, the operation request, and the validity period, and expires after the operation is completed or the period expires. The permissions obtained in this way can only be used for limited, confirmed operations, which can both meet the temporary operation needs of specific reasoning tasks and prevent temporary permissions from being used for other data, other operations, or subsequent tasks.
[0094] Optionally, in some embodiments, the step S103, which determines the flow control method corresponding to the data to be exchanged based on the data tag, the data transmission restriction rules, and the operation permissions, may include steps S1031 to S1033, used to compare the security attributes of the data to be exchanged, the receiving requirements of the target flow, and the operation permissions of the access subject, to determine whether to allow transmission, deny transmission, or transmit after secure processing: Step S1031: Obtain the data category and sensitivity level of the data to be exchanged from the data tag.
[0095] The data category can be a data type categorized according to data content or business purpose. For example, data categories may include public data, internal business data, identity information, account information, transaction data, technical documents, or operational logs. Sensitivity levels can be set to multiple levels in ascending order.
[0096] The security broker can parse the data tags of the data to be exchanged and read the data category and sensitivity level fields. If the data tag is missing a data category or sensitivity level, the security broker can call the data classification and grading module to supplement and determine the data category or sensitivity level.
[0097] Step S1032: Obtain the upper limit of the data category and sensitivity level that are allowed to be transmitted along the target flow from the data transmission restriction rules.
[0098] The sensitivity level cap can be defined as the highest sensitivity level that data can be transmitted to the target flow. Data transmission restriction rules can record the set of allowed data categories and the corresponding sensitivity level cap for each data category. Electronic devices can parse these data transmission restriction rules to obtain the allowed data categories and their corresponding sensitivity level caps for the target flow.
[0099] Step S1033: Determine the flow control method based on the data category and sensitivity level of the data to be exchanged, the upper limit of the data category and sensitivity level allowed to be transmitted along the target flow direction, and the operation permissions.
[0100] Specifically, if the operating permissions do not include the permissions required for the current operation, the electronic device can determine to refuse transmission.
[0101] If the accessing entity has the necessary permissions for the current operation, the data category of the data to be exchanged belongs to the data category that is allowed to be transmitted along the target flow, and the sensitivity level of the data to be exchanged is less than or equal to the corresponding sensitivity level upper limit, the electronic device can determine to allow the transmission.
[0102] If the data category to be exchanged does not belong to the data category that is allowed to be transmitted along the target flow direction, the electronic device can determine to refuse transmission.
[0103] If the data category to be exchanged belongs to the data category that is allowed to be transmitted along the target flow direction, the sensitivity level of the data to be exchanged is greater than the corresponding sensitivity level upper limit, and there are security processing methods in the data transmission restriction rules that can reduce the identifiability or sensitivity of the data to be exchanged, the electronic device can determine to transmit the data after performing the corresponding security processing.
[0104] If there is no secure processing method that can make the processed data comply with the data transmission restriction rules, the electronic device can determine to refuse transmission.
[0105] For example, if the data category to be exchanged is identity information, the sensitivity level is level three, the target flow allows the transmission of identity information with a maximum sensitivity level of level two, and the accessing entity has transmission permissions, the electronic device can determine to reduce the identifiability of the identity information before transmission. If the data category to be exchanged is account credentials, but the target flow does not allow the transmission of account credentials, the electronic device can determine to refuse transmission.
[0106] In this embodiment, the data category and sensitivity level of the data to be exchanged reflect the security attributes of the data, the upper limit of the data category and sensitivity level allowed to be transmitted to the target flow reflects the security requirements of the transmission destination, and the operation permission indicates whether the accessing subject has the right to perform the current operation. By comparing the above information item by item, a clear result of allowing transmission, denying transmission, or transmitting after security processing can be obtained, reducing erroneous releases or excessive blocking caused by unclear judgment criteria.
[0107] Optionally, in some embodiments, step S104, which involves controlling the transmission of the data to be exchanged through a security proxy at the current data exchange node according to the flow control method before the data to be exchanged enters the next processing stage, may include steps S1041 to S1043, for performing desensitization based on the sensitive content and target flow requirements of the data to be exchanged, and transmitting it to the next processing stage after the desensitization result meets the transmission conditions: Step S1041: When the flow control mode indicates that the data to be exchanged should be de-identified before transmission, the de-identification rule is determined according to the data tag and the data transmission restriction rule.
[0108] De-identification can be a process of reducing the identifiability of sensitive content through deletion, replacement, masking, generalization, or perturbation. De-identification rules are the rules that apply these processes to sensitive content in the data to be exchanged.
[0109] Data tags can indicate sensitive fields, data categories, and sensitivity levels in the data to be exchanged. Data transfer restriction rules can indicate the target data fields that are allowed to be retained, the allowed sensitivity levels, or the de-identification methods that need to be used.
[0110] Electronic devices can determine the content to be de-identified in the data to be exchanged based on the data tags, and determine the corresponding processing method for the content to be de-identified based on the data transmission restriction rules.
[0111] For example, if a data label indicates that a field is an identity field, and the data transmission restriction rules stipulate that some characters of the identity field need to be masked before it is transmitted to the target, the electronic device can determine the masked characters as the corresponding desensitization rule.
[0112] Step S1042: Process the data to be exchanged according to the desensitization rules to obtain desensitized data.
[0113] Electronic devices can traverse fields or text fragments in the data to be exchanged, identify content that matches the anonymization rules, and perform deletion, replacement, masking, generalization, or perturbation processing. Electronic devices can also retain content in the data to be exchanged that does not require anonymization and combine the processed content into anonymized data.
[0114] For example, the data to be exchanged includes account identifiers and business statistics results. Data tags indicate that the account identifier is a sensitive field, and the anonymization rules stipulate that only a preset portion of the account identifier should be retained. Electronic devices can perform character masking on the account identifier while retaining the business statistics results, thus obtaining anonymized data.
[0115] Step S1043: Transmit the de-identified data to the next processing step through the security proxy point at the current data exchange node.
[0116] The security agent point can use de-identified data to replace the data to be exchanged in the temporary cache, and re-enter the de-identified data into the data classification and grading module to redetermine the data label of the de-identified data.
[0117] The security broker can match the redefined data category, sensitivity level, and sensitive fields included in the de-identified data with the data transmission restriction rules corresponding to the target flow. If the de-identified data complies with the data transmission restriction rules, the security broker can allow the data to proceed to the next processing stage. If the de-identified data still does not comply with the data transmission restriction rules, the security broker can either re-execute the de-identification process or terminate the transmission.
[0118] In this embodiment, data tags are used to locate the content to be de-identified, and data transmission restriction rules are used to determine the content that can be retained and the level of sensitivity that can be reached in the target flow. Therefore, the de-identification rules can simultaneously adapt to the requirements of the content of the data to be exchanged and the transmission destination. After de-identification is completed, tag identification and rule matching are performed again to verify whether the de-identification result meets the transmission conditions. This can both avoid insufficient de-identification leading to the continued transmission of sensitive content and reduce unnecessary over-identification.
[0119] Optionally, in some embodiments, the method may further include: when the data to be exchanged is obtained by model generation, retrieval result concatenation, or tool processing of at least one source data, obtaining the source mapping relationship between the data to be exchanged and the source data, and obtaining the historical flow constraint information corresponding to the source data according to the source mapping relationship; determining the effective sensitivity level, effective allowed operation set, and validity period of the data to be exchanged according to the data tag of the data to be exchanged and the historical flow constraint information; determining the flow control method corresponding to the data to be exchanged according to the effective sensitivity level, the effective allowed operation set, the validity period, and the data transmission restriction rules corresponding to the target flow direction; and updating the historical flow constraint information and source mapping relationship corresponding to the data to be exchanged after the data to be exchanged has completed security processing and complies with the data transmission restriction rules.
[0120] Specifically, when the data to be exchanged at the current data exchange node is obtained from one or more source data through model generation, retrieval result concatenation, or tool processing, the security proxy point at the current data exchange node can also obtain the source mapping relationship between the data to be exchanged and each of the source data, and obtain the historical flow constraint information corresponding to each of the source data based on the source mapping relationship. The source mapping relationship can be synchronously recorded by the model, retrieval component, or tool when processing the source data and generating the data to be exchanged, and can include source data identifier, source data fingerprint, target field or target content fragment in the data to be exchanged, and at least one processing method among model generation, copying, concatenation, summarization, or format conversion; the historical flow constraint information can include the data tag of the source data, the allowed operation set, the allowed processing stage type, and the validity period.
[0121] When the model output does not provide field-level source relationships, a source mapping relationship can be established between all source data used in this model generation and the overall model output; when the model output contains source reference identifiers, a source mapping relationship can be established between the corresponding content fragments in the model output and the corresponding source data based on the source reference identifiers.
[0122] The security proxy point can verify the source mapping relationship based on the source data fingerprint, the tracking identifier of the corresponding security event, and the parent event identifier. Upon successful verification, the highest sensitivity level among the currently identified data tag and the data tags of each source data is determined as the valid sensitivity level. The intersection of the allowed operation set of each source data and the access subject's operation permissions is determined as the valid allowed operation set. The earliest validity period corresponding to each source data is determined as the validity period. The security proxy point can determine the flow control method for the data to be exchanged based on the valid sensitivity level, the valid allowed operation set, the validity period, and the data transmission restriction rules corresponding to the target flow. For example, if the current time exceeds the validity period, the operation requested by the access subject does not belong to the valid allowed operation set, or the next processing step corresponding to the target flow does not belong to the allowed processing step type, the flow control method can be determined as rejection of transmission. If the data to be exchanged does not conform to the data transmission restriction rules corresponding to the target flow, but can conform to the data transmission restriction rules after security processing, the flow control method can be determined as transmission after security processing.
[0123] It should be noted that when the content of the data to be exchanged changes due to model rewriting, summary generation, or format conversion, the historical flow constraints corresponding to the source data are not lifted due to the change in content format. Only after security processing is completed according to steps S1041 to S1043, and it is confirmed that the processed data conforms to the data transmission restriction rules corresponding to the target flow, is the historical flow constraint information and source mapping relationship corresponding to the data to be exchanged updated according to the data tag of the processed data. At the same time, the source mapping relationship and historical flow constraint information before processing are retained as traceability records. Therefore, the security restrictions corresponding to the source data can be continuously passed between model generation, context writing, and tool invocation, preventing data from being transmitted to unacceptable processing stages due to tag loss after model rewriting or multiple transfers.
[0124] Optionally, in some embodiments, before the data to be exchanged enters the next processing stage, after controlling the transmission of the data to be exchanged through the security proxy point at the current data exchange node according to the flow control method, the method may further include steps S501 to S505, used to associate security events generated by the same inference task at different data exchange nodes, and form a chain of audit records capable of verifying the event content and event sequence: Step S501: Generate a security event for the current data exchange node and write the tracking identifier of the inference task into the security event.
[0125] A security event can be a data record used to document the data security control process performed by a security agent. The event content can include event identifier, trace identifier, task branch identifier, data exchange node identifier, occurrence time, summary of data to be exchanged, data tag summary, target flow direction, access subject identifier, flow control method, and execution result.
[0126] A tracking identifier can be a unique identifier used to identify a single inference task or an instance of its execution. When an agent receives a task request, the task orchestration module can generate a tracking identifier and write it into the task context of the inference task. Security agent points at different data exchange nodes can obtain the same tracking identifier from the task context.
[0127] When an inference task includes parallel task branches, the task orchestration module can also generate task branch identifiers for different task branches and write these identifiers into the task context of the corresponding task branch. The task branch identifiers can be used to distinguish different parallel task branches within the same inference task.
[0128] After completing the flow control at the security agent point, the electronic device can generate a security event based on the processing information of the current data exchange node, write the tracking identifier and task branch identifier into the security event, and generate a unique event identifier for the security event.
[0129] Step S502: If there is a preceding security event with the same tracking identifier as the security event, the event identifier of the preceding security event is determined as the parent event identifier of the security event, and the event hash of the preceding security event is determined as the pre-chain hash.
[0130] A preceding security event can be a security event generated before the current security event in the same reasoning task and which has a direct execution order relationship with the current security event.
[0131] The parent event identifier can be used to record the association between the current security event and its predecessor. The chain-previous hash can be the event hash of the predecessor security event recorded by the current security event.
[0132] Electronic devices can query preceding security events that have the same tracking identifier as the current security event and are located before the current data exchange node, based on the execution order of data exchange nodes in the intelligent agent inference link.
[0133] When there are parallel branches in the inference task, the electronic device can search for the preceding security event among security events with the same tracking identifier and the same task branch identifier, thus avoiding the misidentification of security events generated more recently in other parallel branches as the preceding security events of the current security event.
[0134] When a preceding security event is found, the electronic device can write the event identifier of the preceding security event into the parent event identifier field of the current security event, and read the event hash of the preceding security event, and determine the read event hash as the chain-preceding hash of the current security event.
[0135] Step S503: If there is no preceding security event with the same tracking identifier as the security event, the preset initial hash is determined as the pre-chain hash.
[0136] The absence of a preceding security event indicates that the current security event is the first security event corresponding to the current inference task or the current task branch.
[0137] The preset initial hash can be a pre-set fixed hash value, or a hash value calculated based on the tracking identifier, task branch identifier, task creation time, or task initialization information of the inference task. Electronic devices can determine the preset initial hash as the front-chain hash corresponding to the first security event.
[0138] Step S504: Determine the event hash of the security event based on the event content of the security event and the pre-chain hash.
[0139] Event hashes can be fixed-length digests calculated from the event content and the pre-chain hash of a security event. They are used to verify the integrity of security events and the chained relationships between security events.
[0140] Electronic devices can serialize the event content of security events according to a preset field order, and then concatenate the serialized event content with the pre-chain hash. The electronic device can use a preset hash algorithm to calculate the hash value corresponding to the concatenation result, and determine the calculated hash value as the event hash of the security event.
[0141] To ensure consistent event hashes for identical event content, electronic devices can standardize field order, character encoding, time format, and null value representation before calculating the event hash. The default hash algorithm can be SHA-256, SHA-3, or other hash algorithms capable of generating fixed-length digests.
[0142] Step S505: Associate the security event with the event hash of the security event.
[0143] Electronic devices can store security events and event hashes in security event databases, log storage systems, or auditing systems. Electronic devices can associate security events and event hashes using event identifiers, or they can store event hashes as a field within a security event.
[0144] The security event database can be indexed based on trace identifiers and task branch identifiers. During the audit process, electronic devices can query security events corresponding to the same inference task based on trace identifiers, distinguish different task branches based on task branch identifiers, and restore the sequential relationship between security events based on parent event identifiers.
[0145] Electronic devices can also recalculate the event hashes of each security event and compare the recalculated event hashes with the stored event hashes. If the event hashes are inconsistent, it can be determined that the content of the corresponding security event has changed. If the previous chain hash of the current security event record is inconsistent with the event hash of the preceding security event, it can be determined that the chain relationship between security events is abnormal.
[0146] In this embodiment, the tracking identifier can aggregate security events generated by the same inference task, the task branch identifier can distinguish parallel task branches, the parent event identifier can restore the sequential relationship between security events, and the pre-chain hash and event hash can associate the integrity verification results of adjacent security events. Using the above information, the auditing system can reconstruct the data security control process in the agent's inference task and locate abnormal positions when the content of a security event changes or the event chain breaks, thereby improving the traceability and audit credibility of the data security control process.
[0147] The above implementation methods can be implemented separately or combined according to the data security control requirements of the intelligent agent.
[0148] For example, an electronic device can first determine the existing permissions of the access subject based on the intersection of role-based operation permissions and attribute-based operation permissions. If the existing permissions are insufficient and the operation request meets the preset temporary authorization conditions, the electronic device can obtain the operation permissions required for this operation through temporary authorization credentials.
[0149] The configuration of multiple data exchange nodes and security agent points can be combined with the method of obtaining data transmission restriction rules. The method of obtaining data transmission restriction rules can be combined with the method of obtaining operation permissions. The process of determining the flow control method can be combined with the anonymized transmission process. After completing flow control, the security agent point can also generate and associate the corresponding security events. Except for processing with a clear execution order or data dependency relationship, different implementation methods can be selected and combined according to the actual deployment environment.
[0150] In one specific application, after the agent receives a task request, the task orchestration module can generate a tracking identifier for the task request. After the agent obtains the search results from the knowledge base according to the task request, the security agent point before writing the search results into the model context can obtain the data tags of the search results, the target flow direction corresponding to the model context, and the data transmission restriction rules corresponding to that target flow direction, and obtain the access subject's operation permissions for the search results. The security agent point can determine the flow control method corresponding to the search results based on the above information and control whether the search results are written into the model context.
[0151] After the model generates its output based on the model context, the security proxy point before writing the model output to the response result can obtain the data tags of the model output, the data transmission restriction rules corresponding to the response result, and the access subject's operation permissions for the model output, and determine the flow control method accordingly. When the flow control method is to allow transmission, the security proxy point can allow the model output to be written to the response result; when the model output contains content that is not allowed to be provided to the task requester, the security proxy point can refuse to write or write it after completing security processing.
[0152] When an agent needs to invoke a target tool, the security agent point before the tool invocation request is sent to the target tool can intercept the tool name, tool address, and tool invocation parameters. It can also obtain the data tags of the tool invocation parameters, the data transmission restriction rules corresponding to the security zone to which the target tool belongs, and the access subject's operational permissions regarding the tool invocation parameters. The security agent point can determine the flow control method based on this information. If the tool invocation parameters do not comply with the data transmission restriction rules or the access subject does not have the corresponding operational permissions, the security agent point can block the tool invocation; if the tool invocation parameters meet the transmission requirements after being de-identified, the security agent point can send the de-identified tool invocation parameters to the target tool.
[0153] After each security agent completes the flow control, it can generate security events containing the same tracking identifier and associate each security event through the parent event identifier, the pre-chain hash, and the event hash. When the auditing system queries a security event based on the tracking identifier, it can reconstruct the knowledge retrieval, model reasoning, tool invocation, and result output process of the current task request and verify whether the content of the security event has changed.
[0154] Based on the same inventive concept, embodiments of the present invention also provide an electronic device, which may include a memory and a processor. The memory stores program instructions, and when the processor reads and executes the program instructions, it can perform any of the above-described data security control processes.
[0155] The processor can be a central processing unit, graphics processing unit, digital signal processor, application-specific integrated circuit, field-programmable gate array, or other programmable logic device. Memory can include volatile memory and non-volatile memory, used to store program instructions, inference task information, data tags, data transfer restriction rules, operation permissions, flow control methods, temporary authorization credentials, and security events.
[0156] Electronic devices may also include communication interfaces. These interfaces can be used for data communication between the electronic device and intelligent agents, knowledge bases, target tools, access control systems, authorization and approval systems, key management systems, and security event databases. The processor, memory, and communication interface can be connected via a bus.
[0157] After the processor executes the program instructions, it can obtain the data to be exchanged at multiple data exchange nodes in the agent's inference link and complete the flow control through the corresponding security agent point. Electronic devices enable the above data security control process to be deployed in the agent's operating environment and implement corresponding data security controls when the agent performs knowledge retrieval, model inference, tool invocation, and result output.
[0158] Figure 2 An exemplary structural diagram of the electronic device is disclosed. The electronic device may include one or more processors 1101, memory 1102, input device 1103, output device 1104, and bus 1105. The processor 1101, memory 1102, input device 1103, and output device 1104 may be connected via bus 1105 and may be installed on a common motherboard or otherwise installed as needed.
[0159] Based on the same inventive concept, embodiments of the present invention also provide a computer-readable storage medium that can store a computer program. When the computer program is executed by a processor, it can implement the data security control method for the intelligent agent reasoning process described in any of the above embodiments. The computer-readable storage medium may include a read-only memory, a random access memory, a solid-state drive, a magnetic disk, an optical disk, or other media capable of storing computer programs.
[0160] The above description is merely an embodiment of the present invention and is not intended to limit the scope of protection of the present invention. For those skilled in the art, the present invention can have various modifications and variations. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A data security control method for the reasoning process of an intelligent agent, characterized in that, The method includes: During the process of the intelligent agent performing inference tasks, the data to be exchanged at the current data exchange node is intercepted by the security proxy points set at multiple data exchange nodes in the inference link of the intelligent agent, and the data to be transmitted to the next processing stage is intercepted. Obtain the data tag of the data to be exchanged, the data transmission restriction rules corresponding to the target flow of the data to be exchanged, and the operation permissions of the accessing subject for the data to be exchanged; Based on the data tag, the data transmission restriction rules, and the operation permissions, determine the flow control method corresponding to the data to be exchanged; Before the data to be exchanged enters the next processing stage, the transmission of the data to be exchanged is controlled by the security proxy point at the current data exchange node in accordance with the flow control method.
2. The method according to claim 1, characterized in that, The plurality of data exchange nodes include at least two of the following: the data exchange node before the retrieval result is written into the model context, the data exchange node before the model output is written into the response result, and the data exchange node before the tool call request is sent to the target tool; The security proxy points are respectively set between the corresponding data exchange node and the next processing stage.
3. The method according to claim 1, characterized in that, The data transmission restriction rules are obtained in the following way: The target address is obtained from the routing information of the data to be exchanged; Based on the mapping relationship between the target address and the security zone, the target security zone to which the target address belongs is determined; Obtain the data transmission restriction rules associated with the target security zone from the preset rule set.
4. The method according to claim 1, characterized in that, The operation permission is obtained in the following way: Based on the role of the accessing entity, obtain the role operation permissions from the role permission mapping relationship; Based on the data tags and request environment attributes, obtain attribute operation permissions from the attribute access control policy; The intersection of the role operation permissions and the attribute operation permissions is determined as the operation permissions.
5. The method according to claim 1, characterized in that, The operation permission is obtained through temporary authorization, and the temporary authorization method includes: If the existing permissions of the accessing subject do not include the permissions required for the operation request to exchange the data, and the operation request meets the preset temporary authorization conditions, a temporary authorization request is generated. Obtain authorization confirmation results for the temporary authorization request from the authorization approval system; If the authorization confirmation result indicates that authorization is permitted, a temporary authorization credential associated with the data to be exchanged and the operation request is generated; The operation permissions are determined based on the temporary authorization certificate; The temporary authorization certificate shall be invalidated if the operation corresponding to the operation request is completed or if the temporary authorization certificate expires.
6. The method according to claim 1, characterized in that, The step of determining the flow control method corresponding to the data to be exchanged based on the data tag, the data transmission restriction rules, and the operation permissions includes: Obtain the data category and sensitivity level of the data to be exchanged from the data tags; The upper limits of data categories and sensitivity levels that are allowed to be transmitted along the target flow direction are obtained from the data transmission restriction rules; The flow control method is determined based on the data category and sensitivity level of the data to be exchanged, the upper limit of the data category and sensitivity level allowed to be transmitted along the target flow direction, and the operation permissions.
7. The method according to claim 1, characterized in that, Before the data to be exchanged enters the next processing stage, the transmission of the data to be exchanged is controlled by a security proxy point at the current data exchange node according to the flow control method, including: When the flow control mode indicates that the data to be exchanged should be de-identified before transmission, the de-identification rule is determined according to the data tag and the data transmission restriction rule; The data to be exchanged is processed according to the aforementioned desensitization rules to obtain desensitized data; The de-identified data is transmitted to the next processing stage via a security proxy point at the current data exchange node.
8. The method according to claim 1, characterized in that, Before the data to be exchanged enters the next processing stage, after controlling the transmission of the data to be exchanged according to the flow control method through the security proxy point at the current data exchange node, the method further includes: A security event is generated for the current data exchange node, and the tracking identifier of the inference task is written into the security event; If a preceding security event with the same tracking identifier as the security event exists, the event identifier of the preceding security event is determined as the parent event identifier of the security event, and the event hash of the preceding security event is determined as the chain front hash. In the absence of a preceding security event with the same tracking identifier as the security event, the preset initial hash is determined as the pre-chain hash; The event hash of the security event is determined based on the event content of the security event and the pre-chain hash. The security event and its event hash are associated and stored together.
9. An electronic device, characterized in that, The electronic device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, it implements the method of any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method of any one of claims 1 to 8.
