[go: up one dir, main page]

CN109299157A - A data export method and device for distributed large single table - Google Patents

A data export method and device for distributed large single table Download PDF

Info

Publication number
CN109299157A
CN109299157A CN201810981125.5A CN201810981125A CN109299157A CN 109299157 A CN109299157 A CN 109299157A CN 201810981125 A CN201810981125 A CN 201810981125A CN 109299157 A CN109299157 A CN 109299157A
Authority
CN
China
Prior art keywords
data
request
target
distributed
single table
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810981125.5A
Other languages
Chinese (zh)
Other versions
CN109299157B (en
Inventor
赖双波
范渊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Dbappsecurity Technology Co Ltd
Original Assignee
Hangzhou Dbappsecurity Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Dbappsecurity Technology Co Ltd filed Critical Hangzhou Dbappsecurity Technology Co Ltd
Priority to CN201810981125.5A priority Critical patent/CN109299157B/en
Publication of CN109299157A publication Critical patent/CN109299157A/en
Application granted granted Critical
Publication of CN109299157B publication Critical patent/CN109299157B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明公开了一种分布式大单表的数据导出方法,包括:接收客户端发送的导出数据的请求;通过sphinx搜索分布式数据库,并获取满足请求的服务器标识和数据分区ID;根据服务器标识和数据分区ID获取与请求对应的目标数据条;将目标数据条写入目标文档并导出至客户端。该方法首先查询满足请求的服务器和数据分区,进而根据服务器标识和数据分区ID直接获取目标数据条,从而提高了数据查询效率和分布式大单表的数据导出效率;同时,可减少计算机资源的消耗,提高用户体验。相应地,本发明公开的一种分布式大单表的数据导出装置、设备及可读存储介质,也同样具有上述技术效果。

The invention discloses a data export method for a distributed large single table, comprising: receiving a request for exporting data sent by a client; searching a distributed database through sphinx, and obtaining a server identifier and a data partition ID that satisfy the request; and data partition ID to obtain the target data bar corresponding to the request; write the target data bar into the target document and export it to the client. The method firstly queries the server and data partition that satisfy the request, and then directly obtains the target data bar according to the server identifier and the data partition ID, thereby improving the data query efficiency and the data export efficiency of distributed large single tables; at the same time, it can reduce the consumption of computer resources. consumption and improve user experience. Correspondingly, a data export device, device and readable storage medium for a distributed large single table disclosed in the present invention also have the above technical effects.

Description

A kind of data export method and device of distributed big single table
Technical field
The present invention relates to database technical fields, more specifically to a kind of data export side of distributed big single table Method, device, equipment and readable storage medium storing program for executing.
Background technique
With the arriving of big data era, the high availability of database is become increasingly important.Relational database technology at For a core technology in information system.It, can if inquiring database using data base tool since the readability of database is poor It can be related to safety and rights concerns, therefore the data in database can be exported, to inquire.
Currently, generally inquiring database list table using multithreading, and then multithreading carry out table inquiry is reused, to obtain Data and export in database.But such method is only applicable to the less situation of the data in database in single table, works as number More according to the data in table single in library, that is, when needing to export big single table, the efficiency carried out using data base tool is more slow, and The computer resource of consumption is more, is unfavorable for cost control, also reduces user experience;Wherein, big single table is in individual table Million grades or million grades of number of data or more of single table, distributed big single table are big single table in distributed data base.
Therefore, the data export efficiency for how improving big single table, is those skilled in the art's problem to be solved.
Summary of the invention
The purpose of the present invention is to provide a kind of data export method of distributed big single table, device, equipment and readable deposit Storage media exports efficiency to improve the data of big single table.
To achieve the above object, the embodiment of the invention provides following technical solutions:
A kind of data export method of distributed big single table, comprising:
Receive the request for the export data that client is sent;
Distributed data base is searched for by sphinx, and obtains the server identification and data subregion for meeting the request ID;
Target data item corresponding with the request is obtained according to the server identification and the data partition id;
Destination document is written into the target data item and is exported to the client.
Wherein, the request for receiving the export data that client is sent, comprising:
The request is received by searchd, and sphinx configuration file is written into the corresponding querying condition of the request.
Wherein, it is described by sphinx search for distributed data base, and obtain meet the request server identification and Data partition id, comprising:
The distributed data base is searched for according to the sphinx configuration file, and is obtained according to socket mode and meets institute The Servers-all for stating request identifies and all data partition ids.
Wherein, described that number of targets corresponding with the request is obtained according to the server identification and the data partition id According to item, comprising:
According to the server identification, the data partition id and preset target configuration file obtain in batches with it is described Request corresponding target data item.
It is wherein, described that destination document is written into the target data item and is exported to before the client, further includes:
The target data item is sorted sequentially in time, and judges whether the item number of the target data item is more than pre- If threshold value;
If so, filtering out preset quantity data strip according to time rule, the data strip filtered out is determined as described Target data item.
It is wherein, described that destination document is written into the target data item, comprising:
When the format of the destination document is excel, call described in the target data item is written poi function one by one Destination document.
It is wherein, described that destination document is written into the target data item and is exported to the client, further includes:
The destination document is shown in the client visibleization.
A kind of data guiding device of distributed big single table, comprising:
Receiving module, the request of the export data for receiving client transmission;
First obtains module, for searching for distributed data base by sphinx, and obtains the service for meeting the request Device mark and data partition id;
Second obtains module, corresponding with the request for being obtained according to the server identification and the data partition id Target data item;
Export module, for destination document to be written in the target data item and is exported to the client.
A kind of data equipment leading out of distributed big single table, comprising:
Memory, for storing computer program;
Processor realizes the number of the big single table of distribution described in above-mentioned any one when for executing the computer program The step of according to deriving method.
A kind of readable storage medium storing program for executing is stored with computer program, the computer program quilt on the readable storage medium storing program for executing Processor realizes the step of data export method of the big single table of distribution described in above-mentioned any one when executing.
By above scheme it is found that a kind of data export method of distributed big single table provided in an embodiment of the present invention, packet It includes: receiving the request for the export data that client is sent;Distributed data base is searched for by sphinx, and obtains and is asked described in satisfaction The server identification and data partition id asked;It is obtained and the request pair according to the server identification and the data partition id The target data item answered;Destination document is written into the target data item and is exported to the client.
As it can be seen that the method is searched for by sphinx first when receiving the request of export data of client transmission Distributed data base, and the server identification and data partition id for meeting the request are obtained, target data item is stored to determine Server and corresponding data subregion;And then target data item is obtained according to server identification and data partition id, and by mesh It marks data strip and destination document is written, export to client, so that user checks.Wherein, this method is inquired first meets request Server and data subregion, since the data of return are only server identification and data partition id, data volume is smaller, therefore inquires effect Rate is improved;And then target data item directly acquired according to server identification and data partition id, due to hard objectives The storage location of data strip, thus the efficiency for obtaining data is also improved;Therefore the data export effect of big single table can be improved Rate reduces the load of database;Distributed data base is searched for by sphinx simultaneously, the consumption of computer resource can be reduced, Improve user experience.
Correspondingly, it a kind of data guiding device of distributed big single table provided in an embodiment of the present invention, equipment and readable deposits Storage media similarly has above-mentioned technique effect.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is a kind of data export method flow chart of distributed big single table disclosed by the embodiments of the present invention;
Fig. 2 is the data export method flow chart of another distributed big single table disclosed by the embodiments of the present invention;
Fig. 3 is a kind of data guiding device schematic diagram of distributed big single table disclosed by the embodiments of the present invention;
Fig. 4 is a kind of data equipment leading out schematic diagram of distributed big single table disclosed by the embodiments of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
The embodiment of the invention discloses data export method, device, equipment and the readable storages of a kind of distributed big single table Medium exports efficiency to improve the data of big single table.
Referring to Fig. 1, a kind of data export method of distributed big single table provided in an embodiment of the present invention, comprising:
S101, the request for receiving the export data that client is sent;
S102, distributed data base is searched for by sphinx, and obtains the server identification and data subregion for meeting request ID;
Specifically, sphinx is the full-text search engine based on SQL, full text is done in combination with MySQL, PostgreSQL and is searched Rope, it can provide the function of search more professional than distributed data base itself, so that application program is easier to realize specialization. Therefore, when searching for acquisition server identification and data partition id using sphinx, data search efficiency can be improved.Wherein, number It is accessid according to partition id.
Data volume in distributed data base is million to ten million ranks, and data can be continually added to distribution at any time Database.Generally, single table default in distributed data base saves trimestral data recently, and can be built as unit of day Vertical data subregion;Each data subregion accordingly establishes a sphinx index, wherein the size of sphinx index is smaller, about The 1/10 of former data subregion.Meanwhile every server in distributed data base has server identification, is denoted as POID.
Therefore, when receiving the request of export data of client transmission, distributed data can be searched for by sphinx Library, and obtain the server identification and data partition id for meeting request, that is, determine target data item institute derived from the request requirement The server of storage and corresponding data subregion.
S103, target data item corresponding with request is obtained according to server identification and data partition id;
After the server identification and data partition id for determining to meet export request of data, according to server identification sum number Target data item is directly acquired according to partition id, so that the acquisition efficiency of data can be improved.It should be noted that distributed data base In data generally stored with the format of data strip, therefore, when obtaining data therein, equally in the form of data strip into Row obtains.
S104, destination document is written into target data item and is exported to client.
After getting target data item, the target data item that will acquire is written destination document and exports to client, with Just user checks.Wherein, the format of destination document can be excel, csv or txt, naturally it is also possible to be facilitate user to check, It edits, the document of the extended formatting of screening.Wherein it is possible to document template be preset, after getting target data item, by mesh Mark data strip inserts the document template, to generate destination document.
As it can be seen that present embodiments providing a kind of data export method of distributed big single table, the method is receiving visitor When the request for the export data that family end is sent, distributed data base is searched for by sphinx first, and obtain and meet the request Server identification and data partition id, to determine the server and corresponding data subregion of storage target data item;And then root Target data item is obtained according to server identification and data partition id, and destination document is written into target data item, is exported to client End, so that user checks.
Wherein, this method inquires the server and data subregion for meeting request first, since the data of return are only to service Device mark and data partition id, data volume is smaller, therefore search efficiency is improved;And then according to server identification and data point Area ID directly acquires target data item, due to the storage location of hard objectives data strip, thus obtains the efficiency of data also Raising is arrived;Therefore the data export efficiency that big single table can be improved, reduces the load of database;It is searched for simultaneously by sphinx Distributed data base can reduce the consumption of computer resource, improve user experience.
The embodiment of the invention discloses the data export method of another distributed big single table, relative to a upper embodiment, The present embodiment has made further instruction and optimization to technical solution.
Referring to fig. 2, the data export method of another distributed big single table provided in an embodiment of the present invention, comprising:
S201, the request that export data are received by searchd, and corresponding querying condition write-in sphinx will be requested to match Set file;
S202, distributed data base is searched for according to sphinx configuration file, and obtain satisfaction request according to socket mode Servers-all mark and all data partition ids;
In the present embodiment, the request for the export data that client is sent is received by searchd, and request is carried Sphinx configuration file is written in querying condition, so that sphinx searches for distributed data base according to sphinx configuration file.Distribution Server in formula database can be divided into application server and distributed server,
Wherein, for application server for interacting with user, user can be based on application management server Distributed Services Device;Distributed server is for storing data.The quantity of application server is generally one, and the application service of redundancy will also be arranged Device, in case of need;The quantity of distributed server is generally multiple, and application server and distributed server pass through Socket establishes communication connection.Wherein, the interface of socket is the API based on TCP/IP network, can define many kinds of function and example Journey.
Wherein, searchd is operation retrieval finger daemon, every server being pre-configured in distributed data base On.The corresponding search for configuration information of request of export data is had recorded in sphinx configuration file, such as: it is required that the maximum returned Number of data is generally indicated with max;Inquire the max-timeout time etc. of data.
Therefore, when the searchd of application server receives the request of the export data of client transmission, by request pair The querying condition write-in sphinx configuration file answered, and monitor process is opened, and then sphinx configuration file is passed through into socket It is forwarded to each distributed server;When searchd on each distributed server receives sphinx configuration file, foundation Sphinx configuration file scans for, and after the completion of search, returns to server identification and data partition id that search obtains, searches at this time What rope obtained is that the Servers-all mark for meeting request and all data partition ids can be obtained disposably to improve efficiency Servers-all mark and all data partition ids.
S203, target data item corresponding with request is obtained according to server identification and data partition id;
S204, destination document is written into target data item and is exported to client.
It in the present embodiment, can be by server mark when application server obtains server identification and data partition id Know and data partition id inserts temporary table, to obtain target data item corresponding with request according to the temporary table.Wherein, The quantity of server identification and data partition id in temporary table can be preset, when the number of server identification and data partition id When amount exceeds the setting of temporary table, server identification and data partition id can be obtained in batches.It should be noted that this reality Applying example can be realized based on WEB application.
As it can be seen that present embodiments providing the data export method of another distributed big single table, the method passes through Searchd receives request, and will request corresponding querying condition write-in sphinx configuration file, is searched according to sphinx configuration file Rope distributed data base, and the Servers-all mark for meeting request and all data partition ids are obtained according to socket mode, To determine the server and corresponding data subregion of storage target data item;And then according to server identification and data partition id Target data item is obtained, and destination document is written into target data item, is exported to client, so that user checks.
Wherein, server and data subregion that this method is requested according to sphinx configuration file inquiry satisfaction, and according to Socket mode obtains server identification and data partition id, since the data of acquisition are only server identification and data subregion ID, data volume is smaller, therefore search efficiency is improved;And then target is directly acquired according to server identification and data partition id Data strip, due to the storage location of hard objectives data strip, thus the efficiency for obtaining data is also improved;Therefore it can mention The data of tall and big list table export efficiency, reduce the load of database;Distributed data base is searched for by sphinx simultaneously, can be subtracted The consumption of few computer resource, improves user experience.
Based on above-mentioned any embodiment, it should be noted that described according to the server identification and the data subregion ID obtains target data item corresponding with the request, comprising:
According to the server identification, the data partition id and preset target configuration file obtain in batches with it is described Request corresponding target data item.
Specifically, can be screened according to preset target configuration file after getting server identification and data partition id The server identification and data partition id got.Because having preset the max-thresholds limit of number of data in target configuration file System, when the server identification and the corresponding number of data of data partition id got is greater than the max-thresholds of number of data, then Target data item is obtained in batches;When the server identification and the corresponding number of data of data partition id got is not more than data It is when the max-thresholds of item number, then disposable to obtain whole target data items.
Such as: assuming that the max-thresholds of number of data are 1000, then 1000 are returned to every time, when real data item number is less than When 1000, then returned by practical item number." limit 0,1000 can be added after query statement;Limit 1001,2000 " is realized.
It is described that destination document is written into the target data item and is exported to the client based on above-mentioned any embodiment Before, further includes:
The target data item is sorted sequentially in time, and judges whether the item number of the target data item is more than pre- If threshold value;
If so, filtering out preset quantity data strip according to time rule, the data strip filtered out is determined as described Target data item.
Specifically, can be screened according to time rule when the item number of the target data item got is more than preset threshold value The data strip filtered out is determined as the target data item by preset quantity data strip out.It should be noted that client is wanted The querying condition asked is generally the data generated the nearest time, therefore can erasing time data strip remote.
Based on above-mentioned any embodiment, it should be noted that described that destination document, packet is written in the target data item It includes: when the format of the destination document is excel, calling poi function that the target is written in the target data item one by one Document.
Specifically, poi function can be called in the following manner if indicating the item number for the data strip being written every time with m, Such as: " Workbook wb=new SXSSFWorkbook (m) " can be controlled at this point, only m data is cached in memory Memory usage processed.It should be noted that needing depositing target data item before destination document is written in target data item It stores up IP address and character string type is converted to by unsigned int.Storage IP address of the target data item in distributed data base is nothing Symbol integer needs to be converted to character string type after export.It wherein, can be by calling poi when destination document is excel format Data strip is written in function.
Based on above-mentioned any embodiment, it should be noted that described that destination document is written in the target data item and is led Out extremely after the client, further includes: show the destination document in the client visibleization.
Specifically, can show the destination document with visualization window after exporting destination document to client.Meanwhile The destination document in distributed data base is deleted, to reduce memory usage.
A kind of data guiding device of distributed big single table provided in an embodiment of the present invention is introduced below, is hereafter retouched The data export method of a kind of data guiding device for the distributed big single table stated and a kind of above-described distributed big single table It can be cross-referenced.
Referring to Fig. 3, a kind of data guiding device of distributed big single table provided in an embodiment of the present invention, comprising:
Receiving module 301, the request of the export data for receiving client transmission;
First obtains module 302, for searching for distributed data base by sphinx, and obtains the clothes for meeting the request Business device mark and data partition id;
Second obtains module 303, for being obtained and the request according to the server identification and the data partition id Corresponding target data item;
Export module 304, for destination document to be written in the target data item and is exported to the client.
Wherein, the receiving module is specifically used for:
The request is received by searchd, and sphinx configuration file is written into the corresponding querying condition of the request.
Wherein, the first acquisition module is specifically used for:
The distributed data base is searched for according to the sphinx configuration file, and is obtained according to socket mode and meets institute The Servers-all for stating request identifies and all data partition ids.
Wherein, the second acquisition module is specifically used for:
According to the server identification, the data partition id and preset target configuration file obtain in batches with it is described Request corresponding target data item.
Wherein, further includes:
Judgment module for the target data item to sort sequentially in time, and judges the target data item Whether item number is more than preset threshold value;
Screening module, for being screened according to time rule when the item number of the target data item is more than preset threshold value The data strip filtered out is determined as the target data item by preset quantity data strip out.
Wherein, described to be specifically used for export module:
When the format of the destination document is excel, call described in the target data item is written poi function one by one Destination document.
Wherein, further includes:
Display module, for showing the destination document in the client visibleization.
As it can be seen that present embodiments providing a kind of data guiding device of distributed big single table, comprising: receiving module, first Obtain module, the second acquisition module and export module.Asking for the export data of client transmission is received by receiving module first It asks;Then first module is obtained by sphinx search distributed data base, and obtain the server identification sum number for meeting request According to partition id;And then second obtains module according to server identification and data partition id acquisition target data corresponding with request Item;Target data item is written destination document and exported to client by last export module.Divide the work between such modules and closes Make, Each performs its own functions, to improve the data export efficiency of efficiency data query and distributed big single table;Meanwhile meter can be reduced The consumption of calculation machine resource improves user experience.
A kind of data equipment leading out of distributed big single table provided in an embodiment of the present invention is introduced below, is hereafter retouched The data export method of a kind of data equipment leading out for the distributed big single table stated and a kind of above-described distributed big single table And device can be cross-referenced.
Referring to fig. 4, the data equipment leading out of a kind of distributed big single table provided in an embodiment of the present invention, comprising:
Memory 401, for storing computer program;
Processor 402 realizes that distribution described in above-mentioned any embodiment is big single when for executing the computer program The step of data export method of table.
A kind of readable storage medium storing program for executing provided in an embodiment of the present invention is introduced below, one kind described below is readable to deposit Storage media can be cross-referenced with above-described a kind of data export method, device and the equipment of distributed big single table.
A kind of readable storage medium storing program for executing is stored with computer program, the computer program quilt on the readable storage medium storing program for executing The step of data export method of the big single table of distribution as described in above-mentioned any embodiment is realized when processor executes.
Based on above-mentioned any embodiment, it should be noted that each threshold size involved in this specification can be identical, It can be different.I.e. threshold size, which is based on practical situations, to be adjusted flexibly, therefore this specification is not specifically limited in this embodiment.
Based on above-mentioned any embodiment, exported in order to illustrate more clearly of the data of distributed big single table provided by the invention Method is now listed below implementation steps:
Step 1, the complete web application of deployment, sphinx index service and database environment;
Sphinx.conf configuration file is written in querying condition by step 2, the querying condition according to web page;
The searchd service of step 3, server-side, is issued to other distributed servers for query condition information Searchd service, and begin listening for;
Step 4, server-side searchd will be monitored after the data obtained is ranked up processing, and the interim table of database is written;Its In, the interim table is for storage server mark (POID) and data partition id (accessid);
Step 5 obtains data according to the accessid and POID of interim table: obtaining and needs derived data, takes m every time The data of (threshold value) item only save the data of this acquisition in memory;
Step 6, the data obtained to step 5 are processed, for example initial data is in database purchase IP address Unsigned int needs to be converted into character string type herein;
Data after step 6 processing are written in excel step 7 one by one, by the poi function of calling excel, and with M data is cached in memory by " Workbook wb=new SXSSFWorkbook (m) " statement;
Step 8, when step 7 processing after the completion of, judge whether database data obtains completely, i.e., judgement satisfaction currently look into Whether the data of inquiry condition all get, if will not go to step 5 automatically completely;If data all obtain It finishes, then generates excel file, and enter lower step 9;
The excel file that step 9, the downloading of web applications client generate, deletes the excel file of server-side after downloading.
So far, the implementation of the big single table data export excel method of the distribution applied based on web is completed.It needs to illustrate It is that the present embodiment is not particularly limited the type and version of database, the platform of web application is also not particularly limited.
Each embodiment in this specification is described in a progressive manner, the highlights of each of the examples are with other The difference of embodiment, the same or similar parts in each embodiment may refer to each other.
The foregoing description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, as defined herein General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, of the invention It is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase one The widest scope of cause.

Claims (10)

1.一种分布式大单表的数据导出方法,其特征在于,包括:1. a data deriving method of a distributed large single table, is characterized in that, comprises: 接收客户端发送的导出数据的请求;Receive the request to export data sent by the client; 通过sphinx搜索分布式数据库,并获取满足所述请求的服务器标识和数据分区ID;Search the distributed database through sphinx, and obtain the server identifier and data partition ID that satisfy the request; 根据所述服务器标识和所述数据分区ID获取与所述请求对应的目标数据条;Obtain the target data bar corresponding to the request according to the server identifier and the data partition ID; 将所述目标数据条写入目标文档并导出至所述客户端。The target data strip is written into a target document and exported to the client. 2.根据权利要求1所述的分布式大单表的数据导出方法,其特征在于,所述接收客户端发送的导出数据的请求,包括:2. the data export method of distributed large single table according to claim 1, is characterized in that, the request that the export data that described receiving client sends, comprises: 通过searchd接收所述请求,并将所述请求对应的查询条件写入sphinx配置文件。Receive the request through searchd, and write the query condition corresponding to the request into the sphinx configuration file. 3.根据权利要求2所述的分布式大单表的数据导出方法,其特征在于,所述通过sphinx搜索分布式数据库,并获取满足所述请求的服务器标识和数据分区ID,包括:3. the data derivation method of distributed large single table according to claim 2, is characterized in that, described searching distributed database by sphinx, and obtain the server identification and data partition ID that satisfy described request, comprise: 根据所述sphinx配置文件搜索所述分布式数据库,并按照socket方式获取满足所述请求的所有服务器标识和所有数据分区ID。Search the distributed database according to the sphinx configuration file, and obtain all server identifiers and all data partition IDs that satisfy the request in a socket manner. 4.根据权利要求1所述的分布式大单表的数据导出方法,其特征在于,所述根据所述服务器标识和所述数据分区ID获取与所述请求对应的目标数据条,包括:4. The data export method of distributed large single table according to claim 1, is characterized in that, described obtaining the target data bar corresponding to described request according to described server identification and described data partition ID, comprising: 根据所述服务器标识、所述数据分区ID和预设的目标配置文件分批次获取与所述请求对应的目标数据条。The target data strips corresponding to the request are acquired in batches according to the server identifier, the data partition ID and the preset target configuration file. 5.根据权利要求1所述的分布式大单表的数据导出方法,其特征在于,所述将所述目标数据条写入目标文档并导出至所述客户端之前,还包括:5. The data export method of a distributed large single table according to claim 1, characterized in that, before writing the target data bar into a target document and exporting it to the client, the method further comprises: 将所述目标数据条按照时间顺序排序,并判断所述目标数据条的条数是否超过预设的阈值;Sorting the target data bars in chronological order, and judging whether the number of the target data bars exceeds a preset threshold; 若是,则按照时间规则筛选出预设数量个数据条,将筛选出的数据条确定为所述目标数据条。If so, filter out a preset number of data bars according to the time rule, and determine the filtered data bar as the target data bar. 6.根据权利要求1所述的分布式大单表的数据导出方法,其特征在于,所述将所述目标数据条写入目标文档,包括:6. The method for exporting data of distributed large single table according to claim 1, wherein the writing of the target data bar into a target document comprises: 当所述目标文档的格式为excel时,调用poi函数将所述目标数据条逐条写入所述目标文档。When the format of the target document is excel, the poi function is called to write the target data strips into the target document one by one. 7.根据权利要求1-6任意一项所述的分布式大单表的数据导出方法,其特征在于,所述将所述目标数据条写入目标文档并导出至所述客户端之后,还包括:7. The data export method for a distributed large single table according to any one of claims 1-6, wherein after the target data bar is written into a target document and exported to the client, the include: 在所述客户端可视化展示所述目标文档。The target document is visually displayed on the client side. 8.一种分布式大单表的数据导出装置,其特征在于,包括:8. a data exporting device of a distributed large single table, is characterized in that, comprises: 接收模块,用于接收客户端发送的导出数据的请求;The receiving module is used to receive the request for exporting data sent by the client; 第一获取模块,用于通过sphinx搜索分布式数据库,并获取满足所述请求的服务器标识和数据分区ID;The first acquisition module is used to search the distributed database through sphinx, and obtain the server identifier and the data partition ID that satisfy the request; 第二获取模块,用于根据所述服务器标识和所述数据分区ID获取与所述请求对应的目标数据条;A second obtaining module, configured to obtain a target data bar corresponding to the request according to the server identifier and the data partition ID; 导出模块,用于将所述目标数据条写入目标文档并导出至所述客户端。The exporting module is used for writing the target data bar into a target document and exporting it to the client. 9.一种分布式大单表的数据导出设备,其特征在于,包括:9. A data exporting device of a distributed large single table, is characterized in that, comprises: 存储器,用于存储计算机程序;memory for storing computer programs; 处理器,用于执行所述计算机程序时实现如权利要求1-7任意一项所述的分布式大单表的数据导出方法的步骤。The processor is configured to implement the steps of the data export method of the distributed large single table according to any one of claims 1-7 when executing the computer program. 10.一种可读存储介质,其特征在于,所述可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1-7任意一项所述的分布式大单表的数据导出方法的步骤。10. A readable storage medium, characterized in that, a computer program is stored on the readable storage medium, and when the computer program is executed by a processor, the distributed computer program according to any one of claims 1-7 is implemented. The steps of the data export method for a single table.
CN201810981125.5A 2018-08-27 2018-08-27 Data export method and device for distributed big single table Active CN109299157B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810981125.5A CN109299157B (en) 2018-08-27 2018-08-27 Data export method and device for distributed big single table

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810981125.5A CN109299157B (en) 2018-08-27 2018-08-27 Data export method and device for distributed big single table

Publications (2)

Publication Number Publication Date
CN109299157A true CN109299157A (en) 2019-02-01
CN109299157B CN109299157B (en) 2021-11-23

Family

ID=65165424

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810981125.5A Active CN109299157B (en) 2018-08-27 2018-08-27 Data export method and device for distributed big single table

Country Status (1)

Country Link
CN (1) CN109299157B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110046191A (en) * 2019-04-22 2019-07-23 成都四方伟业软件股份有限公司 A kind of data export configuration method and device
CN110263061A (en) * 2019-06-17 2019-09-20 郑州阿帕斯科技有限公司 A kind of data query method and system
CN110795920A (en) * 2019-09-09 2020-02-14 国网电子商务有限公司 Document generation method and device
CN111723363A (en) * 2020-06-18 2020-09-29 西安万像电子科技有限公司 Data export method and device
WO2021012909A1 (en) * 2019-07-23 2021-01-28 平安科技(深圳)有限公司 Data export method and apparatus, computer device, and storage medium
CN112650805A (en) * 2020-12-30 2021-04-13 杭州贝嘟科技有限公司 Data export method and device, computer equipment and readable storage medium
CN112749190A (en) * 2019-10-31 2021-05-04 中国移动通信集团重庆有限公司 Data query method and device, computing equipment and computer storage medium
CN112966052A (en) * 2019-04-17 2021-06-15 创新先进技术有限公司 Method and device for obtaining block chain data in multiple times
CN114510908A (en) * 2022-02-23 2022-05-17 平安普惠企业管理有限公司 Data export method and device, computer equipment and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090288320A1 (en) * 2008-05-25 2009-11-26 Tawfik El Emam Sphinx System
CN102331990A (en) * 2010-12-22 2012-01-25 四川大学 A News Video Retrieval Method Based on Subtitle Extraction
CN102426579A (en) * 2011-08-25 2012-04-25 中兴通讯股份有限公司 Method for importing and exporting files based on network mode
CN103034735A (en) * 2012-12-26 2013-04-10 北京讯鸟软件有限公司 Big data distributed file export method
CN103530351A (en) * 2013-09-30 2014-01-22 金铠川(天津)科技发展有限公司 Network data information search method
CN105718485A (en) * 2014-12-04 2016-06-29 中国移动通信集团公司 Method and device for inputting data into database
CN106897344A (en) * 2016-07-21 2017-06-27 阿里巴巴集团控股有限公司 The data operation request treatment method and device of distributed data base
CN107622059A (en) * 2016-07-13 2018-01-23 天脉聚源(北京)科技有限公司 A kind of method and system for improving database search efficiency
CN107798111A (en) * 2017-11-01 2018-03-13 四川长虹电器股份有限公司 A kind of method that data are in high volume exported in distributed environment

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090288320A1 (en) * 2008-05-25 2009-11-26 Tawfik El Emam Sphinx System
CN102331990A (en) * 2010-12-22 2012-01-25 四川大学 A News Video Retrieval Method Based on Subtitle Extraction
CN102426579A (en) * 2011-08-25 2012-04-25 中兴通讯股份有限公司 Method for importing and exporting files based on network mode
CN103034735A (en) * 2012-12-26 2013-04-10 北京讯鸟软件有限公司 Big data distributed file export method
CN103530351A (en) * 2013-09-30 2014-01-22 金铠川(天津)科技发展有限公司 Network data information search method
CN105718485A (en) * 2014-12-04 2016-06-29 中国移动通信集团公司 Method and device for inputting data into database
CN107622059A (en) * 2016-07-13 2018-01-23 天脉聚源(北京)科技有限公司 A kind of method and system for improving database search efficiency
CN106897344A (en) * 2016-07-21 2017-06-27 阿里巴巴集团控股有限公司 The data operation request treatment method and device of distributed data base
CN107798111A (en) * 2017-11-01 2018-03-13 四川长虹电器股份有限公司 A kind of method that data are in high volume exported in distributed environment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
IANYNCHEN: "Sphinx的介绍和原理探索", 《HTTP://F.DATAGURU.CN/THREAD-638117-1-1.HTML》 *

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112966052A (en) * 2019-04-17 2021-06-15 创新先进技术有限公司 Method and device for obtaining block chain data in multiple times
CN110046191A (en) * 2019-04-22 2019-07-23 成都四方伟业软件股份有限公司 A kind of data export configuration method and device
CN110263061A (en) * 2019-06-17 2019-09-20 郑州阿帕斯科技有限公司 A kind of data query method and system
WO2021012909A1 (en) * 2019-07-23 2021-01-28 平安科技(深圳)有限公司 Data export method and apparatus, computer device, and storage medium
CN110795920A (en) * 2019-09-09 2020-02-14 国网电子商务有限公司 Document generation method and device
CN110795920B (en) * 2019-09-09 2023-12-01 国网数字科技控股有限公司 Document generation method and device
CN112749190A (en) * 2019-10-31 2021-05-04 中国移动通信集团重庆有限公司 Data query method and device, computing equipment and computer storage medium
CN112749190B (en) * 2019-10-31 2023-04-11 中国移动通信集团重庆有限公司 Data query method and device, computing equipment and computer storage medium
CN111723363A (en) * 2020-06-18 2020-09-29 西安万像电子科技有限公司 Data export method and device
CN112650805A (en) * 2020-12-30 2021-04-13 杭州贝嘟科技有限公司 Data export method and device, computer equipment and readable storage medium
CN114510908A (en) * 2022-02-23 2022-05-17 平安普惠企业管理有限公司 Data export method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN109299157B (en) 2021-11-23

Similar Documents

Publication Publication Date Title
CN109299157A (en) A data export method and device for distributed large single table
CN111459985B (en) Identification information processing method and device
CN112364223B (en) Digital archive system
CN108228817A (en) Data processing method, device and system
CN111339171B (en) Data query method, device and equipment
CN103020158A (en) Report form creation method, device and system
CN109254901B (en) A kind of Monitoring Indexes method and system
KR101475335B1 (en) Enhancing an inquiry for a search of a database
CN101901242A (en) Federated configuration data management
CN109726202A (en) A block chain data storage method and computer storage medium
CN110245145A (en) Structure synchronization method and apparatus of the relevant database to Hadoop database
US11263264B2 (en) Management of graphs using secondary index vertices
CN109740129B (en) Report generation method, device and equipment based on blockchain and readable storage medium
CN114741396B (en) A data service processing method, device, electronic equipment, and storage medium
CN115269515B (en) Processing method for searching specified target document data
CN106933836A (en) A kind of date storage method and system based on point table
CN108932286A (en) A kind of date storage method, data query method and device
CN109241384A (en) Scientific research information visualization method and device
CN109213604A (en) A kind of management method and device of data source
CN106940715B (en) A kind of method and apparatus of the inquiry based on concordance list
CN111414410A (en) Data processing method, device, equipment and storage medium
CN106294708A (en) A kind of cluster accounting management method and system based on Torque
CN115905628A (en) Dynamic resource directory construction method, device, equipment and storage medium
CN114595129A (en) Configurable multi-dimensional data monitoring method and device and storage medium
CN111125226B (en) Configuration data acquisition method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20190201

Assignee: Hangzhou Anheng Information Security Technology Co.,Ltd.

Assignor: Dbappsecurity Co.,Ltd.

Contract record no.: X2024980043367

Denomination of invention: A method and device for exporting data from a distributed large data table

Granted publication date: 20211123

License type: Common License

Record date: 20241231

EE01 Entry into force of recordation of patent licensing contract