Resource calculation method and device, computer and storage medium

Calculating the weight of financial transactions through customer indicators and historical transaction data represented by directed annular graphs solves the problem of resource calculation deviation in traditional resource calculation methods, achieving more accurate resource allocation and improving transaction efficiency.

CN118819831APending Publication Date: 2024-10-22WEBANK (CHINA)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410826159.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-25
Publication Date
2024-10-22

AI Technical Summary

Technical Problem

When processing financial transactions, traditional resource calculation methods do not consider the environment or context of the transaction and use the same processing method and resource allocation strategy for all transactions, resulting in deviations in resource calculation.

Method used

By using customer indicator data and historical transaction data represented by a directed ring graph, the technical weight, business weight and ring weight of the transaction are determined to accurately calculate the resources required for the transaction.

Benefits of technology

It improves the accuracy of resource calculation, ensures the reasonable allocation of resources required by each service in the distributed system service architecture, avoids resource grabbing, and improves the efficiency and security of transactions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118819831A_ABST
    Figure CN118819831A_ABST
Patent Text Reader

Abstract

The invention discloses a resource calculation method and device, a computer, a storage medium and a server applied to a resource calculation system.The method comprises the steps that customer index data and historical transaction data are obtained, and the customer index data and the historical transaction data are represented through a directed and looped graph; the directed and looped graph comprises one or more paths used for representing transactions, and each path comprises one or more nodes used for representing transaction operations; determining technical weights of all paths in the directed and looped graph according to the customer index data; determining service weights and ring weights of all paths in the directed and ring graph according to the historical transaction data; and determining resources required by the transaction according to the technical weight, the service weight and the ring weight. By determining the resources required by the transaction according to the plurality of weights of the transaction represented by the directed and looped graph, the accuracy of resource calculation is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of resource computing, and in particular to a resource computing method, device, computer and storage medium. Background Art

[0002] Currently, in the distributed system service architecture, a complete transaction link often involves calls between multiple internal or external services. The resources required by each service in the entire link are not the same. In order to avoid resource competition in the link that affects the entire link, it is necessary to perform resource calculation on the transaction.

[0003] When processing financial transactions, traditional computing methods do not consider the environment or context of the transaction, and use the same processing method and resource allocation strategy for all transactions. They are unable to perform accurate resource calculations based on transaction data alone, which may lead to deviations in resource calculations. Summary of the invention

[0004] The embodiments of the present application provide a resource calculation method, device, computer and storage medium, which are conducive to improving the accuracy of resource calculation by determining the resources required for a transaction based on multiple weights of the transaction represented by a directed cyclic graph.

[0005] In a first aspect, an embodiment of the present application provides a resource calculation method, which is applied to a server of a resource calculation system, and the method includes:

[0006] Obtain customer indicator data and historical transaction data, wherein the customer indicator data and the historical transaction data are represented by a directed cyclic graph, the directed cyclic graph includes one or more paths for representing transactions, and each path includes one or more nodes for representing transaction operations; determine the technical weights of all paths in the directed cyclic graph according to the customer indicator data; determine the business weights of all paths in the directed cyclic graph according to the historical transaction data; determine the ring weights of all paths in the directed cyclic graph according to the historical transaction data; and determine the resources required for the transaction according to the technical weights, the business weights, and the ring weights.

[0007] In some embodiments, determining the technical weights of all paths in the directed cyclic graph according to the customer indicator data includes:

[0008] Determine target indicator information according to the customer indicator data; determine a first proportion of the first path in the directed cyclic graph to all paths, the first path being any path in the directed cyclic graph; determine a first probability of occurrence of target indicator information in the first path in the directed cyclic graph; obtain a first product of the first proportion and the first probability; obtain a first sum of products of the proportions of different paths in the directed cyclic graph to all paths and the probabilities of occurrence of target indicator information in different paths in the directed cyclic graph; obtain a second product of the first product and the reciprocal of the first sum, the second product being the technical weight of the first path; repeat the above steps until the technical weights of all paths in the directed cyclic graph are obtained.

[0009] In some embodiments, the historical transaction data is represented by a plurality of directed cyclic graphs, one directed cyclic graph corresponds to one transaction scenario, and determining the business weights of all paths in the directed cyclic graph according to the historical transaction data includes:

[0010] Determine a second proportion of the second path in the first directed cyclic graph to all the paths in the first directed cyclic graph, where the second path is any path in the first directed cyclic graph; determine a third proportion of the first directed cyclic graph to all the directed cyclic graphs; obtain a second sum of the second proportion and the third proportion, where the second sum is the business weight of the second path; repeat the above steps until the business weights of all paths in all directed cyclic graphs are obtained.

[0011] In some embodiments, determining the ring weights of all paths in the directed cyclic graph according to the historical transaction data includes:

[0012] Determine the number of directed loops in a third path in the directed cyclic graph, wherein the third path is any path in the directed cyclic graph; determine the number of nodes in the third path in the directed cyclic graph; obtain the third product of the number of directed loops and the reciprocal of the number of nodes, wherein the third product is the ring weight of the third path; repeat the above steps until the ring weights of all paths in the directed cyclic graph are obtained.

[0013] In some embodiments, determining the resources required for a transaction according to the technical weight, the business weight, and the ring weight includes:

[0014] Determine comprehensive scores of different paths in the directed cyclic graph according to the technical weight, the business weight and the ring weight; determine a fourth path of the directed cyclic graph according to the comprehensive score, the fourth path being the path with the highest comprehensive score in the directed cyclic graph; determine resources of the fourth path according to the technical weight, the business weight, the ring weight and the comprehensive score.

[0015] In some embodiments, the determining the comprehensive scores of different paths in the directed cyclic graph according to the technical weight, the business weight, and the ring weight, the method further includes:

[0016] Determine the technical weight variance, business weight variance and ring weight variance of the fifth path according to the technical weight, the business weight and the ring weight of the fifth path in the directed cyclic graph, wherein the fifth path is any path in the directed cyclic graph; obtain the fourth product of the technical weight and the technical weight variance; obtain the fifth product of the business weight and the business weight variance; obtain the sixth product of the ring weight and the ring weight variance; obtain the third sum of the technical weight variance, the business weight variance and the ring weight variance; obtain the fourth sum of the fourth product, the fifth product and the sixth product; obtain the seventh product of the fourth sum and the reciprocal of the third sum, wherein the seventh product is the comprehensive score of the fifth path; repeat the above steps until the comprehensive scores of all paths in the directed cyclic graph are obtained.

[0017] In some embodiments, determining the resources of the fourth path according to the technical weight, the business weight, the ring weight, and the comprehensive score includes:

[0018] Obtain the eighth product of the business weight variance of the fourth path and the business weight of the fourth path; obtain the ninth product of the ring weight variance of the fourth path and the ring weight of the fourth path; obtain the tenth product of the eighth product and the first preset value; obtain the eleventh product of the ninth product and the first preset value; obtain the fifth sum of the tenth product, the eleventh product and the second preset value; obtain the twelfth product of the fifth sum and the default resource, the twelfth product being the resource of the fourth path.

[0019] In a second aspect, an embodiment of the present application provides a resource computing device, including:

[0020] An acquisition module, which acquires customer indicator data and historical transaction data, wherein the customer indicator data and the historical transaction data are represented by a directed cyclic graph, the directed cyclic graph includes one or more paths for representing transactions, and each path includes one or more nodes for representing transaction operations;

[0021] A processing module is used to determine the technical weights of all paths in the directed cyclic graph based on the customer indicator data; and determine the business weights of all paths in the directed cyclic graph based on the historical transaction data; and determine the ring weights of all paths in the directed cyclic graph based on the historical transaction data; and determine the resources required for the transaction based on the technical weights, the business weights and the ring weights.

[0022] In a third aspect, an embodiment of the present application provides a computer, including:

[0023] A memory, a processor, and an executable program code stored in the memory and executable on the processor, wherein the processor executes the method as described in any one of the first aspects when executing the executable program code.

[0024] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a resource computing program is stored. The resource computing program includes execution instructions, and the execution instructions are used to execute the method as described in any one of the first aspects.

[0025] In a fifth aspect, the present application provides a computer program product, which, when executed by a processor, is used to implement the method as described in any one of the first aspects.

[0026] By implementing the embodiment of the present application, the server of the resource computing system first obtains customer indicator data and historical transaction data, wherein the customer indicator data and the historical transaction data are represented by a directed cyclic graph, and the directed cyclic graph includes one or more paths for representing transactions, and each path includes one or more nodes for representing transaction operations; then the technical weights of all paths in the directed cyclic graph are determined according to the customer indicator data; then the business weights of all paths in the directed cyclic graph are determined according to the historical transaction data; then the ring weights of all paths in the directed cyclic graph are determined according to the historical transaction data; finally, the resources required for the transaction are determined according to the technical weight, the business weight, and the ring weight. By determining the resources required for the transaction according to multiple weights of the transaction represented by the directed cyclic graph, it is beneficial to improve the accuracy of resource calculation. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the background technology, the drawings required for use in the embodiments of the present application or the background technology will be described below.

[0028] Figure 1 is an architecture diagram of a resource computing system provided in an embodiment of the present application;

[0029] Figure 2 is a flow chart of a resource calculation method provided in an embodiment of the present application;

[0030] Figure 3 is a schematic diagram of a directed cyclic graph provided in an embodiment of the present application;

[0031] Figure 4 This is a schematic diagram of a service weight calculation provided by an embodiment of the present application;

[0032] Figure 5 is a schematic diagram of a transaction score calculation provided in an embodiment of the present application;

[0033] Figure 6 is a structural diagram of a resource computing device provided in an embodiment of the present application;

[0034] Figure 7 It is a structural diagram of a computer provided in an embodiment of the present application. DETAILED DESCRIPTION

[0035] 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 should fall within the scope of protection of the present application.

[0036] The terms "first", "second", "third", etc. in the specification, claims and drawings of this application are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. 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 optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.

[0037] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0038] Currently, in the distributed system service architecture, a complete transaction link often involves calls between multiple internal or external services. The resources required by each service in the entire link are not the same. In order to avoid resource competition in the link that affects the entire link, it is necessary to perform resource calculation on the transaction.

[0039] When processing financial transactions, traditional computing methods do not consider the environment or context of the transaction, and use the same processing method and resource allocation strategy for all transactions. They are unable to perform accurate resource calculations based on transaction data alone, which may lead to deviations in resource calculations.

[0040] In view of the above problems, the embodiments of the present application provide a resource calculation method, device, computer and storage medium, wherein the server of the resource calculation system first obtains customer index data and historical transaction data, wherein the customer index data and the historical transaction data are represented by a directed cyclic graph, and the directed cyclic graph includes one or more paths for representing transactions, and each path includes one or more nodes for representing transaction operations; then the technical weights of all paths in the directed cyclic graph are determined according to the customer index data; then the business weights of all paths in the directed cyclic graph are determined according to the historical transaction data; then the ring weights of all paths in the directed cyclic graph are determined according to the historical transaction data; finally, the resources required for the transaction are determined according to the technical weight, the business weight and the ring weight. By determining the resources required for the transaction according to multiple weights of the transaction represented by the directed cyclic graph, it is beneficial to improve the accuracy of resource calculation.

[0041] See also Figure 1 , Figure 1 It is an architecture diagram of a resource computing system provided in an embodiment of the present application, wherein the resource computing system 100 includes a server 101 and a client 102, wherein the server 101 of the resource computing system 100 can be a server cluster consisting of one server or multiple servers, and the client 102 can be a computer, a mobile terminal, a handheld terminal, a cellular terminal or other terminal. In the data preparation stage, the server 101 obtains customer indicator data and historical transaction data from the database, and represents it in the form of a directed cyclic graph, and then calculates the technical weight, business weight and ring weight of each path under the directed cyclic graph according to the directed cyclic graph, and finally determines the resources required for each transaction according to the technical weight, business weight and ring weight of each path.

[0042] Based on this, the present application provides a resource calculation method, device, computer and storage medium, and the present application is described in detail below in conjunction with the accompanying drawings.

[0043] See also Figure 2 , Figure 2 is a flow chart of a resource calculation method provided in an embodiment of the present application, such as Figure 2 As shown, the method comprises the following steps:

[0044] S201, obtaining customer index data and historical transaction data;

[0045] Among them, transaction history data refers to the amount of historical data generated by transactions, such as the proportion of transaction nodes in the transaction or the proportion of transactions in all transactions of the business. Customer indicator data refers to a series of data obtained by analyzing and counting customer behaviors, needs and preferences. These data can help financial institutions better understand customers and thus formulate more effective marketing strategies and business decisions. Customer indicator data mainly includes the following categories: basic customer information: such as age, gender, occupation, income, etc.; customer transaction data: such as transaction frequency, transaction amount, transaction time, etc.; customer product preferences: such as favorite financial products, investment period, risk tolerance, etc.; customer satisfaction: customer evaluation of financial institutions' products and services collected through questionnaires and other methods.

[0046] The customer index data and the historical transaction data are represented by a directed cyclic graph, wherein the directed cyclic graph includes one or more paths for representing transactions, and each path includes one or more nodes for representing transaction operations;

[0047] For example, see Figure 3 , Figure 3 is a schematic diagram of a directed cyclic graph provided in an embodiment of the present application, such as Figure 3 As shown in the figure, a transaction T is defined based on the customer indicator data. Transaction T is represented by a directed cyclic graph. All paths t under transaction T i (i=1, 2, 3....., n) represents an operation process. In the transaction T scenario, there are 5 types of nodes, namely node a for access judgment, node b for storage, node c for data source query, and node d for approval. In transaction T, there are t1 paths ab, t2 paths abcd, and t3 paths abc. Since node c points to node d, and node d points to node c, a loop is formed. The number of times each path appears indicates the bias value of the path in the transaction scenario, which is determined based on the customer indicator data. For example, if it is determined based on the customer indicator data that a total of 5 times have occurred from the access judgment to the approval stage, then the t2 path appears 5 times in transaction T.

[0048] S202, determining the technical weights of all paths in the directed cyclic graph according to the customer indicator data;

[0049] Among them, the technical weight can determine the basic golden section line of a financial transaction path, map customer data and transaction path one by one, and the technical weight can reflect the transaction preferences of different customers.

[0050] In a possible implementation, S202 includes the following steps:

[0051] Determine target indicator information according to the customer indicator data; determine a first proportion of the first path in the directed cyclic graph to all paths, the first path being any path in the directed cyclic graph; determine a first probability of occurrence of target indicator information in the first path in the directed cyclic graph; obtain a first product of the first proportion and the first probability; obtain a first sum of products of the proportions of different paths in the directed cyclic graph to all paths and the probabilities of occurrence of target indicator information in different paths in the directed cyclic graph; obtain a second product of the first product and the reciprocal of the first sum, the second product being the technical weight of the first path; repeat the above steps until the technical weights of all paths in the directed cyclic graph are obtained.

[0052] Among them, the target indicator information is defined by the customer indicator data. The target indicator information of different customers is different. Here, the data category D is defined to represent the target indicator information. For example, there are 5 nodes in a transaction scenario T, namely, node a for access judgment, node b for storage, node c for data source query, node d for approval, and node e for account opening. The target indicator information D can be "account abnormality". Under a transaction T, the t1 path is ab, the t2 path is abc, and the t3 path is abcd. According to the customer indicator data, the number of times the customer indicator D hits the paths t1, t2, and t3 can be determined. If it appears 20 times in the t3 path, 2 of which are account abnormalities, then the probability of the indicator data D appearing in the path t3 is 0.1.

[0053] Specifically, the technical weight W tech The calculation formula of i is as follows:

[0054]

[0055] Among them, P(t i ) represents the path t i The probability of occurrence in this transaction scenario, P(D|t i ) represents the target indicator information D on path t i The probability of i ) represents the probability and P(t i ) represents the path t i The probabilities of the two in the transaction scenario are similar, and to a certain extent represent the future path of the scenario. Multiplying the two can predict the probability of the future path.

[0056] For example, in a financial approval transaction, all transaction paths under a transaction are t1, t2, and t3. At a certain point in time, the total number of approved transactions is 100, and the number of occurrences of paths t1, t2, and t3 are 13, 30, and 57, respectively. The probability of a certain indicator data appearing in t1, t2, and t3 is 0.71, 0.25, and 0.04, respectively. From this, the technical weights of paths t1, t2, and t3 can be calculated as follows:

[0057]

[0058] It can be seen that in this example, by determining the technical weights of each path under a transaction based on customer indicator data, the transaction preferences of different customers can be reflected, which facilitates the formulation of personalized financial products and targeted marketing strategies, and improves user experience.

[0059] S203, determining the business weights of all paths in the directed cyclic graph according to the historical transaction data;

[0060] Among them, business weight data, as a key indicator to measure the importance and influence of different business activities, has a profound impact on transaction decisions, risk management, resource allocation, etc. The business weights of different transaction scenarios are different, indicating that the focus of business decisions is different; the business weights of the same transaction scenario are different, indicating the biased path direction of the transaction business attributes. In the time window dimension, business weights do not affect each other. The larger the business weight, the greater the factor affecting system resource allocation and transaction decisions. Businesses with larger weights tend to obtain more financial, human and technical resources to support their development and expansion.

[0061] In a possible implementation, S203 includes the following steps:

[0062] Determine a second proportion of the second path in the first directed cyclic graph to all the paths in the first directed cyclic graph, where the second path is any path in the first directed cyclic graph; determine a third proportion of the first directed cyclic graph to all the directed cyclic graphs; obtain a second sum of the second proportion and the third proportion, where the second sum is the business weight of the second path; repeat the above steps until the business weights of all paths in all directed cyclic graphs are obtained.

[0063] Among them, all transactions in the business are defined based on historical transaction data. i (i=1,2,3...,,n), a transaction corresponds to a directed cyclic graph, defining all paths t under a transaction T i(i=1, 2, 3....., n), each path consists of one or more nodes, each node corresponds to an operation process, for example, a transaction scenario T has node a for access judgment, node b for storage, node c for data source query, and node d for approval, and under transaction T, there are t1 paths ab, t2 paths abc, and t3 paths abcd. The number of times each path appears indicates the bias value of the path in the transaction scenario, which is determined based on customer indicator data. For example, if it is determined based on customer indicator data that a total of 5 times have occurred from access judgment to approval, then t2 path appears 5 times under transaction T.

[0064] At the same time, define the time window w i (i=1,2,3...,n), define the weight W biz i represents path t i The business weight under time window w i The business weight of a transaction is equal to the sum of the proportion of the transaction node in the transaction and the proportion of the transaction in all transactions of the business. The calculation formula is as follows:

[0065]

[0066] Among them, two business features are calculated in the business weight, the first business feature and the second business feature. The first business feature reflects the proportion of different paths in the same transaction scenario to all paths in the transaction scenario, that is, the first item on the right side of the above formula; the second business feature reflects the proportion of the transaction scenario to all transaction scenarios of the business, that is, the second item on the right side of the above formula. The first business feature and the second business feature do not affect each other, and both represent the proportion of transactions under a business.

[0067] For example, in financial approval transactions, all transaction scenarios are T1, T2, and T3, and the transaction nodes are t1, t2, and t3. In a certain time window, the total number of approved transactions is 100, and the number of occurrences of transaction scenarios T1, T2, and T3 are 10, 30, and 60 respectively. The number of occurrences of transaction nodes t1, t2, and t3 of transaction T1 are 2, 5, and 3 respectively. 22 The transaction nodes of transaction T3 appear 2, 25, and 3 times respectively, and the transaction nodes of transaction T3 appear 0, 50, and 10 times respectively. From this, the business weights of each transaction scenario can be calculated. For the business weights of each transaction scenario, please refer to Figure 4 , Figure 4 is a schematic diagram of a service weight calculation provided by an embodiment of the present application, such as Figure 4As shown, the business weights of transaction nodes t1, t2, and t3 of transaction T1 are 0.3, 0.6, and 0.4 respectively; the business weights of transaction nodes t1, t2, and t3 of transaction T2 are 0.367, 1.13, and 0.4 respectively; the business weights of transaction nodes t1, t2, and t3 of transaction T3 are 0.6, 1.43, and 0.767 respectively.

[0068] It can be seen that in this example, by determining the business weight of the next path of different transactions based on historical transaction data, it is helpful to understand the status and contribution of each business in the entire business system, so as to rationally allocate human, material and financial resources and improve resource utilization efficiency.

[0069] S204, determining the ring weights of all paths in the directed cyclic graph according to the historical transaction data;

[0070] The ring in the directed cyclic graph represents the repeated subtasks in a transaction. Repeated subtasks refer to the repeated execution of tasks due to system, process or human reasons during the financial transaction process. These subtasks may include data input, order processing, payment settlement, etc. The execution of repeated subtasks is dynamic. There may be different repeated subtasks in different time windows in the same transaction scenario. A transaction with a ring weight of zero means that there will be no repeated subtasks in this scenario.

[0071] Among them, since the number of nodes in a certain transaction scenario in financial transactions is fixed, the larger the ring weight of the path under a transaction, the longer the path of the corresponding financial transaction, and the more resources required. For example, there are only 4 nodes in transaction scenario T, node a is for access judgment, node b is for storage, node c is for data source query, and node d is for approval. At this time, the shortest path without a loop is a, and the longest path without a loop is abcd. When there is a loop, the path will become longer. For example, c in abcd is repeatedly executed, that is, abccd, the corresponding path becomes longer, and more resources are required. At this time, because the resources required by node c are fixed, the resources required for the loop path can be predicted.

[0072] In a possible implementation, S204 includes the following steps:

[0073] Determine the number of directed loops in a third path in the directed cyclic graph, wherein the third path is any path in the directed cyclic graph; determine the number of nodes in the third path in the directed cyclic graph; obtain the third product of the number of directed loops and the reciprocal of the number of nodes, wherein the third product is the ring weight of the third path; repeat the above steps until the ring weights of all paths in the directed cyclic graph are obtained.

[0074] Here, a transaction T is defined, and transaction T is represented by a directed cyclic graph. All paths t under transaction T i(i=1,2,3...,n) represents an operation process, defining the transaction path t i Total number of nodes n i , define the time window w i (i=1,2,3...,n), define the weight W cycle i represents path t i The ring weight under defines the transaction path t i Directed cycle number i , then in the time window w i The ring weight of a transaction is equal to the ratio of repeated subtasks (directed ring number) in the transaction to the total nodes of the transaction path. The calculation formula is as follows:

[0075]

[0076] For example, in a financial approval transaction, all transaction paths under transaction T are t1, t2, and t3, and the corresponding summary points are 4, 5, and 2, respectively, and the corresponding link points are 1, 2, and 0, respectively. It can be calculated that the ring weights corresponding to all transaction paths in a certain time window are:

[0077]

[0078] It can be seen that in this example, by determining the ring weights of different paths under each transaction based on historical transaction data, it is helpful to timely monitor repeated subtasks in transactions and correct errors, thereby ensuring the security and compliance of transactions.

[0079] S205: Determine the resources required for the transaction according to the technical weight, the business weight, and the ring weight.

[0080] In a possible implementation, S205 includes the following steps:

[0081] Determine comprehensive scores of different paths in the directed cyclic graph according to the technical weight, the business weight and the ring weight; determine a fourth path of the directed cyclic graph according to the comprehensive score, the fourth path being the path with the highest comprehensive score in the directed cyclic graph; determine resources of the fourth path according to the technical weight, the business weight, the ring weight and the comprehensive score.

[0082] Among them, the path with the highest comprehensive score in the directed cyclic graph is the fourth path. For example, there are transaction paths t1, t2, and t3 under a transaction T. The comprehensive scores of paths t1, t2, and t3 under a transaction in a certain time window are 0.1, 0.2, and 0.3, respectively. At this time, transaction path t3 is determined to be the fourth path, that is, the longest path under transaction T, and then the resources required for transaction path t3 are calculated.

[0083] In a possible implementation, determining the comprehensive scores of different paths in the directed cyclic graph according to the technical weight, the business weight, and the ring weight includes:

[0084] Determine the technical weight variance, business weight variance and ring weight variance of the fifth path according to the technical weight, the business weight and the ring weight of the fifth path in the directed cyclic graph, wherein the fifth path is any path in the directed cyclic graph; obtain the fourth product of the technical weight and the technical weight variance; obtain the fifth product of the business weight and the business weight variance; obtain the sixth product of the ring weight and the ring weight variance; obtain the third sum of the technical weight variance, the business weight variance and the ring weight variance; obtain the fourth sum of the fourth product, the fifth product and the sixth product; obtain the seventh product of the fourth sum and the reciprocal of the third sum, wherein the seventh product is the comprehensive score of the fifth path; repeat the above steps until the comprehensive scores of all paths in the directed cyclic graph are obtained.

[0085] Here, a transaction T is defined, and transaction T is represented by a directed cyclic graph. All paths t under transaction T i (i=1,2,3...,n) represents an operation process, defining the time window w i (i=1,2,3...,n), define the weight W tech i,W biz i,W cycle i represents the path t i The technical weight, business weight and ring weight under Q tech i, Q biz i, Q cycle i respectively identifies the path t i The technical weight variance, business weight variance and ring weight variance under S are defined. i Indicates that under the influence of weight, the transaction hits path t i The comprehensive score of t is: within a certain time window, the variance represents the degree of volatility, the weight represents the degree of bias, and the transaction path t i Overall score S i It is equal to the discrete ratio of the transaction weight and variance. The formula is as follows:

[0086]

[0087] For example, see Figure 5 , Figure 5 is a schematic diagram of a transaction score calculation provided in an embodiment of the present application, such as Figure 5As shown in the figure, in the financial approval transaction, all the transaction paths under the transaction are t1, t2, t3, and the corresponding technical weight, business weight, ring weight, and technical weight variance, business weight variance, and ring weight variance are as follows: Figure 5 As shown, it can be calculated that the comprehensive scores of paths t1, t2, and t3 under a transaction in a certain time window are 0.175, 0.7, and 0.225 respectively.

[0088] It can be seen that in this example, the comprehensive score of each path is obtained by comprehensively considering the weights and weight variances of different paths, which is conducive to subsequently determining the resources required for each path according to the comprehensive score and improving the accuracy of resource calculation.

[0089] In a possible implementation manner, determining the resources of the fourth path according to the technical weight, the business weight, the ring weight, and the comprehensive score includes:

[0090] Obtain the eighth product of the business weight variance of the fourth path and the business weight of the fourth path; obtain the ninth product of the ring weight variance of the fourth path and the ring weight of the fourth path; obtain the tenth product of the eighth product and the first preset value; obtain the eleventh product of the ninth product and the first preset value; obtain the fifth sum of the tenth product, the eleventh product and the second preset value; obtain the twelfth product of the fifth sum and the default resource, the twelfth product being the resource of the fourth path.

[0091] Please refer again to Figure 5 , the final path node t of a transaction k =MAX(S i ), since the comprehensive score of path t2 is the highest, path t2 is the path that needs resource calculation. Within the time window, the transaction resource calculation formula is as follows: R k =R*(k2+k1*Q biz i*W biz i+k1*Q cycle i*W cycle i),

[0092] Among them, Q biz i is the business weight variance, W biz i is the business weight, Q cycle i is the ring weight variance, W cycle i is the ring weight, k1 is the first preset value, k2 is the second preset value, and R is the default resource. In an example, both k1 and k2 can be 1, and there is no restriction on the values ​​of the first preset value and the second preset value.

[0093] In another example, within a time window, the transaction resource calculation formula is as follows:

[0094] R k =R*(k3+k1*Q biz i*W biz i+k2*Q cycle i*W cycle i),

[0095] Among them, Q biz i is the business weight variance, W biz i is the business weight, Q cycle i is the ring weight variance, W cycle i is the ring weight, k1 is the first preset value, k2 is the second preset value, K3 is the third preset value, and R is the default resource. By setting the values ​​of k1 and k2, you can change the business weight and the degree of influence of the ring weight on resource calculation. There is no restriction on the values ​​of the first preset value, the second preset value, and the third preset value.

[0096] It can be seen that in this example, by taking the path with the highest comprehensive transaction score as the longest path and calculating the transaction resources required for the path, it is beneficial to dynamically calculate the transaction resources according to different weights and the variances corresponding to different weights, accurately estimate the resources required for financial transactions, and improve resource utilization.

[0097] See also Figure 6 , Figure 6 is a schematic diagram of a resource computing device provided in an embodiment of the present application. Figure 6 As shown, the resource computing device 600 includes:

[0098] An acquisition module 601 is used to acquire customer indicator data and historical transaction data, wherein the customer indicator data and the historical transaction data are represented by a directed cyclic graph, and the directed cyclic graph includes one or more paths for representing transactions, and each path includes one or more nodes for representing transaction operations;

[0099] Processing module 602 is used to determine the technical weights of all paths in the directed cyclic graph based on the customer indicator data; and determine the business weights of all paths in the directed cyclic graph based on the historical transaction data; and determine the ring weights of all paths in the directed cyclic graph based on the historical transaction data; and determine the resources required for the transaction based on the technical weights, the business weights and the ring weights.

[0100] In one possible implementation, in terms of determining the technical weights of all paths in the directed cyclic graph based on the customer indicator data, the processing module 602 is specifically used to: determine the target indicator information based on the customer indicator data; determine the first proportion of the first path in the directed cyclic graph to all paths, the first path being any path in the directed cyclic graph; determine the first probability of the target indicator information appearing in the first path in the directed cyclic graph; obtain a first product of the first proportion and the first probability; obtain a first sum of the products of the proportions of different paths in the directed cyclic graph to all paths and the probabilities of the target indicator information appearing in different paths in the directed cyclic graph; obtain a second product of the first product and the inverse of the first sum, the second product being the technical weight of the first path; and repeat the above steps until the technical weights of all paths in the directed cyclic graph are obtained.

[0101] In one possible implementation, the historical transaction data is represented by multiple directed cyclic graphs, one directed cyclic graph corresponds to one transaction scenario, and in terms of determining the business weights of all paths in the directed cyclic graph based on the historical transaction data, the processing module 602 is specifically used to: determine a second proportion of the second path in the first directed cyclic graph to all paths in the first directed cyclic graph, the second path being any path in the first directed cyclic graph; determine a third proportion of the first directed cyclic graph to all directed cyclic graphs; obtain a second sum of the second proportion and the third proportion, the second sum being the business weight of the second path; repeat the above steps until the business weights of all paths in all directed cyclic graphs are obtained.

[0102] In one possible implementation, in terms of determining the ring weights of all paths in the directed cyclic graph based on the historical transaction data, the processing module 602 is specifically used to: determine the number of directed rings in the third path in the directed cyclic graph, the third path being any path in the directed cyclic graph; determine the number of nodes in the third path in the directed cyclic graph; obtain the third product of the number of directed rings and the reciprocal of the number of nodes, the third product being the ring weight of the third path; repeat the above steps until the ring weights of all paths in the directed cyclic graph are obtained.

[0103] In one possible implementation, in terms of determining the resources required for a transaction based on the technical weight, the business weight, and the ring weight, the processing module 602 is specifically used to: determine the comprehensive scores of different paths in the directed cyclic graph based on the technical weight, the business weight, and the ring weight; determine the fourth path of the directed cyclic graph based on the comprehensive score, the fourth path being the path with the highest comprehensive score in the directed cyclic graph; determine the resources of the fourth path based on the technical weight, the business weight, the ring weight, and the comprehensive score.

[0104] In a possible implementation, in terms of determining the comprehensive scores of different paths in the directed cyclic graph according to the technical weight, the business weight, and the ring weight, the processing module 602 is specifically used to: determine the technical weight variance, the business weight variance, and the ring weight variance of the fifth path according to the technical weight, the business weight, and the ring weight of the fifth path in the directed cyclic graph, wherein the fifth path is any path in the directed cyclic graph; obtain the fourth product of the technical weight and the technical weight variance; obtain the fifth product of the business weight and the business weight variance;

[0105] Obtain the sixth product of the ring weight and the ring weight variance; obtain the third sum of the technical weight variance, the business weight variance and the ring weight variance; obtain the fourth sum of the fourth product, the fifth product and the sixth product; obtain the seventh product of the fourth sum and the reciprocal of the third sum, the seventh product being the comprehensive score of the fifth path; repeat the above steps until the comprehensive scores of all paths in the directed cyclic graph are obtained.

[0106] In one possible implementation, in terms of determining the resources of the fourth path based on the technical weight, the business weight, the ring weight and the comprehensive score, the processing module 602 is specifically used to: obtain the eighth product of the business weight variance of the fourth path and the business weight of the fourth path; obtain the ninth product of the ring weight variance of the fourth path and the ring weight of the fourth path; obtain the tenth product of the eighth product and the first preset value; obtain the eleventh product of the ninth product and the first preset value; obtain the fifth sum of the tenth product, the eleventh product and the second preset value; obtain the twelfth product of the fifth sum and the default resource, and the twelfth product is the resource of the fourth path.

[0107] It is worth noting that the specific functional implementation of the resource computing device 600 is shown in the above Figure 2The description of the resource calculation method shown in the figure, for example, the acquisition module 601 is used to implement the relevant content of executing S201, and the processing module 602 is used to implement the relevant content of executing S202-S205. The various units or modules in the resource calculation device 600 can be respectively or completely combined into one or several other units or modules to form, or some (some) of the units or modules can be further divided into multiple functionally smaller units or modules to form, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present invention. The above-mentioned units or modules are divided based on logical functions. In actual applications, the functions of one unit (or module) are implemented by multiple units (or modules), or the functions of multiple units (or modules) are implemented by one unit (or module).

[0108] Based on the description of the above method embodiments and related device embodiments, please refer to Figure 7 , a schematic diagram of the structure of a computer 700 provided in an embodiment of the present invention. Figure 7 The computer 700 shown includes a processor 701 , a memory 702 , a communication interface 703 and a bus 704 . The processor 701 , the memory 702 , and the communication interface 703 are connected to each other through the bus 704 .

[0109] Optionally, the memory 702 is a ROM, a static storage device, a dynamic storage device or a RAM.

[0110] The memory 702 can store programs. When the executable program code stored in the memory 702 is executed by the processor 701, the processor 701 and the communication interface 703 are used to execute Figure 2 The various steps of the resource calculation method of the illustrated embodiment.

[0111] The processor 701 adopts a general-purpose CPU, a microprocessor, an application-specific integrated circuit ASIC, a GPU or one or more integrated circuits to execute relevant programs to perform the resource calculation method of the method embodiment of the present application.

[0112] The processor 701 can also be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the resource calculation method of the present application can be completed by the hardware integrated logic circuit or software instructions in the processor 701. Optionally, the processor 701 is a general-purpose processor, DSP, ASIC, FPGA or other programmable logic device, discrete gate or transistor logic device, discrete hardware component. The processor can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor is a microprocessor or the processor is any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor to execute, or a combination of hardware and software modules in the decoding processor to execute. The optional software module is located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register or other mature storage media in the art. The storage medium is located in the memory 702, and the processor 701 reads the information in the memory 702, and combines its hardware to complete the functions required to be performed by the acquisition module 601 and the processing module 602 included in a resource computing device 600 of an embodiment of the present application, or executes the resource computing method of the method embodiment of the present application.

[0113] The communication interface 703 uses a transceiver or other related device such as, but not limited to, a transceiver.

[0114] The bus 704 may include a path for transmitting information between various components of the computer 700 (eg, the memory 702 , the processor 701 , and the communication interface 703 ).

[0115] It should be noted that although Figure 7 The computer 700 shown only shows a memory, a processor, and a communication interface, but in the specific implementation process, those skilled in the art should understand that the computer 700 also includes other devices necessary for normal operation. At the same time, based on specific needs, those skilled in the art should understand that the computer 700 may also include hardware devices that implement other additional functions. In addition, those skilled in the art should understand that the computer 700 may also only include the devices necessary to implement the embodiments of the present application, and does not necessarily include Figure 7 All devices shown in .

[0116] An embodiment of the present application provides a computer-readable storage medium, in which a computer program for electronic data exchange is stored. The computer program includes execution instructions, and the execution instructions are used to execute part or all of the steps of any one of the resource calculation methods recorded in the above-mentioned resource calculation method embodiments. The above-mentioned computer includes an electronic terminal device.

[0117] An embodiment of the present application provides a computer program product, wherein the computer program product includes a computer program, and the computer program can be operated to enable a computer to perform part or all of the steps of any resource calculation method recorded in the above method embodiments. The computer program product can be a software installation package.

[0118] It should be noted that, for the sake of simplicity, the embodiments of any of the aforementioned resource calculation methods are described as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the present application.

[0119] The above is a detailed introduction to the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of a resource calculation method, device, computer and storage medium of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, based on the idea of ​​a resource calculation method, device, computer and storage medium of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

[0120] The present application is described with reference to the flowcharts and / or block diagrams of the methods, hardware products, and computer program products of the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0121] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1The memory may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0122] Although the present application is described herein in conjunction with various embodiments, in the process of implementing the claimed application, those skilled in the art may understand and implement other variations of the disclosed embodiments by viewing the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "one" does not exclude multiple situations. Certain measures are recorded in different dependent claims, but this does not mean that these measures cannot be combined to produce good results.

[0123] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the method embodiments of any of the above-mentioned resource calculation methods can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable memory, and the memory can include: a flash drive, a read-only memory (English: Read-Only Memory, abbreviated as: ROM), a random access memory (English: Random Access Memory, abbreviated as: RAM), a disk or an optical disk, etc.

[0124] It can be understood that any product that is controlled or configured to execute the processing method of the flowchart described in an embodiment of a resource computing method of the present application, such as the device and computer program product of the above flowchart, falls within the scope of the related products described in the present application.

[0125] Obviously, those skilled in the art can make various changes and modifications to the resource calculation method, device, computer and storage medium provided by this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is also intended to include these modifications and variations.

Claims

1. A resource calculation method, characterized in that: Applied to a server of a resource computing system, the method comprises: Acquire customer indicator data and historical transaction data, wherein the customer indicator data and the historical transaction data are represented by a directed cyclic graph, the directed cyclic graph includes one or more paths for representing transactions, and each path includes one or more nodes for representing transaction operations; Determine the technical weights of all paths in the directed cyclic graph according to the customer indicator data; Determine the business weights of all paths in the directed cyclic graph according to the historical transaction data; Determine the ring weights of all paths in the directed cyclic graph according to the historical transaction data; The resources required for the transaction are determined according to the technical weight, the business weight, and the ring weight.

2. The method according to claim 1, characterized in that Determining the technical weights of all paths in the directed cyclic graph according to the customer indicator data includes: Determining target indicator information according to the customer indicator data; Determine a first ratio of a first path to all paths in the directed cyclic graph, wherein the first path is any path in the directed cyclic graph; Determine a first probability of the target indicator information appearing in a first path in the directed cyclic graph; Obtaining a first product of the first proportion and the first probability; Obtaining a first sum of the products of the proportion of different paths in the directed cyclic graph to all paths and the probability of occurrence of target indicator information in different paths in the directed cyclic graph; Obtaining a second product of the first product and the reciprocal of the first sum, where the second product is the technical weight of the first path; Repeat the above steps until the technical weights of all paths in the directed cyclic graph are obtained.

3. The method according to claim 1, characterized in that The historical transaction data is represented by a plurality of directed cyclic graphs, one directed cyclic graph corresponds to one transaction scenario, and determining the business weights of all paths in the directed cyclic graph according to the historical transaction data includes: Determine a second ratio of a second path in the first directed cyclic graph to all paths in the first directed cyclic graph, the second path being any path in the first directed cyclic graph; Determining a third ratio of the first directed cyclic graph to all directed cyclic graphs; Obtain a second sum of the second ratio and the third ratio, where the second sum is a service weight of the second path; Repeat the above steps until the business weights of all paths in all directed cyclic graphs are obtained.

4. The method according to claim 1, characterized in that The determining the ring weights of all paths in the directed cyclic graph according to the historical transaction data includes: Determine the number of directed cycles in a third path in the directed cyclic graph, wherein the third path is any path in the directed cyclic graph; Determine the number of nodes in the third path in the directed cyclic graph; Obtaining a third product of the number of directed rings and the reciprocal of the number of nodes, the third product being the ring weight of the third path; Repeat the above steps until the ring weights of all paths in the directed cyclic graph are obtained.

5. The method according to claim 1, characterized in that The determining the resources required for the transaction according to the technical weight, the business weight and the ring weight includes: Determine the comprehensive scores of different paths in the directed cyclic graph according to the technical weight, the business weight and the ring weight; Determine a fourth path of the directed cyclic graph according to the comprehensive score, wherein the fourth path is a path with the highest comprehensive score in the directed cyclic graph; The resources of the fourth path are determined according to the technical weight, the business weight, the ring weight and the comprehensive score.

6. The method according to claim 5, characterized in that Determining the comprehensive scores of different paths in the directed cyclic graph according to the technical weight, the business weight, and the ring weight includes: Determine the technical weight variance, business weight variance and ring weight variance of the fifth path according to the technical weight, business weight and ring weight of the fifth path in the directed cyclic graph, wherein the fifth path is any path in the directed cyclic graph; Obtaining a fourth product of the technology weight and the technology weight variance; Obtaining a fifth product of the business weight and the business weight variance; Obtaining a sixth product of the ring weight and the ring weight variance; Obtaining a third sum of the technical weight variance, the business weight variance, and the ring weight variance; obtaining a fourth sum of the fourth product, the fifth product, and the sixth product; Obtaining a seventh product of the fourth sum and the reciprocal of the third sum, wherein the seventh product is a comprehensive score of the fifth path; Repeat the above steps until the comprehensive scores of all paths in the directed cyclic graph are obtained.

7. The method according to claim 5, characterized in that The determining of the resources of the fourth path according to the technical weight, the business weight, the ring weight and the comprehensive score includes: Obtaining an eighth product of the business weight variance of the fourth path and the business weight of the fourth path; Obtaining a ninth product of the ring weight variance of the fourth path and the ring weight of the fourth path; Obtaining a tenth product of the eighth product and the first preset value; Obtaining an eleventh product of the ninth product and the first preset value; Obtaining a fifth sum of the tenth product, the eleventh product, and the second preset value; The twelfth product of the fifth sum and the default resource is obtained, and the twelfth product is the resource of the fourth path.

8. A resource calculation device, characterized in that: The device comprises: An acquisition module, used to acquire customer indicator data and historical transaction data, wherein the customer indicator data and the historical transaction data are represented by a directed cyclic graph, the directed cyclic graph includes one or more paths for representing transactions, and each path includes one or more nodes for representing transaction operations; A processing module is used to determine the technical weights of all paths in the directed cyclic graph based on the customer indicator data; and determine the business weights of all paths in the directed cyclic graph based on the historical transaction data; and determine the ring weights of all paths in the directed cyclic graph based on the historical transaction data; and determine the resources required for the transaction based on the technical weights, the business weights and the ring weights.

9. A computer, characterized in that: include: A memory, a processor, and an executable program code stored in the memory and executable on the processor, wherein the processor executes the steps of the resource calculation method according to any one of claims 1 to 7 when executing the executable program code.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a resource calculation program, wherein the resource calculation program includes execution instructions, and the execution instructions are used to execute the steps of the resource calculation method according to any one of claims 1 to 7.