CN114816681B - Insurance business data processing method and device, electronic equipment and storage medium - Google Patents

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

Info

Publication number
CN114816681B
CN114816681B CN202210320314.4A CN202210320314A CN114816681B CN 114816681 B CN114816681 B CN 114816681B CN 202210320314 A CN202210320314 A CN 202210320314A CN 114816681 B CN114816681 B CN 114816681B
Authority
CN
China
Prior art keywords
service
account
order
insurance
amount
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.)
Active
Application number
CN202210320314.4A
Other languages
Chinese (zh)
Other versions
CN114816681A (en
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.)
Jiangsu Zhongjiao Chewang Technology Co ltd
Original Assignee
Jiangsu Zhongjiao Chewang Technology Co ltd
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 Jiangsu Zhongjiao Chewang Technology Co ltd filed Critical Jiangsu Zhongjiao Chewang Technology Co ltd
Priority to CN202210320314.4A priority Critical patent/CN114816681B/en
Publication of CN114816681A publication Critical patent/CN114816681A/en
Application granted granted Critical
Publication of CN114816681B publication Critical patent/CN114816681B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/466Transaction processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/465Distributed object oriented systems
    • 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/08Insurance

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Finance (AREA)
  • Accounting & Taxation (AREA)
  • General Engineering & Computer Science (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The application provides an insurance business data processing method, an insurance business data processing device, electronic equipment and a storage medium. The method comprises the following steps: receiving an insurance service handling request sent by a user terminal, wherein the insurance service handling request carries a user account number and a service number of a target insurance service; responding to the insurance business handling request, and when the account amount corresponding to the user account number is more than or equal to the premium amount corresponding to the business number, calling a business manager to generate a unique global business identifier corresponding to the insurance business handling request; and performing TCC distributed transaction processing on order service and account service for transacting the target insurance service based on the global transaction identifier until the target insurance service transacting is completed. Compared with the prior art, the TCC distributed transaction processing method is used for transacting insurance business, so that the consistency of data in the insurance transacting process can be ensured, unnecessary troubles brought to users by errors are avoided, and the user experience is improved.

Description

Insurance business data processing method and device, electronic equipment and storage medium
Technical Field
The present application relates to the technical field of insurance data processing, and in particular, to a method and apparatus for processing insurance service data, an electronic device, and a computer readable storage medium.
Background
With the development of economy and society, people have a stronger insurance awareness, and more users begin to purchase insurance services through networks.
At present, the insurance service order-giving system on the network adopts a micro-service architecture, the business services such as account recharging, consumption, purchase insurance policy and the like are independently deployed, the business services are carried out by calling corresponding interfaces, each interface adopts remote procedure calling, and the correctness and consistency of data among the business services are difficult to ensure. Therefore, how to ensure data consistency in the process of purchasing insurance services by users is a technical problem that needs to be solved in the art.
Disclosure of Invention
The application aims to provide an insurance business data processing method and device, electronic equipment and a computer readable storage medium.
The first aspect of the present application provides a method for processing insurance service data, including:
Receiving an insurance service handling request sent by a user terminal, wherein the insurance service handling request carries a user account number and a service number of a target insurance service;
Responding to the insurance business handling request, and when the account amount corresponding to the user account number is more than or equal to the premium amount corresponding to the business number, calling a business manager to generate a unique global business identifier corresponding to the insurance business handling request;
and performing TCC distributed transaction processing on order service and account service for transacting the target insurance service based on the global transaction identifier until the target insurance service transacting is completed.
In one possible implementation, the performing TCC distributed transaction on the order service and the account service for transacting the target insurance service based on the global transaction identifier includes:
calling order service to generate an order, sending first order information in the represented order to the user side, and simultaneously storing the current operation record of the order service as a Try stage;
calling account service to judge whether the account amount is greater than or equal to the premium amount and performing idempotent verification according to the global transaction identifier;
If the account amount is larger than or equal to the premium amount and the idempotent verification is successful, freezing the premium amount from the account amount, and simultaneously storing the current operation record of the account service as a Try stage;
If the account amount is smaller than the premium amount or the idempotent verification fails, triggering global transaction rollback operation according to the global transaction identifier, and simultaneously storing the current operation record of account service as a cancer stage;
and if the current operation records of the order service and the account service are both in the Try stage, performing the operation in the Confirm stage.
In one possible implementation manner, if the current operation records of the order service and the account service are both in the Try phase, performing the operation in the Confirm phase includes:
Calling order service to perform operation of protecting and issuing an order;
if the order keeping is successful, calling an account service to deduct the premium amount from the account amount, and simultaneously storing the order service and the current operation record of the account service as a Confirm stage;
And if the order keeping fails, triggering global transaction rollback operation according to the global transaction identifier, and simultaneously storing the current operation records of the order service and the account service as a cancer stage.
In one possible implementation, the method further includes:
And if the insurance company succeeds in ordering, sending second order information showing that the order succeeds to the user side.
In one possible implementation, the method further includes:
And if the insurance company fails to make the order, sending third order information showing the order failure to the user side.
In one possible implementation, the method further includes:
And when the account amount corresponding to the user account number is smaller than the premium amount corresponding to the service number, suspending insurance service handling and sending prompt information of insufficient account amount to the user side.
A second aspect of the present application provides an insurance business data processing device, including:
the receiving module is used for receiving an insurance service handling request sent by a user side, wherein the insurance service handling request carries a user account number and a service number of a target insurance service;
The response module is used for responding to the insurance business handling request, and when the account amount corresponding to the user account number is more than or equal to the premium amount corresponding to the business number, the transaction manager is called to generate a unique global transaction identifier corresponding to the insurance business handling request;
And the processing module is used for conducting TCC distributed transaction processing on order service and account service for transacting the target insurance service based on the global transaction identifier until the target insurance service transacting is completed.
In a possible implementation manner, the processing module is specifically configured to:
calling order service to generate an order, sending first order information in the represented order to the user side, and simultaneously storing the current operation record of the order service as a Try stage;
calling account service to judge whether the account amount is greater than or equal to the premium amount and performing idempotent verification according to the global transaction identifier;
If the account amount is larger than or equal to the premium amount and the idempotent verification is successful, freezing the premium amount from the account amount, and simultaneously storing the current operation record of the account service as a Try stage;
If the account amount is smaller than the premium amount or the idempotent verification fails, triggering global transaction rollback operation according to the global transaction identifier, and simultaneously storing the current operation record of account service as a cancer stage;
and if the current operation records of the order service and the account service are both in the Try stage, performing the operation in the Confirm stage.
In a possible implementation manner, the processing module is specifically configured to:
Calling order service to perform operation of protecting and issuing an order;
if the order keeping is successful, calling an account service to deduct the premium amount from the account amount, and simultaneously storing the order service and the current operation record of the account service as a Confirm stage;
And if the order keeping fails, triggering global transaction rollback operation according to the global transaction identifier, and simultaneously storing the current operation records of the order service and the account service as a cancer stage.
In one possible implementation, the processing module is further configured to:
And if the insurance company succeeds in ordering, sending second order information showing that the order succeeds to the user side.
In one possible implementation, the processing module is further configured to:
And if the insurance company fails to make the order, sending third order information showing the order failure to the user side.
In one possible implementation, the response module is further configured to:
And when the account amount corresponding to the user account number is smaller than the premium amount corresponding to the service number, suspending insurance service handling and sending prompt information of insufficient account amount to the user side.
A third aspect of the present application provides an electronic apparatus, comprising: the system comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor executes to realize the insurance business data processing method according to the first aspect of the application when the processor runs the computer program.
A fourth aspect of the application provides a computer readable storage medium having stored thereon computer readable instructions executable by a processor to implement the insurance business data processing method of the first aspect of the application.
According to the insurance business data processing method, the insurance business data processing device, the electronic equipment and the storage medium, an insurance business handling request sent by a user side is received, and the insurance business handling request carries a user account number and a business number of a target insurance business; responding to the insurance business handling request, and when the account amount corresponding to the user account number is more than or equal to the premium amount corresponding to the business number, calling a business manager to generate a unique global business identifier corresponding to the insurance business handling request; and performing TCC distributed transaction processing on order service and account service for transacting the target insurance service based on the global transaction identifier until the target insurance service transacting is completed. Compared with the prior art, the TCC distributed transaction processing method is used for handling insurance business, so that the consistency of data in the insurance service process can be ensured, unnecessary troubles brought to users by errors are avoided, and the user experience is improved.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the application. Also, like reference numerals are used to designate like parts throughout the figures. In the drawings:
Fig. 1 shows a flow diagram of an insurance business data processing method provided by the application;
FIG. 2 is a schematic diagram of a TCC distributed transaction process provided by the present application;
FIG. 3 is a schematic diagram showing a structure of an insurance business data processing device according to the present application;
fig. 4 shows a schematic structural diagram of an electronic device according to the present application;
fig. 5 shows a schematic structural diagram of a computer-readable storage medium according to the present application.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
It is noted that unless otherwise indicated, technical or scientific terms used herein should be given the ordinary meaning as understood by one of ordinary skill in the art to which this application belongs.
In addition, the terms "first" and "second" etc. are used to distinguish different objects and are not used to describe a particular order. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus.
The embodiment of the application provides an insurance business data processing method and device, electronic equipment and a computer readable storage medium, and the method and the device are described below with reference to the accompanying drawings.
Fig. 1 shows a flow chart of an insurance business data processing method provided by the embodiment of the application, and as shown in fig. 1, the method specifically includes the following steps:
s101, receiving an insurance service handling request sent by a user side, wherein the insurance service handling request carries a user account number and a service number of a target insurance service.
The execution body of the embodiment may be an insurance business handling platform (hereinafter referred to as "platform"), and the user may purchase various types of insurance policies of each insurance company on the platform through the user side, for example, the user opens an account on the insurance business handling platform, the stored value in the account has a certain amount, and the user deducts the corresponding account amount when purchasing a certain insurance policy through the user side.
In this embodiment, when the user needs to purchase the policy, the user sends an insurance service handling request to the platform through the user end, where the request carries the user account number and the service number of the target insurance service. The platform can find the corresponding account and obtain the account amount through the account number, and can find the corresponding target insurance business and obtain the premium amount of the target insurance business through the business number.
S102, responding to the insurance business handling request, and when the account amount corresponding to the user account number is greater than or equal to the premium amount corresponding to the business number, calling a business manager to generate a unique global business identifier corresponding to the insurance business handling request;
In this embodiment, the platform first determines whether the account amount corresponding to the user account number is greater than or equal to the premium amount corresponding to the service number, that is, the platform first determines whether the account amount of the user is sufficient to pay the target insurance service, and if so, further invokes the order service and the account service to complete the transaction of the target insurance service.
In this embodiment, when the account amount corresponding to the user account number is smaller than the premium amount corresponding to the service number, the platform may suspend the insurance transaction and send a prompt message for indicating that the account amount is insufficient to the user terminal, so as to prompt the user to store the value and then continue to purchase.
In the prior art, when order service and account service are called to transact insurance service, two service data are often inconsistent, and when errors are corrected, unnecessary trouble is brought to users, so that the TCC protocol is adopted for distributed transaction processing in the embodiment. The order service and the account service are used as distributed transactions, firstly, a platform can call a transaction manager to generate a unique global transaction identifier corresponding to the insurance business handling request, and the follow-up order service and the account service can carry out all stages of the TCC according to the global transaction identifier.
Wherein "T" in TCC refers specifically to Try method, the first "C" in TCC refers specifically to Confirm method, the second "C" in TCC refers specifically to cancer method, and all 3 methods are realized by service coding. The Try operation can be used as a one-stage operation to be responsible for checking and reserving resources, the Confirm operation can be used as a two-stage submitting operation to execute real service, and the Cancel is the cancellation of reserved resources.
S103, performing TCC distributed transaction processing on order service and account service for transacting the target insurance service based on the global transaction identifier until the target insurance service transacting is completed.
The TCC distributed transaction process in this embodiment is described in detail below.
In this embodiment, step S103 specifically includes:
calling order service to generate an order, sending first order information in the represented order to the user side, and simultaneously storing the current operation record of the order service as a Try stage;
calling account service to judge whether the account amount is greater than or equal to the premium amount and performing idempotent verification according to the global transaction identifier;
If the account amount is larger than or equal to the premium amount and the idempotent verification is successful, freezing the premium amount from the account amount, and simultaneously storing the current operation record of the account service as a Try stage;
If the account amount is smaller than the premium amount or the idempotent verification fails, triggering global transaction rollback operation according to the global transaction identifier, and simultaneously storing the current operation record of account service as a cancer stage;
and if the current operation records of the order service and the account service are both in the Try stage, performing the operation in the Confirm stage.
Specifically, if the operation records are all Try phases, it is indicated that the first Try operations of the order service and the account service are successfully executed, and the second Confirm operation can be performed to subtract the amount of the frozen account service ticket, which indicates that the consumption is successful. When one party is abnormal in the first stage, the transaction manager can call the rollback operation at the same time, the account freezing amount is added back to the balance, and whether the rollback operation is executed or not and whether the successful verification is executed in the first stage are needed to be judged in the process.
The second stage Confirm operation includes:
calling order service to perform operation of protecting and issuing an order; the insurance policy may invoke a corresponding insurance policy service through the order service.
If the order of the insurance is successful, calling an account service to deduct the premium amount from the account amount, sending second order information showing that the order is successful to the user side, and simultaneously storing the order service and the current operation record of the account service as a Confirm stage; modifying the order state, and sending second order information showing that the order is successful to the user side;
if the order keeping fails, triggering global transaction rollback operation according to the global transaction identifier, sending third order information showing the order failure to the user side, and simultaneously storing the current operation records of the order service and the account service as a cancer stage; and modifying the order state, and sending third order information showing the order failure to the user side.
In this embodiment, the insurance service sends a bill delivery service assembly message and invokes an insurance company to deliver a bill, and the results are two (successful bill delivery and failed bill delivery), all deduction actions of the account service are determined around the bill delivery result of the insurance, if successful, the second-stage Confirm operation is executed, and if failed, the third-stage cancer operation is executed.
To facilitate an understanding of the above process, the present application provides a schematic diagram of a TCC distributed transaction process as shown in FIG. 2. The one-stage checksum two-stage check in fig. 2 refers to checking whether the corresponding stage is successfully executed.
In this embodiment, the above TCC distributed transaction process can ensure the correctness and consistency of data in the insurance business handling process.
According to the insurance business data processing method provided by the embodiment, an insurance business handling request sent by a user side is received, wherein the insurance business handling request carries a user account number and a business number of a target insurance business; responding to the insurance business handling request, and when the account amount corresponding to the user account number is more than or equal to the premium amount corresponding to the business number, calling a business manager to generate a unique global business identifier corresponding to the insurance business handling request; and performing TCC distributed transaction processing on order service and account service for transacting the target insurance service based on the global transaction identifier until the target insurance service transacting is completed. Compared with the prior art, the TCC distributed transaction processing method is used for handling insurance business, so that the consistency of data in the insurance service process can be ensured, unnecessary troubles brought to users by errors are avoided, and the user experience is improved.
In the above embodiment, an insurance service data processing method is provided, and correspondingly, the application also provides an insurance service data processing device. The insurance business data processing device provided by the embodiment of the application can implement the insurance business data processing method, and the insurance business data processing device can be realized by software, hardware or a combination of software and hardware. For example, the insurance business data processing device may include integrated or separate functional modules or units to perform the corresponding steps in the methods described above. Fig. 3 is a schematic diagram of an insurance service data processing device according to an embodiment of the application. Since the apparatus embodiments are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points. The device embodiments described below are merely illustrative.
As shown in fig. 3, the insurance business data processing device 10 may include:
A receiving module 101, configured to receive an insurance service handling request sent by a user side, where the insurance service handling request carries a user account number and a service number of a target insurance service;
The response module 102 is configured to respond to the insurance service handling request, and when an account amount corresponding to the user account number is greater than or equal to a premium amount corresponding to the service number, invoke a transaction manager to generate a unique global transaction identifier corresponding to the insurance service handling request;
And the processing module 103 is used for conducting TCC distributed transaction processing on the order service and the account service for transacting the target insurance service based on the global transaction identifier until the target insurance service transacting is completed.
In one possible implementation, the processing module 103 is specifically configured to:
calling order service to generate an order, sending first order information in the represented order to the user side, and simultaneously storing the current operation record of the order service as a Try stage;
calling account service to judge whether the account amount is greater than or equal to the premium amount and performing idempotent verification according to the global transaction identifier;
If the account amount is larger than or equal to the premium amount and the idempotent verification is successful, freezing the premium amount from the account amount, and simultaneously storing the current operation record of the account service as a Try stage;
If the account amount is smaller than the premium amount or the idempotent verification fails, triggering global transaction rollback operation according to the global transaction identifier, and simultaneously storing the current operation record of account service as a cancer stage;
and if the current operation records of the order service and the account service are both in the Try stage, performing the operation in the Confirm stage.
In one possible implementation, the processing module 103 is specifically configured to:
Calling order service to perform operation of protecting and issuing an order;
if the order keeping is successful, calling an account service to deduct the premium amount from the account amount, and simultaneously storing the order service and the current operation record of the account service as a Confirm stage;
And if the order keeping fails, triggering global transaction rollback operation according to the global transaction identifier, and simultaneously storing the current operation records of the order service and the account service as a cancer stage.
In a possible implementation manner, the processing module 103 is further configured to:
And if the insurance company succeeds in ordering, sending second order information showing that the order succeeds to the user side.
In a possible implementation manner, the processing module 103 is further configured to:
And if the insurance company fails to make the order, sending third order information showing the order failure to the user side.
In one possible implementation, the response module 102 is further configured to:
And when the account amount corresponding to the user account number is smaller than the premium amount corresponding to the service number, suspending insurance service handling and sending prompt information of insufficient account amount to the user side.
The insurance business data processing device provided by the embodiment of the application and the insurance business data processing method provided by the embodiment of the application have the same beneficial effects as the method adopted, operated or realized by the same inventive concept.
The embodiment of the application also provides electronic equipment corresponding to the insurance business data processing method provided by the embodiment, wherein the electronic equipment can be a mobile phone, a notebook computer, a tablet computer, a desktop computer and the like so as to execute the insurance business data processing method.
Referring to fig. 4, a schematic diagram of an electronic device according to some embodiments of the present application is shown. As shown in fig. 4, the electronic device 20 includes: a processor 200, a memory 201, a bus 202 and a communication interface 203, the processor 200, the communication interface 203 and the memory 201 being connected by the bus 202; the memory 201 stores a computer program that can be executed on the processor 200, and the processor 200 executes the insurance service data processing method provided in any of the foregoing embodiments of the present application when executing the computer program.
The memory 201 may include a high-speed random access memory (RAM: random Access Memory), and may further include a non-volatile memory (non-volatile memory), such as at least one disk memory. The communication connection between the system network element and at least one other network element is implemented via at least one communication interface 203 (which may be wired or wireless), the internet, a wide area network, a local network, a metropolitan area network, etc. may be used.
Bus 202 may be an ISA bus, a PCI bus, an EISA bus, or the like. The buses may be classified as address buses, data buses, control buses, etc. The memory 201 is configured to store a program, and the processor 200 executes the program after receiving an execution instruction, and the insurance service data processing method disclosed in any of the foregoing embodiments of the present application may be applied to the processor 200 or implemented by the processor 200.
The processor 200 may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in the processor 200 or by instructions in the form of software. The processor 200 may be a general-purpose processor, including a central processing unit (Central Processing Unit, abbreviated as CPU), a network processor (Network Processor, abbreviated as NP), etc.; but may also be a Digital Signal Processor (DSP), application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The disclosed methods, steps, and logic blocks in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be embodied directly in the execution of a hardware decoding processor, or in the execution of a combination of hardware and software modules in a decoding processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in the memory 201, and the processor 200 reads the information in the memory 201, and in combination with its hardware, performs the steps of the above method.
The electronic equipment provided by the embodiment of the application and the insurance business data processing method provided by the embodiment of the application have the same beneficial effects as the method adopted, operated or realized by the electronic equipment and the insurance business data processing method provided by the embodiment of the application due to the same inventive concept.
The embodiment of the present application further provides a computer readable storage medium corresponding to the insurance service data processing method provided in the foregoing embodiment, referring to fig. 5, the computer readable storage medium is shown as an optical disc 30, on which a computer program (i.e. a program product) is stored, where the computer program, when executed by a processor, performs the insurance service data processing method provided in any of the foregoing embodiments.
It should be noted that examples of the computer readable storage medium may also include, but are not limited to, a phase change memory (PRAM), a Static Random Access Memory (SRAM), a Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a flash memory, or other optical or magnetic storage medium, which will not be described in detail herein.
The computer readable storage medium provided by the above embodiment of the present application has the same advantages as the method adopted, operated or implemented by the application program stored in the computer readable storage medium, because of the same inventive concept as the insurance service data processing method provided by the embodiment of the present application.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the application, and are intended to be included within the scope of the appended claims and description.

Claims (4)

1. A method for processing insurance business data, comprising:
Receiving an insurance service handling request sent by a user terminal, wherein the insurance service handling request carries a user account number and a service number of a target insurance service;
Responding to the insurance business handling request, and when the account amount corresponding to the user account number is more than or equal to the premium amount corresponding to the business number, calling a business manager to generate a unique global business identifier corresponding to the insurance business handling request;
performing TCC distributed transaction processing on order service and account service for transacting the target insurance service based on the global transaction identifier until the target insurance service transacting is completed;
Performing TCC distributed transaction processing on order services and account services transacting the target insurance service based on the global transaction identifier, including:
calling order service to generate an order, sending first order information in the represented order to the user side, and simultaneously storing the current operation record of the order service as a Try stage;
calling account service to judge whether the account amount is greater than or equal to the premium amount and performing idempotent verification according to the global transaction identifier;
If the account amount is larger than or equal to the premium amount and the idempotent verification is successful, freezing the premium amount from the account amount, and simultaneously storing the current operation record of the account service as a Try stage;
If the account amount is smaller than the premium amount or the idempotent verification fails, triggering global transaction rollback operation according to the global transaction identifier, and simultaneously storing the current operation record of account service as a cancer stage;
if the current operation records of the order service and the account service are both in the Try stage, performing the operation in the Confirm stage;
and if the current operation records of the order service and the account service are both in the Try stage, performing the operation in the Confirm stage, including:
Calling order service to perform operation of protecting and issuing an order;
if the order keeping is successful, calling an account service to deduct the premium amount from the account amount, and simultaneously storing the order service and the current operation record of the account service as a Confirm stage;
If the order keeping fails, triggering global transaction rollback operation according to the global transaction identifier, and simultaneously storing the current operation records of the order service and the account service as a cancer stage;
The method further comprises the steps of: if the insurance company succeeds in making the order, sending second order information showing that the order is successful to the user side;
The method further comprises the steps of: if the insurance company fails to make the order, third order information showing the order failure is sent to the user side;
the method further comprises the steps of: and when the account amount corresponding to the user account number is smaller than the premium amount corresponding to the service number, suspending insurance service handling and sending prompt information of insufficient account amount to the user side.
2. An insurance business data processing device, characterized by comprising:
the receiving module is used for receiving an insurance service handling request sent by a user side, wherein the insurance service handling request carries a user account number and a service number of a target insurance service;
The response module is used for responding to the insurance business handling request, and when the account amount corresponding to the user account number is more than or equal to the premium amount corresponding to the business number, the transaction manager is called to generate a unique global transaction identifier corresponding to the insurance business handling request;
The processing module is used for conducting TCC distributed transaction processing on order service and account service for transacting the target insurance service based on the global transaction identifier until the target insurance service transacting is completed;
The processing module is specifically configured to:
calling order service to generate an order, sending first order information in the represented order to the user side, and simultaneously storing the current operation record of the order service as a Try stage;
calling account service to judge whether the account amount is greater than or equal to the premium amount and performing idempotent verification according to the global transaction identifier;
If the account amount is larger than or equal to the premium amount and the idempotent verification is successful, freezing the premium amount from the account amount, and simultaneously storing the current operation record of the account service as a Try stage;
If the account amount is smaller than the premium amount or the idempotent verification fails, triggering global transaction rollback operation according to the global transaction identifier, and simultaneously storing the current operation record of account service as a cancer stage;
if the current operation records of the order service and the account service are both in the Try stage, performing the operation in the Confirm stage;
The processing module is specifically configured to:
Calling order service to perform operation of protecting and issuing an order;
if the order keeping is successful, calling an account service to deduct the premium amount from the account amount, and simultaneously storing the order service and the current operation record of the account service as a Confirm stage;
If the order keeping fails, triggering global transaction rollback operation according to the global transaction identifier, and simultaneously storing the current operation records of the order service and the account service as a cancer stage;
The processing module is further configured to: if the insurance company succeeds in making the order, sending second order information showing that the order is successful to the user side; if the insurance company fails to make the order, third order information showing the order failure is sent to the user side;
the response module is further configured to: and when the account amount corresponding to the user account number is smaller than the premium amount corresponding to the service number, suspending insurance service handling and sending prompt information of insufficient account amount to the user side.
3. An electronic device, comprising: memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor executes the computer program to implement the method of claim 1.
4. A computer readable storage medium having stored thereon computer readable instructions executable by a processor to implement the method of claim 1.
CN202210320314.4A 2022-03-29 2022-03-29 Insurance business data processing method and device, electronic equipment and storage medium Active CN114816681B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210320314.4A CN114816681B (en) 2022-03-29 2022-03-29 Insurance business data processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210320314.4A CN114816681B (en) 2022-03-29 2022-03-29 Insurance business data processing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114816681A CN114816681A (en) 2022-07-29
CN114816681B true CN114816681B (en) 2024-04-26

Family

ID=82530437

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210320314.4A Active CN114816681B (en) 2022-03-29 2022-03-29 Insurance business data processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114816681B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110889687A (en) * 2019-11-18 2020-03-17 厦门网宿有限公司 Method and device for processing account balance under distributed architecture
CN111753013A (en) * 2020-06-24 2020-10-09 中国银行股份有限公司 Distributed transaction processing method and device
CN112541830A (en) * 2020-12-29 2021-03-23 中国工商银行股份有限公司 Processing method, processing device and processing system for transaction consistency
CN113296896A (en) * 2020-06-09 2021-08-24 阿里巴巴集团控股有限公司 Distributed transaction processing method, device and equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120323717A1 (en) * 2011-06-16 2012-12-20 OneID, Inc. Method and system for determining authentication levels in transactions
US9442971B2 (en) * 2013-04-17 2016-09-13 International Business Machines Corporation Weighted transaction priority based dynamically upon phase of transaction completion

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110889687A (en) * 2019-11-18 2020-03-17 厦门网宿有限公司 Method and device for processing account balance under distributed architecture
CN113296896A (en) * 2020-06-09 2021-08-24 阿里巴巴集团控股有限公司 Distributed transaction processing method, device and equipment
CN111753013A (en) * 2020-06-24 2020-10-09 中国银行股份有限公司 Distributed transaction processing method and device
CN112541830A (en) * 2020-12-29 2021-03-23 中国工商银行股份有限公司 Processing method, processing device and processing system for transaction consistency

Also Published As

Publication number Publication date
CN114816681A (en) 2022-07-29

Similar Documents

Publication Publication Date Title
CN108876380B (en) Transaction method and system based on centralized settlement and block chain deposit certificate
CN109377216B (en) Transaction method and system based on centralized settlement and block chain deposit certificate
CN110020846B (en) Transfer service processing method and system
CN113641940B (en) Page jump method, device, system, equipment and storage medium
CN108647950B (en) Transfer request processing method, device and equipment
CN109615353B (en) Payment method and device
CN110992188B (en) Transaction processing method, device and equipment
US20200279261A1 (en) Blockchain-based reconciliation system, method, and apparatus and electronic device
WO2021196741A1 (en) Management method and device for system configuration independent of smart contract on blockchain
CN110992040A (en) Transaction processing method, device and equipment
CN112437155B (en) Service data processing method and device and server device
CN108596581B (en) Verification method and device for resource transfer and electronic payment verification method and device
CN114816681B (en) Insurance business data processing method and device, electronic equipment and storage medium
CN110175915B (en) Service execution result obtaining method and system based on block chain
CN110278241B (en) Registration request processing method and device
CN108564433B (en) Method, device and server for currency conversion
WO2020243904A1 (en) Refund method, transaction system, account system, and storage medium
CN108038788B (en) Insurance object price inquiry method and device, storage medium and electronic equipment
CN113435889B (en) Transaction processing method and device based on credit
US20150178696A1 (en) System and method for performing callbacks in an automated clearing house network
CN111309495B (en) Batch processing request initiating method and device, risk identification equipment and storage medium
CN111949337B (en) Accounting processing method, device, terminal and storage medium
CN115018569A (en) Invoice issuing method, invoice reimbursement device and equipment based on block chain
CN111651469B (en) Method and device for managing blockchain system contracts
CN109685508B (en) Transaction data processing method and device, electronic equipment and readable 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
GR01 Patent grant
GR01 Patent grant