CN112445790B - Report data storage method, device, equipment and medium - Google Patents

Report data storage method, device, equipment and medium Download PDF

Info

Publication number
CN112445790B
CN112445790B CN201910809817.6A CN201910809817A CN112445790B CN 112445790 B CN112445790 B CN 112445790B CN 201910809817 A CN201910809817 A CN 201910809817A CN 112445790 B CN112445790 B CN 112445790B
Authority
CN
China
Prior art keywords
report
data
storage
field
data storage
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
CN201910809817.6A
Other languages
Chinese (zh)
Other versions
CN112445790A (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.)
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Wodong Tianjun Information 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 Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Wodong Tianjun Information Technology Co Ltd
Priority to CN201910809817.6A priority Critical patent/CN112445790B/en
Publication of CN112445790A publication Critical patent/CN112445790A/en
Application granted granted Critical
Publication of CN112445790B publication Critical patent/CN112445790B/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/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/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/122File system administration, e.g. details of archiving or snapshots using management policies

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention discloses a report data storage method, a device, equipment and a storage medium, wherein the method comprises the following steps: acquiring report data and report types contained in the detected report storage request, and acquiring a description file corresponding to the report types; and determining a data storage path corresponding to each field in the report data according to the description file, and storing the data corresponding to each field according to the data storage path corresponding to each field. According to the method provided by the embodiment of the invention, the data storage paths corresponding to the fields in the report data are determined according to the description files corresponding to the report types when the report storage requests are detected, and the data storage paths which are not mutually covered with other report storage requests are determined for each report storage request, so that the multi-user concurrent generation number is realized, the accuracy of data storage when the multi-user concurrent generation number is ensured, and the report data construction efficiency is further improved.

Description

Report data storage method, device, equipment and medium
Technical Field
The embodiment of the invention relates to the field of data processing, in particular to a report data storage method, device, equipment and medium.
Background
In order to ensure normal use of the service functions, the service functions need to be tested before being put on line. When the service function test is performed, virtual report data needs to be constructed as test data of the service function. In the process of implementing the present invention, the inventor finds that at least the following technical problems exist in the prior art: the current report data construction system can only allow single user operation, and when a plurality of users concurrent create numbers, system errors can be caused, so that report data construction efficiency is low.
Disclosure of Invention
The embodiment of the invention provides a report data storage method, device, equipment and medium, which are used for realizing multi-user concurrent data and improving report data construction efficiency.
In a first aspect, an embodiment of the present invention provides a report data storage method, including:
acquiring report data and report types contained in the detected report storage request, and acquiring a description file corresponding to the report types;
and determining a data storage path corresponding to each field in the report data according to the description file, and storing the data corresponding to each field according to the data storage path corresponding to each field.
In a second aspect, an embodiment of the present invention further provides a report data storage device, including:
The description file acquisition module is used for acquiring report data and report types contained in the detected report storage request and acquiring a description file corresponding to the report types;
and the report data storage module is used for determining a data storage path corresponding to each field in the report data according to the description file and storing the data corresponding to each field according to the data storage path corresponding to each field.
In a third aspect, an embodiment of the present invention further provides a computer apparatus, the apparatus including:
one or more processors;
a storage means for storing one or more programs;
when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the report data storage method as provided by any embodiment of the present invention.
In a fourth aspect, embodiments of the present invention further provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a report data storage method as provided by any of the embodiments of the present invention.
According to the embodiment of the invention, the report data and the report type contained in the detected report storage request are acquired, and the description file corresponding to the report type is acquired; determining data storage paths corresponding to all fields in the report data according to the description files, storing the data corresponding to the fields according to the data storage paths corresponding to all the fields, determining the data storage paths corresponding to all the fields in the report data according to the description files corresponding to report types when the report storage requests are detected, and determining the data storage paths which are not mutually covered with other report storage requests for each report storage request, thereby realizing multi-user concurrent generation number, ensuring the accuracy of data storage when the multi-user concurrent generation number and further improving the report data construction efficiency.
Drawings
FIG. 1 is a flowchart of a report data storage method according to an embodiment of the present invention;
FIG. 2 is a flowchart of a report data storage method according to a second embodiment of the present invention;
FIG. 3a is a flowchart of a report data storage method according to a third embodiment of the present invention;
FIG. 3b is a schematic diagram of a report data storage system corresponding to a report data storage method according to a second embodiment of the present invention;
FIG. 4 is a schematic diagram of a report data storage device according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of a computer device according to a fifth embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings.
Example 1
Fig. 1 is a flowchart of a report data storage method according to an embodiment of the present invention. The present embodiment is applicable to a case when storing report data constructed by a user. The method may be performed by a report data store, which may be implemented in software and/or hardware, for example, the report data store may be configured in a computer device. As shown in fig. 1, the method includes:
S110, acquiring report data and report types contained in the detected report storage request, and acquiring a description file corresponding to the report types.
In this embodiment, the report storing request may be a request initiated by a user through a terminal for storing report data that has been completed by construction. The report type may be used to characterize the data characteristics of the report data or the test scenario/application scenario to which the report data is applied. When a user constructs report data through a terminal, the report type of the report data is determined according to the data characteristics or the test scene/application scene of the report data, after the report data to be stored is constructed, a report storage request is initiated through a trigger storage control, the report storage device detects the report storage request triggered by the user, and the report storage request is analyzed to obtain the report data and the report type contained in the report storage request. For example, the report data field and the report type field in the report storage request can be determined by a keyword matching method, the report data is extracted from the report data field, and the report type is extracted from the report type field.
Optionally, the description file corresponding to the report type may be obtained according to a pre-established correspondence between the report type and the description file. In order to enable each user to be allocated independent data storage paths which do not overlap each other when report storage requests for the same type of report data initiated by different users are received. In this embodiment, for each report type, a description file-Schema description file corresponding to the report type is defined, and table structure information of a report is defined in the Schema description file.
Optionally, each table is defined as a table, in each table, the field name, field type, field length and other information contained in the table are defined, and the table further includes a key or value attribute (key and value are mutually exclusive relationships) of the field, that is, the field is defined as a key column or a value column, and if a certain field is a value column, the Schema description file further contains an aggregation attribute of the field, that is, the aggregation type, such as sum, difference, ratio, product, average and the like, of the value column is defined. It should be noted that the aggregation types corresponding to the same field in different report types may be different, and the aggregation types of the fields are determined according to the actual requirements of the report types. For example, the aggregate type corresponding to the field a in the description file corresponding to the report type a is the sum, but the aggregate type corresponding to the field a in the description file corresponding to the report type B may be the difference. In addition, a data source of the field is defined in a field of the table, wherein the data source is used for characterizing a table stored in the field. In the same table, the data sources of different fields may be different. The data source is used for determining the data storage position corresponding to the field when the data is stored. In this embodiment, the report data corresponding to the same report type may be stored in different library tables, and when the report data is acquired, the data corresponding to each field in each report data is acquired in different library tables, and after the data corresponding to each field is connected, the complete report data is formed.
S120, determining data storage paths corresponding to all fields in the report data according to the description file, and storing the data corresponding to the fields according to the data storage paths corresponding to all the fields.
In this embodiment, the data storage paths corresponding to the fields in the report data are determined according to the data sources corresponding to the fields in the description file. For each field in the report data, a data source corresponding to the field in the description file is determined, and a data storage path corresponding to the field is determined based on the data source corresponding to the field. For example, taking the field "ID" in the report data as an example, determining that the data source corresponding to the field "ID" in the description file is the storage table a, and determining the data storage path corresponding to the data based on the storage table a. Alternatively, a storage table corresponding to the data source may be created in the database, the path of the storage table is used as a data storage path corresponding to the field "ID", or a storage table which is unoccupied by the field "ID" and corresponds to the data source may be searched in the created library table, and the path of the searched storage table is used as a data storage path corresponding to the field "ID".
According to the embodiment of the invention, the report data and the report type contained in the detected report storage request are acquired, and the description file corresponding to the report type is acquired; determining data storage paths corresponding to all fields in the report data according to the description files, storing the data corresponding to the fields according to the data storage paths corresponding to all the fields, determining the data storage paths corresponding to all the fields in the report data according to the description files corresponding to report types when the report storage requests are detected, and determining the data storage paths which are not mutually covered with other report storage requests for each report storage request, thereby realizing multi-user concurrent generation number, ensuring the accuracy of data storage when the multi-user concurrent generation number and further improving the report data construction efficiency.
Based on the scheme, before the report data and the report type contained in the detected report storage request are acquired, the method further comprises the following steps:
and obtaining the report type contained in the report construction request, generating a to-be-filled form according to a description file corresponding to the report type, and displaying the to-be-filled form through a display device so that a user can construct report data based on the to-be-filled form.
In this embodiment, before the report data is constructed, the user needs to apply for resources, including related report construction services and library table storage resources, and after the resource application is successful, the resources can be used repeatedly, or can be manually destroyed or automatically recovered after setting timeout. Optionally, when the user constructs report data, a report construction request can be initiated by selecting a report type. After a report data storage device detects a report construction request initiated by a user, the report construction request is analyzed to obtain report types contained in the report construction request, a description file corresponding to the report types is determined according to preset corresponding relations, a to-be-filled form is generated based on the determined description file, and the to-be-filled form is displayed through a display device, so that the user can construct report data in the to-be-filled form.
The report data storage device obtains the report type a contained in the detected report construction request, generates a to-be-filled form a based on a description file a corresponding to the report type a, displays the to-be-filled form a through a display of the terminal, and edits the to-be-filled form by a user through operating interaction equipment (such as a keyboard and/or a mouse and the like), so as to construct report data.
In one embodiment of the present invention, the generating the to-be-filled form according to the description file corresponding to the report type includes:
and determining a default data generation field contained in a default data generation rule in the description file, and generating default data corresponding to the default data generation field according to the default data generation rule so as to generate a form to be filled containing the default data.
In this embodiment, considering that the amount of data to be edited is large when constructing report data, default data corresponding to certain fields may be preset in order to save data construction time, and when generating a form to be filled, default data corresponding to fields in which default data exists is displayed in the form to be filled. For example, a default data generation rule may be preset, a default data generation field and default data are stored correspondingly, when a to-be-filled form is generated, a field in which a description file is matched with the default data generation field is determined, and according to a corresponding relationship between the default data generation field and default data, default data of the field in the to-be-filled form is determined, so as to generate the to-be-filled form containing the default data. Optionally, default data may be generated according to a field type, and/or default data may be generated for a specific field according to a set rule, and/or common data may be recommended as default data according to a data feature of a history structure. It should be noted that, the user may selectively modify default data in the form to be filled in, so as to adapt to the requirements of specific services.
Example two
Fig. 2 is a flowchart of a report data storage method according to a second embodiment of the present invention. The embodiment embodies the data storage path corresponding to each field in the report data according to the description file on the basis of the embodiment described above to obtain the storage table type of the field corresponding to each field in the report data in the description file, and determines the data storage path corresponding to the field according to the storage table type. As shown in fig. 2, the method includes:
s210, acquiring report data and report types contained in the detected report storage request, and acquiring a description file corresponding to the report types.
S220, obtaining the storage table types of the fields corresponding to the fields in the report data in the description file, and judging whether an available table corresponding to the storage table types exists.
In this embodiment, the storage table type and the fields included in each storage table type may be preset, and after the description file corresponding to the report data to be stored is obtained, the storage table type corresponding to each field in the report data is determined according to the fields included in the storage table type. It should be noted that, the types of the storage tables corresponding to the fields included in the report data may be one or more. For example, assuming that there are a field a, a field B, a field C, and a field D in the report data, it is possible that the field a corresponds to the memory table type 1, the field B corresponds to the memory table type 2, and the field C and the field D correspond to the memory table type 3; it is also possible that field A, field B, field C correspond to store table type 1, field D corresponds to store table type 2; it is also possible that fields a, B, C and D all correspond to store table type 1.
In one embodiment, for each field in the report data, a storage table type corresponding to the field may be determined, and it may be determined whether an available table corresponding to the determined storage table type exists in the created library table.
In one embodiment, after determining the storage table type corresponding to each field in the report data, a field set corresponding to the same storage table type is determined, and whether an available table corresponding to the storage table type corresponding to the field set exists in the created library table is judged. In this embodiment, the available table may be a library table in which the field is unoccupied.
In one embodiment of the present invention, the determining whether there is an available table corresponding to the type of the storage table includes: acquiring a created table corresponding to the type of the storage table in the current storage space, and judging whether the fields in the created table are occupied or not; if the field in the created table is occupied, judging that an available table corresponding to the storage table type does not exist; and if the field in the created table is unoccupied, judging that an available table corresponding to the storage table type exists, and taking the created table as the available table.
Alternatively, it is described by taking, as an example, whether or not there is an available table corresponding to each field. The method includes the steps of obtaining a created table corresponding to a storage table type corresponding to a field in a current storage space, judging whether the field in the created table is occupied or not, judging that no available table corresponding to the storage table type exists if the field in all the created tables corresponding to the storage table type is occupied, judging that an available table corresponding to the storage type exists if the created table with the unoccupied field exists, and taking the unoccupied created table as the available table.
For example, for field a, determining a storage table type a corresponding to field a, acquiring a created table corresponding to storage table type a in the current storage space, judging whether field a in the created table is occupied, and assuming that field a in created table 1 is unoccupied, taking created table 1 as an available table corresponding to field a.
If the field set is used as a unit, judging whether an available table corresponding to the field set exists, judging whether an established table which is unoccupied in each field in the field set exists in an established table corresponding to the storage table type corresponding to the field set, if the established table which is unoccupied in each field in the field set exists, taking the established table as the available table, and if the established table which is unoccupied in each field in the field set does not exist, judging that the available table of the storage table type corresponding to the field set does not exist.
S230, if an available table corresponding to the type of the storage table exists, the storage path of the available table is used as a data storage path corresponding to the field.
S240, if the available table corresponding to the storage table type does not exist, the creation table corresponding to the storage table type is re-created, and the storage path of the creation table is used as a data storage path corresponding to the field.
In this embodiment, if there is an available table corresponding to the type of the storage table, the storage path of the available table is acquired, and the storage path of the available table is used as the data storage path corresponding to the field. If the available table corresponding to the storage table type does not exist, the creation table corresponding to the storage table type is re-created, the storage path of the creation table is acquired, and the storage path of the creation table is used as the data storage path corresponding to the field.
S250, storing the data corresponding to the fields according to the data storage paths corresponding to the fields.
According to the technical scheme, the data storage paths corresponding to the fields in the report data are determined according to the description file, the storage table types of the fields corresponding to the fields in the report data in the description file are acquired, the data storage paths corresponding to the fields are determined according to the storage table types, and the data storage paths corresponding to the fields are determined according to the storage table types corresponding to the fields for each field, so that the data storage paths corresponding to the report data of the same report type are not mutually covered, and the accuracy of data storage is ensured.
Example III
Fig. 3a is a flowchart of a report data storage method according to a third embodiment of the present invention. The present embodiment is optimized on the basis of the above embodiment. As shown in fig. 3a, the method comprises:
s310, acquiring report data and report types contained in the detected report storage request, and acquiring a description file corresponding to the report types.
S320, determining data storage paths corresponding to all fields in the report data according to the description file, and storing the data corresponding to the fields according to the data storage paths corresponding to all the fields.
S330, acquiring a report identifier contained in the report storage request, and generating a storage state corresponding to the report identifier according to the report identifier and a data storage path corresponding to each field in the report data.
In this embodiment, an operation of storing a storage state corresponding to report data is added. The report identifier may be an identifier generated according to a user operation and used for uniquely representing report data, such as a report name, a report ID, and the like. After the data storage paths corresponding to the fields in the report data are determined, the storage state of the report data is generated according to the report identifications, the fields in the report data and the data storage paths corresponding to the fields, and the report identifications and the storage state are correspondingly stored, so that the report data corresponding to the report identifications can be acquired according to the storage state corresponding to the report identifications in the subsequent data calling process.
S340, acquiring a report identifier contained in the detected report calling request, and determining a data storage path of each field in report data corresponding to the report calling request according to a storage state corresponding to the report identifier.
Optionally, when the report data needs to be called, a report calling request containing a report identifier is initiated, after the report data storage device detects the report calling request, the report calling request is parsed to obtain the report identifier contained in the report calling request, a storage state corresponding to the report identifier is determined according to a pre-stored corresponding relation, and a data storage path of each field in the report data is obtained from the library table based on the obtained storage state.
For example, assuming that the acquired report is identified as report a, a storage state corresponding to report a is acquired, and data storage paths of all fields in report a are determined based on the storage state, e.g., the data storage paths of field a are determined to be table 1 of database 1 based on the storage state.
S350, acquiring data corresponding to each field in the report data according to the data storage path of each field, splicing the data corresponding to each field to obtain report data corresponding to the report call request, and generating feedback information containing the report data.
After the data storage path corresponding to each field in the report data is obtained, the data corresponding to the field is obtained according to the data storage path corresponding to each field, the data corresponding to all the fields in the report data are connected, the report data corresponding to the report identifier can be obtained, feedback information containing the report data is generated, and feedback is carried out based on the report calling request. For example, if a report call request initiated by a user is used for indicating to display report data corresponding to a report identifier, after the report data is obtained, feedback information containing the report data is generated, and the feedback information is sent to a display device for display.
According to the technical scheme, after the data corresponding to each field are stored according to the data storage path corresponding to each field, the operation of storing the storage state corresponding to the report data is added, and the report data is more convenient and accurate to acquire after the report data is stored through storing the storage state corresponding to the report identifier.
On the basis of the scheme, the method further comprises the following steps:
judging whether the report data corresponding to the report identifier meets the data recovery rule or not, and if the report data corresponding to the report identifier meets the data recovery rule, recovering the report data according to the storage state corresponding to the report identifier.
Considering that the system has long running time and the service and library table resources are occupied in a large amount when the users are increased, the normal running of the system can be influenced. In this embodiment, a data recycling rule may be preset, and data meeting the data recycling rule may be recycled, so as to release the service and library table resources occupied by the data recycling rule. Optionally, the data reclamation rule may be at least one of an occupancy time longer than a preset time threshold, a resource triggering CPU utilization greater than a set utilization threshold, a memory utilization greater than a set utilization threshold, and a disk occupancy greater than a set occupancy space threshold. Wherein, each threshold can be set according to the actual requirement.
Fig. 3b is a schematic diagram of a report data storage system corresponding to the report data storage method according to the second embodiment of the present invention. The manner in which the report data is stored is schematically shown in fig. 3 b. As shown in FIG. 3b, the report data storage system includes a plurality of description files, a default data generator corresponding to each description file, and a plurality of library tables. In addition, the report data storage system also comprises a garbage data recoverer, and report data meeting the set data recovery rule is recovered.
Before the user performs data construction, the user needs to apply for resources, and the report data storage system displays corresponding forms to be filled out to the user according to the application initiated by the user. Optionally, when generating the form to be filled, the default data generator generates default data of certain fields, and displays the form to be filled containing the default data to the user. After the user completes the form to be filled, determining the storage rule of the report data according to the schema description file, and sending the constructed data to a database for storage based on the determined storage rule. The data of different fields may be stored in one table of the same library, may be stored in a plurality of tables of the same library, and may be stored in a plurality of tables of different libraries. Tables of the same library or different libraries are associated through keys. Optionally, the default data generator may generate default data according to a field type, and/or generate default data for a specific field according to a set rule, and/or recommend common data as default data according to a data feature of a history structure.
For example, the user 1 edits the report data 1 to be constructed generated by the default data generator, initiates a report data storage request after the editing is completed, determines a description file Table1 corresponding to the report type according to the report type contained in the report data storage request, determines a data storage path corresponding to a part of fields in the report data as a database 1 Table1 according to a data source in the description file, and a data storage path corresponding to a part of fields as a database 1 Table2, and finally stores the fields of which the data storage path is the database 1 Table1 into the database 1 Table1, and stores the fields of which the data storage path is the database 1 Table2 into the database 1 Table 2. The user 2 edits the report data 2 to be constructed, which is generated by the default data generator, initiates a report data storage request after the editing is completed, determines a description file Table2 corresponding to the report type according to the report type contained in the report data storage request, determines a data storage path corresponding to a part of fields in the report data as a database 1 Table2 according to a data source in the description file, determines a data storage path corresponding to a part of fields as a database 2 Table1, and a data storage path corresponding to a part of fields as a database 2 Table2, finally stores the fields of which the data storage path is the database 1 Table2 into the database 1 Table2, stores the fields of which the data storage path is the database 2 Table1 into the database 2 Table1, and stores the fields of which the data storage path is the database 2 Table2 into the database 2 Table 2. The user 3 edits the report data 3 to be constructed, which is generated by the default data generator, initiates a report data storage request after the editing is completed, determines a description file Table3 corresponding to the report type according to the report type contained in the report data storage request, determines a data storage path corresponding to a part of fields in the report data as a database 2 Table3 according to a data source in the description file, determines the data storage path corresponding to a part of fields as a database 3 Table1, and a part of the data storage path corresponding to the fields as a database 3 Table2, finally stores the fields of which the data storage path is the database 2 Table3 into the database 2 Table3, stores the fields of which the data storage path is the database 3 Table1 into the database 3 Table1, and stores the fields of which the data storage path is the database 3 Table2 into the database 3 Table 2.
Example IV
Fig. 4 is a schematic structural diagram of a report data storage device according to a fourth embodiment of the present invention. The report data store may be implemented in software and/or hardware, for example, the report data store may be configured in a computer device. As shown in fig. 4, the apparatus includes a description file acquisition module 410 and a report data storage module 420, wherein:
the description file obtaining module 410 is configured to obtain report data and report types contained in the detected report storage request, and obtain a description file corresponding to the report types;
and the report data storage module 420 is configured to determine a data storage path corresponding to each field in the report data according to the description file, and store data corresponding to each field according to the data storage path corresponding to each field.
According to the embodiment of the invention, the description file acquisition module acquires the report data and the report type contained in the detected report storage request, and acquires the description file corresponding to the report type; the report data storage module determines the data storage paths corresponding to all fields in the report data according to the description files, stores the data corresponding to the fields according to the data storage paths corresponding to all fields, determines the data storage paths corresponding to all fields in the report data according to the description files corresponding to report types when the report storage requests are detected, determines the data storage paths which are not mutually covered with other report storage requests for each report storage request, realizes the multi-user concurrent generation number, ensures the accuracy of data storage when the multi-user concurrent generation number, and further improves the report data construction efficiency.
Based on the above scheme, the report data storage module 410 includes:
and the path determining unit is used for acquiring the storage table type of the field corresponding to each field in the report data in the description file, and determining the data storage path corresponding to the field according to the storage table type.
Based on the above scheme, the path determining unit is specifically configured to:
judging whether an available table corresponding to the storage table type exists or not;
if the available table corresponding to the storage table type exists, taking a storage path of the available table as a data storage path corresponding to the field;
if the available table corresponding to the storage table type does not exist, the creation table corresponding to the storage table type is re-created, and the storage path of the creation table is used as the data storage path corresponding to the field.
Based on the above scheme, the path determining unit is specifically configured to:
acquiring a created table corresponding to the type of the storage table in the current storage space, and judging whether the fields in the created table are occupied or not;
if the field in the created table is occupied, judging that an available table corresponding to the storage table type does not exist;
And if the field in the created table is unoccupied, judging that an available table corresponding to the storage table type exists, and taking the created table as the available table.
Based on the scheme, the device further comprises a report construction response module for:
before the report data and the report types contained in the detected report storage request are obtained, the report types contained in the report construction request are obtained, a to-be-filled form is generated according to a description file corresponding to the report types, and the to-be-filled form is displayed through a display device, so that a user can construct the report data based on the to-be-filled form.
Based on the above scheme, the report construction response module is specifically configured to:
and determining a default data generation field contained in a default data generation rule in the description file, and generating default data corresponding to the default data generation field according to the default data generation rule so as to generate a form to be filled containing the default data.
On the basis of the scheme, the device further comprises a storage state generation module for:
and acquiring a report identifier contained in the report storage request, and generating a storage state corresponding to the report identifier according to the report identifier and a data storage path corresponding to each field in the report data.
Based on the scheme, the device further comprises a report call response module, which is used for:
acquiring a report identifier contained in the detected report calling request, and determining a data storage path of each field in report data corresponding to the report calling request according to a storage state corresponding to the report identifier;
and acquiring data corresponding to each field in the report data according to the data storage path of each field, splicing the data corresponding to each field to obtain the report data corresponding to the report calling request, and generating feedback information containing the report data.
On the basis of the scheme, the device further comprises a report data recovery module for:
judging whether the report data corresponding to the report identifier meets the data recovery rule or not, and if the report data corresponding to the report identifier meets the data recovery rule, recovering the report data according to the storage state corresponding to the report identifier.
The report data storage device provided by the embodiment of the invention can execute the report data storage method provided by any embodiment, and has the corresponding functional modules and beneficial effects of the execution method.
Example five
Fig. 5 is a schematic structural diagram of a computer device according to a fifth embodiment of the present invention. Fig. 5 illustrates a block diagram of an exemplary computer device 512 suitable for use in implementing embodiments of the present invention. The computer device 512 shown in fig. 5 is merely an example, and should not be construed as limiting the functionality and scope of use of embodiments of the present invention.
As shown in FIG. 5, computer device 512 is in the form of a general purpose computing device. Components of computer device 512 may include, but are not limited to: one or more processors 516, a system memory 528, a bus 518 that connects the various system components (including the system memory 528 and the processor 516).
Bus 518 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor 516, or a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include Industry Standard Architecture (ISA) bus, micro channel architecture (MAC) bus, enhanced ISA bus, video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Computer device 512 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by computer device 512 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 528 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 530 and/or cache memory 532. The computer device 512 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage 534 may be used to read from or write to a non-removable, non-volatile magnetic media (not shown in FIG. 5, commonly referred to as a "hard disk drive"). Although not shown in fig. 5, a magnetic disk drive for reading from and writing to a removable non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from or writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In such cases, each drive may be coupled to bus 518 through one or more data media interfaces. Memory 528 may include at least one program product having a set (e.g., at least one) of program modules configured to carry out the functions of embodiments of the invention.
A program/utility 540 having a set (at least one) of program modules 542 may be stored in, for example, memory 528, such program modules 542 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment. Program modules 542 generally perform the functions and/or methods in the described embodiments of the invention.
The computer device 512 may also communicate with one or more external devices 514 (e.g., keyboard, pointing device, display 524, etc.), one or more devices that enable a user to interact with the computer device 512, and/or any devices (e.g., network card, modem, etc.) that enable the computer device 512 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 522. Also, the computer device 512 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet, through a network adapter 520. As shown, network adapter 520 communicates with other modules of computer device 512 via bus 518. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with computer device 512, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
Processor 516 executes programs stored in system memory 528 to perform various functional applications and data processing, such as implementing a report data storage method provided by embodiments of the present invention, including:
acquiring report data and report types contained in the detected report storage request, and acquiring a description file corresponding to the report types;
and determining a data storage path corresponding to each field in the report data according to the description file, and storing the data corresponding to each field according to the data storage path corresponding to each field.
Of course, those skilled in the art will understand that the processor may also implement the technical solution of the report data storage method provided by any embodiment of the present invention.
Example six
The sixth embodiment of the present invention also provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a report data storage method as provided by the embodiments of the present invention, the method including:
acquiring report data and report types contained in the detected report storage request, and acquiring a description file corresponding to the report types;
and determining a data storage path corresponding to each field in the report data according to the description file, and storing the data corresponding to each field according to the data storage path corresponding to each field.
Of course, the computer readable storage medium provided by the embodiments of the present invention, on which the computer program stored is not limited to the above-described method operations, but may also perform the related operations in the report data storage method provided by any of the embodiments of the present invention.
The computer storage media of embodiments of the invention may take the form of any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.

Claims (12)

1. A method for storing report data, comprising:
acquiring report data and report types contained in the detected report storage request, and acquiring a description file corresponding to the report types;
and determining a data storage path corresponding to each field in the report data according to the description file, and storing the data corresponding to each field according to the data storage path corresponding to each field.
2. The method according to claim 1, wherein determining a data storage path corresponding to each field in the report data according to the description file includes:
And acquiring a storage table type of a field corresponding to each field in the report data in the description file, and determining a data storage path corresponding to the field according to the storage table type.
3. The method of claim 2, wherein said determining the data storage path of the field according to the storage table type comprises:
judging whether an available table corresponding to the storage table type exists or not;
if the available table corresponding to the storage table type exists, taking a storage path of the available table as a data storage path corresponding to the field;
if the available table corresponding to the storage table type does not exist, the creation table corresponding to the storage table type is re-created, and the storage path of the creation table is used as the data storage path corresponding to the field.
4. The method of claim 3, wherein said determining whether there is an available table corresponding to the stored table type comprises:
acquiring a created table corresponding to the type of the storage table in the current storage space, and judging whether the fields in the created table are occupied or not;
if the field in the created table is occupied, judging that an available table corresponding to the storage table type does not exist;
And if the field in the created table is unoccupied, judging that an available table corresponding to the storage table type exists, and taking the created table as the available table.
5. The method of claim 1, further comprising, prior to obtaining report data and report types contained in the detected report storage request:
and obtaining the report type contained in the report construction request, generating a to-be-filled form according to a description file corresponding to the report type, and displaying the to-be-filled form through a display device so that a user can construct report data based on the to-be-filled form.
6. The method of claim 5, wherein generating the form to be filled in from the description file corresponding to the report type comprises:
and determining a default data generation field contained in a default data generation rule in the description file, and generating default data corresponding to the default data generation field according to the default data generation rule so as to generate a form to be filled containing the default data.
7. The method as recited in claim 1, further comprising:
And acquiring a report identifier contained in the report storage request, and generating a storage state corresponding to the report identifier according to the report identifier and a data storage path corresponding to each field in the report data.
8. The method as recited in claim 7, further comprising:
acquiring a report identifier contained in the detected report calling request, and determining a data storage path of each field in report data corresponding to the report calling request according to a storage state corresponding to the report identifier;
and acquiring data corresponding to each field in the report data according to the data storage path of each field, splicing the data corresponding to each field to obtain the report data corresponding to the report calling request, and generating feedback information containing the report data.
9. The method as recited in claim 7, further comprising:
judging whether the report data corresponding to the report identifier meets the data recovery rule or not, and if the report data corresponding to the report identifier meets the data recovery rule, recovering the report data according to the storage state corresponding to the report identifier.
10. A report data storage device, comprising:
The description file acquisition module is used for acquiring report data and report types contained in the detected report storage request and acquiring a description file corresponding to the report types;
and the report data storage module is used for determining a data storage path corresponding to each field in the report data according to the description file and storing the data corresponding to each field according to the data storage path corresponding to each field.
11. A computer device, the device comprising:
one or more processors;
a storage means for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the report data storing method of any one of claims 1-9.
12. A computer readable storage medium having stored thereon a computer program, which when executed by a processor implements a report data storing method according to any of claims 1-9.
CN201910809817.6A 2019-08-29 2019-08-29 Report data storage method, device, equipment and medium Active CN112445790B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910809817.6A CN112445790B (en) 2019-08-29 2019-08-29 Report data storage method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910809817.6A CN112445790B (en) 2019-08-29 2019-08-29 Report data storage method, device, equipment and medium

Publications (2)

Publication Number Publication Date
CN112445790A CN112445790A (en) 2021-03-05
CN112445790B true CN112445790B (en) 2024-03-01

Family

ID=74741296

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910809817.6A Active CN112445790B (en) 2019-08-29 2019-08-29 Report data storage method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN112445790B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1464436A (en) * 2002-06-26 2003-12-31 联想(北京)有限公司 Data storing and query combination method in a flush type system
US7174347B1 (en) * 2002-02-14 2007-02-06 Ncr Corp. Loading data using links in a database
US8180799B1 (en) * 2009-04-17 2012-05-15 Formrouter Inc. Dynamically creating tables to store received data
CN102880620A (en) * 2011-07-15 2013-01-16 深圳市金蝶友商电子商务服务有限公司 Method for creating spreadsheet
CN103294714A (en) * 2012-02-28 2013-09-11 阿里巴巴集团控股有限公司 Method and device for determining storage positions of field attribute values of index fields
CN105630847A (en) * 2014-11-21 2016-06-01 深圳市腾讯计算机系统有限公司 Data storage method as well as data query method, apparatus and system
CN109254977A (en) * 2018-07-18 2019-01-22 深圳市买买提信息科技有限公司 Data creation method, big data air control platform and computer storage medium
CN110008456A (en) * 2019-04-03 2019-07-12 平安信托有限责任公司 Report penetrating method, device, computer equipment and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7174347B1 (en) * 2002-02-14 2007-02-06 Ncr Corp. Loading data using links in a database
CN1464436A (en) * 2002-06-26 2003-12-31 联想(北京)有限公司 Data storing and query combination method in a flush type system
US8180799B1 (en) * 2009-04-17 2012-05-15 Formrouter Inc. Dynamically creating tables to store received data
CN102880620A (en) * 2011-07-15 2013-01-16 深圳市金蝶友商电子商务服务有限公司 Method for creating spreadsheet
CN103294714A (en) * 2012-02-28 2013-09-11 阿里巴巴集团控股有限公司 Method and device for determining storage positions of field attribute values of index fields
CN105630847A (en) * 2014-11-21 2016-06-01 深圳市腾讯计算机系统有限公司 Data storage method as well as data query method, apparatus and system
CN109254977A (en) * 2018-07-18 2019-01-22 深圳市买买提信息科技有限公司 Data creation method, big data air control platform and computer storage medium
CN110008456A (en) * 2019-04-03 2019-07-12 平安信托有限责任公司 Report penetrating method, device, computer equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
GIS中多媒体信息存储和管理方式的研究;王勇;何贞铭;彭建斌;;计算机时代(11);全文 *
火力发电企业燃料信息报表自定义系统;闫冬;张晖;余军;何云峰;于俊清;唐九飞;;电力信息与通信技术(04);全文 *

Also Published As

Publication number Publication date
CN112445790A (en) 2021-03-05

Similar Documents

Publication Publication Date Title
CN108519967B (en) Chart visualization method and device, terminal and storage medium
CN109814854B (en) Project framework generation method, device, computer equipment and storage medium
CN111090628A (en) Data processing method and device, storage medium and electronic equipment
CN114416667B (en) Method and device for rapidly sharing network disk file, network disk and storage medium
CN113051514B (en) Element positioning method and device, electronic equipment and storage medium
CN110781658B (en) Resume analysis method, resume analysis device, electronic equipment and storage medium
CN114528044B (en) Interface calling method, device, equipment and medium
CN110975293A (en) Method, device, server and medium for establishing resource reference relation table
CN110688353A (en) File management method, device and computer readable medium
CN112000911A (en) Page management method and device, electronic equipment and storage medium
CN109033456B (en) Condition query method and device, electronic equipment and storage medium
CN114780519A (en) DBC file generation method, device, equipment and medium based on CAN communication
CN112799760B (en) Form rendering method and device
CN112100092B (en) Information caching method, device, equipment and medium
CN112445790B (en) Report data storage method, device, equipment and medium
CN114238391A (en) Data paging query method and device, electronic equipment and storage medium
CN111813407B (en) Game development method, game running device and electronic equipment
CN113110846A (en) Method and device for acquiring environment variable
CN113806556A (en) Method, device, equipment and medium for constructing knowledge graph based on power grid data
CN113722007A (en) Configuration method, device and system of VPN branch equipment
CN113761419A (en) Display method and device of topological information, electronic equipment and storage medium
CN110958243A (en) Network vulnerability submitting method and device, storage medium and electronic equipment
CN111562958A (en) Page data display management method and device
CN112559914A (en) Index data display method and device
CN112364268A (en) Resource acquisition method and device, 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
GR01 Patent grant
GR01 Patent grant