An agent-based payment system, method, apparatus, medium, and device
By storing payment credentials in the TEE of the user terminal and verifying the signature of payment requests, the identity verification and security issues in the intelligent agent payment system are solved, and the security and reliability of intelligent agent autonomous payment are realized.
Patent Information
- Application Number
- CN202610520999.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-17
- Publication Date
- 2026-07-24
Smart Images

Figure CN122453400A_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of computer technology, and in particular to a payment system, method, apparatus, medium and device based on intelligent agents. Background Technology
[0002] With the development of Artificial Intelligence (AI) technology, Large Language Models (LLMs) have been widely applied in various fields. Currently, in various payment scenarios such as shopping, travel, and dining, a new era of intelligent payment has quietly arrived, where LLM-based agents identify user intentions and initiate payments based on those intentions instead of the users themselves.
[0003] However, traditional payment systems are typically designed for human users and lack mechanisms to establish trusted payment identities for non-human intelligent agents. Since these agents lack bank cards and biometric data, existing identity verification methods cannot be used to authenticate them. Current methods for using intelligent agents for payments either rely entirely on human user actions (such as QR code payments), which essentially fails to allow the agent to initiate the payment on behalf of a human, requiring manual intervention for each transaction, or completely relinquish the agent's permissions, which is too risky for such a payment scenario.
[0004] Therefore, how to ensure payment security while using intelligent agents to initiate payments on behalf of users is an urgent problem to be solved. Summary of the Invention
[0005] This specification provides an agent-based payment system, method, apparatus, storage medium, and electronic device to partially address the problems existing in the prior art.
[0006] The embodiments in this specification adopt the following technical solutions: This specification provides a payment system based on intelligent agents. The system includes: a user terminal and a payment server. An intelligent agent is deployed on the user terminal, and the user terminal has a Trusted Execution Environment (TEE). The TEE stores payment credentials pre-issued by the payment server to the intelligent agent. Wherein: The user terminal is used to interact with the user through the large language model corresponding to the intelligent agent. When the user's intention to pay is identified based on the interaction with the user, a payment request is generated and the payment request is transmitted to the TEE. In the TEE, the payment request is signed using the payment certificate pre-stored in the TEE. The intelligent agent's intelligent agent identifier and the signed payment request are sent to the payment server. The payment server is used to receive the agent identifier and the signed payment request, query the payment voucher pre-issued for the agent based on the agent identifier, and use the queried payment voucher to verify the signed payment request. After successful verification, the server executes payment settlement based on the amount to be paid and the payee identifier contained in the payment request.
[0007] This specification provides a payment method based on intelligent agents, the method comprising: The user terminal interacts with the user through the large language model corresponding to the intelligent agent it deploys. When it recognizes that the user has the intention to pay based on the interaction with the user, it generates a payment request. The payment request is passed to the Trusted Execution Environment (TEE) of the user terminal; the TEE stores payment credentials pre-issued by the payment server to the intelligent agent; In the TEE, the payment request is signed using the payment voucher pre-stored in the TEE; The agent's agent identifier and the signed payment request are sent to the payment server. The payment server then queries the payment voucher pre-issued for the agent based on the agent identifier and uses the queried payment voucher to verify the signed payment request. After successful verification, the payment server executes the payment settlement based on the amount to be paid and the payee identifier contained in the payment request.
[0008] This specification provides a payment method based on intelligent agents, the method comprising: The payment server receives the agent identifier of the agent and a payment request signed with a payment credential from the user terminal. The payment request is generated by the user terminal when it identifies the user's intention to pay based on the interaction with the user using the large language model corresponding to the agent. The signed payment request is generated when the user terminal passes the payment request to the TEE, where the payment request is signed using the payment credential pre-stored in the TEE. The payment credential is pre-issued by the payment server to the agent deployed on the user terminal. The payment voucher pre-issued to the intelligent agent is retrieved based on the intelligent agent's identifier; The signed payment request is verified using the retrieved payment voucher. After verification, payment settlement is performed based on the amount to be paid and the payee identifier contained in the payment request.
[0009] This specification provides a payment device based on an intelligent agent, the device comprising: The generation module is used to interact with the user through the large language model corresponding to the intelligent agent deployed by the device itself. When the interaction with the user indicates that the user has a payment intention, a payment request is generated. An internal transmission module is used to transmit the payment request to the device's own Trusted Execution Environment (TEE); the TEE stores payment credentials pre-issued by the payment server to the intelligent agent; An environment isolation module is used in the TEE to sign the payment request using the payment credential pre-stored in the TEE; The sending module is used to send the agent's agent identifier and the signed payment request to the payment server, so that the payment server can query the payment voucher pre-issued for the agent based on the agent identifier, and use the queried payment voucher to verify the signed payment request. After successful verification, the payment server executes the payment settlement based on the amount to be paid and the payee identifier contained in the payment request.
[0010] This specification provides a payment device based on an intelligent agent, the device comprising: The receiving module is used to receive the agent identifier of the agent and the payment request signed with a payment credential sent by the user terminal; the payment request is generated by the user terminal when it identifies the user's intention to pay based on the interaction with the user through the large language model corresponding to the agent; the signed payment request is generated when the user terminal passes the payment request to the TEE, and the payment request is signed by the payment credential pre-stored in the TEE; the payment credential is pre-issued by the device to the agent deployed on the user terminal; The query module is used to query the payment voucher pre-issued to the intelligent agent based on the intelligent agent's identifier; The signature verification module is used to verify the signed payment request using the retrieved payment voucher; The payment module is used to perform payment settlement based on the amount to be paid and the payee identifier contained in the payment request after successful verification.
[0011] This specification provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned agent-based payment method.
[0012] This specification provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the aforementioned agent-based payment method.
[0013] The above-described at least one technical solution adopted in the embodiments of this specification can achieve the following beneficial effects: This specification discloses an agent-based payment system. The payment server pre-issues payment credentials to agents deployed on user terminals. The user terminal stores these credentials in its TEE (Transaction Entity Execution Environment). When an agent initiates a payment based on a user's payment intention, it transmits the payment request to the TEE. The TEE then signs the payment request using the payment credentials and sends the agent's identifier and the signed payment request to the payment server. The payment server retrieves the corresponding payment credentials based on the agent's identifier and verifies the signed payment request using the retrieved credentials. Upon successful verification, payment settlement is performed based on the payment request. Through this method, the payment server issues payment credentials to the agent, which serve as the agent's electronic identity. The user terminal always stores these credentials in the TEE and does not transmit them externally, ensuring the reliability of the electronic identity. Therefore, during payment, a trust relationship can be established between the payment server and the agent using these payment credentials, ensuring payment security in scenarios where agents are used to initiate payments instead of humans. Attached Figure Description
[0014] The accompanying drawings, which are included to provide a further understanding of this specification and form part of this specification, illustrate exemplary embodiments and are used to explain this specification, but do not constitute an undue limitation thereof. In the drawings: Figure 1 A schematic diagram of an agent-based payment system structure provided in the embodiments of this specification; Figure 2 This is a flowchart illustrating the process by which the payment server provided in this manual issues payment credentials to the smart agent. Figure 3 This is a schematic diagram of the payment method based on intelligent agents provided in the embodiments of this specification; Figure 4 A schematic diagram of a first agent-based payment device provided in the embodiments of this specification; Figure 5 This is a schematic diagram of a second agent-based payment device provided in the embodiments of this specification; Figure 6 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this specification. Detailed Implementation
[0015] To make the objectives, technical solutions, and advantages of this specification clearer, the technical solutions of this specification will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, and not all of them. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this specification.
[0016] The technical solutions provided in the various embodiments of this specification are described in detail below with reference to the accompanying drawings.
[0017] Figure 1 This is a schematic diagram of a payment system based on an intelligent agent, provided as an embodiment of this specification. The payment system specifically includes: a user terminal and a payment server. Wherein: A smart agent is deployed on the user terminal. This smart agent has a pre-installed LLM (Limited Management System). The LLM interacts with the user through at least one of the following methods: voice, text, or vision. Based on the interaction with the user, it identifies whether the user has a payment intention. When a payment intention is found, the LLM can call a payment tool or payment software development kit (SDK) pre-installed in the smart agent that corresponds to the payment server. This payment tool or payment SDK contains the API corresponding to the payment server, and the smart agent can then interact with the payment server through this API to initiate a payment. The user terminal also has a Trusted Execution Environment (TEE) for storing payment credentials issued by the payment server to the smart agent. These payment credentials are only used within the TEE and are never transmitted outside the TEE (including non-TEE environments on the user terminal and other terminals and devices).
[0018] The payment server is used to pre-issue a unique payment credential to the aforementioned intelligent agent. This payment credential serves as an electronic identity for the intelligent agent and is stored in the TEE of the user terminal. Based on this electronic identity, the payment server can trust that the intelligent agent is a legitimate intelligent agent.
[0019] Based on the above system, before the intelligent agent makes a payment through the payment server, the user terminal can first use, for example... Figure 2 The method shown retrieves and stores the payment credentials issued by the payment server to the smart agent.
[0020] Figure 2 The flowchart illustrating the process of the payment server providing this manual issuing payment credentials to a smart agent includes the following steps: S200: The user inputs an authorization request into the user terminal to authorize the smart agent to perform payment actions.
[0021] In the embodiments described in this specification, in addition to the intelligent agent deployed on the user terminal, a payment application corresponding to the payment server can also be installed. The user can then first use the user account (i.e., user identifier) used to log in to the payment server through the payment application to log in, and then initiate authorization for the intelligent agent on the payment application. Alternatively, the user terminal may not have the payment application installed; in this case, the user can log in to the payment server through a browser using the aforementioned user identifier, and then initiate authorization for the intelligent agent through the page of the payment server displayed in the browser. This specification does not impose any limitations on this; the following explanation only uses initiating authorization through the payment application as an example.
[0022] It should be noted that authorizing a smart agent to make payments only authorizes the smart agent to make payments through the payment function of this payment server, and does not authorize the smart agent to make payments through the payment function of other payment servers. For this reason, users need to log in to the payment server with their user ID first.
[0023] In response to the authorization request input by the user, the payment application can first obtain the agent's agent identifier. Specifically, the payment application can first obtain the agent's basic information, which may include at least the agent's name and source information. The source information may be the terminal information of the user terminal on which the agent is deployed, and may also include, but is not limited to, the agent's developer information and publishing platform information. After obtaining the agent's basic information, the payment application can pass this basic information to the user terminal's TEE (Transaction Execution Environment), and perform a hash operation on the basic information within the TEE to obtain the agent's agent identifier. For example, the agent's name and source information can be concatenated, and a SHA256 hash operation can be performed on the concatenated information to obtain the agent identifier. This ensures that the agent identifier obtained from the same agent and the same source is identical and unique, while the agent identifiers obtained from different agents and / or different sources are all different.
[0024] It should be noted that this agent identifier is only used by the payment service to identify the agent, and is not used by other payment services or other devices to identify the agent.
[0025] S201: In response to the authorization request, the user terminal sends the agent identifier of the agent to the payment server.
[0026] After obtaining the agent's identifier, the payment application can store it in the user terminal's TEE (Transaction Execution Environment). At this point, the TEE already contains the agent's identifier used to identify the agent. In response to the user's authorization request, the payment application also needs to send the agent's identifier and the user's login identifier to the payment server.
[0027] S202: The payment server generates a payment credential based on the received smart agent identifier.
[0028] The payment server can first query whether a payment credential already exists associated with the user identifier and the agent identifier. That is, using the user identifier and the agent identifier as a composite key, it can query for payment credentials that are associated with both the user identifier and the agent identifier. If a payment credential already exists associated with both the user identifier and the agent identifier, it means the payment server has already issued a payment credential for this agent in the past, and no further issuance is needed. If no such credential exists, the payment server can generate a payment credential and store the user identifier, the agent identifier, and the generated payment credential together.
[0029] When generating a payment credential, in order to ensure that the authorization granted to the smart agent is the user's true intention, the payment server may first randomly generate a one-time password (OTP), such as a random six-digit number, if it is determined that there is no payment credential associated with both the user's identifier and the smart agent's identifier. The OTP is then associated with the smart agent's identifier and returned to the payment application.
[0030] The payment application then displays the OTP. Specifically, the payment server can return a page link containing a one-time token to the payment application. The user can open the page corresponding to this link within the payment application, where the OTP is displayed. Next, the user can manually input the OTP into the TEE (Transaction Execution Environment) of their terminal through the payment application. In response to the user's input of the OTP into the TEE, the user terminal triggers the TEE to retrieve the verification information based on the user-input OTP and the agent identifier already present in the TEE. This verification information is then signed using a pre-agreed encryption key stored in the TEE and agreed upon with the payment server. The user terminal can also concatenate the user-input OTP and the existing agent identifier in the TEE to obtain the verification information.
[0031] After the verification information is signed, the user terminal can transmit the user's manually entered OTP, the agent identifier in the TEE, and the signed verification information from the TEE to the payment application. The payment application can then return the user's identifier, the OTP, the agent identifier, and the signed verification information to the payment server.
[0032] The payment server can query the encryption key pre-agreed with the TEE in the aforementioned user terminal based on the user identifier returned by the payment application, and use the encryption key to verify the signed information to be verified returned by the payment application. Specifically, the payment server can first concatenate the OTP and the smart agent identifier returned by the payment application, and then use the encryption key to sign the concatenated OTP and the smart agent identifier to obtain the signature information. The server then compares the signature information with the signed information to be verified returned by the payment server. If they match, the verification passes; otherwise, the verification fails. The payment server can also query the OTP associated with the smart agent identifier returned by the payment application, and compare the OTP returned by the payment application with the OTP queried by the payment server. If the signature verification of the pending information passes and the OTP returned by the payment application matches the OTP queried by the payment server, it means that the user's authorization for the smart agent to make payment through the payment server has been verified, and a payment credential can be issued to the smart agent. Therefore, the payment server generates a payment credential. If the signature verification of the pending information fails, or the OTP returned by the payment application does not match the OTP queried by the payment server, it means that the user's authorization for the smart agent to make payment through the payment server has failed, and a payment credential is refused to be issued to the smart agent.
[0033] By generating an OTP from the payment server and having the user manually input the TEE, it can be ensured that the authorization to the agent is from the user's own will. Furthermore, by having the user terminal sign the verification information, which is a combination of the OTP and the agent's identifier, and then having the payment server verify the signature, it can be ensured that the OTP returned by the payment server to the payment application is not intercepted by an attacker. Since the attacker cannot obtain the encryption key pre-agreed between the payment server and the user terminal's TEE, they will be unable to pass the signature verification. This ensures the security of the issuance of payment credentials.
[0034] Furthermore, after randomly generating an OTP, the payment server can set a preset lifespan for that OTP, such as 300 seconds. The timer starts after establishing the association between the OTP and the agent identifier. If the association takes longer than the lifespan, the association between the OTP and the agent identifier is severed, and the OTP is cleared. In addition to verifying the signed information and comparing the OTP returned by the payment application with the OTPs associated with the agent identifier found in its own query, the payment server can also verify whether the OTP is still within its lifespan and has not been cleared. If it has been cleared, the generation of a payment credential is also rejected. If it is within its lifespan and has not been cleared, and the signed information passes verification, and the OTP returned by the payment application matches the OTPs associated with the agent identifier found in its own query, then a payment credential can be generated.
[0035] Of course, the page used to display the OTP may also include a control to reset the OTP. When the user triggers the control, the payment application sends a request to the payment server to reset the OTP. The payment server responds to the request by randomly regenerating the OTP and associating it with the agent identifier, clearing the previously generated OTP, and then returning the regenerated OTP to the payment application so that the regenerated OTP is displayed on the interface of the payment application.
[0036] S203: Associate and store the smart agent identifier and the payment credential, and return the payment credential to the user terminal.
[0037] S204: The user terminal receives the payment voucher and stores the payment voucher in the TEE.
[0038] After the payment server generates the payment credential, on the one hand, it can associate and store the payment credential with the agent identifier and the user identifier through step S203, that is, the payment credential is associated with both the agent identifier and the user identifier. On the other hand, through step S204, the payment credential can be encrypted using the encryption key pre-agreed with the TEE, and the encrypted payment credential can be returned to the payment application on the user terminal. The payment application can receive the encrypted payment credential and pass it into the TEE in the user terminal. In the TEE, the encrypted payment credential can also be decrypted using the same encryption key, and the decrypted payment credential can be stored in the TEE.
[0039] Thus, the plaintext payment credential is stored in the TEE of the user terminal where the smart agent is deployed, serving as an electronic identity trusted by the payment server. In subsequent processes, it remains within the TEE and is not transmitted outside.
[0040] After issuing payment credentials to the smart agent using the above method, Figure 1 The system shown can be accessed through, for example... Figure 3 Pay using the method shown.
[0041] Figure 3 This is a schematic diagram of the agent-based payment method provided in the embodiments of this specification, which specifically includes the following steps: S300: The user terminal interacts with the user through the large language model corresponding to the intelligent agent.
[0042] In one embodiment provided in this specification, the intelligent agent may include an intelligent agent client located on a user terminal (i.e., the front end) and an intelligent agent server located on the back end. The LLM on which the intelligent agent is based may be pre-deployed on the back end intelligent agent server. The user can input one or more forms of interactive information such as text, voice, and vision through the intelligent agent client at the front end. The intelligent agent client then sends the interactive information input by the user to the LLM deployed in the intelligent agent server at the back end. The LLM can analyze the interactive information input by the user based on its own reasoning ability and / or a preset knowledge base, and output corresponding response information back to the intelligent agent client at the front end. The intelligent agent client then displays the response information to the user to complete the interaction between the user and the LLM.
[0043] In another embodiment provided in this specification, the agent may also include only the agent client at the front end. The LLM is directly deployed in the agent client at the front end. In this case, the agent client provides both the function of directly receiving interactive information input by the user and the function of the agent server in the above embodiment at the front end.
[0044] This manual does not impose any restrictions on how the LLM corresponding to the intelligent agent should be deployed.
[0045] S301: When the user's intention to pay is identified based on the interaction with the user, a payment request is generated.
[0046] When the LLM deployed in the agent recognizes that the user has a payment intention during the interaction with the user, the agent can generate a payment request.
[0047] Specifically, the intelligent agent can use LLM to identify the amount to be paid, the payee's account, and the description of the goods or services the user wants to obtain in the interaction information with the user. In particular, when a user wants to purchase goods or obtain services such as travel, accommodation, or dining, the intelligent agent can use LLM to identify the description of the goods or services corresponding to the user's payment intention.
[0048] Having obtained the aforementioned amount to be paid, payee account, and description of the goods or services, the agent can generate a payment request that includes the amount to be paid, payee account, and description of the goods or services. Of course, the payment request may also include a timestamp corresponding to the current time and a random number generated by the agent.
[0049] S302: The payment request is passed to the TEE, and the payment request is signed using the payment voucher pre-stored in the TEE.
[0050] After the intelligent agent generates the aforementioned payment request, it can pass the payment request to the TEE, where the user terminal can then use methods such as... Figure 2 The payment credential corresponding to the agent, which is issued and stored in the TEE, is used to sign the payment request, and then the signed payment request is returned from the TEE to the agent.
[0051] S303: Send the agent's agent identifier and the signed payment request to the payment server.
[0052] The agent can also read its agent identifier from the TEE and send the read agent identifier and the signed payment request returned by the TEE to the payment server.
[0053] S304: The payment server receives the agent identifier and the signed payment request, and queries the payment credential pre-issued for the agent based on the agent identifier.
[0054] After receiving the agent's identifier and signed payment request, the payment server can first query the user identifier and payment credential associated with the agent identifier. If the payment credential and the corresponding user identifier are found, the server can continue with subsequent steps. If at least one is not found, the server can directly reject the payment request.
[0055] S305: Verify the signed payment request using the retrieved payment voucher. After successful verification, execute payment settlement based on the amount to be paid and the payee identifier contained in the payment request.
[0056] Once the payment server retrieves the user identifier and payment credential associated with the agent's identifier, it can use the retrieved payment credential to verify the signed payment request sent by the agent. Specifically, the agent can send both the original payment request and the signed payment request to the payment server. The payment server uses the retrieved payment credential to sign the original payment request and compares the resulting signed payment request with the signed payment request sent by the agent. If they match, the verification passes; otherwise, the verification fails.
[0057] If the payment request also includes a timestamp when the agent generated the payment request, the payment server can also verify the time length from the timestamp in the payment request to the current time. If the time length exceeds the preset time length (such as 300 seconds), it can be determined that the payment request has expired and the corresponding payment settlement will be refused.
[0058] If the payment request also includes a random number generated by the agent, the payment server can also verify whether the random number contained in the payment request has appeared in other payment requests received in the past. If it has appeared, the server determines that the payment request is a replay attack and refuses to perform the corresponding payment settlement.
[0059] If the payment server verifies the signed payment request sent by the agent and the payment request is not invalid or a replay attack, it can determine the payment account corresponding to the user identifier associated with the agent identifier sent by the agent. Then, based on the payment account, the amount to be paid contained in the payment request, and the payee's account, the corresponding payment settlement is carried out, that is, the amount to be paid in the payment account is transferred to the payee's account.
[0060] Through the above method, after the payment server issues a payment credential to the smart agent, the payment server has a basis of trust in the smart agent. Since the payment server has confirmed that the user's true intention is to authorize the smart agent to make the payment when issuing the payment credential, and has also verified the signature according to the pre-agreed encryption key during the issuance process, as long as the smart agent has the corresponding payment credential, it can be considered a legitimate smart agent, and the payment it initiates is also legitimate. The corresponding payment settlement process can be executed, thus ensuring the security of the payment while the smart agent itself still initiates the payment on behalf of the user.
[0061] Furthermore, in Figure 2 In step S202 shown, if the payment server does not find a payment voucher that is associated with both the user identifier and the smart agent identifier sent by the payment application, in addition to generating a payment voucher, it can also create a sub-account under the payment account corresponding to the user identifier and establish an association between the sub-account and the smart agent identifier.
[0062] After generating the payment credential corresponding to the smart agent's identifier and returning it to the user's terminal, the payment server can also send a notification message to the payment application. This notification message informs the user that a corresponding sub-account has been created for the smart agent. The user can transfer the required amount to the sub-account through the payment application and can also set corresponding payment restrictions for the sub-account through the payment application. The payment restrictions described in this specification include, but are not limited to, payment limits (including single payment limits, daily cumulative payment limits, or payment limits over other lengthy periods), restrictions on the type of goods or services corresponding to the payment, and restrictions on the payment recipients.
[0063] After payment restriction information is set for the sub-account, the payment application can import this information into the smart agent deployed on the user's terminal, or transmit it to the smart agent via the network. This allows the smart agent to obtain the payment restriction information when making payments on behalf of the user, and determine whether to initiate the payment, i.e., whether to execute the payment, based on the payment restriction information. Figure 3 The step S301 is shown. The payment application can also send the payment restriction information to the payment server, so that the payment server stores the payment restriction information in correspondence with the agent identifier of the agent.
[0064] When the intelligent agent detects a user's intention to pay, before generating a payment request, it first identifies the amount to be paid, the recipient's identifier, and the description of the goods or services the user desires based on the user's interaction with the user. Then, based on the aforementioned payment restriction information, it determines whether the amount to be paid, the recipient's identifier, and the description of the goods or services the user desires comply with the payment restriction information. If they do, it generates a payment request and continues execution. Figure 3 The subsequent steps will be executed; otherwise, the payment request will be rejected and execution will cease. Figure 3 The next steps.
[0065] Accordingly, in step S305, when the payment server performs settlement payment according to the payment request, it also queries the payment restriction information corresponding to the smart agent identifier sent by the smart agent. Based on the amount to be paid, the payee identifier, and the description of the goods or services the user needs included in the payment request, it determines whether these elements comply with the queryed payment restriction information. If they do, and the signed payment request sent by the smart agent passes verification, and the payment request is not invalid or a replay attack, then the payment settlement is performed based on the unique sub-account corresponding to the smart agent identifier under the payment account associated with the user identifier sent by the smart agent, along with the amount to be paid and the payee account included in the payment request. Otherwise, the payment settlement can be directly refused. That is, during payment settlement, only the amount in the sub-account is used for payment settlement, and the amounts in other user accounts are not used. This controls the risk within this single sub-account, minimizing losses in the event of a risk.
[0066] The above describes a payment system and method based on an intelligent agent, as provided in the embodiments of this specification. Based on the same idea, this specification also provides corresponding devices, storage media, and electronic devices.
[0067] Figure 4 This is a schematic diagram of a first type of agent-based payment device provided in the embodiments of this specification. This first payment device can be applied to a user terminal, and the device includes: The generation module 400 is used to interact with the user through the large language model corresponding to the intelligent agent deployed by the device itself, and generate a payment request when it is identified that the user has a payment intention based on the interaction with the user; The internal transmission module 401 is used to transmit the payment request to the trusted execution environment (TEE) of the device itself; the TEE stores payment credentials pre-issued by the payment server to the intelligent agent; Environment isolation module 402 is used in the TEE to sign the payment request using the payment voucher pre-stored in the TEE; The sending module 403 is used to send the agent identifier and the signed payment request of the agent to the payment server, so that the payment server can query the payment voucher pre-issued for the agent based on the agent identifier, and use the queried payment voucher to verify the signed payment request. After the verification is successful, the payment server performs payment settlement according to the amount to be paid and the payee identifier contained in the payment request.
[0068] Optionally, the device further includes: The authorization module 404 is used to respond to the authorization request input by the user to authorize the smart agent to perform payment behavior, send the smart agent's smart agent identifier to the payment server, so that the payment server generates a payment voucher based on the received smart agent identifier, associates and stores the smart agent identifier and the payment voucher, and returns the payment voucher; receive the payment voucher returned by the payment server; and store the payment voucher in the TEE.
[0069] Optionally, the authorization module 404 is specifically configured to: obtain basic information of the intelligent agent; transmit the basic information to the TEE; the basic information includes at least the name and source information of the intelligent agent; perform a hash operation on the basic information in the TEE to obtain the intelligent agent identifier of the intelligent agent; store the intelligent agent identifier in the TEE; and send the intelligent agent identifier and the user identifier of the user to the payment server, so that the payment server queries whether a payment credential associated with the user identifier and the intelligent agent identifier already exists based on the user identifier and the intelligent agent identifier. If no such credential exists, a payment credential is generated, and the user identifier, the intelligent agent identifier, and the payment credential are stored together.
[0070] Optionally, the authorization module 404 is further configured to: after sending the agent identifier of the agent to the payment server and before receiving the payment voucher returned by the payment server, receive a one-time password (OTP) sent by the payment server, wherein the OTP is randomly generated by the payment server in response to the agent identifier received from the user terminal, and after the OTP is generated, an association is established between the OTP and the agent identifier; display the OTP; and, in response to the user's operation of inputting the displayed OTP into the TEE, obtain the verification information based on the OTP and the agent identifier of the agent in the TEE, and use... The payment server signs the information to be verified using a pre-agreed encryption key stored in the TEE. The payment server then returns the OTP, the agent identifier, and the signed information to the payment server, enabling the payment server to verify the received signed information using the pre-agreed encryption key with the TEE of the user terminal. Based on the received agent identifier, the payment server queries the OTP associated with that agent identifier and compares the received OTP with the queried OTP. If the verification of the signed information is successful and the received OTP matches the queried OTP, a payment credential is generated.
[0071] Optionally, the authorization module 404 is specifically configured to: receive an encrypted payment credential returned by the payment server, wherein the encrypted payment credential is encrypted by the payment server using an encryption key pre-agreed with the TEE; decrypt the payment credential using the encryption key in the TEE; and store the decrypted payment credential in the TEE.
[0072] Figure 5 This is a schematic diagram of a second agent-based payment device provided in the embodiments of this specification. This second payment device can be applied to a payment server. The device includes: The receiving module 500 is used to receive the agent identifier of the agent and the payment request signed with a payment credential sent by the user terminal; the payment request is generated by the user terminal when it identifies the user's intention to pay based on the interaction with the user through the large language model corresponding to the agent; the signed payment request is generated by the user terminal transmitting the payment request to the TEE, in which the payment request is signed with the payment credential pre-stored in the TEE; the payment credential is pre-issued by the device to the agent deployed on the user terminal; The query module 501 is used to query the payment voucher pre-issued to the intelligent agent based on the intelligent agent identifier; The signature verification module 502 is used to verify the signed payment request using the queried payment voucher; The payment module 503 is used to perform payment settlement based on the amount to be paid and the payee identifier contained in the payment request after the verification is successful.
[0073] Optionally, the device further includes: The authorization module 504 is used to receive the agent identifier of the agent sent by the user terminal; the agent identifier is sent by the user terminal in response to the authorization request input by the user to authorize the agent to perform payment behavior; generate a payment voucher based on the received agent identifier; associate and store the agent identifier and the payment voucher, and return the payment voucher to the user terminal, so that the user terminal stores the payment voucher in the TEE.
[0074] Optionally, the authorization module 504 is specifically configured to: receive the agent identifier and the user identifier sent by the terminal; query whether a payment credential associated with the user identifier and the agent identifier already exists based on the user identifier and the agent identifier; if not, generate a payment credential; and store the user identifier, the agent identifier, and the payment credential together.
[0075] Optionally, the authorization module 504 is specifically configured to: randomly generate a one-time password (OTP); establish an association between the OTP and the agent identifier, and return the OTP to the user terminal, causing the user terminal to display the OTP; and respond to the user's operation of inputting the displayed OTP into the TEE. In the TEE, the system obtains the information to be verified based on the OTP and the agent identifier of the agent, and signs the information to be verified using a pre-agreed encryption key stored in the TEE and agreed upon with the payment server; receive the OTP, the agent identifier, and the signed information to be verified returned by the user terminal; verify the received signed information to be verified using the pre-agreed encryption key with the TEE of the user terminal, and query the OTP associated with the agent identifier based on the received agent identifier, comparing the received OTP with the queried OTP; if the verification of the signed information to be verified passes and the received OTP matches the queried OTP, a payment voucher is generated.
[0076] Optionally, the authorization module 504 is specifically used to encrypt the payment credential using an encryption key pre-agreed with the TEE of the user terminal; return the encrypted payment credential to the user terminal, so that the user terminal receives the encrypted payment credential and transmits it to the TEE; in the TEE, the payment credential is decrypted using the encryption key, and the decrypted payment credential is stored in the TEE.
[0077] This specification also provides a computer-readable storage medium storing a computer program that, when executed by a processor, can be used to perform the agent-based payment method described above.
[0078] based on Figure 2 and Figure 3 The agent-based payment method shown in this specification also provides embodiments that... Figure 6 The diagram shows the structure of the electronic device. Figure 6 At the hardware level, the electronic device includes a processor, internal bus, network interface, memory, and non-volatile storage, and may also include other hardware required for the business operations. The processor reads the corresponding computer program from the non-volatile storage into memory and then runs it to implement the aforementioned agent-based payment method.
[0079] The above description is merely an embodiment of this specification and is not intended to limit this specification. Various modifications and variations can be made to this specification by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of the claims of this specification.
Claims
1. A payment system based on intelligent agents, the system comprising: A user terminal and a payment server; the user terminal is equipped with an intelligent agent and a Trusted Execution Environment (TEE), which stores payment credentials pre-issued by the payment server to the intelligent agent; wherein: The user terminal is used to interact with the user through the large language model corresponding to the intelligent agent. When the user's intention to pay is identified based on the interaction with the user, a payment request is generated and the payment request is transmitted to the TEE. In the TEE, the payment request is signed using the payment certificate pre-stored in the TEE. The intelligent agent's intelligent agent identifier and the signed payment request are sent to the payment server. The payment server is used to receive the agent identifier and the signed payment request, query the payment voucher pre-issued for the agent based on the agent identifier, and use the queried payment voucher to verify the signed payment request. After successful verification, the server executes payment settlement based on the amount to be paid and the payee identifier contained in the payment request.
2. The system as described in claim 1, wherein the user terminal is further configured to, in response to the authorization request input by the user to authorize the intelligent agent to perform payment behavior, send the intelligent agent identifier of the intelligent agent to the payment server; The payment server is also configured to generate a payment credential based on the received smart agent identifier, associate and store the smart agent identifier and the payment credential, and return the payment credential to the user terminal; The user terminal is also used to receive the payment voucher and store the payment voucher in the TEE.
3. The system as described in claim 2, wherein the user terminal is specifically configured to: obtain basic information of the intelligent agent; transmit the basic information to the TEE; perform a hash operation on the basic information in the TEE to obtain the intelligent agent identifier and store it in the TEE; and send the intelligent agent identifier and the user's user identifier to the payment server; the basic information includes at least the name and source information of the intelligent agent; The payment server is specifically used to query whether a payment credential associated with the user identifier and the smart agent identifier already exists, based on the user identifier and the smart agent identifier. If no such credential exists, a payment credential is generated, and the user identifier, the smart agent identifier, and the payment credential are stored together.
4. The system as described in claim 2, wherein the payment server is specifically configured to randomly generate a one-time password (OTP), establish an association between the OTP and the smart agent identifier, and return the OTP to the user terminal; The user terminal is also used to display the OTP, and in response to the user's operation of inputting the displayed OTP into the TEE, in the TEE, obtain the information to be verified based on the OTP and the agent identifier of the agent, and sign the information to be verified using a pre-stored encryption key agreed upon with the payment server in the TEE, and return the OTP, the agent identifier and the signed information to the payment server. The payment server is further configured to verify the received signed information to be verified using the encryption key pre-agreed with the TEE of the user terminal, and query the OTP associated with the smart agent identifier based on the received smart agent identifier, compare the received OTP with the queried OTP, and generate a payment voucher if the verification of the signed information to be verified passes and the received OTP matches the queried OTP.
5. The system as described in claim 4, wherein the payment server is specifically configured to encrypt the payment credential using the encryption key and return the encrypted payment credential to the user terminal; The user terminal is specifically used to receive the encrypted payment credential and transmit it to the TEE, decrypt the payment credential using the encryption key in the TEE, and store the decrypted payment credential in the TEE.
6. A payment method based on intelligent agents, the method comprising: The user terminal interacts with the user through the large language model corresponding to the intelligent agent it deploys. When it recognizes that the user has the intention to pay based on the interaction with the user, it generates a payment request. The payment request is passed to the Trusted Execution Environment (TEE) of the user terminal; the TEE stores payment credentials pre-issued by the payment server to the intelligent agent; In the TEE, the payment request is signed using the payment voucher pre-stored in the TEE; The agent's agent identifier and the signed payment request are sent to the payment server. The payment server then queries the payment voucher pre-issued for the agent based on the agent identifier and uses the queried payment voucher to verify the signed payment request. After successful verification, the payment server executes the payment settlement based on the amount to be paid and the payee identifier contained in the payment request.
7. The method of claim 6, further comprising, before signing the payment request using the payment credential pre-stored in the TEE: In response to the user's authorization request to authorize the smart agent to perform payment, the user terminal sends the smart agent's smart agent identifier to the payment server, so that the payment server generates a payment voucher based on the received smart agent identifier, associates and stores the smart agent identifier and the payment voucher, and returns the payment voucher. Receive the payment voucher returned by the payment server; The payment voucher is stored in the TEE.
8. The method as described in claim 7, wherein sending the agent identifier of the agent to the payment server specifically includes: Obtain the basic information of the intelligent agent and transmit the basic information to the TEE; The basic information includes at least the name and source information of the intelligent agent; The basic information is hashed in the TEE to obtain the agent identifier of the agent. The agent identifier is stored in the TEE, and the agent identifier and the user's user identifier are sent to the payment server. The payment server then queries whether a payment credential associated with the user identifier and the agent identifier already exists. If no such credential exists, a payment credential is generated, and the user identifier, the agent identifier, and the payment credential are stored together.
9. The method of claim 7, wherein after sending the agent identifier of the agent to the payment server and before receiving the payment voucher returned by the payment server, the method further comprises: The user terminal receives a one-time password (OTP) sent by the payment server. The OTP is randomly generated by the payment server in response to the smart agent identifier sent by the user terminal. After the OTP is generated, an association relationship is established between the OTP and the smart agent identifier. Display the OTP; In response to the user's operation of inputting the OTP into the TEE, the TEE obtains the information to be verified based on the OTP and the agent identifier of the agent, and signs the information to be verified using the encryption key pre-stored in the TEE and pre-agreed with the payment server. The OTP, the agent identifier, and the signed verification information are returned to the payment server. The payment server then uses the encryption key pre-agreed with the TEE of the user terminal to verify the received signed verification information. Based on the received agent identifier, the server queries the OTP associated with the agent identifier and compares the received OTP with the queried OTP. If the verification of the signed verification information is successful and the received OTP matches the queried OTP, a payment credential is generated.
10. The method as described in claim 7, wherein receiving the payment voucher returned by the payment server specifically includes: The system receives an encrypted payment credential returned by the payment server, wherein the encrypted payment credential is encrypted by the payment server using an encryption key pre-agreed with the TEE; Storing the payment voucher in the TEE specifically includes: In the TEE, the payment credential is decrypted using the encryption key; The decrypted payment voucher is stored in the TEE.
11. A payment method based on an intelligent agent, the method comprising: The payment server receives the agent identifier of the agent sent by the user terminal, as well as the payment request signed with the payment credential. The payment request is generated by the user terminal when it identifies the user's intention to pay based on the interaction with the user through the large language model corresponding to the intelligent agent; the signed payment request is generated when the user terminal passes the payment request to the TEE, and the payment request is signed in the TEE using the payment credential pre-stored in the TEE; the payment credential is pre-issued by the payment server to the intelligent agent deployed on the user terminal; The payment voucher pre-issued to the intelligent agent is retrieved based on the intelligent agent's identifier; The signed payment request is verified using the retrieved payment voucher. After verification, payment settlement is performed based on the amount to be paid and the payee identifier contained in the payment request.
12. The method of claim 11, before the payment server receives the agent identifier of the agent sent by the user terminal and the payment request signed with the payment credential, the method further includes: Receive the agent identifier of the agent sent by the user terminal; The agent identifier is sent by the user terminal in response to the user's authorization request to authorize the agent to perform payment behavior; Based on the received smart agent identifier, generate a payment voucher; The agent identifier and the payment credential are associated and stored, and the payment credential is returned to the user terminal, so that the user terminal stores the payment credential in the TEE.
13. The method as described in claim 12, wherein receiving the agent identifier of the agent sent by the user terminal specifically includes: Receive the agent identifier and the user identifier sent by the terminal; Based on the received smart agent identifier, a payment credential is generated, specifically including: Based on the user identifier and the agent identifier, query whether a payment credential already exists associated with the user identifier and the agent identifier; If it does not exist, a payment voucher will be generated; The association and storage of the smart agent identifier and the payment credential specifically includes: The user identifier, the agent identifier, and the payment credential are stored together.
14. The method as described in claim 12, wherein generating a payment credential based on the received agent identifier specifically includes: Randomly generate one-time passwords (OTP); Establish the association between the OTP and the agent identifier, and return the OTP to the user terminal, so that the user terminal displays the OTP. In response to the user's operation of inputting the displayed OTP into the TEE, the TEE obtains the information to be verified based on the OTP and the agent identifier of the agent, and signs the information to be verified using the encryption key pre-agreed with the payment server and stored in the TEE. Receive the OTP, the agent identifier, and the signed verification information returned by the user terminal; The received signed information to be verified is verified using the encryption key pre-agreed with the TEE of the user terminal, and the OTP associated with the received agent identifier is queried according to the agent identifier, and the received OTP is compared with the queried OTP. If the signature-verified information passes verification and the received OTP matches the queried OTP, a payment voucher is generated.
15. The method of claim 12, wherein returning the payment voucher to the user terminal specifically includes: The payment credential is encrypted using an encryption key pre-agreed with the TEE of the user terminal; The encrypted payment credential is returned to the user terminal, which receives the encrypted payment credential and passes it to the TEE. In the TEE, the payment credential is decrypted using the encryption key, and the decrypted payment credential is stored in the TEE.
16. A payment device based on an intelligent agent, the device comprising: The generation module is used to interact with the user through the large language model corresponding to the intelligent agent deployed by the device itself. When the interaction with the user indicates that the user has a payment intention, a payment request is generated. An internal transmission module is used to transmit the payment request to the device's own Trusted Execution Environment (TEE); the TEE stores payment credentials pre-issued by the payment server to the intelligent agent; An environment isolation module is used in the TEE to sign the payment request using the payment credential pre-stored in the TEE; The sending module is used to send the agent's agent identifier and the signed payment request to the payment server, so that the payment server can query the payment voucher pre-issued for the agent based on the agent identifier, and use the queried payment voucher to verify the signed payment request. After successful verification, the payment server executes the payment settlement based on the amount to be paid and the payee identifier contained in the payment request.
17. A payment device based on an intelligent agent, the device comprising: The receiving module is used to receive the agent identifier of the intelligent agent sent by the user terminal and the payment request signed with the payment credential. The payment request is generated by the user terminal when it identifies the user's intention to pay based on the interaction with the user through the large language model corresponding to the intelligent agent; the signed payment request is generated when the user terminal transmits the payment request to the TEE, and the payment request is signed in the TEE using the payment credential pre-stored in the TEE; the payment credential is pre-issued by the device to the intelligent agent deployed on the user terminal; The query module is used to query the payment voucher pre-issued to the intelligent agent based on the intelligent agent's identifier; The signature verification module is used to verify the signed payment request using the retrieved payment voucher; The payment module is used to perform payment settlement based on the amount to be paid and the payee identifier contained in the payment request after successful verification.
18. A computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in any one of claims 6-15.
19. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the method described in any one of claims 6-15.
