Insurance policy service query method and device based on distributed engine, equipment and medium
By building a distributed query engine, the problem of fluctuating response time in insurance business queries of domestic distributed databases was solved, achieving efficient and flexible query processing and improving system performance and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-13
- Publication Date
- 2026-04-07
AI Technical Summary
Existing domestic distributed databases lack effective index coverage and query path optimization for specific business scenarios in insurance business queries, resulting in large fluctuations in response time for complex queries, especially performance degradation during peak periods, which affects user experience.
A distributed query engine is built. By acquiring policy business data and synchronously querying fields, query requests are parsed, key query conditions are determined, and the data is accurately routed to the distributed query engine. Parameters are assembled according to the query conditions to perform the query, supporting multi-dimensional parallel queries and index optimization.
It improves the response efficiency of insurance business inquiries, ensures the scalability and high availability of data, enhances the flexibility of the system and user satisfaction, and maintains high performance even under high load.
Smart Images

Figure CN121807936A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of data processing, and is suitable for the financial field, and in particular relates to a policy business query method, device and equipment based on a distributed engine and a medium. BACKGROUND
[0002] Under the background of promoting information technology application innovation and the Xinchuang strategy, realizing the independent controllability of core technology has become an important direction of information construction in various industries. In response to the requirements of the national strategy, enterprises are migrating core business systems to domestic technology stacks. Among them, as a key business module, the data storage layer of the insurance system has realized a comprehensive migration from traditional databases to domestic distributed databases. This transition not only meets the requirements of the Xinchuang ecological construction specification, but also significantly improves the independent controllability and security and reliability of the system.
[0003] However, with the continuous and rapid growth of insurance business volume, the system is facing increasingly severe performance challenges in actual operation. For example, in the financial vehicle insurance system, the vehicle insurance business data scale presents exponential growth, and the massive data poses extremely high requirements on storage and query performance. Secondly, the vehicle insurance business query scenarios are complex and diverse, and there are a large number of high-frequency query requirements based on institution and entry time combination conditions in the core business logic. Such queries often need to search data across multiple business dimensions. For example, when a user applies for a claim, he needs to quickly retrieve relevant policy information, accident records and historical claim data to achieve rapid processing. Although the domestic distributed database has good distributed architecture characteristics and high availability, in actual application, it is found that due to the lack of effective index coverage and query path optimization for specific business scenarios, the response time of complex queries fluctuates greatly, especially during the business peak period, the query performance decreases significantly, which directly affects the response speed of the front-end page and the user experience, and may also cause customer dissatisfaction with service quality.
[0004] Therefore, how to improve the response efficiency of insurance business query is a technical problem to be solved. SUMMARY
[0005] The present application provides a policy business query method, device, equipment and medium based on a distributed engine to solve the technical problem of how to improve the response efficiency of insurance business query.
[0006] In a first aspect, the present application provides a policy business query method based on a distributed engine, comprising: Obtaining policy business data, constructing a distributed query engine corresponding to the policy business data, and synchronizing query fields in the policy business data to the distributed query engine; receiving a query request of the insurance business, analyzing the query request, and judging whether the query request contains a predefined key query condition based on an analysis result; If the query request contains the key query condition, the query request is routed to the distributed query engine. In the distributed query engine, query parameters are assembled according to query conditions in the query request, and the insurance business data is queried based on the assembled query parameters.
[0007] In a second aspect, the present application provides an insurance business query device based on a distributed engine, comprising: Obtaining insurance business data, constructing a distributed query engine corresponding to the insurance business data, and synchronizing query fields in the insurance business data to the distributed query engine; receiving a query request of the insurance business, analyzing the query request, and judging whether the query request contains a predefined key query condition based on an analysis result; If the query request contains the key query condition, the query request is routed to the distributed query engine. In the distributed query engine, query parameters are assembled according to query conditions in the query request, and the insurance business data is queried based on the assembled query parameters.
[0008] In a third aspect, the present application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to realize the steps of the above-mentioned insurance business query method based on a distributed engine.
[0009] In a fourth aspect, the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to realize the steps of the above-mentioned insurance business query method based on a distributed engine.
[0010] The aforementioned policy business query method, apparatus, device, and medium based on a distributed engine, in which policy business data can be obtained through a client, a distributed query engine corresponding to the policy business data can be constructed, and the query fields in the policy business data can be synchronized to the distributed query engine; a query request for the policy business can be received, the query request can be parsed, and it can be determined whether the query request contains predefined key query conditions based on the parsing results; if the query request contains the key query conditions, the query request can be routed to the distributed query engine; in the distributed query engine, query parameters can be assembled according to the query conditions in the query request, and the policy business data can be queried based on the assembled query parameters. In this invention, by constructing a distributed query engine, a large amount of policy business data can be managed and processed more effectively, ensuring data scalability and high availability. Precisely routing query requests to the distributed query engine ensures that query requests can be processed quickly. Dynamically assembling query parameters according to query conditions allows the system to flexibly respond to different types of query requests, effectively improving the response efficiency of insurance business queries. Attached Figure Description
[0011] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 This is a schematic diagram of an application environment for a policy business query method based on a distributed engine, according to an embodiment of the present invention.
[0013] Figure 2 This is a flowchart illustrating a policy business query method based on a distributed engine in one embodiment of the present invention.
[0014] Figure 3 yes Figure 2 A schematic diagram of a specific implementation method for step S20.
[0015] Figure 4 yes Figure 2 A flowchart illustrating a specific implementation of step S30.
[0016] Figure 5 yes Figure 2 A schematic diagram of a specific implementation of step S40.
[0017] Figure 6 This is a schematic diagram of a policy business query device based on a distributed engine in one embodiment of the present invention.
[0018] Figure 7 This is a schematic diagram of the structure of a computer device according to an embodiment of the present invention.
[0019] Figure 8 This is another structural schematic diagram of a computer device according to one embodiment of the present invention. Detailed Implementation
[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0021] The policy business query method based on a distributed engine provided in this invention can be applied to, for example... Figure 1 In the application environment, Figure 1 This is a schematic diagram of an application environment for a policy business query method based on a distributed engine, according to an embodiment of the present invention. The client communicates with the server via a network. The server can obtain policy business data from the client, construct a distributed query engine corresponding to the policy business data, and synchronize the query fields in the policy business data to the distributed query engine. It receives policy business query requests, parses the query requests, and determines whether the query request contains predefined key query conditions based on the parsing results. If the query request contains the key query conditions, it routes the query request to the distributed query engine. In the distributed query engine, query parameters are assembled according to the query conditions in the query request, and the policy business data is queried based on the assembled query parameters. In this invention, by constructing a distributed query engine, a large amount of policy business data can be managed and processed more effectively, ensuring data scalability and high availability. Precisely routing query requests to the distributed query engine ensures that query requests can be processed quickly. Dynamically assembling query parameters according to query conditions allows the system to flexibly respond to different types of query requests, effectively improving the response efficiency of insurance business queries. The present invention will be described in detail below through specific embodiments.
[0022] Please see Figure 2 As shown, Figure 2 This is a flowchart illustrating a policy business query method based on a distributed engine provided in an embodiment of the present invention. The policy business query method based on a distributed engine specifically includes the following steps: S10: Obtain policy business data, construct a distributed query engine corresponding to the policy business data, and synchronize the query fields in the policy business data to the distributed query engine. In this embodiment of the invention, by obtaining policy business data and constructing a distributed query engine, large-scale insurance business data can be effectively integrated and managed to facilitate subsequent querying and analysis. The distributed query engine can process multiple query requests in parallel, significantly improving the query speed of insurance business and ensuring high performance even when faced with a large number of queries. Synchronizing the query fields to the distributed query engine ensures that the engine always uses the latest policy data, improving the accuracy and timeliness of the data. Specifically, this includes the following steps S11-S13: S11: In the distributed query engine, a target query index corresponding to the query fields in the policy business data is created, and the query fields in the policy business data are synchronized to the created target query index. Specifically, in this embodiment of the invention, by creating a target query index corresponding to the query fields, the data retrieval speed can be significantly accelerated. For example, in a financial auto insurance scenario, if a user needs to query the insurance records of a certain vehicle, the index can quickly locate the relevant information without having to traverse the entire database. The establishment of the target query index enables the system to support various complex queries, such as filtering customers according to different conditions, thereby improving the flexibility of the auto insurance business system.
[0023] S12: Monitor incremental data in the policy business data in real time and publish the incremental data to the message middleware in real time. Specifically, in this embodiment of the invention, real-time monitoring of changes in incremental data ensures that the data in the system is always updated. For example, in a car insurance scenario, when a customer updates their policy information, this real-time monitoring can be reflected in the system promptly, avoiding data lag. Publishing incremental data to the message middleware in real time enables the car insurance system to respond quickly to data changes. For example, when new customer insurance information is entered, follow-up can be carried out promptly.
[0024] S13: Consume incremental data from the message middleware in real time through the subscription service and write the incremental data into the target query index. Specifically, in this embodiment of the invention, by consuming incremental data in real time and writing it into the target query index, it can be ensured that users can obtain the latest data in real time when querying. For example, in the car insurance scenario, when a customer makes a claim, the relevant claim records can be updated immediately, ensuring that customer service personnel can quickly access the latest information.
[0025] S20: Receive a query request for policy business, parse the query request, and determine whether the query request contains predefined key query conditions based on the parsing results. In this embodiment of the invention, determining whether a query request contains key query conditions helps to quickly identify valid requests, reduce unnecessary waste of computing resources, and improve the overall efficiency of the system. It ensures that only query requests that meet specific conditions are processed, thereby speeding up response time and improving user satisfaction. Specifically, such as... Figure 3 The above, Figure 3 This is a flowchart illustrating a specific implementation of step S20, which specifically includes the following steps S21-S23: S21: The query request for the policy business is parsed to obtain the query field identifier and corresponding query value. Specifically, in this embodiment of the invention, by parsing the query request, the system can effectively extract the query field identifier and corresponding query value, transforming the user's natural language request into structured data. For example, when a customer inquires about the policy status of a certain vehicle, the system can automatically identify key information such as the policy number and the vehicle owner's name.
[0026] S22: Match the parsed query field identifier with the field identifiers in the predefined key query conditions, and verify the validity of the query value corresponding to the query field identifier. Specifically, in this embodiment of the invention, by matching the parsed query field identifier with the predefined key query conditions, the system can ensure that the user's query request conforms to the expected format and content, thereby improving the accuracy of the query. For example, if the query request requires a policy number, but the user enters a vehicle identification number, the system can promptly identify the error and provide feedback. Verifying the validity of the query value can avoid query failures or incorrect results due to invalid data. For example, in a car insurance scenario, if the user enters an invalid policy number, the system can promptly identify it and prompt the user to correct it.
[0027] S23: When the query field identifier contains all the field identifiers in the key query conditions, and the query value corresponding to the query field identifier passes the preset validity check, it is determined that the query request contains the key query conditions. Specifically, in this embodiment of the invention, by determining whether the query request contains key query conditions, valid query requests can be quickly identified and processed subsequently. For example, if the policy information queried by the user is complete and valid, the relevant policy status and claims information can be quickly returned, effectively improving response speed and user satisfaction.
[0028] S30: If the query request contains the key query conditions, the query request is routed to the distributed query engine. In this embodiment of the invention, by routing query requests that meet the conditions to the distributed query engine, the system can efficiently utilize computing resources and ensure that processing power is concentrated on query requests. Specifically, as shown... Figure 4 The above, Figure 4 This is a flowchart illustrating a specific implementation of step S30, which specifically includes the following steps S31-S33: S31: Determine the time range and query granularity of the target query index based on the time range and organizational hierarchy information in the query request. Specifically, in this embodiment of the invention, by analyzing the time range and organizational hierarchy information in the query request, the dataset to be queried can be precisely defined. For example, in a financial auto insurance scenario, if a user requests to view policy claims within a specific time period, the system can focus only on the data within that time period, improving query efficiency. Appropriately setting the query granularity can effectively reduce the amount of data queried, thereby improving query performance.
[0029] S32: Based on the time range and query granularity of the target query index, generate a corresponding routing identifier for the distributed query engine. Specifically, in this embodiment of the invention, generating a routing identifier enables query requests to be guided to appropriate processing nodes, improving the overall efficiency of the distributed query engine. For example, in a financial auto insurance scenario, different time ranges and query granularities may correspond to different data storage nodes. Through a reasonable routing strategy, load balancing can be achieved, preventing a bottleneck caused by a single node handling too many requests, thereby improving the availability and stability of the system.
[0030] S33: Based on the routing identifier, the query request is forwarded to the target node in the distributed query engine that processes the target query index. Specifically, in this embodiment of the invention, forwarding the query request to the target node that processes the target query index can significantly improve the system's response speed, allowing users to quickly obtain the information they need. For example, in the financial auto insurance scenario, timely response to customer query requests is crucial for improving customer satisfaction. By forwarding the query request to the target node in the distributed query engine that processes the target query index, the system can more effectively utilize computing resources and storage space, avoiding resource waste.
[0031] S40: In the distributed query engine, query parameters are assembled according to the query conditions in the query request, and the policy business data is queried based on the assembled query parameters. In this embodiment of the invention, assembling query parameters according to the user's query conditions ensures the accuracy and relevance of the query results, meeting the user's specific needs. Effective query parameter assembly can accelerate the query process, enabling users to obtain the required information in a short time, thereby further improving the user experience. Specifically, such as...Figure 5 The above, Figure 5 This is a flowchart illustrating a specific implementation of step S40, which specifically includes the following steps S41-S43: S41: Parse the query conditions in the query request and, according to preset business rules, convert the parsed query conditions into query parameters of the distributed query engine. The query parameters at least include the time range, institutional level, and business type of the insurance business. Specifically, in this embodiment of the invention, by parsing the query request and converting it into standard query parameters, the system can ensure the consistency and validity of the query conditions. Converting the query conditions into parameters that conform to business rules enables the system to support diverse business query needs. For example, users can query policy data based on different time ranges and business types.
[0032] S42: Based on the query parameters, construct a composite query statement corresponding to the query request, and send the composite query statement to the distributed query engine for parallel querying to generate parallel query results for the composite query statement. Specifically, in this embodiment of the invention, constructing a composite query statement and performing parallel queries can significantly improve query efficiency, especially when processing large-scale data. In the financial auto insurance scenario, for example, querying all claim records within a certain time period, this parallel processing can quickly return the required information. Parallel queries fully utilize the computing power of the distributed query engine, enabling multiple nodes to process query requests simultaneously.
[0033] S421: Based on the time range of the insurance business, determine the multiple shard indexes that the query request needs to query. Specifically, in this embodiment of the invention, by determining the multiple shard indexes to be queried based on the time range, the system can effectively narrow the scope of data retrieval. For example, in a car insurance scenario, a user may want to query all claim records within a certain time period; only the shards within that time period need to be queried, thereby improving query efficiency. Accessing only the relevant shard indexes can significantly reduce data retrieval time and avoid unnecessary computation and resource consumption.
[0034] S422: Determine the scope of institutional queries for the insurance business based on the institutional hierarchy, and construct institutional query conditions based on the determined scope. Specifically, in this embodiment of the invention, the query scope is determined according to the institutional hierarchy, enabling the system to support query needs at different levels. For example, branches of a car insurance company can query their own claims data or all claims data of their subordinate companies, enhancing the system's flexibility. By constructing institutional query conditions, it can be ensured that the query results are limited to relevant institutional information, reducing data noise caused by cross-institutional queries.
[0035] S423: Convert the business type of the insurance business into a corresponding business type code, and construct business type query conditions based on the business type code. Specifically, in this embodiment of the invention, converting the business type into a unified business type code helps to standardize data management. This ensures consistency when querying different business types. After constructing the business type query conditions, the system can process different types of queries more efficiently, avoiding errors caused by manual input or misunderstandings.
[0036] S424: Combine the time range, institution query conditions, and business type query conditions of the insurance business into a compound query statement using Boolean logic operators. Specifically, in this embodiment of the invention, by combining multiple query conditions using Boolean logic operators, the system can generate complex compound query statements to meet multi-dimensional data retrieval needs.
[0037] S425: The composite query statement is sent in parallel to each shard index for execution, generating parallel query results for the composite query statement. Specifically, in this embodiment of the invention, sending the query statement to each shard in parallel can significantly improve query response speed. For example, in a car insurance scenario, users may need to quickly obtain information about policy status or claim progress. Through parallel processing, the system can fully utilize computing resources, reduce the burden on individual nodes, and ensure stable operation even during peak periods.
[0038] S43: The parallel query results of the composite query statement are merged, and the merged query results are sorted according to a preset sorting rule to generate query results for policy business data. Specifically, in this embodiment of the invention, through merging, the system can integrate query results from different nodes into a unified output, ensuring that users obtain complete information. Sorting the query results according to a preset sorting rule can help users understand and utilize the data more easily. For example, users may want to sort the results by claim amount or date for easier analysis and decision-making.
[0039] In one embodiment of the present invention, after assembling query parameters according to the query conditions in the query request and querying the policy business data based on the assembled query parameters in the distributed query engine, the method further includes: S51: Establish a mapping relationship between the query results and the corresponding query conditions, generate query logs based on the established mapping relationship, and store the query logs in a log database. Specifically, in this embodiment of the invention, by establishing a mapping relationship between query results and conditions, query activities can be effectively tracked. The generated query logs provide basic data for subsequent user behavior analysis. By analyzing these logs, car insurance companies can identify customer query patterns and preferences, and then adjust service and product strategies to better meet customer needs.
[0040] S52: Based on the query logs stored in the log database, the query frequency of each predefined key query condition combination is statistically analyzed. Specifically, in this embodiment of the invention, by statistically analyzing query frequency, the system can identify which query condition combinations are most frequently used. This data insight can help financial auto insurance companies understand customers' concerns in different situations, such as claims and policy status inquiries, thereby optimizing customer service. The statistical results can guide system administrators to optimize query performance. For example, administrators can decide to create or adjust indexes for high-frequency query conditions, thereby reducing query response time and improving user experience.
[0041] S53: Based on the statistically determined query frequency, dynamically adjust the target query index in the distributed query engine. Specifically, in this embodiment of the invention, dynamically adjusting the index can optimize system performance based on actual usage. For frequently queried condition combinations, creating more efficient indexes can significantly reduce query response time and improve the overall system operating efficiency.
[0042] As can be seen, the above solution, by building a distributed query engine, can more effectively manage and process large amounts of policy business data, ensuring data scalability and high availability. Precisely routing query requests to the distributed query engine ensures that these requests are processed quickly. Dynamically assembling query parameters based on query conditions allows the system to flexibly handle different types of query requests, effectively improving the response efficiency of insurance business queries.
[0043] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0044] In one embodiment, a policy business query device based on a distributed engine is provided, which corresponds one-to-one with the policy business query method based on a distributed engine in the above embodiments. For example... Figure 6 As shown, Figure 6This is a schematic diagram of a policy business query device based on a distributed engine according to an embodiment of the present invention. The device includes an acquisition module 61, a parsing module 62, a routing module 63, and a query module 64. Detailed descriptions of each functional module are as follows: The acquisition module 61 is used to acquire policy business data, construct a distributed query engine corresponding to the policy business data, and synchronize the query fields in the policy business data to the distributed query engine. The parsing module 62 is used to receive query requests for policy business, parse the query requests, and determine whether the query requests contain predefined key query conditions based on the parsing results. The routing module 63 routes the query request to the distributed query engine if the query request contains the key query conditions. The query module 64 is used in the distributed query engine to assemble query parameters according to the query conditions in the query request, and to query the policy business data based on the assembled query parameters.
[0045] In one embodiment, the acquisition module 61 is specifically used for: In the distributed query engine, a target query index corresponding to the query fields in the policy business data is created, and the query fields in the policy business data are synchronized to the created target query index. Real-time monitoring of incremental data in the policy business data, and real-time publication of the incremental data to the message middleware; The incremental data in the message middleware is consumed in real time through the subscription service, and the incremental data is written into the target query index.
[0046] In one embodiment, the parsing module 62 is specifically used for: The query request for the policy business is parsed to obtain the query field identifier and the corresponding query value of the query request; The parsed query field identifiers are matched with the field identifiers in the predefined key query conditions, and the validity of the query values corresponding to the query field identifiers is verified. When the query field identifier contains all the field identifiers in the key query conditions, and the query value corresponding to the query field identifier passes the preset validity check, it is determined that the query request contains the key query conditions.
[0047] In one embodiment, the routing module 63 is specifically used for: Based on the time range and organizational hierarchy information in the query request, determine the time range and query granularity of the target query index; Based on the time range and query granularity of the target query index, a corresponding route identifier for the distributed query engine is generated; Based on the routing identifier, the query request is forwarded to the target node in the distributed query engine that processes the target query index.
[0048] In one embodiment, the query module 64 is specifically used for: The query conditions in the query request are parsed, and the parsed query conditions are converted into query parameters of the distributed query engine according to the preset business rules. The query parameters include at least the time range, institutional level and business type of the insurance business. Based on the query parameters, a composite query statement corresponding to the query request is constructed, and the composite query statement is sent to the distributed query engine for parallel querying to generate the parallel query results of the composite query statement; The parallel query results of the compound query statement are merged, and the merged query results are sorted according to a preset sorting rule to generate query results for policy business data.
[0049] In one embodiment, the query module 64 is further configured to: Based on the time range of the insurance business, determine the multiple sharded indexes that the query request needs to query; Based on the institutional level of the insurance business, determine the scope of institutional queries for the insurance business, and construct institutional query conditions based on the determined scope of institutional queries; The business type of the insurance business is converted into the corresponding business type code, and business type query conditions are constructed based on the business type code; The time range, institution query conditions, and business type query conditions of the insurance business are combined into a compound query statement using Boolean logic operators; The composite query statement is sent in parallel to each shard index for execution, generating parallel query results for the composite query statement.
[0050] In one embodiment, the policy business query device based on a distributed engine is further used for: Establish a mapping relationship between the query results and the corresponding query conditions, generate query logs based on the established mapping relationship, and store the query logs in the log database; Based on the query logs stored in the log database, the query frequency of each predefined key query condition combination is statistically analyzed. Based on the statistically determined query frequency, the target query index in the distributed query engine is dynamically adjusted.
[0051] This invention provides a policy business query device based on a distributed engine. By constructing a distributed query engine, it can more effectively manage and process large amounts of policy business data, ensuring data scalability and high availability. Precisely routing query requests to the distributed query engine ensures that queries are processed quickly. Dynamically assembling query parameters based on query conditions allows the system to flexibly respond to different types of query requests, effectively improving the response efficiency of insurance business queries.
[0052] Specific limitations regarding the distributed engine-based policy query device can be found in the above description of the limitations of the distributed engine-based policy query method, and will not be repeated here. Each module in the aforementioned distributed engine-based policy query device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the computer device's memory as software, so that the processor can call and execute the corresponding operations of each module.
[0053] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 7 As shown, Figure 7 This is a schematic diagram of a computer device according to an embodiment of the present invention. The computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage media stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used to communicate with external clients via a network connection. When the computer program is executed by the processor, it implements the functions or steps of a server-side method for querying insurance policy business based on a distributed engine.
[0054] In one embodiment, a computer device is provided, which may be a client, and its internal structure diagram may be as follows: Figure 8 As shown, Figure 8This is another schematic diagram of a computer device according to an embodiment of the present invention. The computer device includes a processor, memory, network interface, display screen, and input device connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The network interface is used to communicate with an external server via a network connection. When the computer program is executed by the processor, it implements the client-side functions or steps of a policy business query method based on a distributed engine.
[0055] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps: Obtain policy business data, construct a distributed query engine corresponding to the policy business data, and synchronize the query fields in the policy business data to the distributed query engine; Receive query requests for insurance policy business, parse the query requests, and determine whether the query requests contain predefined key query conditions based on the parsing results; If the query request contains the key query conditions, the query request will be routed to the distributed query engine; In the distributed query engine, query parameters are assembled according to the query conditions in the query request, and the policy business data is queried based on the assembled query parameters.
[0056] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor: Obtain policy business data, construct a distributed query engine corresponding to the policy business data, and synchronize the query fields in the policy business data to the distributed query engine; Receive query requests for insurance policy business, parse the query requests, and determine whether the query requests contain predefined key query conditions based on the parsing results; If the query request contains the key query conditions, the query request will be routed to the distributed query engine; In the distributed query engine, query parameters are assembled according to the query conditions in the query request, and the policy business data is queried based on the assembled query parameters.
[0057] It should be noted that the functions or steps that can be implemented by the computer-readable storage medium or computer device described above can be referred to the relevant descriptions on the server side and client side in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.
[0058] 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 a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0059] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0060] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A method for querying insurance policy business based on a distributed engine, characterized in that, include: Obtain policy business data, construct a distributed query engine corresponding to the policy business data, and synchronize the query fields in the policy business data to the distributed query engine; Receive query requests for insurance policy business, parse the query requests, and determine whether the query requests contain predefined key query conditions based on the parsing results; If the query request contains the key query conditions, the query request will be routed to the distributed query engine; In the distributed query engine, query parameters are assembled according to the query conditions in the query request, and the policy business data is queried based on the assembled query parameters.
2. The policy business query method based on a distributed engine according to claim 1, characterized in that, The steps of acquiring policy business data, constructing a distributed query engine corresponding to the policy business data, and synchronizing the query fields in the policy business data to the distributed query engine include: In the distributed query engine, a target query index corresponding to the query fields in the policy business data is created, and the query fields in the policy business data are synchronized to the created target query index. Real-time monitoring of incremental data in the policy business data, and real-time publication of the incremental data to the message middleware; The incremental data in the message middleware is consumed in real time through the subscription service, and the incremental data is written into the target query index.
3. The policy business query method based on a distributed engine according to claim 1, characterized in that, The process of receiving policy-related query requests involves parsing the requests and determining, based on the parsing results, whether the query request contains predefined key query conditions, including: The query request for the policy business is parsed to obtain the query field identifier and the corresponding query value of the query request; The parsed query field identifiers are matched with the field identifiers in the predefined key query conditions, and the validity of the query values corresponding to the query field identifiers is verified. When the query field identifier contains all the field identifiers in the key query conditions, and the query value corresponding to the query field identifier passes the preset validity check, it is determined that the query request contains the key query conditions.
4. The policy business query method based on a distributed engine according to claim 2, characterized in that, If a query request contains the key query conditions, then routing the query request to the distributed query engine includes: Based on the time range and organizational hierarchy information in the query request, determine the time range and query granularity of the target query index; Based on the time range and query granularity of the target query index, a corresponding route identifier for the distributed query engine is generated; Based on the routing identifier, the query request is forwarded to the target node in the distributed query engine that processes the target query index.
5. The policy business query method based on a distributed engine according to claim 4, characterized in that, In the distributed query engine, assembling query parameters based on the query conditions in the query request, and querying the policy business data based on the assembled query parameters, includes: The query conditions in the query request are parsed, and the parsed query conditions are converted into query parameters of the distributed query engine according to the preset business rules. The query parameters include at least the time range, institutional level and business type of the insurance business. Based on the query parameters, a composite query statement corresponding to the query request is constructed, and the composite query statement is sent to the distributed query engine for parallel querying to generate the parallel query results of the composite query statement; The parallel query results of the compound query statement are merged, and the merged query results are sorted according to a preset sorting rule to generate query results for policy business data.
6. The policy business query method based on a distributed engine according to claim 5, characterized in that, The process of constructing a composite query statement corresponding to the query request based on the query parameters, and sending the composite query statement to the distributed query engine for parallel querying to generate parallel query results for the composite query statement includes: Based on the time range of the insurance business, determine multiple sharded indexes for the query request; Based on the institutional level of the insurance business, determine the scope of institutional queries for the insurance business, and construct institutional query conditions based on the determined scope of institutional queries; The business type of the insurance business is converted into the corresponding business type code, and business type query conditions are constructed based on the business type code; The time range, institution query conditions, and business type query conditions of the insurance business are combined into a compound query statement using Boolean logic operators; The composite query statement is sent in parallel to each shard index for execution, generating parallel query results for the composite query statement.
7. The policy business query method based on a distributed engine according to claim 6, characterized in that, After assembling query parameters based on the query conditions in the query request and querying the policy business data based on the assembled query parameters in the distributed query engine, the method further includes: Establish a mapping relationship between the query results and the corresponding query conditions, generate query logs based on the established mapping relationship, and store the query logs in the log database; Based on the query logs stored in the log database, the query frequency of each predefined key query condition combination is statistically analyzed. Based on the statistically determined query frequency, the target query index in the distributed query engine is dynamically adjusted.
8. A policy business query device based on a distributed engine, characterized in that, include: The acquisition module is used to acquire policy business data, construct a distributed query engine corresponding to the policy business data, and synchronize the query fields in the policy business data to the distributed query engine. The parsing module is used to receive query requests for policy business, parse the query requests, and determine whether the query requests contain predefined key query conditions based on the parsing results. The routing module routes the query request to the distributed query engine if the query request contains the key query conditions. The query module is used in the distributed query engine to assemble query parameters according to the query conditions in the query request, and to query the policy business data based on the assembled query parameters.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the policy business query method based on a distributed engine as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the policy business query method based on a distributed engine as described in any one of claims 1 to 7.