CN112948474B - Data export method, device, equipment and computer readable storage medium - Google Patents

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

Info

Publication number
CN112948474B
CN112948474B CN201911263091.7A CN201911263091A CN112948474B CN 112948474 B CN112948474 B CN 112948474B CN 201911263091 A CN201911263091 A CN 201911263091A CN 112948474 B CN112948474 B CN 112948474B
Authority
CN
China
Prior art keywords
target
service data
plug
folder
format conversion
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.)
Active
Application number
CN201911263091.7A
Other languages
Chinese (zh)
Other versions
CN112948474A (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.)
Shenzhen Intellifusion Technologies Co Ltd
Original Assignee
Shenzhen Intellifusion Technologies 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 Shenzhen Intellifusion Technologies Co Ltd filed Critical Shenzhen Intellifusion Technologies Co Ltd
Priority to CN201911263091.7A priority Critical patent/CN112948474B/en
Publication of CN112948474A publication Critical patent/CN112948474A/en
Application granted granted Critical
Publication of CN112948474B publication Critical patent/CN112948474B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/258Data format conversion from or to a database

Abstract

The invention provides a data export method, a device, equipment and a computer readable storage medium, wherein the method comprises the following steps: receiving a service data export request; the service data export request carries service data query parameters and an acquisition address of target service data to be exported; acquiring the target service data according to the acquired address; performing format conversion processing on the target service data according to the format conversion plug-in carried in the service data query parameter to obtain target service data after format conversion processing; and exporting the target business data after format conversion processing. The invention can lead the business data of different types of the system to be exported from the same export interface, thereby reducing the development cost of the system business data export function and the maintenance cost of the export interface.

Description

Data export method, device, equipment and computer readable storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a data export method, apparatus, device, and computer readable storage medium.
Background
The data export function is one of indispensable functions of each system, various different types of service data exports exist in the same system, the exporting content and the expression form of the different types of service data are greatly different, the universality of the traditional service data export scheme is difficult to achieve at present, basically, the different types of service data exports of the same system are all required to be provided with independent interfaces for realizing, and the independent interfaces are not unified, namely, a plurality of different export interfaces are required to be maintained for the different types of service data exports, so that the development cost of the system service data export function and the maintenance cost of the export interfaces are greatly increased.
Disclosure of Invention
The invention provides a data export method, a device, equipment and a computer readable storage medium, which aim to solve the problems of high development cost of a system service data export function and high maintenance cost of an export interface.
To achieve the above object, in a first aspect, an embodiment of the present invention provides a data export method, including:
receiving a service data export request; the service data export request carries service data query parameters and an acquisition address of target service data to be exported;
acquiring the target service data according to the acquired address;
performing format conversion processing on the target service data according to the format conversion plug-in carried in the service data query parameter to obtain target service data after format conversion processing;
and exporting the target business data after format conversion processing.
In a second aspect, an embodiment of the present invention further provides a data deriving apparatus, including:
the receiving module is used for receiving the service data export request; the service data export request carries service data query parameters and an acquisition address of target service data to be exported;
the acquisition module is used for acquiring the target service data according to the acquisition address;
The conversion module is used for carrying out format conversion processing on the target service data according to the format conversion plug-in carried in the service data query parameter to obtain target service data after the format conversion processing;
and the export module is used for exporting the target business data after the format conversion processing.
In a third aspect, an embodiment of the present invention further provides a data export device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the data export method described above when the processor executes the computer program.
In a fourth aspect, embodiments of the present invention also provide a computer readable storage medium storing a computer program which, when executed by a processor, implements the steps of the data export method described above.
The scheme of the invention has at least the following beneficial effects:
in the embodiment of the invention, when a service data export request is received, the target service data is acquired according to the acquisition address of the target service data to be exported, which is carried in the service data export request, and after the target service data is acquired, the format conversion processing is carried out on the target service data according to the format conversion plug-in carried by the service data query parameter in the service data export request no matter what type of service data the target service data is, and finally the target service data after the format conversion processing is exported. After the target service data is acquired, the target service data is converted according to the format conversion plug-in carried in the service data export request no matter what type of service data the target service data is, so that the service data of different types of the system are converted into the format requested by the service data export request, so that the service data of different types of the system can be exported from the same export interface, and further, the development cost of the service data export function of the system and the maintenance cost of the export interface are reduced.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a data export method according to an embodiment of the present invention;
FIG. 2 is a flow chart of interactions between a front-end service, an execution device of a data export method, and a system business module in an example of an embodiment of the present invention;
FIG. 3 is a schematic diagram of a data deriving device according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a data deriving apparatus according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be noted that the terms "first," "second," and "second" are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implying a number of technical features being indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature. In the description of the present invention, the meaning of "a plurality" is two or more, unless explicitly defined otherwise.
The embodiment of the invention provides a data export method which can be particularly applied to various systems with data export requirements, and can carry out conversion processing on different types of business data which are needed to be exported by the system, so that the different types of business data of the system can be exported from the same export interface, and further, the development cost of the business data export function of the system and the maintenance cost of the export interface are reduced.
As shown in fig. 1, the data deriving method includes the following steps:
and step 11, receiving a service data export request, wherein the service data export request carries service data query parameters and an acquisition address of target service data to be exported.
In the embodiment of the invention, the service data query parameter carries a format conversion plug-in for converting the target service data, so that the target service data can be exported from the same export interface of the system no matter what type of the target service data is; the target service data is service data that needs to be derived by a user, for example, if the data derivation method is applied to a Shenzhen household registration system, the target service data may be Shenzhen household population data with registration time of about one year and ages of 25 years to 35 years; the acquisition address of the target service data may be a uniform resource locator (URL, uniform Resource Locator) of the target service data, so as to accurately acquire the target service data. It should be understood, of course, that in the embodiment of the present invention, the specific form of the acquisition address is not limited, for example, the acquisition address of the target service data may also be the acquisition path or the physical address of the target service data.
Specifically, in an embodiment of the present invention, the service data export request may be sent by a user to an execution device of the data export method through an operation interface (the execution device may be specifically located inside a system having a data export requirement, such as inside an export interface of the system), and may specifically be in a form of a hypertext transfer (HTTP, hyper Text Transfer Protocol) request.
And step 12, acquiring the target service data according to the acquired address.
In the embodiment of the invention, the target service data can be acquired from a data source containing the target service data according to the acquisition address of the target service data.
Specifically, in the embodiment of the present invention, since the service data of the system needs to be derived, the target service data may be service data in a service module of a certain system in the system. More specifically, in the embodiment of the present invention, a service request message for requesting the target service data may be sent to the system service module corresponding to the acquired address, and then the target service data returned by the system service module according to the service request message is received.
It will be understood that the target service data may be obtained in other manners, for example, when the obtained address of the target service data is a physical address of the target service data, the target service data may be directly read from the physical address.
And step 13, performing format conversion processing on the target service data according to the format conversion plug-in carried in the service data query parameter to obtain the target service data after the format conversion processing.
It should be noted that the plug-in is a pointer to differential compatible design logic concept. In the embodiment of the invention, the format conversion plug-in is mainly used for carrying out format conversion processing on the target service data, and can convert and arrange the service data of different types of the system into the format required by the user, so that the service data of different types of the system can be exported from the same export interface while improving the user experience, and further the development cost of the service data export function of the system and the maintenance cost of the export interface are reduced.
Specifically, in the embodiment of the present invention, the format conversion plug-in may include an excel header plug-in and an excel field mapping plug-in, where the excel header plug-in and the excel field mapping plug-in can convert the target service data into an excel table format; in addition, the format conversion plug-in may also include a folder plug-in, a folder mapping field plug-in and a file acquisition plug-in, where the folder plug-in, the folder mapping field plug-in and the file acquisition plug-in can convert the target service data into a folder form. It will of course be appreciated that the format conversion plug-in described above may also include other forms of plug-ins, such as txt plug-ins, and the like. It should be noted that, the format conversion plug-in may also include multiple types of plug-ins at the same time, including an excel header plug-in, an excel field mapping plug-in, a folder mapping field plug-in, and a file obtaining plug-in, so that the target service data can be converted into an excel table form and a folder form respectively. The specific format conversion process will be described in detail later.
And step 14, exporting the target business data after format conversion processing.
In the embodiment of the invention, after the conversion processing is performed on the target service data, the data export task can be completed by directly exporting the target service data subjected to the format conversion processing. It will be understood, of course, that when the target service data after the format conversion process is derived, the target service data after the format conversion process is sent to the requester of the target service data. Specifically, in the embodiment of the present invention, the target service data after the format conversion process may be sent to the sending end of the service data export request, so as to complete the service data export task.
It should be noted that, in the embodiment of the present invention, when a service data export request is received, the target service data is obtained according to the obtaining address of the target service data to be exported carried in the service data export request, and after the target service data is obtained, no matter what type of service data is the target service data, format conversion processing is performed on the target service data according to the format conversion plugin carried by the service data query parameter in the service data export request, and finally the target service data after format conversion processing is exported. After the target service data is acquired, the target service data is converted according to the format conversion plug-in carried in the service data export request no matter what type of service data the target service data is, so that the service data of different types of the system are converted into the format requested by the service data export request, so that the service data of different types of the system can be exported from the same export interface, and further, the development cost of the service data export function of the system and the maintenance cost of the export interface are reduced.
It should be noted that, because the inside of the export interface passes through the plug-in concept, a set of general data processing method (namely, the data export method) is extracted, and the differentiated data is transmitted from the upper layer in a request form, so that the inside of the actual export interface is not perceived on the service data type, and the query result can be correctly returned.
Next, for different format conversion plugins, the specific implementation manner of performing the format conversion processing on the target service data according to the format conversion plugins carried in the service data query parameters is described in step 13.
When the format conversion plug-in includes an excel header plug-in and an excel field mapping plug-in, the step 13 includes the following steps of:
step one, an excel table is constructed.
And step two, filling the form head names contained in the excel head plug-in as form head information of the excel form into the excel form.
The name of the table header contained in the excel header plug-in is the table header information of the finally generated excel table. Taking an example as an illustration, in the example, assuming that the above data deriving method is applied to a Shenzhen household registration system, and the target service data is Shenzhen household population data with registration time of about one year and ages of 25 years to 35 years, the table header name contained in the excel header plug-in may include name, gender, age, identification number, residential district, and the like. It should be noted that, the table header name contained in the excel header plug-in has a corresponding relationship with the field in the target service data. For example, in the above example, the first field in each piece of service data of the target service data represents a name, the second field represents a gender, the third field represents an age, the fourth field represents an identification card number, and the fifth field represents a residential district.
And thirdly, respectively aiming at each piece of service data in the target service data, converting the content of each first target field in the service data into a target format text corresponding to the content of the first target field according to the corresponding relation between the content of a plurality of first target fields and a plurality of target format text contained in the excel field mapping plug-in, and storing the converted target format text into an excel table filled with table header information.
And step four, taking an excel table containing the table header information and the converted target format characters as target business data after format conversion processing.
In the embodiment of the invention, since the storage format of the service data in the system is fixed, when the form header information is filled in the excel form, the form header names corresponding to the target fields can be filled in the excel form according to the sequence of the first target fields in the service data, so that after the contents of the first target fields in the service data are converted, the converted target format characters can be filled in the excel form filled with the form header information according to the sequence of the first target fields, thereby ensuring the accuracy of the form header information and the target format characters in the excel form.
Specifically, the contents of a plurality of first target fields in the excel field mapping plug-in are the contents of service data required to be exported by the user. Also, by way of example, in this example, the plurality of first target fields includes a first field, a second field, a third field, a fourth field, and a fifth field in the service data, where, for the first field, a target format word corresponding to the content of the first field is the content itself, for the second field, when the content of the second field is 1, a corresponding target format word is male, when the content of the second field is 0, a corresponding target format word is female, for the third field, a target format word corresponding to the content of the third field is the content itself, for the fourth field, a target format word corresponding to the content of the fourth field is the content itself, for the fifth field, when the content of the fifth field is 1, a corresponding target format word is a hole cell, and when the content of the fifth field is 2, a corresponding target format word is Hua Jiang cell. Thus, when a certain piece of service data is: zhang Mou; 1, a step of; 28;36 and 2545;2, performing the following operations in an excel table filled with table header information: a name Zhang Mou, a gender 28, an identification number 36, 2545, a resident cell Hua Jiang, and a common row of cells Zhang Mou, 28, 36, 2545, hua Jiang in an excel form. And after the target format characters corresponding to the contents of the plurality of first target fields of all the service data are stored in the excel table, the excel table is the target service data after format conversion processing.
When the format conversion plugin includes a folder plugin, a folder mapping field plugin, and a file acquisition plugin, the step 13 includes the following steps of:
and respectively carrying out format conversion processing on the service data according to the folder plug-in, the folder mapping field plug-in and the file acquisition plug-in aiming at each piece of service data in the target data to obtain a tree folder containing the target file to be acquired, and taking the obtained tree folder as the target service data after the format conversion processing. That is, after each service data in the target data is subjected to format conversion processing to obtain tree folders containing the target files to be acquired, each tree folder is used as the target service data after the format conversion processing.
For each piece of service data, performing format conversion processing on the service data according to the folder plug-in, the folder mapping field plug-in and the file acquisition plug-in to obtain a tree-type folder containing a target file to be acquired, wherein the specific implementation mode of the tree-type folder comprises the following steps:
The first step, according to a second target field contained in the folder mapping field plug-in, obtaining the content of the second target field from the service data, determining a tree folder directory corresponding to the content of the second target field from a plurality of tree folder directories contained in the folder plug-in, and constructing a tree folder according to the determined tree folder directory.
The second target field contained in the folder mapping field plug-in is a classification basis for the user to finally store the business data according to folders; the plurality of tree folder directories included in the folder plug-in are used for constructing tree folders, and specifically, the corresponding tree folder directory is determined according to the content of the second target field in the service data, and then the tree folders are constructed according to the determined tree folder directory.
Taking an example as an illustration, in the example, assuming that the above data deriving method is applied to a Shenzhen household registration system, and the target service data is Shenzhen household population data with registration time of about one year and age of 25 years to 35 years, if the second target field included in the folder mapping field plug-in is a fifth field residential district of the service data, storing the target service data according to the residential district in a folder manner; the folder plug-in corresponding to the folder mapping field plug-in may include a plurality of tree folder directories in the form of: the corresponding tree folder directory 1 is Shenzhen/Nanshan/cili/Narcissus hole cell, the corresponding tree folder directory 2 is Shenzhen/Fu Tian Ou/Hua Jiang North/Hua Jiangxiao region, and the like, and if the content of the second target field in the service data is 1, the tree folder is constructed according to Shenzhen/Narcissus/cili/Narcissus hole cell, and the bottom folder of the attribute folder is Narcissus hole cell.
And a second step of acquiring the content of the data of the third target field from the service data according to the third target field corresponding to the target file to be acquired, which is contained in the file acquisition plug-in.
And thirdly, acquiring the target file according to the content of the third target field data.
In this embodiment of the present invention, the content of the third target field may be a string for storing the target file (for example, a Base64 string, where Base64 is a coding manner, and the Base64 string is a string encoded by Base64 and may be used to store real file source data), or may be an acquisition path of the target file, so that after the content of the third target field data is acquired from service data, the target file may be quickly acquired. As a preferred example, the acquisition path of the target file may be a physical address or URL of the target file, or the like.
And fourthly, storing the obtained target file into a bottom folder of the tree folder to obtain the tree folder containing the target file to be obtained.
In the embodiment of the present invention, the target file is a file required by a user, and may be information such as a personnel picture, an identity, and the like. Taking the Shenzhen home registration system as an example, if the target file is a picture, and the third target field corresponding to the target file is the sixth field of the service data (the content of the sixth field is the URL of the picture), for a certain piece of service data, the content of the sixth field of the service data is acquired to obtain the URL of the picture, at this time, assuming that the content of the second target field in the service data is 1, after the picture is obtained according to the URL of the picture, the picture is saved in a folder named as a curculigo cell.
It should be noted that, since the first step to the fourth step are required to be performed for each piece of service data in the target service data, in the practical application process, taking the Shenzhen home system as an example, it is likely that the contents of the second target fields of the two pieces of service data are the same, that is, the living cells of the people corresponding to the two pieces of service data are the same cell, which may cause the situation of repeatedly constructing the same tree folder. Therefore, before the tree folder is constructed according to the determined tree folder directory, it should also be determined whether the tree folder constructed according to the determined tree folder directory already exists, so as to avoid repeated construction.
Specifically, before the step of constructing the tree folders according to the determined tree folder directory, the method further includes the following steps: judging whether a tree folder constructed according to the determined tree folder directory exists or not; executing the step of constructing the tree folder according to the determined tree folder directory when the tree folder constructed according to the determined tree folder directory does not exist (i.e., constructing the tree folder if not exist); and when the tree folder constructed according to the determined tree folder directory exists, executing the step of acquiring the content of the third target field data from the service data according to the third target field corresponding to the target file to be acquired, which is contained in the file acquisition plug-in (i.e. if the tree folder exists, the tree folder is not repeatedly constructed, and the second step is directly executed).
It should be further noted that, for any two pieces of service data in the target service data, if after the format conversion processing is performed on the first piece of service data, a tree-shaped folder containing the target file to be acquired is a Shenzhen/nan mountain area/xi li/zhen hole area, so when the format conversion processing is performed on the second piece of service data, a tree-shaped folder containing the target file to be acquired is a Shenzhen/Fu Tian Ou/Hua Jiang north/Hua Jiangxiao area, the Shenzhen market of the top-layer folder and the file folder Shenzhen market which is constructed when the format conversion processing is performed on the first piece of service data can be combined, that is, the folder which is equivalent to the file folder which is named Futian area at the moment is located below the file folder which is constructed when the format conversion processing is performed on the first piece of service data and is named Shenzhen, so that the file folder with the same name is avoided from being browsed by the user.
When the tree-type folder is constructed, the top-layer folder Shenzhen can be combined with the folder Shenzhen which is constructed when the format conversion processing is carried out on the first business data, namely, the folder which is equivalent to the Futian area at the moment can be established below the folder Shenzhen which is constructed when the format conversion processing is carried out on the first business data, so that the folders with the same names are prevented from repeatedly appearing, and the user can conveniently review and browse.
To facilitate an understanding of the data derivation method of the embodiments of the present invention, the above method is further described herein with a specific example. As shown in fig. 2, in this example, the data export method is applied to the Shenzhen household registration system, and the user sends a service data export request to the execution device of the data export method through the front-end service to request to export target service data (such as Shenzhen household population data with registration time of nearly one year and ages of 25 years to 35 years); after receiving a service data export request, the execution device sends a service request message for requesting the target service data to a system service module according to the URL of the target service data to be exported, which is carried in the service data export request, and then receives the target service data returned by the system service module according to the service request message; after receiving the target service data, the execution device performs format conversion processing on the target service data according to an excel header plug-in (including a table header name of name, age, gender, identity card number and the like) and an excel field mapping plug-in (for example, mapping 1 into a male and mapping 0 into a female) carried in a service data query parameter of a service data export request to obtain an excel table; if the service data query parameters further comprise a folder plug-in, a folder mapping field plug-in and a file acquisition plug-in, converting the format of the target service data according to the folder plug-in, the folder mapping field plug-in and the file acquisition plug-in to obtain a tree-type folder; and finally returning the tree folders and the excel form to the front-end service.
As shown in fig. 3, an embodiment of the present invention provides a data deriving apparatus, including: a receiving module 31, an obtaining module 32, a converting module 33 and a deriving module 34.
Wherein, the receiving module 31 is configured to receive a service data export request; the service data export request carries service data query parameters and an acquisition address of target service data to be exported.
And the acquiring module 32 is configured to acquire the target service data according to the acquiring address.
And the conversion module 33 is configured to perform format conversion processing on the target service data according to the format conversion plug-in carried in the service data query parameter, so as to obtain target service data after format conversion processing.
And the export module 34 is configured to export the target service data after the format conversion process.
When the format conversion plug-in includes an excel header plug-in and an excel field mapping plug-in, the conversion module 33 specifically includes: the device comprises a construction unit, a filling unit, a first conversion unit and a first determination unit.
The building unit is used for building an excel table.
And the filling unit is used for filling the table head names contained in the excel head plug-in into the excel table as the table head information of the excel table.
The first conversion unit is used for respectively converting the content of each first target field in the service data into a target format text corresponding to the content of the first target field according to the corresponding relation between the content of the plurality of first target fields and the plurality of target format text contained in the excel field mapping plug-in for each service data in the target service data, and storing the converted target format text into an excel table filled with table header information.
And the first determining unit is used for taking an excel table containing the table header information and the converted target format characters as target business data after format conversion processing.
Wherein, when the format conversion plugin includes a folder plugin, a folder mapping field plugin, and a file acquisition plugin, the conversion module 33 specifically includes a second conversion unit and a second determination unit.
The second conversion unit is configured to perform format conversion processing on each piece of service data in the target data according to the folder plug-in, the folder mapping field plug-in and the file acquisition plug-in, so as to obtain a tree-type folder containing the target file to be acquired.
And the second determining unit is used for taking the obtained tree folder as target business data after format conversion processing.
It should be noted that, in the embodiment of the present invention, the data export device 30 is a device corresponding to the data export method, so that different types of service data of the system can be exported from the same export interface, thereby reducing the development cost of the service data export function of the system and the maintenance cost of the export interface.
The data deriving device 30 includes all the modules or units for implementing the above data deriving method, and in order to avoid excessive repetition, each module or unit of the data deriving device 30 is not described in detail herein.
As shown in fig. 4, an embodiment of the present invention further provides a data export device, comprising a memory 41, a processor 42 and a computer program 43 stored in the memory 41 and executable on the processor 42, the processor 42 implementing the steps of the data export method described above when executing the computer program 43.
Specifically, the processor 42 of the data deriving device 40 implements the following steps when executing the computer program 43: receiving a service data export request; the service data export request carries service data query parameters and an acquisition address of target service data to be exported; acquiring the target service data according to the acquired address; performing format conversion processing on the target service data according to the format conversion plug-in carried in the service data query parameter to obtain target service data after format conversion processing; and exporting the target business data after format conversion processing.
Optionally, the format conversion plug-in includes an excel header plug-in and an excel field mapping plug-in; the processor 42 of the data deriving device 40, when executing the computer program 43, also carries out the following steps: constructing an excel table; filling a form header name contained in the excel header plug-in into the excel form as form header information of the excel form; respectively aiming at each piece of service data in the target service data, converting the content of each first target field in the service data into a target format word corresponding to the content of the first target field according to the corresponding relation between the content of a plurality of first target fields and a plurality of target format words contained in the excel field mapping plug-in, and storing the converted target format words into an excel table filled with table header information; and taking an excel table containing the table header information and the converted target format characters as target service data after format conversion processing.
Optionally, the format conversion plug-in includes a folder plug-in, a folder mapping field plug-in and a file acquisition plug-in; the processor 42 of the data deriving device 40, when executing the computer program 43, also carries out the following steps: respectively carrying out format conversion processing on the service data according to the folder plug-in, the folder mapping field plug-in and the file acquisition plug-in aiming at each piece of service data in the target data to obtain a tree folder containing the target file to be acquired; and taking the obtained tree folder as target business data after format conversion processing.
Optionally, the processor 42 of the data deriving device 40 executes the computer program 43 to implement the following steps: acquiring the content of the second target field from the service data according to the second target field contained in the folder mapping field plug-in, determining a tree folder directory corresponding to the content of the second target field from a plurality of tree folder directories contained in the folder plug-in, and constructing a tree folder according to the determined tree folder directory; acquiring the content of the data of a third target field from the service data according to the third target field which is contained in the file acquisition plug-in and corresponds to the target file to be acquired; the content of the third target field data is a character string or an acquisition path of the target file; acquiring the target file according to the content of the third target field data; and storing the obtained target file into a bottom folder of the tree folder to obtain the tree folder containing the target file to be obtained.
Optionally, the processor 42 of the data deriving device 40 executes the computer program 43 to implement the following steps: judging whether a tree folder constructed according to the determined tree folder directory exists or not; when the tree folder constructed according to the determined tree folder directory does not exist, executing the step of constructing the tree folder according to the determined tree folder directory; and executing a third target field corresponding to the target file to be acquired and contained in the file acquisition plug-in when the tree folder constructed according to the determined tree folder directory exists, and acquiring the content of the third target field data from the service data.
Optionally, the processor 42 of the data deriving device 40 executes the computer program 43 to implement the following steps: a service request message for requesting the target service data is sent to the system service module corresponding to the acquired address; and receiving target service data returned by the system service module according to the service request message.
Optionally, the processor 42 of the data deriving device 40 executes the computer program 43 to implement the following steps: and sending the target business data after format conversion to a sending end of the business data export request.
That is, in a specific embodiment of the present invention, the steps of the data export method described above are implemented when the processor 42 of the data export device 40 executes the computer program 43, so that different types of service data of the system can be exported from the same export interface, thereby reducing the development cost of the service data export function of the system and the maintenance cost of the export interface.
By way of example, the above-described computer program 43 may be divided into one or more modules/units which are stored in the memory 41 and executed by the processor 42 to complete the present invention. And the one or more modules/units may be a series of computer program instruction segments capable of performing the specified functions, which instruction segments are used to describe the execution of the computer program 43 in the data export device 40.
The data deriving device 40 may be a computing device such as a desktop computer, a notebook computer, a palm computer, a cloud server, etc. The data export device 40 may include, but is not limited to, a processor 42, a memory 41. It will be appreciated by those skilled in the art that the schematic diagram is merely an example of the data export device 40 and does not constitute a limitation of the data export device 40, and may include more or fewer components than illustrated, or may combine certain components, or different components, e.g., the data export device 40 may also include input-output devices, network access devices, buses, etc.
The processor 42 may be a central processing unit (CPU, central Processing Unit), but may also be other general purpose processors, digital signal processors (DSP, digital Signal Processor), application specific integrated circuits (ASIC, application Specific Integrated Circuit), off-the-shelf programmable gate arrays (FPGA, field-Programmable Gate Array) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like, and the processor 42 is a control center of the data export device 40, connecting the various parts of the overall data export device 40 using various interfaces and lines.
The memory 41 may be used to store a computer program 43 and/or a module, and the processor 42 may implement various functions of the data export device 40 by running or executing the computer program 43 and/or module stored in the memory 41 and invoking data stored in the memory 41. Specifically, the memory 41 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, application programs (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data (such as audio data, phonebook, etc.) created according to the use of the handset, etc. In addition, the memory 41 may include a high-speed random access memory, and may further include a nonvolatile memory such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid-state storage device.
It should be noted that, since the processor 42 of the data deriving device 40 executes the steps of the data deriving method described above when executing the computer program 43, all embodiments of the data deriving method described above can be applied to the data deriving device 40, and the same or similar advantages can be achieved.
Furthermore, an embodiment of the present invention provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the steps of the data export method described above.
That is, in a specific embodiment of the present invention, the steps of the data export method described above are implemented when the computer program of the computer readable storage medium is executed by the processor, so that different types of service data of the system can be exported from the same export interface, thereby reducing the development cost of the service data export function of the system and the maintenance cost of the export interface.
The computer program of the computer readable storage medium may include, for example, computer program code, which may be in source code form, object code form, executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth.
The above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention, and are intended to be included in the scope of the present invention.

Claims (10)

1. A data export method, comprising:
receiving a service data export request; the service data export request carries service data query parameters and an acquisition address of target service data to be exported;
acquiring the target service data according to the acquired address;
performing format conversion processing on the target service data according to the format conversion plug-in carried in the service data query parameter to obtain target service data after format conversion processing;
and exporting the target business data after format conversion processing.
2. The method of claim 1, wherein the format conversion plug-in comprises an excel header plug-in and an excel field mapping plug-in;
The step of performing format conversion processing on the target service data according to the format conversion plug-in carried in the service data query parameter to obtain target service data after format conversion processing comprises the following steps:
constructing an excel table;
filling a form header name contained in the excel header plug-in into the excel form as form header information of the excel form;
respectively aiming at each piece of service data in the target service data, converting the content of each first target field in the service data into a target format word corresponding to the content of the first target field according to the corresponding relation between the content of a plurality of first target fields and a plurality of target format words contained in the excel field mapping plug-in, and storing the converted target format words into an excel table filled with table header information;
and taking an excel table containing the table header information and the converted target format characters as target service data after format conversion processing.
3. The method of claim 1, wherein the format conversion plugin comprises a folder plugin, a folder mapping field plugin, and a file acquisition plugin;
The step of performing format conversion processing on the target service data according to the format conversion plug-in carried in the service data query parameter to obtain target service data after format conversion processing comprises the following steps:
respectively carrying out format conversion processing on the service data according to the folder plug-in, the folder mapping field plug-in and the file acquisition plug-in aiming at each piece of service data in the target data to obtain a tree folder containing the target file to be acquired;
and taking the obtained tree folder as target business data after format conversion processing.
4. The method according to claim 3, wherein the step of performing format conversion processing on the service data according to the folder plug-in, the folder mapping field plug-in and the file acquisition plug-in to obtain a tree folder containing the target file to be acquired includes:
acquiring the content of the second target field from the service data according to the second target field contained in the folder mapping field plug-in, determining a tree folder directory corresponding to the content of the second target field from a plurality of tree folder directories contained in the folder plug-in, and constructing a tree folder according to the determined tree folder directory;
Acquiring the content of the data of a third target field from the service data according to the third target field which is contained in the file acquisition plug-in and corresponds to the target file to be acquired; the content of the third target field data is a character string or an acquisition path of the target file;
acquiring the target file according to the content of the third target field data;
and storing the obtained target file into a bottom folder of the tree folder to obtain the tree folder containing the target file to be obtained.
5. The method of claim 4, wherein prior to the step of constructing a tree folder from the determined tree folder directory, the method further comprises:
judging whether a tree folder constructed according to the determined tree folder directory exists or not;
when the tree folder constructed according to the determined tree folder directory does not exist, executing the step of constructing the tree folder according to the determined tree folder directory;
and executing a third target field corresponding to the target file to be acquired and contained in the file acquisition plug-in when the tree folder constructed according to the determined tree folder directory exists, and acquiring the content of the third target field data from the service data.
6. A data deriving apparatus, comprising:
the receiving module is used for receiving the service data export request; the service data export request carries service data query parameters and an acquisition address of target service data to be exported;
the acquisition module is used for acquiring the target service data according to the acquisition address;
the conversion module is used for carrying out format conversion processing on the target service data according to the format conversion plug-in carried in the service data query parameter to obtain target service data after the format conversion processing;
and the export module is used for exporting the target business data after the format conversion processing.
7. The apparatus of claim 6, wherein the format conversion plug-in comprises an excel header plug-in and an excel field mapping plug-in;
the conversion module includes:
the building unit is used for building an excel table;
a filling unit, configured to fill a table header name included in the excel header plug-in into the excel table as table header information of the excel table;
the first conversion unit is used for respectively converting the content of each first target field in the service data into a target format text corresponding to the content of the first target field according to the corresponding relation between the content of the plurality of first target fields and the plurality of target format text contained in the excel field mapping plug-in for each service data in the target service data, and storing the converted target format text into an excel table filled with table header information;
And the first determining unit is used for taking an excel table containing the table header information and the converted target format characters as target business data after format conversion processing.
8. The apparatus of claim 6, wherein the format conversion plugin comprises a folder plugin, a folder mapping field plugin, and a file acquisition plugin;
the conversion module includes:
the second conversion unit is used for carrying out format conversion processing on the service data according to the folder plug-in, the folder mapping field plug-in and the file acquisition plug-in aiming at each service data in the target data respectively to obtain a tree folder containing the target file to be acquired;
and the second determining unit is used for taking the obtained tree folder as target business data after format conversion processing.
9. A data export device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the data export method according to any of claims 1 to 5 when the computer program is executed.
10. A computer-readable storage medium storing a computer program, characterized in that the computer program, when executed by a processor, implements the steps of the data export method according to any of claims 1 to 5.
CN201911263091.7A 2019-12-11 2019-12-11 Data export method, device, equipment and computer readable storage medium Active CN112948474B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911263091.7A CN112948474B (en) 2019-12-11 2019-12-11 Data export method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911263091.7A CN112948474B (en) 2019-12-11 2019-12-11 Data export method, device, equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN112948474A CN112948474A (en) 2021-06-11
CN112948474B true CN112948474B (en) 2024-01-05

Family

ID=76225960

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911263091.7A Active CN112948474B (en) 2019-12-11 2019-12-11 Data export method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN112948474B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117056337A (en) * 2023-08-15 2023-11-14 湖南企企通科技有限公司 Service data sorting method, device, equipment and medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060043499A (en) * 2004-06-09 2006-05-15 케이티하이텔 주식회사 Korean internet contents address service method and system using original dns
WO2018201978A1 (en) * 2017-05-04 2018-11-08 平安科技(深圳)有限公司 Interface call data processing method, apparatus, computer device and storage medium
CN109491797A (en) * 2018-11-26 2019-03-19 深圳市斯博科技有限公司 Date storage method, system and computer readable storage medium
WO2019149019A1 (en) * 2018-01-30 2019-08-08 深圳壹账通智能科技有限公司 Data interaction method and apparatus, computer device, and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060043499A (en) * 2004-06-09 2006-05-15 케이티하이텔 주식회사 Korean internet contents address service method and system using original dns
WO2018201978A1 (en) * 2017-05-04 2018-11-08 平安科技(深圳)有限公司 Interface call data processing method, apparatus, computer device and storage medium
WO2019149019A1 (en) * 2018-01-30 2019-08-08 深圳壹账通智能科技有限公司 Data interaction method and apparatus, computer device, and storage medium
CN109491797A (en) * 2018-11-26 2019-03-19 深圳市斯博科技有限公司 Date storage method, system and computer readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于元数据的分布式通用查询系统研究与实现;王战英;王占宏;;微型电脑应用(第08期);全文 *

Also Published As

Publication number Publication date
CN112948474A (en) 2021-06-11

Similar Documents

Publication Publication Date Title
JP7360395B2 (en) Input and output schema mapping
WO2018036272A1 (en) News content pushing method, electronic device, and computer readable storage medium
CN106933871B (en) Short link processing method and device and short link server
CN106897251B (en) Rich text display method and device
CN103546446B (en) Phishing website detection method, device and terminal
CN114500690B (en) Interface data processing method and device, electronic equipment and storage medium
CN108093026B (en) Method and device for processing multi-tenant request
US11188443B2 (en) Method, apparatus and system for processing log data
CN111694749A (en) Automatic interface testing method and device, computer equipment and readable storage medium
EP3217622A1 (en) Data backfill method and device
CN107423037B (en) Application program interface positioning method and device
CN109815112B (en) Data debugging method and device based on functional test and terminal equipment
CN112948474B (en) Data export method, device, equipment and computer readable storage medium
CN112131289A (en) Data processing method and device, electronic equipment and storage medium
CN110362630B (en) Data management method, device, equipment and computer readable storage medium
CN109471957B (en) Metadata conversion method and device based on uniform tags
CN112650529B (en) System and method for configurable generation of mobile terminal APP codes
CN111552527A (en) Method, device and system for translating characters in user interface and storage medium
CN111488386A (en) Data query method and device
CN115065945B (en) Short message link generation method and device, electronic equipment and storage medium
CN110457527A (en) A kind of XML message comparison method and system
CN112149391B (en) Information processing method, information processing apparatus, terminal device, and storage medium
CN109951318A (en) The function configuration method and device of application
CN112835573B (en) Data query method and device, electronic equipment and storage medium
CN110647568B (en) Method and device for converting graph database data into programming language data

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