CN115203306A - Data exporting method and device, computer equipment and readable storage medium - Google Patents

Data exporting method and device, computer equipment and readable storage medium Download PDF

Info

Publication number
CN115203306A
CN115203306A CN202210846347.2A CN202210846347A CN115203306A CN 115203306 A CN115203306 A CN 115203306A CN 202210846347 A CN202210846347 A CN 202210846347A CN 115203306 A CN115203306 A CN 115203306A
Authority
CN
China
Prior art keywords
export
file
data
exported
information
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.)
Pending
Application number
CN202210846347.2A
Other languages
Chinese (zh)
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.)
Pingan Payment Technology Service Co Ltd
Original Assignee
Pingan Payment Technology Service 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 Pingan Payment Technology Service Co Ltd filed Critical Pingan Payment Technology Service Co Ltd
Priority to CN202210846347.2A priority Critical patent/CN115203306A/en
Publication of CN115203306A publication Critical patent/CN115203306A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/256Integrating or interfacing systems involving database management systems in federated or virtual databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0633Lists, e.g. purchase orders, compilation or processing
    • G06Q30/0635Processing of requisition or of purchase orders

Abstract

The application discloses a data export method, a data export device, computer equipment and a readable storage medium, relates to the technical field of internet, can unify data export functions, improves user experience, saves data transmission steps, shortens data transmission time, regenerates export records to be stored in a database, and facilitates data query. The method comprises the following steps: receiving export information of data to be exported in response to a data export request transmitted by a front-end system, wherein the export information comprises an export service type, an export file type and an export identifier; based on a static factory, inquiring and deriving a target database corresponding to the service type; traversing data identifiers of all data contents in the target database, reading the data contents with the data identifiers consistent with the export identifiers, and obtaining data to be exported; and writing data stream of the data to be exported according to the type of the exported file to obtain an exported file, uploading the exported file to a file server, and generating a file export record to be stored in a database.

Description

Data export method and device, computer equipment and readable storage medium
Technical Field
The present application relates to the field of internet technologies, and in particular, to a data exporting method and apparatus, a computer device, and a readable storage medium.
Background
At present, most background management systems relate to list data display of various services, and relevant managers can screen out required key data through preset conditions, such as: the system comprises a commodity background management list, a commodity classification management list, a background order management list, a supply merchant management list and the like, wherein the list query needs data export and download functions.
In carrying out the present application, the applicant has found that the related art has at least the following problems:
the project only has a commodity list function at the initial stage, commodity export is developed aiming at the function, and other businesses also need a data export function at the later stage along with the increasing abundance of the function. However, because the product requirements are different, each developer has different mastery and familiarity with different tools, so that the developed functions are diverse, have no standardization and waste a great deal of manpower. Different export functions may require a user to provide different export information, so that the same type of function point has different implementation modes and no uniformity, thereby affecting the difficulty of code maintenance. Therefore, a data export method for unified docking pages is needed.
Disclosure of Invention
In view of this, the present application provides a data export method, apparatus, computer device and readable storage medium, and mainly aims to solve the problems that the function of exporting the current list data is poor in standardization, and the function is five-fold and is not unified.
According to a first aspect of the present application, there is provided a data export method, the method comprising:
receiving export information of data to be exported in response to a data export request transmitted by a front-end system, wherein the export information comprises an export service type, an export file type and an export identifier;
based on a static factory, inquiring a target database corresponding to the derived service type;
traversing data identifiers of all data contents in the target database, and reading the data contents with the data identifiers consistent with the export identifiers to obtain the data to be exported;
and writing the data stream of the data to be exported according to the type of the exported file to obtain an exported file, uploading the exported file to a file server, and generating a file export record to be stored in a database.
According to a second aspect of the present application, there is provided a data derivation apparatus, the apparatus comprising:
the receiving module is used for responding to a data export request transmitted by a front-end system and receiving export information of data to be exported, wherein the export information comprises an export service type, an export file type and an export identifier;
the query module is used for querying a target database corresponding to the derived service type based on the static factory;
the reading module is used for traversing the data identifications of all the data contents in the target database, reading the data contents of which the data identifications are consistent with the export identification, and obtaining the data to be exported;
and the storage module is used for writing the data stream of the data to be exported according to the type of the exported file to obtain an exported file, uploading the exported file to a file server, and generating a file export record to be stored in a database.
According to a third aspect of the present application, there is provided a computer device comprising a memory storing a computer program and a processor implementing the steps of the method of any of the first aspects when the computer program is executed.
According to a fourth aspect of the present application, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method of any of the first aspects described above.
By means of the technical scheme, the data export method, the data export device, the computer equipment and the readable storage medium are provided. And then, based on the static factory, inquiring a target database corresponding to the export service type, traversing the data identifiers of all data contents in the target database, and reading the data contents with the data identifiers consistent with the export identifiers to obtain the data to be exported. And finally, writing data streams into the data to be exported according to the type of the exported file to obtain an exported file, uploading the exported file to a file server, and generating a file exported record to be stored in a database. The method provides a fixed set of template processing logic, realizes unified page connection, can query the data content to be exported in the corresponding system database only by providing basic information, namely the service type and the export identification, does not need to send a data export request to a target system, returns a result after the target database query is completed by the target system, unifies the data export function, improves the user experience, saves the steps of data transmission, and shortens the time of data transmission. And uploading the export file to a file server, generating a file export record and storing the file export record in a database, so that subsequent related workers can conveniently inquire and backtrack.
The foregoing description is only an overview of the technical solutions of the present application, and the present application can be implemented according to the content of the description in order to make the technical means of the present application more clearly understood, and the following detailed description of the present application is given in order to make the above and other objects, features, and advantages of the present application more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the application. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a schematic flowchart illustrating a data export method provided by an embodiment of the present application;
fig. 2A shows a schematic flowchart of a data export method provided in an embodiment of the present application;
fig. 2B shows a schematic flowchart of a data export method provided in an embodiment of the present application;
fig. 3A shows a schematic structural diagram of a data export apparatus provided in an embodiment of the present application;
fig. 3B shows a schematic structural diagram of a data export apparatus provided in an embodiment of the present application;
fig. 3C shows a schematic structural diagram of a data export apparatus provided in an embodiment of the present application;
fig. 4 shows a schematic device structure diagram of a computer apparatus according to an embodiment of the present application.
Detailed Description
Exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
An embodiment of the present application provides a data export method, as shown in fig. 1, the method includes:
101. and receiving export information of the data to be exported in response to a data export request incoming from the front-end system, wherein the export information comprises an export service type, an export file type and an export identifier.
The method is applicable to a background management system, relevant workers can display service data under the current service after clicking corresponding service on a front-end system, for example, the relevant workers want to check order data, after clicking the order service, the front-end system sends an order data acquisition request to the background management system to acquire order data including order numbers, order states, payment modes, order placing time and the like, and after receiving the order data, the front-end system displays the order data on a front-end page according to a preset display template.
Furthermore, in order to archive and backup data contents and facilitate background data management, relevant workers need to export service data. Related staff can trigger a data export inlet on a front-end page, enter a data export page, select business data to be exported and send a data export request. The background management system receives export information of data to be exported in response to a data export request transmitted by the front-end system, namely the content input by related staff on a data export page. Specifically, the export information includes an export service type, an export file type, and an export identifier. Still take the example of deriving order data, where the business type is the order type, the derivation identifier is the order number, and the file type may be. Xlsx,. Csv,. Txt, etc.
102. And querying a target database corresponding to the derived service type based on the static factory.
In the embodiment of the application, a static factory is generated once and is fixed, a background management system calls the static factory, and the static factory queries a target database according to a service type, wherein the static factory method is a method for creating an encapsulated object, the object can be created through the static factory method, and in short, statements for constructing the object are encapsulated into classes. It should be noted that, as the project is continuously developed, a plurality of subsystems, such as an order management subsystem, a supplier management subsystem, a product classification management subsystem, etc., may be included. Each subsystem corresponds to different databases, and each subsystem also corresponds to a service type.
Through the steps, the data export request is not required to be sent to the target system, the target system determines the corresponding target database, and the static factory directly inquires the target data according to the service type, so that the steps of data transmission are saved, and the time of data transmission is shortened.
103. And traversing the data identifications of all the data contents in the target database, reading the data contents with the data identifications consistent with the export identification, and obtaining the data to be exported.
In the embodiment of the application, when business data is uploaded by related workers in a project operation process, the business data is uploaded to a corresponding database according to business types of the business data, that is, the related workers import list data of order types in an order management system and store the list data in the order database, and import related data of suppliers in a supplier management system and store the related data in the supplier database.
Therefore, the database stores a large amount of data information. And after determining the target database, the background management system calls a pre-programmed query method, and reads corresponding data to be exported from the target database according to the export identification provided by the user.
104. And writing data stream of the data to be exported according to the type of the exported file to obtain an exported file, uploading the exported file to a file server, and generating a file export record to be stored in a database.
And further, writing the exported data into a data stream according to the exported file type according to the file type required by the related staff to obtain an exported file. It should be noted that the export file type may be xlsx,. Csv,. Txt, etc., and the content of the export file type is not specifically limited in this application. And then, uploading the export file to a file server, generating a file export record and storing the file export record to a database, so that subsequent related workers can conveniently inquire and backtrack the export data.
According to the method provided by the embodiment of the application, firstly, the export information of the data to be exported is received in response to the data export request transmitted by the front-end system. And then, based on the static factory, inquiring a target database corresponding to the derived service type, traversing data identifications of all data contents in the target database, and reading the data contents with the data identifications consistent with the derived identifications to obtain the data to be derived. And finally, writing data streams into the data to be exported according to the type of the exported file to obtain an exported file, uploading the exported file to a file server, and generating a file exported record to be stored in a database. The method provides a fixed set of template processing logic, realizes unified page connection, can query the data content to be exported in the corresponding system database only by providing basic information, namely the service type and the export identification, does not need to send a data export request to a target system, returns a result after the target database query is completed by the target system, unifies the data export function, improves the user experience, saves the steps of data transmission, and shortens the time of data transmission. And uploading the export file to a file server, generating a file export record and storing the file export record in a database, so that subsequent related workers can conveniently inquire and backtrack.
An embodiment of the present application provides a data export method, as shown in fig. 2A, the method includes:
201. and responding to a data export request transmitted by the front-end system, calling the front-end system, and switching the data display page to a data export page, wherein the data export page is used for acquiring export information.
At present, most background management systems relate to list data display of various services, and relevant managers can screen out required key data through preset conditions, such as: the system comprises a commodity background management list, a commodity classification management list, a background order management list, a supply merchant management list and the like, wherein the list inquiry needs a data export and download function. However, the applicant realizes that only the commodity list function is performed in the early stage of the project, commodity export is developed for the function, and as the function becomes richer and richer in the later stage, the data export function is also required by other businesses. However, because the product requirements are different, each developer has different mastery and familiarity with different tools, so that the developed functions are all five-door, without standardization and waste a lot of manpower. Different export functions may require a user to provide different export information, so that the same type of function points have different implementation modes and are not unified, thereby affecting the difficulty level of code maintenance laterally.
Therefore, according to the data export method, device, computer device and readable storage medium provided by the present application, the present application firstly receives export information of data to be exported in response to a data export request incoming from a front-end system. And then, based on the static factory, inquiring a target database corresponding to the export service type, traversing the data identifiers of all data contents in the target database, and reading the data contents with the data identifiers consistent with the export identifiers to obtain the data to be exported. And finally, writing data streams into the data to be exported according to the type of the exported file to obtain an exported file, uploading the exported file to a file server, and generating a file exported record to be stored in a database. The method provides a fixed set of template processing logics, realizes unified page connection, can query the content of the data to be exported in the corresponding system database only by providing basic information, namely service types and export identifiers, does not need to send a data export request to a target system, returns a result after the target database query is completed by the target system, unifies the data export function, improves user experience, saves data transmission steps and shortens data transmission time. And uploading the export file to a file server, generating a file export record and storing the file export record in a database, so that subsequent related workers can conveniently inquire and backtrack.
In the embodiment of the application, in order to archive and backup the data content and facilitate background data management, relevant workers need to export the service data. Specifically, the relevant staff member will trigger the data export entry on the front page and enter the data export page. Further, the business data which is desired to be exported is selected in the data export page, and a data export request is sent.
In an optional application scenario, a plurality of service types, file identifiers and file types can be preset by related technicians, and a user sequentially clicks to generate a data export request. For example, an input template is set, and input boxes of an export service type, an export identifier, and an export file type are set in the input template. A plurality of option values are embedded within the input box. And when the user clicks the input box, popping up options corresponding to the input box, acquiring the target option selected by the user, and putting the target option into the template to obtain the export information. In an optional application scenario, related technical personnel can also directly input an export service type, an export identifier and an export file type to obtain export information, the export information is identified by a background management system based on a natural language processing technology, and the export service type, the export identifier and the export file type are extracted.
202. And when detecting that the information confirmation interface is triggered, receiving export information sent by the data export page, identifying the export information, and determining an export service type, an export file type and an export identifier.
In order to judge whether the user finishes inputting the export information, a confirmation interface is arranged on the front-end system, and whether the export information is received or not is determined by judging whether the confirmation interface is triggered or not. Specifically, if the user triggers the confirmation interface, it indicates that the user has finished inputting, and may receive export information sent by the data export page. And then identifying the export information, and determining an export service type, an export file type and an export identifier.
203. And creating a static factory, calling the static factory to traverse the type tags of all databases in the preset directory, comparing all the type tags with the derived service types respectively, and determining the database with the type tags consistent with the derived service types as a target database.
In the embodiment of the application, in order to obtain data of different services by distinguishing different service lines, a static factory is created, the different service lines are distinguished based on the advantage that the static factory can define names by self, and a target database corresponding to the derived service data is inquired.
Specifically, the background management system first traverses type tags of all databases in a preset directory, and it should be noted that a corresponding relationship between a service type and a database is stored in the preset directory, for example, a tag service type refers to a database for querying information of a tag table, and a commodity type refers to a database for storing information of an item table. And then, comparing all the type labels with the derived service types respectively to generate comparison results. If the comparison result shows that the type-determining label is consistent with the derived service type, the database corresponding to the current service type is the target database of the query.
204. And traversing the data identifications of all the data contents in the target database, reading the data contents with the data identifications consistent with the export identification, and obtaining the data to be exported.
In the embodiment of the application, when the business data is uploaded by related workers in the process of project operation, the business data is uploaded to a corresponding database according to the business types of the business data, that is, the related workers import list data of order types in an order management system and store the list data in the order database, and import related data of suppliers in a supplier management system and store the related data in the supplier database.
Therefore, the database stores a large amount of data information. And after determining the target database, the background management system calls a pre-programmed query method, and reads corresponding data to be exported from the target database according to the export identification provided by the user. Namely, data identifiers of all data contents in the target database are traversed, and the data contents with the data identifiers consistent with the export identifiers are read to obtain the data to be exported. For example, the related staff wants to export a certain amount of order data, set the service type as the order type, export the order number identified as the order data, traverse the order numbers of all data contents in the target database, and read the data contents with the order numbers consistent with the order number of the order data as the data to be exported.
205. And writing data stream of the data to be exported according to the type of the exported file to obtain the exported file, establishing a link with a file server, customizing an uploading path of the exported file, and uploading the exported file to the file server according to the uploading path.
In the embodiment of the application, after determining the data to be exported, the background management system writes the data stream into the exported data according to the file type required by the relevant staff, so as to obtain the exported file. Wherein, the export file type may be. Xlsx,. Csv,. Txt, etc., and the content of the export file type is not specifically limited in this application.
Further, the relevant staff input the uploading path of the customized export file. In the actual application process, the uploading path can be a default path of the system, and related workers can customize the uploading path again according to actual requirements. And finally, uploading the exported file to a file server according to the uploading path, and storing the exported file by the file server according to the acquired uploading path.
206. Recording export service type, uploading path, export identification and export time as file information, recording processing flow water and operation logs exported by the file, aggregating the file information, the processing flow water and the operation logs to obtain a file export record, and uploading the file export record to a database for storage.
In the embodiment of the application, in order to facilitate subsequent related staff to query and trace the exported data, the method needs to record the service type, the uploading path, the export identifier and the export time of the exported file as file information, and then record the processing flow and the operation log of the data export. And finally, aggregating the recorded file information, the processing running water and the operation log to obtain a file export record, and uploading the file export record to a database for storage. In the practical application process, each file export record corresponds to a file identifier, which can be a number, a letter or a combination of the number and the letter, and the type and the content of the file identifier are not specifically limited in the application.
207. And selecting a file to be downloaded from the export files for downloading.
In the embodiment of the present application, considering that a relevant worker may download part of export data in order to facilitate project analysis and management, the present application downloads an export file by using a data downloading method of a unified docking page, as shown in fig. 2B, where a specific downloading process of the export file is as follows:
firstly, a background operation user triggers a screening instruction on a download center page, and the download center page receives a specified service type and a lead-out time range input by the background operation user. For example, order data export files are downloaded over the last 10 days. And then, the background management system traverses the export time of all the file export records in the database, and extracts a plurality of file export records with the export time hitting in the export time range. And identifying the service type labels of the file export records, and extracting the specified file export records of which the service type labels are consistent with the specified service types from the file export records. And further, returning the specified file identifier and the specified service type stored in the specified file export record in a downloading file list form, so that the user can select the file to be downloaded according to the specified file identifier and the specified service type.
For example, the business management system reads file export records in nearly 10 days in the export file, and screens 20 file export records according to the business type of order data. And returning the service types and the file identifications indicated by the 20 file export records, namely the order data and the file ID codes to the client for displaying. Finally, the background operation user selects the files to be downloaded in the 20 export files.
Next, the background operation user triggers a data downloading instruction, and the background management system receives downloading information of the file to be downloaded, namely the downloading service type and the downloading file identifier, in response to the user triggering the data downloading instruction. Specifically, in response to a data downloading instruction triggered by a user, the background management system receives file information of a file to be downloaded selected by the user on a downloading center page. Based on the natural language processing technology, the downloading information of the file to be downloaded is identified, and the downloading service type and the downloading file identification are determined.
Furthermore, the background management system inquires a file export record of the file to be downloaded in the database according to the downloading service type and the downloading file identification. The file information of the file export record stores the uploading path corresponding to the export record, so that the background management system identifies the file information in the file export record to obtain the uploading path of the file to be downloaded.
And finally, remotely reading the file to be downloaded in the file server according to the uploading path of the file to be downloaded, and sending the file to be downloaded to the browser so as to enable the browser to finish local downloading.
According to the method provided by the embodiment of the application, firstly, the export information of the data to be exported is received in response to the data export request transmitted by the front-end system. And then, based on the static factory, inquiring a target database corresponding to the derived service type, traversing data identifications of all data contents in the target database, and reading the data contents with the data identifications consistent with the derived identifications to obtain the data to be derived. And finally, writing data streams into the data to be exported according to the type of the exported file to obtain an exported file, uploading the exported file to a file server, and generating a file exported record to be stored in a database. The method provides a fixed set of template processing logic, realizes unified page connection, can query the data content to be exported in the corresponding system database only by providing basic information, namely the service type and the export identification, does not need to send a data export request to a target system, returns a result after the target database query is completed by the target system, unifies the data export function, improves the user experience, saves the steps of data transmission, and shortens the time of data transmission. And uploading the export file to a file server, generating a file export record and storing the file export record to a database, so that subsequent related workers can inquire and backtrack conveniently.
Further, as a specific implementation of the method shown in fig. 1, an embodiment of the present application provides a data exporting apparatus, as shown in fig. 3A, the apparatus includes: a first receiving module 301, a query module 302, a reading module 303, and a storage module 304.
The first receiving module 301 is configured to receive export information of data to be exported in response to a data export request sent by a front-end system, where the export information includes an export service type, an export file type, and an export identifier;
the query module 302 is configured to query, based on the static factory, a target database corresponding to the derived service type;
the reading module 303 is configured to traverse data identifiers of all data contents in the target database, read data contents of which the data identifiers are consistent with the export identifiers, and obtain the data to be exported;
the storage module 304 is configured to write the data stream into the data to be exported according to the type of the export file to obtain an export file, upload the export file to a file server, generate a file export record, and store the file export record in a database.
In a specific application scenario, the first receiving module 301 is configured to respond to a data export request sent by a front-end system, invoke the front-end system, and switch a data presentation page to a data export page, where the data export page is used to obtain the export information; when detecting that the information confirmation interface is triggered, receiving the export information sent by the data export page; and identifying the export information, and determining the export service type, the export file type and the export identifier.
In a specific application scenario, the query module 302 is configured to create the static factory, call the static factory to traverse type tags of all databases in a preset directory, and compare all type tags with the derived service types, where a mapping relationship between a service type and a database is stored in the preset target; and determining a database with the type label consistent with the derived service type as the target database.
In a specific application scenario, the storage module 304 is configured to establish a link with the file server, customize an upload path of the export file, and upload the export file to the file server according to the upload path; recording the export service type, the upload path, the export identifier and the export time as file information, recording processing running water and an operation log exported by the file, and aggregating the file information, the processing running water and the operation log to obtain the file export record; and uploading the file export record to the database for storage.
In a specific application scenario, as shown in fig. 3B, the apparatus further includes: a second receiving module 305, an identifying module 306, and a downloading module 307.
The second receiving module 305 is configured to receive, in response to a data downloading instruction triggered by a user, downloading information of a file to be downloaded, where the downloading information includes a downloading service type and a downloading file identifier;
the identifying module 306 is configured to query a file export record of the file to be downloaded in the database according to the download service type and the download file identifier, identify file information in the file export record, and obtain an upload path of the file to be downloaded;
the downloading module 307 is configured to remotely read the file to be downloaded from the file server according to the uploading path of the file to be downloaded, and send the file to be downloaded to the browser, so that the browser completes local downloading.
In a specific application scenario, as shown in fig. 3C, the apparatus further includes: a third receiving module 308, an extracting module 309 and a returning module 310.
The third receiving module 308 is configured to receive a specified service type and a derived time range in response to the user trigger filtering instruction;
the extracting module 309 is configured to traverse the export time of all file export records in the database, and extract a plurality of file export records whose export time hits the export time range;
the returning module 310 is configured to identify the service type tags of the multiple file export records, extract the specified file export record with the service type tag consistent with the specified service type, and return the specified file identifier and the specified service type stored in the specified file export record, so that the user selects the file to be downloaded according to the specified file identifier and the specified service type.
In a specific application scenario, the second receiving module 305 is configured to receive, in response to a data downloading instruction triggered by a user, file information of the file to be downloaded selected by the user on a downloading center page;
and identifying the downloading information of the file to be downloaded, and determining the downloading service type and the downloading file identifier.
The device provided by the embodiment of the application firstly responds to a data export request transmitted by a front-end system and receives export information of data to be exported. And then, based on the static factory, inquiring a target database corresponding to the export service type, traversing the data identifiers of all data contents in the target database, and reading the data contents with the data identifiers consistent with the export identifiers to obtain the data to be exported. And finally, writing data streams into the data to be exported according to the type of the exported file to obtain an exported file, uploading the exported file to a file server, and generating a file export record to be stored in a database. The method provides a fixed set of template processing logic, realizes unified page connection, can query the data content to be exported in the corresponding system database only by providing basic information, namely the service type and the export identification, does not need to send a data export request to a target system, returns a result after the target database query is completed by the target system, unifies the data export function, improves the user experience, saves the steps of data transmission, and shortens the time of data transmission. And uploading the export file to a file server, generating a file export record and storing the file export record to a database, so that subsequent related workers can inquire and backtrack conveniently.
It should be noted that other corresponding descriptions of the functional units related to the data export apparatus provided in the embodiment of the present application may refer to the corresponding descriptions in fig. 1 and fig. 2A to fig. 2B, and are not described again here.
In an exemplary embodiment, referring to fig. 4, there is further provided a device including a communication bus, a processor, a memory, and a communication interface, and further including an input/output interface and a display device, wherein the functional units may communicate with each other through the bus. The memory stores computer programs, and the processor is used for executing the programs stored in the memory and executing the data export method in the embodiment.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the data deriving method.
Through the above description of the embodiments, those skilled in the art will clearly understand that the present application can be implemented by hardware, and also by software plus a necessary general hardware platform. Based on such understanding, the technical solution of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.), and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the implementation scenarios of the present application.
Those skilled in the art will appreciate that the figures are merely schematic representations of one preferred implementation scenario and that the blocks or flow diagrams in the figures are not necessarily required to practice the present application.
Those skilled in the art will appreciate that the modules in the devices in the implementation scenario may be distributed in the devices in the implementation scenario according to the description of the implementation scenario, or may be located in one or more devices different from the present implementation scenario with corresponding changes. The modules of the implementation scenario may be combined into one module, or may be further split into a plurality of sub-modules.
The above application serial numbers are for description purposes only and do not represent the superiority or inferiority of the implementation scenarios.
The above disclosure is only a few specific implementation scenarios of the present application, but the present application is not limited thereto, and any variations that can be made by those skilled in the art are intended to fall within the scope of the present application.

Claims (10)

1. A method of data derivation, comprising:
receiving export information of data to be exported in response to a data export request transmitted by a front-end system, wherein the export information comprises an export service type, an export file type and an export identifier;
based on a static factory, inquiring a target database corresponding to the derived service type;
traversing data identifiers of all data contents in the target database, and reading the data contents with the data identifiers consistent with the export identifiers to obtain the data to be exported;
and writing the data stream of the data to be exported according to the type of the exported file to obtain an exported file, uploading the exported file to a file server, and generating a file export record to be stored in a database.
2. The method of claim 1, wherein receiving export information for data to be exported in response to an incoming data export request from a head-end system comprises:
responding to a data export request transmitted by a front-end system, calling the front-end system, and switching a data display page to a data export page, wherein the data export page is used for acquiring the export information;
when detecting that the information confirmation interface is triggered, receiving the export information sent by the data export page;
and identifying the export information, and determining the export service type, the export file type and the export identifier.
3. The method of claim 1, wherein querying a target database corresponding to the derived traffic type based on the static factory comprises:
creating the static factory, calling the static factory to traverse type labels of all databases in a preset directory, and respectively comparing all type labels with the derived service types, wherein a mapping relation between the service types and the databases is stored in the preset target;
and determining a database with a type label consistent with the derived service type as the target database.
4. The method of claim 1, wherein uploading the export file to a file server, generating a file export record to be stored in a database comprises:
establishing a link with the file server, customizing an uploading path of the exported file, and uploading the exported file to the file server according to the uploading path;
recording the export service type, the upload path, the export identifier and the export time as file information, recording processing running water and an operation log exported by the file, and aggregating the file information, the processing running water and the operation log to obtain the file export record;
and uploading the file export record to the database for storage.
5. The method of claim 1, further comprising:
responding to a data downloading instruction triggered by a user, and receiving downloading information of a file to be downloaded, wherein the downloading information comprises a downloading service type and a downloading file identifier;
inquiring a file export record of a file to be downloaded in the database according to the downloading service type and the downloading file identification, identifying file information in the file export record, and obtaining an uploading path of the file to be downloaded;
and remotely reading the file to be downloaded in the file server according to the uploading path of the file to be downloaded, and sending the file to be downloaded to a browser so that the browser finishes local downloading.
6. The method of claim 5, wherein before receiving the downloading information of the file to be downloaded in response to the user-triggered data downloading instruction, the method further comprises:
receiving a specified service type and a derived time range in response to the user triggering a screening instruction;
traversing the export time of all file export records in the database, and extracting a plurality of file export records of which the export time is in the export time range;
and identifying the service type labels of the file export records, extracting the appointed file export record with the service type label consistent with the appointed service type, and returning the appointed file identifier and the appointed service type stored in the appointed file export record so that the user can select the file to be downloaded according to the appointed file identifier and the appointed service type.
7. The method of claim 5, wherein receiving download information of the file to be downloaded in response to the user triggering the data download instruction comprises:
responding to a data downloading instruction triggered by a user, and receiving file information of the file to be downloaded selected by the user on a downloading center page;
and identifying the downloading information of the file to be downloaded, and determining the downloading service type and the downloading file identifier.
8. A data derivation apparatus, comprising:
the receiving module is used for responding to a data export request transmitted by a front-end system and receiving export information of data to be exported, wherein the export information comprises an export service type, an export file type and an export identifier;
the query module is used for querying a target database corresponding to the derived service type based on the static factory;
the reading module is used for traversing the data identifications of all the data contents in the target database, reading the data contents of which the data identifications are consistent with the export identification, and obtaining the data to be exported;
and the storage module is used for writing the data stream of the data to be exported according to the type of the exported file to obtain an exported file, uploading the exported file to a file server, and generating a file export record to be stored in a database.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor when executing the computer program performs the steps of the method according to any of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
CN202210846347.2A 2022-07-19 2022-07-19 Data exporting method and device, computer equipment and readable storage medium Pending CN115203306A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210846347.2A CN115203306A (en) 2022-07-19 2022-07-19 Data exporting method and device, computer equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210846347.2A CN115203306A (en) 2022-07-19 2022-07-19 Data exporting method and device, computer equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN115203306A true CN115203306A (en) 2022-10-18

Family

ID=83582202

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210846347.2A Pending CN115203306A (en) 2022-07-19 2022-07-19 Data exporting method and device, computer equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN115203306A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116991807A (en) * 2023-09-22 2023-11-03 深圳市金政软件技术有限公司 Data management method, device, equipment and medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116991807A (en) * 2023-09-22 2023-11-03 深圳市金政软件技术有限公司 Data management method, device, equipment and medium

Similar Documents

Publication Publication Date Title
CN107908541B (en) Interface testing method and device, computer equipment and storage medium
US8799854B2 (en) Reusing software development assets
CN112506807B (en) Automatic test system for interface serving multiple systems
CN111859076B (en) Data crawling method, device, computer equipment and computer readable storage medium
CN105095059A (en) Method and device for automated testing
CN111782635B (en) Data processing method and device, storage medium and electronic device
CN110895472A (en) Method and device for identifying service change
CN108255735B (en) Associated environment testing method, electronic device and computer readable storage medium
CN112650688A (en) Automated regression testing method, associated device and computer program product
CN115203306A (en) Data exporting method and device, computer equipment and readable storage medium
CN106815223B (en) Mass picture management method and device
CN116578497A (en) Automatic interface testing method, system, computer equipment and storage medium
CN111061733A (en) Data processing method and device, electronic equipment and computer readable storage medium
CN111984882A (en) Data processing method, system and equipment
CN113220592B (en) Processing method and device for automatic test resources, server and storage medium
CN114443294B (en) Big data service component deployment method, system, terminal and storage medium
CN114168565B (en) Backtracking test method, device and system of business rule model and decision engine
CN115860877A (en) Product marketing method, device, equipment and medium
CN114880239A (en) Interface automation testing framework and method based on data driving
CN114064510A (en) Function testing method and device, electronic equipment and storage medium
CN110221952B (en) Service data processing method and device and service data processing system
CN113434585A (en) Resource saving method and equipment
CN115437903A (en) Interface test method, device, apparatus, storage medium, and program
CN111159988A (en) Model processing method and device, computer equipment and storage medium
CN112181407A (en) Service implementation processing method, device, system, electronic equipment and storage medium

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