Batch reporting method, device, equipment and storage medium

By generating batch number information and using a combination of asynchronous tables, producer threads, and consumer threads, the problem of complex and time-consuming batch reporting was solved, achieving efficient batch reporting processing and improving user experience and efficiency.

CN112069182BActive Publication Date: 2025-01-10CHINA PING AN PROPERTY INSURANCE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010925559.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-03
Publication Date
2025-01-10
Estimated Expiration
2040-09-03

AI Technical Summary

Technical Problem

Existing methods for batch reporting are complex and time-consuming, impacting user experience and work efficiency, especially in industries with large customer bases and high business volumes, such as banking and insurance.

Method used

By generating batch number information, the reported files are stored in a temporary table in the database. The reported data is added to the queue using an asynchronous table and a producer thread, and duplicate verification is performed by a consumer thread to achieve batch reporting.

Benefits of technology

It simplifies the batch reporting process, improves processing efficiency, reduces manpower consumption, and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112069182B_ABST
    Figure CN112069182B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of batch reporting, and provides a batch reporting method, device, equipment and storage medium, wherein the method comprises the following steps: if a report file is received, then based on the time information corresponding to the report file, the batch number information of the report file is generated, and the report file and the batch number information are stored in a temporary table of a database; based on the batch number information, the ID list of the report file in the temporary table is obtained, and the batch number information and the data ID in the ID list are stored in an asynchronous table of the database; based on the batch number information and the data ID, the corresponding target report data in the asynchronous table is determined, and based on the producer thread, the target report data is added to the report queue; based on the consumer thread, the target report data is checked for repeatability, and the report result corresponding to the target report data is output. The present invention realizes batch reporting through asynchronous batch processing. In addition, the present invention also relates to blockchain technology, and privacy information can be stored in the blockchain.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data management technology, and in particular to a batch reporting method, device, equipment and computer-readable storage medium. Background Art

[0002] Data processing is a problem that is often encountered and needs to be solved in daily business, especially in industries with large customer base and business volume such as banks and insurance. For the reporting business of Ruyi Health Insurance, the financial system of banks and other financial institutions needs to first obtain the policy information from the underwriting institution, and then obtain the customer information from the customer management system, such as insurance type and liability information, and then verify the obtained policy information and customer information. After the verification is passed, the report information needs to be saved to the database. The storage process involves many tables, and related tables need to be queried, updated, inserted, and other operations. If the report operation is performed one by one, the entire process will consume a lot of manpower and time, which will not only have a bad user experience, but also affect work efficiency. Summary of the invention

[0003] The main purpose of the present invention is to provide a batch reporting method, device, equipment and computer-readable storage medium, aiming to solve the problem that the existing batch reporting method is complicated and time-consuming.

[0004] To achieve the above object, the present invention provides a batch reporting method, which comprises the following steps:

[0005] If a report file is received, batch number information of the report file is generated based on the time information corresponding to the report file, and the report file and the batch number information are stored in a temporary table of the database;

[0006] Based on the batch number information, obtain the ID list of the report file in the temporary table, and store the batch number information and the data ID in the ID list into an asynchronous table of the database;

[0007] Based on the batch number information and the data ID, determine the corresponding target case report data in the asynchronous table, and add the target case report data to the case report queue based on the pre-created producer thread;

[0008] Based on the pre-created consumption thread, the target report data in the report queue is checked for repeatability, and the report result corresponding to the target report data is output.

[0009] Optionally, if a report file is received, the step of generating batch number information of the report file based on time information corresponding to the report file, and storing the report file and the batch number information in a temporary table of a database includes:

[0010] If a case report file is received, determining a checksum value of the case report file, and determining whether the case report file is a duplicate file based on the checksum value;

[0011] If not, verify the case report file based on preset verification rules;

[0012] If the verification is successful, the batch number information of the report file is generated based on the time information corresponding to the report file, and the check value, the report file and the batch number information are stored in a temporary table of the database.

[0013] Optionally, the step of storing the report file in a temporary table of a database includes:

[0014] Determine a merge identifier of the report file, and based on the merge identifier, determine whether the report data in the report file needs to be merged;

[0015] If necessary, traverse and determine the data to be merged in the report file, and merge the data to be merged with the merged report data corresponding to the data to be merged;

[0016] The merged report file is stored in a temporary table of the database.

[0017] Optionally, the step of traversing and determining the data to be merged in the case report file, if necessary, includes:

[0018] If necessary, determine the key features corresponding to the current report data in the report file in turn, and determine whether there is a target key feature identical to the key feature in the comparison library corresponding to the report file;

[0019] If not, saving the key feature into the comparison library;

[0020] If it exists, the current reported data is determined to be data to be merged.

[0021] Optionally, the step of merging the data to be merged with the merged case report data corresponding to the data to be merged includes:

[0022] Based on the key features, determining the target data corresponding to the data to be merged, and based on the target key features, determining the merge position corresponding to the merged report data;

[0023] Based on the target data and the merging position, the data to be merged is merged with the merged report data.

[0024] Optionally, the step of performing a repeatability check on the target case reporting data in the case reporting queue based on a pre-created consumption thread and outputting a case reporting result corresponding to the target case reporting data includes:

[0025] Determine in sequence based on the pre-created consumer threads whether the current target case report data is merged data;

[0026] If yes, determining the key array corresponding to the current target case report data, and determining the repetition type of the current target case report data based on the key array;

[0027] If the repetition type is partial repetition, determining the initial target data corresponding to the current target case report data and the initial merge position corresponding to the current target case report data;

[0028] Based on the initial target data and the initial merge position, split the current target case report data to obtain split case report data;

[0029] The report results corresponding to the split report data are output respectively, and the report results include report failure.

[0030] Optionally, if yes, the step of determining a key array corresponding to the current target case report data, and determining the repetition type of the current target case report data based on the key array includes:

[0031] If yes, determine the key array corresponding to the current target case report data, and determine the target item corresponding to the key array;

[0032] The repetition degree of the target item in the key array is determined by traversing, and the repetition type of the current target report data is determined based on the repetition degree, wherein if the target item in the key array is partially repeated, the repetition type of the current target report data is determined to be partial repetition.

[0033] In addition, to achieve the above-mentioned purpose, the present invention further provides a batch reporting device, the batch reporting device comprising:

[0034] A first storage module, for generating batch number information of the report file based on time information corresponding to the report file if a report file is received, and storing the report file and the batch number information in a temporary table of a database;

[0035] A second storage module is used to obtain the ID list of the report file in the temporary table based on the batch number information, and store the batch number information and the data ID in the ID list into an asynchronous table of the database;

[0036] A determination module, used to determine the corresponding target case report data in the asynchronous table based on the batch number information and the data ID, and add the target case report data to the case report queue based on the pre-created producer thread;

[0037] The consumption module is used to perform a repeatability check on the target report data in the report queue based on a pre-created consumption thread, and output a report result corresponding to the target report data.

[0038] In addition, to achieve the above-mentioned purpose, the present invention also provides a batch reporting device, which includes a processor, a memory, and a batch reporting program stored in the memory and executable by the processor, wherein when the batch reporting program is executed by the processor, the steps of the batch reporting method as described above are implemented.

[0039] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, on which a batch reporting program is stored, wherein when the batch reporting program is executed by a processor, the steps of the batch reporting method as described above are implemented.

[0040] The present invention provides a batch reporting method. If a report file is received, the batch number information of the report file is generated based on the time information corresponding to the report file, and the report file and the batch number information are stored in a temporary table of a database; based on the batch number information, the ID list of the report file in the temporary table is obtained, and the batch number information and the data ID in the ID list are stored in an asynchronous table of the database; based on the batch number information and the data ID, the corresponding target report data in the asynchronous table is determined, and based on a pre-created producer thread, the target report data is added to a report queue; based on a pre-created consumer thread, the target report data in the report queue is checked for repeatability, and the report result corresponding to the target report data is output. The present invention adds the batch report data in the report file to the report queue one by one through the batch number and the data ID corresponding to the ID list in the temporary table and the asynchronous table, and then performs asynchronous consumption through the consumer thread, thereby realizing batch reporting. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 A schematic diagram of the hardware structure of a batch reporting device involved in an embodiment of the present invention;

[0042] Figure 2 Schematic diagram of the process of the first embodiment of the batch reporting method of the present invention.

[0043] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0044] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0045] The batch reporting method involved in the embodiment of the present invention is mainly applied to a batch reporting device, which can be a device with display and processing functions such as a PC, a portable computer, or a mobile terminal.

[0046] Reference Figure 1 , Figure 1 The hardware structure diagram of the batch reporting device involved in the embodiment of the present invention is shown in FIG. In the embodiment of the present invention, the batch reporting device may include a processor 1001 (e.g., a CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to realize the connection and communication between these components; the user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard); the network interface 1004 may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface); the memory 1005 may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory, and the memory 1005 may optionally be a storage device independent of the aforementioned processor 1001.

[0047] Those skilled in the art will understand that Figure 1 The hardware structure shown in the figure does not constitute a limitation on the batch reporting device, and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.

[0048] Continue to refer to Figure 1 , Figure 1 The memory 1005 as a computer-readable storage medium may include an operating system, a network communication module, and a batch reporting program.

[0049] exist Figure 1 In the embodiment, the network communication module is mainly used to connect to the server and perform data communication with the server; and the processor 1001 can call the batch reporting program stored in the memory 1005 and execute the batch reporting method provided in the embodiment of the present invention.

[0050] An embodiment of the present invention provides a batch reporting method, which can be used in a batch reporting device, and the batch reporting device is hereinafter referred to as an export device.

[0051] Reference Figure 2 , Figure 2 Schematic diagram of the process of the first embodiment of the batch reporting method of the present invention.

[0052] In this embodiment, the batch reporting method includes the following steps:

[0053] Step S10, if a report file is received, then based on the time information corresponding to the report file, the batch number information of the report file is generated, and the report file and the batch number information are stored in a temporary table of the database;

[0054] Step S20, based on the batch number information, obtaining the ID list of the report file in the temporary table, and storing the batch number information and the data ID in the ID list into an asynchronous table of the database;

[0055] Step S30, based on the batch number information and the data ID, determining the corresponding target case report data in the asynchronous table, and adding the target case report data to the case report queue based on the pre-created producer thread;

[0056] Step S40: Based on the pre-created consumption thread, the target report data in the report queue is checked for repeatability, and the report result corresponding to the target report data is output.

[0057] The batch reporting method of this embodiment is applied to the batch reporting equipment of financial institutions such as banks and insurance companies. For the convenience of description, the batch reporting equipment is referred to as the reporting equipment. In the claims processing process of financial institutions such as banks and insurance companies, such as the reporting process of Yijian Insurance (personal accident insurance and health insurance), since there are many reporting data involved, multiple reporting data can be integrated into one reporting file in the form of Excel file during the reporting process, and then the integrated reporting file is uploaded to the reporting equipment for batch reporting. After receiving the reporting file, the reporting equipment adds the reporting data in the reporting file to the reporting queue through the temporary table and asynchronous table in the database, and finally consumes the reporting data in the reporting queue through the consumption thread, thereby realizing batch asynchronous reporting.

[0058] The following is a detailed description of each step:

[0059] Step S10: if a report file is received, batch number information of the report file is generated based on the time information corresponding to the report file, and the report file and the batch number information are stored in a temporary table of the database.

[0060] In this embodiment, if the reporting device receives a report file, it first generates a batch number information based on the time information corresponding to the report file to distinguish the current report file from other report files, and then stores the report file and the corresponding batch number information in a temporary table (temp) of data to temporarily save the report file and the corresponding batch number information.

[0061] Among them, the batch number information can be generated based on the time information corresponding to the report file. The batch number information is specifically a string similar to the yyyyMMddHHmmssSSS format generated by SimpleDateFormat (a class used to format dates in Java) and Date (time information). The time information can be specifically the current time information, or it can be the reporting time corresponding to the report file.

[0062] Further, in one embodiment, step S10 includes:

[0063] Step a1, if a report file is received, determining a check value of the report file, and determining whether the report file is a duplicate file based on the check value;

[0064] In one embodiment, if the reporting device receives a reporting file, it calculates the check value of the reporting file, and determines whether the current reporting file is a duplicate file through the check value, that is, determines whether the current reporting file is uploaded repeatedly, wherein the check value can specifically be an md5 value, and of course, sha-1, RIPEMD, Haval and other algorithms can also be used to determine the check value of the reporting file, as long as the check value is unique. Therefore, based on the unique check value, it can be determined whether the current reporting file is a duplicate file, wherein, if the current reporting file is determined to be a duplicate file, the reporting file is discarded.

[0065] Step a2: if not, verify the case report file based on preset verification rules;

[0066] In one embodiment, if it is determined that the current case report file is not a duplicate file, the case report file is verified using a preset verification rule.

[0067] In one embodiment, the specific verification rule is: verifying the header and data format of the report file.

[0068] That is, if it is determined that the current file is not a duplicate file, the header and data format of the report file will be checked. The specific verification method is divided into header verification and data verification.

[0069] Among them, the header verification includes obtaining the name and order of each field in the header of the report file, and comparing the names one by one with the header information pre-stored in the mapping table (storage table) in order. If they are consistent, the verification passes; if they are inconsistent, a prompt message of header error is returned.

[0070] The data format check includes determining whether the data format of each report data in the report file satisfies the pre-stored regular expression. If so, the check passes; if not, a prompt message indicating that the data format is incorrect is returned.

[0071] Step a3: if the verification is passed, the batch number information of the report file is generated based on the time information corresponding to the report file, and the check value, the report file and the batch number information are stored in a temporary table of the database.

[0072] In one embodiment, if the verification passes, the batch number information of the report file is generated based on the time information corresponding to the report file. The specific generation process will not be repeated here. Finally, the check value of the report file, the report file and the batch number information are stored in a temporary table of the database. The storage of the check value can be used for a duplication check with the report file uploaded later to determine whether the report file uploaded later is the same as the current report file. The storage of the batch number and the report file is used for the subsequent orderly addition of the report data in the same report file to the report queue.

[0073] Step S20, based on the batch number information, obtain the ID list of the report file in the temporary table, and store the batch number information and the data ID in the ID list into the asynchronous table of the database.

[0074] In this embodiment, the reporting device obtains the ID list of the reporting files in the temporary table according to the batch number information, that is, determines the detailed list of reporting data of different reporting files in the temporary table, and then stores the batch number information and the data ID in the ID list in the asynchronous table (asyn) of the database, so that the producer thread in the subsequent reporting device can add different reporting data in different reporting files to the reporting queue in order according to the batch number information and data ID.

[0075] It should be noted that while the reporting device stores the batch number information and data ID of the reporting file in the temporary table into the asynchronous table of the database, it also continuously generates corresponding batch number information for the received reporting file, and stores the reporting file and the corresponding batch number information in the temporary table, that is, storing the reporting file and the corresponding batch number information in the temporary table, and storing the batch number information and data ID in the asynchronous table are executed asynchronously.

[0076] Step S30, based on the batch number information and the data ID, determine the corresponding target report data in the asynchronous table, and add the target report data to the report queue based on the pre-created producer thread.

[0077] In this embodiment, the reporting device determines the target reporting data of the reporting file in the asynchronous table in turn according to the batch number information and the data ID, and then adds the target reporting data to the reporting queue through the pre-created producer thread, wherein the producer thread is created when the reporting device is started. In the reporting queue, the reporting data is added in batches, that is, according to the batch number information, the producer thread of the reporting device continuously adds the reporting data of the same batch to the reporting queue in order according to the data ID.

[0078] Step S40: Based on the pre-created consumption thread, the target report data in the report queue is checked for repeatability, and the report result corresponding to the target report data is output.

[0079] In this embodiment, the reporting device continuously obtains the target reporting data in the reporting queue and consumes it through a pre-created consumption thread in a while loop, wherein the consumption thread is created when the reporting device is started.

[0080] In the specific implementation, all the report data in the report file are added to the database temporary table temp table, and the ID list of the report data in the temp table is queried according to the batch number information, that is, the data ID of each report data in the temp table, and then, an asynchronous verification task is created to store the batch number information and data ID of the report data in the database asynchronous table asyn table, and at the same time, the upload success information is returned to prompt the relevant personnel that the report data has been successfully uploaded, and then, through the producer thread producer thread, the data required by the asynchronous task is continuously queried from the database asyn table in a while loop, specifically the batch number information and data ID of the report data, and then, the batch number information and data ID of the report data are added to the report queue, and finally, through the consumer thread consumer thread, the batch number and ID of the report data are obtained from the report queue in a while loop and consumed.

[0081] In one embodiment, the specific consumption process includes:

[0082] According to the obtained batch number information and data ID, the corresponding report data is found from the temp table, and then the duplicate data is verified according to the batch number information, policy number, accident time, certificate number, name, insurance type, liability, etc. of the report data, that is, the report data includes policy number, accident time, certificate number, name, insurance type and liability, etc.

[0083] It should be noted that before this, the repeatability of the entire report file was verified, and here the repeatability of a single report data is verified. The repeatability verification method is similar to the above and will not be repeated here. The following repeatability verification methods are also similar and will not be described in detail.

[0084] Furthermore, in one embodiment, the specific consumption process includes:

[0085] Based on the name and account number of the payee in the report data, verify whether the name and account number of the payee are correct and repeated, that is, the report data includes the name and account number of the payee.

[0086] Furthermore, in one embodiment, the specific consumption process includes:

[0087] Based on the policy number, name, ID number, accident time and reported data of the report data, verify whether the current report data is a duplicate report, that is, the report data includes the policy number, name, ID number and accident time.

[0088] Furthermore, in one embodiment, the specific consumption process includes:

[0089] The policy number and name in the report data are copied, that is, the policy information is obtained by copying the policy from the underwriting agency, and the validity of the policy, the duplicate names of the policy number and the empty information of the insured are verified. Among them, the validity can be determined according to the policy time. In the process of copying the policy, the policy number, name and accident time are used as input parameters for copying the policy, and the report number is generated by the institution code obtained from the copying, and it is updated to the database temp table. When the report result is displayed later, the report result can be bound to the report number, so that the user can intuitively understand the report result of the report data corresponding to each report number.

[0090] Furthermore, in one embodiment, the specific consumption process includes:

[0091] Considering that the data synchronization is not timely when the new and old systems take over services, it is also necessary to query and verify whether the current report data is a duplicate report from the old system, such as the old health insurance system, based on the policy number and accident time of the report data. That is, the report system running in the current report device is a new system. After the system is upgraded or the equipment is replaced, the current report device needs to verify the duplication of the current report data with the report data in the old system or old equipment.

[0092] Furthermore, in one embodiment, the specific consumption process includes:

[0093] Verify whether the ID number in the report data matches the corresponding policy information, that is, determine the corresponding policy information through the report data, compare the ID number in the report data with the ID number recorded in the policy information, and determine whether the two match.

[0094] Furthermore, in one embodiment, the specific consumption process includes:

[0095] Verify whether the accident time is within the effective period, that is, determine whether the policy is still valid.

[0096] That is, the consumption process is a verification process to ensure whether the report is successful. Therefore, after consumption, the corresponding report result is output, where the report result includes successful report and failed report. That is, in the above consumption process, if the verification passes, the report is successful, otherwise the report fails.

[0097] It should be emphasized that since the reporting data involves the privacy of users, in order to further ensure the privacy and security of the case handling data, the above temporary tables and asynchronous tables can be stored in a blockchain node.

[0098] If the present embodiment receives a report file, the batch number information of the report file is generated based on the time information corresponding to the report file, and the report file and the batch number information are stored in a temporary table of the database; based on the batch number information, the ID list of the report file in the temporary table is obtained, and the batch number information and the data ID in the ID list are stored in an asynchronous table of the database; based on the batch number information and the data ID, the corresponding target report data in the asynchronous table is determined, and based on the pre-created producer thread, the target report data is added to the report queue; based on the pre-created consumer thread, the target report data in the report queue is checked for repeatability, and the report result corresponding to the target report data is output. The present invention adds the batch report data in the report file to the report queue one by one through the batch number and the data ID corresponding to the ID list in the temporary table and the asynchronous table, and then performs asynchronous consumption through the consumer thread, thereby realizing batch reporting.

[0099] Furthermore, based on the first embodiment, a second embodiment of the batch reporting method of the present invention is proposed. The difference between the second embodiment of the batch reporting method and the first embodiment of the batch reporting method is that the step of storing the report file in the temporary table of the database includes:

[0100] Step b, determining a merge identifier of the report file, and based on the merge identifier, determining whether the report data in the report file needs to be merged;

[0101] Step c, if necessary, traverse and determine the data to be merged in the report file, and merge the data to be merged with the merged report data corresponding to the data to be merged;

[0102] Step d: storing the merged report file in a temporary table of the database.

[0103] In this embodiment, in the process of storing the case report file in the temporary table of the database, the case report data that can be merged is merged, which reduces memory and facilitates subsequent consumption.

[0104] The following is a detailed description of each step:

[0105] Step b: determining a merge identifier of the report file, and based on the merge identifier, determining whether the report data in the report file needs to be merged.

[0106] In this embodiment, after receiving the report file, the merge identifier of the report file is determined, wherein the merge identifier can be passed in by the front end, that is, when the front end uploads the report file, it identifies the report file so that the report file carries the merge identifier. In the specific implementation, the value of isMerge (identification field) is used to determine whether the report file needs to be merged. A value of "Y" indicates that a merge is required; a value of "N" indicates that a merge is not required.

[0107] Therefore, the reporting device can determine whether the reporting data in the current reporting file needs to be merged based on the merge identifier.

[0108] Furthermore, in one embodiment, the merge identifier can also be automatically generated by the reporting device for the report file. Specifically, the reporting device traverses to determine whether there is duplicate data in the report data in the report file. If so, a merge identifier that needs to be merged is generated for the current report file, wherein the duplicate data specifically refers to one or more report data with the same policy number, the same ID number, and the same name. That is, it is only necessary to determine whether the policy numbers and / or ID numbers and / or names of the report data in the report file are the same. If they are the same, it is determined that the current two report data are duplicate data. At this time, a merge identifier that needs to be merged for the current report file is generated. Otherwise, a merge identifier that does not need to be merged is generated. It is also possible not to generate a merge identifier at present to indicate that the current report file does not need to be merged.

[0109] Step c: if necessary, traverse and determine the data to be merged in the report file, and merge the data to be merged with the merged report data corresponding to the data to be merged.

[0110] In this embodiment, if it is determined that the report data of the current report file needs to be merged, the data to be merged in the report file is traversed to determine. In addition, the merged report data corresponding to the data to be merged must be determined, that is, which report data needs to be merged and where to merge, and then the data to be merged is merged with the merged report data.

[0111] Specifically, in one embodiment, if necessary, the step of traversing and determining the data to be merged in the case report file includes:

[0112] Step c1, if necessary, determining the key features corresponding to the current report data in the report file in turn, and determining whether there is a target key feature identical to the key feature in the comparison library corresponding to the report file;

[0113] In one embodiment, if it is determined that the report data of the current report file needs to be merged, the key features (key) corresponding to the current report data in the current report file are determined in turn, wherein "policy number + certificate number + name + accident time" is used as the key feature in this embodiment, and it is determined by traversing whether there is target report data with consistent key features in the current report file, that is, the key features corresponding to the current report data in the report file are determined in turn, and then the key features are compared with the key features in the comparison library to determine whether there is a target key feature in the comparison library that matches the key feature.

[0114] Step c2, if it does not exist, saving the key feature into the comparison library;

[0115] In one embodiment, if there is no target key feature matching the key feature in the comparison library, it means that the current report data does not need to be merged with the previous report data, so the key feature of the current report data is saved in the comparison library to facilitate determination of whether subsequent report data needs to be merged with the current report data.

[0116] Step c3: if it exists, determine the current reported data as data to be merged.

[0117] In one embodiment, if there is a target key feature matching the key feature in the comparison library, the current case report data is determined to be the data to be merged, and the case report data corresponding to the target key feature is the merged case report data.

[0118] It should be noted that the comparison library is a preset storage area, and there may be only one comparison library in the reporting device, that is, the key features of any report data are stored in the comparison library. In order to avoid confusion in the report data of different batches of report files, the reporting device deletes the key features of the report data in the current report file in the comparison library after processing the report files of the current batch; in one embodiment, the reporting device generates a comparison library based on the report file, that is, one report file corresponds to one comparison library, and the comparison library only stores the key features of the report data in the report file, that is, the confirmation of the data to be merged in different batches of report files does not interfere with each other, and can be carried out asynchronously at the same time.

[0119] Further, in one embodiment, the step of merging the data to be merged with the merged case report data corresponding to the data to be merged includes:

[0120] Step c4, based on the key features, determining the target data corresponding to the data to be merged, and based on the target key features, determining the merge position corresponding to the merged report data;

[0121] In one embodiment, in the process of merging the data to be merged with the merged report data, the target data corresponding to the merged data is first determined through the key features, and then the merging position corresponding to the merged report data is determined through the target key features. For ease of understanding, this embodiment takes the report data including the policy number, certificate number, name, accident time, insurance type, liability, serial number and amount, and the key features including the policy number, certificate number, name and accident time as an example for explanation. First, the reporting device first determines the target data corresponding to the data to be merged through the key features, that is, determines the insurance type, liability, serial number and amount corresponding to the data to be merged, and then, determines the merging position corresponding to the merged report data through the target key features, that is, determines which positions in the merged report data the insurance type, liability, serial number and amount corresponding to the data to be merged should be merged into, specifically the latter rank of the insurance type, liability, serial number and amount corresponding to the merged report data.

[0122] Step c5: merging the data to be merged with the merged report data based on the target data and the merge position.

[0123] Finally, according to the determined target data and merge position, the data to be merged is merged with the merged report data, specifically the target data is placed at the merge position, and the key features corresponding to the data to be merged are deleted.

[0124] In the specific implementation, first determine the key features of the data to be merged corresponding to the merge identifier, such as the "policy number + certificate number + name + accident time" of the data to be merged as the key features, and determine whether there is merged report data with consistent key features through traversal. If so, the insurance type, liability, serial number, and amount of the data to be merged are concatenated with the target report data in the form of commas. For example:

[0125] Before the merger:

[0126] The data to be merged are: Policy Number 1 ID Number 1 Name 1 Accident Time 1 Insurance Type 1 Liability 1 Serial Number 1 Amount 1;

[0127] The merged report data is: policy number 1, ID number 1, name 1, accident time 1, insurance type 2, liability 2, serial number 2, amount 2.

[0128] After merging, it will be: Policy number 1, ID number 1, Name 1, Accident time 1, Insurance type 1, Insurance type 2, Liability 1, Liability 2, Serial number 1, Serial number 2, Amount 1, Amount 2.

[0129] It should be noted that, when merging, in addition to using commas to distinguish the target data from the original merged report data, distinguishing symbols such as , (comma) can also be used to distinguish them.

[0130] Step d: storing the merged report file in a temporary table of the database.

[0131] Finally, the merged report file is stored in a temporary table of the database.

[0132] In the process of storing the case report file in the temporary table of the database, this embodiment merges the case report data that can be merged, which reduces memory, facilitates subsequent consumption, and improves the intelligence of batch asynchronous processing.

[0133] Furthermore, based on the first and second embodiments, a third embodiment of the batch reporting method of the present invention is proposed. The third embodiment of the batch reporting method is different from the first and second embodiments of the batch reporting method in that step S40 includes:

[0134] Step e, determining in sequence whether the current target case report data is merged data based on the pre-created consumer threads;

[0135] Step f, if yes, determining the key array corresponding to the current target case report data, and determining the repetition type of the current target case report data based on the key array;

[0136] Step g: if the repetition type is partial repetition, determining the initial target data corresponding to the current target case report data and the initial merge position corresponding to the current target case report data;

[0137] Step h, based on the initial target data and the initial merge position, splitting the current target report data to obtain split report data;

[0138] Step i, respectively outputting the reporting results corresponding to the split reporting data, wherein the reporting results include reporting failure.

[0139] In this embodiment, when consuming the report data in the report queue through the consumption thread, if the current report data is merged data, the report data will be restored and split while consuming the report data, and then the report results will be output separately, so that the user can understand the report results of each report data, thereby improving the intelligence of batch reporting.

[0140] The following is a detailed description of each step:

[0141] Step e: determining in sequence whether the current target report data is merged data based on the pre-created consumption threads.

[0142] In this embodiment, the reporting device determines whether the current target report data is merged data through a pre-created consumption thread, and specifically determines whether the current target report data contains preset distinguishing symbols such as commas or semicolons. If so, it is determined that the current target report data is merged data.

[0143] Step f, if yes, determining the key array corresponding to the current target case report data, and determining the repetition type of the current target case report data based on the key array;

[0144] In this embodiment, if it is determined that the current target report data is merged data, the key array corresponding to the current target report data is first determined, and the repetition type of the current target report data is determined through the key array, wherein the key array refers to an array separated by preset distinguishing symbols such as commas, such as insurance type array = {insurance type 1, insurance type 2, insurance type 2}, etc., and the repetition types include full repetition, partial repetition and no repetition.

[0145] Specifically, in one embodiment, step f includes:

[0146] Step f1, if yes, determine the key array corresponding to the current target case report data, and determine the target item corresponding to the key array;

[0147] In one embodiment, if it is determined that the current target report data is merged data, the key array corresponding to the current target data is first determined, and the target item corresponding to the key data is determined, such as the above-mentioned insurance type array, whose target item is {insurance type 1, insurance type 2, insurance type 2}.

[0148] Step f2, traverse to determine the repetition degree of the target item in the key array, and determine the repetition type of the current target report data based on the repetition degree, wherein if the target item in the key array is partially repeated, the repetition type of the current target report data is determined to be partial repetition.

[0149] Then, the repetition degree of the target item in the key array is determined by traversing, wherein the repetition degree of the target item includes full repetition, partial repetition and no repetition. Specifically, each target item is compared to determine the ratio of the number of repetitions of the target item to the total number of target items. If the ratio is 1, the repetition degree of the target item is determined to be full repetition. If the ratio is 0, the repetition degree of the target item is determined to be no repetition. If the ratio is between 0 and 1, the repetition degree of the target item is determined to be partial repetition. It should be explained that the repetitions of different target items do not add up the number of repetitions, such as {insurance type 1, insurance type 1, insurance type 1, insurance type 2, insurance type 2}, the number of repetitions is 3, or 2, that is, insurance type 1 has three repetitions, or insurance type 2 has two repetitions.

[0150] Then, the repetition type of the target report data is determined according to the repetition degree of the target item. If the target item in the key array is partially repeated, the repetition type of the current target report data is determined to be partial repetition, and other repetition degrees also correspond to the repetition types one by one.

[0151] Step g: if the repetition type is partial repetition, determining the initial target data corresponding to the current target case report data and the initial merge position corresponding to the current target case report data;

[0152] In this embodiment, if it is determined that the repetition type of the current target report data is partial repetition, the initial target data corresponding to the target report data and the initial merge position corresponding to the target report data are determined, that is, it is determined how the current target report data is merged. As explained above, the merging of report data requires the separate determination of the target data of the data to be merged and the merge position of the merged report data. Therefore, conversely, when splitting, the corresponding initial target data and initial merge position are also required.

[0153] Step h, based on the initial target data and the initial merge position, splitting the current target report data to obtain split report data;

[0154] Then, based on the initial target data and the initial merge position, the current target report data is split. Specifically, based on the initial target data, the key features of the current target report data are copied, and according to the initial merge position, the initial target data is extracted, and the initial target data is spliced ​​with the key features, thereby splitting two split report data from the current target report data.

[0155] Step i, respectively outputting the reporting results corresponding to the split reporting data, wherein the reporting results include reporting failure.

[0156] Finally, the reporting results corresponding to the split reporting data are output respectively, and the reporting results include reporting failure.

[0157] In addition, in one embodiment, the report result also includes prompt information corresponding to the report failure, which is used to prompt the specific reason for the report failure, such as "data is repeated, the sequence number is *", or "data is repeated, the responsibility is *", and then the status of the current target report data is set to "report failure", and then it is inserted into the corresponding temp table. After that, the report data of successful and failed reports in the temp table are queried out and displayed separately on the display interface of the report device, so that the user knows which data is successfully reported and which data is failed.

[0158] In the specific implementation, the merged insurance type, liability, serial number, and amount strings are split into arrays using commas as separators, such as insurance type array = {insurance type 1, insurance type 2, insurance type 2}. After the for loop traverses the array, it can be seen that the second and third in the array are repeated. The temporary variable records the subscript of the repeated data in the array, and the data is removed from the array. The remaining data is non-repeated data. The removed data is repeated data. Then the liability, serial number and amount arrays are also removed in a similar way according to the recorded subscript.

[0159] For example, before the merged data (current target report data) is split: policy number, ID number, name, accident time, insurance type 1, insurance type 2, insurance type 2, liability 1, liability 2, liability 2, serial number 1, serial number 2, serial number 3, amount 1, amount 2, amount 3.

[0160] After merging data and splitting:

[0161] Split 1 (split report data): Policy number ID number Name Time of accident Insurance type 1 Liability 1 Serial number 1 Amount 1

[0162] Split 2 (split report data): Policy number Document number Name Time of accident Insurance type 2, Insurance type 2 Liability 2, Liability 2 Serial number 2, Serial number 3 Amount 2, Amount 3

[0163] Furthermore, the detailed information of the insurance policy is queried according to the insurance policy number of the current target report data, and the insurance type and liability list associated with it is specifically retrieved. The for loop traverses the insurance type and liability array, and determines whether the insurance type and liability of the current target report data exist in the List. If not, the insurance type or liability in the current target report data is invalid, and the report of the current report data fails. If it exists, a message of successful report is sent to complete the report, and the report task is completed.

[0164] When this embodiment consumes the report data in the report queue through the consumption thread, if the current report data is merged data, the report data will be restored and split while consuming the report data, and then the report results will be output separately, so that the user can understand the report results of each report data, thereby improving the intelligence of batch reporting.

[0165] In addition, an embodiment of the present invention also provides a batch reporting device.

[0166] In this embodiment, the batch reporting device includes:

[0167] A first storage module, for generating batch number information of the report file based on time information corresponding to the report file if a report file is received, and storing the report file and the batch number information in a temporary table of a database;

[0168] A second storage module is used to obtain the ID list of the report file in the temporary table based on the batch number information, and store the batch number information and the data ID in the ID list into an asynchronous table of the database;

[0169] A determination module, used to determine the corresponding target case report data in the asynchronous table based on the batch number information and the data ID, and add the target case report data to the case report queue based on the pre-created producer thread;

[0170] The consumption module is used to perform a repeatability check on the target report data in the report queue based on a pre-created consumption thread, and output a report result corresponding to the target report data.

[0171] Furthermore, the first storage module is also used for:

[0172] If a case report file is received, determining a checksum value of the case report file, and determining whether the case report file is a duplicate file based on the checksum value;

[0173] If not, verify the case report file based on preset verification rules;

[0174] If the verification is successful, the batch number information of the report file is generated based on the time information corresponding to the report file, and the check value, the report file and the batch number information are stored in a temporary table of the database.

[0175] Furthermore, the first storage module is also used for:

[0176] Determine a merge identifier of the report file, and based on the merge identifier, determine whether the report data in the report file needs to be merged;

[0177] If necessary, traverse and determine the data to be merged in the report file, and merge the data to be merged with the merged report data corresponding to the data to be merged;

[0178] The merged report file is stored in a temporary table of the database.

[0179] Furthermore, the first storage module is also used for:

[0180] If necessary, determine the key features corresponding to the current report data in the report file in turn, and determine whether there is a target key feature identical to the key feature in the comparison library corresponding to the report file;

[0181] If not, saving the key feature into the comparison library;

[0182] If it exists, the current reported data is determined to be data to be merged.

[0183] Furthermore, the first storage module is also used for:

[0184] Based on the key features, determining the target data corresponding to the data to be merged, and based on the target key features, determining the merge position corresponding to the merged report data;

[0185] Based on the target data and the merging position, the data to be merged is merged with the merged report data.

[0186] Furthermore, the consumption module is also used for:

[0187] Determine in sequence based on the pre-created consumer threads whether the current target case report data is merged data;

[0188] If yes, determining the key array corresponding to the current target case report data, and determining the repetition type of the current target case report data based on the key array;

[0189] If the repetition type is partial repetition, determining the initial target data corresponding to the current target case report data and the initial merge position corresponding to the current target case report data;

[0190] Based on the initial target data and the initial merge position, split the current target case report data to obtain split case report data;

[0191] The report results corresponding to the split report data are output respectively, and the report results include report failure.

[0192] Furthermore, the consumption module is also used for:

[0193] If yes, determine the key array corresponding to the current target case report data, and determine the target item corresponding to the key array;

[0194] The repetition degree of the target item in the key array is determined by traversing, and the repetition type of the current target report data is determined based on the repetition degree, wherein if the target item in the key array is partially repeated, the repetition type of the current target report data is determined to be partial repetition.

[0195] Among them, the various modules and units in the above-mentioned batch reporting device correspond to the various steps in the above-mentioned batch reporting method embodiment, and their functions and implementation processes are no longer repeated here one by one.

[0196] In addition, an embodiment of the present invention further provides a computer-readable storage medium.

[0197] The computer-readable storage medium of the present invention stores a batch reporting program, wherein when the batch reporting program is executed by a processor, the steps of the batch reporting method described above are implemented.

[0198] Among them, the method implemented when the batch reporting program is executed can refer to the various embodiments of the batch reporting method of the present invention, and will not be repeated here.

[0199] The blockchain referred to in this invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.

[0200] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0201] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0202] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present invention.

[0203] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A batch reporting method, characterized in that: The batch reporting method comprises the following steps: If a report file is received, batch number information of the report file is generated based on the time information corresponding to the report file, and the report file and the batch number information are stored in a temporary table of the database; Based on the batch number information, obtain the ID list of the report file in the temporary table, and store the batch number information and the data ID in the ID list into an asynchronous table of the database; Based on the batch number information and the data ID, determine the corresponding target case report data in the asynchronous table, and add the target case report data to the case report queue based on the pre-created producer thread; Based on the pre-created consumption thread, the target report data in the report queue is checked for repeatability, and the report result corresponding to the target report data is output; The step of performing a repeatability check on the target case reporting data in the case reporting queue based on the pre-created consumption thread and outputting a case reporting result corresponding to the target case reporting data includes: Determine in sequence based on the pre-created consumer threads whether the current target case report data is merged data; If yes, determine the key array corresponding to the current target case report data, and determine the target item corresponding to the key array; Determine the degree of repetition of the target item in the key array by traversing, and determine the repetition type of the current target case report data based on the repetition degree, wherein if the target item in the key array is partially repeated, determine the repetition type of the current target case report data as partial repetition; If the repetition type is partial repetition, determining the initial target data corresponding to the current target case report data and the initial merge position corresponding to the current target case report data; Based on the initial target data and the initial merge position, split the current target case report data to obtain split case report data; The report results corresponding to the split report data are output respectively, and the report results include report failure.

2. The batch reporting method according to claim 1, characterized in that: If a report file is received, the steps of generating batch number information of the report file based on the time information corresponding to the report file, and storing the report file and the batch number information in a temporary table of the database include: If a case report file is received, determining a checksum value of the case report file, and determining whether the case report file is a duplicate file based on the checksum value; If not, verify the case report file based on preset verification rules; If the verification is successful, the batch number information of the report file is generated based on the time information corresponding to the report file, and the check value, the report file and the batch number information are stored in a temporary table of the database.

3. The batch reporting method according to claim 1, characterized in that: The step of storing the case report file in a temporary table of a database includes: Determine a merge identifier of the report file, and based on the merge identifier, determine whether the report data in the report file needs to be merged; If necessary, traverse and determine the data to be merged in the report file, and merge the data to be merged with the merged report data corresponding to the data to be merged; The merged report file is stored in a temporary table of the database.

4. The batch reporting method according to claim 3, characterized in that: If necessary, the step of traversing and determining the data to be merged in the report file includes: If necessary, determine the key features corresponding to the current report data in the report file in turn, and determine whether there is a target key feature identical to the key feature in the comparison library corresponding to the report file; If not, the key feature is saved in the comparison library; If it exists, the current reported data is determined to be data to be merged.

5. The batch reporting method according to claim 4, characterized in that: The step of merging the data to be merged with the merged case reporting data corresponding to the data to be merged comprises: Based on the key features, determining the target data corresponding to the data to be merged, and based on the target key features, determining the merge position corresponding to the merged case report data; Based on the target data and the merging position, the data to be merged is merged with the merged report data.

6. A batch reporting device, characterized in that: The batch reporting device comprises: A first storage module is used for, if a report file is received, generating batch number information of the report file based on time information corresponding to the report file, and storing the report file and the batch number information in a temporary table of a database; A second storage module is used to obtain the ID list of the report file in the temporary table based on the batch number information, and store the batch number information and the data ID in the ID list into an asynchronous table of the database; A determination module, used to determine the corresponding target case report data in the asynchronous table based on the batch number information and the data ID, and add the target case report data to the case report queue based on the pre-created producer thread; A consumption module, used for performing a repeatability check on the target case reporting data in the case reporting queue based on a pre-created consumption thread, and outputting a case reporting result corresponding to the target case reporting data; The consumption module is also used to determine in sequence whether the current target report data is merged data based on the pre-created consumption thread; if so, determine the key array corresponding to the current target report data, and determine the target item corresponding to the key array; traverse to determine the degree of repetition of the target item in the key array, and determine the repetition type of the current target report data based on the repetition degree, wherein if the target item in the key array is partially repeated, determine the repetition type of the current target report data as partial repetition; if the repetition type is partial repetition, determine the initial target data corresponding to the current target report data and the initial merge position corresponding to the current target report data; based on the initial target data and the initial merge position, split the current target report data to obtain split report data; and output the report results corresponding to the split report data respectively, and the report results include report failure.

7. A batch reporting device, characterized in that: The batch reporting device includes a processor, a memory, and a batch reporting program stored in the memory and executable by the processor, wherein when the batch reporting program is executed by the processor, the steps of the batch reporting method as described in any one of claims 1 to 5 are implemented.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a batch reporting program, wherein when the batch reporting program is executed by the processor, the steps of the batch reporting method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Claim settlement data processing method, device and equipment and computer readable storage medium

    CN109801174A

  • Information processing method and device and electronic equipment

    CN110033385A