Transaction processing method and device, electronic equipment and computer readable storage medium
By analyzing user roles and target transactions in user requests, and using the first and second strings in the permission data table to determine transaction permissions, the problem of low efficiency in transaction permission management in the core system of traditional commercial banks is solved, and the rapid development of and efficient transaction permission detection.
Patent Information
- Application Number
- CN202411492568.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-10-24
AI Technical Summary
In the core system of traditional commercial banks, tellers need to quickly deposit and access transaction permissions, but due to the large number of transaction codes and different role permissions, it is difficult for existing technology to achieve fast and efficient transaction permission management.
By parsing user roles and target transactions in user requests, a single target character is determined using the first string in the permission data table (including multiple first characters, each character represents the permissions of multiple transactions) and converting it into a second character. String (each character represents the permissions of a single transaction) and determine the permission detection results based on the second string, thereby obtaining the target transaction in the database.
This method reduces the number of I/O operations, reduces the system resource usage, and improves the reading efficiency and permission detection speed of transaction permissions.
Smart Images

Figure CN119444228A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of big data technology, and more specifically to a transaction processing method, device, electronic device, computer-readable storage medium, and program product. Background Art
[0002] In the core system of traditional commercial banks, tellers provide corresponding services to customers by selecting transaction codes at the front end of the counter. Due to the complexity of banking services, there are usually nearly a thousand transaction codes for tellers to choose from, and tellers with different roles have different transaction permissions, so a faster method for accessing transaction permissions is needed. Summary of the invention
[0003] In view of the above problems, the present disclosure provides a transaction processing method, device, electronic device and computer-readable storage medium.
[0004] According to a first aspect of the present disclosure, a transaction processing method is provided, comprising: in response to receiving a request sent by a user, parsing the user role of the user and a target transaction to be acquired from the request; determining a first string of a target storage type matching the user role from a permission data table, wherein the first string includes a plurality of first characters, each of which is used to represent the transaction authority of a plurality of transactions, and the target storage type includes a string type with a character bit limit; according to the target transaction, determining a single first target character from the first string, wherein the first target character is used to represent the transaction authority of the target transaction and at least one other transaction; in a case where it is determined that the first target character is not a first preset character, converting the single first target character into a second string, wherein the second string includes a plurality of second characters, each of which is used to represent the transaction authority of a single transaction; according to the second string, determining a permission detection result of the target transaction; and in a case where the permission detection result is passed, acquiring the target transaction from a database.
[0005] According to an embodiment of the present disclosure, the method also includes: when it is determined that the first target character is a first preset character, determining that the permission detection result of the target transaction is failed, and returning an error message; wherein the first preset character is a character representing that the transaction permissions of multiple transactions corresponding to the first target character are all failed.
[0006] According to an embodiment of the present disclosure, a single first target character is determined from a first character string according to a target transaction, including: obtaining a transaction authority position table; determining an authority position of the target transaction from the transaction authority position table according to a transaction code of the target transaction; calculating a first position in the first character string corresponding to the target transaction according to the authority position based on a conversion relationship between a second character string and a first character string; and determining a first character located at a first position in the first character string as a first target character.
[0007] According to an embodiment of the present disclosure, determining an authority detection result of a target transaction based on a second character string includes: performing a modulo operation on an authority position based on a conversion relationship between the second character string and the first character string to obtain a remainder, wherein the remainder represents a second position of the target transaction in the second character string; determining a single second character located at the second position in the second character string as a second target character corresponding to the target transaction; and determining an authority detection result of the target transaction based on the second target character.
[0008] According to an embodiment of the present disclosure, the authority detection result of the target transaction is determined based on the second target character, including: when the second target character is the second preset character, determining the authority detection result is passed; when the second target character is the first preset character, determining the authority detection result is failed.
[0009] According to an embodiment of the present disclosure, before determining a first character string of a target storage type that matches a user role from a permission data table, the method further includes: determining a third character string that matches the user role from a business category permission table based on the user role, wherein the third character string includes a plurality of third characters, and each third character is used to represent data acquisition permissions for a single business category; obtaining a third target character corresponding to the target business category from the third character string based on the target business category to which the target transaction belongs; and obtaining the permission data table when the third target character represents that the user has data acquisition permissions for the target business category.
[0010] According to an embodiment of the present disclosure, when it is determined that the first target character is not a first preset character, converting a single first target character into a second string includes: when it is determined that the first target character is not a first preset character, converting the hexadecimal first target character into a binary second string, the second string including four second characters.
[0011] According to an embodiment of the present disclosure, the method also includes: in response to receiving a request to write permission data, obtaining permission data of a newly added user role according to the newly added user role in the request to write permission data; generating a fourth character string corresponding to the newly added user role according to the permission data, wherein the fourth character string includes multiple fourth characters, each fourth character is used to represent the transaction permission of a single transaction; converting the fourth character string into a fifth character string of shorter length; verifying the fifth character string to obtain a verification result; and when the verification result indicates that the conversion of the fifth character string is successful, writing the fifth character string into the permission data table.
[0012] A second aspect of the present disclosure provides a transaction processing device, including: a parsing module, for parsing the user role of the user and the target transaction to be acquired from the request in response to receiving an acquisition request sent by a user; a first determination module, for determining a first string of a target storage type that matches the user role from a permission data table, wherein the first string includes multiple first characters, each of which is used to represent the transaction authority of multiple transactions, and the target storage type includes a string type with a character bit limit; a second determination module, for determining a single first target character from the first string according to the target transaction, wherein the first target character is used to represent the transaction authority of the target transaction and at least one other transaction; a third determination module, for converting the single first target character into a second string when it is determined that the first target character is not a first preset character, wherein the second string includes multiple second characters, each of which is used to represent the transaction authority of a single transaction; a fourth determination module, for determining the authority detection result of the target transaction according to the second string; an acquisition module, for acquiring the target transaction from a database when the authority detection result is passed.
[0013] A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the above method.
[0014] The fourth aspect of the present disclosure further provides a computer-readable storage medium having a computer program or instructions stored thereon, which implements the steps of the above method when the above computer program or instructions are executed by a processor.
[0015] The fifth aspect of the present disclosure further provides a computer program product, including a computer program or instructions, which implement the steps of the above method when the above computer program or instructions are executed by a processor.
[0016] According to an embodiment of the present disclosure, the permission data table can store the first string through the target storage type (char). Therefore, when a user requests permission for a target transaction, there is no need to perform two I / O operations according to the storage method of the CLOB type. The first string can be directly obtained through only one I / O, which reduces the number of I / O operations, reduces the occupation of system resources, and improves the reading efficiency of transaction permissions. Afterwards, for the first string of the target storage type, it is faster to process the first target string in the memory to determine the permission detection result, so that the permission detection speed is further improved while improving the reading efficiency. In addition, before converting the first target character to the second character string, by comparing the first target character with the first preset character, it is helpful to save subsequent character conversion operations, so as to further improve the permission detection speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The above and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:
[0018] Figure 1 The application scenarios to which the transaction processing method disclosed herein can be applied are schematically shown;
[0019] Figure 2 A flowchart schematically shows a transaction processing method according to an embodiment of the present disclosure;
[0020] Figure 3 A flowchart of a method for determining a first target character according to an embodiment of the present disclosure is schematically shown;
[0021] Figure 4 A diagram schematically shows a correspondence relationship between a first character string and a second character string according to an embodiment of the present disclosure;
[0022] Figure 5 A flowchart schematically shows a method for obtaining a permission data table according to an embodiment of the present disclosure;
[0023] Figure 6 A process diagram of a method for converting a first target character and a second character string according to an embodiment of the present disclosure is schematically shown;
[0024] Figure 7 A flowchart of writing data into a permission data table according to an embodiment of the present disclosure is schematically shown;
[0025] Figure 8 A block diagram schematically shows a structure of a transaction processing device according to an embodiment of the present disclosure; and
[0026] Fig. 9 A block diagram of an electronic device suitable for implementing a transaction processing method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0027] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0028] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0029] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0030] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0031] In the embodiments of the present disclosure, the collection, updating, analysis, processing, use, transmission, provision, disclosure, storage, etc. of the data involved (for example, including but not limited to user personal information) are in compliance with the provisions of relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. In particular, necessary measures are taken for user personal information to prevent illegal access to user personal information data and maintain the security of user personal information, network security, and national security.
[0032] In the embodiments of the present disclosure, the user's authorization or consent is obtained before obtaining or collecting the user's personal information.
[0033] It should be noted that in the embodiments of the present disclosure, certain software, components, models and other existing solutions in the industry may be mentioned, which should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present disclosure, but it does not mean that the present disclosure has or will necessarily use the solution.
[0034] It should be noted that the transaction processing method and device disclosed herein can be used in transaction authority processing in the financial field, and can also be used in any related fields and scenarios other than the financial field. The application field of the transaction processing method and device disclosed herein is not limited.
[0035] In the concept of implementing the present disclosure, the binary string of the database is generally used to store the permission data. Each bit of the binary represents the permission to use a transaction. For example, 1 represents permission and 0 represents no permission. In actual applications, since the banking industry involves multiple permissions, the length of the binary string is nearly a thousand bits. However, the maximum length of the database char string type is 255 bits, and all transaction permissions cannot be stored in the char string type. Only the CLOB (Character Large Object) type can be used for storage.
[0036] However, there are two drawbacks of using CLOB storage: first, it takes up a lot of space and is inconvenient to operate and maintain; second, the access efficiency is much lower than that of char type access, resulting in slow transaction response, which further reduces the user experience. Specifically, when accessing CLOB type data, two I / O operations are involved, such as one I / O to read the pointer to the storage address of the permission data in the table, and another I / O to read the specific permission data according to the pointer in the table to the storage address of the CLOB type data.
[0037] Based on this, an embodiment of the present disclosure provides a transaction processing method, including: in response to receiving a request sent by a user, parsing the user role of the user and the target transaction to be acquired from the request; determining a first string of a target storage type matching the user role from a permission data table, wherein the first string includes multiple first characters, each first character is used to represent the transaction authority of multiple transactions, and the target storage type includes a string type with a character bit limit; according to the target transaction, determining a single first target character from the first string, wherein the first target character is used to represent the transaction authority of the target transaction and at least one other transaction; when it is determined that the first target character is not a first preset character, converting the single first target character into a second string, wherein the second string includes multiple second characters, each second character is used to represent the transaction authority of a single transaction; according to the second string, determining the authority detection result of the target transaction; and when the authority detection result is passed, acquiring the target transaction from a database.
[0038] Figure 1 An exemplary application scenario 100 to which the transaction processing method according to an embodiment of the present disclosure can be applied is schematically shown. It should be noted that: Figure 1 What is shown are merely examples of application scenarios to which the embodiments of the present disclosure can be applied, in order to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.
[0039] like Figure 1As shown, the application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104 and a server 105. The network 104 is used to provide a medium for a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103 and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.
[0040] The user may use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications may be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, and / or social platform software, etc. (only for example).
[0041] The first terminal device 101, the second terminal device 102, and the third terminal device 103 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0042] The server 105 may be a server that provides various services, such as a background management server (only as an example) that provides support for websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.
[0043] It should be noted that the transaction processing method provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the transaction processing system provided in the embodiment of the present disclosure can generally be set in the server 105. The transaction processing method provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105. Accordingly, the transaction processing system provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105.
[0044] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0045] The following will be based on Figure 1 The scene described by Figure 2~Figure 7 The transaction processing method of the disclosed embodiment is described in detail.
[0046] Figure 2 The flowchart of the transaction processing method according to the embodiment of the present disclosure is schematically shown.
[0047] like Figure 2 As shown, the method includes operations S201 to S206.
[0048] In operation S201 , in response to receiving a request sent by a user, the user role of the user and the target transaction to be obtained are parsed from the request.
[0049] According to an embodiment of the present disclosure, a transaction includes a specific financial transaction operation, such as deposit, withdrawal, transfer, etc. The target transaction is also the transaction to be acquired.
[0050] According to the embodiments of the present disclosure, user roles include system preset user roles, and different user roles should have different authority levels. For example, in a bank, ordinary tellers, supervisor tellers, and bank presidents can be set up, and the three user roles have different authority levels. For example, ordinary tellers have the authority to perform transaction operations such as deposits and withdrawals, but do not have the authority to perform large-amount remittances, and thus require the authority of supervisor tellers or bank presidents to perform operations.
[0051] According to an embodiment of the present disclosure, the request for the target transaction may include the target transaction and the user role of the user initiating the request; it may also include time information, location information, etc.
[0052] For example, for a deposit transaction, the request may include the user role "general teller", the transaction type "deposit", and may also include the time when the request was initiated and the information of the bank branch where the request was initiated.
[0053] According to an embodiment of the present disclosure, the request may be parsed to obtain the user role and the target transaction.
[0054] In operation S202, a first character string of a target storage type matching the user role is determined from a permission data table.
[0055] According to an embodiment of the present disclosure, the permission data table is data stored in a disk of the database. The database system can obtain the first character string from the permission data table through input / output (I / O operation) with the disk.
[0056] The storage format of the permission data in the permission data table is the target storage type, and the target storage type has a string type with a character bit limit. For example, the target storage type can be a char type, and the first string can include a first character with a total of 256 bits from 0 to 255, and each first character can represent the transaction permissions of multiple transactions.
[0057] According to an embodiment of the present disclosure, the permission data table includes permission strings corresponding to multiple user roles one by one, each permission string includes multiple permission characters, and each permission character includes transaction permissions for multiple transactions corresponding to the user role. For the user role parsed from the request, the permission string corresponding to the user role in the permission data table is called a first string, the permission character is called a first character, and each first character is used to represent the transaction permissions for multiple transactions corresponding to the user role.
[0058] In one embodiment, the first character string may be a hexadecimal character string, and each first character may represent transaction permissions for four transactions.
[0059] In the embodiment of the present disclosure, the permission data table directly stores the permission data itself, that is, the first string, and the database system can obtain the first string through one I / O with the disk. In the CLOB type, the permission data table stores a pointer, and another I / O is required to obtain the specific transaction permission.
[0060] In operation S203, a single first target character is determined from the first character string according to the target transaction.
[0061] According to an embodiment of the present disclosure, after the first character string is read from the permission data table of the disk, operations S203 to S205 are performed in the memory.
[0062] According to an embodiment of the present disclosure, each first character in the first character string is used to represent the transaction authority of multiple transactions. Therefore, a specific first target character can be determined from the first character string, and the first target character includes the transaction authority of the target transaction and at least one other transaction.
[0063] For example, for the first hexadecimal character string, the first target character may represent the transaction authority of the target transaction and the transaction authority of three other transactions.
[0064] In operation S204, in a case where it is determined that the first target character is not the first preset character, the single first target character is converted into a second character string.
[0065] In the embodiment of the present disclosure, the first preset character may be 0. Although a single first character may represent the transaction authority of multiple transactions, in order to simplify the authority detection process, when the transaction authority of multiple transactions is no authority, a specific character may be set to represent the multiple transactions. Thus, for the target transaction, after obtaining the first target character, a simple judgment may be made to determine whether it is necessary to continue to convert the first target character into the second character string. That is, when it is determined that the first target character is not the first preset character, subsequent character conversion is performed, that is, the single first target character is converted into the second character string.
[0066] According to an embodiment of the present disclosure, the second character string includes a plurality of second characters, and each second character is used to represent the transaction authority of a single transaction.
[0067] In operation S205, an authority detection result of the target transaction is determined according to the second character string.
[0068] According to an embodiment of the present disclosure, the permission detection result includes whether the user role has the transaction permission for the target transaction, and the general permission detection result is pass or fail. In an embodiment of the present disclosure, the permission detection result of the target transaction can be determined based on a second character in the second character string corresponding to the target transaction. For example, when the second character is 1, the transaction permission for a transaction corresponding to the first character is authorized, and the permission detection result is pass; when it is 0, it is unauthorized, and the permission detection result is fail.
[0069] In operation S206, when the authority detection result is passed, the target transaction is obtained from the database.
[0070] According to the embodiments of the present disclosure, as described above, the permission detection result is generally divided into pass and fail. When the permission detection result is pass, the target transaction is obtained from the database and returned. Returning the target transaction can be understood as allowing the user who requested the target transaction to operate on the target transaction. Further, it can also include that in the case of pass, if the user corresponding to the user role executes the transaction successfully at this time, the transaction result can also be returned. If the transaction is successful, the result of this transaction, the execution time of the transaction, the transaction content, etc. can also be returned, and then the transaction log can be generated based on the above information.
[0071] According to the embodiment of the present disclosure, if the permission detection result fails, it indicates that the user role that issued the request does not have the permission for the target transaction, and a failure result can be returned. Corresponding prompt information can also be set, such as returning information such as not having the permission for this transaction.
[0072] For example, when the request detection passes with the user role being "ordinary teller" and the target transaction being "deposit", the system obtains the target transaction from the database and executes the target transaction. If the target transaction is executed successfully, it returns transaction success information, and returns information about the deposited account and the deposit time, etc.
[0073] According to an embodiment of the present disclosure, the permission data table can store the first string through the target storage type (char). Therefore, when a user requests permission for a target transaction, there is no need to perform two I / O operations according to the storage method of the CLOB type. The first string can be directly obtained through only one I / O, which reduces the number of I / O operations, reduces the occupation of system resources, and improves the reading efficiency of transaction permissions. Afterwards, for the first string of the target storage type, it is faster to process the first target string in the memory to determine the permission detection result, so that the permission detection speed is further improved while improving the reading efficiency. In addition, before converting the first target character to the second character string, by comparing the first target character with the first preset character, it is helpful to save subsequent character conversion operations, so as to further improve the permission detection speed.
[0074] According to an embodiment of the present disclosure, when it is determined that the first target character is the first preset character, the permission detection result of the target transaction is determined to be failed, and an error message is returned; wherein the first preset character is a character representing that the transaction permissions of multiple transactions corresponding to the first target character are all failed.
[0075] According to an embodiment of the present disclosure, the first target character may be a hexadecimal character, where hexadecimal is a system that uses numbers 0-9 and letters AF or, using numbers 0-9 and lowercase af, a total of 16 characters, where A or a represents 10, B or b represents 11, and so on, until F or f represents 15. Binary is a counting method that represents numerical values with only two values 0 and 1. Due to the mapping relationship between hexadecimal and binary, a hexadecimal character can express the meaning of four binary characters, for example, a hexadecimal 1 character corresponds to 0001 in binary.
[0076] Therefore, for the first target character in hexadecimal, when the first target character is the first preset character "0", it indicates that the corresponding four-bit binary character is 0000, that is, the transaction permissions of the four transactions are all rejected. Therefore, when it is determined that the first target character is the first preset character, the permission detection result of the target transaction can be directly determined to be rejected based on the conversion rules between hexadecimal and binary without converting the first target character or locating the target transaction.
[0077] According to an embodiment of the present disclosure, the error message is used to prompt the user that the target transaction acquisition fails, for example, it may be "no authority".
[0078] The embodiment of the present disclosure compares the first target character with the first preset character before converting the first target character into the second character string. When the first target character is the first preset character, the step of converting the first target character into the second character string can be skipped, and the permission detection result can be directly determined, which can save memory computing resources and further improve the response speed.
[0079] Figure 3 The flowchart of the method for determining the first target character according to the embodiment of the present disclosure is schematically shown.
[0080] like Figure 3 As shown, as a specific embodiment of operation S203, the permission detection method includes operations S331 to S334.
[0081] Operation S331: Obtain a transaction authority location table.
[0082] Operation S332: determining the authority position of the target transaction from the transaction authority position table according to the transaction code of the target transaction.
[0083] Operation S333: Based on the conversion relationship between the second character string and the first character string and according to the authority position, a first position in the first character string corresponding to the target transaction is calculated.
[0084] In operation S334, a first character located at a first position in the first character string is determined as a first target character.
[0085] According to an embodiment of the present disclosure, the transaction authority position table includes a transaction code, a transaction name, and an authority position. Specifically, the table structure of the parameters in the transaction authority position table is shown in Table 1:
[0086] Table 1
[0087] Field English name Field Chinese name Field Type Tran_code Transaction Code Char(4) Tran_name Transaction Name Char(30) Auth_no Permission location Int
[0088] In an exemplary embodiment, the transaction authority position table is shown in Table 2:
[0089] Table 2
[0090] Transaction Code Transaction Name Permission location 0001 Institutional Sign-in 0 0002 Teller Sign-in 1 0003 Print the day-ahead report 2 0004 Query transaction 3
[0091] According to the embodiment of the present disclosure, each transaction uniquely corresponds to a transaction code, and in the transaction authority position table, a transaction code uniquely corresponds to a permission position. For operation S332, the corresponding permission position can be taken out from the transaction authority position table according to the transaction code of the target transaction.
[0092] The permission position in the transaction permission position table corresponds to the permission position of the binary string, not the position of the first string compressed into the first string. Therefore, after determining the permission position of the target transaction, it is necessary to calculate the first position based on the conversion relationship between the first string and the second string.
[0093] In one embodiment, the first string is a hexadecimal string, and the second string is a binary string, so the conversion relationship between the first string and the second string is also a binary conversion relationship, such as the second string 00000000 corresponds to the first string 00, and the second string 00010010 corresponds to the first string 12. Conversely, the first string 13 corresponds to the second string 00010011.
[0094] Therefore, after obtaining the authority position of the target transaction from the transaction authority position table, the authority position can be calculated as the first position based on the above conversion relationship, and the first character at the first position is determined as the first target character. It should be noted that the first target character at the first position actually corresponds to the target transaction and three other transactions.
[0095] For example, based on the four-to-one conversion relationship between the second character string and the first character string, a division operation may be performed on the authority position to obtain a quotient, and the quotient is the first position.
[0096] Taking the query flow in Table 2 above, the permission position "3" as an example, based on the four-to-one conversion relationship between the second string and the first string, the quotient of the division operation 3 / 4 on the permission position is 0, and the position of the first character in the first string is "0", therefore, the first character corresponding to the query flow is at the first position of the first string.
[0097] The embodiments of the present disclosure calculate the first position according to the permission position of the target transaction in the transaction position permission table, and determine a single first target character from the first character string according to the first position so as to automatically and quickly locate the first target character, so as to subsequently quickly perform permission detection based on the first target character.
[0098] According to an embodiment of the present disclosure, determining an authority detection result of a target transaction based on a second character string includes: performing a modulo operation on an authority position based on a conversion relationship between the second character string and the first character string to obtain a remainder, wherein the remainder represents a second position of the target transaction in the second character string; determining a single second character located at the second position in the second character string as a second target character corresponding to the target transaction; and determining an authority detection result of the target transaction based on the second target character.
[0099] According to an embodiment of the present disclosure, the first target character in the first character string includes the transaction authority of the target transaction and other transactions, and one of the second characters in the second character string converted from the first target character represents the transaction authority of the target transaction. Therefore, after obtaining the second character string, it is necessary to first determine the second target character corresponding to the target transaction from the second character string.
[0100] According to an embodiment of the present disclosure, for a binary second string, the second string includes only four second characters, and the position of the target transaction in the second string is different from the permission position determined from the transaction permission position table, and calculation is required to locate the second target character from the second string.
[0101] Specifically, based on the four-into-one conversion relationship between the second character string and the first character string, the permission position can be divided by 4 and the remainder is taken, and the remainder is the second position. Thus, the permission detection result of the target transaction can be determined according to the second target character located at the second position.
[0102] The embodiments of the present disclosure calculate the permission position of the target transaction to obtain the second position. When storing a first character string of shorter character length, the embodiment of the present disclosure can quickly locate a single second target character based on the conversion relationship between the first character string and the second character string, and perform accurate permission detection based on the second target character.
[0103] According to an embodiment of the present disclosure, the authority detection result of the target transaction is determined based on the second target character, including: when the second target character is the second preset character, determining the authority detection result is passed; when the second target character is the first preset character, determining the authority detection result is failed.
[0104] According to an embodiment of the present disclosure, for a binary second string, each second character is 0 or 1, and the second preset character is 1. When the second target character is the second preset character, the permission detection result is determined to be passed. The first preset character is the same as the first preset character when initially determining whether the first target character needs to be converted, and both are 0.
[0105] For example, for the first target character in hexadecimal, when the first target character is 0, the permission detection results of the four transactions corresponding to the first target character are all failed; when the first target character is a third preset character other than the first preset character, such as 1~9, A~F, the first target character is converted into a second binary string. For the second target character in the second string, the second target character is 0 and the detection fails, and the second target character is 1 and the detection passes.
[0106] In one embodiment, Table 3 is taken as an example of a permission data table.
[0107] Table 3
[0108] Role Code First string 0001 FFD0EA83FCBA45210000000000000000000000000000000000000000000000000000000000
[0109] As shown in Table 3, the first character string that matches the user role with a role code of 0001 is FFD0EA83FCBA452100000000000000000000000000000000000000000000000000000000000000000000000000, which belongs to the char storage type. Therefore, the first character string in the permission data table is the specific value.
[0110] Further, Figure 4 The diagram schematically shows the correspondence relationship between the first character string and the second character string according to an embodiment of the present disclosure.
[0111] For example, Figure 4 As shown, the user role is 0001 and the target transaction is transaction 3, such as printing the previous day report. The first string determined from the permission data table is Figure 4 The string in the first line is like this: FFD0EA83FCBA4521000000000000000000000000000 00000000000000000000000000000000000000000000.
[0112] According to the permission position 3 of transaction 3, the first position of the first string is calculated, and the first target character is "F". Since "F" is not the first preset character "0", the first target character can be converted into the second string, such as Figure 4 The second row is "1111", where each second character in the second string "1111" corresponds to a transaction permission. Divide the permission position 3 by 4 and take the remainder to get "3", so the second position of the second string "1111" is 3, and the second target character "1" at the second position corresponds to transaction three. According to the second target character "1", it is determined that the permission test result of transaction three is passed.
[0113] The embodiment of the present disclosure gradually determines the first target character and the second target character, and directly determines the permission detection result according to the second target character after determining the second target character. In this way, when a shorter first character string is stored in the permission data table, the second target character can still be accurately located, thereby achieving the technical effect of ensuring that the entire storage system occupies less storage resources and has a faster reading speed, thereby reducing system pressure.
[0114] In one embodiment, after executing operation S201, the authority data table can be directly obtained, and operation S202 can be executed. In another embodiment, the banking industry also sets corresponding authority for the data that the user can see.
[0115] Figure 5 The flowchart of the method for obtaining the permission data table according to the embodiment of the present disclosure is schematically shown. Before executing operation S202, operations S501 to S503 are also included.
[0116] Operation S501 : determining, according to the user role, a third character string matching the user role from a service category permission table.
[0117] According to an embodiment of the present disclosure, the third character string includes a plurality of third characters, and each third character is used to represent the data acquisition authority of a single business category.
[0118] According to the embodiment of the present disclosure, similar to the storage of transaction permissions, each user role can have data acquisition permissions for multiple business categories. The business category permission table includes role code, role name and business category permission data. The table structure of parameters in the business category permission table is shown in Table 4:
[0119] Table 4
[0120] Field English name Field Chinese name Field Type role_code Role Code Char(4) Role_name Role Name Char(30) Auth_data Business category authority data Char(128)
[0121] In an exemplary embodiment, the service category permission table is shown in Table 5:
[0122] Table 5
[0123] Role Code Role Name Business category authority data 0001 General teller 11110100
[0124] Taking the user role of "ordinary teller" as an example, the business category permission data "11110100" is determined from the business category permission table according to the role code 0001, which is the third string. As shown in Table 4, the third string is a binary string and is also of char type. It is understandable that although there are hundreds of transactions in the banking industry, the above-mentioned huge transactions can be divided into fewer business categories. Therefore, the binary business category permission data will not exceed the character bit limit of the char type.
[0125] Operation S502: acquiring, according to the target business category to which the target transaction belongs, a third target character corresponding to the target business category from a third character string.
[0126] According to an embodiment of the present disclosure, the business category and the permission position of the business category in the third character string can be stored in a data permission position table, the data permission position table includes a business category code, a business category name and a permission position, and the storage types are Char(4), Char(30) and int respectively.
[0127] In an exemplary embodiment, the data permission location table may be as shown in Table 6:
[0128] Table 6
[0129] Business Category Code Business Category Name Permission location 0001 General business 0 0002 Bank card business 1 0003 Personal deposit business 2 0004 Credit card business 3
[0130] According to an embodiment of the present disclosure, after determining the permission position of the target service category in the third character string from the data permission position table, the third target character corresponding to the target service category may be directly acquired from the third character string.
[0131] Operation S503: if the third target character represents that the user has the data acquisition authority for acquiring the target service category, acquire the authority data table.
[0132] For example, take the target business category as "personal deposit business" and the third character string as "11110100". According to the business category code 0001 of the target business category, the authority position of the target business category in the third character string is determined from the data authority position table, such as "2", and based on this, the third target character "1" located at the third position is determined from the third character string "11110100". "1" means that the ordinary teller has the data acquisition authority to retrieve the personal deposit business; otherwise, "0" means that there is no data acquisition authority.
[0133] Therefore, after determining that the ordinary teller has the data acquisition authority for the business category of "personal deposit business", the authority data table corresponding to the "personal deposit business" is obtained.
[0134] Table 7
[0135] Role Code Business Category Code First string 0001 0001 FFD0EA83FCBA45210000000000000000000000000000000000000000000000000000000000
[0136] In an illustrative embodiment, for a hierarchical storage mechanism including business categories, the permission data table may be as shown in Table 7 above. Table 7 is similar to Table 3, except that a business category code is newly added in the data structure of the permission data table. In the embodiment of the present disclosure, by adding a new business category, before obtaining the permission data table, the business category of the target transaction is used to determine whether the user role in the request has data acquisition permission to obtain the permission data table, thereby achieving hierarchical isolation based on data acquisition permission and transaction permission, making the storage structure of the entire system more secure and reliable. According to an embodiment of the present disclosure, for operation S204, when it is determined that the first target character is not the first preset character, converting a single first target character into a second string includes: when it is determined that the first target character is not the first preset character, converting the hexadecimal first target character into a binary second string, the second string including four second characters.
[0137] Specifically, the first target character of one digit may be converted into a second character string of four digits according to the base conversion rule.
[0138] For example, taking the first target character as D as an example, the first target character can be converted into the second character string 1101.
[0139] Figure 6 The process diagram of the method for converting the first target character and the second character string according to an embodiment of the present disclosure is schematically shown.
[0140] like Figure 6 As shown, after obtaining the first target character in hexadecimal, it is determined whether the first target character in hexadecimal is the first preset character 0. If the first target character is 0, the permission detection result is directly returned as failure; if the first target character is not 0, the base conversion is triggered, and the first target character in hexadecimal is further converted into a second binary character string. The binary permission character corresponding to the target transaction is determined from the second character string, such as the second target character, and the permission detection result is determined according to the second target character.
[0141] For example, the hexadecimal first target character 9 is converted into the binary second string 1001, and then according to the second position corresponding to the target transaction in the second string, such as the second position, the second target character "0" is determined from the first permission string 1001, and the permission detection result is judged as failed.
[0142] Figure 7 The flowchart of writing data into the permission data table according to the embodiment of the present disclosure is schematically shown.
[0143] like Figure 7 As shown, the method for writing data into the permission data table includes operations S701 to S705.
[0144] Operation S701 : in response to receiving a permission data write request, obtaining permission data of a newly added user role according to the newly added user role in the permission data write request.
[0145] Operation S702: Generate a fourth character string corresponding to the newly added user role according to the authority data, wherein the fourth character string includes a plurality of fourth characters, and each fourth character is used to represent the transaction authority of a single transaction.
[0146] Operation S703: convert the fourth character string into a fifth character string having a shorter length.
[0147] Operation S704: verify the fifth character string to obtain a verification result.
[0148] Operation S705 : if the verification result indicates that the fifth character string is successfully converted, write the fifth character string into the authority data table.
[0149] Operations S701 to S705 will be described in detail below.
[0150] According to an embodiment of the present disclosure, the permission data includes data indicating user roles and various types of transaction permissions. For example, the permission data may be "the newly added role 1 has the following transaction permissions: X, Y, Z...; does not have the following transaction permissions: A, B, C...".
[0151] According to an embodiment of the present disclosure, a write request represents an operation of writing new data to the rights database.
[0152] According to an embodiment of the present disclosure, the newly added user role may be one or more newly added user roles, and may be a user role that does not exist in the permission data table, or may be a user role that exists in the permission data table. Further, when the newly added user role exists in the permission data table, the write operation may be understood as an operation of overwriting with new data. The permission data may include information such as resources that the user role can access, operation permissions, and data access levels.
[0153] For example, in actual application, for a newly added user role, such as a seconded counter staff, in order to facilitate his / her transaction calls, it is necessary to set his / her permissions and write the permissions into the database.
[0154] According to an embodiment of the present disclosure, the fourth character string is a character string including a plurality of binary characters. For a newly added user role, it is usually necessary to convert the mixed text, data, and character permission data into a binary third permission character string for storage.
[0155] In order to adapt to the target storage type restriction for transaction permissions in the permission data table, such as char, the fourth character string including thousands of transaction permissions needs to be converted into a fifth character string with a shorter length so that the fifth character string meets the 255-bit restriction.
[0156] For example, the fourth string is a binary string, the fifth string is a hexadecimal string, and the length of the fifth string is 1 / 4 of the length of the fourth string. For example, the conversion can be performed based on the above conversion relationship. For example, starting from the lowest bit (leftmost) of the fourth string, every 4 bits are grouped and converted into a fifth hexadecimal character. If the length of the fourth string is not a multiple of 4, 0 can be added to the rightmost to complete the last group.
[0157] Considering data accuracy, before writing the fifth character string into the permission data table, it is necessary to ensure that the fifth character string is a correctly converted character string.
[0158] For example, the fifth hexadecimal string can be converted back to binary based on the conversion rule to obtain the sixth string. When the sixth string is the same as the fourth string, the verification result is that the fifth string is successfully converted; when the sixth string is different from the fourth string, the verification result is that the fifth string fails to be converted.
[0159] According to an embodiment of the present disclosure, if the verification is successful, the converted hexadecimal fifth character string can be written into the permission data table. The permission data table can be stored in a database or any other form of data storage system for use in the permission check and user verification process.
[0160] It should be noted that the process of converting the fourth character string to the fifth character string involves operations such as zero padding and four-bit separation. Any problem in any of these operations will lead to errors in the converted fifth character string, thereby affecting the accuracy of the transaction authority. However, the process of converting the fifth character string to the sixth character string only involves the decoding process from hexadecimal to binary. Normally, there will be no problems with the decoding process.
[0161] Due to the number of digits in the binary string, there may be problems when converting the fourth string of hundreds or thousands of digits to the fifth string, such as zero padding, digit (4 digits) separation misalignment, etc. Any problem in any operation will cause errors in the converted fifth string, thereby affecting the accuracy of the transaction rights. However, the process of converting the fifth string to the sixth string only involves the decoding process from hexadecimal to binary, and usually, there will be no problems in the decoding process.
[0162] Therefore, the embodiment of the present disclosure converts the fifth hexadecimal string back to the sixth binary string, and compares the fourth permission string, which is also binary, with the sixth permission string, so as to ensure the accuracy of the data written into the permission data table. By using the method of writing after verification, the writing of erroneous data is avoided, the reliability of the system is improved, and potential data tampering or inconsistency problems can be prevented, thereby enhancing the security and data consistency of the system.
[0163] Based on the above transaction processing method, the present disclosure also provides a transaction processing device. Figure 8 The device is described in detail.
[0164] Figure 8 The structural block diagram of the transaction processing device according to the embodiment of the present disclosure is schematically shown.
[0165] like Figure 8 As shown, the transaction processing device 800 of this embodiment includes a parsing module 810 , a first determination module 820 , a second determination module 830 , a third determination module 840 , a fourth determination module 850 and an acquisition module 860 .
[0166] The parsing module 810 is used to parse the user role and the target transaction to be obtained from the request in response to receiving the acquisition request sent by the user. In one embodiment, the parsing module 810 can be used to perform the operation S201 described above, which will not be repeated here.
[0167] The first determination module 820 is used to determine a first string of a target storage type that matches the user role from the permission data table, wherein the first string includes multiple first characters, each first character is used to represent the transaction permission of multiple transactions, and the target storage type includes a string type with a character digit limit. In one embodiment, the first determination module 820 can be used to perform the operation S202 described above, which will not be repeated here.
[0168] The second determination module 830 is used to determine a single first target character from the first character string according to the target transaction, wherein the first target character is used to characterize the transaction authority of the target transaction and at least one other transaction. In one embodiment, the second determination module 830 can be used to perform the operation S203 described above, which will not be repeated here.
[0169] The third determination module 840 is used to convert the single first target character into a second character string when it is determined that the first target character is not the first preset character, wherein the second character string includes a plurality of second characters, each second character being used to represent the transaction authority of a single transaction. In one embodiment, the third determination module 840 can be used to perform the operation S204 described above, which will not be described in detail herein.
[0170] The fourth determination module 850 is used to determine the authority detection result of the target transaction according to the second character string. In one embodiment, the fourth determination module 850 can be used to perform the operation S205 described above, which will not be described in detail here.
[0171] The acquisition module 860 is used to acquire the target transaction from the database when the permission detection result is passed. In one embodiment, the acquisition module 860 can be used to perform the operation S206 described above, which will not be described in detail here.
[0172] According to an embodiment of the present disclosure, the transaction processing device 800 also includes: a fifth determination module, which is used to determine that the permission detection result of the target transaction is failed and return an error message when it is determined that the first target character is a first preset character; wherein the first preset character is a character that represents that the transaction permissions of multiple transactions corresponding to the first target character are all failed.
[0173] According to an embodiment of the present disclosure, the second determination module includes a first acquisition submodule, a first calculation submodule and a first determination submodule.
[0174] The first acquisition submodule is used to acquire a transaction authority position table; and determine the authority position of the target transaction from the transaction authority position table according to the transaction code of the target transaction. The first calculation submodule is used to calculate the first position corresponding to the target transaction in the first string according to the authority position based on the conversion relationship between the second string and the first string. The first determination submodule is used to determine the first character located at the first position in the first string as the first target character.
[0175] According to an embodiment of the present disclosure, the second determination module includes a second calculation submodule, a second determination submodule and a third determination submodule. The second calculation submodule is used to perform a remainder operation on the authority position based on the conversion relationship between the second character string and the first character string to obtain a remainder, wherein the remainder represents the second position of the target transaction in the second character string. The second determination submodule is used to determine a single second character located at the second position in the second character string as a second target character corresponding to the target transaction. The third determination submodule is used to determine the authority detection result of the target transaction based on the second target character.
[0176] According to an embodiment of the present disclosure, the third determination submodule includes a first determination unit and a second determination unit. The first determination unit is used to determine that the permission detection result is passed when the second target character is the second preset character. The second determination unit is used to determine that the permission detection result is not passed when the second target character is the first preset character.
[0177] According to an embodiment of the present disclosure, the transaction processing device 800 further includes a sixth determination module, a seventh determination module and a permission data table acquisition module.
[0178] The sixth determination module is used to determine a third character string matching the user role from the business category permission table according to the user role, wherein the third character string includes a plurality of third characters, each of which is used to represent the data acquisition permission of a single business category. The seventh determination module is used to obtain a third target character corresponding to the target business category from the third character string according to the target business category to which the target transaction belongs. The permission data table acquisition module is used to obtain the permission data table when the third target character represents that the user has the data acquisition permission to obtain the target business category.
[0179] According to an embodiment of the present disclosure, the third determination module includes: a fourth determination submodule, for converting the hexadecimal first target character into a binary second string when it is determined that the first target character is not the first preset character, the second string including four second characters.
[0180] According to an embodiment of the present disclosure, the transaction processing device 800 also includes a permission acquisition module, a generation module, a conversion module, a verification module and a writing module.
[0181] The permission acquisition module is used to, in response to receiving a permission data write request, obtain permission data of a newly added user role according to the newly added user role in the permission data write request. The generation module is used to generate a fourth character string corresponding to the newly added user role according to the permission data, wherein the fourth character string includes a plurality of fourth characters, and each fourth character is used to represent the transaction permission of a single transaction. The conversion module is used to convert the fourth character string into a fifth character string of shorter length. The verification module is used to verify the fifth character string and obtain a verification result. The writing module is used to write the fifth character string into the permission data table when the verification result indicates that the fifth character string is successfully converted.
[0182] According to an embodiment of the present disclosure, any multiple modules of the parsing module 810, the first determination module 820, the second determination module 830, the third determination module 840, the fourth determination module 850 and the acquisition module 860 can be combined in one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the parsing module 810, the first determination module 820, the second determination module 830, the third determination module 840, the fourth determination module 850 and the acquisition module 860 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation modes of software, hardware and firmware or in a suitable combination of any of them. Alternatively, at least one of the parsing module 810, the first determination module 820, the second determination module 830, the third determination module 840, the fourth determination module 850 and the acquisition module 860 can be at least partially implemented as a computer program module, and when the computer program module is executed, the corresponding function can be performed.
[0183] Fig. 9 A block diagram of an electronic device suitable for implementing a transaction processing method according to an embodiment of the present disclosure is schematically shown.
[0184] like Fig. 9 As shown, the electronic device 900 according to an embodiment of the present disclosure includes a processor 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage part 908 to a random access memory (RAM) 903. The processor 901 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a dedicated microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 901 may also include an onboard memory for caching purposes. The processor 901 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0185] In RAM 903, various programs and data required for the operation of electronic device 900 are stored. Processor 901, ROM 902 and RAM 903 are connected to each other via bus 904. Processor 901 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 902 and / or RAM 903. It should be noted that the program can also be stored in one or more memories other than ROM 902 and RAM 903. Processor 901 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in the one or more memories.
[0186] According to an embodiment of the present disclosure, the electronic device 900 may further include an input / output (I / O) interface 905, which is also connected to the bus 904. The electronic device 900 may further include one or more of the following components connected to the input / output (I / O) interface 905: an input portion 906 including a keyboard, a mouse, etc.; an output portion 907 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 908 including a hard disk, etc.; and a communication portion 909 including a network interface card such as a LAN card, a modem, etc. The communication portion 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the input / output (I / O) interface 905 as needed. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 910 as needed, so that a computer program read therefrom is installed into the storage portion 908 as needed.
[0187] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.
[0188] According to an embodiment of the present disclosure, a computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include the ROM 902 and / or RAM 903 described above and / or one or more memories other than ROM 902 and RAM 903.
[0189] The embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the transaction processing method provided by the embodiment of the present disclosure.
[0190] The above functions defined in the system / device of the embodiment of the present disclosure are performed when the computer program is executed by the processor 901. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0191] In one embodiment, the computer program may be based on a tangible storage medium such as an optical storage device, a magnetic storage device, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of a signal on a network medium, and downloaded and installed through the communication part 909, and / or installed from a removable medium 911. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0192] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 909, and / or installed from the removable medium 911. When the computer program is executed by the processor 901, the above functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the system, device, means, module, unit, etc. described above can be implemented by a computer program module.
[0193] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).
[0194] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0195] It will be appreciated by those skilled in the art that the features described in the various embodiments of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations or combinations are not explicitly described in the present disclosure. In particular, without departing from the spirit and teachings of the present disclosure, the features described in the various embodiments of the present disclosure may be combined and / or combined in a variety of ways. All of these combinations and / or combinations fall within the scope of the present disclosure.
[0196] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.
Claims
1. A transaction processing method, characterized in that: The method comprises: In response to receiving a request sent by a user, parsing the user role of the user and the target transaction to be acquired from the request; Determine a first character string of a target storage type that matches the user role from the authority data table, wherein the first character string includes a plurality of first characters, each of the first characters is used to represent the transaction authority of a plurality of transactions, and the target storage type includes a character string type with a character digit limit; According to the target transaction, determining a single first target character from the first character string, wherein the first target character is used to represent the transaction authority of the target transaction and at least one other transaction; In the case where it is determined that the first target character is not a first preset character, converting a single first target character into a second character string, wherein the second character string includes a plurality of second characters, and each second character is used to represent the transaction authority of a single transaction; Determining, according to the second character string, a result of the authority detection of the target transaction; and When the permission detection result is passed, the target transaction is obtained from a database.
2. The method according to claim 1, characterized in that The method further comprises: When it is determined that the first target character is the first preset character, the permission detection result of the target transaction is determined to be failed, and an error message is returned; wherein the first preset character is a character indicating that the transaction permissions of multiple transactions corresponding to the first target character are all failed.
3. The method according to claim 1, characterized in that The step of determining a single first target character from the first character string according to the target transaction includes: Get the transaction permission location table; Determining the authority position of the target transaction from the transaction authority position table according to the transaction code of the target transaction; Based on the conversion relationship between the second character string and the first character string, and according to the authority position, calculating a first position in the first character string corresponding to the target transaction; and The first character located at the first position in the first character string is determined as the first target character.
4. The method according to claim 2, characterized in that: The step of determining the authority detection result of the target transaction according to the second character string includes: Based on the conversion relationship between the second character string and the first character string, performing a modulo operation on the authority position to obtain a remainder, wherein the remainder represents the second position of the target transaction in the second character string; determining a single second character located at the second position in the second character string as a second target character corresponding to the target transaction; and An authority detection result of the target transaction is determined according to the second target character.
5. The method according to claim 4, characterized in that The step of determining the authority detection result of the target transaction according to the second target character includes: In a case where the second target character is a second preset character, determining that the permission detection result is passed; When the second target character is the first preset character, it is determined that the permission detection result is failed.
6. The method according to claim 1, characterized in that Before determining the first character string of the target storage type matching the user role from the permission data table, the method further includes: According to the user role, determining a third character string matching the user role from the business category permission table, wherein the third character string includes a plurality of third characters, each of which is used to represent the data acquisition permission of a single business category; According to the target business category to which the target transaction belongs, acquiring a third target character corresponding to the target business category from the third character string; and In the case where the third target character indicates that the user has the authority to obtain data of the target business category, the authority data table is obtained.
7. The method according to claim 1, characterized in that The converting the single first target character into a second character string when it is determined that the first target character is not a first preset character comprises: When it is determined that the first target character is not the first preset character, the first target character in hexadecimal is converted into the second binary character string, where the second character string includes four second characters.
8. The method according to any one of claims 1 to 7, characterized in that: The method further comprises: In response to receiving the permission data write request, acquiring permission data of the newly added user role according to the newly added user role in the permission data write request; generating, according to the authority data, a fourth character string corresponding to the newly added user role, wherein the fourth character string includes a plurality of fourth characters, each of which is used to represent the transaction authority of a single transaction; Converting the fourth character string into a fifth character string of shorter length; Verifying the fifth character string to obtain a verification result; and When the verification result indicates that the fifth character string is successfully converted, the fifth character string is written into the authority data table.
9. A transaction processing device, characterized in that: The device comprises: A parsing module, configured to, in response to receiving an acquisition request sent by a user, parse the request to obtain a user role of the user and a target transaction to be acquired; A first determination module is used to determine a first character string of a target storage type that matches the user role from a permission data table, wherein the first character string includes a plurality of first characters, each of the first characters is used to represent the transaction permission of a plurality of transactions, and the target storage type includes a character string type with a character digit limit; A second determination module is used to determine a single first target character from the first character string according to the target transaction, wherein the first target character is used to represent the transaction authority of the target transaction and at least one other transaction; A third determination module is used to convert a single first target character into a second character string when it is determined that the first target character is not a first preset character, wherein the second character string includes a plurality of second characters, each of which is used to represent the transaction authority of a single transaction; a fourth determination module, configured to determine an authority detection result of the target transaction according to the second character string; The acquisition module is used to acquire the target transaction from the database when the permission detection result is passed.
10. An electronic device comprising: one or more processors; a memory for storing one or more programs, It is characterized in that when the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 8.
11. A computer-readable storage medium having executable instructions stored thereon, characterized in that: When the instruction is executed by a processor, the processor implements the method according to any one of claims 1 to 8.
12. A computer program product, comprising a computer program, characterized in that The computer program implements the method according to any one of claims 1 to 8 when executed by a processor.
Citation Information
Patent Citations
Target object permission determination method and device, storage medium and electronic device
CN112163232A
Permission configuration and verification method and device, electronic equipment and storage medium
CN114491451A
Authority management method and device, electronic equipment and storage medium
CN114884733A
Data processing method and device based on source character string and storage medium
CN117113374A
Server device, information management system, information management method, and computer program
US20180145962A1