Business processing method and device and electronic equipment
By determining the target control parameters in the use of historical data and control rules in the business processing system, distinguish the business request category, solve the problem of unilateral accounts and routing routines when multi -component processing business, and improve the consistency of data processing.
Patent Information
- Application Number
- CN202411327570.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-09-23
AI Technical Summary
In the trading system of financial institutions, when multiple components process business, if some components fail to process, a unilateral account is likely to form, resulting in the problem of blockage of unilateral account and inconsistent business data processing.
By obtaining the target of the historical business request of the historical business request in the historical time period, the target control parameters of the target routing data association, including the positive threshold and the target processing conditions, and then the business processing In the system, distinguish the first and second business requests, and give priority to the first type of business request to reduce the number of unilateral accounts.
The number of unilateral accounts is reduced, the unilateral lumps are avoided, and the consistency of business data processing is improved.
Smart Images

Figure CN119376822A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a business processing method, device and electronic device. Background Art
[0002] In the transaction system of a financial institution, if a business is completed by multiple components, the components communicate and cooperate with each other through interfaces. One component is used to create and maintain a specific business. After receiving a business request, the component can distribute it to other components for processing.
[0003] Currently, if a component used to create and maintain business among multiple components successfully processes the business, while other components fail to process the business, it is easy to form a one-sided account. If there are a large number of one-sided accounts, it is easy to cause a blockage in the correction of the one-sided accounts, resulting in a high proportion of inconsistent business data processing. Summary of the invention
[0004] The embodiments of the present application provide a business processing method, device and electronic device to solve the problem of a high proportion of inconsistent business data processing caused by the existence of a large number of unilateral accounts.
[0005] A first aspect of the present application provides a business processing method, which is applied to a business processing system. The business processing system includes: a first component and a second component. The business processing method includes: using the first component to perform the following steps;
[0006] Obtain target reversal data and preconfigured control rules for the second component processing historical business requests within a historical time period;
[0007] Determine the target control parameter associated with the target reversal data according to the association relationship between the reversal data and the control parameter indicated by the control rule, the target control parameter including the reversal threshold and the target processing condition;
[0008] Get multiple business requests sent by application components;
[0009] If the total number of the multiple business requests is less than the reversal threshold, it is determined that the multiple business requests are all first-category business requests to be processed;
[0010] If the total number of the multiple business requests is greater than or equal to the reversal threshold, the business requests that meet the target processing conditions are determined to be the first type of business requests to be processed among the multiple business requests;
[0011] The first type of service request is sent to the second component to instruct the second component to process the first type of service request.
[0012] In one embodiment of the present application, the target processing condition includes: a traffic threshold; determining a business request that meets the target processing condition among multiple business requests as a first-class business request to be processed, including: determining a business request whose traffic is less than the traffic threshold among multiple business requests as a first-class business request.
[0013] In one embodiment of the present application, the target processing conditions include: a target business identifier, the number of historical business requests to be corrected corresponding to the target business identifier is greater than a first preset threshold, and the business requests that meet the target processing conditions are determined to be first-category business requests to be processed among multiple business requests, including: among multiple business requests, determining the first business identifier of each business request; among multiple business requests, determining that the business request whose first business identifier is different from the target business identifier is a first-category business request.
[0014] In one embodiment of the present application, the control parameter further includes: a target application component identifier, the number of historical business requests to be reversed sent by the target application component corresponding to the target application component identifier is greater than a second preset threshold, and determining that a business request that meets the target processing condition is a first type of business request to be processed among multiple business requests includes:
[0015] Determine, among multiple service requests, a first application component identifier of an application component from which each service request comes;
[0016] Among the multiple service requests, the service request whose first application component identifier is different from the target application component identifier is determined to be a first-category service request.
[0017] In one embodiment of the present application, it also includes:
[0018] Determining, among the multiple service requests, service requests other than the first-category service requests as second-category service requests;
[0019] A prompt message is returned to the application component that sent the second type of service request, where the prompt message is used to indicate that the request failed.
[0020] In one embodiment of the present application, the business processing system further includes a third component, and the business processing method further includes: using the third component to perform the following steps:
[0021] When the second component fails to process the business request, a reversal request is sent to the second component, the reversal request including: a synchronous reversal request and / or an asynchronous reversal request;
[0022] receiving a reversal result returned by the second component in response to the reversal request;
[0023] Sending a correction result to the first component, the correction result includes: correction failure or correction success.
[0024] In one embodiment of the present application, the reversal data includes: at least one of the reversal ratio, the reversal failure ratio, the reversal number and the reversal failure number, and the reversal ratio, the reversal failure ratio, the reversal number and the reversal failure number correspond to different reversal thresholds respectively.
[0025] A second aspect of the present application provides a service processing device, which is applied to a service processing system. The service processing system includes: a first component and a second component. The service processing device includes: the following modules deployed in the first component:
[0026] A first acquisition module is used to obtain target reversal data and pre-configured control rules for processing historical business requests by the second component within a historical time period;
[0027] A first determination module, for determining target control parameters associated with target reversal data according to the association relationship between the reversal data and the control parameters indicated by the control rule, wherein the target control parameters include a reversal threshold and a target processing condition;
[0028] A second acquisition module is used to acquire multiple business requests sent by the application component;
[0029] A second determination module is used to determine that the multiple business requests are all first-category business requests to be processed if the total number of the multiple business requests is less than the reversal threshold;
[0030] A third determination module is used to determine, if the total number of the multiple business requests is greater than or equal to the reversal threshold, the business requests that meet the target processing condition among the multiple business requests as the first type of business requests to be processed;
[0031] The sending module is used to send the first type of business request to the second component to instruct the second component to process the first type of business request.
[0032] In one embodiment of the present application, the target processing condition includes: a traffic threshold; and a third determination module, which is specifically used to determine, among multiple service requests, that a service request with a traffic volume less than the traffic threshold is a first-category service request.
[0033] In one embodiment of the present application, the target processing condition includes: a target service identifier, the number of historical service requests to be corrected corresponding to the target service identifier is greater than a first preset threshold, and the third determination module is specifically used to:
[0034] Determine a first service identifier of each service request among multiple service requests;
[0035] Among the multiple service requests, it is determined that the service request whose first service identifier is different from the target service identifier is a first-category service request.
[0036] In one embodiment of the present application, the target processing condition includes: a target application component identifier, the number of historical service requests to be reversed sent by the target application component corresponding to the target application component identifier is greater than a second preset threshold, and the third determination module is specifically used to:
[0037] Determine, among multiple service requests, a first application component identifier of an application component from which each service request comes;
[0038] Among the multiple service requests, the service request whose first application component identifier is different from the target application component identifier is determined to be a first-category service request.
[0039] In one embodiment of the present application, the method further includes: a fourth determining module configured to:
[0040] Determining, among the multiple service requests, service requests other than the first-category service requests as second-category service requests;
[0041] A prompt message is returned to the application component that sent the second type of service request, where the prompt message is used to indicate that the request failed.
[0042] In one embodiment of the present application, the business processing system further includes a third component, a business processing device, and further includes: the following modules deployed in the third component:
[0043] A sending module, used for sending a reversal request to the second component when the second component fails to process the business request, the reversal request including: a synchronous reversal request and / or an asynchronous reversal request;
[0044] A receiving module, used for receiving a reversal result returned by the second component in response to the reversal request;
[0045] The sending module is also used to send the correction result to the first component, and the correction result includes: correction failure or correction success.
[0046] In one embodiment of the present application, the reversal data includes: at least one of the reversal ratio, the reversal failure ratio, the reversal number and the reversal failure number, and the reversal ratio, the reversal failure ratio, the reversal number and the reversal failure number correspond to different reversal thresholds respectively.
[0047] It can be seen from the above technical scheme that the embodiment of the present application obtains the target reversal data and pre-configured control rules for processing historical business requests by the second component within the historical time period; determines the target control parameters associated with the target reversal data according to the association relationship between the reversal data and the control parameters indicated by the control rules, and the target control parameters include a reversal threshold and a target processing condition; obtains multiple business requests sent by the application component; if the total number of multiple business requests is less than the reversal threshold, determines that the multiple business requests are all first-class business requests to be processed; if the total number of multiple business requests is greater than or equal to the reversal threshold, determines that the business requests that meet the target processing conditions are the first-class business requests to be processed among the multiple business requests; sends the first-class business request to the second component to instruct the second component to process the first-class business request, which can reduce the number of unilateral accounts, thereby avoiding congestion in unilateral account reversal and reducing the proportion of inconsistent business data processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. It is obvious that the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0049] Figure 1 It is a schematic diagram of an application scenario of the business processing method provided by this application;
[0050] Figure 2 It is a flowchart of a business processing method provided by an embodiment of the present application;
[0051] Figure 3 is a flowchart of another business processing method provided by an embodiment of the present application;
[0052] Figure 4 is a flowchart of another business processing method provided by an embodiment of the present application;
[0053] Figure 5 is a structural block diagram of a service processing device provided by an embodiment of the present application;
[0054] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0055] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0056] In the technical solution of this application, the collection, storage, use, processing, transmission, provision and disclosure of information such as financial data or user data involved shall comply with the provisions of relevant laws and regulations and shall not violate public order and good morals.
[0057] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0058] The principles and spirit of the present application are explained in detail below with reference to several representative implementations of the present application.
[0059] A component is a self-contained functional processing unit that can complete one or more functions and expose its services through interfaces. Components can be independently deployed, reused, and replaced. Componentization means that based on the purpose of component reuse, a business processing system is split into multiple independent components in the form of separation of concerns in accordance with the principles of high cohesion and loose coupling. Components communicate through interfaces and collaborate with each other to form an organic whole. The idea of componentization is to divide and conquer and decouple, divide and conquer complex business processing systems to reduce coupling. In a componentized architecture, a specific business is created and maintained by a unique component, and closely related business entities are cohesive in the same component.
[0060] When using the accounting engine for accounting, each component only needs to focus on its own component part. For cross-component transactions, they are accounted for through cross-component transactions. If a single component cannot meet business needs, the caller can combine multiple components to support specific business scenarios. For complex and diverse banking services, regardless of whether they are componentized, a specific function will use the services of other systems or components to handle specific business. Therefore, in the scenario of component combination, ensuring business consistency becomes the primary business requirement. In the component combination scenario, when a transaction of a component fails, common processing methods include: using a single business reversal process to ensure business consistency, but when a large-scale unilateral account appears, a large-scale reversal request will be sent, resulting in a reversal blockage, and ultimately a reversal failure, causing business inconsistency.
[0061] Based on the above problems, the present application provides a business processing method, which obtains the target reversal data and pre-configured control rules for processing historical business requests by a second component within a historical time period; determines the target control parameters associated with the target reversal data according to the association relationship between the reversal data and the control parameters indicated by the control rules, and the target control parameters include a reversal threshold and a target processing condition; obtains multiple business requests sent by an application component; if the total number of multiple business requests is less than the reversal threshold, determines that the multiple business requests are all first-class business requests to be processed; if the total number of multiple business requests is greater than or equal to the reversal threshold, determines that the business requests that meet the target processing conditions are the first-class business requests to be processed among the multiple business requests; sends the first-class business request to the second component to instruct the second component to process the first-class business request, which can reduce the number of unilateral accounts, thereby avoiding congestion in unilateral account reversal and reducing the proportion of inconsistent business data processing.
[0062] refer to Figure 1 , which is an application scenario diagram of the business processing method provided in this application, Figure 1 It includes: a business processing system 10 and an application component (application or application component), such as Figure 1 The business processing system 10 includes application component 1, application component 2 and application component 3, and includes: a first component, a second component, a third component and an intermediate component. Among them, the first component is used to receive business requests sent by different application components, and then after successfully processing the business request, the first component sends the business request to the second component through the intermediate component and the third component for processing. After the second component successfully processes the request, it returns the information of successful processing to the first component. When the third component determines that the second component processes the business request abnormally, it sends a correction request to the second component and receives the correction result sent by the second component. The third component returns the correction result to the first component through the intermediate component. After receiving the correction result, the first component can count the correction results and the information of successful processing of the business request within a period of time in real time to obtain the correction data. The first component can then perform flow control through the correction data.
[0063] After introducing the basic principles of the present application, various non-limiting implementation methods of the present application are described in detail below.
[0064] First, the explanations of the relevant terms appearing in this application are introduced as follows:
[0065] Business data processing consistency: A business request requires multiple components to process, and multiple components can process successfully or fail to process, which is business data processing consistency.
[0066] Unilateral account: A business requires multiple components to process, among which some components are processed successfully and some components fail to process, which is a unilateral account.
[0067] Reversal: If a one-sided account occurs, instruct the component that failed to process the business request to reprocess the business request or cancel the processing of the business request. If the processing of the business request is canceled, the component that failed to process the business request replies to the component that successfully processed the business to cancel the successfully processed business. A successful reversal can also achieve business consistency, while a failed reversal is considered inconsistent business data processing.
[0068] For example, during the transfer process, the application component deployed on the terminal sends a transfer request to component a, requesting to transfer 10,000 from account x to account y. Component a is used to receive the transfer request and process the transfer request. The processing process is to deduct 10,000 from account x. Then component a sends a transfer request to component b, and component b processes the transfer request to add 10,000 to account y. Among them, if component b successfully adds 10,000 to account y, both component a and component b successfully process the business request and achieve business consistency. If component b fails to successfully add 10,000 to account y, a unilateral account problem occurs. In response to the unilateral account problem, another component c discovers the unilateral account problem and sends a reversal request to component b, instructing component b to reprocess the business request. If the business request is successfully processed, the reversal is successful and business consistency is achieved. If the business request fails to be processed, the reversal fails, which is inconsistent business data processing. If the reversal request instructs component b to cancel the processing of the business request, and component b has not canceled the processing of the business request, then b is still in the process of processing the business request (if the business request cannot be successfully processed, the reversal fails), and the business data processing is still inconsistent. If the reversal request instructs component b to cancel the processing of the business request, and component b cancels the processing of the business request, and component b instructs component a to cancel the successfully processed business request (component a will add the deducted 10,000 back to account x), then the reversal is successful and business consistency is achieved.
[0069] The technical solution of the present application is described in detail below through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0070] Reference Figure 2 , is a flowchart of the steps of a business processing method provided by an embodiment of the present application, and the business processing method is applied to Figure 1 The business processing system shown includes: a first component and a second component, and the business processing method includes: using the first component to perform the following steps:
[0071] S201, obtaining target reversal data and pre-configured control rules for processing historical business requests by the second component within a historical time period.
[0072] The reversal data indicates the business processing capability and reversal processing capability of the second component.
[0073] In the embodiment of the present application, the historical time period is preset, such as the correction data within 10 minutes. The correction data includes: at least one of the correction ratio, the correction failure ratio, the correction number and the correction failure number. It can be understood that the higher the correction ratio, the higher the correction failure ratio, the higher the correction number or the correction failure number, the weaker the business processing capability of the second component.
[0074] Further, the historical business request is a business request processed by the second component within a historical time period, and the second component processes the historical business request successfully or fails.
[0075] For example, refer to Figure 2 , the first component sends 100 historical business requests to the second component within 10 minutes from the current time, of which 70 historical business requests are successfully processed by the second component, and 30 historical business requests are failed to be processed by the second component. Furthermore, among the 30 historical business requests that failed to be processed, 20 historical business requests are successfully reconciled, and 10 historical business requests are failed to be reconciled. Then the reconciliation ratio is 0.3, the reconciliation failure ratio is 1 / 3, the number of reconciliations is 30, and the number of reconciliation failures is 10.
[0076] It can be understood that obtaining the reversal data of the second component within the historical time period includes: within the historical time period, the first component sends multiple historical business requests to the second component, and receives the processing success information returned by the second component for some historical business requests, and also receives the reversal results returned by the third component for the historical business requests to be reversed, and then the first component counts the reversal data based on the processing success information and the reversal results.
[0077] Furthermore, the reversal data is a statistical analysis of the reversal results of the second component in the historical time period. The reversal data includes at least one of a reversal ratio, a reversal failure ratio, a reversal quantity, and a reversal failure quantity.
[0078] The correction ratio is the ratio of the number of failed business requests to the total number of processed business requests. The correction failure ratio is the ratio of the number of failed business requests to the total number of corrected business requests.
[0079] Furthermore, each business request carries a corresponding business identifier and an application component identifier. Correspondingly, the reversal result corresponds to the business identifier and the application component identifier. Then, the reversal data can be determined based on the business identifier and / or the application component identifier as a dimension.
[0080] For example, there are 10 business requests, namely business request p1, business request p2, business request p3, ..., business request p10. Among them, business request p1 to business request p5 come from application component 1, business request p6 to business request p10 come from application component 2, application request p1 to business request p3 correspond to business s1 (such as transfer business), and application request p4 to business request p10 correspond to business s2 (such as loan business). Further, business request p3 to business request p8 are processed successfully, business request p1, business request p2, business request p9 and business request p10 are processed unsuccessfully, and business request p1, business request p2 and business request p10 are reversed successfully, and business request p9 is reversed unsuccessfully. In summary, it can be obtained that the reversal ratio corresponding to application component 1 is 2 / 5, the reversal failure ratio is 0, the reversal quantity is 2, and the reversal failure quantity is 0. The reversal ratio corresponding to application component 2 is 2 / 5, the reversal failure ratio is 1 / 2, the reversal quantity is 2, and the reversal failure quantity is 1. The reversal ratio for business s1 is 2 / 3, the reversal failure ratio is 0, the reversal quantity is 2, and the reversal failure quantity is 0. The reversal ratio for business s2 is 2 / 7, the reversal failure ratio is 1 / 2, the reversal quantity is 2, and the reversal failure quantity is 1.
[0081] In one embodiment, at least one of the total correction ratio, the correction failure ratio, the correction quantity and the correction failure quantity can be calculated. Referring to the above example, the total correction ratio is 4 / 10, the correction failure ratio is 1 / 4, the correction quantity is 3, and the correction failure quantity is 1.
[0082] Furthermore, the present application may pre-configure a control rule in the first component, where the control rule is used to indicate an association relationship between the reversal data and the control parameter.
[0083] Specifically, the control rule includes at least one of the following: (1) whether to determine the control parameter based on the business identifier; (2) the method of determining the traffic threshold; (3) whether to return a prompt message for unprocessed transaction requests; (4) the method of determining the reversal data. (4) The initial value of the control parameter. In addition, the control rule also includes other contents, which are not listed here one by one. In an embodiment of the present application, the control rule is used to specify the content of the obtained reversal data, and to determine the control parameters based on the reversal data, and the control parameters are used to control the first component to perform flow control on the business request.
[0084] For example, the control rule indicates to obtain the reversal ratio (such as 0.3) in the reversal data, and the control rule includes: the correlation relationship between the reversal ratio and the reversal threshold, for example, the reversal threshold corresponding to the reversal ratio of 0.3 is 0.4.
[0085] S202, determining a target control parameter associated with the target reversal data according to the association relationship between the reversal data and the control parameter indicated by the control rule.
[0086] Furthermore, the target control parameters include a reversal threshold and a target processing condition; wherein the target processing condition includes at least one of a traffic threshold, a target service identifier, and a target application component identifier.
[0087] In an embodiment of the present application, the control rules may stipulate that the correction ratio, the correction failure ratio, the correction number and the correction failure number are respectively negatively correlated with the corresponding correction thresholds, that is, the higher the correction ratio, the correction failure ratio, the correction number and the correction failure number, it can be understood that the ability of the second component to process business requests is weaker, and the correction threshold is smaller.
[0088] Furthermore, the correction ratio, correction failure ratio, correction quantity and correction failure quantity correspond to different correction thresholds. For example, the correction threshold z1 corresponds to the target correction ratio included in the target correction data, the correction threshold z2 corresponds to the target correction failure ratio included in the target correction data, the correction threshold z3 corresponds to the target correction quantity included in the target correction data, and the correction threshold z4 corresponds to the target correction failure quantity included in the target correction data.
[0089] It can be understood that the embodiment of the present application determines the correction threshold and target processing conditions based on the control rules and correction data.
[0090] S203: Acquire multiple service requests sent by the application component.
[0091] The control parameter is used to perform flow control of service requests, wherein flow control refers to the first component selecting a service request to be processed when receiving multiple service requests sent by an application component.
[0092] Furthermore, the application component may be one or more application components. It may also be multiple service requests sent by an application (by multiple application components). Each service request carries a corresponding application component identifier. For example, refer to Figure 1 If the service request is sent by application component 1, the service request carries the identifier "1" of application component 1.
[0093] In the embodiment of the present application, the business includes banking business such as transfer business, deposit business, loan business, etc.
[0094] S204: If the total number of the multiple service requests is less than the reversal threshold, determine that the multiple service requests are all first-category service requests to be processed.
[0095] In an embodiment of the present application, if the total number of business requests is less than the reversal threshold, it can be understood that the second component can efficiently process multiple business requests, and then the multiple business requests can all be determined as first-category business requests.
[0096] S205: If the total number of the multiple service requests is greater than or equal to the reversal threshold, determine the service requests that meet the target processing condition among the multiple service requests as the first type of service requests to be processed.
[0097] It can be understood that when the total number of multiple business requests is greater than or equal to the reversal threshold, the capacity of the second component is insufficient to process all business requests, so some business requests can be determined as first-category business requests to be processed among the multiple business requests.
[0098] Furthermore, a specific way of selecting the first type of service request is to determine whether the service request meets the target processing condition. If so, it can be determined as the first type of service request; if not, it can be determined as the second type of service request.
[0099] In the embodiment of the present application, according to the control parameters, at least some of the service requests are selected from the multiple service requests as first-category service requests to be processed, and the service requests not to be processed are second-category service requests.
[0100] It can be understood that the control parameters are used to perform flow control on the business requests received by the first component. When there is a correction in the second component, the second component can better handle the correction to avoid correction blockage and affect business consistency.
[0101] Furthermore, if the reversal data indicates that the service processing capability of the second component is weak, service requests with smaller traffic or smaller quantity may be selected from multiple service requests for processing by the second component; if the reversal data indicates that the service processing capability of the second component is strong, more service requests may be selected from multiple service requests for processing by the second component.
[0102] S206: Send the first type of service request to the second component to instruct the second component to process the first type of service request.
[0103] In an embodiment of the present application, the first component only sends the first type of business request to the second component, so that the second component processes the first type of business request, thereby realizing flow control of the business request.
[0104] It can be understood that when the correction data indicates that the business processing capability of the second component is weak, sending business requests with smaller traffic or smaller number to the second component can enable the second component to process business requests with smaller traffic or smaller number, which in turn can enable the second component to process a higher proportion of successful business requests, and for business requests that fail to be processed, the second component can also process a higher proportion of successful correction requests.
[0105] For example, the second component can only process 50 business requests and 10 correction requests within 10 minutes. If the current first component receives 100 business requests, if the 100 business requests are sent to the second component within 10 minutes, 50 business requests will fail to be processed, and the failed business requests need to be corrected, of which only 10 business requests are successfully corrected, and the other 40 business requests fail to be corrected. The correction failure will cause business inconsistency. Through this application, 60 business requests can be determined as first-class business requests based on control parameters and correction data, and these 60 first-class business requests are sent to the second component, 50 business requests are successfully processed, and the other 10 business requests that failed to be processed are also successfully processed after correction, ensuring business consistency.
[0106] In summary, the present application obtains the reversal data in real time, determines the control parameters according to the reversal data and control rules, so as to perform flow control on the received business requests, improve the successful processing ratio of business requests, and thus improve the business consistency ratio.
[0107] Furthermore, the present application provides another step flow chart of a business processing method, referring to Figure 3 , specifically including the following steps:
[0108] S301, obtaining target reversal data and pre-configured control rules for processing historical business requests by the second component within a historical time period.
[0109] S302, determining a target control parameter associated with the target reversal data according to the association relationship between the reversal data and the control parameter indicated by the control rule.
[0110] S303: Acquire multiple service requests sent by the application component.
[0111] S304: If the total number of the multiple service requests is less than the reversal threshold, it is determined that the multiple service requests are all first-category service requests to be processed.
[0112] The specific implementation process of steps S301 to S304 refers to S201 to S204 and will not be repeated here.
[0113] S305 , determining, among multiple service requests, that a service request with a flow rate less than a flow rate threshold is a first type of service request.
[0114] The number of historical service requests to be corrected corresponding to the target service identifier is greater than a first preset threshold.
[0115] In the embodiment of the present application, the control rules may specify that the correction ratio, the correction failure ratio, the correction number and the correction failure number have corresponding flow thresholds, respectively, and the correction ratio, the correction failure ratio, the correction number and the correction failure number are negatively correlated with their corresponding flow thresholds. It can be understood that the higher the correction ratio, the correction failure ratio, the correction number and the correction failure number, the weaker the ability of the second component to process business requests. Therefore, when the flow threshold is lower, a business request with a smaller flow rate can be sent to the second component for the second component to process, thereby reducing the probability of the second component's correction failure.
[0116] For example, the target correction ratio corresponds to the flow threshold L1, the target correction failure ratio corresponds to the flow threshold L2, the target correction number corresponds to the flow threshold L3, and the target correction failure number corresponds to the flow threshold L4. Among them, the higher the target correction ratio, the lower the flow threshold L1; the higher the target correction failure ratio, the lower the flow threshold L2. The higher the correction number, the lower the target flow threshold L3. The higher the target correction failure number, the lower the flow threshold L4.
[0117] S306: Determine a first service identifier of each service request among multiple service requests.
[0118] In one embodiment, the control rule may specify that the reversal ratio, the reversal failure ratio, the reversal quantity, and the reversal failure quantity have corresponding first preset threshold values, respectively, and at least one of the reversal ratio, the reversal failure ratio, the reversal quantity, or the reversal failure quantity of the historical business request corresponding to the target business identifier is greater than the first preset threshold value, wherein the first preset threshold value is preset. For example, the reversal ratio corresponds to the first preset threshold value Y1, the reversal failure ratio corresponds to the first preset threshold value Y2, the reversal quantity corresponds to the first preset threshold value Y2, and the reversal failure quantity corresponds to the first preset threshold value Y3.
[0119] For example, among 100 historical business requests, 30 historical business requests fail to be processed by the second component, and the reversal ratio is 0.3, and the corresponding first preset threshold is 12. Among the 30 historical business requests that failed to be processed, 15 historical business requests belong to business identifier 1, 13 historical business requests belong to business identifier 2, and 2 historical business requests belong to business identifier 3. It can be determined that the number of historical business requests corresponding to business identifier 1 and business identifier 2 that are reversible is greater than the first preset threshold, and then business identifier 1 and business identifier 2 can be determined as target business identifiers.
[0120] In the embodiment of the present application, the target service identifier is one or more, which is not limited here.
[0121] S307: Determine, among multiple service requests, that the service request whose first service identifier is different from the target service identifier is a first-category service request.
[0122] It can be understood that when the second component processes historical business requests, the number of corrections for historical business requests whose business identifiers belong to the target business identifier is relatively large, which means that the second component's ability to process business requests with the target business identifier is weak. Therefore, the second component can be prevented from processing business requests with the target business identifier, thereby improving the success rate of the second component in processing business requests or processing corrections, and reducing the number of corrections or the proportion of correction failures.
[0123] S308: Determine, among multiple service requests, a first application component identifier of an application component from which each service request comes.
[0124] In one embodiment, the control rule may specify that the correction ratio, the correction failure ratio, the correction quantity and the correction failure quantity respectively have corresponding second preset thresholds. For example, the correction ratio corresponds to the second preset threshold E1, the correction failure ratio corresponds to the second preset threshold E2, the correction quantity corresponds to the second preset threshold E2, and the correction failure quantity corresponds to the second preset threshold E3.
[0125] Among the historical service requests, the number of historical service requests that are corrected and belong to the target application component identifier is greater than a second preset threshold.
[0126] For example: among 100 historical business requests, 30 historical business requests fail to be processed by the second component, then the reversal ratio is 0.3, and the corresponding second preset threshold is 8. Among the 30 historical business requests that failed to be processed, 10 historical business requests are from application component identifier 1, 7 historical business requests are from application component identifier 2, 4 historical business requests are from application component identifier 3, and 9 historical business requests are from application component identifier 4. It can be determined that the number of historical business requests corresponding to application component identifier 1 and application component identifier 4 that are reversing is greater than the second preset threshold, and then it can be determined that application component identifier 1 and application component identifier 4 are the target application component identifiers.
[0127] The target application component identifier is one or more, which is not limited here.
[0128] In an embodiment of the present application, the target business identifier indicates that the correction ratio, correction failure ratio, correction number or correction failure number of the business request corresponding to the target business identifier is higher, and business requests with business identifiers other than the target business identifier are processed preferentially. This can improve the processing success rate of business requests and / or the success rate of correction processing, and improve the business consistency ratio.
[0129] S309: Determine, among multiple service requests, that the service request whose first application component identifier is different from the target application component identifier is a first-category service request.
[0130] It can be understood that when the second component processes historical business requests, a large number of historical business requests sent by the target application component identifier are reversed, which means that the second component's ability to process business requests sent by the target application component identifier is weak. Therefore, the second component can be prevented from processing business requests sent by the target application component identifier, thereby improving the success rate of the second component in processing business requests or processing corrections, and reducing the number of corrections or the proportion of correction failures.
[0131] In an embodiment of the present application, the target application component identifier indicates that the correction ratio, correction failure ratio, correction number or correction failure number of the business requests corresponding to the target application component identifier is higher, and business requests with application component identifiers other than the target application component identifier are processed preferentially. This can improve the processing success rate of business requests and / or the success rate of correction processing, and improve the business consistency ratio.
[0132] S310: Determine, among multiple service requests, service requests other than the first type of service requests as second type of service requests.
[0133] The second type of business request is a business request that is not currently being processed.
[0134] S311, returning prompt information to the application component that sends the second type of service request.
[0135] The prompt information is used to indicate that the request failed.
[0136] Specifically, the prompt information includes an error code or error prompt information.
[0137] S312: Send the first type of business request to the second component to instruct the second component to process the first type of business request.
[0138] The specific implementation process of this step refers to S205 and will not be repeated here.
[0139] In the embodiment of the present application, a returned correction result may also be received. If the correction result indicates that the correction failed, the correction result carries a correction error code, and the cause of the correction failure may be analyzed based on the correction error code.
[0140] Furthermore, if the reversal data are all 0, the flow control setting can be released and all subsequent service requests received can be processed.
[0141] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0142] Reference Figure 4 , showing a business processing method, which is applied to the third component and specifically includes the following steps:
[0143] S401, when the second component fails to process the business request, a reversal request is sent to the second component.
[0144] The reversal request includes: a synchronous reversal request and / or an asynchronous reversal request.
[0145] In the embodiment of the present application, after the second component receives the service request sent by the first component, it processes the service request. If the processing fails, the third component detects that the service request fails. The specific detection method includes: the processing success information returned by the second component is not received after the timeout, or the error information returned by the second component. Then the third component initiates a reversal request to the second component.
[0146] In one embodiment, the reversal request may be a synchronous reversal request or an asynchronous reversal request.
[0147] In another embodiment, a synchronous reversal request is first initiated to the second component, and when the synchronous reversal request returns failure, an asynchronous reversal request is then initiated to the second component to improve the success rate of the reversal process.
[0148] S402, receiving the reversal result returned by the second component in response to the reversal request.
[0149] S403, sending the reversal result to the first component.
[0150] Among them, the correction results include: correction failure or correction success.
[0151] Among them, after receiving the reversal result, the first component can analyze the reversal result and determine the reversal data according to multiple reversal results in the historical time period.
[0152] In an embodiment of the present application, after the flow control setting is released, the third component re-initiates the reversal request for the historical reversal failure to ensure business consistency.
[0153] Furthermore, the present application also includes post-consistency, that is, the reversal request that failed in the above embodiment can be handled with post-consistency as a backup. Among them, post-consistency is performed through the accounting of total and sub-checks, debit and credit balances, engine flow checks, cross-system transactions checks, etc. for end-of-day reconciliation, which comprehensively covers various business data processing inconsistencies such as inconsistencies between components, inconsistencies in accounts, inconsistencies in transactions, etc.
[0154] It can be understood that in the embodiment of the present application, in the correction process, the combination of synchronous correction and asynchronous correction is used to improve the correction success rate, thereby improving the business consistency ratio. In addition, in the business processing process, the flow control of business requests is realized through correction data and control rules, avoiding the large-scale generation of unilateral accounts, thereby avoiding the blockage of the correction process, and further improving the business consistency ratio. Finally, the business consistency ratio can be further improved by providing a bottom line through post-consistency.
[0155] Reference Figure 5 , is a schematic diagram of a business processing device provided in an embodiment of the present application, which is applied to a business processing system, the business processing system includes: a first component and a second component; the business processing device 50 includes: the following modules deployed in the first component:
[0156] A first acquisition module 51 is used to acquire target reversal data and pre-configured control rules for processing historical business requests by the second component within a historical time period;
[0157] A first determination module 52, for determining target control parameters associated with target reversal data according to the association relationship between the reversal data and the control parameters indicated by the control rule, wherein the target control parameters include a reversal threshold and a target processing condition;
[0158] A second acquisition module 53, used to acquire multiple service requests sent by the application component;
[0159] A second determination module 54, configured to determine that the total number of the plurality of service requests is less than a reversal threshold, and that the plurality of service requests are all first-category service requests to be processed;
[0160] A third determination module 55 is used to determine, if the total number of the multiple business requests is greater than or equal to the reversal threshold, the business requests that meet the target processing condition among the multiple business requests as the first type of business requests to be processed;
[0161] The sending module 56 is used to send the first type of service request to the second component to instruct the second component to process the first type of service request.
[0162] In one embodiment of the present application, the target processing condition includes: a traffic threshold; a third determination module 55, which is specifically used to determine that a service request with a traffic less than the traffic threshold is a first-category service request among multiple service requests.
[0163] In one embodiment of the present application, the target processing condition includes: a target service identifier, the number of historical service requests to be corrected corresponding to the target service identifier is greater than a first preset threshold, and the third determination module 55 is specifically used to:
[0164] Determine a first service identifier of each service request among multiple service requests;
[0165] Among the multiple service requests, it is determined that the service request whose first service identifier is different from the target service identifier is a first-category service request.
[0166] In one embodiment of the present application, the target processing condition includes: a target application component identifier, the number of historical service requests to be reversed sent by the target application component corresponding to the target application component identifier is greater than a second preset threshold, and the third determination module 55 is specifically used to:
[0167] Determine, among multiple service requests, a first application component identifier of an application component from which each service request comes;
[0168] Among the multiple service requests, the service request whose first application component identifier is different from the target application component identifier is determined to be a first-category service request.
[0169] In one embodiment of the present application, the system further includes: a fourth determining module (not shown) configured to:
[0170] Determining, among the multiple service requests, service requests other than the first-category service requests as second-category service requests;
[0171] A prompt message is returned to the application component that sent the second type of service request, where the prompt message is used to indicate that the request failed.
[0172] In one embodiment of the present application, the business processing system further includes a third component, a business processing device, and further includes: the following modules deployed in the third component:
[0173] A sending module (not shown), configured to send a reversal request to the second component when the second component fails to process the service request, wherein the reversal request includes: a synchronous reversal request and / or an asynchronous reversal request;
[0174] A receiving module (not shown), configured to receive a reversal result returned by the second component in response to the reversal request;
[0175] The sending module (not shown) is also used to send the correction result to the first component, and the correction result includes: correction failure or correction success.
[0176] In one embodiment of the present application, the reversal data includes: at least one of the reversal ratio, the reversal failure ratio, the reversal number and the reversal failure number, and the reversal ratio, the reversal failure ratio, the reversal number and the reversal failure number correspond to different reversal thresholds respectively.
[0177] For the specific implementation process of the business processing device of the present application, please refer to the implementation contents of the above-mentioned business processing method, which will not be repeated here.
[0178] It should be noted that it should be understood that the division of the various modules of the above device is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software called by processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software called by processing elements, and some modules can be implemented in the form of hardware. For example, the processing module can be a separately established processing element, or it can be integrated in a chip of the above device. In addition, it can also be stored in the memory of the above device in the form of program code, and called and executed by a processing element of the above device. The implementation of other modules is similar. In addition, these modules can be fully or partially integrated together, or they can be implemented independently. The processing element here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module above can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.
[0179] For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more microprocessors (digital signal processors, DSP), or one or more field programmable gate arrays (FPGA), etc. For another example, when a module above is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0180] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, a computer, a central end or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, central end or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a central end, a data center, etc. that contains one or more available media integration. The available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state hard disk (SSD)), etc.
[0181] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 6 As shown, the electronic device may include: a processor 61, a memory 62, a communication interface 63 and a system bus 64. The memory 62 and the communication interface 63 are connected to the processor 61 through the system bus 64 and communicate with each other. The memory 62 is used to store computer-executable instructions, and the communication interface 63 is used to communicate with other devices. When the processor 61 executes the above-mentioned computer-executable instructions, the solution of the above-mentioned embodiment is implemented.
[0182] Should Figure 6The system bus mentioned in the figure may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The system bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The communication interface is used to realize the communication between the database access device and other devices (such as the user end, the read-write library and the read-only library). The memory may include random access memory (RAM) and may also include non-volatile memory (non-volatile memory), such as at least one disk storage.
[0183] The above-mentioned processor can be a general-purpose processor, including a central processing unit CPU, a network processor (NP), etc.; it can also be a digital signal processor DSP, an application-specific integrated circuit ASIC, a field programmable gate array FPGA or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0184] Optionally, an embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the electronic device executes the method of the above embodiment.
[0185] Optionally, an embodiment of the present application further provides a computer program product, on which a computer program is stored. When the computer program is executed by a processor, the electronic device executes the method of the above embodiment.
[0186] In the present application, "at least one" means one or more, and "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship; in the formula, the character " / " indicates that the previous and next associated objects are in a "division" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0187] It is to be understood that the various numerical numbers involved in the embodiments of the present application are only for the convenience of description and are not intended to limit the scope of the embodiments of the present application. In the embodiments of the present application, the size of the sequence number of each process does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0188] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A business processing method, characterized in that: Applied to a business processing system, the business processing system includes: a first component and a second component, and the business processing method includes: using the first component to perform the following steps: Obtain target reversal data and preconfigured control rules for the second component processing historical business requests within a historical time period; Determine the target control parameter associated with the target reversal data according to the association relationship between the reversal data and the control parameter indicated by the control rule, wherein the target control parameter includes a reversal threshold and a target processing condition; Get multiple business requests sent by application components; If the total number of the multiple service requests is less than the reversal threshold, determining that the multiple service requests are all the first type of service requests to be processed; If the total number of the multiple service requests is greater than or equal to the reversal threshold, determining the service requests that meet the target processing condition among the multiple service requests as the first type of service requests to be processed; The first type of service request is sent to the second component to instruct the second component to process the first type of service request.
2. The service processing method according to claim 1, characterized in that: The target processing condition includes: a traffic threshold; and determining, among the multiple service requests, that the service request that meets the target processing condition is the first type of service request to be processed includes: Determine, among the multiple service requests, that the service requests whose traffic is less than the traffic threshold are the first-category service requests.
3. The service processing method according to claim 1, characterized in that: The target processing condition includes: a target service identifier, the number of historical service requests to be corrected corresponding to the target service identifier is greater than a first preset threshold, and determining that a service request that meets the target processing condition among the multiple service requests is the first type of service request to be processed includes: Determine a first service identifier of each service request among the multiple service requests; Among the multiple service requests, the service requests whose first service identifier is different from the target service identifier are determined to be the first type of service requests.
4. The service processing method according to claim 1, characterized in that: The target processing condition includes: a target application component identifier, the number of historical business requests to be reversed sent by the target application component corresponding to the target application component identifier is greater than a second preset threshold, and determining that the business request that meets the target processing condition is the first type of business request to be processed among the multiple business requests includes: Determine, among the multiple service requests, a first application component identifier of an application component from which each service request comes; Among the multiple service requests, it is determined that the service request whose first application component identifier is different from the target application component identifier is the first type of service request.
5. The service processing method according to any one of claims 1 to 4, characterized in that: Also includes: Determining, among the multiple service requests, service requests other than the first-category service requests as second-category service requests; Return prompt information to the application component that sent the second type of service request, where the prompt information is used to prompt that the request failed.
6. The service processing method according to any one of claims 1 to 4, characterized in that: The business processing system further includes a third component, and the business processing method further includes: using the third component to perform the following steps: When the second component fails to process the service request, sending a reversal request to the second component, the reversal request including: a synchronous reversal request and / or an asynchronous reversal request; receiving a reversal result returned by the second component in response to the reversal request; The correction result is sent to the first component, and the correction result includes: correction failure or correction success.
7. The service processing method according to claims 1 to 4, characterized in that: The reversal data includes: at least one of a reversal ratio, a reversal failure ratio, a reversal quantity and a reversal failure quantity, and the reversal ratio, the reversal failure ratio, the reversal quantity and the reversal failure quantity correspond to different reversal thresholds respectively.
8. A service processing device, characterized in that: Applied to a business processing system, the business processing system includes: a first component and a second component, and the business processing device includes: the following modules deployed in the first component: A first acquisition module is used to obtain target reversal data and pre-configured control rules for processing historical business requests by the second component within a historical time period; A first determination module, for determining a target control parameter associated with the target reversal data according to the association relationship between the reversal data and the control parameter indicated by the control rule, wherein the target control parameter includes a reversal threshold and a target processing condition; A second acquisition module is used to acquire multiple business requests sent by the application component; A second determination module, configured to determine that the plurality of service requests are all the first type of service requests to be processed if the total number of the plurality of service requests is less than the reversal threshold; A third determination module, configured to determine, if the total number of the plurality of service requests is greater than or equal to the reversal threshold, a service request that meets the target processing condition among the plurality of service requests as the first type of service request to be processed; A sending module is used to send the first type of business request to the second component to instruct the second component to process the first type of business request.
9. An electronic device, characterized in that: comprising a memory and a processor; wherein, The memory is used to store program code; The processor is used to call the program code to implement the business processing method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the electronic device executes the service processing method according to any one of claims 1 to 7.
11. A computer program product having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the electronic device executes the service processing method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Unilateral account scale control method and system
CN106780034A
Data consistency keeping method and device, equipment and storage medium
CN115544044A
Transaction processing method and device, equipment and storage medium
CN116757847A
Business processing method and device, electronic equipment and storage medium
CN118212048A