CN113191906A - Service data processing method and device, electronic equipment and storage medium - Google Patents

Service data processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113191906A
CN113191906A CN202110576955.1A CN202110576955A CN113191906A CN 113191906 A CN113191906 A CN 113191906A CN 202110576955 A CN202110576955 A CN 202110576955A CN 113191906 A CN113191906 A CN 113191906A
Authority
CN
China
Prior art keywords
contract
frozen
amount
service
service request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110576955.1A
Other languages
Chinese (zh)
Inventor
李锐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN202110576955.1A priority Critical patent/CN113191906A/en
Publication of CN113191906A publication Critical patent/CN113191906A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/06Asset management; Financial planning or analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution

Abstract

The invention discloses a method and a device for processing service data, electronic equipment and a storage medium, and relates to the technical field of cloud computing. One embodiment of the method comprises: receiving a freezing service request, acquiring a personal settlement account identifier and an organization identifier, and inquiring a corresponding private database fragment address and a public database fragment address; acquiring the frozen amount and the service order identification to generate a contract copy, and storing the corresponding relation between the contract copy and the mechanism identification into a public database fragment; acquiring a frozen amount in the frozen service request to update an available balance and a total frozen amount corresponding to the personal settlement account identifier, generating a model to generate a frozen event record, and storing the frozen event record; and sending information of successful freezing to the terminal. The implementation mode can solve the problems that in the prior art, high relevance exists between mechanism contracts and individual contracts, so that the time spent on the business processing of the individual deposit is long, and the efficiency of the business processing is reduced.

Description

Service data processing method and device, electronic equipment and storage medium
Technical Field
The invention relates to the technical field of cloud computing, in particular to a method and a device for processing business data, electronic equipment and a storage medium.
Background
The personal security fund service is a fund escrow service provided by a financial institution aiming at fund security problems of the institution and a person in some commodity or service transactions, and specifically, the financial institution can perform operations of freezing, unfreezing, deducting and the like on funds of a personal account according to an institution contract of a cooperative institution and a personal contract of the person based on common entrustment of the cooperative institution and the person user. However, in the prior art, the mechanism contract and the personal contract have high relevance, data interaction is frequently required for processing the personal deposit service, and the processing time of the personal deposit service is long along with the great increase of the number of the personal deposit service, so that the efficiency of service processing is reduced.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for processing service data, an electronic device, and a storage medium, which can solve the problems in the prior art that a high correlation exists between an organization contract and a personal contract, which results in a long time spent on processing a personal deposit service, and reduces efficiency of service processing.
To achieve the above object, according to an aspect of an embodiment of the present invention, a method of data comparison is provided.
The method for processing the service data comprises the following steps: receiving a frozen service request sent by a terminal, acquiring a personal settlement account identifier and an organization identifier in the frozen service request, and inquiring a corresponding private database fragment address and a public database fragment address according to a preset corresponding relation; acquiring the frozen amount and the service order identification in the frozen service request, calling a contract copy generation model to generate a contract copy, and storing the corresponding relation between the contract copy and the mechanism identification to a public database shard based on the public database shard address; based on the private database fragment address, inquiring available balance and total frozen amount corresponding to the personal settlement account identifier from the private database fragment, acquiring the frozen amount in the frozen service request to update the available balance and the total frozen amount, calling a preset record generation model to generate a frozen event record, and storing the corresponding relation between the personal settlement account identifier and the frozen event record; and establishing a corresponding relation among the service order mark, the private database fragment address and the public database fragment address, and sending information of successful freezing to the terminal.
In one embodiment, the invoking a preset record generation model to generate a freeze event record includes:
acquiring a service order mark in the frozen service request to generate a contract mark;
inquiring a freezing date and a freezing number corresponding to the freezing service request to generate the freezing event record identifier based on the personal settlement account identifier, the freezing date and the freezing number;
generating a frozen event record based on the frozen event record identifier and the frozen amount in the frozen service request;
and calling a contract generation model based on the business order identification, the frozen event record identification, the frozen amount in the frozen business request and the personal settlement account identification to generate a contract corresponding to the business order identification.
In another embodiment, the obtaining the service order identifier in the frozen service request to generate a contract identifier includes:
and splicing the service order identification with a preset code to generate a contract identification.
In another embodiment, after sending the information of success of freezing to the terminal, the method further includes:
receiving a deduction service request sent by a terminal, acquiring the service order identification in the deduction service request, and inquiring a corresponding private database fragment address and a public database fragment address according to the established corresponding relation;
inquiring a guarantee fund sub-contract corresponding to the service order identification from a private database fragment based on the inquired private database fragment address to determine a to-be-deducted settlement account identification from the guarantee fund sub-contract, acquiring unfreezing amount in the deducting service request, executing deducting transaction operation based on the unfreezing amount and the to-be-deducted settlement account identification, and updating the contract state of the guarantee fund sub-contract;
inquiring a contract copy corresponding to the service order mark from the public database shards based on the inquired public database shard address to determine a public settlement account mark from the inquired contract copy, acquiring unfreezing amount in the deduction service request, executing money receiving transaction operation based on the unfreezing amount and the public settlement account mark, and further updating the inquired state of the contract copy based on the contract state;
and returning information of successful deduction to the terminal.
In another embodiment, before executing the deduction transaction operation based on the unfreezing amount and the account identification to be deducted, the method further comprises the following steps:
and inquiring the frozen amount and the available balance corresponding to the account identification to be deducted, so as to update the frozen amount and the available balance corresponding to the account identification to be deducted based on the unfreezing amount.
In yet another embodiment, the updating the contract status of the guaranty gold contract comprises:
acquiring the frozen amount in the security sub-contract, and judging whether the frozen amount in the security sub-contract is equal to the unfreezing amount;
if not, the contract state of the gold contract is not operated;
and if so, updating the contract state of the security gold contract into the contracted state.
In yet another embodiment, further comprising:
receiving asynchronous messages, acquiring service order identifications in the asynchronous messages, inquiring corresponding public database fragment addresses based on the established corresponding relation, and further acquiring contract copies corresponding to the service order identifications in the asynchronous messages according to the inquired public database fragment addresses;
and determining a contract time stamp of the contract copy, acquiring a state time stamp in the asynchronous message and the current state of the contract copy, judging whether the contract time stamp is greater than the state time stamp, if so, updating the state of the contract copy to the current state, and if not, not processing the contract copy.
In another embodiment, before the obtaining the frozen amount in the frozen service request, the method further includes:
based on the address of the public storage segment, inquiring mechanism information corresponding to the mechanism identification from the public storage segment;
calling a mechanism checking model, checking the mechanism information and obtaining a mechanism checking result;
if the mechanism verification result is that the verification is passed, no processing is performed;
and if the mechanism verification result is that the verification fails, sending freezing failure information to the terminal.
In another embodiment, before obtaining the frozen amount in the frozen service request, the method further comprises:
based on the private storage fragment address, inquiring account information corresponding to the personal settlement account identifier from the private storage fragment;
calling an account verification model, verifying the account information and obtaining an account verification result;
if the account verification result is that the verification is passed, no processing is performed;
and if the account verification result is that the verification fails, sending freezing failure information to the terminal.
To achieve the above object, according to another aspect of the embodiments of the present invention, a device for processing service data is provided.
The device for processing the service data comprises: the system comprises a receiving unit, a processing unit and a processing unit, wherein the receiving unit is used for receiving a frozen service request sent by a terminal, acquiring a personal settlement account identifier and an organization identifier in the frozen service request, and inquiring a corresponding private database fragment address and a public database fragment address according to a preset corresponding relation; the generating unit is used for acquiring the frozen amount and the service order identification in the frozen service request, calling a contract copy generating model to generate a contract copy, and storing the corresponding relation between the contract copy and the mechanism identification to a public database shard based on the public database shard address; the generation unit is further configured to query, based on the private database shard address, an available balance and a total frozen amount corresponding to the personal settlement account identifier from the private database shard, obtain a frozen amount in the frozen service request, update the available balance and the total frozen amount, further invoke a preset record generation model to generate a frozen event record, and store a corresponding relationship between the personal settlement account identifier and the frozen event record; and the sending unit is used for establishing the corresponding relation among the service order mark, the private database fragment address and the public database fragment address and sending the information of successful freezing to the terminal.
In an embodiment, the generating unit is specifically configured to:
acquiring a service order mark in the frozen service request to generate a contract mark;
inquiring a freezing date and a freezing number corresponding to the freezing service request to generate the freezing event record identifier based on the personal settlement account identifier, the freezing date and the freezing number;
generating a frozen event record based on the frozen event record identifier and the frozen amount in the frozen service request;
and calling a contract generation model based on the business order identification, the frozen event record identification, the frozen amount in the frozen business request and the personal settlement account identification to generate a contract corresponding to the business order identification.
In another embodiment, the generating unit is specifically configured to:
and splicing the service order identification with a preset code to generate a contract identification.
In another embodiment, the receiving unit is further configured to receive a deduction service request sent by a terminal, acquire the service order identifier in the deduction service request, and query a corresponding private-to-public database fragment address and a corresponding public-to-public database fragment address according to the established correspondence;
the device further comprises:
the deduction unit is used for inquiring a guarantee fund sub-contract corresponding to the service order identification from a private database fragment based on the inquired private database fragment address so as to determine a to-be-deducted settlement account identification from the guarantee fund sub-contract, acquiring unfrozen amount in the deduction service request, executing deduction transaction operation based on the unfrozen amount and the to-be-deducted settlement account identification, and updating the contract state of the guarantee fund sub-contract;
the collection unit is used for inquiring a contract copy corresponding to the service order mark from the public database shards based on the inquired public database shard address, determining a public settlement account mark from the inquired contract copy, acquiring unfreezing amount in the deduction service request, executing collection transaction operation based on the unfreezing amount and the public settlement account mark, and further updating the inquired contract copy state based on the contract state;
the sending unit is further configured to return information of successful deduction to the terminal.
In another embodiment, the deduction unit is further configured to query a frozen amount and an available balance corresponding to the account identifier to be deducted, so as to update the frozen amount and the available balance corresponding to the account identifier to be deducted based on the unfreezing amount.
In another embodiment, the payment receiving unit is specifically configured to:
acquiring the frozen amount in the security sub-contract, and judging whether the frozen amount in the security sub-contract is equal to the unfreezing amount;
if not, the contract state of the gold contract is not operated;
and if so, updating the contract state of the security gold contract into the contracted state.
In yet another embodiment, the receiving unit is further configured to receive an asynchronous message, obtain a service order identifier in the asynchronous message, query a corresponding public database sharding address based on the established correspondence, and further obtain a contract copy corresponding to the service order identifier in the asynchronous message according to the queried public database sharding address;
the device further comprises:
an updating unit, configured to determine a contract timestamp of the contract copy, obtain a state timestamp in the asynchronous message and a current state of the contract copy, determine whether the contract timestamp is greater than the state timestamp, update the state of the contract copy to the current state if the contract timestamp is greater than the state timestamp, and not process the contract copy if the contract timestamp is not greater than the state timestamp
In yet another embodiment, the apparatus further comprises:
the inquiry unit is used for inquiring the mechanism information corresponding to the mechanism identification from the public storage fragment based on the public storage fragment address;
the checking unit is used for calling a mechanism checking model, checking the mechanism information and obtaining a mechanism checking result;
the sending unit is further configured to not process the mechanism verification result if the mechanism verification result is that verification passes; and if the mechanism verification result is that the verification fails, sending freezing failure information to the terminal.
In another embodiment, the querying unit is further configured to query, based on the address of the private storage segment, account information corresponding to the personal settlement account identifier from the private storage segment;
the verification unit is further used for calling an account verification model, verifying the account information and obtaining an account verification result;
the sending unit is further configured to not process the account if the account verification result is that the verification is passed; and if the account verification result is that the verification fails, sending freezing failure information to the terminal.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided an electronic apparatus.
An electronic device of an embodiment of the present invention includes: one or more processors; the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the service data processing method provided by the embodiment of the invention.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided a computer-readable medium.
A computer-readable medium of an embodiment of the present invention stores thereon a computer program, and the computer program, when executed by a processor, implements a method for processing service data provided by an embodiment of the present invention.
One embodiment of the above invention has the following advantages or benefits: in the embodiment of the invention, after a freezing service request sent by a terminal is received, the corresponding private database fragment address and the public database fragment address can be inquired based on the personal settlement account identifier and the mechanism identifier, then the public database fragment can be determined based on the public database fragment address, the contract copy corresponding to the freezing service request is stored in the public database fragment, the private database fragment is determined based on the private database fragment address, and further the information of the personal settlement account in the private storage fragment is updated based on the freezing amount. In the embodiment of the invention, the mechanism information is stored in the public database shard, the information of the personal settlement account is stored in the private database shard, namely, the mechanism contract and the personal contract are respectively stored, and the public database shard and the private database shard can be respectively operated when the service freezing request is received, so that the mechanism contract and the personal contract are decoupled, the relevance between the mechanism contract and the personal contract is reduced, and thus, the time spent on service processing can be reduced and the efficiency of service processing is improved even if the number of personal deposit services is increased.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is an architectural diagram of a distributed database system according to an embodiment of the invention;
fig. 2 is a schematic diagram of a main flow of a service data processing method according to an embodiment of the present invention;
fig. 3 is a schematic diagram of another main flow of a processing method of deduction service data according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of data migration in a database according to an embodiment of the present invention;
fig. 5 is a schematic diagram of the main units of a traffic data processing apparatus according to an embodiment of the present invention;
FIG. 6 is a diagram of yet another exemplary system architecture to which embodiments of the present invention may be applied;
FIG. 7 is a schematic block diagram of a computer system suitable for use in implementing embodiments of the present invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It should be noted that the embodiments and features of the embodiments may be combined with each other without conflict.
The embodiment of the invention provides a processing system of service data, which can be used for processing personal deposit service, and specifically can comprise operations of freezing, unfreezing, deducting and the like of personal deposit.
The personal deposit transaction generally refers to a transaction order which is signed by a person and other institutions according to transaction requirements (such as house purchasing and the like), and is used for accounting deposits with various deposit properties of deposits stored in financial institutions such as banks and the like based on the transaction order requirements. The processing of the personal deposit service needs to be performed based on a service order between an individual and an organization, and therefore the personal deposit service involves processing of private service data representing service data (individual contract) related to personal account settlement operations and processing of public service data representing service data (organization contract) related to organization account settlement. In order to reduce the relevance between the private service data processing and the public service data processing in the service processing, the processing system in the embodiment of the invention is provided with the distributed database, namely, the distributed database fragments are arranged, the private service data and the public service data are respectively stored in different database fragments based on the service rule and the bearing capacity of the distributed database, and meanwhile, for the convenience of service processing, the private service data are stored in each fragment according to the principle of 'same organization priority and same client second'. In the embodiment of the present invention, the segment storing the public service data may be referred to as a public database segment, and the segment storing the private service data may be referred to as a private database segment. Fig. 1 is a schematic structural diagram of storage of private business data and public business data in an embodiment of the present invention. In fig. 1, sharding public databases and sharding private databases respectively. For the data storage of the personal deposit service, the mechanism contract, the amount related to the mechanism contract, the mechanism information and the associated public settlement account (mechanism account) can be stored in the same fragment according to the closeness degree of the relationship, namely, the mechanism contract, the amount related to the mechanism contract, the mechanism information and the associated public settlement account (mechanism account) are stored in the public fragment; the personal sub-contract, the information of the personal contract, the change history and the like, and the associated contra-private settlement account are stored in the same segment, namely, the contra-private segment. As shown in fig. 1, the segment may store a copy of the public life deposit contract, the internal account contract, the personal deposit principal contract, and the personal deposit sub-contract corresponding to each institution. The public life deposit contract and the internal account are mechanism contracts corresponding to the public settlement account, and the personal deposit main contract and the personal deposit sub-contract copy are the deposit contracts of the personal account corresponding to the mechanism. The personal security sub-contract copy can be stored in the public piece, so that the specific content of the personal security sub-contract can be inquired in time when public service data is processed, and the personal security sub-contract copy can support searching of global data according to dimensions such as a service order identifier, a mobile phone number, an organization identifier and the like of the sub-contract. As shown in fig. 1, the private-pair shards may store private-pair life deposit contracts, personal security gold contracts, debit card contracts, and the like corresponding to different individuals. The private use contract and the debit card are personal contracts corresponding to the private settlement account, and the personal deposit subcontract is a subcontract generated when the personal deposit business is processed. In this way, in the embodiment of the invention, the mechanism contract and the personal contract are respectively stored, so that high cohesion of the mechanism and account information thereof and the personal account and business order information thereof can be realized, and further, enough information can be acquired for business processing through one-time data access. Meanwhile, the private database shards can also store mechanism information (such as mechanism types) required by the private service data processing, so that the access times of the cross-database shards during service processing are reduced.
In the embodiment of the invention, an application routing layer and a plurality of integration layers can be arranged in the processing system, each integration layer corresponds to a database fragment cluster comprising a plurality of database fragments, and the integration layers can process data stored in the database fragments by calling the database fragments in the database fragment cluster. The application routing layer may receive the externally transmitted request, determine an integration layer to process the request based on data included in the request, and forward the externally transmitted request to the integration layer for processing. The database fragment cluster corresponding to the integration layer comprises a public database fragment and a private database fragment which respectively store private-to-public service data, public-to-public service data and private-to-public database fragment corresponding to the personal deposit service, and establishes a corresponding relation among a personal settlement account identifier, an institution identifier, a private-to-public database fragment address and a public-to-public database fragment address in advance, so that the corresponding private-to-private database fragment address and the public-to-public database fragment address can be inquired based on the personal settlement account identifier and the institution identifier.
It should be noted that, in order to ensure the data consistency of the service processing, in the embodiment of the present invention, the service processing flow transaction consistency can be ensured by using "micro service" as a minimum unit. For example, for the guarantee fund freezing service, in terms of functional implementation, the service data is split from bottom to top, then the micro-service for keeping the minimum transaction consistency is implemented, each micro-service is only responsible for processing the data in the corresponding database fragment, for example, the "mechanism signing micro-service" is only set for processing the establishment service of the mechanism contract on the public database fragment; secondly, according to the whole function of freezing business from top to bottom, different micro-services are combined through a service integration agent to realize various business logics, for example, a service integration agent combination of 'personal deposit fund has own fund to freeze' is set, which can be realized by integrating 3 micro-services, respectively: a) pre-checking micro-services for private settlement accounts (used for checking the private settlement accounts in the private data fragments), b) mechanism signing micro-services (used for inquiring the public settlement accounts in the public database fragments and newly adding mechanism contracts), and c) signing (freezing) micro-services for private security fund contracts (used for freezing data modification for the private settlement accounts in the private database fragments and newly adding the private security fund contracts). The service integration agent combination can be arranged on an integration layer, so that business processing can be realized by calling micro-services.
Meanwhile, in the embodiment of the invention, an automatic correcting function can be configured in the service integration agent combination to ensure the data consistency of each service processing.
An embodiment of the present invention provides a method for processing service data, where the method may be executed by a processing system, and as shown in fig. 2, the method includes:
s201: and receiving a frozen service request sent by the terminal, acquiring the personal settlement account identifier and the institution identifier in the frozen service request, and inquiring the corresponding private database fragment address and public database fragment address according to the preset corresponding relation.
The user can send a freezing service request to the processing system through the terminal, and the freezing service request is used for freezing funds in the personal settlement account as the guarantee fund. The service request may include a personal settlement account identifier for indicating an account for which the user has frozen the deposit and an institution identifier for indicating an institution for placing a service order with the individual.
After the processing system receives the frozen service request, the processing system can firstly process the frozen service request by a routing layer, the routing layer can acquire a personal settlement account identifier and an organization identifier which can be included in the service request, further inquire out a corresponding private database fragment address and a public database fragment address according to a preset corresponding relation, namely determine the public database fragment and the private database fragment, and then the routing layer sends the frozen service request to an integration layer corresponding to a database fragment cluster in which the public database fragment and the private database fragment are located, so that the integration layer can execute the frozen service processing.
It should be noted that the frozen service request may further include parameters such as a service order identifier, a transaction identifier, a frozen amount, and the like, so as to facilitate frozen service processing. The transaction identifier is used for representing the function of executing the service processing at this time and is configured in advance.
S202: and acquiring the frozen amount in the frozen service request to call a contract copy generation model to generate a contract copy of the user, and storing the corresponding relation between the contract copy information and the mechanism identifier to the public database shard based on the public database shard address.
In the embodiment of the invention, the information such as the mechanism contract and the like corresponding to the mechanism identification is usually stored in the public database fragment, so that the contract copy needs to be stored in the public database fragment to facilitate the subsequent execution of the processing of the frozen security deposit. The contract copy generation model is preset and is used for generating a contract copy corresponding to the frozen service, the specific generation mode is not limited, and after the contract copy is generated, the corresponding relation with the mechanism identification can be established and stored in the public database fragment.
It should be noted that before this step is performed, the integration layer may also verify the personal settlement account and institution information.
Specifically, the checking of the organization information may be performed as: based on the address of the public storage fragment, inquiring mechanism information corresponding to the mechanism identification from the public storage fragment; calling a mechanism checking model, checking mechanism information and obtaining a mechanism checking result; if the mechanism verification result is that the verification is passed, no processing is carried out; and if the mechanism verification result is that the verification fails, sending freezing failure information to the terminal.
The organization information is stored in the public database fragment, so that the organization information corresponding to the organization identifier can be inquired from the public storage fragment based on the public storage fragment address. And then, the mechanism information can be verified by calling the mechanism verification model to obtain a mechanism verification result. The institution information may include a public settlement account (a public account or an internal account, in which the public account and the internal account are generally accounts opened at financial institutions such as banks, the public account is generally opened for customers by a financial institution, and the internal account is generally an account for internal accounting by a financial institution), a personal deposit principal contract, and the like. The institution information verification can comprise whether the personal deposit main contract is repeated or not, whether the public settlement account is legal or not and the like, so that the verification is passed, specifically, the personal deposit main contract is not repeated and the public settlement account is legal, and the verification is not passed, specifically, the personal deposit main contract is repeated or the public settlement account is illegal. If the mechanism verification fails, an error notification can be directly returned to the terminal, and the subsequent operation is stopped; if the institution checks pass, this step may be performed.
Specifically, the verification of the personal settlement account may be performed as: based on the private storage fragment address, inquiring account information corresponding to the personal settlement account identifier from the private storage fragment; calling an account verification model, verifying account information and obtaining an account verification result; if the account verification result is that the verification is passed, no processing is performed; and if the account verification result is that the verification fails, sending freezing failure information to the terminal.
The information of the personal settlement account is stored in the private database fragment, so that the account information corresponding to the personal settlement account identifier is inquired from the private storage fragment based on the private storage fragment address, and then an account verification model can be called to verify the account information to obtain an account verification result.
The account information may include account contracts (debit card contracts or contracts for private use) corresponding to the personal settlement account, existing security fund contracts. The account checking model is preset, and the specific account information checking can include judging whether the state of the individual settlement account is normal, whether the amount in the individual settlement account meets the frozen amount, whether the service order mark has a corresponding guaranty gold contract (to judge whether the service order mark has executed the signing process), so that the checking in the account checking result includes that the state of the individual settlement account is normal, the amount in the individual settlement account meets the frozen amount, and the service order mark does not have the corresponding guaranty gold contract, the checking in the account checking result does not pass the abnormal state of the individual settlement account, the amount in the individual settlement account does not meet the frozen amount, or the service order mark has the corresponding guaranty gold contract. If the verification fails, an error notification can be directly returned to the terminal, and the execution of subsequent operations is stopped; if the check passes, this step may be performed.
It should be noted that, in the embodiment of the present invention, the verification of the personal settlement account may be configured as a "private settlement account pre-verification micro service", the mechanism information verification and the process in this step are configured as a "mechanism signing micro service", the configuration layer may implement a service processing process of verifying the personal settlement account by calling the private settlement account pre-verification micro service, and call the mechanism signing micro service to implement a service processing process of verifying the mechanism information and this step.
S203: based on the private database fragment address, inquiring available balance and total frozen amount corresponding to the personal settlement account identifier from the private database fragment, acquiring frozen amount in the frozen service request to update the available balance and the total frozen amount, calling a preset record generation model to generate a frozen event record, and storing the corresponding relation between the personal settlement account identifier and the frozen event record.
Based on the private database fragment address, the available balance and the total frozen amount corresponding to the personal settlement account identifier can be inquired from the private database fragment, and after the frozen amount in the frozen service request is obtained, the available balance and the total frozen amount can be updated. The specific updating mode is as follows: the total frozen amount is the original frozen amount plus the frozen amount, and the available balance is the account balance-the updated total frozen amount.
In this step, a freezing event record can be generated and stored for the current freezing service. The freeze event record may be generated by a preset record generation model. The specific freeze event record may include a security gold contract and a freeze event record identification. The security fund contract can be generated through a contract generation model, and the frozen event record identification can be generated through a personal settlement account identification, a frozen date and a frozen number.
So generating a freeze event record can be performed as: acquiring a service order mark in the frozen service request to generate a contract mark; inquiring a freezing date and a freezing number corresponding to the freezing service request to generate a freezing event record identifier based on the personal settlement account identifier, the freezing date and the freezing number; generating a freezing event record based on the freezing event record identifier and the freezing amount in the freezing service request; and calling a contract generation model based on the service order identification, the frozen event record identification, the frozen amount in the frozen service request and the personal settlement account identification to generate a contract corresponding to the service order identification.
Specifically, the contract identifier may be generated by a preset code + the service order identifier, and the preset code may be set according to requirements, and may be, for example, 42751000. The contract generation model is preset, the generated contract is a guarantee fund contract, and the contract is used for recording the information of the frozen service, such as service order identification, frozen amount, private settlement account and public settlement account. The frozen date represents the current date of executing the frozen service processing, the frozen number represents the current frozen number, the frozen number is used for generating the frozen number of the frozen service processing, specifically, the frozen number of the frozen service processing is obtained by increasing the current frozen number by a preset value (such as 1), so that a finish event record identifier can be generated after the frozen date and the frozen number corresponding to the frozen service request are inquired, and specifically, the finish event record identifier can be an individual settlement account identifier, the frozen date and the frozen number are increased by a preset value. And after the frozen event record identifier is obtained, combining the frozen money in the frozen service request to obtain the frozen event record.
It should be noted that, before the step is executed, the account information corresponding to the personal settlement account identifier may be verified again to ensure the accuracy of the account information. In the embodiment of the present invention, the step may be configured as "sign-up (freezing) micro service to the private contract", and the integration layer may implement the service processing process in the step by calling the sign-up (freezing) micro service to the private contract.
S204: and establishing a corresponding relation among the service order identification, the private database fragment address and the public database fragment address, and sending the information of successful freezing to the terminal.
After step S103 is executed, if it indicates that the guarantee fund is successfully frozen, the freezing success information may be sent to the terminal. And establishing a corresponding relation among the service order identification, the private database fragment address and the public database fragment address, and then routing the subsequent operation on the frozen amount to the private database fragment address and the public database fragment address based on the service order identification.
It should be noted that, when step S103 is executed, an error may occur due to factors such as an exception occurring in the service processing, that is, a processing failure notification is detected, at this time, it may be determined that the service processing in step S103 fails, and then correction processing needs to be executed on step S102, that is, a contract copy is deleted, so as to ensure that data in the public database fragment and the private database fragment are consistent.
In the embodiment of the invention, the mechanism information is stored in the public database shard, the information of the personal settlement account is stored in the private database shard, namely, the mechanism contract and the personal contract are respectively stored, and the public database shard and the private database shard can be respectively operated when the service freezing request is received, so that the mechanism contract and the personal contract are decoupled, the relevance between the mechanism contract and the personal contract is reduced, and thus, the time spent on service processing can be reduced and the efficiency of service processing is improved even if the number of personal deposit services is increased.
After the personal deposit is frozen, the deposit due to the contract is usually transferred from the personal settlement account to the public settlement account, i.e. a deduction operation is performed.
The following describes, in conjunction with the embodiment shown in fig. 2, a method for processing a guarantee deduction service in the embodiment of the present invention. As shown in fig. 3, the method includes:
s301: and receiving a deduction service request sent by the terminal, acquiring a service order identifier in the deduction service request, and inquiring a corresponding private database fragment address and a public database fragment address according to a preset corresponding relation.
When the money deduction operation needs to be executed on the frozen deposit, the user can send a money deduction service request to the processing system through the terminal. The deduction service request may include a transaction code, a service order identifier, and the like, so as to query a preset corresponding relationship, and obtain corresponding private database fragment addresses and public database fragment addresses. The service order mark in the deduction service request indicates which frozen fund is corresponding to when the deduction service is carried out, namely which contract is operated, so that a database fragment address storing the contract corresponding to the service order mark, namely a private database fragment address and a public database fragment address, is inquired.
S302: and inquiring a guarantee fund contract corresponding to the service order identification from the private database shards based on the inquired private database shard address so as to determine a to-be-deducted settlement account identification from the guarantee fund contract, acquire the unfrozen amount in the deduction service request, execute deduction transaction operation based on the unfrozen amount and the to-be-deducted settlement account identification, and update the contract state of the guarantee fund contract.
The private database fragment address is inquired, and the guarantee fund contract corresponding to the service order identifier can be inquired from the private database fragment address, the guarantee fund contract inquired in the step is the contract generated in the step S103 when the service is frozen, and the contract identifier is generated by the service order identifier, so that the corresponding guarantee fund contract can be inquired in the step through the service order identifier.
The deposit sub-contract may include a corresponding account identifier for settlement to be deducted, that is, an individual settlement account when the deposit is frozen, so as to deduct money from an account corresponding to the account identifier for settlement to be deducted. The deduction service request can include unfreezing amount, namely deducting amount of the deduction operation, so that the unfreezing amount in the deduction service request is obtained, and deduction transaction operation can be executed based on the unfreezing amount and the account identification of settlement to be deducted.
Specifically, the deduction transaction operation may include: and updating the account balance and the available balance corresponding to the account identifier to be deducted, wherein the updated account balance is the original account balance-unfreezing amount, and the updated available balance is the updated account balance-freezing amount. Meanwhile, transaction information corresponding to the deduction operation, such as transaction date and the like, can be stored.
It should be noted that, since the deduction operation is to deduct money from the frozen deposit, before the deduction operation is performed, the frozen amount of the account corresponding to the account identifier of the settlement account to be deducted may be updated. Specifically, the following may be implemented: and inquiring the frozen amount and the available balance corresponding to the account identifier of the settlement account to be deducted, and updating the frozen amount and the available balance corresponding to the account identifier of the settlement account to be deducted based on the unfreezing amount. The updating mode of the frozen amount corresponding to the account identifier of the settlement account to be deducted is as follows: the updated frozen amount is equal to the original frozen amount-unfreezing amount; the available balance updating mode corresponding to the account identifier of the settlement to be deducted is as follows: updated available balance-account balance-the amount is frozen after update. After the frozen amount and the available balance are updated in the step, the method can be used for updating the account balance and the available balance corresponding to the account identifier of the settlement to be deducted in the deduction transaction operation of the step.
In addition, after the deduction transaction operation, the state of the security gold contract can be updated. At this time, it is necessary to determine whether the frozen money in the security sub-contract is completely thawed, that is, whether all the deduction transaction operations are executed, if so, the state of the security sub-contract may be updated to an unclassified state, and if so, the state of the security sub-contract is not updated temporarily. In the step, whether the frozen money in the security gold contract is completely thawed can be judged according to whether the thawing money is equal to the frozen money in the security gold contract or not. If the unfreezing amount is equal to the frozen amount in the security gold contract, the unfreezing amount in the security gold contract is completely unfrozen; and if the unfreezing amount is smaller than the frozen amount in the security gold contract, the situation that the frozen amount in the security gold contract is not completely unfrozen is indicated.
It should be noted that, in the embodiment of the present invention, it is ensured that the gold contract may also query a frozen event record identifier, and further query a corresponding frozen event record, so that the operation on the frozen event record may be executed.
Before executing the step, the account information of the public settlement account can be checked firstly to check whether the public settlement account in the deduction service request is consistent with the public settlement account in the stored contract copy, and if the public settlement account is not consistent with the public settlement account, notification information of deduction failure can be returned; if the two are consistent, the subsequent operation can be performed.
S303: inquiring a contract copy corresponding to the service order identification from the public database shards based on the inquired public database shard address, determining a public settlement account identification from the inquired contract copy, acquiring unfreezing amount in the deduction service request, executing deduction transaction operation based on the unfreezing amount and the public settlement account identification, and further updating the inquired state of the contract copy based on the contract state.
After the private database fragments are operated, the collection operation of the public settlement account can be completed on the public database fragments. And inquiring a contract copy corresponding to the service order mark from the public database fragment based on the inquired public database fragment address, further determining a public settlement account mark from the inquired contract copy, namely the public settlement account mark in the deduction service request, then performing collection transaction operation based on the unfrozen amount in the deduction service request and the public settlement account mark, and storing the unfrozen amount into the public settlement account. Meanwhile, the contract copy state needs to be synchronized based on the contract state of the guaranteed golden contract to guarantee data consistency.
S304: and returning information of successful deduction to the terminal.
After the step S303 is completed, that is, the deduction service processing is completed, information of successful deduction may be sent to the terminal.
In the embodiment of the invention, the sequence of borrowing first and then lending is adopted, namely, money is firstly deducted from the account to be deducted, and then the collection operation of the public settlement account is executed, so that the condition that the account is credited to the public settlement account without deducting the defrozen amount is ensured in an abnormal scene, and the possibility of depositing money is reduced. In addition, in the embodiment of the invention, the deduction service can be provided with a correction function so as to ensure that the data consistency is realized through the correction function in an abnormal scene (such as transaction overtime).
After the implementation of the embodiment of the invention, account running water and cross-fragment additional record can be compared at the end of day, data with uneven debit can be screened out, and then the business with accounting failure can be processed reversely by a day end accounting mechanism in a processing system (which can be realized by configuring specific automatic accounting micro-service for each accounting micro-service). For inconsistent transactions which fail to be processed in the processing system, corresponding reports can be recorded so that business personnel can not process the inconsistent transactions through special reconciliation after the fact.
In the embodiment of the invention, in the processing of the personal deposit service, the change of the contract copy state is also included, and the change of the contract copy usually considers both timeliness of data change and cost of the data change, so a contract copy state change mechanism can be preset in the embodiment of the invention.
The generation of the contract copy and the update of the contract state are generally realized in the embodiments shown in fig. 1 and fig. 2, and the integration layer can execute synchronous processing by calling the corresponding micro-service, so that the timeliness is ensured. However, for some scenarios of state maintenance (such as suspension and suspension cancellation), it is important that whether the state of the contract copy itself is successfully modified, and the requirement on the timeliness is not high, and then the method can be implemented in an asynchronous processing manner. When the requirement on data timeliness is not high, the asynchronous processing can return the processing result to the calling party more quickly, and repeated retry execution can be configured, so that the accuracy of the processing result is improved as much as possible. Wherein the asynchronously processed messages may be based on a kafka distributed publish-subscribe message system.
Specifically, in the embodiment of the present invention, a "sub-contract copy maintenance microservice" may be set to process a business processing procedure that changes the contract copy state asynchronously. Specifically, the processing system may set an asynchronous call interface for receiving an asynchronous message that needs to be asynchronously processed, and set an application message flow registry for storing the asynchronous message, where the application message flow registry may include a message type (preconfigured to indicate the type of the asynchronous message) of the asynchronous message, a transaction code, and a packet (including a key value, a current state to be validated, and a corresponding state timestamp) of the asynchronous message.
Therefore, the processing system can regularly scan the application message flow registration table to read the received asynchronous message, and according to the transaction code, the message and the like of the asynchronous message, the asynchronous message is spliced into the message with the preset format, the corresponding sub-contract copy maintenance micro-service is called to carry out service processing, and then the obtained processing result is registered and stored. In the embodiment of the present invention, when the processing result is failure, multiple times of retry processing with increasing time intervals may be set until the processing is successful, the number of retries reaches a preset maximum number, or the current time reaches the time for stopping the operation. After the "sub-contract copy maintenance microservice" is called for business processing, the specific processing mode may be the same as the processing mode in the synchronous processing. Specifically, the following may be implemented: acquiring a contract copy corresponding to a service order identifier in an asynchronous message; and determining a contract time stamp of the contract copy, acquiring a state time stamp in the asynchronous message and the current state of the contract copy, judging whether the contract time stamp is greater than the state time stamp, if so, updating the state of the contract copy to the current state and returning a processing result of successful processing, otherwise, not processing the contract copy and returning the processing result of successful processing.
It should be noted that, in the prior art, the common storage of the public service data and the private service data is equivalent to a host single-point system, so that the association between the public service data and the private service data is strong, and in the embodiment of the present invention, the storage of the public service data and the private service data in different database fragments is equivalent to a distributed storage system. Specifically, the data migration may adopt a policy of separately migrating according to the affiliated organization and the public and private attributes of the stored data. FIG. 4 is a schematic diagram of a data migration process. During the data migration process, the original data storage system and the distributed storage system coexist. Similarly, the personal deposit service processing function can also migrate part of personal contract data to the private settlement account first, then gradually complete the whole migration to the private settlement account data, and finally complete the migration to the public settlement account data according to the above strategy.
Specifically, in the data migration process, the host single-point system in the prior art may be used as a node of the processing system in the embodiment of the present invention, and the service integration agent in the integration layer may implement the integral call to provide the service to the outside in a unified manner. Since the data of the public settlement account is migrated at last, the function of processing the personal deposit service for the un-migrated public settlement account can be completely realized on the host single-point system, and at the moment, the integration layer can complete one call of the information such as the routing request and the like to the host single-point system. For the transferred private settlement account, the service processing function of the private settlement account can be realized by calling the micro service, and the service processing function of the public settlement account can regard the host single-point system as a 'public node', and the service integration proxy completes integration calling according to the calling rule. Therefore, the processing of the personal deposit service in the data migration process is realized.
In order to solve the problems in the prior art, an embodiment of the present invention provides a device 500 for processing service data, as shown in fig. 5, where the device 500 includes:
a receiving unit 501, configured to receive a frozen service request sent by a terminal, acquire a personal settlement account identifier and an organization identifier in the frozen service request, and query a corresponding private-to-private database fragment address and a corresponding public-to-public database fragment address according to a preset correspondence;
a generating unit 502, configured to obtain the frozen amount and the service order identifier in the frozen service request, invoke a contract copy generation model to generate a contract copy, and store a correspondence between the contract copy and the mechanism identifier to a public database shard based on the public database shard address;
the generating unit 502 is further configured to query, based on the private database shard address, an available balance and a total frozen amount corresponding to the personal settlement account identifier from the private database shard, obtain a frozen amount in the frozen service request, update the available balance and the total frozen amount, further invoke a preset record generation model to generate a frozen event record, and store a corresponding relationship between the personal settlement account identifier and the frozen event record;
a sending unit 503, configured to establish a correspondence between the service order identifier, the private database fragment address, and the public database fragment address, and send information of successful freezing to the terminal.
It should be understood that the manner of implementing the embodiment of the present invention is the same as the manner of implementing the embodiment shown in fig. 2, and the description thereof is omitted.
In an implementation manner of the embodiment of the present invention, the generating unit 502 is specifically configured to:
acquiring a service order mark in the frozen service request to generate a contract mark;
inquiring a freezing date and a freezing number corresponding to the freezing service request to generate the freezing event record identifier based on the personal settlement account identifier, the freezing date and the freezing number;
generating a frozen event record based on the frozen event record identifier and the frozen amount in the frozen service request;
and calling a contract generation model based on the business order identification, the frozen event record identification, the frozen amount in the frozen business request and the personal settlement account identification to generate a contract corresponding to the business order identification.
In another implementation manner of the embodiment of the present invention, the generating unit 502 is specifically configured to:
and splicing the service order identification with a preset code to generate a contract identification.
In another implementation manner of the embodiment of the present invention, the receiving unit is further configured to receive a deduction service request sent by a terminal, acquire the service order identifier in the deduction service request, and query the corresponding private database fragment address and public database fragment address according to the established correspondence;
the apparatus 500 further comprises:
the deduction unit is used for inquiring a guarantee fund sub-contract corresponding to the service order identification from a private database fragment based on the inquired private database fragment address so as to determine a to-be-deducted settlement account identification from the guarantee fund sub-contract, acquiring unfrozen amount in the deduction service request, executing deduction transaction operation based on the unfrozen amount and the to-be-deducted settlement account identification, and updating the contract state of the guarantee fund sub-contract;
the collection unit is used for inquiring a contract copy corresponding to the service order mark from the public database shards based on the inquired public database shard address, determining a public settlement account mark from the inquired contract copy, acquiring unfreezing amount in the deduction service request, executing collection transaction operation based on the unfreezing amount and the public settlement account mark, and further updating the inquired contract copy state based on the contract state;
the sending unit is further configured to return information of successful deduction to the terminal.
In another implementation manner of the embodiment of the present invention, the deduction unit is further configured to query a frozen amount and an available balance corresponding to the account identifier to be deducted, so as to update the frozen amount and the available balance corresponding to the account identifier to be deducted based on the unfreezed amount.
In another implementation manner of the embodiment of the present invention, the money receiving unit is specifically configured to:
acquiring the frozen amount in the security sub-contract, and judging whether the frozen amount in the security sub-contract is equal to the unfreezing amount;
if not, the contract state of the gold contract is not operated;
and if so, updating the contract state of the security gold contract into the contracted state.
In another implementation manner of the embodiment of the present invention, the receiving unit 501 is further configured to receive an asynchronous message, obtain a service order identifier in the asynchronous message, query a corresponding public database sharding address based on the established correspondence, and further obtain a contract copy corresponding to the service order identifier in the asynchronous message according to the queried public database sharding address;
the apparatus 500 further comprises:
an updating unit, configured to determine a contract timestamp of the contract copy, obtain a state timestamp in the asynchronous message and a current state of the contract copy, determine whether the contract timestamp is greater than the state timestamp, update the state of the contract copy to the current state if the contract timestamp is greater than the state timestamp, and not process the contract copy if the contract timestamp is not greater than the state timestamp
In another implementation manner of the embodiment of the present invention, the apparatus 500 further includes:
the inquiry unit is used for inquiring the mechanism information corresponding to the mechanism identification from the public storage fragment based on the public storage fragment address;
the checking unit is used for calling a mechanism checking model, checking the mechanism information and obtaining a mechanism checking result;
the sending unit is further configured to not process the mechanism verification result if the mechanism verification result is that verification passes; and if the mechanism verification result is that the verification fails, sending freezing failure information to the terminal.
In another implementation manner of the embodiment of the present invention, the querying unit is further configured to query, based on the private storage segment address, account information corresponding to the personal settlement account identifier from the private storage segment;
the verification unit is further used for calling an account verification model, verifying the account information and obtaining an account verification result;
the sending unit is further configured to not process the account if the account verification result is that the verification is passed; and if the account verification result is that the verification fails, sending freezing failure information to the terminal.
It should be understood that the manner of implementing the embodiment of the present invention is the same as that of implementing the embodiment shown in fig. 2-3, and thus, the detailed description thereof is omitted.
In the embodiment of the invention, the mechanism information is stored in the public database shard, the information of the personal settlement account is stored in the private database shard, namely, the mechanism contract and the personal contract are respectively stored, and the public database shard and the private database shard can be respectively operated when the service freezing request is received, so that the mechanism contract and the personal contract are decoupled, the relevance between the mechanism contract and the personal contract is reduced, and thus, the time spent on service processing can be reduced and the efficiency of service processing is improved even if the number of personal deposit services is increased.
According to an embodiment of the present invention, an electronic device and a readable storage medium are also provided.
The electronic device of the embodiment of the invention comprises: at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the processor, and the instructions are executed by the at least one processor to cause the at least one processor to execute the method for processing the service data provided by the embodiment of the invention.
Fig. 6 shows an exemplary system architecture 600 of a business data processing method or a business data processing apparatus to which an embodiment of the present invention can be applied.
As shown in fig. 6, the system architecture 600 may include terminal devices 601, 602, 603, a network 604, and a server 605. The network 604 serves to provide a medium for communication links between the terminal devices 601, 602, 603 and the server 605. Network 604 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
A user may use the terminal devices 601, 602, 603 to interact with the server 605 via the network 604 to receive or send messages or the like. Various client applications may be installed on the terminal devices 601, 602, 603.
The terminal devices 601, 602, 603 may be, but are not limited to, smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 605 may be a server that provides various services, and the server may analyze and perform other processes on data such as a received product information query request, and feed back a processing result (for example, product information — just an example) to the terminal device.
It should be noted that the method for processing the service data provided by the embodiment of the present invention is generally executed by the server 605, and accordingly, the processing device for the service data is generally disposed in the server 605.
It should be understood that the number of terminal devices, networks, and servers in fig. 6 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 7, a block diagram of a computer system 700 suitable for use in implementing embodiments of the present invention is shown. The computer system illustrated in FIG. 7 is only an example and should not impose any limitations on the scope of use or functionality of embodiments of the invention.
As shown in fig. 7, the computer system 700 includes a Central Processing Unit (CPU)701, which can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data necessary for the operation of the system 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
The following components are connected to the I/O interface 705: an input portion 706 including a keyboard, a mouse, and the like; an output section 707 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 708 including a hard disk and the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. A drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read out therefrom is mounted into the storage section 708 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 709, and/or installed from the removable medium 711. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 701.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a unit, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present invention may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes a receiving unit, a generating unit, and a transmitting unit. Where the names of these elements do not in some cases constitute a limitation of the element itself, for example, a receiving element may also be described as "an element of the function of the receiving element".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs, and when the one or more programs are executed by the apparatus, the apparatus executes the method for processing the service data provided by the present invention.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (16)

1. A method for processing service data is characterized by comprising the following steps:
receiving a frozen service request sent by a terminal, acquiring a personal settlement account identifier and an organization identifier in the frozen service request, and inquiring a corresponding private database fragment address and a public database fragment address according to a preset corresponding relation;
acquiring the frozen amount and the service order identification in the frozen service request, calling a contract copy generation model to generate a contract copy, and storing the corresponding relation between the contract copy and the mechanism identification to a public database shard based on the public database shard address;
based on the private database fragment address, inquiring available balance and total frozen amount corresponding to the personal settlement account identifier from the private database fragment, acquiring the frozen amount in the frozen service request to update the available balance and the total frozen amount, calling a preset record generation model to generate a frozen event record, and storing the corresponding relation between the personal settlement account identifier and the frozen event record;
and establishing a corresponding relation among the service order mark, the private database fragment address and the public database fragment address, and sending information of successful freezing to the terminal.
2. The method of claim 1, wherein invoking the preset record generation model generates a freeze event record, comprising:
acquiring a service order mark in the frozen service request to generate a contract mark;
inquiring a freezing date and a freezing number corresponding to the freezing service request to generate the freezing event record identifier based on the personal settlement account identifier, the freezing date and the freezing number;
generating a frozen event record based on the frozen event record identifier and the frozen amount in the frozen service request;
and calling a contract generation model based on the business order identification, the frozen event record identification, the frozen amount in the frozen business request and the personal settlement account identification to generate a contract corresponding to the business order identification.
3. The method of claim 2, wherein the obtaining the service order identifier in the frozen service request to generate a contract identifier comprises:
and splicing the service order identification with a preset code to generate a contract identification.
4. The method of claim 2, wherein after sending the information of successful freeze to the terminal, further comprising:
receiving a deduction service request sent by a terminal, acquiring the service order identification in the deduction service request, and inquiring a corresponding private database fragment address and a public database fragment address according to the established corresponding relation;
inquiring a guarantee fund sub-contract corresponding to the service order identification from a private database fragment based on the inquired private database fragment address to determine a to-be-deducted settlement account identification from the guarantee fund sub-contract, acquiring unfreezing amount in the deducting service request, executing deducting transaction operation based on the unfreezing amount and the to-be-deducted settlement account identification, and updating the contract state of the guarantee fund sub-contract;
inquiring a contract copy corresponding to the service order mark from the public database shards based on the inquired public database shard address to determine a public settlement account mark from the inquired contract copy, acquiring unfreezing amount in the deduction service request, executing money receiving transaction operation based on the unfreezing amount and the public settlement account mark, and further updating the inquired state of the contract copy based on the contract state;
and returning information of successful deduction to the terminal.
5. The method of claim 4, further comprising, prior to performing a debit transaction operation based on the thaw amount and the account identification to be deducted:
and inquiring the frozen amount and the available balance corresponding to the account identification to be deducted, so as to update the frozen amount and the available balance corresponding to the account identification to be deducted based on the unfreezing amount.
6. The method of claim 4, wherein updating the contract status of the guaranty gold contract comprises:
acquiring the frozen amount in the security sub-contract, and judging whether the frozen amount in the security sub-contract is equal to the unfreezing amount;
if not, the contract state of the gold contract is not operated;
and if so, updating the contract state of the security gold contract into the contracted state.
7. The method of claim 4, further comprising:
receiving asynchronous message, obtaining service order mark in the asynchronous message, inquiring corresponding public database fragment address based on established corresponding relation, and further according to the address
Obtaining a contract copy corresponding to the service order identification in the asynchronous message by the inquired public database fragmentation address;
and determining a contract time stamp of the contract copy, acquiring a state time stamp in the asynchronous message and the current state of the contract copy, judging whether the contract time stamp is greater than the state time stamp, if so, updating the state of the contract copy to the current state, and if not, not processing the contract copy.
8. The method of claim 1, wherein prior to obtaining the frozen amount of money in the frozen service request, further comprising:
based on the address of the public storage segment, inquiring mechanism information corresponding to the mechanism identification from the public storage segment;
calling a mechanism checking model, checking the mechanism information and obtaining a mechanism checking result;
if the mechanism verification result is that the verification is passed, no processing is performed;
and if the mechanism verification result is that the verification fails, sending freezing failure information to the terminal.
9. The method of claim 1, further comprising, prior to obtaining the frozen amount in the frozen service request:
based on the private storage fragment address, inquiring account information corresponding to the personal settlement account identifier from the private storage fragment;
calling an account verification model, verifying the account information and obtaining an account verification result;
if the account verification result is that the verification is passed, no processing is performed;
and if the account verification result is that the verification fails, sending freezing failure information to the terminal.
10. A device for processing service data, comprising:
the system comprises a receiving unit, a processing unit and a processing unit, wherein the receiving unit is used for receiving a frozen service request sent by a terminal, acquiring a personal settlement account identifier and an organization identifier in the frozen service request, and inquiring a corresponding private database fragment address and a public database fragment address according to a preset corresponding relation;
the generating unit is used for acquiring the frozen amount and the service order identification in the frozen service request, calling a contract copy generating model to generate a contract copy, and storing the corresponding relation between the contract copy and the mechanism identification to a public database shard based on the public database shard address;
the generation unit is further configured to query, based on the private database shard address, an available balance and a total frozen amount corresponding to the personal settlement account identifier from the private database shard, obtain a frozen amount in the frozen service request, update the available balance and the total frozen amount, further invoke a preset record generation model to generate a frozen event record, and store a corresponding relationship between the personal settlement account identifier and the frozen event record;
and the sending unit is used for establishing the corresponding relation among the service order mark, the private database fragment address and the public database fragment address and sending the information of successful freezing to the terminal.
11. The apparatus according to claim 10, wherein the generating unit is specifically configured to:
acquiring a service order mark in the frozen service request to generate a contract mark;
inquiring a freezing date and a freezing number corresponding to the freezing service request to generate the freezing event record identifier based on the personal settlement account identifier, the freezing date and the freezing number;
generating a frozen event record based on the frozen event record identifier and the frozen amount in the frozen service request;
and calling a contract generation model based on the business order identification, the frozen event record identification, the frozen amount in the frozen business request and the personal settlement account identification to generate a contract corresponding to the business order identification.
12. The apparatus according to claim 11, wherein the generating unit is specifically configured to:
and splicing the service order identification with a preset code to generate a contract identification.
13. The apparatus according to claim 11, wherein the receiving unit is further configured to receive a deduction service request sent by a terminal, acquire the service order identifier in the deduction service request, and query a corresponding private-to-private database fragment address and a corresponding public-to-public database fragment address according to the established correspondence;
the device further comprises:
the deduction unit is used for inquiring a guarantee fund sub-contract corresponding to the service order identification from a private database fragment based on the inquired private database fragment address so as to determine a to-be-deducted settlement account identification from the guarantee fund sub-contract, acquiring unfrozen amount in the deduction service request, executing deduction transaction operation based on the unfrozen amount and the to-be-deducted settlement account identification, and updating the contract state of the guarantee fund sub-contract;
the collection unit is used for inquiring a contract copy corresponding to the service order mark from the public database shards based on the inquired public database shard address, determining a public settlement account mark from the inquired contract copy, acquiring unfreezing amount in the deduction service request, executing collection transaction operation based on the unfreezing amount and the public settlement account mark, and further updating the inquired contract copy state based on the contract state;
the sending unit is further configured to return information of successful deduction to the terminal.
14. The apparatus of claim 13, wherein the deduction unit is further configured to query a frozen amount and an available balance corresponding to the account identifier to be deducted, so as to update the frozen amount and the available balance corresponding to the account identifier to be deducted based on the defrosted amount.
15. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-9.
16. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-9.
CN202110576955.1A 2021-05-26 2021-05-26 Service data processing method and device, electronic equipment and storage medium Pending CN113191906A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110576955.1A CN113191906A (en) 2021-05-26 2021-05-26 Service data processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110576955.1A CN113191906A (en) 2021-05-26 2021-05-26 Service data processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113191906A true CN113191906A (en) 2021-07-30

Family

ID=76985235

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110576955.1A Pending CN113191906A (en) 2021-05-26 2021-05-26 Service data processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113191906A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114048230A (en) * 2021-11-29 2022-02-15 平安科技(深圳)有限公司 Service data processing method, device, equipment and storage medium
CN114048230B (en) * 2021-11-29 2024-05-07 平安科技(深圳)有限公司 Service data processing method, device, equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114048230A (en) * 2021-11-29 2022-02-15 平安科技(深圳)有限公司 Service data processing method, device, equipment and storage medium
CN114048230B (en) * 2021-11-29 2024-05-07 平安科技(深圳)有限公司 Service data processing method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
US10977632B2 (en) Electronic bill management method, apparatus, and storage medium
US11797988B2 (en) Transaction processing
CN110363665B (en) Credit right data processing method, device, equipment and medium
US20180113752A1 (en) Inter-ledger messaging in a blockchain
US20200074458A1 (en) Privacy preserving transaction system
AU2020202711A1 (en) Payment requests
US11409795B2 (en) Atomically executed application program interfaces
US11316385B2 (en) Wireless energy transfer
US20220156725A1 (en) Cross-chain settlement mechanism
WO2021167794A1 (en) Split ledger cryptocurrency
KR101306173B1 (en) Server and method for total management of subsidy business
CN113760924A (en) Distributed transaction processing method and device
CN112116326A (en) Accumulation fund service processing method and system based on sharing platform
CN113191906A (en) Service data processing method and device, electronic equipment and storage medium
CN111210349A (en) Virtual asset transfer hosting method and device, electronic equipment and storage medium
CN111897822A (en) Account state information processing method and device, electronic equipment and storage medium
CN113284408A (en) Money box sealing and opening method and device based on electronic lead sealing
US11107074B2 (en) Method, apparatus and system for electronic payments
CN111866171B (en) Message processing method, device, electronic equipment and medium
EP4134855A1 (en) Blockchain based layer 2 application for delegated off-chain payments using cryptocurrencies
US20220300949A1 (en) Centralized digital currency transactions utilizing a digital wallet
CN114398376A (en) Data processing method and device and readable storage medium
CN114997977A (en) Data processing method and device, electronic equipment and computer readable medium
CN112668058A (en) Logistics order processing method and device based on block chain technology
CN117008956A (en) Software product information interaction method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination