Method, device, server and medium for real-time adjustment
By sending message queue delay messages in the health insurance claims system and updating cached data, the problem of insufficient timeliness of claims calculations in the prior art is solved, real-time calculation is realized and system performance is improved.
Patent Information
- Application Number
- CN202111127135.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-26
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2041-09-26
AI Technical Summary
In the health insurance claims, due to complex rules and database performance bottlenecks, the timeliness of claims calculations cannot be met and real-time calculation cannot be realized.
By sending a message queue delay message, and after the message queue delay message is sent, the corresponding quota data of the adjustment request is updated from the preset cache, and the database is saved asynchronously, the claim can be completed only through cache operations, and it does not depend on the performance bottleneck of the database.
It greatly improves the performance and response timeliness of the system, realizes real-time calculation, and ensures the final consistency of the data through the message queue compensation mechanism.
Smart Images

Figure CN113850685B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to a method, device, server, and medium for real-time settlement. Background Art
[0002] With the development of computer technology, its application in the field of smart medical care is increasing. In the business scenario of health insurance claims, the claims rules are often very complicated, with many restriction rules and cycle calculations.
[0003] Health insurance claims in existing technologies are based on the user paying first, then reporting the case, manually reviewing the claim information, and then issuing the compensation amount. Because existing technologies are subject to complex settlement rules and database performance bottlenecks when calculating claims, they often need to wait for a certain period of time, so they cannot meet the timeliness requirements of scenarios such as drug purchase settlement. Summary of the invention
[0004] The embodiments of the present disclosure provide a method, an apparatus, a server, and a medium for real-time adjustment.
[0005] In a first aspect, an embodiment of the present disclosure provides a method for real-time settlement, the method comprising: in response to receiving a settlement request, sending a message queue delay message corresponding to the settlement request, wherein the settlement request includes a settlement amount; in response to determining that the message queue delay message has been sent, updating the amount data corresponding to the settlement request from a preset cache; and updating the corresponding data in a database corresponding to the preset cache based on the updated amount data.
[0006] In some embodiments, the limit data in the above-mentioned preset cache is obtained through the following steps: obtaining the policy identification and the claim content information corresponding to the policy identification, wherein the claim content information includes at least one of the following: claim amount, number of claims, and deductible amount; generating the current limit data according to the claim content information and the preset claim rules, wherein the current limit data is related to at least one of the following: periodic limit limit, claims personnel information, and claims history.
[0007] In some embodiments, the above-mentioned policy identification and the claim content information corresponding to the policy identification are stored in a Map, the key stored in the Map is generated according to the policy period value and the insured person identification corresponding to the policy identification, and the value stored in the Map is generated according to the claim content information.
[0008] In some embodiments, the above-mentioned updating of corresponding data in the database corresponding to the preset cache based on the updated quota data includes: selecting data that has not been stored in the database from the preset cache for storage; in response to determining that the storage is successful, deleting the data that has been successfully stored in the database from the preset cache.
[0009] In some embodiments, the above-mentioned updating of corresponding data in the database corresponding to the preset cache according to the updated quota data also includes: in response to determining that the data has failed to be dropped into the warehouse, obtaining a message queue delay message corresponding to the data that failed to be dropped into the warehouse; reading the non-dropped-in data indicated by the message queue delay message corresponding to the data that failed to be dropped into the warehouse from the preset cache; and writing the read non-dropped-in data into the database corresponding to the preset cache.
[0010] In some embodiments, the method further includes: in response to determining that the corresponding data in the database has been updated, triggering a check through the MySQL binlog log to see whether the corresponding data in the database is consistent with the updated quota data in the preset cache.
[0011] In some embodiments, the method further includes: in response to determining that the corresponding data in the database has been updated, verifying whether the corresponding data in the database is consistent with the updated limit data in the preset cache at a preset time interval.
[0012] In some embodiments, the above settlement request is generated through the following steps: obtaining a drug purchase settlement page; and generating a settlement request according to the drug purchase settlement page and preset claim settlement rules.
[0013] In a second aspect, an embodiment of the present disclosure provides a device for real-time settlement, the device comprising: a sending unit, configured to send a message queue delay message corresponding to a settlement request in response to receiving a settlement request, wherein the settlement request includes a settlement amount; a cache update unit, configured to update the amount data corresponding to the settlement request from a preset cache in response to determining that the message queue delay message has been sent; and a database update unit, configured to update the corresponding data in the database corresponding to the preset cache according to the updated amount data.
[0014] In some embodiments, the limit data in the above-mentioned preset cache is obtained through the following steps: obtaining the policy identification and the claim content information corresponding to the policy identification, wherein the claim content information includes at least one of the following: claim amount, number of claims, and deductible amount; generating the current limit data according to the claim content information and the preset claim rules, wherein the current limit data is related to at least one of the following: periodic limit limit, claims personnel information, and claims history.
[0015] In some embodiments, the above-mentioned policy identification and the claim content information corresponding to the policy identification are stored in a Map, the key stored in the Map is generated according to the policy period value and the insured person identification corresponding to the policy identification, and the value stored in the Map is generated according to the claim content information.
[0016] In some embodiments, the database updating unit is further configured to: select data that has not been stored in the database from the preset cache for storage; in response to determining that the storage is successful, delete the data that has been successfully stored in the database from the preset cache.
[0017] In some embodiments, the above-mentioned database update unit is further configured to: in response to determining that the data fails to be stored in the warehouse, obtain a message queue delay message corresponding to the data that failed to be stored in the warehouse; read the non-stored data indicated by the message queue delay message corresponding to the data that failed to be stored in the warehouse from the preset cache; and write the read non-stored data into the database corresponding to the preset cache.
[0018] In some embodiments, the device also includes: a single verification unit, which is configured to trigger a verification of whether the corresponding data in the database is consistent with the updated quota data in the preset cache through the MySQL binlog log in response to determining that the corresponding data in the database has been updated.
[0019] In some embodiments, the device further includes: a timing verification unit configured to verify whether the corresponding data in the database is consistent with the updated quota data in the preset cache at a preset time interval in response to determining that the corresponding data in the database has been updated.
[0020] In some embodiments, the above settlement request is generated through the following steps: obtaining a drug purchase settlement page; and generating a settlement request according to the drug purchase settlement page and preset claim settlement rules.
[0021] In a third aspect, an embodiment of the present disclosure provides a server, comprising: one or more processors; a storage device on which one or more programs are stored; when the one or more programs are executed by one or more processors, the one or more processors implement the method described in any implementation method in the first aspect.
[0022] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any implementation manner in the first aspect.
[0023] The method, device, server and medium for real-time settlement provided by the embodiments of the present disclosure can achieve a claim settlement only through cache operation by updating the data in the preset cache in real time and asynchronously saving the database, which is independent of the performance bottleneck of the database and greatly improves the performance and response time of the system. Moreover, by first sending a message queue delay message, a message queue compensation mechanism can be provided when the subsequent asynchronous database storage fails, thereby ensuring the final consistency of the data. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Other features, objects and advantages of the present disclosure will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0025] Figure 1 is an exemplary system architecture diagram in which an embodiment of the present disclosure may be applied;
[0026] Figure 2 is a flow chart of one embodiment of a method for real-time adjustment according to the present disclosure;
[0027] Figure 3 is a schematic diagram of an application scenario of a method for real-time settlement according to an embodiment of the present disclosure;
[0028] Figure 4 is a flow chart of yet another embodiment of a method for real-time adjustment according to the present disclosure;
[0029] Figure 5 is a structural schematic diagram of an embodiment of a device for real-time settlement according to the present disclosure;
[0030] Figure 6 It is a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure. DETAILED DESCRIPTION
[0031] The present disclosure is further described in detail below in conjunction with the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It is also necessary to explain that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.
[0032] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present disclosure may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0033] Figure 1 An exemplary architecture 100 is shown to which the method for real-time adjustment or the apparatus for real-time adjustment of the present disclosure can be applied.
[0034] like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0035] The terminal devices 101, 102, 103 interact with the server 105 via the network 104 to receive or send messages, etc. Various communication client applications may be installed on the terminal devices 101, 102, 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, insurance claims applications, etc.
[0036] Terminal devices 101, 102, 103 can be hardware or software. When terminal devices 101, 102, 103 are hardware, they can be various electronic devices with display screens and supporting human-computer interaction, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, etc. When terminal devices 101, 102, 103 are software, they can be installed in the electronic devices listed above. It can be implemented as multiple software or software modules (for example, software or software modules used to provide distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.
[0037] The server 105 may be a server that provides various services, such as a backend server that provides support for insurance claim applications on the terminal devices 101, 102, and 103. The backend server may analyze and process the received settlement request, and perform corresponding processing (such as updating the credit limit data) according to the request, and may also feed back the generated processing result (such as the updated credit limit data) to the terminal device.
[0038] It should be noted that the server can be hardware or software. When the server is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or it can be implemented as a single server. When the server is software, it can be implemented as multiple software or software modules (for example, software or software modules used to provide distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.
[0039] It should be noted that the method for real-time adjustment provided in the embodiments of the present disclosure is generally executed by the server 105 , and accordingly, the device for real-time adjustment is generally disposed in the server 105 .
[0040] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.
[0041] Continue to refer Figure 2 , shows a process 200 of an embodiment of a method for real-time adjustment according to the present disclosure. The method for real-time adjustment comprises the following steps:
[0042] Step 201: in response to receiving a settlement request, sending a message queue delay message corresponding to the settlement request.
[0043] In this embodiment, in response to receiving the adjustment request, the execution subject of the method for real-time adjustment (such as Figure 1 The server 105 shown in the figure can send a message queue delay message corresponding to the settlement request through a wired connection method or a wireless connection method. The settlement request can include the settlement amount. The message queue delay message corresponding to the settlement request can usually include data related to the settlement request that has not been stored in the database, such as claim case data, claim settlement amount change log flow data, etc.
[0044] In some optional implementations of this embodiment, the above adjustment request may be generated through the following steps:
[0045] The first step is to obtain the drug purchase settlement page.
[0046] In these implementations, the execution entity may first obtain a drug purchase settlement page, wherein the drug purchase settlement page may include the drug amount.
[0047] The second step is to generate a settlement request based on the drug purchase settlement page and the preset claims rules.
[0048] In these implementations, the execution entity may generate a settlement request based on the drug purchase settlement page obtained in the first step and the preset claim settlement rules, wherein the settlement request may include the amount of the drug amount that can be claimed.
[0049] Based on the above optional implementation methods, this solution can be applied to real-time settlement and payment of health insurance claims for drug purchase settlement, thereby meeting the timeliness requirements for drug purchase order settlement.
[0050] Step 202: in response to determining that the delayed message in the message queue has been sent, the amount data corresponding to the settlement request is updated from a preset cache.
[0051] In this embodiment, in response to determining that the delayed message in the message queue has been sent, the execution subject can update the amount data corresponding to the settlement request from the preset cache in various ways. As an example, the execution subject can deduct the cache amount in real time from the preset cache according to the settlement amount included in the settlement request.
[0052] In some optional implementations of this embodiment, the amount data in the above preset cache can be obtained by the following steps:
[0053] The first step is to obtain the policy ID and the claim content information corresponding to the policy ID.
[0054] In these implementations, the above-mentioned claim content information may include at least one of the following: claim amount, number of claims, and deductible amount.
[0055] The second step is to generate the current amount data based on the claim content information and the preset claim rules.
[0056] In these implementations, the current credit limit data is usually related to at least one of the following: periodic credit limit, claims adjuster information, and claims history.
[0057] Based on the above optional implementation methods, this solution enriches the generation method of the amount data in the cache, so that it can flexibly adapt to various claims rules and improve the universality of the solution.
[0058] Optionally, based on the above optional implementation, the above policy identifier and the claim content information corresponding to the above policy identifier are stored in a Map. The key stored in the above Map can be generated according to the policy period value and the insured person identifier corresponding to the above policy identifier. The value stored in the above Map can be generated according to the above claim content information.
[0059] As an example, the Map key can be the period value (month / year / quarter) + the insured's ID number. The Map value can be the remaining amount. For example, for a certain policy (policy number 100100100), a certain insured, and in May 2021, the upper limit of the claim amount is 5,000 yuan. If the insured's ID number is 123456, and no claim has occurred that month. Then the key of the Map of the claim amount in the cache content is 202105_123456, and the value is 5000. The same applies to other claim times and deductible amount Maps. Moreover, since the occurrence of claims is based on the insurance policy as the basic dimension, the policy identifier can be used as the key of the cache corresponding to the settlement request.
[0060] Based on the above optional implementation methods, this solution uses the Map method to maximize storage flexibility. Since the period value is determined by time, the amount of data will dynamically increase to a large level over time. If you use fields directly to manage, you need to generate fields for all periods at the beginning, which will generate a lot of fields. And since claims may not occur in every period, the claim amount data is usually sparse, so it is meaningless to maintain all these fields. Therefore, compared with hard-coding these fields, this solution uses Map storage to ensure flexibility and improve storage efficiency.
[0061] In some optional implementations of this embodiment, the execution entity may also send the updated amount data in the preset cache to the sending end corresponding to the settlement request.
[0062] Step 203: Update the corresponding data in the database corresponding to the preset cache according to the updated credit limit data.
[0063] In this embodiment, according to the updated credit limit data in step 202, the execution subject may update the corresponding data in the database corresponding to the preset cache in various ways. As an example, the execution subject may asynchronously store the data in the cache after the cache updates the data, thereby updating the corresponding data in the database corresponding to the preset cache.
[0064] In some optional implementations of this embodiment, according to the updated credit limit data, the execution subject may update the corresponding data in the database corresponding to the preset cache according to the following steps:
[0065] The first step is to select the data that has not been stored in the preset cache and store it in the database.
[0066] In these implementations, the execution subject may first select data that has not been stored in the database from the preset cache and store it in the database. As an example, the execution subject may select data from the preset cache, compare the selected data with corresponding data in the database in various ways (such as comparing timestamps or data powers), and determine whether the selected data is stored in the database.
[0067] In the second step, in response to determining that the storage is successful, the data of the successful storage is deleted from the preset cache.
[0068] In these implementations, in response to determining that the data in the first step is successfully stored in the database, the execution subject may delete the successfully stored data from the preset cache.
[0069] Based on the above optional implementation methods, this solution can asynchronously store data after updating the cache in real time, thereby improving the real-time response while ensuring data consistency as much as possible.
[0070] Optionally, based on the above optional implementation, the above execution subject may further continue to perform the following steps:
[0071] The third step is to obtain a message queue delay message corresponding to the data that failed to be dropped into the warehouse in response to determining that the data failed to be dropped into the warehouse.
[0072] In these implementations, in response to determining that the data has failed to be stored in the warehouse, the execution subject may obtain a message queue delay message corresponding to the data that failed to be stored in the first step.
[0073] The fourth step is to read the unstored data indicated by the message queue delay message corresponding to the data that failed to be stored in the storage from the preset cache.
[0074] In these implementations, the execution subject may read the unstored data indicated by the message queue delay message corresponding to the data that failed to be stored in the storage from the preset cache.
[0075] The fifth step is to write the read data that has not been stored in the database into the database corresponding to the above preset cache.
[0076] In these implementations, the execution entity may write the read data that has not been stored in the database into a database corresponding to the preset cache.
[0077] Based on the above optional implementation methods, this solution can re-store the data that failed to be asynchronously stored in the thread pool by setting a delayed message in the message queue, thereby ensuring the final consistency of the data.
[0078] In some optional implementations of this embodiment, the execution subject may also verify whether the corresponding data in the database is consistent with the updated amount data in the preset cache at a preset time interval in response to determining that the corresponding data in the database has been updated. The preset time interval may be, for example, one day. Thus, every 24 hours, the execution subject may trigger a timed calibration task to verify the cached amount of the insurance policy for which a claim was settled the previous day.
[0079] Based on the above optional implementation methods, this solution can perform timed calibration to determine whether the data in the cache and the database are consistent at preset time intervals, thereby ensuring data consistency.
[0080] Continue to see Figure 3 , Figure 3 FIG. 1 is a schematic diagram of an application scenario of a method for real-time settlement according to an embodiment of the present disclosure. Figure 3 In the application scenario, user 301 uses terminal device 302 to send a settlement request 304 representing a reimbursement of 50 yuan to server 303. Server 303 sends a corresponding delayed message 305 representing a reimbursement of 50 yuan to the message queue. In response to determining that the delayed message 305 has been sent, server 303 updates the credit limit data 306 corresponding to the above settlement request 304 from the preset cache, for example, changing the original credit limit of 1,000 yuan to 950 yuan. According to the updated credit limit data 306, server 303 also changes the credit limit data corresponding to the settlement request in the database corresponding to the above preset cache (as shown in 307 in the figure) to 950 yuan. Optionally, server 303 can also send the updated credit limit data to terminal device 302.
[0081] At present, one of the existing technologies is usually based on the user paying first, then reporting the case afterwards, manually reviewing the claim information, and then issuing the compensation amount. Because the existing technology is subject to the complex rules of settlement and the performance bottleneck of the database itself when calculating the claims, it often takes a certain amount of time to wait, resulting in the inability to meet the timeliness requirements of scenarios such as drug purchase settlement. The method provided by the above-mentioned embodiment of the present disclosure, by updating the data in the preset cache in real time and asynchronously saving the database, realizes that a claim can be completed only through cache operations, does not rely on the performance bottleneck of the database, and greatly improves the performance and response time of the system. Moreover, by first sending a message queue delay message, a message queue compensation mechanism can be provided when the subsequent asynchronous database storage fails to fall into the database, thereby ensuring the final consistency of the data.
[0082] Further references Figure 4 , which shows a process 400 of another embodiment of a method for real-time adjustment. The process 400 of the method for real-time adjustment includes the following steps:
[0083] Step 401: in response to receiving a settlement request, sending a message queue delay message corresponding to the settlement request.
[0084] Step 402, in response to determining that the delayed message in the message queue has been sent, the amount data corresponding to the settlement request is updated from the preset cache.
[0085] In some optional implementations of this embodiment, the amount data in the above preset cache can be obtained by the following steps:
[0086] The first step is to obtain the policy ID and the claim content information corresponding to the policy ID.
[0087] In these implementations, the above-mentioned claim content information may include at least one of the following: claim amount, number of claims, and deductible amount.
[0088] The second step is to generate the current amount data based on the claim content information and the preset claim rules.
[0089] In these implementations, the current credit limit data is usually related to at least one of the following: periodic credit limit, claims adjuster information, and claims history.
[0090] Based on the above optional implementation methods, this solution enriches the generation method of the amount data in the cache, so that it can flexibly adapt to various claims rules and improve the universality of the solution.
[0091] Step 403: Update the corresponding data in the database corresponding to the preset cache according to the updated quota data.
[0092] Step 404, in response to determining that the corresponding data in the database has been updated, triggering a check through the MySQL binlog log to see whether the corresponding data in the database is consistent with the updated quota data in the preset cache.
[0093] In this embodiment, in response to determining that the corresponding data in the database has been updated, the execution subject of the method for real-time adjustment (for example Figure 1 The server 105 shown can trigger a check through the MySQL binlog log to see whether the corresponding data in the database is consistent with the updated quota data in the preset cache.
[0094] The above steps 401 to 403 are respectively consistent with steps 201 to 203 and their optional implementations in the aforementioned embodiment. The above description of steps 201 to 203 and their optional implementations also applies to steps 401 to 403, which will not be repeated here.
[0095] from Figure 4 It can be seen that the process 400 of the method for real-time settlement in this embodiment reflects the step of triggering the verification of whether the corresponding data in the database is consistent with the updated amount data in the preset cache through the MySQL binlog log in response to determining that the corresponding data in the database has been updated. Therefore, the solution described in this embodiment can trigger the verification of whether the cached amount is correct through the MySQL binlog log after each asynchronous saving of the claims database, thereby ensuring data consistency.
[0096] Further references Figure 5 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a device for real-time calculation. Figure 2 or Figure 4 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0097] like Figure 5 As shown, the apparatus 500 for real-time settlement provided in this embodiment includes a sending unit 501, a cache updating unit 502 and a database updating unit 503. The sending unit 501 is configured to send a message queue delay message corresponding to the settlement request in response to receiving the settlement request, wherein the settlement request includes the settlement amount; the cache updating unit 502 is configured to update the amount data corresponding to the settlement request from the preset cache in response to determining that the message queue delay message has been sent; and the database updating unit 503 is configured to update the corresponding data in the database corresponding to the preset cache according to the updated amount data.
[0098] In the apparatus 500 for real-time settlement, the specific processing of the sending unit 501, the cache updating unit 502 and the database updating unit 503 and the technical effects thereof can be referred to in Figure 2 The relevant descriptions of step 201, step 202 and step 203 in the corresponding embodiment are not repeated here.
[0099] In some optional implementations of the present embodiment, the limit data in the above-mentioned preset cache can be obtained through the following steps: obtaining the policy identification and the claim content information corresponding to the policy identification, wherein the claim content information may include at least one of the following: claim amount, number of claims, and deductible amount; generating the current limit data according to the claim content information and preset claim rules, wherein the current limit data may be related to at least one of the following: periodic limit limit, claims personnel information, and claims history.
[0100] In some optional implementations of this embodiment, the above-mentioned policy identifier and the claim content information corresponding to the policy identifier can be stored in a Map, the key stored in the Map can be generated based on the policy period value and the insured person identifier corresponding to the policy identifier, and the value stored in the Map can be generated based on the claim content information.
[0101] In some optional implementations of this embodiment, the above-mentioned database update unit 503 can be further configured to: select data that has not been stored in the database from the preset cache for storage; in response to determining that the storage is successful, delete the data that has been successfully stored in the database from the preset cache.
[0102] In some optional implementations of this embodiment, the above-mentioned database update unit can be further configured to: in response to determining that the data has failed to be stored in the warehouse, obtain a message queue delay message corresponding to the data that failed to be stored in the warehouse; read the non-stored data indicated by the message queue delay message corresponding to the data that failed to be stored in the warehouse from the preset cache; and write the read non-stored data into the database corresponding to the preset cache.
[0103] In some optional implementations of this embodiment, the device 500 for real-time settlement may also include: a single verification unit, which is configured to trigger a verification of whether the corresponding data in the database is consistent with the updated amount data in the preset cache through the MySQL binlog log in response to determining that the corresponding data in the database has been updated.
[0104] In some optional implementations of this embodiment, the device 500 for real-time settlement may also include: a timing verification unit, configured to verify whether the corresponding data in the database is consistent with the updated amount data in the preset cache at a preset time interval in response to determining that the corresponding data in the database has been updated.
[0105] In some optional implementations of this embodiment, the above settlement request can be generated through the following steps: obtaining a drug purchase settlement page; and generating a settlement request according to the drug purchase settlement page and the above preset claim settlement rules.
[0106] The device provided by the above-mentioned embodiment of the present disclosure uses the cache update unit 502 to update the data in the preset cache in real time and the database update unit 503 to asynchronously save the database, so that a claim can be completed only through cache operations, without relying on the performance bottleneck of the database, greatly improving the performance and response time of the system. In addition, the sending unit 501 first sends a message queue delay message, and a message queue compensation mechanism can be provided when the subsequent asynchronous database storage fails, thereby ensuring the final consistency of the data.
[0107] Reference below Figure 6 , which shows an electronic device (eg Figure 1 The terminal device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The server shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0108] like Figure 6 As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0109] Typically, the following devices may be connected to the I / O interface 605: input devices 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 608 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 6 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 6 Each block shown in the figure may represent one device, or may represent multiple devices as required.
[0110] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 609, or installed from the storage device 608, or installed from the ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present application are executed.
[0111] It should be noted that the computer-readable medium described in the embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the embodiments of the present disclosure, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device. In the embodiments of the present disclosure, the computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0112] The computer-readable medium may be included in the server; or it may exist independently without being installed in the server. The computer-readable medium carries one or more programs. When the one or more programs are executed by the server, the server: in response to receiving a settlement request, sends a message queue delay message corresponding to the settlement request, wherein the settlement request includes the settlement amount; in response to determining that the message queue delay message has been sent, updates the amount data corresponding to the settlement request from the preset cache; and updates the corresponding data in the database corresponding to the preset cache according to the updated amount data.
[0113] Computer program code for performing the operations of the embodiments of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C", Python, or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0114] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0115] The units involved in the embodiments described in the present disclosure may be implemented by software or by hardware. The units described may also be set in a processor, for example, may be described as: a processor comprising a sending unit, a cache update unit, and a database update unit. The names of these units do not constitute limitations on the units themselves in certain circumstances. For example, the sending unit may also be described as "a unit that sends a message queue delay message corresponding to a settlement request in response to receiving the settlement request, wherein the settlement request includes the settlement amount".
[0116] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) to form a technical solution.
Claims
1. A method for real-time adjustment, comprising: In response to receiving a settlement request, sending a message queue delay message corresponding to the settlement request, wherein the settlement request includes a settlement amount; In response to determining that the delayed message in the message queue has been sent, updating the amount data corresponding to the settlement request from a preset cache; According to the updated quota data, the corresponding data in the database corresponding to the preset cache is updated, including: selecting the data that has not been stored in the warehouse from the preset cache for storage; in response to determining that the storage has failed, obtaining the message queue delay message corresponding to the data that failed to be stored; reading the data that has not been stored in the warehouse indicated by the message queue delay message corresponding to the data that failed to be stored from the preset cache; and writing the read data that has not been stored in the warehouse into the database corresponding to the preset cache.
2. The method according to claim 1, wherein: The credit data in the preset cache is obtained by the following steps: Acquire an insurance policy identifier and claim content information corresponding to the insurance policy identifier, wherein the claim content information includes at least one of the following: claim amount, number of claims, and deductible amount; The current limit data is generated according to the claim content information and the preset claim rules, wherein the current limit data is related to at least one of the following: periodic limit limit, claim personnel information, and claim history.
3. The method according to claim 2, wherein: The policy identifier and the claim content information corresponding to the policy identifier are stored in a Map, the key stored in the Map is generated according to the policy period value and the insured person identifier corresponding to the policy identifier, and the value stored in the Map is generated according to the claim content information.
4. The method according to claim 1, wherein: The updating of corresponding data in the database corresponding to the preset cache according to the updated quota data also includes: In response to determining that the storage is successful, the data of the successful storage is deleted from the preset cache.
5. The method according to claim 1, wherein: The method further comprises: In response to determining that the corresponding data in the database has been updated, a check is triggered through the MySQL binlog log to see whether the corresponding data in the database is consistent with the updated quota data in the preset cache.
6. The method according to claim 1, wherein: The method further comprises: In response to determining that the corresponding data in the database has been updated, checking whether the corresponding data in the database is consistent with the updated quota data in the preset cache at a preset time interval.
7. The method according to any one of claims 1 to 6, wherein: The adjustment request is generated by the following steps: Get the drug purchase settlement page; A settlement request is generated according to the drug purchase settlement page and the preset claim settlement rules.
8. A device for real-time adjustment, comprising: a sending unit, configured to send a message queue delay message corresponding to the settlement request in response to receiving the settlement request, wherein the settlement request includes a settlement amount; a cache updating unit, configured to update the amount data corresponding to the adjustment request from a preset cache in response to determining that the delayed message in the message queue has been sent; The database update unit is configured to update the corresponding data in the database corresponding to the preset cache according to the updated quota data, including: selecting the data that has not been stored in the warehouse from the preset cache for storage; in response to determining that the storage has failed, obtaining the message queue delay message corresponding to the data that failed to be stored; reading the data that has not been stored in the warehouse indicated by the message queue delay message corresponding to the data that failed to be stored from the preset cache; and writing the read data that has not been stored in the warehouse into the database corresponding to the preset cache.
9. A server, comprising: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
10. A computer readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Transaction clearing method and device
CN109492016A
Data synchronization system and method
CN112615907A