Query optimization methods, apparatus, computer equipment and storage media

By synchronizing blacklist data in insurance operations and building a cache cluster, the problems of data synchronization delay and inconsistency between the risk control platform and the underwriting system were solved, achieving accurate risk verification and resource conservation.

CN117076493BActive Publication Date: 2026-05-26CHINA PING AN PROPERTY INSURANCE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA PING AN PROPERTY INSURANCE CO LTD
Filing Date
2023-09-12
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

In insurance operations, there are delays and inconsistencies in the synchronization of blacklist data between the risk control platform and the underwriting system, leading to errors in risk verification.

Method used

By synchronizing blacklist data in the database of the risk control platform, building a cache cluster, setting up calling interfaces to the underwriting system, and updating the cache cluster regularly, data consistency is ensured.

Benefits of technology

It enables timely blacklist data queries, avoids data inconsistencies between the risk control platform and the underwriting system, ensures the accuracy of risk verification, and saves storage resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117076493B_ABST
    Figure CN117076493B_ABST
Patent Text Reader

Abstract

This application belongs to the fields of computer technology and financial technology, and relates to a query optimization method, including: obtaining blacklist data corresponding to an insured object, and synchronously storing the blacklist data in the database of a risk control platform; constructing a cache cluster corresponding to the blacklist data based on the database, and adding the calling interface corresponding to the cache cluster to the underwriting system; updating the cache cluster periodically according to a preset update process to obtain the updated current cache cluster; when a query request carrying input parameters is received from the underwriting system through the calling interface, querying target data in the current cache cluster according to the input parameters, and returning the target data to the underwriting system. This application also provides a query optimization device, computer equipment, and storage medium. This application ensures that no errors occur when performing risk verification on the blacklist of insured objects in insurance business.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of computer technology and financial technology, and is applied to scenarios where database queries are required in insurance-related businesses. In particular, it relates to a query optimization method, apparatus, computer equipment, and storage medium. Background Technology

[0002] As an industry closely integrated with fintech, the insurance sector involves a series of risk checks during the policy underwriting process. When a customer applies for insurance, the underwriting system performs checks such as verifying whether the customer is on a blacklist and whether the insured object meets regulations. Only policies that pass these checks are underwritten. Generally, a risk control platform is set up outside the underwriting system. After receiving a customer's policy, the underwriting system can call an interface in real time to transmit relevant application information to the risk control platform. The risk control platform then queries its database based on the received information, obtains the verification results, and returns them to the underwriting system. The underwriting system then decides whether to proceed to the next step based on the verification results.

[0003] Currently, to verify whether the insured object in the insurance application information is on the blacklist, the risk control platform uses an AI model to process the blacklist data corresponding to the insured object according to specific rules and adds it to its own database. Then, it synchronizes the blacklist data to the underwriting system's database through a message queue. In addition, if the blacklist data in the risk control platform's database is updated, the risk control platform will also update the underwriting system's database accordingly through the message queue.

[0004] However, transmitting blacklist data corresponding to insured objects through message queues has a certain delay. If there are data updates, it may be impossible to synchronize in a timely manner. Furthermore, if there are problems with the message queue, it can easily cause inconsistencies between the two ends, leading to errors in the risk verification of insurance information. Summary of the Invention

[0005] The purpose of this application is to provide a query optimization method, apparatus, computer equipment, and storage medium to solve the technical problem that errors are prone to occur when performing risk verification on the blacklist of insured objects in insurance business.

[0006] To address the aforementioned technical problems, this application provides a query optimization method, employing the following technical solution:

[0007] Obtain the blacklist data corresponding to the insured object, and synchronously store the blacklist data in the database of the risk control platform;

[0008] Based on the database, construct a cache cluster corresponding to the blacklist data, and add the calling interface corresponding to the cache cluster to the underwriting system;

[0009] According to the preset update process, the cache cluster is updated periodically to obtain the updated current cache cluster;

[0010] When a query request carrying input parameters is received from the underwriting system through the calling interface, the target data is queried in the current cache cluster according to the input parameters, and the target data is returned to the underwriting system.

[0011] Furthermore, the step of periodically updating the cache cluster according to a preset update process to obtain the updated current cache cluster specifically includes:

[0012] Set up scheduled tasks based on preset time periods;

[0013] At each of the aforementioned time intervals, a preset algorithm is executed according to the scheduled task to retrieve updated data corresponding to the blacklist data from the database.

[0014] The updated data is flushed to the cache cluster to obtain the current cache cluster.

[0015] Furthermore, the step of retrieving updated data corresponding to the blacklist data from the database by running a preset algorithm according to the scheduled task at each time interval specifically includes:

[0016] Determine the current date A and the day before the current date B, and set the cycle count to 10;

[0017] Based on A and B, query the database for the amount of data corresponding to the updated data;

[0018] If the loop count is greater than or equal to 1 and the data volume is less than 1, then A, B and the loop count are decremented by 1, and the process returns to the step of querying the database for the data volume corresponding to the updated data based on A and B.

[0019] If the amount of data is greater than or equal to 1, then the data retrieved will be used as the updated data.

[0020] Furthermore, after the step of querying the database for the amount of data corresponding to the updated data based on A and B, the method further includes:

[0021] If the loop count is less than 1 and the data volume is less than 1, an alarm email is generated.

[0022] The alarm email will be sent to the administrator's corresponding client.

[0023] Furthermore, the step of querying the database for the amount of data corresponding to the updated data based on A and B specifically includes:

[0024] Based on the database, obtain the first batch of data corresponding to the blacklist data for day A, and obtain the second batch of data corresponding to the blacklist data for day B;

[0025] Determine whether the first batch of data is updated compared to the second batch of data;

[0026] If the first batch of data is updated compared to the second batch of data, then the data volume is determined to be greater than or equal to 1.

[0027] If the first batch of data is not updated compared to the second batch of data, then the data volume is determined to be less than 1.

[0028] Furthermore, after the step of determining whether the first batch of data is updated compared to the second batch of data, the method further includes:

[0029] If the first batch of data is updated compared to the second batch of data, then the first batch of data is backed up to obtain the second batch of data corresponding to the blacklist data of day A.

[0030] Furthermore, after the steps of obtaining the blacklist data corresponding to the insured object and synchronously storing the blacklist data in the database of the risk control platform, the method further includes:

[0031] The blacklist data is backed up to obtain the first batch of data and the second batch of data corresponding to the blacklist data;

[0032] When an update instruction carrying update information is received, the first batch of data is updated according to the update information.

[0033] To address the aforementioned technical problems, this application also provides a query optimization device, which employs the following technical solution:

[0034] A query optimization apparatus, comprising:

[0035] The acquisition module is used to acquire blacklist data corresponding to the insured object and synchronously store the blacklist data in the database of the risk control platform.

[0036] The construction module is used to construct a cache cluster corresponding to the blacklist data based on the database, and add the call interface corresponding to the cache cluster to the underwriting system;

[0037] The update module is used to update the cache cluster periodically according to a preset update process to obtain the updated current cache cluster.

[0038] The query module is used to query target data in the current cache cluster according to the input parameters when a query request carrying input parameters is received from the underwriting system through the calling interface, and return the target data to the underwriting system.

[0039] To address the aforementioned technical problems, this application also provides a computer device that employs the following technical solution:

[0040] A computer device includes a memory and a processor, the memory storing computer-readable instructions, the processor executing the computer-readable instructions to implement the steps of the query optimization method as described above.

[0041] To address the aforementioned technical problems, this application also provides a computer-readable storage medium, employing the technical solution described below:

[0042] A computer-readable storage medium storing computer-readable instructions that, when executed by a processor, implement the steps of the query optimization method described above.

[0043] Compared with the prior art, the embodiments of this application have the following main advantages:

[0044] The query optimization method disclosed in this application involves obtaining blacklist data corresponding to the insured object and synchronously storing the blacklist data in the database of the risk control platform. Then, based on the database, a cache cluster corresponding to the blacklist data is constructed, and the corresponding calling interface of the cache cluster is added to the underwriting system. Subsequently, according to a preset update process, the cache cluster is updated periodically to obtain the updated current cache cluster. When a query request carrying input parameters is received from the underwriting system through the calling interface, the target data is queried in the current cache cluster according to the input parameters, and the target data is returned to the underwriting system. This application optimizes the query for blacklist data corresponding to the insured object through a cache cluster that can be updated in a timely manner, avoiding inconsistencies between the risk control platform and the underwriting system, thereby ensuring that risk verification of insurance information is error-free and saving storage resources. Attached Figure Description

[0045] To more clearly illustrate the solutions in this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0046] Figure 1 This is an exemplary system architecture diagram to which this application can be applied;

[0047] Figure 2 This is a flowchart of an embodiment of the query optimization method according to this application;

[0048] Figure 3 This is a schematic diagram of the structure of one embodiment of the query optimization apparatus according to this application;

[0049] Figure 4 yes Figure 3 The diagram shows a structural schematic of one specific embodiment of the update module.

[0050] Figure 5 This is a schematic diagram of the structure of one embodiment of the computer device according to this application. Detailed Implementation

[0051] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein in the specification of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "comprising" and "having," and any variations thereof, in the specification, claims, and foregoing drawings of this application, are intended to cover non-exclusive inclusion. The terms "first," "second," etc., in the specification, claims, or foregoing drawings of this application are used to distinguish different objects, not to describe a particular order.

[0052] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0053] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.

[0054] like Figure 1As shown, system architecture 100 may include terminal devices 101, 102, and 103, a network 104, and a server 105. Network 104 serves as the medium for providing communication links between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.

[0055] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social media platform software, etc.

[0056] Terminal devices 101, 102, and 103 can be various electronic devices with displays and web browsing capabilities, including but not limited to smartphones, tablets, e-book readers, MP3 (Moving Picture Experts Group Audio Layer III) players, MP4 (Moving Picture Experts Group Audio Layer IV) players, laptops, and desktop computers, etc.

[0057] Server 105 can be a server that provides various services, such as a backend server that supports the pages displayed on terminal devices 101, 102, and 103.

[0058] It should be noted that the query optimization method provided in this application embodiment is generally executed by the server, and correspondingly, the query optimization device is generally set in the server.

[0059] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0060] Continue to refer to Figure 2 The diagram illustrates a flowchart of an embodiment of the query optimization method according to this application. The query optimization method includes the following steps:

[0061] Step S201: Obtain the blacklist data corresponding to the insured object and synchronously store the blacklist data in the database of the risk control platform;

[0062] In this embodiment, the query optimization method runs on an electronic device (e.g., Figure 1The server shown can transmit data via wired or wireless connection. It should be noted that the aforementioned wireless connection methods may include, but are not limited to, 3G / 4G / 5G connections, WiFi connections, Bluetooth connections, WiMAX connections, Zigbee connections, UWB (ultrawideband) connections, and other currently known or future known wireless connection methods.

[0063] In this embodiment, to optimize the query of blacklist data corresponding to the insured object when performing risk verification on insurance information, it is first necessary to obtain the blacklist data corresponding to the insured object and synchronously store the blacklist data in the database of the risk control platform. Specifically, the risk control platform can first use an AI model to process the blacklist data corresponding to the insured object according to specific rules, and then synchronously store the blacklist data in its own database. Compared with the traditional method of synchronizing blacklist data to the risk control platform and the underwriting system through a message queue, this embodiment directly adopts a data synchronization method, and no longer needs to use the database of the underwriting system, which can save storage resources.

[0064] Optionally, this embodiment can use Sqoop for data synchronization. Sqoop is a tool for batch data migration between structured data and Hadoop. The structured data can be RDBMS such as MySQL and Oracle. Sqoop uses MapReduce programs to implement extraction, transformation, and loading at the underlying level. The inherent characteristics of MapReduce ensure parallelism and high fault tolerance, which improves performance during data synchronization.

[0065] Step S202: Based on the database, construct a cache cluster corresponding to the blacklist data, and add the calling interface corresponding to the cache cluster to the underwriting system.

[0066] In this embodiment, after the blacklist data corresponding to the insured object is synchronously stored in the database of the risk control platform, a cache cluster corresponding to the blacklist data can be constructed based on the database, and the calling interface corresponding to the cache cluster can be added to the underwriting system. Specifically, to avoid data asynchrony between the risk control platform and the underwriting system, a calling interface can be set up so that the underwriting system can directly query the blacklist data corresponding to the insured object through the calling interface, without having to use the traditional method of synchronizing data to the underwriting system's database through a message queue. In addition, to address the potential slowness of cross-system queries, a cache cluster corresponding to the blacklist data is constructed so that the blacklist data corresponding to the insured object is cached in the cache cluster, and the underwriting system can query the data in the cache cluster through the calling interface. When the blacklist data in the database changes subsequently, the changed data can also be refreshed to the cache cluster.

[0067] It is important to emphasize that, in order to reduce costs and increase efficiency, this embodiment utilizes a caching cluster to optimize queries. Because caching clusters have strong concurrency capabilities and high read / write performance, they can solve the problems of high pressure on the database and high costs associated with high-concurrency queries.

[0068] Step S203: According to the preset update process, the cache cluster is updated periodically to obtain the updated current cache cluster;

[0069] In this embodiment, after constructing the cache cluster corresponding to the blacklist data and adding its corresponding API to the underwriting system, the cache cluster needs to be updated periodically according to a preset update process to obtain the updated current cache cluster. Specifically, after constructing the cache cluster corresponding to the blacklist data and adding its corresponding API to the underwriting system, the underwriting system can send a request to the cache cluster through the API to query the cached blacklist data. However, to avoid potential data invalidation issues in the cache cluster, a preset update process needs to be executed to update the cache cluster periodically. For example, a time period is preset, and a scheduled task (taskJob) is set according to this preset time period. Then, every preset time period, a preset algorithm is run according to the scheduled task to obtain the updated data corresponding to the blacklist dataset from the risk control platform's database and refresh the updated data to the cache cluster. The cache cluster after each update is used as the current cache cluster.

[0070] Step S204: When a query request carrying input parameters is received from the underwriting system through the calling interface, the target data is queried in the current cache cluster according to the input parameters, and the target data is returned to the underwriting system.

[0071] In this embodiment, after the cache cluster has enabled a preset update process and uses the updated cache cluster as the current cache cluster, when a query request carrying input parameters is received from the underwriting system via the API, the target data can be queried in the current cache cluster based on the input parameters, and the target data is returned to the underwriting system. Specifically, since the API corresponding to the cache cluster has been added to the underwriting system, when the underwriting system needs to query the blacklist data corresponding to the insured object, it can send a query request carrying input parameters to the cache cluster via the API. In response to the query request, the server running the query optimization method can perform a query in the cache cluster based on the input parameters, use the queried data as the target data required by the underwriting system, and finally return the target data to the underwriting system, completing a query for blacklist data corresponding to the insured object.

[0072] This application optimizes the query of blacklist data corresponding to insured objects by using a cache cluster that can be updated in a timely manner, avoiding the problem of data inconsistency between the risk control platform and the underwriting system, thereby ensuring that the risk verification of insurance information is error-free and saving storage resources.

[0073] In some optional implementations of this embodiment, the step of periodically updating the cache cluster according to a preset update process to obtain the updated current cache cluster includes:

[0074] Set up scheduled tasks based on preset time periods;

[0075] At each of the aforementioned time intervals, a preset algorithm is executed according to the scheduled task to retrieve updated data corresponding to the blacklist data from the database.

[0076] The updated data is flushed to the cache cluster to obtain the current cache cluster.

[0077] In this embodiment, after constructing a cache cluster corresponding to the blacklist data and adding its corresponding calling interface to the underwriting system, a scheduled task can be set according to a preset time period. This allows a preset algorithm to be run every preset time period to retrieve updated data corresponding to the blacklist data from the risk control platform's database. Specifically, if the cache cluster is only used to store the blacklist data for the underwriting system to query without updating it, the data may become invalid. Therefore, it is necessary to update the cache cluster periodically according to the preset time period. Furthermore, to ensure that the data stored in the cache cluster is error-free, each update requires applying a preset algorithm to retrieve the updated data, and then using a data refresh program to refresh the updated data to the cache cluster, thus obtaining the current cache cluster.

[0078] This application avoids the problem of data invalidation that may occur in the cache cluster by updating the cache cluster on a regular basis. Thus, the query optimization can be achieved by using the regularly updated cache cluster to ensure that no errors occur in the risk verification of insurance information.

[0079] In some optional implementations of this embodiment, the step of retrieving updated data corresponding to the blacklist data from the database by running a preset algorithm according to the scheduled task at each time interval includes:

[0080] Determine the current date A and the day before the current date B, and set the cycle count to 10;

[0081] Based on A and B, query the database for the amount of data corresponding to the updated data;

[0082] If the loop count is greater than or equal to 1 and the data volume is less than 1, then A, B and the loop count are decremented by 1, and the process returns to the step of querying the database for the data volume corresponding to the updated data based on A and B.

[0083] If the amount of data is greater than or equal to 1, then the data retrieved will be used as the updated data.

[0084] In this embodiment, during the periodic update of the cache cluster, a preset algorithm needs to be run according to the scheduled task at preset time intervals to retrieve the update data corresponding to the blacklist data from the database. For example, the preset time interval can be 24 hours, that is, the cache cluster is updated once a day. The process of running the preset algorithm can include: when the scheduled task is running, determining the current date A and the day before the current date B, and setting the loop count to 10, and then querying the database for the amount of data corresponding to the update data based on A and B. After each query, if the loop count is greater than or equal to 1 and the amount of data is less than 1, then A, B and the loop count are decremented by 1, and the process of querying the database for the amount of data corresponding to the update data based on A and B is repeated. If the amount of data is greater than or equal to 1, then the queried data is used as the update data. Understandably, a data volume greater than or equal to 1 indicates that the blacklist data in the database has been updated, while a data volume less than 1 indicates that the blacklist data in the database has not been updated. The loop counter represents the remaining number of queries in the current process. After querying once based on the current date A and the day before the current date B, if the data volume is less than 1 and the loop counter is greater than or equal to 1, then the current date A and the day before the current date B each need to be subtracted by one day, and the loop counter needs to be decremented by 1. This ensures that the query range for updated data corresponding to the blacklist data is the most recent 10 days. Furthermore, since the cache cluster needs to be updated daily, the updated data queried within two consecutive days may be the same. However, flushing the same data to the cache will not cause adverse effects and helps ensure that the data in the cache cluster does not become invalid.

[0085] This application utilizes a suitable preset algorithm to implement timed updates of the cache cluster, which improves the accuracy of the blacklist data cached in the cache cluster and avoids the problem of data invalidation, thereby ensuring that there are no errors in the risk verification of insurance information.

[0086] In some optional implementations of this embodiment, after the step of querying the database for the amount of data corresponding to the updated data based on A and B, the method further includes:

[0087] If the loop count is less than 1 and the data volume is less than 1, an alarm email is generated.

[0088] The alarm email will be sent to the administrator's corresponding client.

[0089] In this embodiment, in the aforementioned iterative step of querying the database based on the amount of data corresponding to the updated data according to A and B, when the loop count is less than 1 and the amount of data is less than 1, an alarm email needs to be generated and sent to the administrator's corresponding client. Specifically, in this iterative step, a loop count less than 1 means that 10 iterations have been performed. During these 10 queries, if there is a data amount greater than or equal to 1, the updated data can be obtained directly. If the data amount is still less than 1 after the 10 queries, it indicates that the blacklist data in the database has not been updated within 10 days. At this time, an alarm email needs to be generated and sent to the client to notify the administrator, ensuring timely maintenance of the cache cluster.

[0090] This application establishes an appropriate alarm mechanism to ensure that if the cache cluster is not updated during the scheduled update process, the administrator can be notified for manual maintenance. This avoids data invalidation issues in the cache cluster and ensures that the risk verification of insurance information is error-free.

[0091] In some optional implementations of this embodiment, the step of querying the database for the amount of data corresponding to the updated data based on A and B includes:

[0092] Based on the database, obtain the first batch of data corresponding to the blacklist data for day A, and obtain the second batch of data corresponding to the blacklist data for day B;

[0093] Determine whether the first batch of data is updated compared to the second batch of data;

[0094] If the first batch of data is updated compared to the second batch of data, then the data volume is determined to be greater than or equal to 1.

[0095] If the first batch of data is not updated compared to the second batch of data, then the data volume is determined to be less than 1.

[0096] In this embodiment, when querying the database for the amount of data corresponding to the updated data, the database can be used to obtain the first batch of data corresponding to the blacklist data of day A, and the second batch of data corresponding to the blacklist data of day B. Then, it can be determined whether the first batch of data is updated compared to the second batch of data. If the first batch of data is updated compared to the second batch of data, the amount of data is determined to be greater than or equal to 1; if the first batch of data is not updated compared to the second batch of data, the amount of data is determined to be less than 1. Specifically, since the blacklist data corresponding to the insured object is a variable, after it is synchronized to the database, it needs to be updated through the same data synchronization link. In order to avoid problems in the subsequent data synchronization link, the blacklist data can be stored in a "1+1" manner, that is, it is backed up, the backed-up data is stored separately as the second batch of data, and the original data is used as the first batch of data. When updating the blacklist data, the first batch of data can be updated simultaneously. Therefore, since B is the day before A, after obtaining the first batch of data of A and the second batch of data of B, they can be compared to determine whether there is an update in the first batch of data compared to the second batch of data. If there is an update, it can be determined that the data volume is greater than or equal to 1, and the first batch of data can be used as the updated data corresponding to the blacklist data. If there is no update, it can be determined that the data volume is less than 1.

[0097] This application determines whether there is updated data corresponding to blacklist data by comparing two batches of blacklist data from two consecutive days, thus ensuring the accuracy of the updated data queried during the periodic update of the cache cluster and ensuring that no errors occur when refreshing the data.

[0098] In some optional implementations of this embodiment, after the step of determining whether the first batch of data is updated compared to the second batch of data, the method further includes:

[0099] If the first batch of data is updated compared to the second batch of data, then the first batch of data is backed up to obtain the second batch of data corresponding to the blacklist data of day A.

[0100] In this embodiment, if it is determined that the first batch of data corresponding to the blacklist data for day A is updated compared to the second batch of data corresponding to the blacklist data for day B, then the first batch of data corresponding to the blacklist data for day A is backed up, and the backed-up data is used as the second batch of data corresponding to the blacklist data for day A. Specifically, after determining that the first batch of data corresponding to the blacklist data for day A is updated, it can be backed up and used as the second batch of data corresponding to the blacklist data for day A, so that it can be compared with the first batch of data corresponding to the blacklist data for the next day, ensuring the smooth progress of the update process of the cache cluster for the next day.

[0101] This application improves the timeliness and accuracy of blacklist data by updating two batches of blacklist data in the database in real time, ensuring that the scheduled update process of the cache cluster can proceed smoothly, while ensuring that no errors occur.

[0102] In some optional implementations of this embodiment, after the steps of obtaining the blacklist data corresponding to the insured object and synchronously storing the blacklist data in the database of the risk control platform, the method further includes:

[0103] The blacklist data is backed up to obtain the first batch of data and the second batch of data corresponding to the blacklist data;

[0104] When an update instruction carrying update information is received, the first batch of data is updated according to the update information.

[0105] In this embodiment, after the blacklist data is synchronously stored in the risk control platform's database, it needs to be backed up to obtain the first batch and second batch of data corresponding to the blacklist data. Then, when an update instruction carrying update information is received, the first batch of data is updated according to the update information. Specifically, after the blacklist data corresponding to the insured object is synchronized to the database, it also needs to be updated through the same data synchronization link. To avoid problems with the data synchronization link, a "1+1" method is used to store the blacklist data. It can be backed up, with the backed-up data stored separately as the second batch of data, and the original data as the first batch of data. When an update instruction is received, the first batch of data can be updated according to the update information carried by the update instruction. Even if it is uncertain whether the update is successful, the backed-up second batch of data is still retained, which can avoid the risk of problems in the data link.

[0106] This application backs up the blacklist data using a "1+1" method, ensuring the security of the blacklist data in the event of problems with the data synchronization link, and ensuring that the risk verification of insurance information is error-free.

[0107] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing related hardware with computer-readable instructions. These computer-readable instructions can be stored in a computer-readable storage medium. When executed, the program can include the processes of the embodiments of the above methods. The aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, optical disk, or read-only memory (ROM), or random access memory (RAM).

[0108] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.

[0109] Further reference Figure 3 As a response to the above Figure 2 To implement the method shown, this application provides an embodiment of a query optimization apparatus, which is similar to... Figure 2 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.

[0110] like Figure 4 As shown, the query optimization device 300 described in this embodiment includes: an acquisition module 301, a construction module 302, an update module 303, and a query module 304. Wherein:

[0111] The acquisition module 301 is used to acquire blacklist data corresponding to the insured object and synchronously store the blacklist data in the database of the risk control platform.

[0112] The construction module 302 is used to construct a cache cluster corresponding to the blacklist data based on the database, and add the call interface corresponding to the cache cluster to the underwriting system;

[0113] The update module 303 is used to update the cache cluster periodically according to a preset update process to obtain the updated current cache cluster.

[0114] The query module 304 is used to query target data in the current cache cluster according to the input parameters when it receives a query request with input parameters sent by the underwriting system through the calling interface, and return the target data to the underwriting system.

[0115] The query optimization device provided in this application optimizes queries for blacklist data corresponding to insured objects through a cache cluster that can be updated in a timely manner. This avoids inconsistencies between the risk control platform and the underwriting system, thereby ensuring that the risk verification of insurance information is error-free and saving storage resources.

[0116] In some optional implementations of this embodiment, see [reference]. Figure 4The update module 303 also includes:

[0117] Setting unit 3031 is used to set a timed task according to a preset time period;

[0118] Execution unit 3032 is used to run a preset algorithm according to the timed task at regular intervals to obtain updated data corresponding to the blacklist data from the database.

[0119] The data refresh unit 3033 is used to refresh the updated data to the cache cluster to obtain the current cache cluster.

[0120] The query optimization device provided in this application avoids the problem of data invalidation that may occur in the cache cluster by updating the cache cluster periodically. Thus, the query optimization can be achieved by using the periodically updated cache cluster to ensure that no errors occur in the risk verification of insurance information.

[0121] In some optional implementations of this embodiment, the execution unit 3032 is further configured to:

[0122] Determine the current date A and the day before the current date B, and set the cycle count to 10;

[0123] Based on A and B, query the database for the amount of data corresponding to the updated data;

[0124] If the loop count is greater than or equal to 1 and the data volume is less than 1, then A, B and the loop count are decremented by 1, and the process returns to the step of querying the database for the data volume corresponding to the updated data based on A and B.

[0125] If the amount of data is greater than or equal to 1, then the data retrieved will be used as the updated data.

[0126] The query optimization device provided in this application utilizes a suitable preset algorithm to realize the timed update of the cache cluster, which improves the accuracy of the blacklist data cached in the cache cluster and avoids the problem of data invalidation, thereby ensuring that there are no errors in the risk verification of insurance information.

[0127] In some optional implementations of this embodiment, the execution unit 3032 is further configured to:

[0128] If the loop count is less than 1 and the data volume is less than 1, an alarm email is generated.

[0129] The alarm email will be sent to the administrator's corresponding client.

[0130] The query optimization device provided in this application, by setting an appropriate alarm mechanism, ensures that the cache cluster is not updated during the periodic update process, and can notify the administrator for manual maintenance, thereby avoiding data invalidation of the cache cluster and ensuring that the risk verification of insurance information is error-free.

[0131] In some optional implementations of this embodiment, the execution unit 3032 is further configured to:

[0132] Based on the database, obtain the first batch of data corresponding to the blacklist data for day A, and obtain the second batch of data corresponding to the blacklist data for day B;

[0133] Determine whether the first batch of data is updated compared to the second batch of data;

[0134] If the first batch of data is updated compared to the second batch of data, then the data volume is determined to be greater than or equal to 1.

[0135] If the first batch of data is not updated compared to the second batch of data, then the data volume is determined to be less than 1.

[0136] The query optimization device provided in this application determines whether there is updated data corresponding to the blacklist data by comparing two batches of blacklist data from two adjacent days, thus ensuring the accuracy of the updated data queried during the periodic update of the cache cluster and ensuring that no errors occur when refreshing the data.

[0137] In some optional implementations of this embodiment, the execution unit 3032 is further configured to:

[0138] If the first batch of data is updated compared to the second batch of data, then the first batch of data is backed up to obtain the second batch of data corresponding to the blacklist data of day A.

[0139] The query optimization device provided in this application improves the timeliness and accuracy of blacklist data by updating two batches of blacklist data in the database in real time, ensuring that the scheduled update process of the cache cluster can proceed smoothly, while ensuring that no errors occur.

[0140] In some optional implementations of this embodiment, the query optimization device 300 is further used for:

[0141] The blacklist data is backed up to obtain the first batch of data and the second batch of data corresponding to the blacklist data;

[0142] When an update instruction carrying update information is received, the first batch of data is updated according to the update information.

[0143] The query optimization device provided in this application backs up the blacklist data in a "1+1" manner, which ensures the security of the blacklist data when the data synchronization link fails, and ensures that the risk verification of insurance information does not produce errors.

[0144] To address the aforementioned technical problems, embodiments of this application also provide a computer device. Please refer to [link / reference needed]. Figure 5 , Figure 5 This is a basic structural block diagram of the computer device in this embodiment.

[0145] The computer device 5 includes a memory 51, a processor 52, and a network interface 53 that are interconnected via a system bus. It should be noted that only the computer device 5 with components 51-53 is shown in the figure; however, it should be understood that it is not required to implement all the shown components, and more or fewer components can be implemented alternatively. Those skilled in the art will understand that the computer device described here is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.

[0146] The computer device can be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer device can interact with the user via a keyboard, mouse, remote control, touchpad, or voice control.

[0147] The memory 51 includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 51 may be an internal storage unit of the computer device 5, such as the hard disk or memory of the computer device 5. In other embodiments, the memory 51 may also be an external storage device of the computer device 5, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device 5. Of course, the memory 51 may include both the internal storage unit and its external storage device of the computer device 5. In this embodiment, the memory 51 is typically used to store the operating system and various application software installed on the computer device 5, such as computer-readable instructions for query optimization methods. In addition, the memory 51 can also be used to temporarily store various types of data that have been output or will be output.

[0148] In some embodiments, the processor 52 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip. The processor 52 is typically used to control the overall operation of the computer device 5. In this embodiment, the processor 52 is used to execute computer-readable instructions stored in the memory 51 or to process data, such as executing computer-readable instructions for the query optimization method.

[0149] The network interface 53 may include a wireless network interface or a wired network interface, which is typically used to establish communication connections between the computer device 5 and other electronic devices.

[0150] The computer equipment provided in this application optimizes the query of blacklist data corresponding to the insured object through a cache cluster that can be updated in a timely manner, avoiding the problem of data inconsistency between the risk control platform and the underwriting system, thereby ensuring that the risk verification of insurance information is error-free and saving storage resources.

[0151] This application also provides another embodiment, namely, providing a computer-readable storage medium storing computer-readable instructions that can be executed by at least one processor to cause the at least one processor to perform the steps of the query optimization method described above.

[0152] The computer-readable storage medium provided in this application optimizes the query of blacklist data corresponding to the insured object through a cache cluster that can be updated in a timely manner. This avoids the problem of data inconsistency between the risk control platform and the underwriting system, thereby ensuring that the risk verification of insurance information is error-free and saving storage resources.

[0153] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0154] Obviously, the embodiments described above are only some embodiments of this application, not all embodiments. The accompanying drawings show preferred embodiments of this application, but do not limit the patent scope of this application. This application can be implemented in many different forms; rather, the purpose of providing these embodiments is to provide a more thorough and comprehensive understanding of the disclosure of this application. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing specific embodiments, or make equivalent substitutions for some of the technical features. Any equivalent structures made using the content of this application's specification and drawings, directly or indirectly applied to other related technical fields, are similarly within the scope of patent protection of this application.

Claims

1. A query optimization method, characterized in that, Includes the following steps: Obtain the blacklist data corresponding to the insured object, and synchronously store the blacklist data in the database of the risk control platform; Based on the database, construct a cache cluster corresponding to the blacklist data, and add the calling interface corresponding to the cache cluster to the underwriting system; According to the preset update process, the cache cluster is updated periodically to obtain the updated current cache cluster; When a query request carrying input parameters is received from the underwriting system through the calling interface, the target data is queried in the current cache cluster according to the input parameters, and the target data is returned to the underwriting system. The step of periodically updating the cache cluster according to a preset update process to obtain the updated current cache cluster specifically includes: Set up scheduled tasks based on preset time periods; At each of the aforementioned time intervals, a preset algorithm is executed according to the scheduled task to retrieve updated data corresponding to the blacklist data from the database. The updated data is flushed to the cache cluster to obtain the current cache cluster; The step of retrieving updated data corresponding to the blacklist data from the database by running a preset algorithm according to the scheduled task at each time interval specifically includes: Determine the current date A and the day before the current date B, and set the cycle count to 10; Based on A and B, query the database for the amount of data corresponding to the updated data; If the loop count is greater than or equal to 1 and the data volume is less than 1, then A, B and the loop count are decremented by 1, and the process returns to the step of querying the database for the data volume corresponding to the updated data based on A and B. If the amount of data is greater than or equal to 1, then the data retrieved will be used as the updated data; The step of querying the database for the amount of data corresponding to the updated data based on A and B specifically includes: Based on the database, obtain the first batch of data corresponding to the blacklist data for day A, and obtain the second batch of data corresponding to the blacklist data for day B; Determine whether the first batch of data is updated compared to the second batch of data; If the first batch of data is updated compared to the second batch of data, then the data volume is determined to be greater than or equal to 1. If the first batch of data is not updated compared to the second batch of data, then the data volume is determined to be less than 1.

2. The query optimization method according to claim 1, characterized in that, After the step of querying the database for the amount of data corresponding to the updated data based on A and B, the method further includes: If the loop count is less than 1 and the data volume is less than 1, an alarm email is generated. The alarm email will be sent to the administrator's corresponding client.

3. The query optimization method according to claim 1, characterized in that, After the step of determining whether the first batch of data is updated compared to the second batch of data, the method further includes: If the first batch of data is updated compared to the second batch of data, then the first batch of data is backed up to obtain the second batch of data corresponding to the blacklist data of day A.

4. The query optimization method according to claim 1, characterized in that, After the steps of obtaining the blacklist data corresponding to the insured object and synchronously storing the blacklist data in the database of the risk control platform, the method further includes: The blacklist data is backed up to obtain the first batch of data and the second batch of data corresponding to the blacklist data; When an update instruction carrying update information is received, the first batch of data is updated according to the update information.

5. A query optimization device, characterized in that, include: The acquisition module is used to acquire blacklist data corresponding to the insured object and synchronously store the blacklist data in the database of the risk control platform. The construction module is used to construct a cache cluster corresponding to the blacklist data based on the database, and add the call interface corresponding to the cache cluster to the underwriting system; The update module is used to update the cache cluster periodically according to a preset update process to obtain the updated current cache cluster. The query module is used to query target data in the current cache cluster according to the input parameters when a query request carrying input parameters is received from the underwriting system through the calling interface, and return the target data to the underwriting system. The update module includes: a setting unit, an execution unit, and a data refresh unit, wherein: The setting unit is used to set a timed task according to a preset time period; The execution unit is used to run a preset algorithm according to the scheduled task at each time interval to obtain the updated data corresponding to the blacklist data from the database. The data refresh unit is used to refresh the updated data to the cache cluster to obtain the current cache cluster; The execution unit is further configured to determine the current date A and the day before the current date B, and set the loop count to 10; based on A and B, query the database for the amount of data corresponding to the updated data; if the loop count is greater than or equal to 1 and the amount of data is less than 1, then A, B, and the loop count are decremented by 1, and the execution returns to the step of querying the database for the amount of data corresponding to the updated data based on A and B; if the amount of data is greater than or equal to 1, then the queried data is used as the updated data; The execution unit is further configured to obtain, according to the database, the first batch of data corresponding to the blacklist data on day A, and the second batch of data corresponding to the blacklist data on day B; determine whether the first batch of data is updated compared to the second batch of data; if the first batch of data is updated compared to the second batch of data, then determine that the data volume is greater than or equal to 1; if the first batch of data is not updated compared to the second batch of data, then determine that the data volume is less than 1.

6. A computer device, characterized in that, The system includes a memory and a processor, wherein the memory stores computer-readable instructions, and the processor executes the computer-readable instructions to implement the steps of the query optimization method as described in any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the query optimization method as described in any one of claims 1 to 4.