Car insurance claim settlement data query method and device of car insurance claim settlement system, and server
By partitioning the database tables of the auto insurance claims system and quickly locate data rows using preset indexes, the problem of low data query efficiency in the auto insurance claims system is solved, and more efficient data query performance is achieved.
Patent Information
- Application Number
- CN202411799181.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-03-28
AI Technical Summary
In the auto insurance claim system, due to the large amount of auto insurance claims data in a single database table, the scanning time during data query increases, reducing query efficiency. The prior art optimizes by rewriting query requests, but the optimization effect is limited, especially for developers who are not familiar with optimization techniques.
By partitioning the workflow tables and business tables in the database, obtaining the corresponding partition tables based on the inflow time and database source fields, and using preset indexes to quickly locate data rows, reducing the amount of scanned data, thereby improving data query efficiency.
Through technical means of partitioning and preset indexing, the efficiency of auto insurance claims data query is significantly improved, the query time is reduced, and the system's performance and response speed are improved.
Smart Images

Figure CN119719189A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a method, device and server for querying automobile insurance claims data of an automobile insurance claims system. Background Art
[0002] In the auto insurance claims system, the auto insurance claims data of auto insurance claims systems in different provinces are centralized into one database, which will result in too much auto insurance claims data being written into a single database table. When a request for auto insurance claims data query is received, the query result is obtained by scanning the entire database table. However, since the amount of data in a single database table is too large, the scanning time will be increased, thereby reducing the query efficiency.
[0003] At present, the existing technology generally optimizes the query request for automobile insurance claim data by rewriting the query request for automobile insurance claim data, thereby reducing the amount of automobile insurance claim data that needs to be scanned.
[0004] However, the optimized auto insurance claims data query request may contain multiple layers of nesting, complex connections, subqueries, and conditional logic. For developers who are not familiar with these optimization techniques, it is not possible to optimize all auto insurance claims data query requests. Therefore, this method can only improve the efficiency of auto insurance claims data query to a limited extent. Summary of the invention
[0005] The embodiments of the present application provide a method, device and server for querying automobile insurance claims data of an automobile insurance claims system, which are used to improve the efficiency of data query.
[0006] In a first aspect, an embodiment of the present application provides a method for querying automobile insurance claims data in an automobile insurance claims system, comprising: receiving an automobile insurance claims data query request sent by a client to the automobile insurance claims system. Obtaining a query field in the automobile insurance claims data query request. Determining whether the query field contains an inflow time field or a database source field; wherein the inflow time field belongs to a workflow table in a database, and the database source field belongs to a business table in a database. If the query field contains an inflow time field, then according to the inflow time corresponding to the inflow time field in the query field, obtain a workflow partition table corresponding to the inflow time; wherein the workflow partition table is obtained by partitioning the workflow table according to a preset partition period and an inflow time field. According to a preset index of the workflow partition table corresponding to the inflow time, obtain a query result of the automobile insurance claims data query request in the workflow partition table corresponding to the inflow time. If the query field contains a database source field, then according to the database source corresponding to the database source field in the query field, obtain a business partition table corresponding to the database source; wherein the business partition table is obtained by partitioning the business table according to the database source field. According to a preset index of the business partition table corresponding to the database source, obtain a query result of the automobile insurance claims data query request in the business partition table corresponding to the database source.
[0007] In a possible implementation, before receiving a query request for auto insurance claims data sent by a client to an auto insurance claims system, it also includes: obtaining a database historical query log of each workflow partition table; obtaining all query statements whose query time exceeds a preset time threshold in the database historical query log; counting the query fields appearing in all query statements separately to obtain the number of times each query field appears; sorting all query fields in descending order according to the number of times each query field appears to obtain all sorted query fields; and obtaining a preset index of each workflow partition table according to all sorted query fields.
[0008] In one possible implementation, a preset index of each workflow partition table is obtained based on all sorted query fields, including: determining the first query field among all sorted query fields as the first index field; determining the second query field among all sorted query fields as the second index field; and obtaining the index of each workflow partition table based on the first index field and the second index field.
[0009] In a possible implementation, after receiving a motor vehicle insurance claim data query request sent by a client to a motor vehicle insurance claim system, it includes: determining whether there is a query result of the motor vehicle insurance claim data query request in the cache; if it is determined that the query result exists in the cache, obtaining the query result from the cache; accordingly, after obtaining the query result of the motor vehicle insurance claim data query request, it also includes: saving the query result in the cache.
[0010] In a possible implementation, it also includes: if multiple motor insurance claim data query requests sent by a client to the motor insurance claim system are received, the multiple motor insurance claim data query requests are encapsulated into a query task; the query task is executed through a thread pool to obtain query results of the multiple motor insurance claim data query requests.
[0011] In a second aspect, an embodiment of the present application provides a vehicle insurance claim data query device of a vehicle insurance claim system, comprising:
[0012] The receiving module is used to receive a car insurance claim data query request sent by the client to the car insurance claim system.
[0013] The first acquisition module is used to obtain the query field in the motor insurance claim data query request.
[0014] The judgment module is used to judge whether the query field contains an inflow time field or a database source field; the inflow time field belongs to the workflow table in the database, and the database source field belongs to the business table in the database.
[0015] The second acquisition module is used to obtain the workflow partition table corresponding to the inflow time according to the inflow time corresponding to the inflow time field in the query field if the query field contains the inflow time field; wherein the workflow partition table is obtained by partitioning the workflow table according to the preset partition period and the inflow time field.
[0016] The third acquisition module is used to obtain the query result of the motor vehicle insurance claim data query request in the workflow partition table corresponding to the inflow time according to the preset index of the workflow partition table corresponding to the inflow time.
[0017] The fourth acquisition module is used to obtain the business partition table corresponding to the database source according to the database source corresponding to the database source field in the query field if the query field contains the database source field; wherein the business partition table is obtained by partitioning the business table according to the database source field.
[0018] The fifth acquisition module is used to obtain the query result of the motor vehicle insurance claim data query request in the business partition table corresponding to the database source according to the preset index of the business partition table corresponding to the database source.
[0019] In a possible implementation, the device also includes a sixth acquisition module, which is used to obtain a database historical query log of each workflow partition table; in the database historical query log, all query statements whose query time exceeds a preset time threshold are obtained; the query fields appearing in all query statements are counted separately to obtain the number of times each query field appears; according to the number of times each query field appears, all query fields are sorted in descending order to obtain all sorted query fields; according to all sorted query fields, a preset index of each workflow partition table is obtained.
[0020] In a third aspect, an embodiment of the present application provides a server, including: a memory, a processor;
[0021] The memory stores computer-executable instructions;
[0022] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the above first aspect and / or various possible implementations of the first aspect.
[0023] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the first aspect above and / or various possible implementations of the first aspect.
[0024] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the above first aspect and / or various possible implementation methods of the first aspect.
[0025] The motor vehicle insurance claims data query method, device and server of the motor vehicle insurance claims system provided in the embodiment of the present application obtain the workflow partition table or business partition table corresponding to the query field by judging the query field in the motor vehicle insurance claims data query request. At this time, when querying, it is only necessary to scan the corresponding workflow partition table or business partition table. The preset index can quickly locate the data row that meets the conditions without scanning the entire partition table, thereby improving the efficiency of data query. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0027] Figure 1 A schematic diagram of a scenario of a method for querying automobile insurance claims data in an automobile insurance claims system provided in an embodiment of the present application;
[0028] Figure 2 A flowchart of a method for querying automobile insurance claims data in an automobile insurance claims system provided in an embodiment of the present application;
[0029] Figure 3 A schematic diagram of the structure of a vehicle insurance claims data query device of a vehicle insurance claims system provided in an embodiment of the present application;
[0030] Figure 4 A schematic diagram of the structure of a server provided in an embodiment of the present application.
[0031] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0032] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0033] Figure 1 A schematic diagram of a scenario of a method for querying automobile insurance claims data in an automobile insurance claims system provided in an embodiment of the present application, such as Figure 1 As shown, the specific application scenarios of the present application include: a client 101 and a server 102.
[0034] refer to Figure 1 , the client 101 sends a motor vehicle insurance claim data query request to the server 102; the server 102 obtains the query field in the motor vehicle insurance claim data query request; determines whether the query field contains the inflow time field or the database source field; if the query field contains the inflow time field or the database source field, then the corresponding workflow partition table or business partition table is obtained; according to the preset index of the workflow partition table corresponding to the inflow time, or the preset index of the business partition table corresponding to the database source, the query result of the motor vehicle insurance claim data query request is obtained and sent to the client 101.
[0035] In the auto insurance claims system, the auto insurance claims data of the auto insurance claims systems of different provinces are centralized into one database, which will result in too much auto insurance claims data being written into a single database table. When a request for querying auto insurance claims data is received, the query result is obtained by scanning the entire database table, but since the amount of data in a single database table is too large, the scanning time will be increased, thereby reducing the query efficiency. At present, the prior art generally optimizes the auto insurance claims data query request by rewriting the auto insurance claims data query request to reduce the amount of auto insurance claims data that needs to be scanned. However, the optimized auto insurance claims data query request may contain multiple layers of nesting, complex connections, subqueries, and conditional logic. For developers who are not familiar with these optimization techniques, not all auto insurance claims data query requests can be optimized. Therefore, the efficiency of auto insurance claims data query improved by this method is limited.
[0036] In order to solve the above technical problems, the embodiment of the present application proposes the following technical ideas: partition the workflow table and the business table in the database. Partition the workflow table according to the inflow time field and the preset partition period in the workflow table to obtain multiple workflow partition tables; partition the business table according to the database source table to obtain multiple business partition tables. Create an index for each partition table. Upon receiving a motor insurance claim data query request sent by a client to the motor insurance claim system, obtain the corresponding workflow partition table or business partition table according to the query field in the motor insurance claim data query request to reduce the number of data scans. Then use the preset index of the workflow partition table or the business partition table to quickly locate the data rows that meet the conditions without scanning the entire partition table, thereby improving the efficiency of data query.
[0037] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0038] Figure 2 A flow chart of a method for querying automobile insurance claims data in an automobile insurance claims system provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, the method includes:
[0039] S201: receiving a request for querying automobile insurance claims data sent by a client to an automobile insurance claims system.
[0040] The auto insurance claim data query request includes a query statement.
[0041] S202: Obtain the query fields in the motor insurance claim data query request.
[0042] The query statement in the auto insurance claim data query request includes a query keyword where, and all query fields that appear after the query keyword where are obtained.
[0043] S203: Determine whether the query field contains an inflow time field or a database source field; the inflow time field belongs to a workflow table in the database, and the database source field belongs to a business table in the database.
[0044] S204: If the query field includes an inflow time field, then according to the inflow time corresponding to the inflow time field in the query field, obtain the workflow partition table corresponding to the inflow time; wherein the workflow partition table is obtained by partitioning the workflow table according to a preset partition period and the inflow time field.
[0045] In this embodiment, when the data from multiple databases are concentrated into one database, the amount of data written into a single database table of the database will be too large. The database table is partitioned to reduce the number of data scans when performing data queries. Optionally, there are two modes for selecting the partition key, one is partitioning by time, and the other is partitioning by database source. In the workflow table, time is used as the partition key, and the inflow time is specifically selected as the partition key. The preset partition period can be 1 month to partition the workflow table, and multiple workflow partition tables are obtained.
[0046] S205: According to a preset index of the workflow partition table corresponding to the inflow time, a query result of the motor vehicle insurance claim data query request is obtained in the workflow partition table corresponding to the inflow time.
[0047] Among them, the preset index is pre-set.
[0048] In this embodiment, a preset index is used to retrieve query results that meet the query request for automobile insurance claim data from the workflow partition table.
[0049] Specifically, the index preset process includes S2051 to S2055:
[0050] S2051: Obtain the database historical query log of each workflow partition table.
[0051] Optionally, a script or program is written to parse the database historical query log of each workflow partition table.
[0052] S2052: Obtain all query statements whose query time exceeds a preset time threshold in the database historical query log.
[0053] Specifically, each query statement and its execution time are extracted from the database historical query log of each workflow partition table, and all query statements within a preset time threshold are screened out.
[0054] In this embodiment, the query time exceeds the preset time threshold, that is, the query speed is slow.
[0055] Optionally, the preset time threshold may be adjusted according to actual conditions.
[0056] S2053: Count the query fields that appear in all query statements respectively to obtain the number of times each query field appears.
[0057] Specifically, all query fields that appear after the query keyword where in the query statement are obtained, and the number of times each query field appears is counted.
[0058] S2054: Sort all query fields in descending order according to the number of times each query field appears, to obtain all query fields after sorting.
[0059] Exemplarily, all query fields after sorting are: field A, field B, field C, ..., field N, where field A is the field with the largest number of occurrences.
[0060] S2055: Obtain a preset index of each workflow partition table based on all sorted query fields.
[0061] Specifically, the first query field among all the sorted query fields is determined as the first index field; the second query field among all the sorted query fields is determined as the second index field; and the index of each workflow partition table is obtained according to the first index field and the second index field.
[0062] Exemplarily, field A is the first query field among all query fields after sorting, and field A is determined as the first index field; field B is the second query field among all query fields after sorting, and field B is determined as the second index field.
[0063] In this embodiment, based on the leftmost prefix principle, the field with a high number of occurrences is placed in front of the index to obtain a preset index.
[0064] S206: If the query field includes a database source field, then according to the database source corresponding to the database source field in the query field, obtain a business partition table corresponding to the database source; wherein the business partition table is obtained by partitioning the business table according to the database source field.
[0065] In this embodiment, the business table is partitioned using the database field source as the partition key to obtain multiple business partition tables, wherein the database source field records which specific database each piece of data comes from.
[0066] S207: According to a preset index of the business partition table corresponding to the database source, a query result of the motor vehicle insurance claim data query request is obtained in the business partition table corresponding to the database source.
[0067] In this embodiment, a preset index is used to retrieve query results that meet the query request for automobile insurance claim data from the business partition table.
[0068] In this embodiment, the process of setting the preset index of each business partition table is consistent with the process of setting the preset index of each workflow partition table, which will not be described in detail here.
[0069] In summary, by judging the query field in the auto insurance claim data query request, the workflow partition table or business partition table corresponding to the query field can be obtained. At this time, when querying, you only need to scan the corresponding workflow partition table or business partition table. The preset index can quickly locate the data row that meets the conditions without scanning the entire partition table, thereby improving the efficiency of data query.
[0070] Based on the above embodiment, in this embodiment, the process of obtaining query results from the cache is introduced, which is described in detail as follows:
[0071] S301: Determine whether there is a query result of the motor vehicle insurance claim data query request in the cache.
[0072] Specifically, before querying the car insurance claim data, check whether the required data is available in the cache.
[0073] S302: If it is determined that the query result exists in the cache, the query result is obtained from the cache.
[0074] Specifically, if the query result of the automobile insurance claim data query request is obtained in the cache, the query result is directly returned. If the query result is not obtained in the cache, steps S202 to S207 are executed in sequence.
[0075] Accordingly, after obtaining the query result of the motor vehicle insurance claim data query request, the query result is saved in the cache.
[0076] In this embodiment, the query result is saved in the cache, and the query result can be directly obtained from the cache when the same motor insurance claim data query request is received next time.
[0077] Optionally, you can set a cache expiration time to ensure that cached data is valid when frequently accessed, avoiding data inconsistency issues caused by data expiration.
[0078] Optionally, when the database data is updated, the cache is updated in time or an invalidation mechanism is used to ensure that the latest data can be reloaded the next time a motor insurance claim data query request is received.
[0079] In summary, before obtaining the query results in the database, first determine whether the query results exist in the cache. If so, directly obtain the query results. When the query results are stored in the cache, the access speed is much faster than retrieving the query results from the database. If the query results do not exist in the cache, the query results obtained from the database are saved in the cache, so that the next time the same auto insurance claim data query request is received, the results can be directly obtained from the cache, further improving the efficiency of data query.
[0080] Based on the above embodiment, in this embodiment, the processing process when receiving multiple auto insurance claim data query requests is described in detail as follows:
[0081] S401: If multiple auto insurance claim data query requests sent by a client to the auto insurance claim system are received, the multiple auto insurance claim data query requests are packaged into a query task.
[0082] In this embodiment, the auto insurance claim data query request is encapsulated into a task and then submitted to the thread pool for execution. The thread pool will decide whether to execute the task immediately or put it in the queue to wait based on the configuration and current status of the thread pool, such as the number of idle threads and queue capacity.
[0083] S402: Execute the query task through the thread pool to obtain query results of multiple motor vehicle insurance claim data query requests.
[0084] Specifically, the thread pool manages the lifecycle of these threads by pre-creating a certain number of threads and maintaining them in a pool. When a new auto insurance claim data query request arrives, the thread pool will try to reuse the existing threads in the pool to process the request instead of creating a new thread each time. If all threads in the pool are busy, the new request will be put into the queue and wait until a thread is available. The query results of multiple auto insurance claim data query requests are obtained through the thread pool.
[0085] In summary, the thread pool is used to manage and reuse threads for data query processing, avoiding the overhead of frequent creation and destruction of threads, thereby effectively utilizing system resources.
[0086] Figure 3 A schematic diagram of the structure of a vehicle insurance claim data query device of a vehicle insurance claim system provided in an embodiment of the present application, such as Figure 3 As shown, the motor vehicle insurance claim data query device of the motor vehicle insurance claim system provided in this embodiment includes: a receiving module 301, a first acquisition module 302, a judgment module 303, a second acquisition module 304, a third acquisition module 305, a fourth acquisition module 306 and a fifth acquisition module 307.
[0087] The receiving module 301 is used to receive a motor vehicle insurance claim data query request sent by a client to the motor vehicle insurance claim system.
[0088] The first acquisition module 302 is used to acquire the query field in the motor vehicle insurance claim data query request.
[0089] The judgment module 303 is used to judge whether the query field contains an inflow time field or a database source field; wherein the inflow time field belongs to the workflow table in the database, and the database source field belongs to the business table in the database.
[0090] The second acquisition module 304 is used to obtain the workflow partition table corresponding to the inflow time according to the inflow time corresponding to the inflow time field in the query field if the query field contains the inflow time field; wherein the workflow partition table is obtained by partitioning the workflow table according to the preset partition period and the inflow time field.
[0091] The third acquisition module 305 is used to acquire the query result of the motor vehicle insurance claim data query request in the workflow partition table corresponding to the inflow time according to the preset index of the workflow partition table corresponding to the inflow time.
[0092] The fourth acquisition module 306 is used to acquire the business partition table corresponding to the database source according to the database source corresponding to the database source field in the query field if the query field includes the database source field; wherein the business partition table is obtained by partitioning the business table according to the database source field.
[0093] The fifth acquisition module 307 is used to acquire the query result of the motor vehicle insurance claim data query request in the business partition table corresponding to the database source according to the preset index of the business partition table corresponding to the database source.
[0094] In a possible implementation, the auto insurance claims data query device of the auto insurance claims system also includes: a sixth acquisition module, used to obtain the database historical query log of each workflow partition table; in the database historical query log, obtain all query statements whose query time exceeds a preset time threshold; count the query fields appearing in all query statements separately to obtain the number of times each query field appears; according to the number of times each query field appears, sort all query fields in descending order to obtain all sorted query fields; according to all sorted query fields, obtain the preset index of each workflow partition table.
[0095] In a possible implementation, the sixth acquisition module is also used to: determine the first query field among all the sorted query fields as the first index field; determine the second query field among all the sorted query fields as the second index field; and obtain the index of each workflow partition table based on the first index field and the second index field.
[0096] In a possible implementation, the motor vehicle insurance claim data query device of the motor vehicle insurance claim system also includes: a cache module, which is specifically used to determine whether there is a query result of the motor vehicle insurance claim data query request in the cache; if it is determined that the query result exists in the cache, the query result is obtained from the cache; accordingly, after obtaining the query result of the motor vehicle insurance claim data query request, it also includes: saving the query result in the cache.
[0097] In a possible implementation, the motor vehicle insurance claims data query device of the motor vehicle insurance claims system also includes: a seventh acquisition module, which is used to encapsulate the multiple motor vehicle insurance claims data query requests into a query task if multiple motor vehicle insurance claims data query requests sent by the client to the motor vehicle insurance claims system are received; and execute the query task through the thread pool to obtain the query results of the multiple motor vehicle insurance claims data query requests.
[0098] The vehicle insurance claims data query device of the vehicle insurance claims system provided in this embodiment can execute the method provided in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be described in detail here.
[0099] Figure 4 This is a schematic diagram of the structure of the server provided in the embodiment of the present application. Figure 4 As shown, the server provided in this embodiment includes: at least one processor 401 and a memory 402. Optionally, the server also includes a communication component 403. The processor 401, the memory 402 and the communication component 403 are connected via a bus 404.
[0100] In a specific implementation process, at least one processor 401 executes the computer-executable instructions stored in the memory 402, so that at least one processor 401 executes the above method.
[0101] The specific implementation process of the processor 401 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.
[0102] In the above embodiments, it should be understood that the processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the invention can be directly implemented as a hardware processor, or can be implemented by a combination of hardware and software modules in the processor.
[0103] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (NVM), such as at least one disk storage.
[0104] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of this application is not limited to only one bus or one type of bus.
[0105] The present application also provides a computer program product, including a computer program, which implements the above method when executed by a processor.
[0106] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above method is implemented.
[0107] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.
[0108] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.
[0109] The division of units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.
[0110] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0111] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0112] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0113] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0114] Finally, it should be noted that those skilled in the art will readily conceive of other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention, which follow the general principles of the present invention and include common knowledge or customary technical means in the art not disclosed by the present invention, are not limited to the precise structure described above and shown in the drawings, and may be modified and changed in various ways without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. A method for querying automobile insurance claims data in an automobile insurance claims system, characterized in that: Applicable to servers, including: Receive a request from a client for querying automobile insurance claims data sent to the automobile insurance claims system; Obtaining the query fields in the motor insurance claim data query request; Determine whether the query field contains an inflow time field or a database source field; wherein the inflow time field belongs to a workflow table in the database, and the database source field belongs to a business table in the database; If the query field includes the inflow time field, then according to the inflow time corresponding to the inflow time field in the query field, a workflow partition table corresponding to the inflow time is obtained; wherein the workflow partition table is obtained by partitioning the workflow table according to a preset partition period and the inflow time field; According to a preset index of the workflow partition table corresponding to the inflow time, obtaining a query result of the auto insurance claim data query request in the workflow partition table corresponding to the inflow time; If the query field includes the database source field, then according to the database source corresponding to the database source field in the query field, a business partition table corresponding to the database source is obtained; wherein the business partition table is obtained by partitioning the business table according to the database source field; According to a preset index of the business partition table corresponding to the database source, a query result of the motor vehicle insurance claim data query request is obtained in the business partition table corresponding to the database source.
2. The method according to claim 1, characterized in that Before receiving the auto insurance claim data query request sent by the client to the auto insurance claim system, the method further includes: Obtain the database historical query logs for each workflow partition table; In the database historical query log, all query statements whose query time exceeds a preset time threshold are obtained; Counting the query fields appearing in all the query statements respectively to obtain the number of times each query field appears; According to the number of occurrences of each query field, all query fields are sorted in descending order to obtain all sorted query fields; According to all the sorted query fields, the preset indexes of the workflow partition tables are obtained.
3. The method according to claim 2, characterized in that The step of obtaining the preset index of each workflow partition table according to all the sorted query fields includes: Determine the first query field among all the sorted query fields as the first index field; Determine the second query field among all the sorted query fields as the second index field; The index of each workflow partition table is obtained according to the first index field and the second index field.
4. The method according to claim 1, characterized in that After receiving the auto insurance claim data query request sent by the client to the auto insurance claim system, the method includes: Determine whether there is a query result of the motor insurance claim data query request in the cache; If it is determined that the query result exists in the cache, obtaining the query result from the cache; Correspondingly, after obtaining the query result of the motor insurance claim data query request, the method further includes: The query result is saved in the cache.
5. The method according to any one of claims 1 to 4, characterized in that: Also includes: If multiple auto insurance claim data query requests sent by the client to the auto insurance claim system are received, the multiple auto insurance claim data query requests are packaged into a query task; The query task is executed through a thread pool to obtain query results of the multiple motor insurance claims data query requests.
6. A vehicle insurance claim data query device for a vehicle insurance claim system, characterized in that: Applicable to servers, including: A receiving module, used to receive a request for querying automobile insurance claims data sent by a client to the automobile insurance claims system; A first acquisition module is used to acquire the query fields in the motor insurance claim data query request; A judgment module, used to judge whether the query field contains an inflow time field or a database source field; wherein the inflow time field belongs to a workflow table in the database, and the database source field belongs to a business table in the database; The second acquisition module is used to acquire the workflow partition table corresponding to the inflow time according to the inflow time corresponding to the inflow time field in the query field if the query field includes the inflow time field; wherein the workflow partition table is obtained by partitioning the workflow table according to the preset partition period and the inflow time field; A third acquisition module is used to obtain the query result of the motor insurance claim data query request in the workflow partition table corresponding to the inflow time according to the preset index of the workflow partition table corresponding to the inflow time; A fourth acquisition module is used to acquire a business partition table corresponding to the database source according to the database source corresponding to the database source field in the query field if the query field includes a database source field; wherein the business partition table is obtained by partitioning the business table according to the database source field; The fifth acquisition module is used to obtain the query result of the motor vehicle insurance claim data query request in the business partition table corresponding to the database source according to the preset index of the business partition table corresponding to the database source.
7. The device according to claim 6, characterized in that The device also includes a sixth acquisition module, which is used to obtain a database history query log of each workflow partition table; obtain all query statements whose query time exceeds a preset time threshold in the database history query log; and count the query fields appearing in all the query statements to obtain the number of times each query field appears; According to the number of occurrences of each query field, all query fields are sorted in descending order to obtain all sorted query fields; according to all sorted query fields, preset indexes of each workflow partition table are obtained.
8. A server, characterized in that: include: Memory, processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method according to any one of claims 1 to 5.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 5 when executed by a processor.
10. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 5 when being executed by a processor.