Commodity trading methods, apparatus, and equipment based on AI, APA, LLM, and AIAgent

CN122779946APending Publication Date: 2026-09-18BEIJING BENYING NETWORK TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610838602.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-10
Publication Date
2026-09-18

AI Technical Summary

Technical Problem

[0006]随着软件即服务(Software as a Service,简称SaaS)业务的全球化发展,相关技术中,传统支付系统中,一次性商品和订阅商品通常分属不同模块管理,使用独立的数据库表和业务流程,并且国内外不同支付平台的通知机制存在较大差异

Benefits of technology

本公开实施例,响应于客户端的商品查询请求,查询预先构建的商品数据模型向客户端返回商品列表和商品信息,并向客户端返回支付平台信息;其中,商品列表中的商品包括需单次支付的一次性商品和需周期支付的订阅商品中的至少一种,响应于客户端发送的从商品列表中选中的目标商品的交易指令,基于交易指令调用与目标商品关联的支付平台执行交易流程,其中,目标商品为一次性商品,交易指令为针对一次性商品的购买指令;目标商品为订阅商品,交易指令为针对订阅商品的订阅指令,接收支付平台返回的交易通知信息。由此,本公开采用统一的商品查询及交易执行流程,可适配一次性商品与订阅商品两类交易场景,实现支付系统与底层能力的复用,有效降低多业务场景下的运维成本,并且用户无需区分一次性支付与周期订阅的操作逻辑,简化了支付操作步骤、降低了使用门槛,提升用户操作便捷性与使用体验。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122779946A_ABST
    Figure CN122779946A_ABST
Patent Text Reader

Abstract

This disclosure relates to a product transaction method, apparatus, and device based on AI, APA, LLM, and AI Agent, comprising: responding to a client's product query request, querying a pre-built product data model and returning a product list and product information to the client, and returning payment platform information to the client; responding to a transaction instruction sent by the client for a target product selected from the product list, invoking the payment platform associated with the target product to execute the transaction process based on the transaction instruction, wherein the target product is a one-time purchase product and the transaction instruction is a purchase instruction for the one-time purchase product; the target product is a subscription product and the transaction instruction is a subscription instruction for the subscription product; and receiving transaction notification information returned by the payment platform. By adopting a unified product query and transaction execution process, it can adapt to both one-time purchase and subscription product transaction scenarios, effectively reducing operational costs in multiple business scenarios and improving user convenience and user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the fields of artificial intelligence (AI), robotic process automation (APA), large language modeling (LLM), and intelligent agents (AI agents) for digital employee platforms, and particularly to a method, apparatus, and electronic device for commodity transactions based on AI, APA, LLM, and AI agents. Background Technology

[0002] Agentic Process Automation (APA) introduces agents throughout the entire process of process automation development, operation, and maintenance, while retaining deterministic execution and enterprise-level governance capabilities. Specifically, agent participation throughout the entire process means covering the entire lifecycle of development, operation, and maintenance, not just the execution end; deterministic execution means that core logic is predictable and auditable, rejecting black-box autonomy; and enterprise-level governance means inheriting the permission management, version control, and audit trail features of Robotic Process Automation (APA).

[0003] Artificial intelligence (AI) is a technical science that studies and develops theories, methods, technologies, and application systems for simulating, extending, and expanding human intelligence.

[0004] Large Language Models (LLMs) are models trained on massive amounts of text that can recognize human language, perform language-related tasks, and have a large number of parameters.

[0005] Artificial Intelligence Agents (AI Agents) are capable of perceiving their environment, making decisions, and executing actions. Unlike traditional artificial intelligence, they possess the ability to think and act independently, and can utilize tools to achieve given goals. Based on LLM (Limited Learning Model) as its core computing engine, AI Agents can engage in dialogue, perform tasks, reason, and exhibit a degree of autonomy. They possess the ability to autonomously understand, perceive, plan, remember, and use tools, enabling them to automate complex tasks. Specifically, LLM-driven AI Agents, comprised of various AI capabilities, can interact with employees using natural language, understand their instructions and needs, and provide feedback and responses; they can acquire domain-specific knowledge relevant to the business to complete complex professional tasks; they can break down complex tasks into several executable tasks and use data and tools to complete them; and they can collaborate with employees, and AI Agents can also collaborate to complete complex tasks, enabling digital employees to leap from automation to intelligence, helping employees complete their work more efficiently, and fully realizing human-machine collaboration.

[0006] With the globalization of Software as a Service (SaaS) business, in traditional payment systems, one-time goods and subscription goods are usually managed by different modules, using independent database tables and business processes, and the notification mechanisms of different payment platforms at home and abroad are quite different. Summary of the Invention

[0007] This disclosure provides a commodity trading method, apparatus, electronic device, medium, and computer program product based on AI, APA, LLM, and AI Agent.

[0008] The technical solution disclosed herein is as follows:

[0009] According to a first aspect of the present disclosure, a product transaction method based on AI, APA, LLM, and AI Agent is provided, comprising: responding to a product query request from a client, querying a pre-built product data model to return a product list and product information to the client, and returning payment platform information to the client; wherein the products in the product list include at least one of one-time payment products and subscription products requiring periodic payment; responding to a transaction instruction sent by the client for a target product selected from the product list, invoking a payment platform associated with the target product to execute a transaction process based on the transaction instruction, wherein the target product is the one-time payment product, and the transaction instruction is a purchase instruction for the one-time payment product; the target product is a subscription product, and the transaction instruction is a subscription instruction for the subscription product; and receiving transaction notification information returned by the payment platform.

[0010] According to a second aspect of the present disclosure, a commodity transaction device based on AI, APA, LLM, and AI Agent is provided, comprising: a query module, configured to respond to a commodity query request from a client, query a pre-built commodity data model to return a commodity list and commodity information to the client, and return payment platform information to the client; wherein the commodities in the commodity list include at least one of one-time payment commodities and subscription commodities requiring periodic payment; a transaction module, configured to respond to a transaction instruction sent by the client for a target commodity selected from the commodity list, and invoke a payment platform associated with the target commodity to execute a transaction process based on the transaction instruction, wherein the target commodity is the one-time commodity, and the transaction instruction is a purchase instruction for the one-time commodity; or the target commodity is a subscription commodity, and the transaction instruction is a subscription instruction for the subscription commodity; and a receiving module, configured to receive transaction notification information returned by the payment platform.

[0011] According to a third aspect of the present disclosure, an electronic device is provided, comprising: a processor; a memory for storing executable instructions of the processor; wherein the processor is configured to execute the instructions to implement the method as described in the first aspect of the present disclosure.

[0012] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided that, when instructions in the computer-readable storage medium are executed by a processor of an electronic device, enables the electronic device to perform the method described in the first aspect of the present disclosure.

[0013] According to a fifth aspect of the present disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the method described according to a first aspect of the present disclosure.

[0014] The technical solutions provided by the embodiments of this disclosure have at least the following beneficial effects: In this embodiment, in response to a client's product query request, a pre-built product data model is queried, and a product list and product information are returned to the client, along with payment platform information. The products in the product list include at least one of two types: one-time payments requiring a single payment and subscription payments requiring a periodic payment. In response to a client's transaction instruction to select a target product from the product list, the payment platform associated with the target product is invoked to execute the transaction process based on the transaction instruction. Specifically, if the target product is a one-time payment, the transaction instruction is a purchase instruction for that product; if the target product is a subscription product, the transaction instruction is a subscription instruction for that product. Transaction notification information returned by the payment platform is also received. Therefore, this disclosure adopts a unified product query and transaction execution process, adaptable to both one-time and subscription product transaction scenarios, enabling the reuse of the payment system and underlying capabilities. This effectively reduces operational costs across multiple business scenarios. Furthermore, users do not need to distinguish between one-time payments and periodic subscriptions, simplifying payment operations, lowering the barrier to entry, and improving user convenience and experience.

[0015] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0016] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure, and are not intended to unduly limit this disclosure.

[0017] Figure 1 This is a flowchart illustrating a commodity transaction method based on AI, APA, LLM, and AI Agent according to an exemplary embodiment.

[0018] Figure 2 This is a flowchart illustrating a commodity transaction method based on AI, APA, LLM, and AI Agent according to an exemplary embodiment.

[0019] Figure 3 This is a flowchart illustrating a commodity transaction method based on AI, APA, LLM, and AI Agent according to an exemplary embodiment.

[0020] Figure 4 This is a flowchart illustrating a commodity transaction method based on AI, APA, LLM, and AI Agent according to an exemplary embodiment.

[0021] Figure 5This is a flowchart illustrating a commodity transaction method based on AI, APA, LLM, and AI Agent according to an exemplary embodiment.

[0022] Figure 6 This is a flowchart illustrating a commodity transaction method based on AI, APA, LLM, and AI Agent according to an exemplary embodiment.

[0023] Figure 7 This is a flowchart illustrating a commodity transaction method based on AI, APA, LLM, and AI Agent according to an exemplary embodiment.

[0024] Figure 8 This is a flowchart illustrating a commodity transaction method based on AI, APA, LLM, and AI Agent according to an exemplary embodiment.

[0025] Figure 9 This is a flowchart illustrating a commodity transaction method based on AI, APA, LLM, and AI Agent according to an exemplary embodiment.

[0026] Figure 10 This is a flowchart illustrating a commodity transaction method based on AI, APA, LLM, and AI Agent according to an exemplary embodiment.

[0027] Figure 11 This is a flowchart illustrating a commodity transaction method based on AI, APA, LLM, and AI Agent according to an exemplary embodiment.

[0028] Figure 12 This is a block diagram illustrating a commodity trading device based on AI, APA, LLM, and AI Agent according to an exemplary embodiment.

[0029] Figure 13 This is a block diagram illustrating an electronic device according to an exemplary embodiment. Detailed Implementation

[0030] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings.

[0031] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0032] The implementation of the Digital Employee Platform (WEP) has gone through three stages. The first stage is automation: targeting RPA (Robotic Process Automation) with low business complexity, it utilizes software automation technology to automate rule-based, predefined procedural tasks. The second stage is intelligence: leveraging AI to extend the boundaries of RPA, such as processing unstructured documents and making data-driven decisions. The third stage is human-machine collaboration: utilizing the understanding, planning, and execution capabilities of large-scale models to automate complex tasks end-to-end.

[0033] In the human-machine collaboration phase, the digital employee platform serves as a bridge connecting workers and systems, workers and data, and systems and data. It is capable of: operating complex systems, processing various types of data, and interacting and collaborating with employees. The digital employee platform helps industries build large-scale, model-enabled digital employees (i.e., intelligent agents), achieving automation, intelligence, and human-machine collaboration in business processes.

[0034] The enterprise-level intelligent agent digital employee platform can seamlessly integrate multiple capabilities such as Agentic Process Automation (APA), Agentic Document Processing (ADP), Agentic Customer Experience (ACX), and Agentic Business Insights (ABI). It has five major functions: "business understanding", "process creation", "run anywhere", "centralized management and control", and "human-machine collaboration". It enables enterprises to achieve end-to-end intelligent automation of business processes, replace manual operations, further improve business efficiency, and accelerate digital transformation.

[0035] The following examples illustrate in detail the commodity trading method, apparatus, and electronic device based on AI, APA, LLM, and AI Agent proposed in this disclosure.

[0036] Figure 1 This is a flowchart illustrating a commodity transaction method based on AI, APA, LLM, and AI Agent, provided for embodiments of this disclosure.

[0037] like Figure 1 As shown, the commodity transaction method based on AI, APA, LLM, and AI Agent proposed in this embodiment includes the following steps: S101, in response to the client's product query request, queries the pre-built product data model to return a product list and product information to the client, and returns payment platform information to the client; wherein, the products in the product list include at least one of one-time products that require a single payment and subscription products that require periodic payments.

[0038] The product data model is used to uniformly manage one-time products and subscription products. That is, it uses the same data structure to store one-time products and subscription products, and distinguishes one-time products and subscription products through the "product type" field in the product data model.

[0039] The data fields in the product data model are used to describe the basic information of the product. The data fields in the product data model include at least the product identifier (ID), product name, product type, application to which the product belongs, basic rights configuration, and product activation status.

[0040] The prices of goods can be configured independently, and goods support multiple pricing systems (such as monthly payment, quarterly payment, yearly payment, etc.).

[0041] It should be noted that this disclosure does not limit the products; for example, products may be those that integrate APA services, ADP services, or ACX services.

[0042] It should be noted that when a product query request is received from a client, the core business backend service responds by querying the pre-built product data model, reading the corresponding product data from the product data model, and sending the retrieved product list and product information to the client. At the same time, the payment platform information that can be used for transactions is synchronously returned to the client.

[0043] S102, in response to the transaction instruction sent by the client to select the target product from the product list, the transaction process is executed by calling the payment platform associated with the target product based on the transaction instruction. Here, if the target product is a disposable product, the transaction instruction is a purchase instruction for the disposable product; if the target product is a subscription product, the transaction instruction is a subscription instruction for the subscription product.

[0044] In this embodiment of the disclosure, a corresponding standardized application programming interface (API) is determined based on the type of transaction instruction and the type of payment platform. The transaction process is executed by calling the payment platform associated with the target product through the API.

[0045] S103 receives transaction notification information returned by the payment platform.

[0046] In this embodiment of the disclosure, in response to the target product being a disposable product and the transaction instruction being a purchase instruction for the disposable product, the payment platform pushes a Webhook event through the Web Hypertext Observation Callback Hook (Webhook) mechanism, wherein the Webhook event includes transaction notification information.

[0047] It should be noted that, in response to the target product being a subscription product, a two-way payment notification processing mechanism is built to support passive reception via Webhook or active querying via scheduled tasks.

[0048] In this embodiment of the disclosure, in response to the target product being a subscribed product and the transaction instruction being a subscription instruction for the subscribed product, a Webhook event pushed by the payment platform is received through a callback notification Webhook mechanism. The Webhook event includes transaction notification information. Alternatively, a scheduled task is scheduled through a scheduler to initiate a query request to the payment platform based on the scheduled task, so as to receive transaction notification information returned by the payment platform.

[0049] It should be noted that subscription commands include, but are not limited to, new subscription commands, subscription upgrade commands, subscription downgrade commands, and subscription cancellation commands.

[0050] For example, for payment platforms with notification capabilities, a callback notification Webhook mechanism is used to receive Webhook events pushed by the payment platform; for payment platforms without notification capabilities, a scheduler schedules a timed task to initiate a query request to the payment platform based on the timed task in order to receive transaction notification information returned by the payment platform.

[0051] Optionally, obtaining the transaction result of the target product through any of the above methods can trigger the corresponding business processing flow, achieving dual protection for transaction result acquisition. Furthermore, using platform identifiers and transaction order identifiers as constraints can prevent the same transaction notification from being processed repeatedly; simultaneously, the Webhook callback processing logic and the active query processing logic reuse the same core business logic, ensuring consistency in transaction processing results under both methods.

[0052] In summary, the product transaction method based on AI, APA, LLM, and AI Agent provided in this disclosure responds to a client's product query request by querying a pre-built product data model and returning a product list and product information to the client, as well as payment platform information. The products in the product list include at least one of two types: one-time payment products and subscription products requiring periodic payment. Responding to a client's transaction instruction to select a target product from the product list, the method invokes the payment platform associated with the target product to execute the transaction process based on the transaction instruction. Specifically, if the target product is a one-time payment product, the transaction instruction is a purchase instruction for the one-time payment product; if the target product is a subscription product, the transaction instruction is a subscription instruction for the subscription product. The method also receives transaction notification information returned by the payment platform. Therefore, this disclosure adopts a unified product query and transaction execution process, adaptable to both one-time payment and subscription product transaction scenarios, enabling the reuse of the payment system and underlying capabilities, effectively reducing operational costs across multiple business scenarios. Furthermore, users do not need to distinguish between one-time payment and periodic subscription operation logic, simplifying payment operation steps, lowering the usage threshold, and improving user convenience and experience.

[0053] The following explanation uses a purchase instruction as an example to illustrate the specific process of the commodity transaction method based on AI, APA, LLM, and AIAgent provided in this embodiment.

[0054] Figure 2 This is a flowchart illustrating a commodity transaction method based on AI, APA, LLM, and AI Agent, provided for embodiments of this disclosure.

[0055] like Figure 2 As shown, the commodity transaction method based on AI, APA, LLM, and AI Agent proposed in this embodiment includes the following steps: S201, in response to the client's product query request, queries the pre-built product data model and returns a product list and product information to the client, and also returns payment platform information to the client.

[0056] S202, in response to the transaction instruction sent by the client to select the target product from the product list, creates a payment platform order for the target product, sends the payment platform order to the payment platform, and receives the payment form data returned by the payment platform.

[0057] In this embodiment of the disclosure, in response to a transaction instruction, a transaction order for the target product is created based on a pre-built order model and the target product information of the target product.

[0058] The order model supports both one-time purchases and subscriptions, distinguished by a dedicated subscription field. The order model consists of multiple data fields.

[0059] It should be noted that the data fields include, but are not limited to, basic product information (such as order number, user ID, product ID, and price ID), product type (one-time product or subscription product), payment platform information (such as payment platform ID and platform type), subscription-specific information (subscription ID, invoice type, etc.), payment information (actual payment amount, payment currency type, and payment status), timestamps (order creation time, payment time, and payment completion time, etc.), and order metadata (rights snapshot data and order ID).

[0060] In this embodiment of the disclosure, the basic rights of the target product are obtained based on the basic information of the target product in the target product information, the additional rights of the target product are obtained based on the price configuration information, the rights snapshot data of the target product are determined based on the basic rights and additional rights of the target product, and the current rights configuration snapshot data of the target product is saved when creating a transaction order for the target product.

[0061] In this embodiment of the disclosure, the rights and benefits corresponding to the target product can be issued to users associated with the client based on the rights and benefits snapshot data, so as to avoid configuration changes affecting the user's purchased rights and benefits.

[0062] S203 sends the form data required for the payment order to the client so that the client can render and display the payment page. The payment page is used to receive payment operations and, based on the payment request generated by the payment operations, calls the payment platform associated with the target product to execute the transaction process.

[0063] S204, Receive transaction notification information returned by the payment platform.

[0064] For example, such as Figure 3As shown, (1) the user initiates a product query request (viewing products) to the client (browser). The browser requests the product list and payment platform list from the core business service (L2 Back End, L2 BE) through the web application programming interface (webapi). The L2 BE queries the pre-built product data model and returns the product list and product information to the client, and returns the payment platform information (payment platform list) to the browser. The browser integrates the information and displays the products and payment platforms to the user; (2) the user selects the target product from the product list and initiates a purchase instruction to the browser to buy the target product. The browser forwards the purchase instruction to the L2 BE through the webapi. The L2 BE responds to the purchase instruction, creates a transaction order (local order) for the target product according to the pre-built order model, and creates a payment platform order for the target product to the payment platform. The L2 BE sends the payment platform order to the payment platform. The L2 BE receives the payment form data returned by the payment platform. The payment form data is returned to the browser, the browser directly renders the form and displays the payment page to the user; (3) The user performs the payment operation on the payment page, the browser directly initiates a payment request to the payment platform, the payment platform returns a payment response to the browser after completing the payment verification, the browser receives the response and displays the payment result to the user, and completes the payment interaction on the user side; (4) The payment platform pushes transaction notification information to L2 BE through WebHook, L2 BE receives the transaction notification information and updates the local order of the target product according to the transaction notification information, and returns a response to the payment platform, L2 BE completes the order verification, L2 BE pushes the rights distribution instruction to L3 BE to notify the distribution of rewards, L3 BE executes the distribution of rewards and returns a distribution response to L2 BE, L2 BE returns a processing completion response to the payment platform, and completes the transaction process of the target product.

[0065] In summary, the product transaction method based on AI, APA, LLM, and AI Agent provided in this disclosure responds to a client's product query request by querying a pre-built product data model and returning a product list and product information to the client, as well as payment platform information. Responding to a client's transaction instruction to select a target product from the product list, it creates a payment platform order for the target product, sends the payment platform order to the payment platform, receives payment form data returned by the payment platform, and sends the form data required for the payment order to the client so that the client can render and display the payment page. The payment page receives payment operations and, based on the payment request generated by the payment operations, calls the payment platform associated with the target product to execute the transaction process, and receives transaction notification information returned by the payment platform. Therefore, this disclosure completes the product transaction loop by creating a payment platform order and sending payment form data, having the client render and display the payment page, and simultaneously receiving transaction notification information pushed by the payment platform. This enables rapid synchronization of payment status, effectively simplifies payment operations, streamlines the interaction process, improves transaction processing efficiency, and thus optimizes the user's transaction experience and increases user satisfaction.

[0066] The following explanation uses a new subscription instruction as an example to illustrate the specific process of the commodity trading method based on AI, APA, LLM, and AI Agent provided in this embodiment.

[0067] Figure 4 This is a flowchart illustrating a commodity transaction method based on AI, APA, LLM, and AI Agent, provided for embodiments of this disclosure.

[0068] like Figure 4 As shown, the commodity transaction method based on AI, APA, LLM, and AI Agent proposed in this embodiment includes the following steps: S401, in response to the client's product query request, queries the pre-built product data model and returns a product list and product information to the client, and also returns payment platform information to the client.

[0069] S402, in response to the transaction instruction sent by the client to select the target product from the product list, generates subscription payment information and sends the subscription payment information to the payment platform.

[0070] In this embodiment of the disclosure, in response to a transaction instruction, a subscription operation record table for the target product is generated based on the target product information of the target product.

[0071] It should be noted that the subscription operation record table includes data fields such as operation identifier, subscription identifier, user identifier, operation type (e.g., new subscription, upgrade subscription, downgrade subscription, cancel subscription), subscription status (e.g., pending, scheduled, completed, canceled, expired), original price identifier before subscription, new price identifier after subscription, payment platform identifier, subscription effective timestamp, and expiration time.

[0072] The operation ID is associated with the product's subscription operation record table.

[0073] User information, product information, product lines, tenant IDs, routing information, etc. are all managed in the subscription operation record table. When a new business field needs to be added, only the data field of the subscription operation record table needs to be updated, without modifying the metadata.

[0074] It should be noted that the arrival order of Webhook events is uncertain, and the following situations may occur: (1) payment completion (invoice.paid) arrives before model creation (subscription.created), and subscription update (subscription.updated) arrives before subscription payment (subscription.paid); (2) the same Webhook event is pushed repeatedly.

[0075] It should be noted that the arrival order of Webhook events is uncertain, and the payment completion event may arrive before the subscription creation event, causing state synchronization failure. Furthermore, there is a lack of effective concurrency control mechanisms, and repeated clicks of operation buttons by users may lead to duplicate subscriptions or duplicate charges. It is also not robust enough in the event of network anomalies or third-party platform failures, requiring a lot of manual intervention.

[0076] Optionally, in response to receiving a subscription payment success event, the subscription operation record table is queried using the subscription identifier. If the subscription operation record table is found using the subscription identifier, the subsequent process continues. If the subscription operation record table is not found using the subscription identifier, the subscription operation record table is queried using the operation identifier in the metadata, and the subscription is obtained based on the subscription operation record table. If the subscription operation record table is not found using the operation identifier, the target product information of the target product is obtained by actively calling the third-party platform API, and the subscription operation record table is created.

[0077] In this embodiment of the disclosure, in response to a transaction instruction being a subscription instruction, it is determined whether the user has a subscription operation record table of the same type that is in a pending state, to prevent the user from submitting repeatedly. In response to the absence of a subscription operation record table of the same type that is in a pending state for the target product, a subscription operation record table for the target product is created, and the initial subscription operation record for the target product is updated according to the operation ID and transaction result (e.g., updating pending to operation completed).

[0078] Optionally, expired subscription operation logs that are pending can be cleaned up periodically to avoid deadlocks and resource waste.

[0079] S403, Receive the payment page link returned by the payment platform, and send the payment page link to the client so that the client is redirected to the payment page of the payment platform. The payment page is used to receive payment operations and, based on the payment request generated by the payment operation, call the payment platform associated with the target product to execute the transaction process.

[0080] S404 receives transaction notification information returned by the payment platform.

[0081] In this embodiment of the disclosure, in response to the target product being a subscribed product and the transaction instruction being a subscription instruction for the subscribed product, a Webhook event pushed by the payment platform is received through a callback notification Webhook mechanism. The Webhook event includes transaction notification information, and / or, a scheduled task is scheduled through a scheduler to initiate a query request to the payment platform based on the scheduled task, so as to receive the transaction notification information returned by the payment platform.

[0082] In the disclosed embodiment, in response to transaction notification information, the subscription metadata of the target product is obtained, and a subscription model for the target product is created.

[0083] It should be noted that webhooks can only be set uniformly at the account level, and it is not possible to specify different callback addresses for different product lines. For enterprises with multiple product lines, this means that all product line webhook events are sent to the same webhook endpoint, which is complex and prone to errors.

[0084] In this embodiment, in response to a Webhook event passing security verification, the Webhook event is parsed to obtain the operation identifier ID of the target product. Based on the operation ID, the product's subscription operation record table is queried to determine the routing information corresponding to the Webhook event. The operation ID is associated with the product's subscription operation record table. According to the routing information, the Webhook event is forwarded to a matching target processor, which is used to execute the transaction process. This achieves intelligent webhook routing in multi-product line scenarios.

[0085] It should be noted that this significantly shortens the access time for new business lines, greatly accelerates business iteration, eliminates the need to configure webhooks separately for each product line, allows multiple product lines to share infrastructure, and reduces server and manpower costs.

[0086] It should be noted that the Operation ID field is only set for subscription operations (such as creating a new subscription, upgrading a subscription, downgrading a subscription, and canceling a subscription). By parsing the Webhook event, the Operation ID can be used to retrieve complete business information of the target product from the operation record table. It should be noted that the subscription operation record table for a product is queried using the operation ID to determine the routing information corresponding to the Webhook event. If no routing information is found for the Webhook event, the Webhook event is forwarded to the default target handler to execute the transaction process, ensuring stability during the transaction. The routing information supports configurable management, allowing routes to be added without code changes. For example, it supports configurable management by product line, tenant, webhook target, and other dimensions.

[0087] For example, such as Figure 5As shown, (1) the user initiates a product query request to the browser (viewing the subscription list), the browser requests the subscription list and payment platform list from the L2 BE through the webapi, the L2 BE queries the pre-built product data model, and returns the subscription product list, product information and payment platform list to the client, the browser integrates the information and displays the subscription product list and payment platform to the user; (2) the user selects the target product from the subscription product list, the browser displays a change preview to the user to assist the user in confirming the selection; (3) the user initiates a new subscription instruction for the target product to the browser (confirming the subscription), the browser forwards the new subscription instruction for the target product to the L2 BE through the webapi, the L2 BE responds to the new subscription instruction, writes and generates the subscription operation record table of the target product according to the target product information, the L2 BE creates subscription payment information and sends the subscription payment information to the payment platform, the payment platform returns the payment redirect link payment page link (Uniform Resource Locator, abbreviated as URL) to the L2 BE, the L2 BE The payment page link is sent to the browser, which redirects to the payment page of the payment platform (i.e., the signing page) and displays the payment page to the user; (4) The user initiates a payment operation on the payment page, and the browser directly sends a payment request to the payment platform. After the payment platform completes the payment verification, it returns a payment response to the browser. After receiving the payment response, the browser redirects to the subscription completion page to complete the user-side payment interaction; (5) The payment platform pushes transaction notification information (subscription notification information) to L2 BE through WebHook. L2BE creates a local subscription model based on the transaction notification information. Based on the obtained subscription metadata of the target product, it creates a subscription model of the target product. The payment platform pushes transaction notification information (deduction notification information) again through WebHook. After receiving it, L2 BE creates a transaction order for the target product based on the pre-built order model and completes the deduction order archiving. L2 BE pushes a rights distribution instruction to L3 BE to notify the distribution of rewards. After L3 BE executes the reward distribution, it returns a distribution response to L2 BE. L2 BE returns a processing completion response to the payment platform to complete the transaction process of the target product.

[0088] In summary, the commodity transaction method based on AI, APA, LLM, and AI Agent provided in this disclosure responds to a client's commodity query request by querying a pre-built commodity data model, returning a commodity list and commodity information to the client, and also returning payment platform information to the client. In response to a client's transaction instruction to select a target commodity from the commodity list, it creates subscription payment information, sends the subscription payment information to the payment platform, receives a payment page link returned by the payment platform, and sends the payment page link to the client, redirecting the client to the payment platform's payment page. The payment page receives payment operations and, based on the payment request generated by the payment operation, invokes the payment platform associated with the target commodity to execute the transaction process, and receives transaction notification information returned by the payment platform. Therefore, this disclosure completes the commodity transaction loop by receiving the payment page link returned by the payment platform, having the client render and display the payment page, and simultaneously receiving transaction notification information pushed by the payment platform. This enables rapid synchronization of payment status, effectively simplifies payment operations, streamlines the interaction process, improves transaction processing efficiency, and ultimately optimizes the user's transaction experience and increases user satisfaction.

[0089] The following explanation uses a subscription upgrade / downgrade instruction as an example to illustrate the specific process of the commodity trading method based on AI, APA, LLM, and AI Agent provided in this embodiment.

[0090] Figure 6 This is a flowchart illustrating a commodity transaction method based on AI, APA, LLM, and AI Agent, provided for embodiments of this disclosure.

[0091] like Figure 6 As shown, the commodity transaction method based on AI, APA, LLM, and AI Agent proposed in this embodiment includes the following steps: S601, in response to the client's product query request, queries the pre-built product data model and returns a product list and product information to the client, and also returns payment platform information to the client.

[0092] S602 calls the subscription change interface corresponding to the payment platform.

[0093] S603: Receive the subscription change result returned by the payment platform and update the subscription model of the target product according to the subscription change result.

[0094] S604 receives transaction notification information returned by the payment platform and creates a transaction order for the target product based on the transaction notification information.

[0095] S605: Based on the transaction order, call the payment platform associated with the target product to execute the transaction process.

[0096] For example, regarding subscription upgrade commands, such as Figure 7 As shown, (1) the user initiates a product query request to the browser (view the subscription list), the browser requests the subscription list and payment platform list from the L2 BE through the webapi, the L2 BE queries the pre-built product data model, and returns the subscription product list, product information and payment platform list to the client, the browser integrates the information and displays the subscription product list and payment platform to the user; (2) the user selects the target product from the subscription product list, the browser displays a change preview to the user to help the user confirm the selection; (3) the user initiates a subscription instruction for the target product to the browser (confirm subscription), the browser forwards the subscription instruction for the target product to the L2 BE through the webapi, after the L2 BE receives the subscription instruction, it determines that the subscription instruction is a subscription upgrade instruction, the L2 BE calls the subscription change interface corresponding to the payment platform (such as the payment platform's subscription api), and modifies the subscription content based on the subscription change interface, for example: setting the billing cycle anchor to the current time (Billing Cycle Anchor: Now), generating a proportional price difference and immediately issuing an invoice and deducting the fee (create_prorations: always_invoice), etc., the payment platform completes the subscription change operation, L2 The BE receives the subscription change result returned by the payment platform and updates the subscription model of the target product according to the subscription change result. The L2 BE sends the subscription upgrade success result to the browser, and the browser displays the success page to the user, completing the user-side interaction of the subscription upgrade; (4) Receive the transaction notification information (subscription upgrade transaction notification) returned by the payment platform. In response to the transaction notification information, create a transaction order for the target product according to the pre-built order model. According to the transaction order, call the payment platform associated with the target product to execute the transaction process. The L2 BE pushes the rights distribution instruction to the L3 BE to notify the reward distribution. After the L3 BE executes the reward distribution, it returns the rights distribution response to the L2 BE. The L2 BE updates the transaction order and completes the transaction process of the target product.

[0097] For example, in response to a transaction instruction that is a new subscription instruction or an upgrade subscription instruction, the target product will be automatically charged according to the subscription period, such as... Figure 8As shown, if the payment platform has notification capabilities, it uses Method 1: L2 BE receives transaction notification information from the payment platform by receiving Webhook events pushed by the payment platform. If the payment platform does not have notification capabilities, it uses Method 2: a scheduled task is dispatched through the scheduler to initiate a query request to the payment platform to receive transaction notification information. In response to the transaction notification information, a transaction order for the target product is created according to the pre-built order model, and the subscription model of the target product is updated. L2 BE returns a processing completion response to the payment platform. L2 BE pushes a reward distribution instruction to L3 BE to notify of reward distribution. After L3 BE executes the reward distribution, it returns a reward distribution response to L2 BE. L2 BE updates the transaction order, thus completing the transaction process for the target product.

[0098] For example, regarding subscription downgrade commands, such as Figure 9As shown, (1) the user initiates a product query request to the browser (view the subscription list), the browser requests the subscription list and payment platform list from the L2 BE through the webapi, the L2 BE queries the pre-built product data model, and returns the subscription product list, product information and payment platform list to the client, the browser integrates the information and displays the subscription product list and payment platform to the user; (2) the user selects the target product from the subscription product list, the browser displays a change preview to the user to help the user confirm the selection; (3) the user initiates a subscription instruction for the target product to the browser (confirm subscription), the browser forwards the subscription instruction for the target product to the L2 BE through the webapi, after the L2 BE receives the subscription instruction, it determines that the subscription instruction is a subscription downgrade instruction, the L2 BE calls the subscription change interface corresponding to the payment platform (such as the timed scheduling interface scheduler api corresponding to the payment platform), configures the timed execution task of subscription downgrade based on the subscription change interface, modifies the subscription content, the L2 BE updates the local subscription model, sets the target price identifier target_price_id, marks the downgraded subscription price, the payment platform completes the subscription change operation, and the L2 BE The subscription downgrade success result is sent to the browser, and the browser displays the success page to the user, completing the user-side interaction of subscription downgrade; (4) When the original subscription period ends, the payment platform triggers the transaction notification information of the new period, receives the transaction notification information returned by the payment platform (the transaction notification of subscription downgrade taking effect), responds to the transaction notification information, creates the transaction order of the target product according to the pre-built order model, calls the payment platform associated with the target product to execute the transaction process according to the transaction order, and updates the subscription model of the target product at the same time. L2 BE returns the response of processing completion to the payment platform, L2 BE pushes the rights distribution instruction to L3 BE to notify the reward distribution, L3 BE executes the reward distribution and returns the rights distribution response to L2 BE, L2 BE updates the transaction order and completes the target product transaction process based on AI, APA, LLM and AI Agent.

[0099] In summary, the commodity transaction method based on AI, APA, LLM, and AI Agent provided in this disclosure responds to a client's commodity query request by querying a pre-built commodity data model, returning a commodity list and information to the client, and returning payment platform information to the client. It then calls the corresponding subscription change interface of the payment platform, receives the subscription change result returned by the payment platform, updates the subscription model of the target commodity based on the subscription change result, receives transaction notification information returned by the payment platform, creates a transaction order for the target commodity based on the transaction notification information, and calls the payment platform associated with the target commodity to execute the transaction process based on the transaction order. Therefore, this disclosure achieves subscription information change by calling the payment platform's subscription change interface and updates the local subscription model based on the change result, ensuring consistency of subscription data between the business side and the payment platform side. Simultaneously, it asynchronously creates a transaction order and completes transaction processing based on the transaction notification information pushed by the payment platform, realizing a closed-loop process of subscription change, order generation, and transaction fulfillment. This ensures the traceability of subscription business data, adapts to the periodic transaction characteristics of subscribed commodities, improves the standardization and stability of subscription transaction processing, and enhances the user subscription experience.

[0100] The following explanation uses a subscription cancellation instruction as an example to illustrate the specific process of the commodity transaction method based on AI, APA, LLM, and AI Agent provided in this embodiment.

[0101] Figure 10 This is a flowchart illustrating a commodity transaction method based on AI, APA, LLM, and AI Agent, provided for embodiments of this disclosure.

[0102] As shown in the figure, the commodity transaction method based on AI, APA, LLM, and AI Agent proposed in this embodiment includes the following steps: S1001, in response to the client's product query request, queries the pre-built product data model and returns a product list and product information to the client, and also returns payment platform information to the client.

[0103] S1002, in response to the transaction instruction sent by the client to select the target product from the product list, calls the subscription change interface corresponding to the payment platform.

[0104] S1003 Receive the subscription change result returned by the payment platform and update the subscription model of the target product according to the subscription change result.

[0105] S1007: Receive transaction notification information returned by the payment platform, and delete the subscription of the target product based on the transaction notification information.

[0106] For example, such as Figure 11As shown, (1) the user initiates a product query request to the browser (view current subscription), the browser requests the current subscription from the L2 BE through the webapi, the L2 BE queries the pre-built product data model, and returns the list of currently subscribed products and product information, as well as the list of payment platforms, to the client. The browser integrates the information and displays the list of currently subscribed products and payment platforms to the user; (2) the user selects the target product from the list of subscribed products, the user initiates the cancellation of the target product to the browser, and the browser displays the end-of-term cancellation prompt to the user; (3) the user initiates the cancellation instruction for the target product to the browser (confirm cancellation), and forwards the cancellation instruction for the target product to the L2 BE through the webapi. After receiving the cancellation instruction, the L2 BE calls the subscription change interface corresponding to the payment platform (such as the update api of the payment platform), and updates the user's subscription configuration based on the subscription change interface, for example: setting the subscription to be automatically cancelled after the end of the current billing period (cancel_at_period_end=true). After the payment platform completes the subscription change operation, L2 The BE sends the subscription cancellation success result to the browser, and the browser displays the success page to the user, completing the user-side interaction of subscription cancellation; (4) After the current subscription billing period ends, the L2 BE receives the transaction notification information (subscription cancellation transaction notification) returned by the payment platform, performs the subscription deletion operation, clears the local subscription data, and completes the subscription cancellation loop.

[0107] In summary, the commodity transaction method based on AI, APA, LLM, and AI Agent provided in this disclosure responds to a client's commodity query request by querying a pre-built commodity data model, returning a commodity list and commodity information to the client, and also returning payment platform information to the client. Responding to a client's transaction instruction to select a target commodity from the commodity list, the method calls the corresponding subscription change interface of the payment platform, receives the subscription change result returned by the payment platform, updates the subscription model of the target commodity based on the subscription change result, receives transaction notification information returned by the payment platform, and deletes the subscription of the target commodity based on the transaction notification information. Therefore, this disclosure completes the subscription change by calling the payment platform's subscription change interface and updates the subscription model of the target commodity based on the returned change result, ensuring the consistency of subscription data between the business side and the payment platform side. By deleting the subscription of the target commodity correspondingly through the transaction notification information pushed by the payment platform, it achieves closed-loop processing of subscription cancellation behavior, realizes smooth processing of subscription changes, and improves the standardization, stability, and user experience of the commodity transaction process.

[0108] Figure 12 This is a block diagram illustrating a commodity trading device based on AI, APA, LLM, and AI Agent according to an exemplary embodiment.

[0109] like Figure 12 As shown, the commodity trading device 1000 based on AI, APA, LLM and AI Agent in this embodiment of the present disclosure may specifically include: a query module 1001, a transaction module 1002 and a receiving module 1003.

[0110] The query module 1001 is used to respond to the client's product query request, query the pre-built product data model, return a product list and product information to the client, and return payment platform information to the client; wherein, the products in the product list include at least one of one-time products that require a single payment and subscription products that require periodic payments; Transaction module 1002 is used to respond to a transaction instruction sent by the client for a target product selected from the product list, and to invoke the payment platform associated with the target product to execute the transaction process based on the transaction instruction. The target product is either a disposable product or a subscription product, and the transaction instruction is a subscription instruction for the subscription product. The receiving module 1003 is used to receive transaction notification information returned by the payment platform.

[0111] In one embodiment of this disclosure, the transaction instruction is a purchase instruction, and the transaction module 1002 is further configured to: create a payment platform order for the target product, send the payment platform order to the payment platform, and receive payment form data returned by the payment platform; send the form data required for the payment order to the client so that the client renders and displays a payment page, wherein the payment page is used to receive payment operations and, based on the payment request generated by the payment operations, call the payment platform associated with the target product to execute the transaction process.

[0112] In one embodiment of this disclosure, the transaction instruction is a new subscription instruction. The transaction module 1002 is further configured to: generate subscription payment information and send the subscription payment information to the payment platform; receive a payment page link returned by the payment platform and send the payment page link to the client so that the client is redirected to the payment page of the payment platform, wherein the payment page is used to receive payment operations and, based on the payment request generated by the payment operations, call the payment platform associated with the target product to execute the transaction process.

[0113] In one embodiment of this disclosure, the receiving module 1003 is further configured to: receive a Webhook event pushed by the payment platform through a callback notification Webhook mechanism, wherein the Webhook event includes the transaction notification information; or, schedule a timed task through a scheduler to initiate a query request to the payment platform based on the timed task, so as to receive the transaction notification information returned by the payment platform.

[0114] In one embodiment of this disclosure, the apparatus 1000 is further configured to: generate a subscription operation record table for the target product based on the target product information of the target product.

[0115] In one embodiment of this disclosure, the apparatus 1000 is further configured to: acquire subscription metadata of the target product and create a subscription model for the target product.

[0116] In one embodiment of this disclosure, the transaction instruction is a subscription upgrade / downgrade instruction. The transaction module 1002 is further configured to: call the subscription change interface corresponding to the payment platform; receive the subscription change result returned by the payment platform and update the subscription model of the target product according to the subscription change result; receive transaction notification information returned by the payment platform and create a transaction order for the target product according to the transaction notification information; and call the payment platform associated with the target product to execute the transaction process according to the transaction order.

[0117] In one embodiment of this disclosure, the transaction instruction is a subscription cancellation instruction. The device 1000 is further configured to: call the subscription change interface corresponding to the payment platform; receive the subscription change result returned by the payment platform and update the subscription model of the target product according to the subscription change result; receive transaction notification information returned by the payment platform and delete the subscription of the target product according to the transaction notification information.

[0118] In one embodiment of this disclosure, the apparatus 1000 is further configured to: create a transaction order for the target product based on a pre-built order model and the target product information of the target product.

[0119] In one embodiment of this disclosure, the device 1000 is further configured to: obtain the basic rights of the target product based on the basic information of the target product in the target product information; obtain the additional rights of the target product based on the price configuration information; and determine the rights snapshot data of the target product based on the basic rights and additional rights of the target product.

[0120] In one embodiment of this disclosure, the device 1000 is further configured to: distribute the rights corresponding to the target product to the user associated with the client based on the rights snapshot data.

[0121] In one embodiment of this disclosure, the transaction module 1002 is further configured to: determine the corresponding standardized application programming interface (API) based on the type of the transaction instruction and the type of the payment platform; and execute the transaction process by calling the payment platform associated with the target product through the API.

[0122] In one embodiment of this disclosure, the apparatus 1000 is further configured to: parse the Webhook event in response to the Webhook event passing security verification to obtain the operation identifier ID of the target product; query the subscription operation record table of the product according to the operation ID to determine the routing information corresponding to the Webhook event, wherein the operation ID is associated with the subscription operation record table of the product; and forward the Webhook event to a matching target processor according to the routing information, wherein the target processor is used to execute a transaction process.

[0123] In the embodiments disclosed herein, the specific manner in which each structure in the commodity trading device based on AI, APA, LLM, and AI Agent performs its operations has been described in detail in the embodiments relating to the commodity trading method based on AI, APA, LLM, and AI Agent, and will not be repeated here.

[0124] The commodity transaction device based on AI, APA, LLM, and AI Agent provided in this disclosure responds to a client's commodity query request by querying a pre-built commodity data model and returning a commodity list and commodity information to the client, as well as payment platform information. The commodities in the commodity list include at least one of two types: one-time payment commodities and subscription commodities requiring periodic payment. Responding to a client's transaction instruction to select a target commodity from the commodity list, the device invokes the payment platform associated with the target commodity to execute the transaction process based on the transaction instruction. Specifically, if the target commodity is a one-time payment commodity, the transaction instruction is a purchase instruction for the one-time payment commodity; if the target commodity is a subscription commodity, the transaction instruction is a subscription instruction for the subscription commodity. The device also receives transaction notification information returned by the payment platform. Therefore, this disclosure adopts a unified commodity query and transaction execution process, adaptable to both one-time payment and subscription commodity transaction scenarios, enabling the reuse of the payment system and underlying capabilities, effectively reducing operational costs across multiple business scenarios. Furthermore, users do not need to distinguish between one-time payment and periodic subscription operation logic, simplifying payment operation steps, lowering the usage threshold, and improving user convenience and experience.

[0125] Figure 13 This is a block diagram illustrating an electronic device 2000 according to an exemplary embodiment.

[0126] like Figure 13As shown, the above-mentioned electronic device 2000 includes: The memory 2001 and processor 2002 are connected by a bus 2003, which connects different components (including the memory 2001 and the processor 2002). The memory 2001 stores a computer program, and when the processor 2002 executes the program, it implements the commodity trading method based on AI, APA, LLM and AI Agent according to the present disclosure.

[0127] Bus 2003 refers to one or more of several bus architectures, including memory buses or memory controllers, peripheral buses, graphics acceleration ports, processors, or local buses using any of the various bus architectures. Examples of these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.

[0128] Electronic device 2000 typically includes a variety of electronic device readable media. These media can be any available media that can be accessed by electronic device 2000, including volatile and non-volatile media, removable and non-removable media.

[0129] Memory 2001 may also include computer system readable media in the form of volatile memory, such as random access memory (RAM) 2004 and / or cache memory 2005. Electronic device 2000 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 2006 may be used to read and write non-removable, non-volatile magnetic media (… Figure 13 Not shown; usually referred to as a "hard drive"). Although Figure 13 As not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 2003 via one or more data media interfaces. Memory 2001 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of this disclosure.

[0130] A program / utility 2008 having a set (at least one) of program modules 2007 may be stored, for example, in memory 2001. Such program modules 2007 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 2007 typically perform the functions and / or methods described in the embodiments of this disclosure.

[0131] Electronic device 2000 can also communicate with one or more external devices 2009 (e.g., keyboard, pointing device, display 2011, etc.), and with one or more devices that enable a user to interact with the electronic device 2000, and / or with any device that enables the electronic device 2000 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed via input / output (I / O) interface 2012. Furthermore, electronic device 2000 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 2013. Figure 13 As shown, network adapter 2013 communicates with other modules of electronic device 2000 via bus 2003. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with electronic device 2000, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0132] The processor 2002 performs various functional applications and data processing by running programs stored in the memory 2001.

[0133] It should be noted that the implementation process and technical principles of the electronic device in this embodiment are explained in the foregoing description of the commodity transaction method based on AI, APA, LLM and AI Agent in the embodiments of this disclosure, and will not be repeated here.

[0134] To implement the above embodiments, this disclosure also proposes a computer-readable storage medium.

[0135] When the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device is able to perform the commodity transaction methods based on AI, APA, LLM, and AI Agent as described above. Optionally, the computer-readable storage medium can be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.

[0136] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.

[0137] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. An AI, APA, LLM and AI Agent based commodity trading method, characterized in that, The method includes: In response to a client's product query request, the system queries a pre-built product data model and returns a product list and product information to the client, as well as payment platform information; wherein, the products in the product list include at least one of one-time products requiring a single payment and subscription products requiring periodic payments; In response to a transaction instruction sent by the client to select a target product from the product list, the transaction process is executed by calling the payment platform associated with the target product based on the transaction instruction. Wherein, the target product is a disposable product, and the transaction instruction is a purchase instruction for the disposable product; or the target product is a subscription product, and the transaction instruction is a subscription instruction for the subscription product. Receive transaction notification information returned by the payment platform.

2. The method according to claim 1, characterized in that, The transaction instruction is a purchase instruction, which invokes the payment platform associated with the target product to execute the transaction process, including: Create a payment platform order for the target product, send the payment platform order to the payment platform, and receive the payment form data returned by the payment platform; The form data required for the payment order is sent to the client so that the client can render and display the payment page. The payment page is used to receive payment operations and, based on the payment request generated by the payment operations, call the payment platform associated with the target product to execute the transaction process.

3. The method according to claim 1, characterized in that, The transaction instruction is a new subscription instruction, and the step of invoking the payment platform associated with the target product to execute the transaction process further includes: Generate subscription payment information and send the subscription payment information to the payment platform; The system receives a payment page link returned by the payment platform and sends the payment page link to the client so that the client is redirected to the payment page of the payment platform. The payment page is used to receive payment operations and, based on the payment request generated by the payment operation, invokes the payment platform associated with the target product to execute the transaction process.

4. The method according to claim 3, characterized in that, The receipt of transaction notification information returned by the payment platform includes: The system receives Webhook events pushed by the payment platform via a callback notification Webhook mechanism, wherein the Webhook events include the transaction notification information; or, The scheduler schedules a timed task, and based on the timed task, initiates a query request to the payment platform in order to receive transaction notification information returned by the payment platform.

5. The method according to claim 3, characterized in that, Before invoking the payment platform associated with the target product to execute the transaction process, the process also includes: Based on the target product information, a subscription operation record table for the target product is generated.

6. The method according to claim 4, characterized in that, The method further includes: Obtain the subscription metadata of the target product and create a subscription model for the target product.

7. The method according to any one of claims 3-6, characterized in that, The transaction instruction is the subscription upgrade / downgrade instruction, and the method further includes: Call the subscription change interface corresponding to the payment platform; Receive the subscription change result returned by the payment platform, and update the subscription model of the target product according to the subscription change result; Receive transaction notification information returned by the payment platform, and create a transaction order for the target product based on the transaction notification information; Based on the transaction order, the payment platform associated with the target product is invoked to execute the transaction process.

8. The method according to any one of claims 3-6, characterized in that, The transaction instruction is a subscription cancellation instruction, and the method further includes: Call the subscription change interface corresponding to the payment platform; Receive the subscription change result returned by the payment platform, and update the subscription model of the target product according to the subscription change result; Receive transaction notification information returned by the payment platform, and delete the subscription of the target product based on the transaction notification information.

9. The method according to any one of claims 2, 3, or 7, characterized in that, The method further includes: A transaction order for the target product is created based on a pre-built order model and the target product information.

10. The method according to claim 9, characterized in that, The method further includes: Based on the basic information of the target product in the target product information, obtain the basic rights and interests of the target product; Based on the price configuration information, obtain the additional benefits of the target product; Based on the basic and additional rights of the target product, determine the rights snapshot data of the target product.

11. The method according to claim 9, characterized in that, The method further includes: Based on the rights snapshot data, the rights corresponding to the target product are distributed to the users associated with the client.

12. The method according to claim 1, characterized in that, The step of responding to a transaction instruction for a target product from a client and invoking a payment platform associated with the target product to execute the transaction process further includes: Based on the type of the transaction instruction and the type of the payment platform, determine the corresponding standardized application programming interface (API). The transaction process is executed by calling the payment platform associated with the target product through the API.

13. The method according to claim 4, characterized in that, The method further includes: In response to the Webhook event passing the security verification, the Webhook event is parsed to obtain the operation identifier ID of the target product; The subscription operation record table of the product is queried according to the operation ID to determine the routing information corresponding to the Webhook event, wherein the operation ID is associated with the subscription operation record table of the product; Based on the routing information, the Webhook event is forwarded to the matching target processor, wherein the target processor is used to execute the transaction process.

14. A commodity trading device based on AI, APA, LLM, and AI Agent, characterized in that, The device includes: The query module is used to respond to the client's product query request, query the pre-built product data model and return a product list and product information to the client, and return payment platform information to the client; wherein, the products in the product list include at least one of the following: one-time products that require a single payment and subscription products that require a periodic payment; The transaction module is used to respond to a transaction instruction sent by the client for a target product selected from the product list, and to invoke the payment platform associated with the target product to execute the transaction process based on the transaction instruction. The target product is a disposable product, and the transaction instruction is a purchase instruction for the disposable product; the target product is a subscription product, and the transaction instruction is a subscription instruction for the subscription product. The receiving module is used to receive transaction notification information returned by the payment platform.

15. An electronic device, characterized in that, include: processor; Memory for storing the executable instructions of the processor; The processor is configured to execute the instructions to implement the method as described in any one of claims 1-13.

16. A computer-readable storage medium, characterized in that, When the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device is able to perform the method as described in any one of claims 1-13.

17. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method according to any one of claims 1-13.