Resource adjustment method and device, electronic equipment and medium
By automating the processing of failed transaction data and repairing and recording the reasons for failure, the problem of low efficiency in manual processing of transactions in existing technologies is solved, and efficient and accurate resource adjustment is achieved.
Patent Information
- Application Number
- CN202511342387.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-19
- Publication Date
- 2026-01-02
AI Technical Summary
In existing technologies, the methods for adjusting resources for transactions rely on manual processing, resulting in cumbersome processes, low efficiency, and an inability to cope with the exponential growth in transaction frequency and volume.
By automating the processing of failed transaction data and performing repairs based on the reasons for the failures, the system utilizes a pre-built correspondence between failure reason categories and repair strategies, along with a pre-trained repair model, to generate transaction entries and record successful transaction identifiers, thereby reducing human intervention.
It improves the efficiency and accuracy of transaction processing, reduces the consumption of human resources, and ensures accounting consistency and user experience.
Smart Images

Figure CN121258675A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, specifically to a resource adjustment method, apparatus, electronic device, and medium. Background Technology
[0002] With the rapid development of financial services, the number of financial transactions is increasing, leading to a rise in transactions failing to be credited due to errors in currency, account information, or customer details. These types of transactions are commonly referred to as "grounded transactions."
[0003] Currently, the common practice for handling transactions relies heavily on manual operations: business personnel first query and confirm transaction information in front-end business systems (such as credit card systems, credit management systems, and wealth management trading platforms) and manually complete the accounting operations at the customer's account level; subsequently, they need to log in to the back-end accounting system (or the accounting component of the core accounting system) and, based on the results of the previous operation, manually select the corresponding accounts and supplement internal fund clearing, expense income, and other accounting information to ensure the final consistency of accounts between upstream and downstream.
[0004] However, with the exponential growth in the frequency and number of transactions, the workload of manual processing by business personnel is too heavy. Therefore, the existing resource adjustment methods that rely on manual processing of transactions are cumbersome and inefficient. Summary of the Invention
[0005] This application provides a resource adjustment method, apparatus, electronic device, and medium to address the problems of cumbersome processes and low efficiency in existing resource adjustment methods that rely on manual processing of transactions.
[0006] In a first aspect, embodiments of this application provide a resource adjustment method applied to a first component, the method comprising:
[0007] For any failed transaction data, repair processing is performed on the transaction data based on the failure reason contained in the transaction data;
[0008] The repaired transaction data is sent to the second component, and a success notification of adjustment is received from the second component; the success notification is sent by the second component after adjusting the resource quantity of the first account based on the repaired transaction data; the first account is the account involved in the transaction data;
[0009] Based on the adjustment success notification, a transaction entry is generated according to the repaired transaction data; the transaction entry contains an identifier indicating that the transaction was successful.
[0010] The transaction entry is sent to a third component so that the third component records the transaction entry.
[0011] In some embodiments, the process of repairing the transaction data based on the failure reasons contained in the transaction data includes:
[0012] Determine the failure reason category to which the failure reason belongs;
[0013] From the pre-saved correspondence between various failure cause categories and repair strategies, select the target repair strategy corresponding to the failure cause category;
[0014] The target repair strategy is used to repair the transaction data.
[0015] In some embodiments, the failure reason categories include a first category, a second category, and a third category;
[0016] The first category is used to indicate that the customer information in the transaction data is incorrect; the repair strategy corresponding to the first category is: to query the correct customer information corresponding to the first account from the customer information record, and to use the queried customer information to correct the customer information in the transaction data.
[0017] The second category is used to indicate that the transaction information in the transaction data is incorrect; the repair strategy corresponding to the second category is: query the original transaction information from the original transaction record corresponding to the transaction data, and use the queried original transaction information to correct the transaction information in the transaction data;
[0018] The repair strategy corresponding to the third category is to repair the customer information and the transaction information in the transaction data in sequence.
[0019] In some embodiments, after repairing the transaction data using the target repair strategy, the method further includes:
[0020] If the transaction data repair process fails, the transaction data is input into a pre-trained repair model for analysis to obtain repair suggestions output by the repair model.
[0021] Based on the repair suggestions, the transaction data was repaired.
[0022] In some embodiments, the repair model is trained through the following steps:
[0023] Obtain a labeled historical transaction failure dataset; the historical transaction failure dataset includes multiple transaction data, wherein each transaction data includes transaction features and a repair strategy label, and the transaction features include customer information and transaction information;
[0024] The transaction features are preprocessed, and the preprocessed transaction features are input into the initial repair model. The model parameters are iteratively optimized with the goal of minimizing the classification loss function of the repair strategy.
[0025] Training stops when the model performance meets the preset convergence condition, and the trained repair model is obtained.
[0026] In some embodiments, after the transaction data is repaired, the method further includes:
[0027] Record the number of times the transaction data has been repaired;
[0028] Before repairing the transaction data based on the failure reasons contained in the transaction data, the process further includes:
[0029] Obtain the current number of repair attempts for the transaction data. If the current number of repair attempts does not exceed a preset threshold, then perform repair processing on the transaction data.
[0030] If the current number of repairs exceeds the preset threshold, a first prompt message is output; the first prompt message is used to prompt the user to manually process the transaction data.
[0031] In some embodiments, after sending the transaction entry to the third component, the method further includes:
[0032] A transaction success notification is sent to the user terminal associated with the first account; the transaction success notification is used to instruct the user terminal to display a second prompt message; the second prompt message includes: transaction type, adjusted resource quantity, transaction time, and transaction success identifier.
[0033] Secondly, this application provides a resource adjustment device configured in a first component, the device comprising:
[0034] The repair module is used to repair the transaction data for any failed transaction based on the reasons for failure contained in the transaction data.
[0035] The first sending module is used to send the repaired transaction data to the second component and receive the adjustment success notification returned by the second component; the adjustment success notification is sent by the second component after adjusting the resource quantity of the first account according to the repaired transaction data; the first account is the account involved in the transaction data;
[0036] The generation module is used to generate transaction entries based on the adjustment success notification and the repaired transaction data; the transaction entries include an identifier indicating successful transaction.
[0037] The second sending module is used to send the transaction entry to the third component so that the third component records the transaction entry.
[0038] In some embodiments, the repair module is specifically used for:
[0039] Determine the failure reason category to which the failure reason belongs;
[0040] From the pre-saved correspondence between various failure cause categories and repair strategies, select the target repair strategy corresponding to the failure cause category;
[0041] The target repair strategy is used to repair the transaction data.
[0042] In some embodiments, the failure reason categories include a first category, a second category, and a third category;
[0043] The first category is used to indicate that the customer information in the transaction data is incorrect; the repair strategy corresponding to the first category is: to query the correct customer information corresponding to the first account from the customer information record, and to use the queried customer information to correct the customer information in the transaction data.
[0044] The second category is used to indicate that the transaction information in the transaction data is incorrect; the repair strategy corresponding to the second category is: query the original transaction information from the original transaction record corresponding to the transaction data, and use the queried original transaction information to correct the transaction information in the transaction data;
[0045] The repair strategy corresponding to the third category is to repair the customer information and the transaction information in the transaction data in sequence.
[0046] In some embodiments, after the repair module performs repair processing on the transaction data using the target repair strategy, it is further configured to:
[0047] If the transaction data repair process fails, the transaction data is input into a pre-trained repair model for analysis to obtain repair suggestions output by the repair model.
[0048] Based on the repair suggestions, the transaction data was repaired.
[0049] In some embodiments, the repair model is trained through the following steps:
[0050] Obtain a labeled historical transaction failure dataset; the historical transaction failure dataset includes multiple transaction data, wherein each transaction data includes transaction features and a repair strategy label, and the transaction features include customer information and transaction information;
[0051] The transaction features are preprocessed, and the preprocessed transaction features are input into the initial repair model. The model parameters are iteratively optimized with the goal of minimizing the classification loss function of the repair strategy.
[0052] Training stops when the model performance meets the preset convergence condition, and the trained repair model is obtained.
[0053] In some embodiments, it also includes:
[0054] The recording module is used to record the number of times the transaction data has been repaired;
[0055] Before the repair module repairs the transaction data based on the failure reasons contained in the transaction data, the recording module is further configured to:
[0056] Obtain the current number of repair attempts for the transaction data. If the current number of repair attempts does not exceed a preset threshold, then perform repair processing on the transaction data.
[0057] If the current number of repairs exceeds the preset threshold, a first prompt message is output; the first prompt message is used to prompt the user to manually process the transaction data.
[0058] In some embodiments, after the second sending module sends the transaction entry to the third component, it is further configured to:
[0059] A transaction success notification is sent to the user terminal associated with the first account; the transaction success notification is used to instruct the user terminal to display a second prompt message; the second prompt message includes: transaction type, adjusted resource quantity, transaction time, and transaction success identifier.
[0060] Thirdly, this application provides an electronic device, comprising: at least one processor, and a memory communicatively connected to said at least one processor, wherein:
[0061] The memory stores a computer program that can be executed by at least one processor, which enables the at least one processor to perform any of the resource adjustment methods described above.
[0062] Fourthly, this application provides a storage medium in which, when a computer program in the storage medium is executed by a processor of an electronic device, the electronic device is capable of performing any of the above-described resource adjustment methods.
[0063] Fifthly, embodiments of this application provide a computer program product that, when invoked and executed by an electronic device, causes the electronic device to execute any of the aforementioned resource adjustment methods.
[0064] In this embodiment, for any failed transaction data, the transaction data is repaired based on the failure reason contained in the transaction data; the repaired transaction data is sent to the second component, and a success notification is received from the second component; the success notification is sent by the second component after adjusting the resource quantity of the first account based on the repaired transaction data; the first account is the account involved in the transaction data; based on the success notification, a transaction entry is generated according to the repaired transaction data; the transaction entry contains a successful transaction identifier; the transaction entry is sent to the third component so that the third component records the transaction entry. In this way, automatically acquiring failed transaction data, repairing erroneous transaction data to enable the second component to adjust the resource quantity of the first account, and the third component to record the transaction entry can significantly improve the efficiency and accuracy of transaction processing and save a lot of manpower.
[0065] Other features and advantages of this application will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description
[0066] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0067] Figure 1 This is a schematic diagram illustrating an application scenario of a resource adjustment method provided in an embodiment of this application.
[0068] Figure 2 A flowchart illustrating a resource adjustment method provided in an embodiment of this application;
[0069] Figure 3 An interactive flowchart of a resource adjustment method provided in an embodiment of this application;
[0070] Figure 4 A flowchart illustrating another resource adjustment method provided in this application embodiment;
[0071] Figure 5 A structural diagram of a resource adjustment device provided in an embodiment of this application;
[0072] Figure 6 This is a structural diagram of an electronic device for implementing a resource adjustment method, provided as an embodiment of this application. Detailed Implementation
[0073] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. Unless otherwise specified, the embodiments and features in the embodiments of this application can be arbitrarily combined with each other. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown here.
[0074] The terms "first" and "second" in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the term "comprising" and any variations thereof are intended to cover non-exclusive protection. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices. The term "multiple" in this application can mean at least two, for example, two, three, or more, and the embodiments of this application do not impose limitations.
[0075] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of this application, including various details to aid understanding. These embodiments should be considered merely exemplary. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of this application. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description. It should be noted that in the embodiments of this application, certain existing industry solutions such as software, components, and models may be mentioned. These should be considered exemplary, intended only to illustrate the feasibility of implementing the technical solutions of this application, and do not imply that the applicant has already used or necessarily used such solutions.
[0076] The acquisition, transmission, storage, and use of data in this application all comply with the requirements of relevant national laws and regulations.
[0077] Before introducing the resource adjustment method provided in the embodiments of this application, the technical background of the embodiments of this application will be described in detail below for ease of understanding.
[0078] With the rapid development of financial services, the number of financial transactions is increasing, leading to a rise in transactions failing to be credited due to errors in currency, account information, or customer details. These types of transactions are commonly referred to as "grounded transactions."
[0079] Currently, the common practice for handling transactions relies heavily on manual operations: business personnel first query and confirm transaction information in front-end business systems (such as credit card systems, credit management systems, and wealth management trading platforms) and manually complete the accounting operations at the customer's account level; subsequently, they need to log in to the back-end accounting system (or the accounting component of the core accounting system) and, based on the results of the previous operation, manually select the corresponding accounts and supplement internal fund clearing, expense income, and other accounting information to ensure the final consistency of accounts between upstream and downstream.
[0080] However, with the exponential growth in the frequency and number of transactions, the workload of manual processing by business personnel is too heavy. Therefore, the existing resource adjustment methods that rely on manual processing of transactions are cumbersome and inefficient.
[0081] In view of this, and in order to solve the problems in the prior art, embodiments of this application provide a resource adjustment method, apparatus, electronic device, and medium. Some preferred embodiments of this application will be described below with reference to the accompanying drawings.
[0082] This application provides a resource adjustment method applicable to financial or quasi-financial business scenarios where cross-system transaction processing fails and requires automatic repair and resource adjustment. Typical applications include cross-border payment clearing, third-party payment fund settlement, and online credit card transaction registration. In these scenarios, when transaction processing fails due to incorrect customer information or abnormal transaction information, this method can automatically repair data and complete resource adjustments, ensuring accounting consistency and user experience.
[0083] Figure 1 This application scenario diagram illustrates a resource adjustment method provided in an embodiment of the present application, including a first component 100, a second component 200, and a third component 300.
[0084] The first component 100 is a resource adjustment system that implements the resource adjustment method. It is used to repair the transaction data for any failed transaction based on the failure reason contained in the transaction data; send the repaired transaction data to the second component 200 and receive the adjustment success notification returned by the second component 200; generate a transaction entry based on the adjustment success notification and the repaired transaction data; the transaction entry contains an identifier of transaction success; and send the transaction entry to the third component 300.
[0085] The second component 200 is a customer account processing system that adjusts the resource quantity of the first account based on transaction data. It receives the repaired transaction data sent by the first component 100, adjusts the resource quantity of the first account (customer account), and sends a success notification to the first component 100 after adjustment. The first account is the customer account involved in the transaction data.
[0086] The third component 300 is a transaction recording system for recording transaction entries of each first account, used to receive and record transaction entries sent by the first component 100.
[0087] In specific implementations, the first component 100, the second component 200, and the third component 300 can be deployed on the same server or on different servers. Servers include, but are not limited to, single physical servers, virtual machines, server clusters, or computing instances in cloud platforms. When the first component 100, the second component 200, and the third component 300 are deployed on different servers, they can interact with each other via a communication network. This communication network includes, but is not limited to, any combination of Local Area Networks (LANs), Metropolitan Area Networks (MANs), Wide Area Networks (WANs), mobile, wired or wireless networks, private networks, or virtual private networks. In some embodiments, technologies and / or formats including Hyper Text Markup Language (HTML), Extensible Markup Language (XML), etc., are used to represent data exchanged over the network. In addition, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), and Internet Protocol Security (IPsec) can be used to encrypt all or some of the links. In other embodiments, custom and / or dedicated data communication technologies can be used to replace or supplement the aforementioned data communication technologies.
[0088] It is worth noting that the application scenarios described in the embodiments of this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of the present invention, and do not constitute a limitation on the technical solutions provided by the embodiments of the present invention. As those skilled in the art will know, with the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0089] Figure 2 A flowchart of a resource adjustment method provided in this application embodiment is applied to... Figure 1 The first component 100 is shown, and the method includes the following steps.
[0090] In step 201, for any failed transaction data, the transaction data is repaired based on the failure reason contained in the transaction data.
[0091] Among them, failed transaction data refers to transaction records that failed to be successfully credited during cross-system transaction processing due to incorrect customer information, abnormal transaction information, or system integration issues. For example, expired customer documents may cause identity verification failure, or the currency field in the transaction message may be missing, resulting in the inability to identify the amount. Transaction data for such failed crediting transactions can be written into the landing transaction information table. The first component can periodically retrieve failed transaction data from the landing transaction information table.
[0092] In practice, the transaction data includes reasons for failure, such as incorrect customer name, incorrect account, incorrect currency, incorrect exchange rate, incorrect counterparty information, or garbled characters in the transaction description or other key information.
[0093] Therefore, failures can be pre-categorized based on their causes. For example, the failure reasons can be divided into three categories: Category 1, Category 2, and Category 3. Category 1 represents customer information errors, such as incorrect customer name, incorrect account number, incorrect ID number, incorrect ID type, incorrect organization code, or abnormal customer management status. Category 2 represents transaction information errors, such as incorrect transaction currency, incorrect exchange rate, incorrect amount received, or incorrect counterparty information. Category 3 represents other failure reasons, such as garbled characters in the transaction description or other key information.
[0094] Different failure cause categories correspond to different repair strategies, and multiple correspondences between failure cause categories and repair strategies can be pre-built.
[0095] In practice, when repairing transaction data based on the failure reasons contained in the transaction data, the failure reason category can be determined; from the pre-saved correspondence between various failure reason categories and repair strategies, the target repair strategy corresponding to the failure reason category can be selected; and the target repair strategy can be used to repair the transaction data.
[0096] In practice, when the failure reason category is customer information error, the corresponding repair strategy is to query the correct customer information corresponding to the first account from the customer information record, and use the queried customer information to correct the customer information in the transaction data.
[0097] For example, customer A's account is Account A. A cross-border remittance transaction for Account A fails because customer A's identification information does not match. Therefore, the failure reason is determined to be customer information error. The corresponding repair strategy for customer information error is to query the correct customer information corresponding to the first account from the customer information record, and use the queried customer information to correct the customer information in the transaction data. Therefore, the customer information corresponding to Account A can be queried from the customer information record. For example, the queried customer information includes: Account name: Account A; Customer name: Xiaoming; Customer identity type: ID card; ID card number: XXX…XXXX; ID card validity period: October 1, 2030. The first component determines that the identification information in the queried customer information is valid and correct, and then replaces the incorrect identification information in the transaction data with the queried identification information to generate the repaired transaction data.
[0098] In practice, when the failure reason category is transaction information error, the corresponding repair strategy is to query the original transaction information from the original transaction record corresponding to the transaction data, and use the queried original transaction information and the transaction information in the corrected transaction data.
[0099] For example, customer B's account is Account B. A payment transaction initiated by Account B through a third-party payment platform cannot be processed by the bank system due to missing currency information. Therefore, the failure is classified as an error in transaction information. The corresponding repair strategy is to query the original transaction information from the original transaction record corresponding to the transaction data. The queried original transaction information is then compared with the transaction information in the corrected transaction data. For example, the transaction data includes: transaction amount: 1000; currency: ""; exchange rate: ""; settlement amount: "", etc. The first component queries the original transaction record (such as the transaction log of the payment gateway) through the transaction code. The original transaction data obtained at the time of initiation includes: transaction amount: 1000; currency: "USD"; exchange rate: "7.2"; settlement amount: "7200", etc. The queried transaction information is then added to the transaction data to generate the repaired transaction data.
[0100] The repair strategy for the third category is to repair the customer information and transaction information in the transaction data in sequence.
[0101] For other reasons for failure, such as garbled characters in the transaction description or other key information, the customer information and transaction information in the transaction data can be repaired sequentially.
[0102] In practice, for cases where the above three repair strategies fail to repair the data, the transaction data can be input into a pre-trained repair model for analysis to obtain repair suggestions output by the model; based on the repair suggestions, the transaction data can be repaired.
[0103] The repair model can be trained using the following steps:
[0104] Obtain a labeled historical transaction failure dataset. The historical transaction failure dataset includes multiple transaction data, where each transaction data includes transaction features and a repair strategy label. The transaction features include customer information and transaction information. The transaction features are preprocessed and then input into the initial repair model. The model parameters are iteratively optimized with the goal of minimizing the repair strategy classification loss function. When the model performance meets the preset convergence condition, training is stopped, and the trained repair model is obtained.
[0105] For example, collect all failed transaction records from the system over the past 1-2 years, especially those successfully repaired manually. Transaction features can include customer information (name, ID number, contact information), transaction information (amount, currency, time, transaction type), and reasons for failure. Since transaction features are diverse in format, they need to be preprocessed, such as data cleaning, normalization, and missing value encoding, to obtain a numerical feature vector that is input into the initial repair model. The repair model can adopt a Transformer BERT-based architecture, using a pre-trained language model to perform semantic understanding of the transaction description, extract contextual features, and then perform classification through fine-tuning. Based on the probability distribution of each repair strategy output by the model, calculate the loss, such as using cross-entropy loss. Perform multiple iterations, backpropagating to update the model parameters. Stop training when the convergence condition is met, such as the loss function changing less than a threshold or reaching the maximum number of training rounds, to obtain the trained repair model.
[0106] In practice, after repairing the transaction data, the number of times the transaction data has been repaired can also be recorded.
[0107] Therefore, before repairing the transaction data based on the failure reasons contained in the transaction data, the current number of repair attempts can be obtained. If the current number of repair attempts does not exceed the preset threshold, the transaction data repair process is performed. If the current number of repair attempts exceeds the preset threshold, the first prompt message is output. The first prompt message is used to prompt the user to manually process the transaction data.
[0108] For example, the preset attempt threshold can be configured, allowing for differentiated thresholds based on different transaction types, customer levels, or failure reasons. For instance: ordinary customer transactions: maximum 3 attempts; high-level customer transactions: maximum 5 attempts; failures involving compliance verification: maximum 2 attempts, etc. Alert messages can be pushed to designated terminals via message queues, alarm platforms, or ticketing systems to ensure timely response. This prevents infinite loop repairs and improves configuration flexibility.
[0109] After the initial notification is submitted to the business personnel, they can process the transaction through a manual processing interface. For example, if the business personnel choose manual transaction, the system will automatically query customer information and display key customer details on the interface for reference and verification. Once the information is filled in, it is submitted for review by the business personnel. After approval, the system will automatically submit the second component to adjust the resource quantity of the first account based on the corrected transaction data. Simultaneously, a third component is activated to adjust transaction entries. A dual-review mechanism can be added to ensure the accuracy of the adjusted data.
[0110] In step 202, the repaired transaction data is sent to the second component, and a successful adjustment notification is received from the second component; the successful adjustment notification is sent by the second component after adjusting the resource quantity of the first account based on the repaired transaction data; the first account is the account involved in the transaction data.
[0111] In practice, the second component is usually the customer account system, which is responsible for the actual increase or decrease of resource quantity (account balance).
[0112] In step 203, based on the adjustment success notification, a transaction entry is generated according to the repaired transaction data; the transaction entry contains an identifier indicating that the transaction was successful.
[0113] After receiving the adjustment success notification from the second component, confirming that the resources have been successfully adjusted, proceed to the next step of generating transaction entries.
[0114] The transaction entry is used to record a complete resource change event, including information such as transaction participants, amount, time, and status, and can be used as a basis for reconciliation, auditing, or user inquiries.
[0115] In step 204, the transaction entry is sent to the third component so that the third component records the transaction entry.
[0116] The third component consists of a transaction record system, a transaction database, an audit log system, and a data warehouse, which are used to store transaction entries and provide services such as reconciliation, auditing, reporting, and user queries.
[0117] In practice, after sending the transaction entry to the third component, a transaction success notification can also be sent to the user terminal associated with the first account. The transaction success notification is used to instruct the user terminal to display a second prompt message. The second prompt message includes: transaction type, amount of resources adjusted, transaction time, and transaction success identifier.
[0118] For example, when a failed payment transaction due to incorrect customer information is repaired and resources are successfully adjusted, the system pushes a notification to the user's mobile app stating: "You have a payment of 1,000.00 yuan that has been successfully processed. Time: 2025-09-06 12:00, Status: Successful." This notification can increase user trust in the system's automatic repair capabilities and improve the service experience.
[0119] In this way, by automatically processing failed transaction data, errors that are prone to occur during manual accounting operations are greatly avoided, thus protecting accounting consistency. Automated processing improves processing efficiency and enhances the accuracy of accounting operations.
[0120] Figure 3 The interactive flowchart of a resource adjustment method provided in this application embodiment includes a first component, a second component, and a third component.
[0121] In step 301, the first component performs repair processing on the transaction data for any failed transaction based on the failure reason contained in the transaction data.
[0122] In step 302, the first component sends the repaired transaction data to the second component.
[0123] In step 303, the second component adjusts the resource quantity of the first account based on the repaired transaction data sent by the first component.
[0124] In step 304, when the second component determines that the adjustment is successful, it sends an adjustment success notification to the first component.
[0125] In step 305, the first component generates a transaction entry based on the adjustment success notification and the repaired transaction data. The transaction entry contains an identifier indicating that the transaction was successful.
[0126] In step 306, the first component sends the transaction entry to the third component.
[0127] In step 307, the third component records the transaction entry.
[0128] Figure 4 A flowchart of another resource adjustment method provided in an embodiment of this application is applied to a first component, and the method includes the following steps.
[0129] In step 401, for any failed transaction data, the current number of repair attempts for the transaction data is obtained.
[0130] In step 402, it is determined whether the current number of repairs has not exceeded the preset number threshold. If so, proceed to step 403; otherwise, proceed to step 412.
[0131] In step 403, the failure reason category to which the failure reason belongs is determined based on the failure reasons contained in the transaction data.
[0132] The failure reason categories include Category 1, Category 2, and Category 3. Category 1 is used to indicate errors in customer information in the transaction data, Category 2 is used to indicate errors in transaction information in the transaction data, and Category 3 is used to indicate other errors.
[0133] In step 404, the target repair strategy corresponding to the failure cause category is selected from the pre-saved correspondence between various failure cause categories and repair strategies.
[0134] The repair strategy for the first category is to query the correct customer information corresponding to the first account from the customer information records and use the queried customer information to correct the customer information in the transaction data.
[0135] The repair strategy for the second category is to query the original transaction information from the original transaction records corresponding to the transaction data, and then use the queried original transaction information and the transaction information in the corrected transaction data.
[0136] The repair strategy for the third category is to repair the customer information and transaction information in the transaction data in sequence.
[0137] In step 405, a target repair strategy is adopted to repair the transaction data, and the number of times the transaction data is repaired is recorded.
[0138] In step 406, it is determined whether the transaction data repair result is successful. If yes, proceed to step 409; otherwise, proceed to step 407.
[0139] In step 407, the transaction data is input into the pre-trained repair model for analysis to obtain repair suggestions output by the repair model.
[0140] In step 408, based on the repair suggestions, the transaction data is repaired, and the number of times the transaction data is repaired is recorded.
[0141] Since the number of times the transaction data was repaired was recorded after the target repair strategy was adopted, and if the transaction data repair result was determined to be unsuccessful, and the transaction data was repaired again based on the repair suggestion, the number of times the transaction data was repaired was recorded again. Therefore, at this time, the number of times the transaction data was repaired is 2.
[0142] In step 409, the repaired transaction data is sent to the second component, and a successful adjustment notification is received from the second component; the successful adjustment notification is sent by the second component after adjusting the resource quantity of the first account based on the repaired transaction data; the first account is the account involved in the transaction data.
[0143] In step 410, based on the adjustment success notification, a transaction entry is generated according to the repaired transaction data; the transaction entry contains an identifier indicating that the transaction was successful.
[0144] In step 411, the transaction entry is sent to the third component so that the third component records the transaction entry.
[0145] In step 412, a first prompt message is output, which is used to prompt the user to manually process the transaction data.
[0146] Based on the same inventive concept, embodiments of this application provide a resource adjustment device, please refer to... Figure 5 The device includes:
[0147] Repair module 501 is used to repair transaction data for any failed transaction based on the failure reason contained in the transaction data;
[0148] The first sending module 502 is used to send the repaired transaction data to the second component and receive an adjustment success notification returned by the second component; the adjustment success notification is sent by the second component after adjusting the resource quantity of the first account according to the repaired transaction data; the first account is the account involved in the transaction data;
[0149] The generation module 503 is used to generate a transaction entry based on the adjustment success notification and the repaired transaction data; the transaction entry contains an identifier indicating that the transaction was successful.
[0150] The second sending module 504 is used to send the transaction entry to the third component so that the third component records the transaction entry.
[0151] In some embodiments, the repair module 501 is specifically used for:
[0152] Determine the failure reason category to which the failure reason belongs;
[0153] From the pre-saved correspondence between various failure cause categories and repair strategies, select the target repair strategy corresponding to the failure cause category;
[0154] The target repair strategy is used to repair the transaction data.
[0155] In some embodiments, the failure reason categories include a first category, a second category, and a third category;
[0156] The first category is used to indicate that the customer information in the transaction data is incorrect; the repair strategy corresponding to the first category is: to query the correct customer information corresponding to the first account from the customer information record, and to use the queried customer information to correct the customer information in the transaction data.
[0157] The second category is used to indicate that the transaction information in the transaction data is incorrect; the repair strategy corresponding to the second category is: query the original transaction information from the original transaction record corresponding to the transaction data, and use the queried original transaction information to correct the transaction information in the transaction data;
[0158] The repair strategy corresponding to the third category is to repair the customer information and the transaction information in the transaction data in sequence.
[0159] In some embodiments, after the repair module 501 performs repair processing on the transaction data using the target repair strategy, it is further configured to:
[0160] If the transaction data repair process fails, the transaction data is input into a pre-trained repair model for analysis to obtain repair suggestions output by the repair model.
[0161] Based on the repair suggestions, the transaction data was repaired.
[0162] In some embodiments, the repair model is trained through the following steps:
[0163] Obtain a labeled historical transaction failure dataset; the historical transaction failure dataset includes multiple transaction data, wherein each transaction data includes transaction features and a repair strategy label, and the transaction features include customer information and transaction information;
[0164] The transaction features are preprocessed, and the preprocessed transaction features are input into the initial repair model. The model parameters are iteratively optimized with the goal of minimizing the classification loss function of the repair strategy.
[0165] Training stops when the model performance meets the preset convergence condition, and the trained repair model is obtained.
[0166] In some embodiments, it also includes:
[0167] Recording module 505 is used to record the number of times the transaction data has been repaired;
[0168] Before the repair module 501 repairs the transaction data based on the failure reasons contained in the transaction data, the recording module 505 is further configured to:
[0169] Obtain the current number of repair attempts for the transaction data. If the current number of repair attempts does not exceed a preset threshold, then perform repair processing on the transaction data.
[0170] If the current number of repairs exceeds the preset threshold, a first prompt message is output; the first prompt message is used to prompt the user to manually process the transaction data.
[0171] In some embodiments, after the second sending module 504 sends the transaction entry to the third component, it is further configured to:
[0172] A transaction success notification is sent to the user terminal associated with the first account; the transaction success notification is used to instruct the user terminal to display a second prompt message; the second prompt message includes: transaction type, adjusted resource quantity, transaction time, and transaction success identifier.
[0173] Based on the same inventive concept, this application provides an electronic device that can realize the function of the resource adjustment device described above. Please refer to... Figure 6 , Figure 6 The electronic device 130 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0174] like Figure 6 As shown, the electronic device 130 is presented in the form of a general-purpose electronic device. The components of the electronic device 130 may include, but are not limited to: at least one processor 131, at least one memory 132, and a bus 133 connecting different system components (including memory 132 and processor 131).
[0175] Bus 133 represents one or more of several bus structures, including a memory bus or memory controller, peripheral bus, processor, or local bus using any of the various bus structures.
[0176] The memory 132 may include a readable medium in the form of volatile memory, such as random access memory (RAM) 1321 and / or cache memory 1322, and may further include read-only memory (ROM) 1323.
[0177] The memory 132 may also include a program / utility 1325 having a set (at least one) of program modules 1324, including but 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.
[0178] Electronic device 130 can also communicate with one or more external devices 134 (e.g., keyboard, pointing device, etc.), and with one or more devices that enable a user to interact with electronic device 130, and / or with any device that enables electronic device 130 to communicate with one or more other electronic devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 135. Furthermore, electronic device 130 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 136. As shown, network adapter 136 communicates with other modules used in electronic device 130 via bus 133. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 130, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0179] Based on the same inventive concept, embodiments of this application provide a storage medium that, when a computer program stored in the storage medium is executed by a processor of an electronic device, enables the electronic device to perform the aforementioned resource adjustment method. Since the principle by which the storage medium solves the problem is similar to that of the resource adjustment method, the implementation of the storage medium can be found in the implementation of the method, and repeated details will not be elaborated further.
[0180] Based on the same inventive concept, this application also provides a computer program product. When the computer program product is executed by an electronic device, the electronic device can implement any of the resource adjustment methods provided in this application. Since the principle of solving the problem by the above-mentioned computer program product is similar to that of the resource adjustment method, the implementation of the above-mentioned computer program product can refer to the implementation of the method, and repeated details will not be described again.
[0181] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0182] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0183] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0184] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of user-operated steps to be executed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0185] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A resource adjustment method, characterized in that, Applied to the first component, the method includes: For any failed transaction data, repair processing is performed on the transaction data based on the failure reason contained in the transaction data; The repaired transaction data is sent to the second component, and a success notification of adjustment is received from the second component; the success notification is sent by the second component after adjusting the resource quantity of the first account based on the repaired transaction data; the first account is the account involved in the transaction data; Based on the adjustment success notification, a transaction entry is generated according to the repaired transaction data; the transaction entry contains an identifier indicating that the transaction was successful. The transaction entry is sent to a third component so that the third component records the transaction entry.
2. The method as described in claim 1, characterized in that, The process of repairing the transaction data based on the failure reasons contained in the transaction data includes: Determine the failure reason category to which the failure reason belongs; From the pre-saved correspondence between various failure cause categories and repair strategies, select the target repair strategy corresponding to the failure cause category; The target repair strategy is used to repair the transaction data.
3. The method as described in claim 2, characterized in that, The failure reason categories include a first category, a second category, and a third category; The first category is used to indicate that the customer information in the transaction data is incorrect; the repair strategy corresponding to the first category is: to query the correct customer information corresponding to the first account from the customer information record, and to use the queried customer information to correct the customer information in the transaction data. The second category is used to indicate that the transaction information in the transaction data is incorrect; the repair strategy corresponding to the second category is: query the original transaction information from the original transaction record corresponding to the transaction data, and use the queried original transaction information to correct the transaction information in the transaction data; The repair strategy corresponding to the third category is to repair the customer information and the transaction information in the transaction data in sequence.
4. The method as described in claim 2, characterized in that, After repairing the transaction data using the target repair strategy, the process further includes: If the transaction data repair process fails, the transaction data is input into a pre-trained repair model for analysis to obtain repair suggestions output by the repair model. Based on the repair suggestions, the transaction data was repaired.
5. The method as described in claim 4, characterized in that, The repair model is trained using the following steps: Obtain a labeled historical transaction failure dataset; the historical transaction failure dataset includes multiple transaction data, wherein each transaction data includes transaction features and a repair strategy label, and the transaction features include customer information and transaction information; The transaction features are preprocessed, and the preprocessed transaction features are input into the initial repair model. The model parameters are iteratively optimized with the goal of minimizing the classification loss function of the repair strategy. Training stops when the model performance meets the preset convergence condition, and the trained repair model is obtained.
6. The method as described in claim 1, characterized in that, After repairing the transaction data, the process further includes: Record the number of times the transaction data has been repaired; Before repairing the transaction data based on the failure reasons contained in the transaction data, the process further includes: Obtain the current number of repair attempts for the transaction data. If the current number of repair attempts does not exceed a preset threshold, then perform repair processing on the transaction data. If the current number of repairs exceeds the preset threshold, a first prompt message is output; the first prompt message is used to prompt the user to manually process the transaction data.
7. The method as described in claim 1, characterized in that, After sending the transaction entry to the third component, the process further includes: A transaction success notification is sent to the user terminal associated with the first account; the transaction success notification is used to instruct the user terminal to display a second prompt message; the second prompt message includes: transaction type, adjusted resource quantity, transaction time, and transaction success identifier.
8. A resource adjustment device, characterized in that, Configured in the first component, the device includes: The repair module is used to repair the transaction data for any failed transaction based on the reasons for failure contained in the transaction data. The first sending module is used to send the repaired transaction data to the second component and receive the adjustment success notification returned by the second component; the adjustment success notification is sent by the second component after adjusting the resource quantity of the first account according to the repaired transaction data; the first account is the account involved in the transaction data; The generation module is used to generate transaction entries based on the adjustment success notification and the repaired transaction data; the transaction entries include an identifier indicating successful transaction. The second sending module is used to send the transaction entry to the third component so that the third component records the transaction entry.
9. The apparatus as claimed in claim 8, characterized in that, The repair module is specifically used for: Determine the failure reason category to which the failure reason belongs; From the pre-saved correspondence between various failure cause categories and repair strategies, select the target repair strategy corresponding to the failure cause category; The target repair strategy is used to repair the transaction data.
10. The apparatus as claimed in claim 9, characterized in that, The failure reason categories include a first category, a second category, and a third category; The first category is used to indicate that the customer information in the transaction data is incorrect; the repair strategy corresponding to the first category is: to query the correct customer information corresponding to the first account from the customer information record, and to use the queried customer information to correct the customer information in the transaction data. The second category is used to indicate that the transaction information in the transaction data is incorrect; the repair strategy corresponding to the second category is: query the original transaction information from the original transaction record corresponding to the transaction data, and use the queried original transaction information to correct the transaction information in the transaction data; The repair strategy corresponding to the third category is to repair the customer information and the transaction information in the transaction data in sequence.
11. The apparatus as claimed in claim 9, characterized in that, After the repair module uses the target repair strategy to repair the transaction data, it is further used for: If the transaction data repair process fails, the transaction data is input into a pre-trained repair model for analysis to obtain repair suggestions output by the repair model. Based on the repair suggestions, the transaction data was repaired.
12. The apparatus as claimed in claim 11, characterized in that, The repair model is trained using the following steps: Obtain a labeled historical transaction failure dataset; the historical transaction failure dataset includes multiple transaction data, wherein each transaction data includes transaction features and a repair strategy label, and the transaction features include customer information and transaction information; The transaction features are preprocessed, and the preprocessed transaction features are input into the initial repair model. The model parameters are iteratively optimized with the goal of minimizing the classification loss function of the repair strategy. Training stops when the model performance meets the preset convergence condition, and the trained repair model is obtained.
13. An electronic device, characterized in that, include: At least one processor, and a memory communicatively connected to said at least one processor, wherein: The memory stores a computer program that can be executed by the at least one processor to enable the at least one processor to perform the method as described in any one of claims 1-7.
14. A storage medium, characterized in that, When the computer program in the storage medium is 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-7.
15. A computer program product, characterized in that, When the computer program product is invoked and executed by an electronic device, the electronic device performs the method as described in any one of claims 1-7.