Interface control method and device

Through the blockchain and smart contract verification interface control list, the problem of information tampering in the interface calls between the branch and the head office is solved, data consistency and reliable storage of transaction data are achieved, and business evaluation of the branch is supported.

CN113256293BInactive Publication Date: 2024-11-26BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110700215.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-23
Publication Date
2024-11-26
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

During the interface call between the branch and the head office, the application information may be tampered with, resulting in inconsistent transaction data, and it is difficult for the prior art to effectively prevent information tampering.

Method used

Through blockchain technology and smart contracts, the interface control list is verified to ensure the integrity of information, and the branches are allowed to execute transactions when the interface is called, obtain and analyze transaction data, and store them in the blockchain to ensure data consistency.

Benefits of technology

It effectively prevents information tampering, ensures data consistency between the branch and the head office, provides a reliable transaction data analysis and storage mechanism, and supports branch business evaluation and performance management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113256293B_ABST
    Figure CN113256293B_ABST
Patent Text Reader

Abstract

The present invention provides an interface control method and device, the method comprising: when receiving an interface call request sent by a first target branch, determining the target interface requested to be called; obtaining the first interface control list corresponding to the first target branch; finding the smart contract corresponding to the first target branch; based on the smart contract, inspecting the first interface control list; when passing the inspection, allowing the first target branch to call the target interface, so that the first target branch calls the target interface to execute the transaction business corresponding to the target interface; through the target interface, obtaining each transaction data generated when the first target branch executes the transaction business; performing data analysis on each transaction data to obtain the analysis result corresponding to the transaction business; storing the first interface control list, the analysis result and each transaction data in the blockchain. Using the method provided by the present invention, the branch can apply to call the interface online and inspect the interface control list to prevent information from being tampered with.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to an interface management and control method and device. Background Art

[0002] With the rapid development of technology, in order to enrich users' daily transaction business, banks have launched a variety of special business systems from the core banking system to each branch. Branch special systems are generally proposed by branch businesses and developed to support the development of local banking business. Since the basic standard capabilities such as offline process account processing capabilities are all in the head office, it involves the situation where the branch special system calls the head office standard business system interface through the channel system.

[0003] In the prior art, when a branch needs to call the head office's standard business system interface, it needs to apply in advance through an offline process. After the head office receives the branch's application offline, it fills the application information submitted by the branch into the interface control list and opens the interface to the branch. However, in the prior art, when the branch submits an application to the head office, the application information may be tampered with, resulting in differences in transaction data when the branch executes transaction business through the interface. When the head office's channel system and the branch's special system subsequently verify the information, it is easy to cause data inconsistency. Summary of the invention

[0004] In view of this, the present invention provides an interface management method, through which a branch can call an interface through an online application and check the interface management list to prevent information from being tampered with.

[0005] The present invention also provides an interface control device to ensure the implementation and application of the above method in practice.

[0006] An interface management method, comprising:

[0007] When receiving the interface call request sent by the first target branch, determining the target interface corresponding to the interface call request;

[0008] Obtaining a first interface control list corresponding to the first target branch in the interface call request;

[0009] Searching for a smart contract corresponding to the first target branch in a preset blockchain, where the smart contract is a standard interface control list corresponding to the first target branch;

[0010] Based on the smart contract, checking the first interface control list;

[0011] When the first interface control list is checked, the first target branch is allowed to call the target interface, so that the first target branch calls the target interface to execute the transaction business corresponding to the target interface;

[0012] Acquiring, through the target interface, various transaction data generated when the first target branch executes the transaction business;

[0013] Performing data analysis on each of the transaction data to obtain analysis results corresponding to the transaction business;

[0014] The first interface control list, analysis results and each transaction data are stored in the blockchain.

[0015] In the above method, optionally, the checking of the first interface control list based on the smart contract includes:

[0016] Obtaining each smart contract identification parameter contained in the smart contract and each first identification parameter contained in the first interface control list;

[0017] Checking whether there is a smart contract identification parameter in the smart contract that is consistent with each of the first identification parameters;

[0018] If there are smart contract identification parameters in the smart contract that are consistent with each of the first identification parameters, then the first interface control list is checked;

[0019] If there is no smart contract identification parameter in the smart contract that is consistent with any first identification parameter, the first interface control list will not be checked.

[0020] In the above method, optionally, performing data analysis on each of the transaction data to obtain analysis results corresponding to the transaction business includes:

[0021] clearing each of the transaction data to obtain the business value of the transaction currently executed by the first target branch;

[0022] Obtaining the latest market business value corresponding to the transaction business;

[0023] The business value is compared with the latest market business value to obtain the profit and loss information of the first target branch executing the transaction business, and the profit and loss information is determined to be the analysis result corresponding to the transaction business.

[0024] The above method may optionally further include:

[0025] Determining whether the transaction business corresponding to the target interface is within the business scope of the first target branch;

[0026] If the transaction business corresponding to the target interface is within the business scope of the first target branch, it is determined that the first target branch has the authority to call the target interface;

[0027] If the transaction business corresponding to the target interface is not within the business scope of the first target branch, it is determined that the first target branch does not have the authority to call the target interface.

[0028] The above method may optionally further include:

[0029] When receiving the second interface control list sent by the second target branch, decrypting the second interface control list using a preset key to obtain a decrypted interface control list;

[0030] Obtaining each second identification parameter corresponding to the second target branch in the decrypted interface control list;

[0031] Obtain a preset smart contract template corresponding to the blockchain;

[0032] Based on the smart contract template, convert each of the second identification parameters into a parameter format supported by the smart contract template;

[0033] Based on the converted identification parameters, a smart contract corresponding to the second target branch is generated, and the smart contract corresponding to the second target branch is uploaded to the blockchain.

[0034] An interface control device, comprising:

[0035] A first determining unit, configured to determine a target interface corresponding to the interface calling request when receiving the interface calling request sent by the first target branch;

[0036] A first acquisition unit, configured to acquire a first interface control list corresponding to the first target branch in the interface call request;

[0037] A search unit, configured to search a preset blockchain for a smart contract corresponding to the first target branch, wherein the smart contract is a standard interface control list corresponding to the first target branch;

[0038] A verification unit, configured to verify the first interface control list based on the smart contract;

[0039] A calling unit, configured to allow the first target branch to call the target interface when the first interface control list is checked, so that the first target branch calls the target interface to execute the transaction business corresponding to the target interface;

[0040] A second acquisition unit, configured to acquire, through the target interface, various transaction data generated when the first target branch executes the transaction business;

[0041] An analysis unit, used to perform data analysis on each of the transaction data to obtain analysis results corresponding to the transaction business;

[0042] A storage unit is used to store the first interface control list, analysis results and various transaction data in the blockchain.

[0043] In the above device, optionally, the inspection unit comprises:

[0044] A first acquisition subunit, used to acquire each smart contract identification parameter contained in the smart contract and each first identification parameter contained in the first interface control list;

[0045] A verification subunit, used to verify whether there is a smart contract identification parameter consistent with each of the first identification parameters in the smart contract;

[0046] A first execution subunit, configured to pass the inspection of the first interface control list if there is a smart contract identification parameter in the smart contract that is consistent with each of the first identification parameters;

[0047] The second execution subunit is used to fail the inspection of the first interface control list if there is no smart contract identification parameter consistent with any first identification parameter in the smart contract.

[0048] In the above device, optionally, the analysis unit comprises:

[0049] A clearing subunit, used for clearing each of the transaction data to obtain the business value of the transaction currently executed by the first target branch;

[0050] A second acquisition subunit is used to acquire the latest market business value corresponding to the transaction business;

[0051] The comparison subunit is used to compare the business value with the latest market business value, obtain the profit and loss information of the first target branch executing the transaction business, and determine that the profit and loss information is the analysis result corresponding to the transaction business.

[0052] The above device may optionally further include:

[0053] A determination unit, configured to determine whether the transaction business corresponding to the target interface is within the business scope of the first target branch;

[0054] A second determining unit, configured to determine that the first target branch has the authority to call the target interface if the transaction business corresponding to the target interface is within the business scope of the first target branch;

[0055] The third determining unit is configured to determine that the first target branch does not have the authority to call the target interface if the transaction business corresponding to the target interface is not within the business scope of the first target branch.

[0056] The above device may optionally further include:

[0057] a decryption unit, configured to, when receiving the second interface control list sent by the second target branch, decrypt the second interface control list by applying a preset key to obtain a decrypted interface control list;

[0058] A third acquisition unit, used to acquire each second identification parameter corresponding to the second target branch in the decrypted interface control list;

[0059] A fourth acquisition unit, used to acquire a preset smart contract template corresponding to the blockchain;

[0060] A conversion unit, configured to convert each of the second identification parameters into a parameter format supported by the smart contract template based on the smart contract template;

[0061] A generating unit is used to generate a smart contract corresponding to the second target branch based on the converted identification parameters, and upload the smart contract corresponding to the second target branch to the blockchain.

[0062] A storage medium includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the above-mentioned interface management and control method.

[0063] An electronic device includes a memory and one or more instructions, wherein the one or more instructions are stored in the memory and are configured to be executed by one or more processors to perform the above-mentioned interface control method.

[0064] Compared with the prior art, the present invention has the following advantages:

[0065] The present invention provides an interface control method, including: when receiving an interface call request sent by a first target branch, determining the target interface corresponding to the interface call request; obtaining the first interface control list corresponding to the first target branch in the interface call request; searching for the smart contract corresponding to the first target branch in the pre-set blockchain, the smart contract is the standard interface control list corresponding to the first target branch; based on the smart contract, checking the first interface control list; when passing the inspection of the first interface control list, allowing the first target branch to call the target interface, so that the first target branch calls the target interface to perform the transaction business corresponding to the target interface; through the target interface, obtaining each transaction data generated when the first target branch executes the transaction business; performing data analysis on each of the transaction data to obtain the analysis results corresponding to the transaction business; storing the first interface control list, the analysis results and each transaction data in the blockchain. Applying the method provided by the present invention, the branch can apply for calling the interface online and check the interface control list to prevent information from being tampered with. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0067] Figure 1 A method flow chart of an interface management method provided by an embodiment of the present invention;

[0068] Figure 2 Another method flow chart of an interface management method provided by an embodiment of the present invention;

[0069] Figure 3 A flowchart of another method of an interface management method provided by an embodiment of the present invention;

[0070] Figure 4 Another method flow chart of an interface management method provided by an embodiment of the present invention;

[0071] Figure 5 A device structure diagram of an interface control device provided by an embodiment of the present invention;

[0072] Figure 6 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0073] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0074] In this application, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. The terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of more restrictions, the elements defined by the sentence "comprise one..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0075] The present invention can be used in many general or special computing device environments or configurations, such as personal computers, server computers, handheld or portable devices, tablet devices, multi-processor devices, distributed computing environments including any of the above devices or devices, etc.

[0076] The embodiment of the present invention provides an interface management method, which can be applied to various system platforms, and its execution subject can be a processor of a computer terminal or various mobile devices. The method flow chart of the method is as follows: Figure 1 As shown, specifically including:

[0077] S101: When receiving an interface call request sent by a first target branch, determining a target interface corresponding to the interface call request.

[0078] In the embodiment of the present invention, when the first target branch needs to execute a transaction, it sends an interface call request to the head office. The target interface requested to be called by the first target branch corresponding to the interface call request is an interface that supports the first target branch to execute the transaction corresponding to the interface call request.

[0079] S102: Obtain a first interface control list corresponding to the first target branch in the interface call request.

[0080] In the embodiment of the present invention, the branch authentication code is an authentication code set by the head office for the branch to uniquely identify the branch.

[0081] Among them, the interface control list includes the write identification of the first target branch, application control ID, branch identification, branch feature system identification, head office application system identification, branch application interface transaction code, branch feature system access IP, branch application number, interface call serial number, interface call timestamp and interface call involved system and other identification parameters.

[0082] S103: Searching for a smart contract corresponding to the first target branch in a preset blockchain.

[0083] Among them, the smart contract is a standard interface control list corresponding to the first target branch.

[0084] In an embodiment of the present invention, the branch authentication code of the first target branch can be obtained, and the branch authentication code can be used as the index condition of the smart contract corresponding to the first target branch, and the smart contract corresponding to the branch authentication code can be searched in the blockchain.

[0085] It should be noted that the blockchain can specifically be the consortium chain Hyperledger Fabric.

[0086] S104: Based on the smart contract, the first interface control list is checked.

[0087] In an embodiment of the present invention, each parameter in the smart contract is compared with each parameter in the first interface control list, that is, the first interface control list is checked to verify whether the first interface control list has been tampered with.

[0088] S105: When the first interface control list is checked, the first target branch is allowed to call the target interface, so that the first target branch calls the target interface to execute the transaction business corresponding to the target interface.

[0089] In an embodiment of the present invention, when the first interface control list is checked, it indicates that the first interface control list has not been tampered with, the channel system of the head office allows the first target branch to call the target interface and opens the target interface to the first target branch. The first target branch interacts with the head office through the target interface to execute the transaction business corresponding to the target interface.

[0090] It should be noted that the head office has multiple systems, each system is used to implement different transaction businesses, and each system has corresponding interfaces. When a branch needs to execute a transaction business corresponding to a certain system, the branch applies to the head office to call the interface of the system to implement the corresponding transaction business, such as: transfer business, corporate business, and reversal business.

[0091] S106: Acquire, through the target interface, various transaction data generated when the first target branch executes the transaction business.

[0092] In the embodiment of the present invention, when the first target branch calls the target interface to execute a transaction, corresponding transaction data will be generated. Each transaction data includes transaction amount, transaction time, transaction flow, transaction object, etc.

[0093] S107: Perform data analysis on each of the transaction data to obtain analysis results corresponding to the transaction business.

[0094] In the embodiment of the present invention, each transaction data is analyzed to determine the business value of the transaction business at the first target branch and the profit and loss situation of the transaction business at the first target branch to obtain corresponding analysis results.

[0095] S108: Storing the first interface control list, analysis results and each transaction data in the blockchain.

[0096] In an embodiment of the present invention, the first interface control list, the analysis interface and each transaction data are stored in the blockchain to facilitate subsequent verification based on the first interface control list and the transaction data, and to set the future business development direction of the first target branch and the basis for branch performance evaluation based on the analysis results.

[0097] In the interface control method provided by the embodiment of the present invention, when an interface call request sent by the first target branch is received, the target interface requested to be called is determined, and the first interface control list sent by the first target branch through the interface call request is obtained. The smart contract corresponding to the first target branch in the blockchain is searched, and the first interface control list is checked through the smart contract to see if it has been tampered with; if not, the first target branch is allowed to call the target interface to execute the transaction business corresponding to the target interface, and the various transaction data generated when the first target branch executes the transaction business is obtained. After the first target branch finishes executing the transaction business, the various transaction data corresponding to the transaction business are analyzed to obtain the analysis results. The first interface control list, the analysis results, and the various transaction data are stored in the blockchain to facilitate the subsequent verification of information by the head office's channel system and the branch's characteristic system to ensure data consistency. At the same time, the future business development direction of the first target branch and the basis for branch performance evaluation can be determined based on the various analysis results and various transaction data.

[0098] By using the method provided in the embodiment of the present invention, a branch can apply for calling an interface online and check the interface control list to prevent information from being tampered with.

[0099] In the method provided in the embodiment of the present invention, based on the content of SS104 above, reference is made to Figure 2 , the checking of the first interface control list based on the smart contract may specifically include:

[0100] S201: Obtain each smart contract identification parameter contained in the smart contract and each first identification parameter contained in the first interface control list.

[0101] In an embodiment of the present invention, as shown in Table 1, Table 1 is each smart contract identification parameter included in the smart contract stored in the block of the blockchain:

[0102]

[0103]

[0104] Table 1

[0105] S202: Check whether there is a smart contract identification parameter in the smart contract that is consistent with each of the first identification parameters.

[0106] In an embodiment of the present invention, if there is a smart contract identification parameter in the smart contract that is consistent with each of the first identification parameters, S203 is executed; if there is no smart contract identification parameter in the smart contract that is consistent with any of the first identification parameters, S204 is executed.

[0107] S203: Pass the inspection of the first interface control list.

[0108] In the embodiment of the present invention, after checking the first interface control list, it is determined that the first interface control list has not been tampered with, and the first target branch is allowed to call the target interface.

[0109] S204: Failure to pass the inspection of the first interface control list.

[0110] In an embodiment of the present invention, if the first interface control list fails to be inspected and it is determined that any first identification parameter in the first interface control list may have been tampered with, in order to avoid errors in transaction data or tampering of data during the execution of transaction business, the first target branch is prohibited from calling the target interface.

[0111] In the interface control method provided by the embodiment of the present invention, when it is necessary to check whether the first interface control list has been tampered with during the process of being sent to the head office, each smart contract identification parameter contained in the smart contract and each first identification parameter contained in the first interface control list are obtained. Each first identification parameter is compared with each smart contract identification parameter one by one to determine whether the smart contract contains smart contract parameters that are consistent with all the first identification parameters. If so, it indicates that the first interface control list has not been tampered with; otherwise, it indicates that the first interface control list has been tampered with.

[0112] Optionally, if the first interface control list is tampered with, the first identification parameter in the first interface control list that is inconsistent with the smart contract is located, and the identification parameter that is inconsistent with the smart contract is sent to the first target branch, and the first target branch is prompted that the interface call failed. After receiving the prompt, the first target branch rechecks the first interface control list and re-initiates the interface call request.

[0113] By applying the method provided in the embodiment of the present invention, each identification parameter in the interface control list is checked one by one to prevent the interface control list from being tampered with.

[0114] In the method provided in the embodiment of the present invention, based on the content of S107, the process of performing data analysis on each of the transaction data to obtain the analysis result corresponding to the transaction business is as follows: Figure 3 As shown, it may specifically include:

[0115] S301: Clearing each of the transaction data to obtain the business value of the transaction business currently executed by the first target branch.

[0116] In the embodiment of the present invention, the business value refers to the profit or loss brought to the first target branch by the current execution of the transaction business by the first target branch.

[0117] S302: Obtain the latest market business value corresponding to the transaction business.

[0118] In the embodiment of the present invention, the latest market business value is the current value of the transaction business in the industry.

[0119] S303: Compare the business value with the latest market business value to obtain profit and loss information of the first target branch executing the transaction business, and determine that the profit and loss information is an analysis result corresponding to the transaction business.

[0120] In the embodiment of the present invention, the business value is compared with the latest market business value to determine whether the first target branch is in a profit state or a loss state, that is, to determine the profit and loss information, and the profit and loss information is determined as the analysis result and saved in the blockchain. When the head office needs to perform performance evaluation or information verification on the first target classification, the analysis result can be obtained for evaluation and verification, and business conditions that meet the first target branch can be formulated.

[0121] In the interface management and control method provided by the embodiment of the present invention, in the process of analyzing each transaction data, each transaction data is cleared to obtain the current business value of the first target branch executing the transaction business, and the profit and loss information of the first target branch is determined by the latest market business value, so as to conduct a business evaluation of the first target branch based on the profit and loss information.

[0122] It is understandable that after obtaining various transaction data, big data analysis can also be performed based on the current transaction data of the first target branch and the historical transaction data obtained from the historical execution of the transaction business, so as to more accurately locate the overall business value of the first target branch and provide a reference for the subsequent development of special businesses.

[0123] By applying the method provided in the embodiment of the present invention, business value analysis is performed on each transaction data to determine the profit and loss situation of the branch, providing an important reference for the subsequent development of special businesses.

[0124] In the method provided by the embodiment of the present invention, before checking the first interface control list, the first target branch may be checked to determine whether the first target branch is allowed to call the target interface. The specific checking process includes:

[0125] Determining whether the transaction business corresponding to the target interface is within the business scope of the first target branch;

[0126] If the transaction business corresponding to the target interface is within the business scope of the first target branch, it is determined that the first target branch has the authority to call the target interface;

[0127] If the transaction business corresponding to the target interface is not within the business scope of the first target branch, it is determined that the first target branch does not have the authority to call the target interface.

[0128] It is understandable that the transaction services supported by each branch are not necessarily the same. When the head office receives the interface call request sent by the first target branch, it determines whether the transaction service corresponding to the target interface is within the scope of the business department of the first target branch, that is, whether the first target branch has the authority to execute the transaction service. If so, the first interface control list of the first target branch is checked, otherwise the first target branch is prohibited from calling the target interface.

[0129] In the method provided in the embodiment of the present invention, before executing the above S101 to S108 or during the execution of the above S101 to S108, other branches are supported to submit their corresponding interface control lists to the head office, and the interface control lists submitted by the branches are converted into smart contracts and stored in the blockchain. The specific process is as follows: Figure 4 As shown, it may specifically include:

[0130] S401: When receiving the second interface control list sent by the second target branch, the second interface control list is decrypted using a preset key to obtain a decrypted interface control list.

[0131] It is understandable that for each branch of the bank, in order to ensure subsequent calls to the interface, each branch needs to register first, that is, send the interface control list corresponding to the branch to the head office.

[0132] Among them, the head office and the branch have agreed on the key for file encryption. When the branch sends the interface control list, the list is encrypted. After receiving the interface control list, the head office uses the key to decrypt the interface control list.

[0133] It should be noted that the second target branch can be the first target branch in S101 above, or it can be another unregistered branch. Before requesting the interface call, the first target branch needs to send an encrypted interface control list to the head office. If the second target branch is the first target branch mentioned above, the second interface control list is the first interface control list mentioned above.

[0134] S402: Obtain each second identification parameter corresponding to the second target branch in the decrypted interface control list.

[0135] In an embodiment of the present invention, each second identification parameter in the decrypted interface control list includes the write identification of the second target branch, the application control ID, the branch identification, the branch characteristic system identification, the head office application system identification, the branch application interface transaction code, the branch characteristic system access IP, the branch application number, the interface call serial number, the interface call timestamp, and the interface call involved systems, etc.

[0136] S403: Obtain a pre-set smart contract template corresponding to the blockchain.

[0137] In an embodiment of the present invention, the smart contract template is the specification and standard for converting the interface control list into a smart contract.

[0138] S404: Based on the smart contract template, convert each of the second identification parameters into a parameter format supported by the smart contract template.

[0139] In an embodiment of the present invention, according to the smart contract template, each second identification parameter in the second interface control list is formatted to obtain identification parameters that appropriately correspond to the parameters supported by the smart contract template.

[0140] S405: Generate a smart contract corresponding to the second target branch based on the converted identification parameters, and upload the smart contract corresponding to the second target branch to the blockchain.

[0141] In an embodiment of the present invention, a smart contract corresponding to the second target branch is generated based on the converted identification parameters and uploaded to the blockchain.

[0142] Specifically, a new block is generated in the blockchain for storing the smart contract corresponding to the second target branch.

[0143] In the interface control method provided by the embodiment of the present invention, when an interface control list is received from any branch, the branch is the second target branch, and the interface control list is the second interface control list. The second interface control list is decrypted using the key agreed upon in advance with the second target branch to obtain the decrypted interface control list, and each second identification parameter corresponding to the second target branch is obtained from the decrypted interface control list. According to the pre-set smart contract template, each second identification parameter is formatted, and based on each converted identification parameter, a smart contract corresponding to the second target branch is generated, and the smart contract is uploaded to the blockchain for storage.

[0144] It should be noted that after uploading the second interface control list corresponding to the second target branch to the blockchain, if the second target branch needs to call a certain interface of the head office, an interface call request corresponding to the interface to be called carrying the second interface control list is sent to the head office.

[0145] By applying the method provided in the embodiment of the present invention, the branch can use the key to encrypt the interface control list and then upload it to the head office. When the head office receives the interface control list of the branch for the first time, it converts it into a smart contract and uploads it to the blockchain to prevent the parameters therein from being tampered with.

[0146] The specific implementation processes and derivative methods of the above-mentioned embodiments are all within the protection scope of the present invention.

[0147] and Figure 1 Corresponding to the method described above, the embodiment of the present invention further provides an interface control device for Figure 1 In the specific implementation of the method, the interface control device provided in the embodiment of the present invention can be applied to a computer terminal or various mobile devices, and its structural diagram is as follows Figure 5 As shown, specifically including:

[0148] The first determining unit 501 is configured to determine a target interface corresponding to the interface calling request when receiving the interface calling request sent by the first target branch;

[0149] A first acquisition unit 502 is used to acquire a first interface control list corresponding to the first target branch in the interface call request;

[0150] A search unit 503 is used to search for a smart contract corresponding to the first target branch in a preset blockchain, where the smart contract is a standard interface control list corresponding to the first target branch;

[0151] A verification unit 504, configured to verify the first interface control list based on the smart contract;

[0152] The calling unit 505 is used to allow the first target branch to call the target interface when the first interface control list is checked, so that the first target branch calls the target interface to execute the transaction business corresponding to the target interface;

[0153] A second acquisition unit 506 is used to acquire, through the target interface, various transaction data generated when the first target branch executes the transaction business;

[0154] An analysis unit 507 is used to perform data analysis on each of the transaction data to obtain analysis results corresponding to the transaction business;

[0155] The storage unit 508 is used to store the first interface control list, analysis results and various transaction data in the blockchain.

[0156] In the interface control device provided by the embodiment of the present invention, when an interface call request sent by the first target branch is received, the target interface requested to be called by the first target branch is determined, and the first interface control list sent by the first target branch through the interface call request is obtained. The smart contract corresponding to the first target branch in the blockchain is searched, and the first interface control list is checked through the smart contract to see if it has been tampered with; if not, the first target branch is allowed to call the target interface to execute the transaction business corresponding to the target interface, and the various transaction data generated when the first target branch executes the transaction business is obtained. After the first target branch finishes executing the transaction business, the various transaction data corresponding to the transaction business are analyzed to obtain the analysis results. The first interface control list, the analysis results, and the various transaction data are stored in the blockchain to facilitate the subsequent verification of information by the channel system of the head office and the branch characteristic system to ensure data consistency. At the same time, the direction of future business development of the first target branch and the basis for branch performance evaluation can be determined based on the various analysis results and various transaction data.

[0157] By using the device provided in the embodiment of the present invention, a branch can apply for calling an interface online and check the interface control list to prevent information from being tampered with.

[0158] In the device provided by the embodiment of the present invention, the inspection unit includes:

[0159] A first acquisition subunit, used to acquire each smart contract identification parameter contained in the smart contract and each first identification parameter contained in the first interface control list;

[0160] A verification subunit, used to verify whether there is a smart contract identification parameter consistent with each of the first identification parameters in the smart contract;

[0161] A first execution subunit, configured to pass the inspection of the first interface control list if there is a smart contract identification parameter in the smart contract that is consistent with each of the first identification parameters;

[0162] The second execution subunit is used to fail the inspection of the first interface control list if there is no smart contract identification parameter consistent with any first identification parameter in the smart contract.

[0163] In the device provided by the embodiment of the present invention, the analysis unit includes:

[0164] A clearing subunit, used for clearing each of the transaction data to obtain the business value of the transaction currently executed by the first target branch;

[0165] A second acquisition subunit is used to acquire the latest market business value corresponding to the transaction business;

[0166] The comparison subunit is used to compare the business value with the latest market business value, obtain the profit and loss information of the first target branch executing the transaction business, and determine that the profit and loss information is the analysis result corresponding to the transaction business.

[0167] The device provided in the embodiment of the present invention further includes:

[0168] A determination unit, configured to determine whether the transaction business corresponding to the target interface is within the business scope of the first target branch;

[0169] A second determining unit, configured to determine that the first target branch has the authority to call the target interface if the transaction business corresponding to the target interface is within the business scope of the first target branch;

[0170] The third determining unit is configured to determine that the first target branch does not have the authority to call the target interface if the transaction business corresponding to the target interface is not within the business scope of the first target branch.

[0171] The device provided in the embodiment of the present invention further includes:

[0172] a decryption unit, configured to, when receiving the second interface control list sent by the second target branch, decrypt the second interface control list by applying a preset key to obtain a decrypted interface control list;

[0173] A third acquisition unit, used to acquire each second identification parameter corresponding to the second target branch in the decrypted interface control list;

[0174] A fourth acquisition unit, used to acquire a preset smart contract template corresponding to the blockchain;

[0175] A conversion unit, configured to convert each of the second identification parameters into a parameter format supported by the smart contract template based on the smart contract template;

[0176] A generating unit is used to generate a smart contract corresponding to the second target branch based on the converted identification parameters, and upload the smart contract corresponding to the second target branch to the blockchain.

[0177] For the specific working process of each unit and sub-unit in the interface control device disclosed in the above embodiment of the present invention, please refer to the corresponding content in the interface control method disclosed in the above embodiment of the present invention, which will not be repeated here.

[0178] An embodiment of the present invention further provides a storage medium, which includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the above-mentioned interface management and control method.

[0179] The embodiment of the present invention further provides an electronic device, the structural diagram of which is shown in FIG. Figure 6 As shown, it specifically includes a memory 601 and one or more instructions 602, wherein the one or more instructions 602 are stored in the memory 601 and are configured to be executed by one or more processors 603 to perform the following operations:

[0180] When receiving the interface call request sent by the first target branch, determining the target interface corresponding to the interface call request;

[0181] Obtaining a first interface control list corresponding to the first target branch in the interface call request;

[0182] Searching for a smart contract corresponding to the first target branch in a preset blockchain, where the smart contract is a standard interface control list corresponding to the first target branch;

[0183] Based on the smart contract, checking the first interface control list;

[0184] When the first interface control list is checked, the first target branch is allowed to call the target interface, so that the first target branch calls the target interface to execute the transaction business corresponding to the target interface;

[0185] Acquiring, through the target interface, various transaction data generated when the first target branch executes the transaction business;

[0186] Performing data analysis on each of the transaction data to obtain analysis results corresponding to the transaction business;

[0187] The first interface control list, analysis results and each transaction data are stored in the blockchain.

[0188] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without creative work.

[0189] Those skilled in the art may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein may be implemented by electronic hardware, computer software, or a combination of both.

[0190] In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.

[0191] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. An interface management and control method, characterized in that: include: When receiving the interface call request sent by the first target branch, determining the target interface corresponding to the interface call request; Obtaining a first interface control list corresponding to the first target branch in the interface call request, the interface control list including a write identifier, an application control ID, a branch identifier, a branch feature system identifier, a head office application system identifier, a branch application interface transaction code, a branch feature system access IP, a branch application number, an interface call serial number, an interface call timestamp, and an interface call system of the first target branch; Searching for a smart contract corresponding to the first target branch in a preset blockchain, where the smart contract is a standard interface control list corresponding to the first target branch; Based on the smart contract, checking the first interface control list; When the first interface control list is checked, the first target branch is allowed to call the target interface, so that the first target branch calls the target interface to execute the transaction business corresponding to the target interface; Acquiring, through the target interface, various transaction data generated when the first target branch executes the transaction business; Performing data analysis on each of the transaction data to obtain analysis results corresponding to the transaction business; storing the first interface control list, analysis results and each transaction data in the blockchain; Determining whether the transaction business corresponding to the target interface is within the business scope of the first target branch; If the transaction business corresponding to the target interface is within the business scope of the first target branch, it is determined that the first target branch has the authority to call the target interface; If the transaction business corresponding to the target interface is not within the business scope of the first target branch, it is determined that the first target branch does not have the authority to call the target interface.

2. The method according to claim 1, characterized in that The checking of the first interface control list based on the smart contract includes: Obtaining each smart contract identification parameter contained in the smart contract and each first identification parameter contained in the first interface control list; Checking whether there is a smart contract identification parameter in the smart contract that is consistent with each of the first identification parameters; If there are smart contract identification parameters in the smart contract that are consistent with each of the first identification parameters, then the first interface control list is checked; If there is no smart contract identification parameter in the smart contract that is consistent with any first identification parameter, the first interface control list will not be checked.

3. The method according to claim 1, characterized in that The performing of data analysis on each of the transaction data to obtain analysis results corresponding to the transaction business includes: clearing each of the transaction data to obtain the business value of the transaction currently executed by the first target branch; Obtaining the latest market business value corresponding to the transaction business; The business value is compared with the latest market business value to obtain the profit and loss information of the first target branch executing the transaction business, and the profit and loss information is determined to be the analysis result corresponding to the transaction business.

4. The method according to claim 1, characterized in that: Also includes: When receiving the second interface control list sent by the second target branch, decrypting the second interface control list using a preset key to obtain a decrypted interface control list; Obtaining each second identification parameter corresponding to the second target branch in the decrypted interface control list; Obtain a preset smart contract template corresponding to the blockchain; Based on the smart contract template, convert each of the second identification parameters into a parameter format supported by the smart contract template; Based on the converted identification parameters, a smart contract corresponding to the second target branch is generated, and the smart contract corresponding to the second target branch is uploaded to the blockchain.

5. An interface control device, characterized in that: include: A first determining unit, configured to determine a target interface corresponding to the interface calling request when receiving the interface calling request sent by the first target branch; A first acquisition unit is used to acquire a first interface control list corresponding to the first target branch in the interface call request, wherein the interface control list includes a write identifier, an application control ID, a branch identifier, a branch feature system identifier, a head office application system identifier, a branch application interface transaction code, a branch feature system access IP, a branch application number, an interface call serial number, an interface call timestamp, and an interface call system of the first target branch; A search unit, configured to search a preset blockchain for a smart contract corresponding to the first target branch, wherein the smart contract is a standard interface control list corresponding to the first target branch; A verification unit, configured to verify the first interface control list based on the smart contract; A calling unit, configured to allow the first target branch to call the target interface when the first interface control list is checked, so that the first target branch calls the target interface to execute the transaction business corresponding to the target interface; A second acquisition unit, configured to acquire, through the target interface, various transaction data generated when the first target branch executes the transaction business; An analysis unit, used to perform data analysis on each of the transaction data to obtain analysis results corresponding to the transaction business; A storage unit, used to store the first interface control list, analysis results and each transaction data in the blockchain; A determination unit, configured to determine whether the transaction business corresponding to the target interface is within the business scope of the first target branch; A second determining unit, configured to determine that the first target branch has the authority to call the target interface if the transaction business corresponding to the target interface is within the business scope of the first target branch; The third determining unit is configured to determine that the first target branch does not have the authority to call the target interface if the transaction business corresponding to the target interface is not within the business scope of the first target branch.

6. The device according to claim 5, characterized in that The inspection unit comprises: A first acquisition subunit, used to acquire each smart contract identification parameter contained in the smart contract and each first identification parameter contained in the first interface control list; A verification subunit, used to verify whether there is a smart contract identification parameter consistent with each of the first identification parameters in the smart contract; A first execution subunit, configured to pass the inspection of the first interface control list if there is a smart contract identification parameter in the smart contract that is consistent with each of the first identification parameters; The second execution subunit is used to fail the inspection of the first interface control list if there is no smart contract identification parameter consistent with any first identification parameter in the smart contract.

7. The device according to claim 5, characterized in that The analysis unit comprises: A clearing subunit, used for clearing each of the transaction data to obtain the business value of the transaction currently executed by the first target branch; A second acquisition subunit is used to acquire the latest market business value corresponding to the transaction business; The comparison subunit is used to compare the business value with the latest market business value, obtain the profit and loss information of the first target branch executing the transaction business, and determine that the profit and loss information is the analysis result corresponding to the transaction business.

8. The device according to claim 5, characterized in that Also includes: a decryption unit, configured to, when receiving the second interface control list sent by the second target branch, decrypt the second interface control list by applying a preset key to obtain a decrypted interface control list; A third acquisition unit, used to acquire each second identification parameter corresponding to the second target branch in the decrypted interface control list; A fourth acquisition unit, used to acquire a preset smart contract template corresponding to the blockchain; A conversion unit, configured to convert each of the second identification parameters into a parameter format supported by the smart contract template based on the smart contract template; A generating unit is used to generate a smart contract corresponding to the second target branch based on the converted identification parameters, and upload the smart contract corresponding to the second target branch to the blockchain.