CN114816681A - 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
CN114816681A
CN114816681A CN202210320314.4A CN202210320314A CN114816681A CN 114816681 A CN114816681 A CN 114816681A CN 202210320314 A CN202210320314 A CN 202210320314A CN 114816681 A CN114816681 A CN 114816681A
Authority
CN
China
Prior art keywords
service
account
insurance
order
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.)
Granted
Application number
CN202210320314.4A
Other languages
Chinese (zh)
Other versions
CN114816681B (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

Images

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 service data processing method and device, electronic equipment and a storage medium. The method comprises the following steps: 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; responding to the insurance service handling request, and calling a transaction manager to generate a unique global transaction identifier corresponding to the insurance service handling request when the account amount corresponding to the user account number is greater than or equal to the premium amount corresponding to the service number; and carrying out TCC (transmission control center) distributed transaction processing on the order service and the account service for transacting the target insurance business based on the global transaction identifier until the transaction of the target insurance business is completed. Compared with the prior art, the insurance business is transacted based on the TCC distributed transaction processing method, the consistency of data in the insurance transaction process can be guaranteed, unnecessary troubles brought to a user due to mistakes are avoided, and therefore 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 an insurance service data processing method and apparatus, an electronic device, and a computer-readable storage medium.
Background
With the development of economy and society, people have stronger insurance awareness, and more users start to purchase insurance services through a network.
At present, insurance service billing systems on the network all adopt a micro-service architecture, business services such as account recharging, consumption and insurance policy buying are independently deployed, the business services are carried out by calling corresponding interfaces, each interface adopts remote process calling, and data among the business services are difficult to ensure correctness and consistency. Therefore, how to ensure the data consistency in the process of purchasing insurance services by users is a technical problem which needs to be solved urgently in the field.
Disclosure of Invention
The application aims to provide an insurance business data processing method and device, electronic equipment and a computer readable storage medium.
A 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 side, wherein the insurance service handling request carries a user account number and a service number of a target insurance service;
responding to the insurance service handling request, and calling a transaction manager to generate a unique global transaction identifier corresponding to the insurance service handling request when the account amount corresponding to the user account number is greater than or equal to the premium amount corresponding to the service number;
and carrying out TCC (transmission control center) distributed transaction processing on the order service and the account service for transacting the target insurance business based on the global transaction identifier until the transaction of the target insurance business is completed.
In one possible implementation manner, the performing TCC distributed transaction processing on the order service and the account service transacting the target insurance business based on the global transaction identifier includes:
calling order service to generate an order, sending first order information in an indication list to the user side, and simultaneously storing the operation record of the order service as a Try stage;
calling account service to judge whether the account amount is larger than or equal to the premium amount and carrying out 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 saving the operation record of account service as a Try stage;
if the account amount is smaller than the premium amount or the verification of the idempotent and the like fails, triggering a global transaction rollback operation according to the global transaction identifier, and simultaneously storing the operation record of the account service as a Cancel stage;
and if the current operation records of the order service and the account service are in the Try stage, performing the operation in the Confirm stage.
In a possible implementation manner, if the current operation records of the order service and the account service are both in the Try phase, performing operation in the Confirm phase includes:
calling order service to carry out the operation of issuing the order of the insurance department;
if the insurance department succeeds in issuing the order, calling account service to deduct the premium amount from the account amount, and simultaneously storing the operation records of the order service and the account service as a Confirm stage;
and if the reservation is failed to leave the order, triggering the global transaction rollback operation according to the global transaction identifier, and simultaneously storing the current operation record of order service and account service as a Cancel stage.
In one possible implementation, the method further includes:
and if the driver successfully takes the order, sending second order information indicating that the order is successfully taken to the user side.
In one possible implementation, the method further includes:
and if the reservation issuing fails, sending third order information indicating 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 transaction and sending prompt information of insufficient account amount to the user side.
A second aspect of the present application provides an insurance service data processing apparatus, including:
the system comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving an insurance service processing request sent by a user side, and the insurance service processing 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 service handling request, and calling a transaction manager to generate a unique global transaction identifier corresponding to the insurance service handling request when the account amount corresponding to the user account number is greater than or equal to the premium amount corresponding to the service number;
and the processing module is used for carrying out TCC (transmission control center) distributed transaction processing on the order service and the account service for transacting the target insurance business based on the global transaction identifier until the transaction of the target insurance business 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 an indication list to the user side, and simultaneously storing the operation record of the order service as a Try stage;
calling account service to judge whether the account amount is larger than or equal to the premium amount and carrying out 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 saving the operation record of account service as a Try stage;
if the account amount is smaller than the premium amount or the verification of the idempotent and the like fails, triggering a global transaction rollback operation according to the global transaction identifier, and simultaneously storing the operation record of the account service as a Cancel stage;
and if the current operation records of the order service and the account service are 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 carry out the operation of issuing the order of the insurance department;
if the insurance department succeeds in issuing the order, calling account service to deduct the premium amount from the account amount, and simultaneously storing the operation records of the order service and the account service as a Confirm stage;
and if the reservation is failed to leave the order, triggering the global transaction rollback operation according to the global transaction identifier, and simultaneously storing the current operation record of order service and account service as a Cancel stage.
In one possible implementation manner, the processing module is further configured to:
and if the driver successfully takes the order, sending second order information indicating that the order is successfully taken to the user side.
In one possible implementation manner, the processing module is further configured to:
and if the reservation issuing fails, sending third order information indicating the order failure to the user side.
In one possible implementation manner, 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 transaction and sending prompt information of insufficient account amount to the user side.
A third aspect of the present application provides an electronic device comprising: the insurance business data processing method comprises a memory, a processor and a computer program which is stored on the memory and can be run on the processor, wherein the processor executes the computer program to realize the insurance business data processing method of the first aspect of the application.
A fourth aspect of the present application provides a computer-readable storage medium having computer-readable instructions stored thereon, the computer-readable instructions being executable by a processor to implement the insurance service data processing method according to the first aspect of the present application.
The insurance business data processing method, the insurance business data processing device, the electronic equipment and the storage medium receive an insurance business handling request sent by a user side, wherein the insurance business handling request carries a user account number and a business number of a target insurance business; responding to the insurance service handling request, and calling a transaction manager to generate a unique global transaction identifier corresponding to the insurance service handling request when the account amount corresponding to the user account number is greater than or equal to the premium amount corresponding to the service number; and carrying out TCC (transmission control center) distributed transaction processing on the order service and the account service for transacting the target insurance business based on the global transaction identifier until the transaction of the target insurance business is completed. Compared with the prior art, the insurance business is handled based on the TCC distributed transaction processing method, the consistency of data in the insurance service process can be guaranteed, unnecessary troubles brought to a user due to errors are avoided, and therefore 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 refer to like parts throughout the drawings. In the drawings:
FIG. 1 is a flow chart illustrating an insurance business data processing method provided by the present application;
FIG. 2 is a schematic diagram illustrating a TCC distributed transaction process provided herein;
FIG. 3 is a schematic diagram illustrating an insurance data processing apparatus provided in the present application;
fig. 4 is a schematic structural diagram of an electronic device provided in the present application;
fig. 5 shows a schematic structural diagram of a computer-readable storage medium provided by 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 to be noted that, unless otherwise specified, technical or scientific terms used herein shall have the ordinary meaning as understood by those skilled in the art to which this application belongs.
In addition, the terms "first" and "second", etc. are used to distinguish different objects, rather than to describe a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
An embodiment of the present application provides an insurance service data processing method and apparatus, an electronic device, and a computer-readable storage medium, which are described below with reference to the accompanying drawings.
Fig. 1 shows a schematic flow chart of a method for processing insurance service data provided in an embodiment of the present application, and as shown in fig. 1, the method specifically includes the following steps:
s101, receiving an insurance service transaction request sent by a user side, wherein the insurance service transaction request carries a user account number and a service number of a target insurance service.
The execution main body of this 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 sets up an account on the insurance business handling platform, the stored value in the account has a certain amount of money, and the user deducts the corresponding account money when purchasing a certain insurance policy through the user side.
In this embodiment, when a user needs to purchase a policy, an insurance service transaction request is sent to the platform through the user side, where the request carries a user account number and a service number of a 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 service and obtain the premium amount of the target insurance service through the service number.
S102, responding to the insurance service handling request, and calling a transaction manager to generate a unique global transaction identifier corresponding to the insurance service handling request when the account amount corresponding to the user account number is greater than or equal to the premium amount corresponding to the service number;
in this embodiment, the platform first determines whether the account amount corresponding to the account number of the user 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 for the target insurance service, and if so, the platform 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 insurance service transaction and send a prompt message indicating that the account amount is insufficient to the user side, so as to prompt the user to store value and then continue to purchase.
In the prior art, when the order service and the account service are called to transact the insurance service, the two service data are often inconsistent, and when the user makes a mistake, the user is relieved of the mistake, and unnecessary trouble is brought to the user. The order service and the account service are used as distributed transactions, firstly, a transaction manager is called by a platform to generate a unique global transaction identifier corresponding to the insurance business transaction request, and then, the order service and the account service carry out each stage of a TCC (transmission control center) protocol according to the global transaction identifier.
Wherein, the "T" in TCC specifically refers to the Try method, the first "C" in TCC specifically refers to the Confirm method, the second "C" in TCC specifically refers to the Cancel method, and the 3 methods are all realized by service coding. The Try operation may be used as a first stage to check and reserve resources, the Confirm operation may be used as a second stage commit operation to execute a real service, and the Cancel is to reserve resources.
S103, carrying out TCC (transmission control center) distributed transaction processing on the order service and the account service for transacting the target insurance business based on the global transaction identifier until the transaction of the target insurance business is completed.
The TCC distributed transaction process in this embodiment will be described in detail below.
In this embodiment, step S103 specifically includes:
calling order service to generate an order, sending first order information in an indication order to the user side, and simultaneously storing the operation record of the order service as a Try stage;
calling account service to judge whether the account amount is larger than or equal to the premium amount and carrying out 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 saving the operation record of account service as a Try stage;
if the account amount is smaller than the premium amount or the verification of the idempotent and the like fails, triggering a global transaction rollback operation according to the global transaction identifier, and simultaneously storing the operation record of the account service as a Cancel stage;
and if the current operation records of the order service and the account service are in the Try stage, performing the operation in the Confirm stage.
Specifically, if the operation records are all in the Try stage, it is indicated that the Try operation in the first stage of the order service and the account service is successfully executed, and the Confirm operation in the second stage can be performed, so that the amount of money frozen in the account service list is reduced, which indicates that the consumption is successful. When one party in the first stage is abnormal, the transaction manager calls 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 first stage is successfully verified or not need to be judged in the process.
The second stage Confirm operation includes:
calling order service to carry out the operation of issuing the order of the insurance department; the server can call corresponding server for the server through the order service.
If the insurance department successfully draws the order, calling account service to deduct the premium amount from the account amount, sending second order information indicating the order drawing success to the user side, and simultaneously storing the operation records of the order service and the account service as a Confirm stage; modifying the order state, and sending second order information indicating that the order is successfully made to the user side;
if the reservation is failed to leave the list, triggering global transaction rollback operation according to the global transaction identifier, sending third order information showing list failure to the user side, and simultaneously storing the current operation record of order service and account service as a Cancel stage; and modifying the order state, and sending third order information which shows the order failure to the user side.
In this embodiment, the insurance company bill issuing service assembles the message and calls the insurance company bill issuing, the result has two types (success of bill issuing and failure of bill issuing), all the deduction actions of the account service are determined around the result of bill issuing of the insurance company, if the result is successful, the second stage Confirm operation is executed, and if the result is failed, the third stage Cancel operation is executed.
To facilitate understanding of the above process, the present application provides a schematic diagram of the TCC distributed transaction process as shown in fig. 2. The one-stage check and the two-stage check in fig. 2 refer to checking whether the corresponding stage is successfully performed.
In this embodiment, the correctness and consistency of data in the insurance business transaction process can be ensured through the TCC distributed transaction process.
The insurance business data processing method provided by this embodiment receives an insurance business transaction request sent by a user side, where the insurance business transaction request carries a user account number and a business number of a target insurance business; responding to the insurance service handling request, and calling a transaction manager to generate a unique global transaction identifier corresponding to the insurance service handling request when the account amount corresponding to the user account number is greater than or equal to the premium amount corresponding to the service number; and carrying out TCC (transmission control center) distributed transaction processing on the order service and the account service for transacting the target insurance business based on the global transaction identifier until the transaction of the target insurance business is completed. Compared with the prior art, the insurance service is handled based on the TCC distributed transaction processing method, the consistency of data in the insurance service process can be guaranteed, unnecessary troubles brought to a user due to errors are avoided, and therefore user experience is improved.
In the above embodiment, an insurance service data processing method is provided, and correspondingly, the present application also provides an insurance service data processing apparatus. 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 implemented in a software, hardware or software and hardware combined mode. For example, the insurance service data processing apparatus may include integrated or separate functional modules or units to perform the corresponding steps in the methods described above. Please refer to fig. 3, which shows a schematic diagram of an insurance data processing apparatus according to an embodiment of the present application. Since the apparatus embodiments are substantially similar to the method embodiments, they are described in a relatively simple manner, and reference may be made to some of the descriptions of the method embodiments for relevant points. The device embodiments described below are merely illustrative.
As shown in fig. 3, the insurance service data processing apparatus 10 may include:
the system comprises a receiving module 101, a processing module and a processing module, wherein the receiving module 101 is used for receiving an insurance service processing request sent by a user side, and the insurance service processing request carries a user account number and a service number of a target insurance service;
a response module 102, 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 configured to perform TCC distributed transaction processing on the order service and the account service transacting the target insurance service based on the global transaction identifier until the target insurance service transaction is completed.
In a possible implementation manner, the processing module 103 is specifically configured to:
calling order service to generate an order, sending first order information in an indication list to the user side, and simultaneously storing the operation record of the order service as a Try stage;
calling account service to judge whether the account amount is larger than or equal to the premium amount and carrying out 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 saving the operation record of account service as a Try stage;
if the account amount is smaller than the premium amount or the verification of the idempotent and the like fails, triggering a global transaction rollback operation according to the global transaction identifier, and simultaneously storing the operation record of the account service as a Cancel stage;
and if the current operation records of the order service and the account service are in the Try stage, performing the operation in the Confirm stage.
In a possible implementation manner, the processing module 103 is specifically configured to:
calling order service to carry out operation of issuing a note by a security department;
if the insurance department succeeds in issuing the order, calling account service to deduct the premium amount from the account amount, and simultaneously storing the operation records of the order service and the account service as a Confirm stage;
and if the reservation is failed to leave the order, triggering the global transaction rollback operation according to the global transaction identifier, and simultaneously storing the current operation record of order service and account service as a Cancel stage.
In a possible implementation manner, the processing module 103 is further configured to:
and if the driver successfully takes the order, sending second order information indicating that the order is successfully taken to the user side.
In a possible implementation manner, the processing module 103 is further configured to:
and if the reservation fails to discharge the order, sending third order information indicating the order failure to the user side.
In a possible implementation manner, 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 transaction 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 inventive concept and the same beneficial effects as the method adopted, operated or realized by the insurance business data processing device.
The embodiment of the present application further provides an electronic device corresponding to the insurance business data processing method provided by the foregoing embodiment, where the electronic device may be a mobile phone, a notebook computer, a tablet computer, a desktop computer, or the like, so as to execute the insurance business data processing method.
Referring to fig. 4, a schematic diagram of an electronic device provided in some embodiments of the present application is shown. As shown in fig. 4, the electronic device 20 includes: the system comprises a processor 200, a memory 201, a bus 202 and a communication interface 203, wherein the processor 200, the communication interface 203 and the memory 201 are connected through 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 business data processing method provided by any one of the foregoing embodiments when executing the computer program.
The Memory 201 may include a high-speed Random Access Memory (RAM) and may further include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The communication connection between the network element of the system and at least one other network element is realized through at least one communication interface 203 (which may be wired or wireless), and the internet, a wide area network, a local network, a metropolitan area network, and the like can be used.
Bus 202 may be an ISA bus, PCI bus, EISA bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. The memory 201 is used for storing a program, and the processor 200 executes the program after receiving an execution instruction, and the insurance business data processing method disclosed by any embodiment of the foregoing application may be applied to the processor 200, or implemented by the processor 200.
The processor 200 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 200. The Processor 200 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. The various methods, steps, and logic blocks disclosed 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 directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is 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 completes the steps of the method in combination with the hardware thereof.
The electronic 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 inventive concept and have the same beneficial effects as the method adopted, operated or realized by the electronic device.
Referring to fig. 5, the computer readable storage medium is an optical disc 30, and a computer program (i.e., a program product) is stored thereon, and when being executed by a processor, the computer program may execute the insurance service data processing method provided by 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, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory, or other optical and magnetic storage media, which are not described in detail herein.
The computer-readable storage medium provided by the above-mentioned embodiment of the present application and the insurance business data processing method provided by the embodiment of the present application have the same beneficial effects as the method adopted, operated or implemented by the application program stored in the computer-readable storage medium.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; such modifications and substitutions do not depart from the spirit and scope of the present disclosure, and the present disclosure should be construed as being covered by the claims and the specification.

Claims (10)

1. An insurance service data processing method is characterized by comprising the following steps:
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;
responding to the insurance service handling request, and calling a transaction manager to generate a unique global transaction identifier corresponding to the insurance service handling request when the account amount corresponding to the user account number is greater than or equal to the premium amount corresponding to the service number;
and carrying out TCC (transmission control center) distributed transaction processing on the order service and the account service for transacting the target insurance business based on the global transaction identifier until the transaction of the target insurance business is completed.
2. The method according to claim 1, wherein the TCC distributed transaction processing for order service and account service transacting the target insurance business based on the global transaction identity comprises:
calling order service to generate an order, sending first order information in an indication list to the user side, and simultaneously storing the operation record of the order service as a Try stage;
calling account service to judge whether the account amount is larger than or equal to the premium amount and carrying out 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 saving the operation record of account service as a Try stage;
if the account amount is less than the premium amount or the verification such as the power fails, triggering a global transaction rollback operation according to the global transaction identifier, and simultaneously storing the operation record of the account service as a Cancel stage;
and if the current operation records of the order service and the account service are in the Try stage, performing the operation in the Confirm stage.
3. The method according to claim 2, wherein if the current operation records of the order service and the account service are in the Try phase, performing a Confirm phase operation, including:
calling order service to carry out the operation of issuing the order of the insurance department;
if the insurance department succeeds in issuing the order, calling account service to deduct the premium amount from the account amount, and simultaneously storing the operation records of the order service and the account service as a Confirm stage;
and if the reservation is failed to leave the order, triggering the global transaction rollback operation according to the global transaction identifier, and simultaneously storing the current operation record of order service and account service as a Cancel stage.
4. The method of claim 3, further comprising:
and if the driver successfully takes the order, sending second order information indicating that the order is successfully taken to the user side.
5. The method of claim 3, further comprising:
and if the reservation fails to discharge the order, sending third order information indicating the order failure to the user side.
6. The method of claim 1, further comprising:
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 transaction and sending prompt information of insufficient account amount to the user side.
7. An insurance business data processing apparatus, comprising:
the system comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving an insurance service processing request sent by a user side, and the insurance service processing 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 service handling request, and calling a transaction manager to generate a unique global transaction identifier corresponding to the insurance service handling request when the account amount corresponding to the user account number is greater than or equal to the premium amount corresponding to the service number;
and the processing module is used for carrying out TCC (transmission control center) distributed transaction processing on the order service and the account service for transacting the target insurance business based on the global transaction identifier until the transaction of the target insurance business is completed.
8. The apparatus of claim 7, wherein the processing module is specifically configured to:
calling order service to generate an order, sending first order information in an indication list to the user side, and simultaneously storing the operation record of the order service as a Try stage;
calling account service to judge whether the account amount is larger than or equal to the premium amount and carrying out 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 saving the operation record of account service as a Try stage;
if the account amount is smaller than the premium amount or the verification of the idempotent and the like fails, triggering a global transaction rollback operation according to the global transaction identifier, and simultaneously storing the operation record of the account service as a Cancel stage;
and if the current operation records of the order service and the account service are in the Try stage, performing the operation in the Confirm stage.
9. An electronic device, comprising: memory, processor and computer program stored on the memory and executable on the processor, characterized in that the processor executes when executing the computer program to implement the method according to any of claims 1 to 6.
10. A computer-readable storage medium having computer-readable instructions stored thereon, the computer-readable instructions being executable by a processor to implement the method of any one of claims 1 to 6.
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 true CN114816681A (en) 2022-07-29
CN114816681B 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 (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120323786A1 (en) * 2011-06-16 2012-12-20 OneID Inc. Method and system for delayed authorization of online transactions
US20140317070A1 (en) * 2013-04-17 2014-10-23 International Business Machines Corporation Weighted transaction priority based dynamically upon phase of transaction completion
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

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120323786A1 (en) * 2011-06-16 2012-12-20 OneID Inc. Method and system for delayed authorization of online transactions
US20140317070A1 (en) * 2013-04-17 2014-10-23 International Business Machines Corporation Weighted transaction priority based dynamically upon phase of transaction completion
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
CN114816681B (en) 2024-04-26

Similar Documents

Publication Publication Date Title
CN108876380B (en) Transaction method and system based on centralized settlement and block chain deposit certificate
CN109242453B (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
US11188910B2 (en) Blockchain-based reconciliation system, method, and apparatus and electronic device
CN110020846B (en) Transfer service processing method and system
CN110992188B (en) Transaction processing method, device and equipment
CN110992040A (en) Transaction processing method, device and equipment
WO2020243904A1 (en) Refund method, transaction system, account system, and storage medium
CN110689394B (en) Method and device for processing service supplementary notes
CN112437155B (en) Service data processing method and device and server device
CN113421081A (en) Payment processing method and device
CN108596581B (en) Verification method and device for resource transfer and electronic payment verification method and device
WO2024032356A1 (en) Payment processing method and apparatus based on prepayment voucher
CN110175915B (en) Service execution result obtaining method and system based on block chain
CN108564433B (en) Method, device and server for currency conversion
CN114816681B (en) Insurance business data processing method and device, electronic equipment and storage medium
CN113435889B (en) Transaction processing method and device based on credit
CN111949337B (en) Accounting processing method, device, terminal and storage medium
CN114581088A (en) Aggregated payment method, device and system for SaaS (software as a service) system
CN111309495B (en) Batch processing request initiating method and device, risk identification equipment and storage medium
CN109741069B (en) Transaction data processing method and device, electronic equipment and readable storage medium
CN113077241A (en) Approval processing method, device, equipment and storage medium
CN112990811A (en) Block chain-based warehouse receipt processing method and warehouse receipt processing system
CN111061576A (en) Method and system for creating entity object
CN111383025B (en) Method and device for forwarding wind control data and electronic equipment

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