Unlock instant, AI-driven research and patent intelligence for your innovation.

File generation method and device based on sub-libraries and sub-tables, storage medium and equipment

A technology for file generation, database and table division, applied in the computer field, can solve problems such as imperfection, and achieve the effect of improving query and consumption efficiency, and improving the efficiency of file generation.

Pending Publication Date: 2019-10-29
深圳市盟天科技有限公司
View PDF4 Cites 5 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Screening records and generating files from sub-databases and sub-tables is one of the common application scenarios. However, the current file generation scheme based on sub-databases and sub-tables is not perfect and needs to be improved

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • File generation method and device based on sub-libraries and sub-tables, storage medium and equipment
  • File generation method and device based on sub-libraries and sub-tables, storage medium and equipment
  • File generation method and device based on sub-libraries and sub-tables, storage medium and equipment

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0027] figure 1 It is a schematic flow chart of a file generation method based on sub-database and table provided by Embodiment 1 of the present invention. The method can be executed by a file generation device based on sub-database and table, wherein the device can be implemented by software and / or hardware, generally It can be integrated in computer equipment such as servers. Such as figure 1 As shown, the method includes:

[0028] Step 101, after detecting that the preset file generation event is triggered, start multiple producer threads and start multiple consumer threads.

[0029] Exemplarily, the embodiments of the present invention are applicable to the generation of Internet order-related files, and may also be applicable to other application scenarios. For example, in the clearing and settlement system, it is necessary to send documents such as the user's actual repayment data or repayment plan to the funder; another example, in the fund agency sales system, it is...

Embodiment 2

[0048] figure 2 It is a schematic flowchart of a file generation method based on sub-database and sub-table provided in Embodiment 2 of the present invention, image 3 It is a schematic diagram of the structure of a file generation method based on sub-database and sub-table provided by Embodiment 2 of the present invention. The embodiment of the present invention is optimized on the basis of the above-mentioned embodiments, and the relevant content of the number of messages recorded in the preset cache is added.

[0049] Exemplarily, during the data query process, the number of first messages produced by the multiple producer threads is incrementally recorded in the preset cache, and at the same time, the multiple consumer threads are incrementally recorded in the preset cache The number of second messages consumed. The advantage of this setting is that the production and consumption of messages can be recorded in the cache, which facilitates the management and control of th...

Embodiment 3

[0069] Figure 4 It is a schematic flowchart of a file generation method based on sub-database and sub-table provided by Embodiment 3 of the present invention. The embodiment of the present invention optimizes the above-mentioned embodiments, introduces a retry mechanism, and adds relevant content.

[0070] Exemplarily, while performing data query from sub-tables within a preset range in the preset database in parallel through the plurality of producer threads, it also includes: when a query exception is detected, recording the first time when the exception occurs A location; starting from the first location to retry the data query operation. The advantage of this setting is that it can repair the exceptions that occur during the data query process and improve the fault tolerance performance of the system.

[0071] Further, while reading messages from the preset message queue in parallel through the multiple consumer threads and performing the file writing operation, it also in...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The embodiment of the invention discloses a file generation method and device based on sub-libraries and sub-tables, a storage medium and equipment. The method comprises the steps that after detectingthat a preset file generation event is triggered, starting a plurality of producer threads and a plurality of consumer threads; performing data query from sub-tables in a preset range in a preset database in parallel through a plurality of producer threads, and sending a query result to a preset message queue; in the data query process, reading messages from a preset message queue in parallel through a plurality of consumer threads and executing file writing operation; and when determining that the messages generated by the plurality of producer threads are consumed, ending the file writing operation, and generating a corresponding file. According to the embodiment of the invention, by adopting the technical scheme, the query and consumption efficiency can be improved, and the file generation efficiency is improved on the whole.

Description

technical field [0001] The embodiments of the present invention relate to the field of computer technology, and in particular to a file generation method, device, storage medium and equipment based on sub-database and sub-table. Background technique [0002] When the amount of data in a table in the database is too large, such as millions or even hundreds of millions of records, database operations will be very time-consuming. In order to support access scenarios with a large amount of data, and to improve database access efficiency, the prior art proposes a database-splitting and table-splitting strategy for the database. To put it simply, sub-database sub-table is to split the original database and table according to certain rules, store the data originally stored in one database into multiple databases, and store the data originally stored in one table Chunks are stored across multiple tables. [0003] For most Internet companies at present, with the development of time...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F16/22G06F16/2453G06F16/2455G06F9/54
CPCG06F16/2282G06F16/24553G06F16/24532G06F9/546G06F2209/548
Inventor 戴桥斌
Owner 深圳市盟天科技有限公司
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More