CN112947939B - Data reporting method, device, equipment and storage medium - Google Patents

Data reporting method, device, equipment and storage medium Download PDF

Info

Publication number
CN112947939B
CN112947939B CN202110324722.2A CN202110324722A CN112947939B CN 112947939 B CN112947939 B CN 112947939B CN 202110324722 A CN202110324722 A CN 202110324722A CN 112947939 B CN112947939 B CN 112947939B
Authority
CN
China
Prior art keywords
data
reporting
entity object
characteristic
file
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
CN202110324722.2A
Other languages
Chinese (zh)
Other versions
CN112947939A (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.)
Inspur General Software Co Ltd
Original Assignee
Inspur General Software 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 Inspur General Software Co Ltd filed Critical Inspur General Software Co Ltd
Priority to CN202110324722.2A priority Critical patent/CN112947939B/en
Publication of CN112947939A publication Critical patent/CN112947939A/en
Application granted granted Critical
Publication of CN112947939B publication Critical patent/CN112947939B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis
    • G06F8/427Parsing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • G06F40/295Named entity recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/37Compiler construction; Parser generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/26Government or public services
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the application discloses a data reporting method, a device, equipment and a storage medium. The method is used for solving the problem that when the report file format is adjusted, more workload is required to be input to upgrade and reform the data report system because the development difficulty of the data report system is high. Determining a reporting format of data to be reported; determining a corresponding entity object according to the reporting format; filling the data to be reported into the entity object to obtain the entity object to be analyzed; determining the index type according to the reported data; determining characteristic annotation in the entity object to be analyzed according to a preset characteristic table, an index type and a reporting format; the preset characteristic table comprises index types and characteristic notes of all reporting formats corresponding to the index types; and analyzing the entity object with the corresponding characteristic annotation into a file meeting the requirement of a data reporting format through an analyzer, and reporting the data. By the method, development difficulty is reduced, and development workload is reduced.

Description

Data reporting method, device, equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a data reporting method, apparatus, device, and storage medium.
Background
Data reporting is the process of uploading downstream data to upstream data. Some information systems used in the prior art are independent of each other and do not have the function of collecting and analyzing data in real time. Particularly, when reporting data to national resource supervision, because of the current situation limit of informatization construction in national resource commission, all offices cannot automatically share the required information, and data meeting the working needs of the enterprises need to be collected and summarized from the supervised enterprises.
When the supervised enterprises report the data to the national resource supervision, the business data are often required to be formed into files in different forms according to the requirements of the national resource commission according to the established format, and the files are reported to the national resource commission system. Therefore, the research and development personnel need to pay attention to the service implementation process and also need to pay attention to the technical implementation details of the data reporting, so that the development process of the data reporting system is difficult. Once the national resource commission adjusts the report file format, the technical details of the data report need to be correspondingly changed, so that more workload is required to be input to correspondingly upgrade and reform the data report system.
Disclosure of Invention
The embodiment of the application provides a data reporting method, a device, equipment and a storage medium, which are used for solving the following technical problems: the development difficulty of the data reporting system is high, so that more workload is required to be input to correspondingly upgrade and reform the data reporting system when the reporting file format is adjusted.
The embodiment of the application adopts the following technical scheme:
the embodiment of the application provides a data reporting method. Determining a reporting format of data to be reported; determining a corresponding entity object according to the reporting format; filling the data to be reported into the entity object to obtain the entity object to be analyzed; determining the index type according to the reported data; determining characteristic annotation in the entity object to be analyzed according to a preset characteristic table, an index type and a reporting format; the preset characteristic table comprises index types and characteristic notes of all reporting formats corresponding to the index types; and analyzing the entity object with the corresponding characteristic annotation into a file meeting the requirement of a data reporting format through an analyzer so as to report the data.
According to the embodiment of the application, the reporting format of the reported data is determined, so that the corresponding analyzer can be selected to analyze the entity object. In addition, in the embodiment of the application, different entity objects are set in advance according to different reporting data formats, so that the entity objects can be analyzed according to characteristic notes in the entity objects only by filling data to be reported into the entity objects. The research personnel do not need to pay attention to details in the analysis process, so that the system development and the re-input work when the reported technical details are changed are greatly slowed down.
The method for determining the reporting format of the data to be reported specifically comprises the following steps:
receiving a first reporting file format needing to be reported in an off-line mode, so as to analyze the entity object to be analyzed into a reporting file meeting the requirement of the first reporting file format; and receiving a second report file format template to be reported in an online mode so as to analyze the entity object to be analyzed into a report file meeting the requirements of the second report file format template.
In an implementation manner of the present application, after determining a reporting format of data to be reported, if two reporting formats are required, the method further includes: marking the characteristic notes with the same index type but different file forms in the same entity object; and filling the data to be reported into positions corresponding to the characteristic notes with different file forms respectively, and analyzing the entity objects according to the resolvers with different types.
In the embodiment of the invention, when the data types to be uploaded are multiple types, only the same entity object is used, the characteristic notes of different types are marked in the same entity object, and the same data are filled in a plurality of positions corresponding to the same entity object. The number of the used entity objects is reduced, and the data needing to be uploaded does not need to be acquired for multiple times. The workload of the developer is reduced.
In one implementation manner of the present application, the parsing of the entity object according to different types of parsers includes: identifying characteristic notes in a first reporting file form and characteristic notes in a second reporting file form, which correspond to the entity objects to be analyzed, respectively, according to the first analyzer and the second analyzer; and resolving the entity object with the first reporting file form characteristic annotation and the second reporting file form characteristic annotation according to the first resolver and the second resolver.
According to the embodiment of the invention, the same entity object is analyzed through different resolvers, so that the problem of large workload of research and development personnel caused by the fact that one kind of resolvers can only analyze one kind of entity object can be avoided. Meanwhile, the embodiment of the application can be compatible with two reporting forms, different entity objects do not need to be developed for different reporting formats, and the development period of a data reporting system is simplified.
In one implementation manner of the present application, according to a first parser and a second parser, parsing an entity object with a first report file form characteristic annotation and a second report file form characteristic annotation, specifically includes: the first parser is an xml parser, and according to the xml parser, characteristic notes in an xml form in the entity object are identified, and report data corresponding to the characteristic notes in the xml form in the entity object are parsed into data in an xml file format meeting the report requirement, so that an xml file is obtained; and the second parser is a db parser, and according to the db parser, the characteristic annotation of the db form in the entity object is identified, and the report data corresponding to the db form characteristic annotation in the entity object is parsed into the data of the db file format meeting the report requirement, so as to obtain the db file.
In one implementation manner of the present application, after resolving, by a resolver, an entity object with a corresponding characteristic annotation into a file meeting a requirement of a data reporting format, the method further includes: compressing and packaging the files in different forms obtained after analysis, and encrypting the files; and calling a supervision interface, and reporting the encrypted file to a supervision system.
In one implementation of the present application, the index type at least includes one or more of a root type, a text type, a digital type, a collection type, an attachment type, and an ignore type.
The embodiment of the application provides a data reporting device, which comprises: the reporting format determining unit determines the reporting format of the data to be reported; the entity object determining unit determines a corresponding entity object according to the reporting format; the data filling unit fills the data to be reported into the entity object to obtain the entity object to be analyzed; the characteristic annotation determining unit determines the index type according to the reported data; determining characteristic notes in the entity object to be analyzed according to a preset characteristic table, the index type and the reporting format; the preset characteristic table comprises index types and characteristic notes of all reporting formats corresponding to the index types; and the analysis unit is used for analyzing the entity object with the corresponding characteristic annotation into a file meeting the requirement of a data reporting format through the analyzer so as to report the data.
The embodiment of the application provides a data reporting device, which comprises: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executable by the at least one processor to enable the at least one processor to: determining a reporting format of data to be reported; determining a corresponding entity object according to the reporting format; filling the data to be reported into the entity object to obtain the entity object to be analyzed; determining the index type according to the reported data; determining characteristic annotation in the entity object to be analyzed according to a preset characteristic table, an index type and a reporting format; the preset characteristic table comprises index types and characteristic notes of all reporting formats corresponding to the index types; and analyzing the entity object with the corresponding characteristic annotation into a file meeting the requirement of a data reporting format through an analyzer so as to report the data.
The embodiment of the application provides a nonvolatile computer storage medium, which stores computer executable instructions, wherein the computer executable instructions are configured to: determining a reporting format of data to be reported; determining a corresponding entity object according to the reporting format; filling the data to be reported into the entity object to obtain the entity object to be analyzed; determining the index type according to the reported data; determining characteristic annotation in the entity object to be analyzed according to a preset characteristic table, an index type and a reporting format; the preset characteristic table comprises index types and characteristic notes of all reporting formats corresponding to the index types; and analyzing the entity object with the corresponding characteristic annotation into a file meeting the requirement of a data reporting format through an analyzer so as to report the data.
The above-mentioned at least one technical scheme that this application embodiment adopted can reach following beneficial effect: according to the embodiment of the application, the reporting format of the reported data is determined, so that the corresponding analyzer can be selected to analyze the entity object. In addition, in the embodiment of the application, different entity objects are set in advance according to different reporting data formats, so that the entity objects can be analyzed according to characteristic notes in the entity objects only by filling data to be reported into the entity objects. The research personnel do not need to pay attention to details in the analysis process, so that the system development and the re-input work when the reported technical details are changed are greatly slowed down.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments described in the present application, and that other drawings may be obtained according to these drawings without inventive effort to a person skilled in the art. In the drawings:
fig. 1 is a flowchart of a data reporting method provided in an embodiment of the present application;
FIG. 2 is a diagram of a base class composition in the form of xml according to one embodiment of the present application;
FIG. 3 is a diagram of a base class composition in db according to an embodiment of the present application;
FIG. 4 is a diagram of an example entity of an xml format system provided in an embodiment of the present application;
FIG. 5 is an example data diagram of an xml format system entity object provided in an embodiment of the present application;
FIG. 6 is an exemplary data diagram of an xml format system entity object according to an embodiment of the present application after conversion into an xml file;
FIG. 7 is a diagram of converting xml format data according to an embodiment of the present application;
FIG. 8 is a diagram of an example of a db format system entity provided in an embodiment of the present application;
FIG. 9 is a diagram of example data of a db format institutional entity object according to an embodiment of the present application;
FIG. 10 is an exemplary data diagram of a db format system entity object according to an embodiment of the present application after conversion into a db file;
FIG. 11 is a diagram of db format data conversion provided in an embodiment of the present application;
FIG. 12 is a diagram of entities annotated with different file forms provided by embodiments of the present application;
fig. 13 is a complete flow chart of data reporting provided in the embodiment of the present application;
fig. 14 is a block diagram of a data reporting splitting flow provided in an embodiment of the present application;
Fig. 15 is a block diagram of a data reporting device according to an embodiment of the present application;
fig. 16 is a schematic structural diagram of a data reporting device according to an embodiment of the present application.
Detailed Description
The embodiment of the application provides a data reporting method, a device, equipment and a storage medium.
In order to better understand the technical solutions in the present application, the following description will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present application.
In the prior art, when data is reported to a national resource commission system, research and development personnel need to pay attention to the service implementation process and simultaneously need to pay attention to the technical implementation details of the data reporting. Because of the change of technical details, different technicians cannot fully grasp the data, so that the development difficulty of the data reporting and storing system is high.
In addition, the reported technical implementation process may be dispersed in different service modules, so that when technical details are changed, different service modules all need to be put into certain workload to perform corresponding upgrading and reconstruction. And the re-input workload of system development when reporting technical details are changed is increased.
In order to solve the above problems, embodiments of the present application provide a method, an apparatus, a device, and a storage medium for reporting data. And establishing different entity objects according to the data reporting requirements issued by national resource commission. In the data reporting process, the entity object can be resolved into a reporting file meeting the requirements only by filling the data to be reported into the corresponding entity object and then resolving the entity object by utilizing a resolver corresponding to the reporting type. The development difficulty of the data reporting system is reduced, and the re-input workload of system development when the reporting technical details are changed is greatly slowed down.
The following describes in detail the technical solution proposed in the embodiments of the present application through the accompanying drawings.
Fig. 1 is a flowchart of a data reporting method provided in an embodiment of the present application. As shown in fig. 1, the data reporting includes the following steps:
S101, determining a reporting format of data to be reported.
In one embodiment of the present application, the type of data to be reported at this time is obtained according to the data reporting requirement issued by national resource supervision.
Specifically, the type of reporting data issued by national resource supervision may be an xml type file or a db type file, or may require that the xml type file and the db type file be uploaded at the same time.
It should be noted that, in the requirements of reporting data types issued by national resource supervision, the requirements of xml format files are transmitted in an off-line manner, so that developers of data reporting acquire the requirements of uploading the xml format files in an off-line manner. And analyzing the data to be reported into a reporting file meeting the file format requirement of the xml type. The db format file requirement is issued by the national resource commission system, so that a developer of data reporting can acquire the db format file uploading requirement in an online mode. And analyzing the data to be reported into a reporting file meeting the requirement of the db type file template.
S102, determining the corresponding entity object according to the reporting format.
In one embodiment of the present application, a developer may formulate different forms of entity objects according to different reporting formats. For example, the entity object in the form of xml may be formulated according to the format of xml report, or the entity object in the form of db may be formulated according to the format of db report.
In one embodiment of the present application, according to the reporting format of the current reporting data, a corresponding entity object is determined. For example, when the format of the data to be reported is in an xml format, an entity object in the xml format needs to be selected.
And S103, filling the data to be reported into the entity object to obtain the entity object to be analyzed.
In one embodiment of the present application, different C# characteristics are established for different file forms, different index types.
Table 1 is a table of c# characteristics established in the present application.
TABLE 1
As shown in table 1, in the embodiment of the present application, corresponding db and xml c# characteristics are established for different common data reporting index types. Wherein the index type at least comprises one or more of root type, text type, digital type, collection type, attachment type and neglect type. The file form contains at least one or more of db form and xml form. And, any index type corresponds to a C# characteristic with any file form.
In one embodiment of the present application, the report index refers to a minimum unit of each report data, such as a conference number and a conference name. db is in the form of using a sqlite database as a data storage means, and putting data into a sqlite data file. xml is a form of using an xml file as a data storage means, and data is put in the file.
Fig. 2 is a diagram of a base class composition in xml format according to an embodiment of the present application. As shown in fig. 2, the xml form base class contains XmlRootAttribute, xmlElementAttribute, xmlArrayltemAttribute, xmlArrayAttribute, xmlIgnoreAttribute. Fig. 3 is a diagram of a base class composition in db form according to an embodiment of the present application. As shown in fig. 3, the db formal base class contains ReportDBRootAttribute, reportDBElementAttribute, reportDBArrayAttribute, reportDBAttachAttribute.
It should be noted that the index types, file forms and characteristics in the c# characteristic table may be added or deleted according to actual use needs or requirements of national commission.
In one embodiment of the present application, the file format of the present data report is determined according to the acquired requirements of the report data issued by the national resource commission. And under the condition that the reporting type of the service data is determined to be a single type, filling the data to be reported into the entity object corresponding to the single type to obtain the entity object to be analyzed. The following describes an example of reporting data in an xml file format in this request.
In one embodiment of the present application, a physical object in the form of xml is created. Fig. 4 is an exemplary diagram of an xml format system entity provided in an embodiment of the present application. As shown in FIG. 4, the characteristics notes XmlRootAttribute and Xmlelement are labeled. Each property annotation corresponds to data that needs to be filled.
In one embodiment of the present application, the data to be reported is populated to an entity object in xml form. Fig. 5 is an example data diagram of an xml format system entity object provided in an embodiment of the present application. As shown in fig. 5, as can be seen from the description name= "presentation data" in the figure, the data of the entity object that needs to be filled in the xml form at this time is "presentation data", and the presentation data in fig. 5 is filled in the position of "description_name" corresponding to the characteristic annotation xml element in fig. 4. And obtaining the entity object in the form of xml to be analyzed.
In one embodiment of the present application, the following description will take the db file format as an example for reporting data.
In one embodiment of the present application, an entity object in db is created. Fig. 8 is a diagram of an example entity of a db format system according to an embodiment of the present application. As shown in FIG. 8, the property notes DBRootAttribute and DBelement are labeled. Each property annotation corresponds to data that needs to be filled.
In one embodiment of the present application, the data to be reported is populated to the physical object in db form. Fig. 9 is a db format system entity object example data diagram provided in an embodiment of the present application. As shown in fig. 9, as can be seen from the description name= "presentation data" in the figure, the data of the entity object that needs to be filled in db form at this time is "presentation data", and the presentation data in fig. 9 is filled in the position of "system name" corresponding to the property annotation DBElement in fig. 8. And obtaining the entity object in db form to be analyzed.
In one embodiment of the present application, after determining that the reporting type of the service data is reported, if two reporting types are required, characteristic notes with the same index type but different file forms are marked in the same entity object. And filling the data to be reported into the positions corresponding to the characteristic notes with different file forms respectively.
Specifically, in the requirements issued by national resource supervision, the same data needs to be uploaded with xml files and db files. The xml entity object may be combined with the db entity object. FIG. 12 is a diagram of entities annotated with different file forms according to an embodiment of the present application. As shown in FIG. 12, both the property notes Xmlelement in the form of an xml file and the property notes DBelement in the form of a db file appear in the figure. At this time, only the characteristic annotation corresponding to the data to be uploaded is required to be marked in the same entity object, and a developer does not need to develop two sets of entity objects with the same logic aiming at different uploading formats, so that the workload of the developer is reduced.
Specifically, the same filling data "presentation data" is adopted, and is filled in the positions corresponding to the different file form characteristic notes in fig. 12. Such as the location of the "regulation_name" corresponding to the property annotation Xmlelement and the location of the "system name" corresponding to the property annotation DBelement. Therefore, the embodiment of the application can realize the filling of the entity object by calling the same filling data, and a plurality of filling data are not required to be established aiming at characteristic notes of different file forms. Therefore, development difficulty is reduced, and workload of developers is reduced.
And S104, determining an index type according to the reported data, and determining the characteristic annotation in the entity object to be analyzed according to the preset characteristic table, the index type and the reporting format.
In one embodiment of the present application, according to the present report data, the index type of the present report data may be determined. For example, the current report is of a text type or of an attachment type. According to the determined index type and the reporting format of the current reporting data, the unique characteristic annotation can be determined through a preset characteristic table.
Specifically, the preset characteristic table horizontally represents the format of the report file, and vertically represents the index type, so that the unique characteristic annotation can be determined through any report format and any index type.
S105, analyzing the entity object with the corresponding characteristic annotation into a file meeting the requirement of a data reporting format through an analyzer so as to report the data.
In one embodiment of the present application, different parsers are built to parse entity objects of different forms. For example, an xml parser reportxmlserinizer is built to parse an entity object in xml form. And establishing a db parser reportDBSerializer to parse the entity object in the db form.
In one embodiment of the present application, in a case where it is determined that the reporting type of the service data is a single type, the data to be reported is filled into an entity object corresponding to the single type, so as to obtain the entity object to be resolved. And determining the characteristic annotation in the entity object to be analyzed according to the analyzer corresponding to the single type, and analyzing the data corresponding to the characteristic annotation to obtain the report file corresponding to the single type.
Specifically, when the data is required to be reported in an xml file format, the data is filled in the entity object shown in fig. 3 to obtain the entity object to be analyzed. And calling a pre-established xml parser to parse the entity object to be parsed. The xml parser determines the characteristic annotation in the entity object to be parsed, parses the corresponding data into xml format data according to the characteristic annotation, and forms an xml file.
Fig. 6 is an exemplary data diagram of an xml format system entity object according to an embodiment of the present application after being converted into an xml file. As shown in fig. 6, the data "presentation data" to be filled has been converted into xml-format data. Fig. 7 is a diagram of xml format data conversion provided in an embodiment of the present application. As shown in fig. 7, the data corresponding to the property annotation in the entity object to be resolved is converted into a file in xml format, such as the data "tio" corresponding to the property annotation xml rootattribute, the data "regulation_name" corresponding to the property annotation xml element, and the data "presentation data" to be filled are respectively converted into data in xml file format.
In one embodiment of the present application, when the data is reported in db file format, the data is first filled in the entity object shown in fig. 8 to obtain the entity object to be parsed. And calling a pre-established db analyzer to analyze the entity object to be analyzed. The db analyzer firstly determines the characteristic annotation in the entity object to be analyzed, analyzes the corresponding data into db format data according to the characteristic annotation, and forms a db file.
Fig. 10 is an exemplary data diagram of a db format system entity object provided in an embodiment of the present application after being converted into a db file. As shown in fig. 10, the data "presentation data" to be filled has been converted into data in db format. Fig. 11 is a db-format data conversion chart according to an embodiment of the present application. As shown in fig. 11, the data corresponding to the property annotation in the entity object to be resolved is converted into a DB file, such as the data "303127913" corresponding to the property annotation DBRootAttribute, the data "4833" corresponding to the property annotation DBElement, and the data "presentation data" required to be filled are respectively converted into DB file format data.
In one embodiment of the present application, when two types of reporting are required, data to be reported are respectively filled into positions corresponding to characteristic annotations in different file forms, and the entity object is resolved according to resolvers of different types.
In one embodiment of the present application, according to the first parser and the second parser, characteristic annotations in the form of a first report file and characteristic annotations in the form of a second report file, which correspond to the entity objects to be parsed respectively, are identified. And resolving the entity object with the first reporting file form characteristic annotation and the second reporting file form characteristic annotation according to the first resolver and the second resolver.
Specifically, the first parser is set as an xml parser, and characteristic annotations in the form of xml in the entity object are identified according to the xml parser. And analyzing the reported data corresponding to the xml form characteristic annotation in the entity object into the data in the xml file format meeting the reporting requirement to obtain the xml file. And setting the second parser as a db parser, and identifying the characteristic annotation in the db form in the entity object according to the db parser. And analyzing the report data corresponding to the db form characteristic annotation in the entity object into db file format data meeting the report requirement to obtain the db file.
FIG. 12 is a diagram of entities annotated with different file forms according to an embodiment of the present application. As shown in fig. 12, an xml parser and a db parser may be respectively called to parse data corresponding to different characteristic annotations in the entity object. Thus, an xml file and a db file can be obtained.
In the embodiment of the invention, when the data types to be uploaded are multiple types, only the same entity object is used, the characteristic notes of different types are marked in the same entity object, and the same data are filled in a plurality of positions corresponding to the same entity object. The number of the used entity objects is reduced, and the data to be uploaded does not need to be acquired for multiple times, so that the workload of developers is reduced.
In one embodiment of the application, the files in different forms obtained after parsing are compressed and packaged, and the files are encrypted. And calling a supervision interface, and reporting the encrypted file to a supervision system. Thus, the data reporting process is completed. The supervision interface may be a national resource commission interface, and the supervision system may be a national resource commission supervision system.
Fig. 13 is a complete flow chart of data reporting provided in the embodiment of the present application. As shown in fig. 13, the data reporting process is as follows:
in one embodiment of the present application, a report data preparation is performed first. Namely, the data to be reported are extracted from the database. And secondly, filling the data model object, and filling the extracted data to be reported to the corresponding position of the entity object. And finally, reporting the data, analyzing the entity object by using an analyzer to obtain a file meeting the national resource commission requirement, and reporting the obtained file to the national resource commission system.
Fig. 14 is a block diagram of a data reporting splitting flow provided in an embodiment of the present application.
In one embodiment of the present application, a request for reporting data issued by national resource commission is received, and a file form of the current reporting data is determined, so as to invoke a resolver of a corresponding type.
In an embodiment of the present application, when the data format requirement of the present report is in an xml form, the data to be reported is filled into the entity object in the xml form. And under the condition that the format requirement of the reported data is db, acquiring a db template issued by national resource commission, and filling the data to be reported into the db-format entity object.
In one embodiment of the present application, a parser corresponding to a reporting format is invoked to parse the entity object filled with data, so as to obtain a reporting file meeting the requirements of the reporting format.
In one embodiment of the present application, the resulting reported file is compressed and packaged, and the file is encrypted. And calling a national resource delegation system interface, and reporting the encrypted file to the national resource delegation system.
Fig. 15 is a block diagram of a data reporting device according to an embodiment of the present application. The device comprises: reporting format determining section S501, entity object determining section S502, data filling section S503, characteristic annotation determining section S504, and analyzing section S505.
A reporting format determining unit S501, configured to determine a reporting format of data to be reported;
the entity object determining unit S502 determines a corresponding entity object according to the reporting format;
a data filling unit S503, configured to fill the data to be reported into the entity object, to obtain an entity object to be parsed;
a characteristic annotation determining unit S504, configured to determine an index type according to the report data; determining characteristic annotation in the entity object to be analyzed according to a preset characteristic table, the index type and the reporting format; the preset characteristic table comprises index types and characteristic notes of all reporting formats corresponding to the index types;
the parsing unit S505 parses, by using a parser, the entity object with the corresponding characteristic annotation into a file meeting the requirement of the data reporting format, so as to report the data.
Fig. 16 is a schematic structural diagram of a data reporting device provided in an embodiment of the present application, where the device includes:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
Determining a reporting format of data to be reported;
determining a corresponding entity object according to the reporting format;
filling the data to be reported into the entity object to obtain the entity object to be analyzed;
determining an index type according to the reported data; determining characteristic annotation in the entity object to be analyzed according to a preset characteristic table, the index type and the reporting format; the preset characteristic table comprises index types and characteristic notes of all reporting formats corresponding to the index types;
and analyzing the entity object with the corresponding characteristic annotation into a file meeting the requirement of a data reporting format through an analyzer so as to report the data.
A non-volatile computer storage medium according to an embodiment of the present application stores computer-executable instructions configured to:
determining a reporting format of data to be reported;
determining a corresponding entity object according to the reporting format;
filling the data to be reported into the entity object to obtain the entity object to be analyzed;
determining an index type according to the reported data; determining characteristic annotation in the entity object to be analyzed according to a preset characteristic table, the index type and the reporting format; the preset characteristic table comprises index types and characteristic notes of all reporting formats corresponding to the index types;
And analyzing the entity object with the corresponding characteristic annotation into a file meeting the requirement of a data reporting format through an analyzer so as to report the data.
All embodiments in the application are described in a progressive manner, and identical and similar parts of all embodiments are mutually referred, so that each embodiment mainly describes differences from other embodiments. In particular, for apparatus, devices, non-volatile computer storage medium embodiments, the description is relatively simple, as it is substantially similar to method embodiments, with reference to the section of the method embodiments being relevant.
The foregoing describes specific embodiments of the present application. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and variations of the embodiments of the present application will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the embodiments of the present application should be included in the scope of the claims of the present application.

Claims (7)

1. A method for reporting data, the method comprising:
determining a reporting format of data to be reported;
determining a corresponding entity object according to the reporting format;
filling the data to be reported into the entity object to obtain the entity object to be analyzed;
determining an index type according to the reported data; determining characteristic annotation in the entity object to be analyzed according to a preset characteristic table, the index type and the reporting format; the preset characteristic table comprises index types and characteristic notes of all reporting formats corresponding to the index types;
analyzing the entity object with the corresponding characteristic annotation into a file meeting the requirement of a data reporting format through an analyzer so as to report the data;
after determining the reporting format of the data to be reported, if two reporting formats are required, the method further includes:
Marking the characteristic notes with the same index type but different file forms in the same entity object;
filling the data to be reported into positions corresponding to the characteristic notes in different file forms respectively, and analyzing the entity objects according to analyzers of different types respectively;
the parsing the entity object according to the parsers of different types specifically includes:
identifying characteristic notes in a first reporting file form and characteristic notes in a second reporting file form, which correspond to the entity objects to be analyzed, respectively according to the first analyzer and the second analyzer;
analyzing the entity object with the first reporting file form characteristic annotation and the second reporting file form characteristic annotation according to the first analyzer and the second analyzer;
the analyzing, according to the first analyzer and the second analyzer, the entity object with the first report file form characteristic annotation and the second report file form characteristic annotation specifically includes:
the first parser is an xml parser, and according to the xml parser, the characteristic annotation of the xml form in the entity object is identified, and the reporting data corresponding to the characteristic annotation of the xml form in the entity object is parsed into the data of the xml file format meeting the reporting requirement, so as to obtain an xml file; and the second parser is a db parser, and according to the db parser, the characteristic annotation in the db form in the entity object is identified, and the report data corresponding to the db form characteristic annotation in the entity object is parsed into the data in the db file format meeting the report requirement, so as to obtain the db file.
2. The method for reporting data according to claim 1, wherein before determining a reporting format in which data needs to be reported, the method further comprises:
receiving a first reporting file format needing to be reported in an off-line mode, so as to analyze the entity object to be analyzed into a reporting file meeting the requirement of the first reporting file format;
and receiving a second report file format template to be reported in an online mode, so as to analyze the entity object to be analyzed into a report file meeting the requirements of the second report file format template.
3. The method for reporting data according to claim 1, wherein after the entity object with the corresponding characteristic annotation is parsed into the file meeting the requirement of the data reporting format by the parser, the method further comprises:
compressing and packaging the files in different forms obtained after analysis, and encrypting the files;
and calling a supervision interface, and reporting the encrypted file to a supervision system.
4. The method of claim 1, wherein the index type at least comprises one or more of a root type, a text type, a digital type, a collection type, an attachment type, and an ignore type.
5. A data reporting apparatus, comprising:
the reporting format determining unit determines the reporting format of the data to be reported;
the entity object determining unit determines a corresponding entity object according to the reporting format;
the data filling unit is used for filling the data to be reported into the entity object to obtain the entity object to be analyzed; the data filling unit further comprises the step of annotating characteristic notes with the same index type but different file forms in the same entity object; filling the data to be reported into positions corresponding to the characteristic notes in different file forms respectively, and analyzing the entity objects according to analyzers of different types respectively; the parsing the entity object according to the parsers of different types specifically includes: identifying characteristic notes in a first reporting file form and characteristic notes in a second reporting file form, which correspond to the entity objects to be analyzed, respectively according to the first analyzer and the second analyzer; analyzing the entity object with the first reporting file form characteristic annotation and the second reporting file form characteristic annotation according to the first analyzer and the second analyzer; the analyzing, according to the first analyzer and the second analyzer, the entity object with the first report file form characteristic annotation and the second report file form characteristic annotation specifically includes: the first parser is an xml parser, and according to the xml parser, the characteristic annotation of the xml form in the entity object is identified, and the reporting data corresponding to the characteristic annotation of the xml form in the entity object is parsed into the data of the xml file format meeting the reporting requirement, so as to obtain an xml file; the second parser is a db parser, and according to the db parser, characteristic annotation of db form in the entity object is identified, and report data corresponding to the db form characteristic annotation in the entity object is parsed into db file format data meeting the report requirement, so as to obtain a db file;
The characteristic annotation determining unit determines the index type according to the reported data; determining characteristic annotation in the entity object to be analyzed according to a preset characteristic table, the index type and the reporting format; the preset characteristic table comprises index types and characteristic notes of all reporting formats corresponding to the index types;
and the analysis unit is used for analyzing the entity object with the corresponding characteristic annotation into a file meeting the requirement of a data reporting format through the analyzer so as to report the data.
6. A data reporting device, comprising:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
determining a reporting format of data to be reported;
determining a corresponding entity object according to the reporting format;
filling the data to be reported into the entity object to obtain the entity object to be analyzed;
determining an index type according to the reported data; determining characteristic annotation in the entity object to be analyzed according to a preset characteristic table, the index type and the reporting format; the preset characteristic table comprises index types and characteristic notes of all reporting formats corresponding to the index types;
Analyzing the entity object with the corresponding characteristic annotation into a file meeting the requirement of a data reporting format through an analyzer so as to report the data;
after determining the reporting format of the data to be reported, if two reporting formats are required, the method further comprises:
marking the characteristic notes with the same index type but different file forms in the same entity object;
filling the data to be reported into positions corresponding to the characteristic notes in different file forms respectively, and analyzing the entity objects according to analyzers of different types respectively;
the parsing the entity object according to the parsers of different types specifically includes:
identifying characteristic notes in a first reporting file form and characteristic notes in a second reporting file form, which correspond to the entity objects to be analyzed, respectively according to the first analyzer and the second analyzer;
analyzing the entity object with the first reporting file form characteristic annotation and the second reporting file form characteristic annotation according to the first analyzer and the second analyzer;
the analyzing, according to the first analyzer and the second analyzer, the entity object with the first report file form characteristic annotation and the second report file form characteristic annotation specifically includes:
The first parser is an xml parser, and according to the xml parser, the characteristic annotation of the xml form in the entity object is identified, and the reporting data corresponding to the characteristic annotation of the xml form in the entity object is parsed into the data of the xml file format meeting the reporting requirement, so as to obtain an xml file; and the second parser is a db parser, and according to the db parser, the characteristic annotation in the db form in the entity object is identified, and the report data corresponding to the db form characteristic annotation in the entity object is parsed into the data in the db file format meeting the report requirement, so as to obtain the db file.
7. A non-transitory computer storage medium storing computer-executable instructions configured to:
determining a reporting format of data to be reported;
determining a corresponding entity object according to the reporting format;
filling the data to be reported into the entity object to obtain the entity object to be analyzed;
determining an index type according to the reported data; determining characteristic annotation in the entity object to be analyzed according to a preset characteristic table, the index type and the reporting format; the preset characteristic table comprises index types and characteristic notes of all reporting formats corresponding to the index types;
Analyzing the entity object with the corresponding characteristic annotation into a file meeting the requirement of a data reporting format through an analyzer so as to report the data;
after determining the reporting format of the data to be reported, if two reporting formats are required, the method further comprises:
marking the characteristic notes with the same index type but different file forms in the same entity object;
filling the data to be reported into positions corresponding to the characteristic notes in different file forms respectively, and analyzing the entity objects according to analyzers of different types respectively;
the parsing the entity object according to the parsers of different types specifically includes:
identifying characteristic notes in a first reporting file form and characteristic notes in a second reporting file form, which correspond to the entity objects to be analyzed, respectively according to the first analyzer and the second analyzer;
analyzing the entity object with the first reporting file form characteristic annotation and the second reporting file form characteristic annotation according to the first analyzer and the second analyzer;
the analyzing, according to the first analyzer and the second analyzer, the entity object with the first report file form characteristic annotation and the second report file form characteristic annotation specifically includes:
The first parser is an xml parser, and according to the xml parser, the characteristic annotation of the xml form in the entity object is identified, and the reporting data corresponding to the characteristic annotation of the xml form in the entity object is parsed into the data of the xml file format meeting the reporting requirement, so as to obtain an xml file; and the second parser is a db parser, and according to the db parser, the characteristic annotation in the db form in the entity object is identified, and the report data corresponding to the db form characteristic annotation in the entity object is parsed into the data in the db file format meeting the report requirement, so as to obtain the db file.
CN202110324722.2A 2021-03-26 2021-03-26 Data reporting method, device, equipment and storage medium Active CN112947939B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110324722.2A CN112947939B (en) 2021-03-26 2021-03-26 Data reporting method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110324722.2A CN112947939B (en) 2021-03-26 2021-03-26 Data reporting method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112947939A CN112947939A (en) 2021-06-11
CN112947939B true CN112947939B (en) 2024-02-23

Family

ID=76228204

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110324722.2A Active CN112947939B (en) 2021-03-26 2021-03-26 Data reporting method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112947939B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114004217B (en) * 2022-01-04 2022-03-25 江西派能科技有限公司 Message signature element extraction method and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107086942A (en) * 2017-04-25 2017-08-22 北京锐安科技有限公司 A kind of Web content service provider ICP reported datas inspection method and device
CN110688828A (en) * 2019-09-20 2020-01-14 京东数字科技控股有限公司 File processing method and device, file processing system and computer equipment
WO2020233037A1 (en) * 2019-05-20 2020-11-26 深圳壹账通智能科技有限公司 Data processing method and apparatus, and storage medium
CN112417837A (en) * 2020-12-02 2021-02-26 上海三稻智能科技有限公司 Method, system and storage medium for automatic cross judgment retrieval matching template based on mole identification

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107086942A (en) * 2017-04-25 2017-08-22 北京锐安科技有限公司 A kind of Web content service provider ICP reported datas inspection method and device
WO2020233037A1 (en) * 2019-05-20 2020-11-26 深圳壹账通智能科技有限公司 Data processing method and apparatus, and storage medium
CN110688828A (en) * 2019-09-20 2020-01-14 京东数字科技控股有限公司 File processing method and device, file processing system and computer equipment
CN112417837A (en) * 2020-12-02 2021-02-26 上海三稻智能科技有限公司 Method, system and storage medium for automatic cross judgment retrieval matching template based on mole identification

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于XML的多协议报文解析的方法与实现;吴建斌;邹佩江;;电子测量技术(第03期);全文 *

Also Published As

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

Similar Documents

Publication Publication Date Title
US7596546B2 (en) Method and apparatus for organizing, visualizing and using measured or modeled system statistics
US10095602B2 (en) Automated code analyzer
CN105225076B (en) Cost analysis data acquisition and processing system
CN106021111A (en) Interface testing method and system
CN108628748B (en) Automatic test management method and automatic test management system
CN109460223A (en) A kind of API gateway management system and its method
CN111585344B (en) Substation intelligent checking method and device based on total station IED simulation
CN102779321A (en) Method and device used for verifying message and based on integrated Ethernet chip (IEC) 61968 message type definition
CN112597018A (en) Interface test case generation method, device, equipment and storage medium
CN110163458A (en) Data assets management and monitoring method based on artificial intelligence technology
CN113065314B (en) BIOS hardware adaptation method and device based on XML file format
CN112947939B (en) Data reporting method, device, equipment and storage medium
CN110413465A (en) A kind of consistency on messaging test method, system and authentication server based on information interactive bus
CN110334147A (en) A kind of method of data synchronization and device
CN110689238B (en) Method and system for realizing MMS (multimedia message service) information simulation and point-to-point of intelligent substation
CN111401028B (en) Automatic comparison method and device for RPS software versions of nuclear power station
CN107622013B (en) Distributed system testing method and device
CN111026451A (en) Parameter configuration method and configuration tool for transformer substation terminal interval
CN108322492B (en) Medical data synchronization method and device
CN113239016B (en) Database design assistance apparatus and method
CN115794624A (en) Closed-loop testing method and system for single automation device of intelligent substation
CN109167676A (en) A kind of diagnostic method and system of High-Performance Computing Cluster failure
CN115480748A (en) Service arrangement method, device and storage medium
CN114492861A (en) Test data acquisition and analysis method
KR20140123126A (en) System and method for generating database based on SCL

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
TA01 Transfer of patent application right

Effective date of registration: 20240122

Address after: 250101 Inspur science and Technology Park, 1036 Inspur Road, hi tech Zone, Jinan City, Shandong Province

Applicant after: Inspur Genersoft Co.,Ltd.

Country or region after: China

Address before: 250101 Inspur science and Technology Park, 1036 Inspur Road, hi tech Zone, Jinan City, Shandong Province

Applicant before: SHANDONG INSPUR GENESOFT INFORMATION TECHNOLOGY Co.,Ltd.

Country or region before: China

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant