CN113505133A - Method for realizing data export based on service generalization - Google Patents

Method for realizing data export based on service generalization Download PDF

Info

Publication number
CN113505133A
CN113505133A CN202110897728.9A CN202110897728A CN113505133A CN 113505133 A CN113505133 A CN 113505133A CN 202110897728 A CN202110897728 A CN 202110897728A CN 113505133 A CN113505133 A CN 113505133A
Authority
CN
China
Prior art keywords
service
configuration
generalization
report
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
CN202110897728.9A
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.)
Shanghai Zhongtongji Network Technology Co Ltd
Original Assignee
Shanghai Zhongtongji Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Zhongtongji Network Technology Co Ltd filed Critical Shanghai Zhongtongji Network Technology Co Ltd
Priority to CN202110897728.9A priority Critical patent/CN113505133A/en
Publication of CN113505133A publication Critical patent/CN113505133A/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/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • 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
    • G06F16/2455Query execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/177Editing, e.g. inserting or deleting of tables; using ruled lines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4488Object-oriented
    • G06F9/449Object-oriented method invocation or resolution

Abstract

The application relates to a method for realizing data export based on service generalization, which comprises the following steps: acquiring export demand information input by a user; the export demand information carries a report code; according to the report codes, determining configuration task information corresponding to the report codes from the pre-constructed task information configuration; calling a corresponding service end query interface based on the dubbo generalization call, and obtaining a query result according to the configuration task information; according to the report code, determining the header information corresponding to the report code from the pre-configured header information configuration; and generating a target table file according to the query result and the table header information. Therefore, remote calling service can be realized based on pre-constructed configuration information and generalized calling without repeated development of each system, and meanwhile, hard coding is not needed, so that the development period is shortened, the interface calling complexity is reduced, and the data export efficiency is effectively improved.

Description

Method for realizing data export based on service generalization
Technical Field
The application relates to the technical field of data processing, in particular to a method for realizing data export based on service generalization.
Background
With the rapid development of the express delivery industry, related supporting systems are increased day by day, and the requirements of each system on data export are highlighted day by day.
In the related art, the existing implementation scheme is that each system independently develops and maintains a set of data export system, and the data export system is repeatedly developed and maintained so as to meet the requirements of each system on data export. However, the manner of implementing data export by hard coding cannot implement call service by configuration, which easily results in low efficiency of exporting data and is not beneficial to subsequent upgrade maintenance.
Disclosure of Invention
In view of this, the present application aims to overcome the technical problems that the method for exporting data in the prior art cannot realize calling service through configuration, has low export efficiency and is difficult to maintain, and provides a method for realizing data export based on service generalization.
In order to achieve the purpose, the following technical scheme is adopted in the application:
the application provides a method for realizing data export based on service generalization, which comprises the following steps:
acquiring export demand information input by a user; the export demand information carries a report code;
according to the report code, determining configuration task information corresponding to the report code from pre-constructed task information configuration;
calling a corresponding service end query interface based on the dubbo generalization call, and obtaining a query result according to the configuration task information;
according to the report code, determining header information corresponding to the report code from pre-configured header information configuration;
and generating a target table file according to the query result and the table header information.
Optionally, after the generating the target form file, the method further includes:
and uploading the target table file to a file server.
Optionally, the configuration task information includes: report name, paging mode, paging number field, page number field, paging number, ID field, data source content and authority code.
Optionally, the invoking a corresponding service end query interface based on the dubbo generalized invocation, and obtaining a query result according to the configuration task information includes:
determining a corresponding service end query interface by using the data source content;
and on the basis of the dubbo service, the service end query interface is called in a generalization manner, and the query result is obtained according to the configuration task information.
Optionally, the header information includes: title, field name, data type, and conversion rules.
The technical scheme provided by the application can comprise the following beneficial effects:
according to the scheme, the task information configuration and the header information configuration are constructed in advance, and a configuration basis is provided for subsequent task scheduling. Based on this, after the export demand information input by the user is obtained, the configuration task information corresponding to the report code can be determined from the task information configuration according to the report code carried in the export demand information, and then the corresponding business end query interface can be called by using the configuration task information based on the generalized calling of the dubbo service, so that the query result, namely the demand data, is obtained. And then according to the report code, determining the header information corresponding to the report code from the header information configuration, and generating a target table file by using the query result and the header information. Therefore, remote calling service can be realized based on pre-constructed configuration information and generalized calling without repeated development of each system, and meanwhile, hard coding is not needed, so that the development period is shortened, the interface calling complexity is reduced, and the data export efficiency is effectively improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a method for implementing data export based on service generalization according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail below. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the examples given herein without making any creative effort, shall fall within the protection scope of the present application.
With the rapid development of the express delivery industry, related supporting systems are increased day by day, and the requirements of each system on data export are highlighted day by day. The existing method for realizing data export generally is to independently develop and maintain a set of data export system for each system, however, the data export method has the following disadvantages: firstly, each system needs to maintain an independent data export function and needs to repeatedly develop the data export system; secondly, the existing data export system is realized based on hard coding, cannot realize calling service through configuration, and has high use and maintenance cost; thirdly, the existing export system can not transmit service context information (such as user and environment information) during asynchronous export, so that the complexity of realizing functions is high and the maintenance is difficult; and fourthly, the export of large data volume is not supported, and the problem of memory overflow exists.
Based on this, the embodiment of the present application provides a method for implementing data export based on service generalization, as shown in fig. 1, the method may include at least the following implementation steps:
step 11, acquiring export demand information input by a user; the export requirement information carries a report code.
And step 12, according to the report codes, determining configuration task information corresponding to the report codes from the pre-constructed task information configuration.
Wherein, each type of configuration task information has a unique report code.
And step 13, calling a corresponding service end query interface based on the dubbo generalized call, and obtaining a query result according to the configuration task information.
The generalized calling is a remote service calling mode, and is mainly used for the situation that a client does not provide an API (application program interface) interface and a model class, all POJOs in parameters and return values are represented by maps, based on the mechanism, relevant information (access parameters, interfaces, configuration and the like) of the service can be stored in a database when data is exported, and operations such as service introduction and calling, data conversion and output and the like are performed according to the configuration when a task is subsequently executed.
And step 14, according to the report code, determining the header information corresponding to the report code from the pre-configured header information configuration.
Wherein, each type of header information has a unique report code.
And step 15, generating a target form file according to the query result and the form header information.
In the embodiment, the task information configuration and the header information configuration are constructed in advance, and a configuration basis is provided for subsequent task scheduling. Based on this, after the export demand information input by the user is obtained, the configuration task information corresponding to the report code can be determined from the task information configuration according to the report code carried in the export demand information, and then the corresponding business end query interface can be called by using the configuration task information based on the generalized calling of the dubbo service, so that the query result, namely the demand data, is obtained. And then according to the report code, determining the header information corresponding to the report code from the header information configuration, and generating a target table file by using the query result and the header information. Therefore, remote calling service can be realized based on pre-constructed configuration information and generalized calling without repeated development of each system, and meanwhile, hard coding is not needed, so that the development period is shortened, the interface calling complexity is reduced, and the data export efficiency is effectively improved.
The execution subject of the scheme of the application can be a data export system, a software or hardware-based functional module in the data export system, other equipment, and the like.
In practical application, a business end system calls a data export system through a network to add tasks, the data export system schedules and executes the tasks through a message queue, namely a service bustling mechanism, dynamically queries a data query interface of the business end system, and finally stores query results in a table file.
In some embodiments, after generating the target form file, the method for implementing data export based on service generalization may further include: and uploading the target table file to a file server. Therefore, the pressure of the server can be reduced, repeated data export is avoided, and the problem of memory overflow is avoided.
In order to ensure that the demand information can be acquired, the configuration task information may include: report name, paging mode, paging number field, page number field, paging number, ID field, data source content and authority code. Wherein, the report name can be the report name displayed by the download center; the paging mode can be page number or ID or Scrill ID; the page number field may be used to identify the page number field in the interface; the paging number is used for setting the batch query number; the page number field is used for identifying the set page number field in the interface; the ID field is the parameter entering offset required when paging according to the ID; the data source content is used to configure the service and associated service parameters.
During implementation, the configuration task information can be determined according to the report code, and then the corresponding service end query interface is determined according to the data source content carried in the configuration task information, so that the service end query interface can be called in a generalization mode based on the dubbo service, and a query result can be obtained according to the configuration task information.
Accordingly, the header information may include: title, field name, data type, and conversion rules. The header is a table column header name, the field name is a field name in the corresponding interface, the data type may include a character string, a date, a dictionary, and the like, and the conversion rule may be a date format or a dictionary enumeration name.
After the query result is obtained and the header information is determined, the target table file can be generated according to the query result and the header information, so that the export of the required data is realized.
It is understood that the same or similar parts in the above embodiments may be mutually referred to, and the same or similar parts in other embodiments may be referred to for the content which is not described in detail in some embodiments.
It should be noted that, in the description of the present application, the terms "first", "second", etc. are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. Further, in the description of the present application, the meaning of "a plurality" means at least two unless otherwise specified.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and the scope of the preferred embodiments of the present application includes other implementations in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present application.
It should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc.
In the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Although embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application, and that variations, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.

Claims (5)

1. A method for realizing data export based on service generalization is characterized by comprising the following steps:
acquiring export demand information input by a user; the export demand information carries a report code;
according to the report code, determining configuration task information corresponding to the report code from pre-constructed task information configuration;
calling a corresponding service end query interface based on the dubbo generalization call, and obtaining a query result according to the configuration task information;
according to the report code, determining header information corresponding to the report code from pre-configured header information configuration;
and generating a target table file according to the query result and the table header information.
2. The method for implementing data export based on service generalization according to claim 1, wherein after said generating the target table file, said method further comprises:
and uploading the target table file to a file server.
3. The method of claim 1, wherein the configuration task information comprises: report name, paging mode, paging number field, page number field, paging number, ID field, data source content and authority code.
4. The method for implementing data export based on service generalization according to claim 3, wherein said invoking a corresponding service-side query interface based on a dubbo generalization call and obtaining a query result according to the configuration task information comprises:
determining a corresponding service end query interface by using the data source content;
and on the basis of the dubbo service, the service end query interface is called in a generalization manner, and the query result is obtained according to the configuration task information.
5. The method for implementing data export based on service generalization according to claim 1, wherein the header information comprises: title, field name, data type, and conversion rules.
CN202110897728.9A 2021-08-05 2021-08-05 Method for realizing data export based on service generalization Pending CN113505133A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110897728.9A CN113505133A (en) 2021-08-05 2021-08-05 Method for realizing data export based on service generalization

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110897728.9A CN113505133A (en) 2021-08-05 2021-08-05 Method for realizing data export based on service generalization

Publications (1)

Publication Number Publication Date
CN113505133A true CN113505133A (en) 2021-10-15

Family

ID=78015756

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110897728.9A Pending CN113505133A (en) 2021-08-05 2021-08-05 Method for realizing data export based on service generalization

Country Status (1)

Country Link
CN (1) CN113505133A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107229474A (en) * 2017-05-31 2017-10-03 成都药王科技股份有限公司 Method and device based on visualization interface rapid configuration Java interfaces and graph service
WO2019178979A1 (en) * 2018-03-21 2019-09-26 平安科技(深圳)有限公司 Method for querying report data, apparatus, storage medium and server
CN111563368A (en) * 2020-04-03 2020-08-21 江苏苏宁物流有限公司 Report generation method and device, computer equipment and storage medium
CN112463866A (en) * 2020-11-25 2021-03-09 上海中通吉网络技术有限公司 Express delivery industry data exporting method, system, computer and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107229474A (en) * 2017-05-31 2017-10-03 成都药王科技股份有限公司 Method and device based on visualization interface rapid configuration Java interfaces and graph service
WO2019178979A1 (en) * 2018-03-21 2019-09-26 平安科技(深圳)有限公司 Method for querying report data, apparatus, storage medium and server
CN111563368A (en) * 2020-04-03 2020-08-21 江苏苏宁物流有限公司 Report generation method and device, computer equipment and storage medium
CN112463866A (en) * 2020-11-25 2021-03-09 上海中通吉网络技术有限公司 Express delivery industry data exporting method, system, computer and storage medium

Similar Documents

Publication Publication Date Title
CN111177231A (en) Report generation method and report generation device
CN112052242A (en) Data query method and device, electronic equipment and storage medium
CN110781183B (en) Processing method and device for incremental data in Hive database and computer equipment
CN107908442B (en) Spring-based resource loading method and device, terminal equipment and computer-readable storage medium
WO2022095699A1 (en) Underlying data management method and system, and computer-readable storage medium
CN111581183A (en) Data migration method and device based on data model
CN114282129A (en) Information system page generation method, system, electronic equipment and storage medium
CN113505133A (en) Method for realizing data export based on service generalization
CN111858617A (en) User searching method and device, computer readable storage medium and electronic equipment
CN107247594B (en) Logic system, implementation method thereof, computing device and computer-readable storage medium
CN111399806B (en) Component management method and device, electronic equipment and storage medium
CN110995806B (en) Resource state conversion method, device, equipment and storage medium
CN115114280A (en) Report generation processing method, device and equipment
CN112487275A (en) Data retrieval method, system, equipment and readable storage medium
CN111143408B (en) Event processing method and device based on business rule
CN114116759A (en) MyBatis-based low-code automatic report generation processing method and related equipment
CN115586888B (en) Data management method and system for configuring budget
US20060074936A1 (en) Method and system for generating a report using an object-oriented approach
CN115032901B (en) Equipment control method and electronic equipment
CN113901090A (en) Real-time situation data leading and processing method
CN115801777A (en) Widget component processing method, device, equipment, storage medium and program product
CN116501376A (en) Decoupling method, system and device based on configuration instant trigger task
CN115130039A (en) Webpage rendering method, device, medium and electronic equipment
CN113489757A (en) Data open service method
CN113486642A (en) Bidding notice generation method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination