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

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

Info

Publication number
CN112947939A
CN112947939A CN202110324722.2A CN202110324722A CN112947939A CN 112947939 A CN112947939 A CN 112947939A CN 202110324722 A CN202110324722 A CN 202110324722A CN 112947939 A CN112947939 A CN 112947939A
Authority
CN
China
Prior art keywords
data
reporting
entity object
format
characteristic
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.)
Granted
Application number
CN202110324722.2A
Other languages
Chinese (zh)
Other versions
CN112947939B (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
Shandong Inspur Genersoft 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 Shandong Inspur Genersoft Information Technology Co Ltd filed Critical Shandong Inspur Genersoft Information Technology 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

Images

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/00Information and communication technology [ICT] specially adapted for implementation of business processes of 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • Tourism & Hospitality (AREA)
  • Educational Administration (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Human Resources & Organizations (AREA)
  • Marketing (AREA)
  • Primary Health Care (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the application discloses a data reporting method, a data reporting device, data reporting equipment and a storage medium. The method and the device are used for solving the problem that the development difficulty of the data reporting system is high, so that the data reporting system needs to be upgraded and modified by investing more workload when the format of the reported file is adjusted. Determining a reporting format of data to be reported; determining a corresponding entity object according to the report format; filling data to be reported into the entity object to obtain an entity object to be analyzed; determining an index type according to the reported data; determining a 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 annotations 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 by an analyzer, and reporting the data. By the method, the development difficulty is reduced, and the development workload is reduced.

Description

Data reporting method, device, equipment and storage medium
Technical Field
The present application 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 data is reported to national resource supervision, due to the current situation of information construction in the national resource commission, all departments cannot automatically share required information, and data meeting the working requirements of the enterprises to be supervised needs to be collected and summarized from the enterprises to be supervised.
When reporting data to state resource supervision, a supervised enterprise often needs to form files of different forms according to a set format and a state resource commission requirement and report the files to a state resource commission system. Therefore, research and development personnel need to pay attention to the service implementation process and the technical implementation details of data reporting, so that the development process of the data reporting system is difficult. Once the format of the report file is adjusted by the state resource committee, the technical details of data reporting need to be correspondingly changed, so that a large amount of workload needs to be invested to correspondingly upgrade and modify the data reporting system.
Disclosure of Invention
The embodiment of the application provides a data reporting method, a data reporting device, data reporting equipment and a storage medium, and aims to solve the following technical problems: the development difficulty of the data reporting system is high, so that when the format of the reporting file is adjusted, a large amount of workload needs to be invested to correspondingly upgrade and modify the data reporting system.
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 report format; filling data to be reported into the entity object to obtain an entity object to be analyzed; determining an index type according to the reported data; determining a 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 annotations 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 by an analyzer so as to report the data.
According to the embodiment of the application, the corresponding analyzer can be selected to analyze the entity object by determining the reporting format of the reported data. In addition, according to different reporting data formats, different entity objects are set in advance, so that the entity objects can be analyzed according to the characteristic annotations in the entity objects only by filling the data to be reported into the entity objects. Research personnel do not need to pay attention to details in the analysis process, and the re-investment of system development when the reported technical details are changed is greatly reduced.
Determining a reporting format of data to be reported, specifically comprising:
receiving a first reporting file format to be reported in a wire-down 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 reporting file format template to be reported in a line mode, and analyzing the entity object to be analyzed into a reporting file meeting the requirement of the second reporting file format template.
In an implementation manner of the present application, after determining a reporting format of data to be reported, in a case that two reporting formats are required, the method further includes: marking the characteristic annotations with the same index type but different file forms in the same entity object; and respectively filling the data to be reported to the positions corresponding to the characteristic annotations with different file forms, and respectively analyzing the entity object according to different types of analyzers.
According to the embodiment of the application, under the condition that the types of the data needing to be uploaded are multiple types, the same entity object can be used, different types of characteristic annotations are marked in the same entity object, and the same data are filled in multiple positions corresponding to the same entity object. The number of used entity objects is reduced, and meanwhile, data needing to be uploaded does not need to be acquired for multiple times. The workload of developers is reduced.
In an implementation manner of the present application, the analyzing the entity object according to different types of analyzers specifically includes: identifying characteristic annotations in a first reporting file form and characteristic annotations in a second reporting file form respectively corresponding to the entity object to be analyzed according to the first analyzer and the second analyzer; and according to the first parser and the second parser, the entity object with the first reporting file form characteristic annotation and the second reporting file form characteristic annotation is parsed.
According to the embodiment of the application, the same entity object is analyzed through different analyzers, and the problem that research and development staff work load is large due to the fact that only one entity object can be analyzed through one analyzer can be avoided. Meanwhile, the embodiment of the application can be compatible with two reporting forms, different entity objects do not need to be researched and developed for different reporting forms, and the development period of a data reporting system is simplified.
In an implementation manner of the present application, parsing, according to a first parser and a second parser, an entity object with a first reporting file form property annotation and a second reporting file form property annotation specifically includes: the first analyzer is an xml analyzer, identifies the characteristic annotation in the xml form in the entity object according to the xml analyzer, and analyzes the reported data corresponding to the characteristic annotation in the xml form in the entity object into data in the xml file format meeting the reporting requirement so as to obtain an xml file; and the second parser is a db parser, identifies the characteristic annotation in the db form in the entity object according to the db parser, and parses reported data corresponding to the characteristic annotation in the db form in the entity object into data in a db file format meeting the reporting requirement so as to obtain a db file.
In an implementation manner of the present application, after parsing, by the parser, the entity object with the corresponding property 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 indicator type includes at least one or more of a root type, a text type, a numeric type, an aggregate type, an attachment type, and an ignore type.
An embodiment of the present application provides a data reporting apparatus, including: a report format determining unit for determining the report format of the data to be reported; the entity object determining unit determines a corresponding entity object according to the report 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 characteristic annotation determining unit determines the index type according to the reported data; determining a characteristic annotation in the entity object to be analyzed according to a preset characteristic table, the index type and a reporting format; the preset characteristic table comprises index types and characteristic annotations 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 an analyzer so as to report the data.
An embodiment of the present application provides a data reporting apparatus, including: 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 to cause the at least one processor to: determining a reporting format of data to be reported; determining a corresponding entity object according to the report format; filling data to be reported into the entity object to obtain an entity object to be analyzed; determining an index type according to the reported data; determining a 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 annotations 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 by an analyzer so as to report the data.
A non-volatile computer storage medium provided in an embodiment of the present application stores computer-executable instructions, and the computer-executable instructions are configured to: determining a reporting format of data to be reported; determining a corresponding entity object according to the report format; filling data to be reported into the entity object to obtain an entity object to be analyzed; determining an index type according to the reported data; determining a 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 annotations 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 by an analyzer so as to report the data.
The embodiment of the application adopts at least one technical scheme which can achieve the following beneficial effects: according to the embodiment of the application, the corresponding analyzer can be selected to analyze the entity object by determining the reporting format of the reported data. In addition, according to different reporting data formats, different entity objects are set in advance, so that the entity objects can be analyzed according to the characteristic annotations in the entity objects only by filling the data to be reported into the entity objects. Research personnel do not need to pay attention to details in the analysis process, and the re-investment of system development when the reported technical details are changed is greatly reduced.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without any creative effort. In the drawings:
fig. 1 is a flowchart of a data reporting method according to an embodiment of the present application;
FIG. 2 is a diagram of the composition of base classes in the form of xml according to an embodiment of the present application;
FIG. 3 is a block diagram of a base class component in db form according to an embodiment of the present application;
FIG. 4 is a diagram of an example of an xml form system entity provided in an embodiment of the present application;
FIG. 5 is a data diagram of an example of an xml formal entity object provided by an embodiment of the present application;
fig. 6 is a data diagram illustrating an example of an xml formal entity object converted into an xml file according to an embodiment of the present application;
FIG. 7 is a diagram of a transformation of data in xml format according to an embodiment of the present application;
FIG. 8 is a diagram of an example of a db-type system entity provided by an embodiment of the present application;
FIG. 9 is a data diagram of an example of a db formal entity object provided by an embodiment of the present application;
FIG. 10 is a data diagram illustrating an example of a db formal entity object converted into a db file according to an embodiment of the present application;
FIG. 11 is a diagram of a db format data transformation provided by an embodiment of the present application;
FIG. 12 is a diagram of an entity annotated with different file formats as provided by an embodiment of the present application;
fig. 13 is a block diagram of a complete process of data reporting according to an embodiment of the present application;
fig. 14 is a block diagram of a data reporting and splitting process according to an embodiment of the present application;
fig. 15 is a structural diagram of a data reporting apparatus 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 data reporting device, data reporting equipment and a storage medium.
In order to make those skilled in the art better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any inventive step based on the embodiments of the present disclosure, shall fall within the scope of protection of the present application.
In the prior art, when data is reported to a state resource committee system, research and development personnel need to pay attention to a service implementation process and pay attention to technical implementation details of data reporting. Due to the change of technical details, different technicians cannot completely master the situation, which results in a difficult development of a data reporting and storing system.
In addition, since the reported technical implementation process may be dispersed in different service modules, when technical details are changed, different service modules need to be upgraded and modified correspondingly with a certain workload. The workload of re-investment of system development when the reporting technology details are overlapped is increased.
In order to solve the foregoing problems, embodiments of the present application provide a data reporting method, apparatus, device, and storage medium. And establishing different entity objects according to the data reporting requirements issued by the state resource committee. In the process of data reporting, the data to be reported is only needed to be filled into the corresponding entity object, and then the entity object is analyzed by the analyzer corresponding to the reporting type, so that the entity object can be analyzed into a reporting file meeting the requirements. The development difficulty of the data reporting system is reduced, and the workload of re-investment of system development when reporting technical details are overlapped is greatly reduced.
The technical solutions proposed in the embodiments of the present application are described in detail below with reference to the accompanying drawings.
Fig. 1 is a flowchart of a data reporting method according to 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 an embodiment of the present application, the type of the data that needs to be reported this time is obtained according to the data reporting requirement issued by state resource supervision.
Specifically, the type of the data report issued by the state resource supervision may be an xml-type file, or a db-type file, or may require to upload an xml-type file and a db-type file at the same time.
It should be noted that, in the reported data type requirements issued by state resource supervision, the requirement of the xml format file is transmitted through a offline mode, so that developers who report data obtain the uploading requirement of the xml format file through the offline mode. And analyzing the data to be reported into a reporting file meeting the file format requirement of the xml type. The file requirement of db format is issued by the state resource committee system, so that the developer for data reporting can obtain the uploading requirement of db format file through on-line mode. And analyzing the data to be reported into a reporting file meeting the requirement of the file template of db type.
And S102, determining the corresponding entity object according to the report format.
In an embodiment of the present application, a developer may formulate entity objects in different forms according to different reporting formats. For example, the entity object in the xml format may be formulated according to the xml reporting format, or the entity object in the db format may be formulated according to the db reporting format.
In an embodiment of the present application, a corresponding entity object is determined according to a reporting format of the reported data. For example, if the format of the data to be reported is in the 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 herein.
Figure BDA0002994129980000071
TABLE 1
As shown in table 1, in the embodiment of the present application, index types are reported for different common data, and corresponding C # characteristics in the form of db and xml are established. The index type at least comprises one or more of a root type, a text type, a number type, an aggregation type, an attachment type and an ignore type. The file form at least comprises one or more of db form and xml form. Moreover, any index type and any file form correspond to a C # characteristic.
In an embodiment of the present application, the reporting index refers to a minimum unit of each reported data, such as a conference number and a conference name. The db form is that the sqlite database is used as a data storage means, and data is put into the sqlite data file. The xml format is that an xml file is used as a data storage mode, and data is put into the file x.
FIG. 2 is a composition diagram of base classes in the form of xml according to an embodiment of the present application. As shown in FIG. 2, the xml form base class includes XmlRootAttribute, XmlElementAttribute, XmlArrayttemAttribute, XmlArrayAttribute, XmlIgnoreAttribute. FIG. 3 is a block diagram of a base class composition in db form according to an embodiment of the present application. As shown in FIG. 3, the db form base class includes ReportDBRootAttribute, ReportDBElementAttribute, ReportDBArrayAttribute, and ReportDBAttachAttribute.
The index type, file format, and characteristics in the C # characteristics table may be added or deleted according to actual use requirements or requirements of state commission.
In an embodiment of the application, a file format of the data reporting is determined according to the acquired requirement of the reported data issued by the state resource committee. 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 description will take the example that the present request is reported in the xml file format.
In one embodiment of the present application, entity objects in the form of xml are created. Fig. 4 is a diagram of an example of an xml format system entity provided in an embodiment of the present application. As shown in FIG. 4, the graph is labeled with property annotations XmlRootAttribute and XmlElement. Each property annotation corresponds to data that needs to be populated.
In one embodiment of the present application, the data to be reported is filled into an entity object in the form of xml. Fig. 5 is an example data diagram of an xml formal entity object provided in an embodiment of the present application. As shown in fig. 5, it can be seen from the "presentation data" in the RegulationName in the figure that the data that needs to be filled into the entity object in the xml format at this time is the "presentation data", and the presentation data in fig. 5 is filled into the position of the "adjustment _ name" corresponding to the property annotation XmlElement in fig. 4. And obtaining the entity object to be analyzed in the form of xml.
In an embodiment of the present application, the following description will take the request to report data in db file format as an example.
In one embodiment of the present application, an entity object in the form of db is created. Fig. 8 is a diagram of an example of a db-type system entity provided in an embodiment of the present application. As shown in fig. 8, the graph is labeled with property annotations DBRootAttribute and DBElement. Each property annotation corresponds to data that needs to be populated.
In one embodiment of the present application, the data to be reported is filled into the entity object in db form. Fig. 9 is a data diagram of an example of db formal entity object according to an embodiment of the present application. As shown in fig. 9, it can be seen from the "demonstration data" in the RegulationName in the figure that the data that needs to be filled into the entity object in the db format at this time is the "demonstration data", and the demonstration data in fig. 9 is filled into the position of the "system name" corresponding to the characteristic annotation DBElement in fig. 8. And obtaining the entity object in db form to be analyzed.
In an embodiment of the application, after the reporting type of the business data is determined to be reported, the characteristic annotations with the same index type but different file forms are marked in the same entity object under the condition that two reporting types are required. And filling the data to be reported into the positions corresponding to the characteristic annotations with different file forms respectively.
Specifically, in the requirement issued by the national resource supervision, the same data needs to be uploaded with the xml file and the db file. The xml entity object may be combined with the db entity object. Fig. 12 is an entity diagram annotated with different file formats according to an embodiment of the present application. As shown in fig. 12, the figure shows both the property annotation XmlElement in the xml file format and the property annotation DBElement in the db file format. At this time, only the property annotation corresponding to the data to be uploaded needs to be marked in the same entity object, and research and development personnel do not need to develop two sets of entity objects with the same logic according to different uploading formats, so that the workload of the development personnel is reduced.
Specifically, the same filling data "presentation data" is used and filled to the positions corresponding to the property notes in different file forms in fig. 12. Such as the location of "relationship _ name" for the property annotation XmlElement, and the location of "system name" for the property annotation DBElement. Therefore, the entity object can be filled by calling the same filling data, and a plurality of filling data do not need to be established for the characteristic annotations in different file forms. Therefore, the development difficulty is reduced, and the 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 reported format.
In an embodiment of the present application, according to the data reported this time, the index type of the data reported this time can be determined. For example, the report is of a text type or an attachment type. And according to the determined index type and the reporting format of the reported data, determining the unique characteristic annotation by presetting a characteristic table.
Specifically, the preset characteristic table represents the format of the report file horizontally and represents the index type vertically, so that the unique characteristic annotation can be determined through any one report format and any one index type.
And 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 application, different resolvers are established to resolve different forms of entity objects. For example, an xml parser reportxmlserialiser is established to parse an entity object in xml form. And establishing a db parser report DBStalizer to parse the entity object in the db form.
In an embodiment of the present application, when it is determined that the reporting type of the service data is a single type, the data to be reported is filled into the entity object corresponding to the single type, so as to obtain the entity object to be analyzed. 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 a report file corresponding to the single type.
Specifically, when the data reporting is required to be performed in the xml file format, the data is first filled in the entity object shown in fig. 3, so as to obtain the entity object to be analyzed. And then calling a pre-established xml analyzer to analyze the entity object to be analyzed. The xml parser determines the characteristic annotation in the entity object to be parsed, parses the corresponding data into data in an xml format according to the characteristic annotation, and forms an xml file.
Fig. 6 is a data diagram illustrating an example of an xml formal entity object converted into an xml file according to an embodiment of the present application. As shown in fig. 6, the data "presentation data" to be filled has been converted into data in xml format. Fig. 7 is a diagram of data conversion in xml format according to an embodiment of the present application. As shown in fig. 7, data corresponding to the property annotation in the entity object to be parsed has been converted into a file in xml format, and for example, data "tiol" corresponding to the property annotation xmllottattribute, data "relationship _ name" corresponding to the property annotation xmllelement, and data "presentation data" that needs to be filled are converted into data in xml file format, respectively.
In an embodiment of the present application, when data reporting in a db file format is required this time, data is first filled in the entity object shown in fig. 8, so as to obtain an entity object to be analyzed. And then calling a pre-established db parser to parse the entity object to be parsed. The db parser determines the characteristic annotation in the entity object to be parsed, parses the corresponding data into db format data according to the characteristic annotation, and forms a db file.
Fig. 10 is an exemplary data diagram after a db formal entity object is converted into a db file according to an embodiment of the present application. As shown in fig. 10, the data "presentation data" to be filled has been converted into data in db format. Fig. 11 is a diagram of conversion of db format data according to an embodiment of the present application. As shown in fig. 11, data corresponding to the property annotation in the entity object to be parsed has been converted into a file in DB format, such as data "303127913" corresponding to the property annotation DBRootAttribute, data "4833" and "system name" corresponding to the property annotation DBElement, and data "presentation data" to be filled are converted into data in DB file format, respectively.
In an embodiment of the application, when the two types of reporting types are required, the data to be reported are respectively filled into the positions corresponding to the different characteristic annotations in the file form, and the entity object is parsed according to different types of parsers.
In an embodiment of the application, according to the first parser and the second parser, the property annotation in the form of a first reporting file and the property annotation in the form of a second reporting file corresponding to the entity object to be parsed are identified. And according to the first parser and the second parser, the entity object with the first reporting file form characteristic annotation and the second reporting file form characteristic annotation is parsed.
Specifically, the first parser is set as an xml parser, and the property annotation in the form of xml in the entity object is identified according to the xml parser. And analyzing the reported data corresponding to the xml form characteristic annotation in the entity object into data in an xml file format meeting the reporting requirement so as to obtain an xml file. And setting the second resolver as a db resolver, and identifying the characteristic annotation in the db form in the entity object according to the db resolver. And analyzing the reported data corresponding to the db-form characteristic annotation in the entity object into data in a db file format meeting the reporting requirement to obtain a db file.
Fig. 12 is an entity diagram annotated with different file formats according to an embodiment of the present application. As shown in FIG. 12, an xml parser and a db parser may be invoked, respectively, to parse data corresponding to different property annotations in the entity object. Thus, an xml file and a db file can be obtained.
According to the embodiment of the application, under the condition that the types of the data needing to be uploaded are multiple, the same entity object can be used, different types of characteristic annotations are marked in the same entity object, and the same data are filled in multiple positions corresponding to the same entity object. The number of used entity objects is reduced, and meanwhile, data needing 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, 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 reporting process of the data is completed. The supervision interface can be a state resource committee interface, and the supervision system can be a state resource committee supervision system.
Fig. 13 is a block diagram of a complete process of data reporting according to an embodiment of the present application. As shown in fig. 13, the data reporting process is as follows:
in one embodiment of the present application, preparation for reporting data is performed first. Namely, the data to be reported is extracted in 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 data, analyzing the entity object by using an analyzer to obtain a file meeting the requirements of the state resource committee, and reporting the obtained file to a state resource committee system.
Fig. 14 is a block diagram of a data reporting splitting process according to an embodiment of the present application.
In an embodiment of the application, a request for reporting data issued by the state resource committee is received, and a file form of the reported data is determined so as to call a parser of a corresponding type.
In an embodiment of the present application, in a case that the format of the reported data is required to be in an xml format, the data to be reported is filled into an entity object in the xml format. And under the condition that the format of the reported data is required to be in the db form, acquiring a db template issued by the State administration, and filling the data to be reported into an entity object in the db form.
In an embodiment of the present application, a parser corresponding to the reporting format is called to parse the entity object filled with data, so as to obtain a reporting file meeting the requirements of the reporting format.
In an embodiment of the present application, the obtained report file is compressed and packaged, and the file is encrypted. And calling a national resource committee system interface, and reporting the encrypted file to a national resource committee system.
Fig. 15 is a structural diagram of a data reporting apparatus according to an embodiment of the present application. The device comprises: a report format determining unit S501, an entity object determining unit S502, a data filling unit S503, a characteristic annotation determining unit S504 and an analyzing unit S505.
A report format determining unit S501 determines a report format of data to be reported;
an entity object determining unit S502, which determines the corresponding entity object according to the report format;
a data filling unit S503, filling the data to be reported into the entity object, to obtain an entity object to be analyzed;
a characteristic annotation determination unit S504, which determines the index type according to the reported data; determining the characteristic annotation in the entity object to be analyzed according to a preset characteristic table, the index type and the report format; the preset characteristic table comprises index types and characteristic annotations of all reporting formats corresponding to the index types;
the parsing unit S505 parses the entity object with the corresponding property annotation into a file meeting the requirement of the data reporting format by using a parser, so as to report the data.
Fig. 16 is a schematic structural diagram of a data reporting device according to an embodiment of the present application, where the device includes:
at least one processor; and the number of the first and second groups,
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 report format;
filling the data to be reported into the entity object to obtain an entity object to be analyzed;
determining an index type according to the reported data; determining the characteristic annotation in the entity object to be analyzed according to a preset characteristic table, the index type and the report format; the preset characteristic table comprises index types and characteristic annotations 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 by 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 report format;
filling the data to be reported into the entity object to obtain an entity object to be analyzed;
determining an index type according to the reported data; determining the characteristic annotation in the entity object to be analyzed according to a preset characteristic table, the index type and the report format; the preset characteristic table comprises index types and characteristic annotations 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 by an analyzer so as to report the data.
The embodiments in the present application are described in a progressive manner, and the same and similar parts among the embodiments can be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the embodiments of the apparatus, the device, and the nonvolatile computer storage medium, since they are substantially similar to the embodiments of the method, the description is simple, and for the relevant points, reference may be made to the partial description of the embodiments of the method.
The foregoing description of specific embodiments of the present application has been presented. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may 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 may also be possible or may be advantageous.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art to which the embodiments of the present application pertain. 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 (10)

1. A data reporting method is characterized in that the method comprises the following steps:
determining a reporting format of data to be reported;
determining a corresponding entity object according to the report format;
filling the data to be reported into the entity object to obtain an entity object to be analyzed;
determining an index type according to the reported data; determining the characteristic annotation in the entity object to be analyzed according to a preset characteristic table, the index type and the report format; the preset characteristic table comprises index types and characteristic annotations 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 by an analyzer so as to report the data.
2. A method as claimed in claim 1, wherein before determining the reporting format of the data to be reported, the method further comprises:
receiving a first reporting file format to be reported in a wire-down mode, and analyzing the entity object to be analyzed into a reporting file meeting the requirement of the first reporting file format;
and receiving a second reporting file format template to be reported in a line mode, and analyzing the entity object to be analyzed into a reporting file meeting the requirement of the second reporting file format template.
3. A method as claimed in claim 1, wherein after the report format of the data to be reported is determined, if two report formats are required, the method further comprises:
marking the characteristic annotations with the same index type but different file forms in the same entity object;
and respectively filling the data to be reported to the positions corresponding to the characteristic annotations with different file forms, and respectively analyzing the entity object according to different types of analyzers.
4. A data reporting method as claimed in claim 3, wherein the parsing the entity object according to different types of parsers respectively includes:
identifying characteristic annotations in a first reporting file form and characteristic annotations in a second reporting file form, which correspond to the entity object to be analyzed respectively, according to the first analyzer and the second analyzer;
and according to the first parser and the second parser, the entity object with the first reporting file form characteristic annotation and the second reporting file form characteristic annotation is parsed.
5. A data reporting method according to claim 4, wherein the parsing, according to the first parser and the second parser, the entity object with the first reporting file format property annotation and the second reporting file format property annotation specifically includes:
the first analyzer is an xml analyzer, identifies the characteristic annotation in the xml form in the entity object according to the xml analyzer, and analyzes the reported data corresponding to the characteristic annotation in the xml form in the entity object into data in an xml file format meeting the reporting requirement so as to obtain an xml file; and is
And the second parser is a db parser, identifies the characteristic annotation in the db form in the entity object according to the db parser, and parses reported data corresponding to the characteristic annotation in the db form in the entity object into data in a db file format meeting the reporting requirement so as to obtain a db file.
6. A data reporting method as claimed in claim 1, wherein after the parsing, by the parser, the entity object with the corresponding property annotation into a file meeting a data reporting format requirement, 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.
7. A method as claimed in claim 1, wherein the indicator type at least includes one or more of a root type, a text type, a numeric type, an aggregate type, an attachment type, and an ignore type.
8. A data reporting apparatus, comprising:
a report format determining unit for determining the report format of the data to be reported;
the entity object determining unit determines a corresponding entity object according to the report 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 characteristic annotation determining unit is used for determining the index type according to the reported data; determining the characteristic annotation in the entity object to be analyzed according to a preset characteristic table, the index type and the report format; the preset characteristic table comprises index types and characteristic annotations 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 an analyzer so as to report the data.
9. A data reporting device, comprising:
at least one processor; and the number of the first and second groups,
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 report format;
filling the data to be reported into the entity object to obtain an entity object to be analyzed;
determining an index type according to the reported data; determining the characteristic annotation in the entity object to be analyzed according to a preset characteristic table, the index type and the report format; the preset characteristic table comprises index types and characteristic annotations 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 by an analyzer so as to report the data.
10. 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 report format;
filling the data to be reported into the entity object to obtain an entity object to be analyzed;
determining an index type according to the reported data; determining the characteristic annotation in the entity object to be analyzed according to a preset characteristic table, the index type and the report format; the preset characteristic table comprises index types and characteristic annotations 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 by an analyzer so as to report the data.
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 true CN112947939A (en) 2021-06-11
CN112947939B 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)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114004217A (en) * 2022-01-04 2022-02-01 江西派能科技有限公司 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的多协议报文解析的方法与实现", 电子测量技术, no. 03 *

Cited By (1)

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

Also Published As

Publication number Publication date
CN112947939B (en) 2024-02-23

Similar Documents

Publication Publication Date Title
CN106597947B (en) Transformer substation equipment testing method, server, tester and system
CN106021111A (en) Interface testing method and system
CN111190596A (en) Joint debugging method and device, computer equipment and readable storage medium
CN111061696B (en) Method and device for analyzing transaction message log
CN109460223A (en) A kind of API gateway management system and its method
CN110134596A (en) The generation method and terminal device of test document
CN111026451A (en) Parameter configuration method and configuration tool for transformer substation terminal interval
CN112947939B (en) Data reporting method, device, equipment and storage medium
CN115438635A (en) Report generation method, report generation device, and computer storage medium
CN111966587A (en) Data acquisition method, device and equipment
CN110689238A (en) Method and system for realizing MMS (multimedia messaging service) information simulation and point alignment of intelligent substation
CN112347751B (en) Method and device for generating COSIC workload evaluation document
CN110209722A (en) A kind of data-interface for data exchange
CN109377412A (en) A kind of intensive artwork maintenance system of auxiliary tone and its maintaining method
CN114139514A (en) Intelligent report generation method and device and computer storage medium
CN109167676A (en) A kind of diagnostic method and system of High-Performance Computing Cluster failure
CN114492861A (en) Test data acquisition and analysis method
CN112507521A (en) Digital simulation platform of steam generator
Jang et al. Design of an Algorithm for the Validation of SCL in Digital Substations
CN111159993B (en) Automatic analysis and report generation system platform for power transformation mobile operation card
CN109918353A (en) The method and terminal device of automated information processing
CN115150279B (en) Service link information acquisition method and device
CN113254423B (en) System file generation method, device, equipment and medium
Robertson Open and Extensible Control & Analytics Platform for Synchrophasor Data
CN117894419A (en) Medical record HQMS quality control method and system based on large model

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