Transaction quota processing method and device

By using the Redis cache to quickly obtain the remaining amount of transaction requests in the transaction processing system, the problem of long transaction limit after database load is solved, and the transaction processing efficiency is improved.

CN119379436APending Publication Date: 2025-01-28BEIJING PACTERA JINXIN TECH LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411419509.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-11
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

When the transaction processing system receives multiple transaction requests, the database load is too high, resulting in a long result of whether the transaction request passes the limit verification.

Method used

By cache in the available state, according to the product logo, the institutional information of the product, and the logo of the target channel, obtain the first remaining amount of the product in the type of sale amount from the Redis cache. Essence

Benefits of technology

When the Redis cache is available, avoid accessing the database, quickly obtain the remaining quota, and improve whether the transaction request is efficient through a limit check.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119379436A_ABST
    Figure CN119379436A_ABST
Patent Text Reader

Abstract

The invention provides a transaction quota processing method and device, and the method comprises the steps: obtaining a corresponding sales quota type of a product on a target channel of a sales institution after a transaction request for purchasing a specified share of a product through the target channel of the sales institution is received, and enabling the sales quota type of the product on the target channel of the sales institution to be in an available state under the condition that a Redis cache is in an available state; according to the identifier of the product, the mechanism information of the selling mechanism and the identifier of the target channel, obtaining a first remaining quota of the product in the selling quota type from a Redis cache; and judging whether the transaction request passes limit verification or not according to the first residual limit and the specified share. Therefore, under the condition that the Redis cache is in the available state, the transaction request does not need to access the database, and the remaining quota corresponding to the corresponding transaction request can be quickly obtained from the Redis cache, so that the efficiency of obtaining the result of whether the transaction request passes the quota verification or not can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a transaction limit processing method and device. Background Art

[0002] When a transaction processing system receives a transaction request, the transaction request usually directly accesses the transaction database in the transaction system to obtain the corresponding remaining amount, and determines whether the transaction request passes the limit check based on the remaining amount and the share of the product requested to be purchased by the transaction request. However, when the transaction processing system receives multiple transaction requests, since all transaction requests directly access the database, the database load is very high, and the remaining amount of the corresponding transaction request cannot be quickly obtained, which makes it take a long time for the transaction processing system to obtain the result of whether the corresponding transaction request passes the limit check. Therefore, how to improve the efficiency of the transaction processing system in obtaining the result of whether the corresponding transaction request passes the limit check is a technical problem that urgently needs to be solved. Summary of the invention

[0003] The present application proposes a transaction limit processing method and device.

[0004] In one aspect, an embodiment of the present application proposes a transaction limit processing method, the method comprising: receiving a transaction request, wherein the transaction request is used to request the purchase of a specified share of a product through a target channel of an issuing organization; obtaining a sales quota type corresponding to the product on the target channel of the issuing organization based on an identification of the product, the organization information of the issuing organization, and an identification of the target channel; when the Redis cache is in an available state, obtaining a first remaining amount of the product on the sales quota type from the Redis cache based on the identification of the product, the organization information of the issuing organization, and the identification of the target channel; and judging whether the transaction request passes the limit check based on the first remaining amount and the specified share.

[0005] On the other hand, an embodiment of the present application proposes a transaction limit processing device, which includes: a receiving module, used to receive a transaction request, wherein the transaction request is used to request the purchase of a specified share of a product through a target channel of an issuing organization; a first acquisition module, used to acquire the type of issuance quota corresponding to the product on the target channel of the issuing organization according to an identification of the product, the organization information of the issuing organization and the identification of the target channel; a second acquisition module, used to acquire a first remaining amount of the product on the issuance quota type from the Redis cache according to the identification of the product, the organization information of the issuing organization and the identification of the target channel when the Redis cache is in an available state; and a first judgment module, used to judge whether the transaction request passes the limit check according to the first remaining amount and the specified share.

[0006] On the other hand, an embodiment of the present application proposes an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the transaction limit processing method disclosed in the embodiment of the present application when executing the computer program.

[0007] On the other hand, an embodiment of the present application proposes a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the transaction limit processing method disclosed in the embodiment of the present application is implemented.

[0008] On the other hand, an embodiment of the present application proposes a computer program product, including a computer program, which, when executed by a processor, implements the transaction limit processing method disclosed in the embodiment of the present application.

[0009] The technical solution provided by the embodiments of the present application brings at least the following beneficial effects:

[0010] After receiving a transaction request requesting to purchase a specified share of a product through a target channel of an issuing institution, the type of sales quota corresponding to the product on the target channel of the issuing institution is obtained based on the product identification, the issuing institution's institutional information, and the identification of the target channel, and when the Redis cache is in an available state, the first remaining amount of the product on the sales quota type is obtained from the Redis cache based on the product identification, the issuing institution's institutional information, and the identification of the target channel; based on the first remaining amount and the specified share, it is determined whether the transaction request has passed the limit check. Therefore, when the Redis cache is in an available state, the transaction request does not need to access the database, and the remaining amount corresponding to the corresponding transaction request can be quickly obtained from the Redis cache, thereby improving the efficiency of obtaining the result of whether the transaction request has passed the limit check.

[0011] Other effects of the above optional manner will be described below in conjunction with specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present application.

[0013] Figure 1 It is a flowchart of a transaction limit processing method according to an embodiment of the present application.

[0014] Figure 2 It is a flowchart of a transaction limit processing method according to another embodiment of the present application.

[0015] Figure 3 It is a flowchart of a transaction limit processing method according to another embodiment of the present application.

[0016] Figure 4 It is a structural diagram of a transaction limit processing device according to an embodiment of the present application.

[0017] Figure 5 It is a schematic diagram of the structure of an electronic device shown in an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0018] Embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.

[0019] The transaction limit processing method and device of the embodiment of the present application are described below with reference to the accompanying drawings.

[0020] Figure 1 It is a flowchart of a transaction limit processing method according to an embodiment of the present application. It should be noted that the execution subject of the transaction limit processing method provided in this embodiment is a transaction limit processing device, which can be implemented by software and / or hardware. The transaction limit processing device in this embodiment can be a transaction processing system, or can be configured in a transaction processing system. The transaction processing system can be configured in an electronic device.

[0021] The electronic devices in this example embodiment may include terminal devices, servers, etc., wherein the terminal devices may be PCs (Personal Computers), mobile devices, tablet computers, etc., and this embodiment does not specifically limit this.

[0022] like Figure 1 As shown, the transaction limit processing method may include:

[0023] Step 101, receiving a transaction request, wherein the transaction request is used to request to purchase a specified share of a product through a target channel of a selling organization.

[0024] It should be noted that the transaction request in this embodiment includes the organization information of the issuing organization, the identification of the product, and the identification of the target channel.

[0025] Among them, the product in this embodiment refers to the product sold by the issuing institution. For example, the issuing institution is Bank A in the financial field. Correspondingly, the product can be a large-denomination certificate of deposit or structured deposit and other products sold by Bank A. This embodiment does not make any specific limitation on this.

[0026] The product identification is used to uniquely identify the product. For example, the product number can be used to represent the product identification.

[0027] The identifier of the target channel is used to uniquely identify the target channel. For example, the identifier of the target channel may be represented by the channel value of the target channel. This embodiment does not specifically limit the identifier of the target channel.

[0028] The institution information in this embodiment refers to information related to the issuing institution. For example, the institution information may include the identification and institution type of the issuing institution.

[0029] The identifier of the issuing organization is used to uniquely identify the issuing organization. For example, the identifier of the issuing organization can be represented by the identifier of the issuing organization. This embodiment does not specifically limit the identifier of the issuing organization.

[0030] It is understandable that different issuing institutions have different corresponding logos.

[0031] Step 102, based on the product identification, the organization information of the issuance organization and the identification of the target channel, obtain the sales quota type corresponding to the product on the target channel of the issuance organization.

[0032] In this embodiment, the sales quota type corresponding to the product identification, the sales organization's institutional information and the target channel identification can be obtained from the pre-saved correspondence between the product identification, institutional information, channel identification and sales quota type. The obtained sales quota type is the sales quota type corresponding to the product on the target channel of the sales organization.

[0033] Step 103, when the Redis cache is in an available state, the first remaining amount of the product in the sales amount type is obtained from the Redis cache according to the product identification, the organization information of the sales organization and the identification of the target channel.

[0034] In one embodiment of the present application, it can be determined whether the Redis cache is in an available state, and if the Redis cache is in an available state, the first remaining amount of the product in the issuance amount type can be obtained from the Redis cache based on the product identification, the organization information of the issuance organization, and the identification of the target channel.

[0035] In one embodiment of the present application, whether the Redis cache is in an available state can be determined based on the status mark value of the status flag of the Redis cache, wherein if the status mark value of the status flag is a first status mark value, it is determined that the Redis cache is in an available state; if the status mark value of the status flag is a second status mark value, it is determined that the Redis cache is in an unavailable state.

[0036] In this embodiment, the first state mark value and the second state mark value are different. For example, the first state mark value is 1, and the corresponding second state mark value is 0. For another example, the first state mark value is 0, and the corresponding second state mark value is 1.

[0037] It should be noted that the data in the Redis cache is stored in the memory, so the access speed is very fast. Therefore, the speed of obtaining the first remaining amount of the product in the sales quota type from the Redis cache is much faster than the speed of obtaining the remaining amount of the product in the sales quota type from the database.

[0038] It should be noted that the issuance quota type in this embodiment can be at least one of the following: institution-exclusive quota, institution superior quota, single-channel quota, full-channel quota and combined shared quota.

[0039] Among them, the institutional exclusive quota refers to the issuance quota exclusive to a specific institution, which is only for use by that institution.

[0040] Among them, the superior quota of the institution refers to the quota allocated by the superior institution to the subordinate institution for use.

[0041] Among them, the single-channel quota refers to the sales quota unique to a specific channel, and is used when entering the channel.

[0042] Among them, the full-channel quota refers to the sales quota that can be used by all channels.

[0043] Among them, the combined shared quota refers to the combination of multiple different types of quotas. For example, the quotas issued by mobile channels and counter channels can be combined for use.

[0044] The first remaining amount refers to the remaining amount of the product in the sales quota type obtained from the Redis cache based on the product identification, the organization information of the sales organization, and the identification of the target channel. That is to say, in this embodiment, the remaining amount of the product in the sales quota type obtained from the Redis cache is called the first remaining amount.

[0045] Step 104: Determine whether the transaction request passes the limit check based on the first remaining amount and the designated share.

[0046] In one embodiment of the present application, when the issuance quota type is one, a possible implementation method for determining whether a transaction request passes the quota check based on the first remaining quota and the designated share is: judging whether the first remaining quota is greater than the designated share; when the first remaining quota is greater than or equal to the designated share, determining that the transaction request passes the quota check; when the first remaining quota is less than the designated share, determining that the transaction request does not pass the quota check.

[0047] In addition, when the transaction request passes the limit check, in order to update the remaining amount in time and avoid transaction conflicts, the first remaining amount in the Redis cache can be updated according to the specified share.

[0048] Specifically, a first difference value obtained by subtracting a specified share from the first remaining amount may be obtained, and the first remaining amount in the Redis cache may be updated to the first difference value.

[0049] In one embodiment of the present application, when there are multiple issuance quota types, a possible implementation method for determining whether a transaction request passes the quota check based on the first remaining quota and the specified share is: summing up the remaining quotas of the product in each issuance quota type to obtain a sum result, and when the sum result is greater than or equal to the specified share, determining that the transaction request passes the quota check; when the sum result is less than the specified share, determining that the transaction request does not pass the quota check.

[0050] In one embodiment of the present application, when there are multiple issuance quota types, another possible implementation method for determining whether a transaction request passes the limit check based on the first remaining quota and the designated share is: obtaining the usage order of multiple issuance quota types corresponding to the product on the target channel of the issuance institution, and traversing the multiple issuance quota types according to the usage order, and determining the first target quota to be used by the product on the current issuance quota type for the traversed current issuance quota type, wherein, when the current issuance quota type is the first issuance quota type traversed, the designated share is used as the first target quota to be used by the product on the current issuance quota type; when the current issuance quota type is not the first issuance quota type traversed, the difference between the quota to be used by the product on the previous issuance quota type and the remaining quota is used as the first target quota to be used by the product on the current issuance quota type, wherein the usage order of the previous issuance quota type and the current issuance quota type are the same. Types are adjacent; when the first remaining amount of the product on the current issuance quota type is greater than or equal to the first target amount of the product on the current issuance quota type, it is determined that the transaction request has passed the limit check and the traversal is ended; when the first remaining amount of the product on the current issuance quota type is less than the first target amount to be used by the product on the current issuance quota type, the next issuance quota type in the multiple issuance quota types that is adjacent to the current issuance quota type in the order of use is used as the current issuance quota type, and jump to the step of determining the first target amount to be used by the product on the current issuance quota type, until it is determined that the transaction request has passed the limit check, or it is determined that the transaction request has not passed the limit check; wherein, when the current issuance quota type is the last issuance quota type traversed, and the remaining amount of the product on the last issuance quota type is less than the amount to be used on the last issuance quota type, it is determined that the transaction request has not passed the limit check.

[0051] For example, the specified share of the product requested to be purchased in the transaction request is 800. Assume that there are five types of issuance quotas, namely: institution-exclusive quota, institution-superior quota, single-channel quota, omni-channel quota and combination quota. In addition, the order of use of these five types of issuance quotas is: first use the institution-exclusive quota, then the institution-superior quota, then the single-channel quota, then the omni-channel quota, and finally the combination quota. Assuming that the remaining quota of each issuance quota type is 200, correspondingly, the above five issuance quota types can be traversed based on the order of use. First, the institution's exclusive quota is traversed, and the specified share can be used as the quota to be used on the institution's exclusive quota of the product, that is, the quota to be used by the product on the institution's exclusive quota is 800. Correspondingly, the quota to be used on the institution's exclusive quota and the remaining quota are compared, and it can be learned that 800 is greater than 200. At this time, the second issuance quota type will continue to be traversed, that is, the institution's superior quota will continue to be traversed. According to the difference between the quota to be used by the product on the institution's exclusive quota and the remaining quota, it can be determined that the quota to be used by the product on the institution's superior quota is 600. By comparing the quota to be used by the product on the institution's superior quota and the remaining quota, it can be learned that 600 >200, continue to traverse the next issuance quota type, the next issuance quota type is the single-channel quota, according to the difference between the quota to be used by the product on the institution's superior quota and the remaining quota, it can be determined that the quota to be used by the product on the single-channel quota is 400, and the quota to be used by the product on the single-channel quota and the remaining quota are compared, it can be known that 400>200, then continue to traverse the next issuance quota type, the next issuance quota type is the omni-channel quota, according to the difference between the quota to be used by the product on the single-channel quota and the remaining quota, it can be determined that the quota to be used by the product on the omni-channel quota is 200, and the quota to be used by the product on the omni-channel quota and the remaining quota are compared, it can be known that the two are equal. At this time, it can be determined that the transaction request has passed the limit check and the traversal ends.

[0052] In one embodiment of the present application, in order to update the remaining amount in a timely manner and avoid transaction conflicts, the first remaining amount of the product in the Redis cache at the current issuance amount type is updated according to the first target amount.

[0053] Among them, it can be understood that after taking the difference between the amount to be used by the product on the previous issuance quota type and the remaining amount as the first target amount, the remaining amount of the product on the previous issuance quota type in the Redis cache can also be updated according to the amount to be used by the product on the previous issuance quota type. In this way, the remaining amount of the previous issuance quota type is updated, transaction conflicts are avoided, and the accuracy of transaction processing is improved.

[0054] In one embodiment of the present application, a possible implementation method for obtaining the usage order of multiple sales quota types corresponding to a product on a target channel of a sales agency is: according to the product identification, the identification of the target channel and the institutional information of the sales agency, the usage order of the sales quota types is determined from the product quota sequence configuration information.

[0055] It should be noted that the product quota sequence configuration information in this embodiment can be dynamically configured according to actual needs.

[0056] In some embodiments, a possible implementation method for configuring the usage order of multiple issuance quota types in the product quota sequence configuration information is: receiving a configuration request, wherein the configuration request is used to request configuration of the usage order for multiple issuance quota types; and determining the usage order of multiple issuance quota types in the product quota sequence configuration information according to the configuration request. Thus, the corresponding user can conveniently dynamically configure the usage order of multiple issuance quota types in the product quota sequence configuration information by sending a configuration request.

[0057] In some embodiments, when the product quota sequence configuration information is stored in the form of a table, the table used to store the product quota sequence configuration information may be referred to as a product quota sequence configuration information table.

[0058] Among them, an example of the product quota sequence configuration information table is shown in Table 1.

[0059] Table 1 Product quota sequence configuration information table

[0060]

[0061] Among them, it should be noted that if the multiple issuance quota types of the product include combination quotas, the combination rules of the product in the combination quota can also be configured in the product combination quota configuration information. For example, the product number of the product is P01, and the combination number corresponding to the combination quota of the product on the target channel of the issuing institution is determined to be A0001, and the target channel can be a mobile phone channel. Correspondingly, the combination rules corresponding to the combination quota can be: combining the issuance quota of the institution's exclusive quota and the institution's superior quota, or combining the issuance quotas of the mobile phone channel and the counter channel.

[0062] In some embodiments, when the product combination quota configuration information is stored in the form of a table, the table used to store the product combination quota configuration information may be referred to as a product combination quota configuration information table (which may be referred to as a product combination quota configuration table for short).

[0063] Among them, an example of the product combination quota configuration information table is shown in Table 2.

[0064] Table 2 Product portfolio quota configuration information table

[0065] Product Number Combination No. Combination Type Shared Member Type Shared Members P01 A0001 channel channel Mobile Channel P01 A0001 channel channel Counter Channel P01 A0002 Branches Branches Exclusive quota for institutions P01 A0002 Branches Branches Institutional superior quota P01 A0003 all Branches Exclusive quota for institutions P01 A0004 all channel Mobile Channel

[0066] The transaction limit processing method provided in the embodiment of the present application, after receiving a transaction request requesting to purchase a specified share of a product through a target channel of a selling organization, obtains the sales quota type corresponding to the product on the target channel of the selling organization according to the product identification, the organization information of the selling organization and the identification of the target channel, and when the Redis cache is in an available state, obtains the first remaining amount of the product in the sales quota type from the Redis cache according to the product identification, the organization information of the selling organization and the identification of the target channel; and determines whether the transaction request passes the limit check according to the first remaining amount and the specified share. Thus, when the Redis cache is in an available state, the transaction request does not need to access the database, and the remaining amount corresponding to the corresponding transaction request can be quickly obtained from the Redis cache, thereby improving the efficiency of obtaining the result of whether the transaction request passes the limit check.

[0067] Figure 2 It is a flowchart of a transaction limit processing method according to another embodiment of the present application.

[0068] like Figure 2 As shown, the method may include:

[0069] Step 201, receiving a transaction request, wherein the transaction request is used to request to purchase a specified share of a product through a target channel of a selling organization.

[0070] Step 202, based on the product identification, the organization information of the issuance organization and the identification of the target channel, obtain the sales quota type corresponding to the product on the target channel of the issuance organization.

[0071] It should be noted that, for the specific description of step 201 and step 202, reference may be made to the relevant description in other embodiments, which will not be repeated here.

[0072] Step 203, according to the product identification, the organization information of the issuing organization and the identification of the target channel, the transaction limit of the product in the issuing quota type is obtained from the database.

[0073] In one embodiment of the present application, when the above-mentioned issuance quota type is any one of the institution-exclusive quota, institution superior quota, single-channel quota, and omni-channel quota, the transaction limit of the product on the issuance quota type is obtained from the product quota usage registration book in the database based on the product identification, the institutional information of the issuing institution and the identification of the target channel.

[0074] In one embodiment of the present application, when the above-mentioned issuance quota type is a combination quota, the combination identifier corresponding to the combination quota can be obtained from the database based on the product identifier, the institutional information of the issuing institution and the identifier of the target channel, and based on the combination identifier and the product identifier, the transaction limit of the product on the combination quota can be obtained from the product combination quota usage registration book in the database.

[0075] Step 204, generating a quota usage record according to the product identification, the organization information of the issuing organization, the identification of the target channel, the type of the issuing quota and the second target quota, and adding the generated quota usage record to the quota usage detail record data.

[0076] The second target amount is the minimum amount between the transaction limit and the first target amount. That is, the second target amount is the minimum amount between the transaction limit and the first target amount, that is, the minimum amount between the transaction limit and the first target amount is taken as the second target amount.

[0077] Step 205, determine whether the Redis cache is in an available state, if so, execute step 206, otherwise execute step 208.

[0078] Step 206, according to the product identification, the organization information of the issuing organization and the identification of the target channel, obtain the first remaining amount of the product in the issuing amount type from the Redis cache.

[0079] Step 207: Determine whether the transaction request passes the limit check based on the first remaining amount and the designated share.

[0080] It should be noted that, for the specific description of steps 205 to 207, reference may be made to the relevant descriptions in other embodiments, which will not be repeated here.

[0081] Step 208, based on the product identification, the organization information of the issuing organization, the identification of the target channel and the issuing quota type, obtain multiple quota usage records of the product on the issuing quota type from the quota usage detail record data.

[0082] Step 209, summing up the second target quotas contained in each of the plurality of quota usage records to obtain the cumulative used quota of the product in the sales quota type.

[0083] Step 210, determining the second remaining amount of the product in the sales amount type from the database according to the product identification, the organization information of the sales organization and the identification of the target channel.

[0084] In this embodiment, the remaining amount of the product in the sales amount type obtained from the database is referred to as the second remaining amount.

[0085] In one embodiment of the present application, when the above-mentioned issuance quota type is any one of the institution-exclusive quota, institution superior quota, single-channel quota, and omni-channel quota, the second remaining quota of the product for this issuance quota type is obtained from the product quota usage registration book in the database based on the product identification, the institutional information of the issuance institution, and the identification of the target channel.

[0086] In one embodiment of the present application, when the above-mentioned issuance quota type is a combination quota, the combination identifier corresponding to the combination quota can be obtained from the database based on the product identifier, the institutional information of the issuance agency and the identifier of the target channel, and based on the combination identifier and the product identifier, the second remaining quota of the product on the combination quota can be obtained from the product combination quota usage registration book of the database.

[0087] Step 211: Determine whether the transaction request passes the limit check based on the second remaining limit and the accumulated used limit.

[0088] In one embodiment of the present application, when the issuance quota type is one, a possible implementation method of determining whether the transaction request passes the quota check according to the second remaining quota and the accumulated used quota is: determining whether the accumulated used quota is less than or equal to the second remaining quota, and if so, determining that the transaction request passes the quota check. If not, that is, if the accumulated used quota is greater than the second remaining quota, determining that the transaction request does not pass the quota check.

[0089] In one embodiment of the present application, when there are multiple issuance quota types, a possible implementation method for determining whether a transaction request has passed the quota check is based on the second remaining quota and the cumulative used quota: summing up the second remaining quota of the product in each issuance quota type to obtain a first summing result, and summing up the cumulative used quota of the product in each issuance quota type to obtain a second summing result; if the second summing result is less than or equal to the first summing result, it is determined that the transaction request has passed the quota check; if the second summing result is greater than the first summing result, it is determined that the transaction request has not passed the quota check.

[0090] In one embodiment of the present application, when there are multiple issuance quota types, a possible implementation method for determining the first target quota to be used for the product on the issuance quota type based on the specified share is: obtain the usage order of the multiple issuance quota types corresponding to the product on the target channel of the issuance institution, and traverse the multiple issuance quota types according to the usage order; for the current issuance quota type traversed, determine the first target quota to be used by the product on the current issuance quota type, wherein, when the current issuance quota type is the first issuance quota type traversed, the specified share is used as the first target quota; when the current issuance quota type is not the first issuance quota type traversed, the difference between the quota to be used by the product on the previous issuance quota type and the remaining quota is used as the first target quota, wherein the usage order of the previous issuance quota type is adjacent to the current issuance quota type. Correspondingly, the implementation method of judging whether the transaction request passes the limit check based on the second remaining amount and the cumulative used amount is as follows: when the cumulative used amount of the product on the current issuance quota type is less than or equal to the second remaining amount of the product on the current issuance quota type, determine that the transaction request passes the limit check and end the traversal; when the cumulative used amount of the product on the current issuance quota type is greater than the second remaining amount of the product on the current issuance quota type, take the next issuance quota type among the multiple issuance quota types that is adjacent to the current issuance quota type in the order of use as the current issuance quota type, and jump to the step of determining the first target amount to be used for the product on the current issuance quota type, until it is determined that the transaction request passes the limit check, or it is determined that the transaction request does not pass the limit check.

[0091] Among them, when the current issuance quota type is the last issuance quota type traversed, and the difference between the transaction limit and the cumulative used quota of the product on the last issuance quota type is equal to zero, it is determined that the transaction request has not passed the limit verification of the first remaining quota of the product on the current issuance quota type.

[0092] In this embodiment, after receiving a transaction request, it is determined whether the Redis cache is in an available state, and if the Redis cache is in an available state, the corresponding remaining amount is obtained from the Redis cache, and if the Redis cache is in an unavailable state, the corresponding remaining amount is obtained from the database, and based on the obtained remaining amount, the transaction request is subjected to a limit check. Thus, if the Redis cache is in an available state, the transaction request can obtain the corresponding remaining amount from the Redis cache without accessing the database, and only if the Redis cache is in an unavailable state, the corresponding remaining amount is obtained from the database, thereby reducing the access pressure on the database while improving the efficiency of obtaining the corresponding remaining amount.

[0093] In order to clearly understand this application, Figure 3 The transaction limit processing method of this embodiment is described in an exemplary manner. It should be noted that in this embodiment, the transaction limit processing method is described in an exemplary manner by taking the case where there are multiple types of issuance quotas as an example.

[0094] Figure 3 It is a flowchart of a transaction limit processing method according to another embodiment of the present application.

[0095] like Figure 3 As shown, the method may include:

[0096] Step 301, receiving a transaction request, wherein the transaction request is used to request to purchase a specified share of a product through a target channel of a selling organization.

[0097] Step 302, based on the product identification, the organization information of the issuing organization and the identification of the target channel, obtain multiple issuance quota types corresponding to the product on the issuing organization's target channel and the corresponding usage order from the product quota sequence configuration information.

[0098] Step 303, traverse multiple issuance quota types according to the order of use.

[0099] Step 304, for the traversed current issuance quota type, according to the product identification, the organization information of the issuance organization and the identification of the target channel, the transaction limit of the product on the current issuance quota type is obtained from the database.

[0100] Step 305, determining the first target quota to be used for the product based on the current issuance quota type.

[0101] In this embodiment, when the current issuance quota type is the first current issuance quota type traversed, the designated share is used as the first target quota to be used for the product on the current issuance quota type.

[0102] In other embodiments, when the current issuance quota type is not the first current issuance quota type traversed, the difference between the quota to be used by the product on the previous issuance quota type and the remaining quota is used as the first target quota to be used by the product on the current issuance quota type, wherein the usage order of the previous issuance quota type is adjacent to the current issuance quota type.

[0103] Step 306, generates a quota usage record based on the product identification, the issuing agency's institutional information, the target channel identification, the current issuance quota type and the second target quota, and adds the generated quota usage record to the quota usage detail record data, wherein the second target quota is the minimum quota between the transaction limit and the first target quota.

[0104] In this embodiment, the minimum amount between the transaction limit of the product under the current issuance amount type and the first target amount may be referred to as the second target amount.

[0105] Step 307, determine whether the Redis cache is in an available state, if so, execute step 308, otherwise execute step 312.

[0106] Step 308, according to the product identification, the organization information of the issuing organization and the identification of the target channel, obtain the first remaining amount of the product in the current issuing amount type from the Redis cache.

[0107] Step 309, determine whether the first remaining amount of the product in the current issuance amount type is greater than or equal to the first target amount of the product in the current issuance amount type, if so, execute step 310, otherwise execute step 311.

[0108] Step 310, determine whether the transaction request passes the limit check, and end the traversal.

[0109] In this embodiment, in order to avoid transaction conflicts and improve processing accuracy, after determining that the transaction request passes the limit check, the first remaining amount of the product in the current issuance amount type in the Redis cache can also be updated according to the first target amount of the product in the current issuance amount type.

[0110] Step 311, use the next issuance quota type in the usage order of multiple issuance quota types adjacent to the current issuance quota type as the current issuance quota type, and jump to step 305 until it is determined that the transaction request passes the limit check, or it is determined that the transaction request does not pass the limit check.

[0111] Among them, when the current issuance quota type is the last issuance quota type traversed, and the remaining quota of the product on the last issuance quota type is less than the quota to be used on the last issuance quota type, it is determined that the transaction request has not passed the limit check.

[0112] Among them, it can be understood that in order to avoid transaction conflicts and improve processing accuracy, after taking the difference between the amount to be used by the product in the previous issuance amount type and the remaining amount as the first target amount, the remaining amount of the product in the previous issuance amount type in the Redis cache can also be updated according to the amount to be used by the product in the previous issuance amount type.

[0113] Step 312, based on the product identification, the organization information of the issuing organization, the identification of the target channel and the current issuing quota type, obtain multiple quota usage records of the product on the current issuing quota type from the quota usage detail record data.

[0114] Step 313, summing up the second target quotas contained in each of the multiple quota usage records to obtain the cumulative used quota of the product under the current issuance quota type.

[0115] Step 314, determining the second remaining amount of the product in the current issuance amount type from the database according to the product identification, the organization information of the issuance organization and the identification of the target channel.

[0116] It should be noted that, for the specific description of step 314, reference may be made to the relevant descriptions in other embodiments, which will not be repeated here.

[0117] Step 315, determine whether the cumulative used amount of the product in the current issuance amount type is less than or equal to the second remaining amount of the product in the current issuance amount type. If so, execute step 316; otherwise, execute step 317.

[0118] Step 316, determine whether the transaction request passes the limit check, and end the traversal.

[0119] Step 317, use the next issuance quota type in the usage order of multiple issuance quota types adjacent to the current issuance quota type as the current issuance quota type, and jump to step 305 until it is determined that the transaction request passes the limit check, or it is determined that the transaction request does not pass the limit check.

[0120] Among them, when the current issuance quota type is the last issuance quota type traversed, and the difference between the product's transaction limit and the cumulative used quota on the last issuance quota type is equal to zero, it is determined that the transaction request has not passed the limit check.

[0121] In this embodiment, when the Redis cache is in an available state, the corresponding remaining amount can be obtained from the Redis cache, which can reduce the number of parallel transaction requests accessing the database and reduce the access pressure on the database. Moreover, when the Redis cache is in an unavailable state, the transaction processing system can continue to perform quota verification on the transaction request based on the corresponding remaining amount in the database. Therefore, it can be seen that this embodiment improves the quota processing capability of the transaction processing system while reducing the risk of quota processing of the transaction processing system by judging whether the Redis cache is in an available state and using different methods to determine whether the transaction request passes the quota verification according to the judgment result.

[0122] Figure 4 It is a structural diagram of a transaction limit processing device according to an embodiment of the present application.

[0123] like Figure 4As shown, the transaction limit processing device 400 may include:

[0124] The receiving module 401 is used to receive a transaction request, wherein the transaction request is used to request to purchase a specified share of a product through a target channel of a selling organization.

[0125] The first acquisition module 402 is used to acquire the sales quota type corresponding to the product on the target channel of the sales organization according to the product identification, the organization information of the sales organization and the identification of the target channel.

[0126] The second acquisition module 403 is used to acquire the first remaining amount of the product in the sales amount type from the Redis cache according to the product identification, the organization information of the sales organization and the identification of the target channel when the Redis cache is in an available state.

[0127] The first determination module 404 is used to determine whether the transaction request passes the limit check according to the first remaining amount and the specified share.

[0128] In one embodiment of the present application, the device may further include:

[0129] The third acquisition module is used to acquire the transaction limit of the product in the issuance quota type from the database according to the product identification, the organization information of the issuance organization and the identification of the target channel;

[0130] A first determination module, used to determine a first target quota to be used for the product in the issuance quota type according to the specified share;

[0131] The detailed record adding module is used to generate a quota usage record based on the product identification, the institutional information of the issuing organization, the identification of the target channel, the issuance quota type and the second target quota, and add the generated quota usage record to the quota usage detailed record data, wherein the second target quota is the minimum quota between the transaction limit and the first target quota.

[0132] In one embodiment of the present application, the device may further include:

[0133] The fourth acquisition module is used to obtain multiple quota usage records of the product on the sales quota type from the quota usage detail record data according to the product identification, the organization information of the sales organization, the identification of the target channel and the sales quota type when the Redis cache is unavailable;

[0134] A summing processing module, used for summing the second target quotas contained in each of the plurality of quota usage records to obtain the cumulative used quota of the product in the sales quota type;

[0135] A second determination module, configured to determine a second remaining amount of the product in the sales quota type from a database according to the product identification, the organization information of the sales organization and the identification of the target channel;

[0136] The second judgment module is used to judge whether the transaction request passes the limit verification according to the second remaining limit and the accumulated used limit.

[0137] In one embodiment of the present application, when there are multiple issuance quota types, the first determination module is specifically used to: obtain the usage order of multiple issuance quota types corresponding to the product on the target channel of the issuance institution; traverse the multiple issuance quota types according to the usage order; for the traversed current issuance quota type, when the current issuance quota type is the first current issuance quota type traversed, use the specified share as the first target quota to be used by the product on the current issuance quota type; when the current issuance quota type is not the first current issuance quota type traversed, use the difference between the quota to be used by the product on the previous issuance quota type and the remaining quota as the first target quota to be used by the product on the issuance quota type, wherein the usage order of the previous issuance quota type is adjacent to the current issuance quota type.

[0138] In one embodiment of the present application, the first judgment module 404 is specifically used to: when the first remaining amount of the product in the current issuance quota type is greater than or equal to the first target amount to be used by the product in the current issuance quota type, determine that the transaction request has passed the limit check and end the traversal; when the first remaining amount of the product in the current issuance quota type is less than the first target amount to be used by the product in the current issuance quota type, use the next issuance quota type in the multiple issuance quota types that is adjacent to the current issuance quota type in the order of use as the current issuance quota type, and jump to the step of determining the first target amount to be used by the product in the current issuance quota type, until it is determined that the transaction request has passed the limit check, or it is determined that the transaction request has not passed the limit check; wherein, when the current issuance quota type is the last issuance quota type traversed, and the remaining amount of the product in the last issuance quota type is less than the amount to be used in the last issuance quota type, it is determined that the transaction request has not passed the limit check.

[0139] In one embodiment of the present application, after determining that the transaction request passes the limit check, the device may also include: a first update module, used to update the first remaining quota of the product in the current issuance quota type in the Redis cache according to the first target quota to be used for the product in the current issuance quota type.

[0140] In one embodiment of the present application, after taking the difference between the amount to be used by the product in the last issuance amount type and the remaining amount as the first target amount, the device may also include: a second update module, used to update the remaining amount of the product in the last issuance amount type in the Redis cache according to the amount to be used by the product in the last issuance amount type.

[0141] In one embodiment of the present application, the first judgment module 404 is specifically used to: when the cumulative used amount of the product on the current issuance quota type is less than or equal to the second remaining amount of the product on the current issuance quota type, determine that the transaction request has passed the limit check and end the traversal; when the cumulative used amount of the product on the current issuance quota type is greater than the second remaining amount of the product on the current issuance quota type, use the next issuance quota type in the multiple issuance quota types that is adjacent to the current issuance quota type in the order of use as the current issuance quota type, and jump to the step of determining the first target amount to be used by the product on the current issuance quota type, until it is determined that the transaction request has passed the limit check, or it is determined that the transaction request has not passed the limit check; wherein, when the current issuance quota type is the last issuance quota type traversed, and the difference between the transaction limit and the cumulative used amount of the product on the last issuance quota type is equal to zero, it is determined that the transaction request has not passed the limit check.

[0142] In one embodiment of the present application, the order of use of multiple sales quota types corresponding to a product on a target channel of a sales agency is obtained, including: determining the order of use of the sales quota types from the product quota order configuration information based on the product identification, the target channel identification and the agency information of the sales agency.

[0143] In one embodiment of the present application, the device may further include:

[0144] A receiving module, used to receive a configuration request, wherein the configuration request is used to request configuration of a usage order for multiple issuance quota types;

[0145] The configuration module is used to determine the usage order of multiple issuance quota types in the product quota sequence configuration information according to the configuration request.

[0146] The transaction limit processing device provided in the embodiment of the present application, after receiving a transaction request requesting to purchase a specified share of a product through a target channel of a selling organization, obtains the sales quota type corresponding to the product on the target channel of the selling organization according to the product identification, the organization information of the selling organization and the identification of the target channel, and obtains the first remaining amount of the product in the sales quota type from the Redis cache according to the product identification, the organization information of the selling organization and the identification of the target channel when the Redis cache is in an available state; and determines whether the transaction request passes the limit check according to the first remaining amount and the specified share. Thus, when the Redis cache is in an available state, the transaction request does not need to access the database, and the remaining amount corresponding to the corresponding transaction request can be quickly obtained from the Redis cache, thereby improving the efficiency of obtaining the result of whether the transaction request passes the limit check.

[0147] According to an embodiment of the present application, the present application also provides an electronic device, wherein the electronic device includes: a processor; a memory for storing processor executable instructions; wherein the processor is configured to execute instructions to implement a transaction limit processing method as proposed in any of the aforementioned embodiments.

[0148] As an example, Figure 5 It is a schematic diagram of the structure of an electronic device shown in an exemplary embodiment of the present application.

[0149] like Figure 5 As shown, the electronic device 500 may further include:

[0150] The memory 510 and the processor 520, a bus 530 connecting different components (including the memory 510 and the processor 520), the memory 510 stores a computer program, and when the processor 520 executes the program, the transaction limit processing method of the embodiment of the present application is implemented.

[0151] Bus 530 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus and Peripheral Component Interconnect (PCI) bus.

[0152] The electronic device 500 typically includes a variety of electronic device readable media. These media can be any available media that can be accessed by the electronic device 500, including volatile and non-volatile media, removable and non-removable media.

[0153] The memory 510 may also include computer system readable media in the form of volatile memory, such as random access memory (RAM) 540 and / or cache memory 550. The electronic device 500 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 560 may be used to read and write non-removable, non-volatile magnetic media ( Figure 5 not shown, usually called a "hard drive"). Although Figure 5 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical medium) may be provided. In these cases, each drive may be connected to bus 530 via one or more data medium interfaces. Memory 510 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of each embodiment of the present application.

[0154] A program / utility 580 having a set (at least one) of program modules 570 may be stored, for example, in the memory 510, such program modules 570 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 570 generally perform the functions and / or methods of the embodiments described herein.

[0155] The electronic device 500 may also communicate with one or more external devices 590 (e.g., keyboard, pointing device, display 591, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 500, and / or communicate with any device that enables the electronic device 500 to communicate with one or more other computing devices (e.g., network card, modem, etc.). Such communication may be performed via an input / output (I / O) interface 592. In addition, the electronic device 500 may also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN) and / or public network, such as the Internet) via a network adapter 593. As shown, the network adapter 593 communicates with other modules of the electronic device 500 via a bus 530. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 500, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0156] The processor 520 executes various functional applications and data processing by running the programs stored in the memory 510 .

[0157] It should be noted that the implementation process and technical principles of the electronic device of this embodiment refer to the aforementioned explanation of the transaction limit processing method of the embodiment of the present application, and will not be repeated here.

[0158] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory including instructions, and the above instructions can be executed by a processor of an electronic device to complete the transaction limit processing method proposed in any of the above embodiments. Optionally, the computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0159] In an exemplary embodiment, a computer program product is also provided, including a computer program / instruction, and when the computer program / instruction is executed by a processor, the transaction limit processing method proposed in any of the above embodiments is implemented.

[0160] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0161] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A transaction limit processing method, characterized in that: The method comprises: Receiving a transaction request, wherein the transaction request is used to request to purchase a specified share of a product through a target channel of a selling organization; According to the identification of the product, the organization information of the issuing organization and the identification of the target channel, obtaining the type of the issuing quota corresponding to the product on the target channel of the issuing organization; When the Redis cache is in an available state, according to the identification of the product, the organization information of the issuing organization and the identification of the target channel, the first remaining amount of the product in the issuing amount type is obtained from the Redis cache; According to the first remaining amount and the designated share, it is determined whether the transaction request passes the limit check.

2. The method according to claim 1, characterized in that When the Redis cache is in an available state, before obtaining the first remaining amount of the product in the issuance amount type from the Redis cache according to the identification of the product, the organization information of the issuance organization, and the identification of the target channel, the method further includes: Acquire the transaction limit of the product in the issuance quota type from a database according to the identification of the product, the organization information of the issuance organization and the identification of the target channel; Determining, based on the designated share, a first target quota to be used by the product on the issuance quota type; A quota usage record is generated based on the product identification, the institutional information of the issuing organization, the identification of the target channel, the issuance quota type and the second target quota, and the generated quota usage record is added to the quota usage detail record data, wherein the second target quota is the minimum quota between the transaction limit and the first target quota.

3. The method according to claim 2, characterized in that The method further comprises: In the case where the Redis cache is unavailable, according to the identification of the product, the organization information of the issuing organization, the identification of the target channel and the type of the issuing quota, a plurality of quota usage records of the product on the issuing quota type are obtained from the quota usage detail record data; The second target quotas contained in each of the plurality of quota usage records are summed to obtain the cumulative used quota of the product for the issued quota type; Determining a second remaining amount of the product in the issuance amount type from a database according to the identification of the product, the organization information of the issuance organization, and the identification of the target channel; According to the second remaining credit limit and the accumulated used credit limit, it is determined whether the transaction request passes the credit limit check.

4. The method according to claim 3, characterized in that In the case where there are multiple types of issuance quotas, determining, according to the designated share, a first target quota to be used by the product on the issuance quota type includes: Obtaining the usage order of the multiple types of sales quotas corresponding to the product on the target channel of the sales organization; According to the usage order, traverse the multiple types of issuance quotas; For the current issuance quota type traversed, determine the first target quota to be used by the product on the current issuance quota type, and when the current issuance quota type is the first current issuance quota type traversed, use the designated share as the first target quota to be used by the product on the current issuance quota type; when the current issuance quota type is not the first current issuance quota type traversed, use the difference between the quota to be used by the product on the previous issuance quota type and the remaining quota as the first target quota to be used by the product on the current issuance quota type, wherein the usage order of the previous issuance quota type is adjacent to the current issuance quota type.

5. The method according to claim 4, characterized in that The determining, based on the first remaining amount and the designated share, whether the transaction request passes the limit check includes: In the case where the first remaining amount of the product in the current issuance amount type is greater than or equal to the first target amount to be used by the product in the current issuance amount type, determining that the transaction request passes the limit check and ending the traversal; In the case that the first remaining amount of the product in the current issuance amount type is less than the first target amount to be used by the product in the current issuance amount type, the next issuance amount type in the use order of the multiple issuance amount types adjacent to the current issuance amount type is used as the current issuance amount type, and the process jumps to the step of determining the first target amount to be used by the product in the current issuance amount type until it is determined that the transaction request passes the limit check, or it is determined that the transaction request fails the limit check; Among them, when the current issuance quota type is the last issuance quota type traversed, and the remaining quota of the product on the last issuance quota type is less than the quota to be used on the last issuance quota type, it is determined that the transaction request has not passed the limit check.

6. The method according to claim 5, characterized in that After determining that the transaction request passes the limit check, the method further includes: According to the first target quota to be used by the product on the current issuance quota type, the first remaining quota of the product on the current issuance quota type in the Redis cache is updated.

7. The method according to claim 5, characterized in that After taking the difference between the amount to be used for the product in the last issued amount type and the remaining amount as the first target amount, the method further includes: According to the amount to be used by the product on the last issuance amount type, the remaining amount of the product on the last issuance amount type in the Redis cache is updated.

8. The method according to claim 4, characterized in that The determining, based on the second remaining amount and the accumulated used amount, whether the transaction request passes the limit verification includes: In the case where the accumulated used amount of the product in the current issuance amount type is less than or equal to the second remaining amount of the product in the current issuance amount type, determining that the transaction request passes the limit check and ending the traversal; In the case that the accumulated used amount of the product on the current issuance amount type is greater than the second remaining amount of the product on the current issuance amount type, the next issuance amount type in the usage order adjacent to the current issuance amount type among the multiple issuance amount types is used as the current issuance amount type, and the process jumps to the step of determining the first target amount to be used by the product on the current issuance amount type until it is determined that the transaction request passes the limit check, or it is determined that the transaction request fails the limit check; Among them, when the current issuance quota type is the last issuance quota type traversed, and the difference between the transaction limit and the accumulated used quota of the product on the last issuance quota type is equal to zero, it is determined that the transaction request has not passed the limit check.

9. The method according to claim 4, characterized in that The obtaining of the usage order of the multiple types of sales quotas corresponding to the product on the target channel of the sales organization includes: According to the identification of the product, the identification of the target channel and the organization information of the issuing organization, the use order of the issuing quota types is determined from the product quota order configuration information.

10. The method according to claim 9, characterized in that The method further comprises: receiving a configuration request, wherein the configuration request is used to request configuration of a usage order for a plurality of the issuance quota types; According to the configuration request, the usage order of the multiple issuance quota types in the product quota sequence configuration information is determined.

11. A transaction limit processing device, characterized in that: The device comprises: A receiving module, used to receive a transaction request, wherein the transaction request is used to request to purchase a specified share of a product through a target channel of a selling institution; A first acquisition module is used to acquire the sales quota type corresponding to the product on the target channel of the sales institution according to the identification of the product, the organization information of the sales institution and the identification of the target channel; A second acquisition module is used to acquire, when the Redis cache is in an available state, the first remaining amount of the product in the issuance amount type from the Redis cache according to the identification of the product, the organization information of the issuance organization, and the identification of the target channel; The first judgment module is used to judge whether the transaction request passes the limit verification according to the first remaining amount and the designated share.

12. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method according to any one of claims 1 to 10 is implemented.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.

14. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 10 when being executed by a processor.