Universal method, system and device for generating messages in batch processing mode and storage medium

Through batch processing, the problem of high server memory and poor fault tolerance of microfinance regulators when submitting data is solved, memory saving and data integrity are improved, and it is suitable for the integration of multiple regulatory methods. Scene.

CN119168759AInactive Publication Date: 2024-12-20中和农信农业集团有限公司
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411069350.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-06
Publication Date
2024-12-20
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

When microfinance regulators submit data, the existing technology leads to high server memory expenditure and poor fault tolerance, especially when resource recycling and multiple regulatory methods are integrated.

Method used

Using batch processing to generate messages, the message file records are generated by obtaining the list of messages to be generated. If the status is not generated or is being generated, the flow records are obtained, the page generates the details of the packet and passes transaction processing, and additional writes Files to ensure data integrity and fault tolerance.

Benefits of technology

Reduces server memory expenditure, improves fault tolerance, avoids repeated generation of completed messages, ensures data integrity and correctness, and supports modification and addition of data to regenerate message files.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119168759A_ABST
    Figure CN119168759A_ABST
Patent Text Reader

Abstract

The invention discloses a general method, system and device for generating messages in batches, and a storage medium. The method comprises the following steps: generating a message file record of a single to-be-generated message in a to-be-generated message list; if the message state recorded in the message file record is that the message is not generated or the message is generated, acquiring a pipeline record of a single to-be-generated message; according to the flow record, obtaining related data of ungenerated messages in the single to-be-generated message, and generating all message details of the single to-be-generated message by adopting transaction paging; the message details are written into the message file in an appended mode until all the message details corresponding to the single to-be-generated message are written into the message file, and message generation of the single to-be-generated message is completed; and polling the message generation of all single messages to be generated in the message list to be generated, and when the message generation of all single messages to be generated is completed, completing the message generation of the message list to be generated. According to the invention, the memory expenditure of the server can be reduced and the fault-tolerant capability is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a general method, system, device and storage medium for batch processing message generation. Background Art

[0002] The reporting of small loans mainly reflects the reporting data. According to the compliance requirements of small loans, each small loan must report data to the corresponding supervision. The reporting methods of each supervision are different, including XML file reporting, TXT file reporting, interface reporting, etc. In the case of resource recovery, each small loan used to have a separate service, but now it is integrated into one service. Therefore, the requirements for server memory expenditure are higher. At present, most small loan regulatory agencies submit data in the form of files, and there is also full reporting, which increases server memory expenditure and has poor fault tolerance. Summary of the invention

[0003] The present application aims to propose a general method, system, device and storage medium for batch processing message generation, which can reduce server memory expenses and improve fault tolerance.

[0004] In a first aspect, an embodiment of the present application provides a general method for batch processing message generation, the method comprising:

[0005] Get the list of messages to be generated in the reporting plan;

[0006] Generate a message file record of a single message to be generated in the list of messages to be generated, wherein the message file record is used to record the message status of the message to be generated;

[0007] If the message status is recorded in the message file record as message not generated or message being generated, obtaining a flow record of the single message to be generated, wherein the flow record is an information indication for obtaining relevant data of the ungenerated message in the single message to be generated;

[0008] According to the flow record, obtain the relevant data of the ungenerated message in the single message to be generated, and use the transaction to generate all the message details of the single message to be generated in pages;

[0009] Acquire the message details in pages, and write the message details into a message file in an appending manner until all message details corresponding to the single message to be generated are written into the message file, thereby completing the message generation of the single message to be generated;

[0010] The message generation of all the individual messages to be generated in the message list to be generated is polled, and when the message generation of all the individual messages to be generated is completed, the message generation of the message list to be generated is completed.

[0011] Compared with the prior art, the first aspect of the present application has the following beneficial effects:

[0012] This method generates a message file record of a single message to be generated in a list of messages to be generated. If the message status recorded in the message file record is that the message is not generated or the message is being generated, then a running record of the single message to be generated is obtained, wherein the running record is an information indication for obtaining relevant data of the ungenerated message in the single message to be generated. It is only necessary to obtain relevant data of the ungenerated message or the part of the ungenerated message in the message generation for later message generation. Even if an abnormal situation occurs, there is no need to repeat the message generation for the already generated message, thereby saving the memory overhead of the server. Then, according to the running record, the relevant data of the ungenerated message in the single message to be generated is obtained, and transactions are used to generate all the message details of the single message to be generated in paging. Through paging and transaction processing, the integrity, consistency and correctness of the data can be guaranteed, thereby improving the fault tolerance capability. Then, the message details are obtained through paging, and the message details are written into the message file in an appended manner until all the message details corresponding to the single message to be generated are written into the message file, thereby completing the message generation of the single message to be generated. By separating the generated message details from the generated message file, it is convenient to modify and add data to regenerate the message file.

[0013] In some implementations, the message file record is further used to record the amount of generated message data of the message to be generated. After obtaining the data related to the single message to be generated, the method further includes:

[0014] If an abnormal exit from a transaction occurs during the process of generating the message details of the single message to be generated by paging using a transaction, then determining whether the message file record exists;

[0015] If the message file record exists, obtaining the generated message data volume recorded in the message file record;

[0016] In addition to the generated messages corresponding to the generated message data volume in the single message to be generated, the remaining ungenerated messages are obtained, and the message details of the remaining ungenerated messages are generated by using transaction paging until all the message details of the single message to be generated are generated.

[0017] In some implementations, acquiring, according to the log record, relevant data of ungenerated messages in the single message to be generated, and using transactions to generate all message details of the single message to be generated in pages, includes:

[0018] According to the loan note number in the log record, obtain the relevant data of the ungenerated message in the single message to be generated;

[0019] A transaction is used to generate message details for relevant data of the single message to be generated that has not been generated in the single message to be generated obtained by paging, until all relevant data obtained by paging are generated into message details, thereby completing the generation of all message details of the single message to be generated.

[0020] In some implementations, after generating message details for the relevant data of the single message to be generated that is obtained by paging but has not yet been generated, the method further includes:

[0021] Performing code value conversion on some fields in the message details to obtain code value converted message details, and saving the code value converted message details and the message details that do not need to be converted;

[0022] Obtain the message data volume corresponding to the message details after code value conversion and the message details that do not need code value conversion;

[0023] According to the message data volume, the generated message data volume and the flow record recorded in the message file record are updated.

[0024] In some implementations, before obtaining the message details by paging, the method further includes:

[0025] Delete the generated historical message file, where the historical message file is the message file of the generated message corresponding to the previous message to be generated before the current message to be generated.

[0026] In some implementations, after completing the message generation of the single message to be generated, the method further includes:

[0027] After completing the message generation of the single message to be generated, a local file is generated;

[0028] Delete the local file.

[0029] In some implementations, after completing the message generation of the single message to be generated, the method further includes:

[0030] Obtaining a list of generated messages in the reporting plan;

[0031] After the message generation of the single message to be generated is completed, the generated message list is updated.

[0032] In a second aspect, an embodiment of the present application further provides a general system for batch processing message generation, the system comprising:

[0033] A first data acquisition unit is used to acquire a list of messages to be generated in a reporting plan;

[0034] A first data generating unit, configured to generate a message file record of a single message to be generated in the list of messages to be generated, wherein the message file record is used to record a message status of the message to be generated;

[0035] A second data acquisition unit is used to acquire a flow record of the single message to be generated if the message status is recorded in the message file record as message not generated or message being generated, wherein the flow record is an information indication for acquiring relevant data of the ungenerated message in the single message to be generated;

[0036] A second data generating unit is used to obtain relevant data of ungenerated messages in the single message to be generated according to the log record, and generate all message details of the single message to be generated in pages by using transactions;

[0037] A single message completion unit, used for acquiring the message details by paging, and writing the message details into a message file by appending, until all message details corresponding to the single message to be generated are written into the message file, thereby completing the message generation of the single message to be generated;

[0038] The all-message completion unit is used to poll the message generation of all individual messages to be generated in the message list to be generated, and when all individual messages to be generated have completed message generation, the message generation of the message list to be generated is completed.

[0039] In the third aspect, an embodiment of the present application also provides an electronic device, comprising at least one control processor and a memory for communicating with the at least one control processor; the memory stores instructions that can be executed by the at least one control processor, and the instructions are executed by the at least one control processor so that the at least one control processor can execute a general method for batch generating messages as described above.

[0040] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute a general method for batch generating messages as described above.

[0041] It can be understood that the beneficial effects of the second to fourth aspects compared with the related art are the same as the beneficial effects of the first aspect compared with the related art. Please refer to the relevant description in the first aspect, and no further details will be given here. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:

[0043] Figure 1 It is a flowchart of an embodiment of a general method for batch processing message generation provided by the present application;

[0044] Figure 2 It is a schematic diagram of the overall flow of a best embodiment of a general method for batch processing message generation provided by the present application;

[0045] Figure 3 It is a structural schematic diagram of an embodiment of a general system for batch processing message generation provided by the present application;

[0046] Figure 4 It is a structural schematic diagram of an embodiment of an electronic device provided by the present application. DETAILED DESCRIPTION

[0047] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be understood as limiting the present application.

[0048] In the description of this application, if there is a description of first, second, etc., it is only for the purpose of distinguishing technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.

[0049] In the description of the present application, it should be understood that the descriptions involving orientation, such as the orientation or positional relationship indicated as up, down, etc., are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.

[0050] In the description of this application, it should be noted that, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meaning of the above terms in this application based on the specific content of the technical solution.

[0051] The reporting of small loans mainly reflects the reporting data. According to the compliance requirements of small loans, each small loan must report data to the corresponding supervision. The reporting methods of each supervision are different, including XML file reporting, TXT file reporting, interface reporting, etc. In the case of resource recovery, each small loan used to have a separate service, but now it is integrated into one service. Therefore, the requirements for server memory expenditure are higher. At present, most small loan regulatory agencies submit data in the form of files, and there is also full reporting, which increases server memory expenditure and has poor fault tolerance.

[0052] In order to solve the above-mentioned problems of large server memory expenditure and poor fault tolerance, the present application proposes a general method, system, device and storage medium for batch processing message generation.

[0053] Reference Figure 1 The present application embodiment provides a general method for batch processing message generation, and the method comprises the following steps:

[0054] Step S100, obtaining a list of messages to be generated in the reporting plan;

[0055] Step S200: Generate a message file record of a single message to be generated in the message list to be generated, wherein the message file record is used to record the message status of the message to be generated;

[0056] Step S300: If the message status recorded in the message file record is that the message is not generated or the message is being generated, then a running record of a single message to be generated is obtained, wherein the running record is an information indication for obtaining relevant data of the ungenerated message in the single message to be generated;

[0057] Step S400: According to the flow record, obtain the relevant data of the ungenerated message in the single message to be generated, and use the transaction to generate all the message details of the single message to be generated in pages;

[0058] Step S500, obtaining message details by paging, and writing the message details into the message file by appending, until all message details corresponding to the single message to be generated are written into the message file, thus completing the message generation of the single message to be generated;

[0059] Step S600: polling the message generation of all individual messages to be generated in the message list to be generated. When the message generation of all individual messages to be generated is completed, the message generation of the message list to be generated is completed.

[0060] In this embodiment, by generating a message file record of a single message to be generated in the list of messages to be generated, if the message status recorded in the message file record is that the message has not been generated or the message is being generated, then the running record of the single message to be generated is obtained, wherein the running record is an information indication for obtaining the relevant data of the ungenerated message in the single message to be generated, and only the relevant data of the ungenerated message or the part of the ungenerated message in the message generation needs to be obtained for the later message generation, and even if an abnormal situation occurs, there is no need to repeat the message generation for the already generated message, thereby saving the memory overhead of the server. Then, according to the running record, the relevant data of the ungenerated message in the single message to be generated is obtained, and transactions are used to generate all the message details of the single message to be generated in paging, and the integrity, consistency and correctness of the data can be guaranteed through paging and transaction processing, thereby improving the fault tolerance capability. Then, the message details are obtained through paging, and the message details are written into the message file in an appended manner until all the message details corresponding to the single message to be generated are written into the message file, thereby completing the message generation of the single message to be generated. By separating the generated message details from the generated message file, it is convenient to modify and add data to regenerate the message file.

[0061] The above-mentioned reporting plan may be the messages that each microfinance company needs to report, and the reporting plan includes a list of messages to be generated and a list of messages that have been generated, etc. The reporting plan may be generated according to the frequency of reporting messages by each microfinance company, and record the entire message generation process status and message information (i.e., a list of messages to be generated and a list of messages that have been generated, etc.) of each frequency.

[0062] The above-mentioned list of messages to be generated may be a list formed by multiple messages that each microfinance company plans to generate.

[0063] The above-mentioned message file record is used to record the message status of the message to be generated, and the message status includes an ungenerated message, a message being generated, and a generated message.

[0064] The above-mentioned transaction records may be transaction records of successful loan issuance, repayment and extension, etc. The transaction records include the record type and loan note number of the loan issuance, repayment and extension, etc.

[0065] The above-mentioned loan note number can be the related loan note number that will be generated when the loan is successfully issued (that is, the unique number related to each loan).

[0066] The above transaction can be a minimum indivisible work unit. Usually, a transaction corresponds to a complete business. For example, a bank account transfer business is a minimum work unit. When processing data (modification, addition, etc.) within a transaction, if a problem occurs, all modified data will be rolled back.

[0067] The above-mentioned writing of the message details into the message file by appending can be that the message details are written from the beginning each time the message file is generated, that is, each time a message file for a message to be generated is generated, the message details corresponding to the message to be generated are written from the beginning into the message file.

[0068] The above paging can be to obtain data in batches. For example, if the total amount of data is 1 million, 1000 pieces are obtained each time, and paging is performed 1000 times to complete the retrieval.

[0069] In some implementations, the message file record is further used to record the amount of generated message data of the message to be generated. After obtaining the relevant data of a single message to be generated, the method further includes:

[0070] If an abnormal exit from a transaction occurs during the process of generating the message details of a single message to be generated by paging using a transaction, it is determined whether the message file record exists;

[0071] If the message file record exists, the amount of generated message data recorded in the message file record is obtained;

[0072] In addition to the generated messages corresponding to the generated message data volume in the single message to be generated, the remaining ungenerated messages are obtained, and the message details of the remaining ungenerated messages are generated by using transaction paging until all the message details of the single message to be generated are generated.

[0073] In this embodiment, when an abnormal exit occurs during the process of using transactions and paging to generate message details of a single message to be generated, it is determined whether a message file record exists. If the message file record exists, the amount of generated message data recorded in the message file record is obtained, and the remaining ungenerated messages are obtained in addition to the generated messages corresponding to the amount of generated message data in the single message to be generated, and the message details of the remaining ungenerated messages are generated by using transaction paging. In this way, when an abnormal situation occurs, it is only necessary to use transaction paging to generate the message details of the remaining ungenerated messages, and there is no need to repeat the message generation for the already generated messages, which saves the memory overhead of the server and greatly improves the fault tolerance and processing efficiency of the server system.

[0074] In some implementations, according to the log record, relevant data of ungenerated messages in a single message to be generated is obtained, and transactions are used to generate all message details of the single message to be generated in pages, including:

[0075] According to the loan note number in the running record, obtain the relevant data of the ungenerated message in the single message to be generated;

[0076] A transaction is used to generate message details for relevant data of a single message to be generated that has not been generated in the single message to be generated obtained by paging, until all relevant data obtained by paging are generated into message details, completing the generation of all message details of the single message to be generated.

[0077] In this embodiment, transactions are used to generate message details for related data of ungenerated messages in a single message to be generated obtained by paging. One transaction is used for each page, which can reduce the time occupied by transactions. Moreover, through paging and transaction processing, the integrity, consistency and correctness of the data can be guaranteed.

[0078] In some implementations, after generating message details for relevant data of a single message to be generated that is not generated and obtained by paging using a transaction, the method further includes:

[0079] Perform code value conversion on some fields in the message details to obtain the message details after the code value conversion, and save the message details after the code value conversion and the message details that do not need to be converted;

[0080] Obtain the message data volume corresponding to the message details after code value conversion and the message details that do not need code value conversion;

[0081] According to the message data volume, the generated message data volume and flow record recorded in the message file record are updated.

[0082] In this embodiment, for special fields, since different regulatory requirements have different field types, code value conversion is performed on some fields in the message details to adapt to data code value conversion required by various regulatory requirements.

[0083] The above code value conversion can be used to split the total loan amount into the principal and interest that should be repaid in each period.

[0084] In some implementations, before obtaining the message details by paging, the method further includes:

[0085] Delete the generated historical message file, where the historical message file is the message file of the generated message corresponding to the previous message to be generated before the current message to be generated.

[0086] In this embodiment, the generated historical message file is deleted to prevent the occurrence of redundant data due to additional writing.

[0087] In some implementations, after completing the message generation of a single message to be generated, the method further includes:

[0088] After the message generation of a single message to be generated is completed, a local file is generated;

[0089] Delete local files.

[0090] In this embodiment, after the message generation of a single message to be generated is completed, a local file will be generated. Then, by deleting the local file, it is possible to prevent the service from being restarted due to the full physical memory.

[0091] In some implementations, after completing the message generation of a single message to be generated, the method further includes:

[0092] Get the list of generated messages in the reporting plan;

[0093] After the message generation of a single message to be generated is completed, the generated message list is updated.

[0094] In this embodiment, after completing the message generation of a single message to be generated, by updating the list of generated messages, the life cycle of the entire message generation can be controlled and the entire cycle situation can be controlled. Each message to be generated is an independently generated message, and there is no dependency between the message data in the reporting plan, which can save memory overhead.

[0095] To facilitate understanding by those skilled in the art, a set of best embodiments is provided below:

[0096] Reference Figure 2 ,This embodiment designs a general processing scheme for big data.,This embodiment is based on the message format and data volume required by each micro-loan supervision,and the data format reported by the supervision requirements will be executed through this general scheme to achieve data integrity,,repeatability, reduce server memory expenses, thereby achieving data consistency and correctness,,and strong scalability.

[0097] (1) Zhonghe Rural Credit Cooperative currently has 14 small loan companies, including Hainan Online Loan, Chongqing Online Loan, Hunan Small Loan, Shanxi Small Loan and Hebei Small Loan, etc. The message formats of each small loan company include xml, txt, csv and json, etc. The task triggers the generation of messages of each small loan company, and the task can be triggered by manually specifying the message date, such as the last day of the end of the daily report, the last day of the quarterly report, and the last day of the year of the annual report.

[0098] This embodiment is scalable, and this logic can be used for newly added microfinance companies in the future.

[0099] (2) Reporting plan generation: According to the reporting frequency of each microfinance company, such as daily, monthly, quarterly, semi-annual, and annual reports, the entire report generation process status and message information of the corresponding frequency are recorded, such as the list of messages to be generated (i.e., the list of messages to be generated, including the messages that each microfinance company plans to generate) and the list of messages that have been generated (i.e., the list of generated messages). The list of generated messages initially has no value. A message file is generated and written to the list of generated messages. If the reporting plan already exists, it does not need to be generated again.

[0100] This embodiment is scalable, and subsequent small loan companies will use this logic for new messages.

[0101] (3) Generate A message, B message and C message, etc., up to 64 messages, for example, Hainan online loan 7 message (Hainan online loan has 7 messages), Chongqing online loan 15 message (Chongqing online loan has 15 messages), A message only represents one message in Hainan online loan 7 message or Chongqing online loan 15 message. Generate message file records for A message, B message and C message, etc. The message file record is used to record the message status of A message, which includes message not generated, message generating, message generating completed and data volume information of corresponding message status processing (i.e. generated message data volume). If the message generation process exits abnormally, it will be judged whether the message file record exists when the message is regenerated.

[0102] The above message not being generated may mean that no message is generated.

[0103] In the above message generation, part of the messages may be generated, while part of the messages may not be generated.

[0104] The above message generation completion may mean that all messages have been generated.

[0105] (4) Generate messages by paging: Obtain data whose status is that no message has been generated by the running record, and generate message details by taking data in batches (i.e., paging). The running record includes multiple loan numbers. When an exception occurs during the paging message generation process, it will be determined whether the message file record exists. If the message file record exists, then according to the amount of generated message data recorded in the message file record, if some of the messages in the paging message generation have been generated in the recorded amount of generated message data, there is no need to generate the paging message again. It only needs to be executed again from the abnormal point (i.e., the page where the exception occurs when the paging message is generated), and there is no need to execute the entire message from the beginning.

[0106] (5) Each page in the paging generated message has one transaction. The transactions are executed in batches of small transactions to ensure the integrity and consistency of the data status and reduce the time occupied by transactions.

[0107] (6) Obtain relevant data information from the corresponding micro-loan database using the IOU number in the running record in step (4), and generate relevant message details based on the obtained data information. The relevant data information is obtained based on the type of message to be generated. For example, if a loan message needs to be generated, the IOU number in the running record corresponds to the IOU number corresponding to the loan information, and the relevant loan information can be obtained based on the IOU number. If a repayment message needs to be generated, the IOU number in the running record corresponds to the IOU number corresponding to the repayment information, and the relevant repayment information can be obtained based on the IOU number.

[0108] (7) The special fields (configurations) in the report details in step (6) need to be converted to code values. This can adapt to the data code value conversion required by various regulators. For example, some microfinance companies need to report 0 and 1 for gender, while some microfinance companies need to report male, female, and unknown.

[0109] The above-mentioned supervision can be that each micro-loan company has its own local financial office.

[0110] (8) Save the report details to the corresponding micro-loan database.

[0111] (9) Update the number of generated messages of the corresponding batch in the message file record generated in step (3).

[0112] (10) Update the status of the transaction record in step (4) (i.e., the data obtained by paging).

[0113] (11) The corresponding micro-loan database is the database corresponding to the micro-loan company triggered in step (1).

[0114] (12) Before starting to generate message files, remove the message files generated in the past (i.e., delete the created files) to prevent redundant data from appearing during the append writing. Since the files are written in an appending manner, each file is written from the beginning. Before execution, remove the files first and then generate the files.

[0115] (13) Obtain the message details generated in step (8) in pages.

[0116] (14) Write the data in the message details into the message file in an appending manner. The appending method is to write data into the file each time, and it is not necessary to read all the contents of the file.

[0117] (15) After all the file data is written successfully (i.e., if there is no data in the paging data acquisition, it means that the file has been executed), the message file is uploaded to OSS storage. OSS is a server that stores files.

[0118] (16) After all file data is written successfully, a local file (i.e., local file) will be generated. By deleting the locally generated message file, the service restart will be prevented due to the physical memory being full.

[0119] (17) Update the message file record generated in step (3), record the address where the message is stored, modify the status control mechanism (this address is used for subsequent message reporting), and if it is the last message, update the status of the reporting plan (the plan generated in step (2)).

[0120] (18) Then poll and execute other message files until all messages are generated.

[0121] The technical solution of this embodiment has the following beneficial effects:

[0122] 1. Efficiency: By generating message paging and designing one transaction per page, the processing time and resource usage of a single transaction are effectively reduced. In addition, the state control mechanism adopted by the system enables re-execution from the breakpoint when an error or exception occurs in any link, without having to start from the beginning, which greatly improves the system's fault tolerance and processing efficiency.

[0123] 2. Strong practicability: From a technical perspective, this embodiment splits the execution data and is applicable to the generation of various small loan message data, thereby ensuring the practicability of the business.

[0124] 3. Strong scalability: The technical solution of this embodiment can selectively use some of the required functions according to different business needs and inconsistent messages, forming a loosely coupled modular design, so that the system can be easily modified, expanded or upgraded when facing different regulatory requirements or business needs, without the need for large-scale reconstruction of the entire system.

[0125] 4. Strong flexibility: This embodiment supports the common data reporting of various micro-loan companies and the needs of different channel business scenarios. It is suitable for the needs of different channel business scenarios and has strong flexibility.

[0126] 5. Control the reporting life cycle through the reporting plan, control the entire cycle, and the reporting plans are independent of each other, saving memory overhead.

[0127] Reference Figure 3 The embodiment of the present application also provides a general system for batch processing message generation, the system includes a first data acquisition unit 100, a first data generation unit 200, a second data acquisition unit 300, a second data generation unit 400, a single message completion unit 500 and an all message completion unit 600, wherein:

[0128] The first data acquisition unit 100 is used to acquire a list of messages to be generated in the reporting plan;

[0129] The first data generating unit 200 is used to generate a message file record of a single message to be generated in the message list to be generated, wherein the message file record is used to record the message status of the message to be generated;

[0130] The second data acquisition unit 300 is used to acquire a running record of a single message to be generated if the message status recorded in the message file record is that the message is not generated or the message is being generated, wherein the running record is an information indication for acquiring relevant data of the ungenerated message in the single message to be generated;

[0131] The second data generating unit 400 is used to obtain the relevant data of the ungenerated message in the single message to be generated according to the flow record, and generate all the message details of the single message to be generated in paging by using the transaction;

[0132] A single message completion unit 500 is used to obtain message details by paging, and write the message details into a message file by appending until all message details corresponding to a single message to be generated are written into the message file, thereby completing the message generation of the single message to be generated;

[0133] The all-message completion unit 600 is used for polling the message generation of all individual messages to be generated in the message list to be generated, and when the message generation of all individual messages to be generated is completed, the message generation of the message list to be generated is completed.

[0134] It should be noted that, since the general system for batch processing message generation in this embodiment and the general method for batch processing message generation described above are based on the same inventive concept, the corresponding contents in the method embodiment are also applicable to the system embodiment and will not be described in detail here.

[0135] Reference Figure 4 The embodiment of the present application further provides an electronic device, the electronic device comprising:

[0136] at least one memory;

[0137] at least one processor;

[0138] at least one program;

[0139] The program is stored in the memory, and the processor executes at least one program to implement the general method of batch processing message generation described above in the present disclosure.

[0140] The electronic device may be any intelligent terminal including a mobile phone, a tablet computer, a personal digital assistant (PDA), a car computer, etc.

[0141] The electronic device according to the embodiment of the present application is described in detail below.

[0142] The processor 1600 may be implemented by a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided by the embodiments of the present disclosure;

[0143] The memory 1700 may be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1700 may store an operating system and other application programs. When the technical solution provided in the embodiments of this specification is implemented by software or firmware, the relevant program code is stored in the memory 1700, and the processor 1600 calls and executes the general method for batch processing and generating messages in the embodiments of the present disclosure.

[0144] Input / output interface 1800, used to implement information input and output;

[0145] The communication interface 1900 is used to realize the communication interaction between the device and other devices. The communication can be realized through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WIFI, Bluetooth, etc.);

[0146] Bus 2000 , which transmits information between various components of the device (e.g., processor 1600 , memory 1700 , input / output interface 1800 , and communication interface 1900 );

[0147] The processor 1600 , the memory 1700 , the input / output interface 1800 , and the communication interface 1900 are connected to each other in communication within the device via the bus 2000 .

[0148] The embodiment of the present disclosure also provides a storage medium, which is a computer-readable storage medium. The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the above-mentioned general method for generating messages by batch processing.

[0149] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0150] The embodiments described in the embodiments of the present disclosure are intended to more clearly illustrate the technical solutions of the embodiments of the present disclosure and do not constitute a limitation on the technical solutions provided by the embodiments of the present disclosure. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of the present disclosure are also applicable to similar technical problems.

[0151] Those skilled in the art will appreciate that the technical solutions shown in the figures do not limit the embodiments of the present disclosure and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0152] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0153] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0154] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0155] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0156] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods 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 through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0157] 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.

[0158] In addition, each functional unit in each embodiment of the present application 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. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0159] If the integrated unit 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 application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable an electronic device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store programs. The above is a detailed description of the embodiments of the present application in conjunction with the accompanying drawings, but the present application is not limited to the above embodiments. Within the scope of knowledge possessed by ordinary technicians in the relevant technical field, various changes can be made without departing from the purpose of the present application.

Claims

1. A general method for batch processing message generation, characterized in that: The method comprises: Get the list of messages to be generated in the reporting plan; Generate a message file record of a single message to be generated in the list of messages to be generated, wherein the message file record is used to record the message status of the message to be generated; If the message status is recorded in the message file record as message not generated or message being generated, obtaining a flow record of the single message to be generated, wherein the flow record is an information indication for obtaining relevant data of the ungenerated message in the single message to be generated; According to the flow record, obtain the relevant data of the ungenerated message in the single message to be generated, and use the transaction to generate all the message details of the single message to be generated in pages; Acquire the message details in pages, and write the message details into a message file in an appending manner until all message details corresponding to the single message to be generated are written into the message file, thereby completing the message generation of the single message to be generated; The message generation of all the individual messages to be generated in the message list to be generated is polled, and when the message generation of all the individual messages to be generated is completed, the message generation of the message list to be generated is completed.

2. The general method for batch processing message generation according to claim 1, characterized in that: The message file record is also used to record the amount of generated message data of the message to be generated. After obtaining the relevant data of the single message to be generated, the method further includes: If an abnormal exit from a transaction occurs during the process of generating the message details of the single message to be generated by paging using a transaction, then determining whether the message file record exists; If the message file record exists, obtaining the generated message data volume recorded in the message file record; In addition to the generated messages corresponding to the generated message data volume in the single message to be generated, the remaining ungenerated messages are obtained, and the message details of the remaining ungenerated messages are generated by using transaction paging until all the message details of the single message to be generated are generated.

3. The general method for batch processing message generation according to claim 2, characterized in that: The step of acquiring relevant data of ungenerated messages in the single message to be generated according to the flow record, and using transactions to generate all message details of the single message to be generated in pages, includes: According to the loan note number in the log record, obtain the relevant data of the ungenerated message in the single message to be generated; A transaction is used to generate message details for relevant data of the single message to be generated that has not been generated in the single message to be generated obtained by paging, until all relevant data obtained by paging are generated into message details, thereby completing the generation of all message details of the single message to be generated.

4. The general method for batch processing message generation according to claim 3, characterized in that: After generating message details for the relevant data of the single message to be generated that is obtained by paging but has not yet been generated, the method further includes: Performing code value conversion on some fields in the message details to obtain message details after code value conversion, and saving the message details after code value conversion and the message details that do not need to be converted; Obtain the message data volume corresponding to the message details after code value conversion and the message details that do not need code value conversion; According to the message data volume, the generated message data volume and the flow record recorded in the message file record are updated.

5. The general method for batch processing message generation according to claim 1, characterized in that: Before obtaining the message details by paging, the method further includes: Delete the generated historical message file, where the historical message file is the message file of the generated message corresponding to the previous message to be generated before the current message to be generated.

6. The general method for batch processing message generation according to claim 1, characterized in that: After completing the message generation of the single message to be generated, the method further includes: After completing the message generation of the single message to be generated, a local file is generated; Delete the local file.

7. The general method for batch processing message generation according to claim 1, characterized in that: After completing the message generation of the single message to be generated, the method further includes: Obtaining a list of generated messages in the reporting plan; After the message generation of the single message to be generated is completed, the generated message list is updated.

8. A general system for batch processing message generation, characterized in that: The system comprises: A first data acquisition unit is used to acquire a list of messages to be generated in a reporting plan; A first data generating unit, configured to generate a message file record of a single message to be generated in the list of messages to be generated, wherein the message file record is used to record a message status of the message to be generated; A second data acquisition unit is used to acquire a flow record of the single message to be generated if the message status is recorded in the message file record as message not generated or message being generated, wherein the flow record is an information indication for acquiring relevant data of the ungenerated message in the single message to be generated; A second data generating unit is used to obtain relevant data of ungenerated messages in the single message to be generated according to the log record, and generate all message details of the single message to be generated in pages by using transactions; A single message completion unit, used for acquiring the message details by paging, and writing the message details into a message file by appending, until all message details corresponding to the single message to be generated are written into the message file, thereby completing the message generation of the single message to be generated; The all-message completion unit is used to poll the message generation of all single messages to be generated in the message list to be generated, and when all single messages to be generated have completed message generation, the message generation of the message list to be generated is completed.

9. An electronic device, characterized in that: It includes at least one control processor and a memory for communicating with the at least one control processor; the memory stores instructions that can be executed by the at least one control processor, and the instructions are executed by the at least one control processor to enable the at least one control processor to execute the general method for batch generating messages as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the general method for generating messages by batch processing as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and system for message fragmentation

    CN102088410A

  • Message generation method and device

    CN108881193A

  • A data extraction method and a data extraction system supporting continuous transmission of breakpoints

    CN109271435A

  • Mirror image file repairing method and device, AP equipment and network system

    CN114116289A

  • Data modification method and device, electronic equipment and storage medium

    CN114490693A