CN108287890B - Data management method and device - Google Patents

Data management method and device Download PDF

Info

Publication number
CN108287890B
CN108287890B CN201810046305.4A CN201810046305A CN108287890B CN 108287890 B CN108287890 B CN 108287890B CN 201810046305 A CN201810046305 A CN 201810046305A CN 108287890 B CN108287890 B CN 108287890B
Authority
CN
China
Prior art keywords
data
processed
target
sub
writing
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
CN201810046305.4A
Other languages
Chinese (zh)
Other versions
CN108287890A (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.)
Northwest Institute of Eco Environment and Resources of CAS
Original Assignee
Cold and Arid Regions Environmental and Engineering Research Institute of CAS
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 Cold and Arid Regions Environmental and Engineering Research Institute of CAS filed Critical Cold and Arid Regions Environmental and Engineering Research Institute of CAS
Priority to CN201810046305.4A priority Critical patent/CN108287890B/en
Publication of CN108287890A publication Critical patent/CN108287890A/en
Application granted granted Critical
Publication of CN108287890B publication Critical patent/CN108287890B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2462Approximate or statistical queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation
    • G06F16/24534Query rewriting; Transformation
    • G06F16/24535Query rewriting; Transformation of sub-queries or views
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/248Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Software Systems (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Information Transfer Between Computers (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention provides a data management method and device, and relates to the technical field of data processing. According to the scheme, the obtained data to be processed is written into the message queue, so that the receiving of subsequent data is facilitated; reading data to be processed from the message queue, and writing the read data to be processed into a system form in the management terminal; taking the data to be processed written into the system form within a second preset time as target data to be processed every other first preset time, and writing the target data to be processed into a temporary table, wherein the second preset time is less than or equal to the first preset time; the drawing speed is improved by drawing the target data to be processed in the temporary table; drawing is carried out based on variable data in the target data to be processed within the corresponding preset threshold range, and abnormal data are filtered, so that the accuracy and the reliability of the data to be drawn are improved.

Description

Data management method and device
Technical Field
The invention relates to the technical field of data processing, in particular to a data management method and device.
Background
In the field of hydrologic integrated monitoring, a satellite, aerial remote sensing and ground monitoring terminal is usually required to be combined to monitor various meteorological, hydrologic and ecological systems. In the monitoring process, the monitored region area is wide, the types and the number of related sensors are large, the types of the obtained monitoring data are various, and the data volume is large. In the prior art, the monitoring data is classified by human to obtain the corresponding chart. However, manual mapping is inefficient, and errors are prone to occur during data transfer, which is not favorable for processing a large amount of data, i.e. the manual operation method is not suitable for processing a large amount of monitoring data.
Disclosure of Invention
In order to overcome the defects in the prior art, the invention provides a data management method and a data management device, which can automatically process a large amount of data to be processed to form an observation report, and are beneficial to improving the efficiency of data processing, thereby solving the problems.
In order to achieve the above object, the technical solutions provided by the preferred embodiments of the present invention are as follows:
the preferred embodiment of the invention provides a data management method, which is applied to a management terminal and comprises the following steps:
acquiring data to be processed, and writing the data to be processed into a message queue;
reading the data to be processed from the message queue, and writing the read data to be processed into a system form in the management terminal;
taking the data to be processed written into the system form within a second preset time as target data to be processed every other first preset time, and writing the target data to be processed into a temporary table, wherein the second preset time is less than or equal to the first preset time;
and taking variable data of variable data in the target data to be processed in the temporary table within a corresponding preset threshold value range as data to be drawn, and generating an observation report according to the data to be drawn and a preset image generation strategy, wherein the observation report comprises a statistical graph corresponding to the data to be drawn.
Optionally, the management terminal is in communication connection with at least one data acquisition device in the hydrological observation system, each data acquisition device is preset with an identity, and the step of obtaining the data to be processed includes:
the data to be processed is obtained from at least part of the data acquisition devices in at least one data acquisition device, wherein the data to be processed is associated with the identity of the data acquisition device.
Optionally, the system form includes at least one sub-form, and the method further includes:
and creating a sub-form every other third preset time, and taking the sub-form as a target sub-form, wherein the target sub-form is used for writing the to-be-processed data read from the message queue from after the target sub-form is created to during the creation of a new sub-form, and the third preset time is greater than or equal to the first preset time.
Optionally, before the step of writing the read data to be processed into the system form in the management terminal, the method further includes:
and judging whether the management terminal has the target sub-form or not, and if not, creating the target sub-form.
Optionally, the step of using variable data of the target data to be processed in the temporary table within a corresponding preset threshold range as the data to be plotted includes:
and converting the variable number of the variable data in the target data to be processed in the temporary table within the corresponding preset threshold value range into variable data in a JSON format, and taking the variable data in the JSON format as the data to be drawn.
Optionally, the management terminal is in communication connection with a server configured with a user account in advance, and the method further includes:
and converting the observation report into an observation report in a PDF format, and sending the observation report in the PDF format to the server.
Optionally, after the step of generating the observation report according to the data to be plotted and the preset image generation policy, the method further includes:
and clearing the target data to be processed in the temporary table.
Optionally, the statistical map includes: at least one statistical graph selected from bar statistical graph, broken line statistical graph, pictographic statistical graph and sector statistical graph.
The preferred embodiment of the present invention further provides a data management device, which is applied to a management terminal, and the data management device includes:
the acquisition writing unit is used for acquiring data to be processed and writing the data to be processed into a message queue;
the first reading and writing unit is used for reading the data to be processed from the message queue and writing the read data to be processed into a system form in the management terminal;
the second reading and writing unit is used for taking the data to be processed written into the system form within a second preset time as target data to be processed every other first preset time, and writing the target data to be processed into a temporary table, wherein the second preset time is less than or equal to the first preset time;
and the report generating unit is used for taking variable data of the variable data in the target data to be processed in the temporary table within a corresponding preset threshold range as data to be drawn, and generating an observation report according to the data to be drawn and a preset image generation strategy, wherein the observation report comprises a statistical graph corresponding to the data to be drawn.
Optionally, the management terminal is in communication connection with at least one data acquisition device in the hydrological observation system, each data acquisition device is preset with an identity, and the acquiring and writing unit is configured to:
the data to be processed is obtained from at least part of the data acquisition devices in at least one data acquisition device, wherein the data to be processed is associated with the identity of the data acquisition device.
Compared with the prior art, the data management method and the data management device provided by the invention at least have the following beneficial effects:
the data management method comprises the following steps: acquiring data to be processed, and writing the data to be processed into a message queue; reading data to be processed from the message queue, and writing the read data to be processed into a system form in the management terminal; taking the data to be processed written into the system form within a second preset time as target data to be processed every other first preset time, and writing the target data to be processed into a temporary table, wherein the second preset time is less than or equal to the first preset time; and taking variable data of variable data in the target data to be processed in the temporary table within a corresponding preset threshold value range as data to be drawn, and generating an observation report according to the data to be drawn and a preset image generation strategy, wherein the observation report comprises a statistical graph corresponding to the data to be drawn. According to the scheme, the obtained data to be processed is written into the message queue, so that the receiving of subsequent data is facilitated; the drawing speed is improved by drawing the target data to be processed in the temporary table; drawing is carried out based on the variable data within the corresponding preset threshold range, and abnormal data are filtered, so that the accuracy and the reliability of the data to be drawn are improved.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required to be used in the embodiments will be briefly described below. It is appreciated that the following drawings depict only some embodiments of the invention and are therefore not to be considered limiting of its scope, for those skilled in the art will be able to derive additional related drawings therefrom without the benefit of the inventive faculty.
Fig. 1 is an interaction diagram of a management terminal and a data acquisition device according to a preferred embodiment of the present invention.
Fig. 2 is a flowchart illustrating a data management method according to a preferred embodiment of the invention.
Fig. 3 is an interaction diagram of a management terminal, a server, a user terminal, and a data collection device according to a preferred embodiment of the present invention.
Fig. 4 is a block diagram of a data management device according to a preferred embodiment of the present invention.
Icon: 10-a management terminal; 11-a processing unit; 12-a communication unit; 13-a storage unit; 100-a data management device; 110-get write unit; 120-a first read write unit; 130-a second read write unit; 140-report generation unit; 20-a data acquisition device; 30-a server; 40-user terminal.
Detailed Description
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. It is to be understood that the described embodiments are merely a few embodiments of the invention, and not all embodiments. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Furthermore, the terms "first," "second," and the like are used merely to distinguish one description from another, and are not to be construed as indicating or implying relative importance.
Some embodiments of the invention are described in detail below with reference to the accompanying drawings. The embodiments described below and the features of the embodiments can be combined with each other without conflict.
Referring to fig. 1, an interactive diagram of a management terminal 10 and a data collection device 20 according to a preferred embodiment of the present invention is provided. The management terminal 10 provided by the invention can establish a communication connection with at least one data acquisition device 20 through a network to perform data interaction. The management terminal 10 may include a processing unit 11, a storage unit 13, a communication unit 12, and a data management device 100. The processing unit 11, the storage unit 13, the communication unit 12 and the data management device 100 are electrically connected directly or indirectly to realize data transmission or interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines.
Further, the management terminal 10 may be, but is not limited to, a smart phone, a Personal Computer (PC), a tablet PC, a Personal Digital Assistant (PDA), a Mobile Internet Device (MID), and the like. The data acquisition device 20 is a device for acquiring hydrographic environmental data, and the data acquisition device 20 is provided with an instrument or a sensor for acquiring corresponding data. For example, the data acquisition device 20 is provided with at least one of a temperature sensor, a humidity sensor, a water flow monitor, a positioning module, and a wind speed and direction detector, and can be used for acquiring data such as water temperature data, soil humidity data, water flow data, geographical position data, wind speed and direction data, and the like. Understandably, one data collecting device 20 may be used to collect one type of data, and may also collect multiple different types of data (for example, soil temperature and humidity data, wind speed and wind direction data, etc.), which is not limited herein.
In this embodiment, the network may be, but is not limited to, a wired network or a wireless network. Preferably, the network is a wireless network.
In the present embodiment, the processing unit 11 is a processor. The Processor may be a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a Network Processor (NP), or the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed.
In the present embodiment, the communication unit 12 is configured to establish a communication connection between the management terminal 10 and the data acquisition device 20 via a network, and to transmit and receive data via the network. Preferably, the communication unit 12 is a wireless communication module.
In the present embodiment, the storage unit 13 may be, but is not limited to, a random access memory, a read only memory, a programmable read only memory, an erasable programmable read only memory, an electrically erasable programmable read only memory, and the like. In this embodiment, the storage unit 13 may be configured to store the data to be processed and the observation report. Of course, the storage unit 13 may also be used to store a program, and the processing unit 11 executes the program after receiving the execution instruction.
Further, the data management apparatus 100 includes at least one software functional module that may be stored in the storage unit 13 in the form of software or firmware (firmware) or solidified in an Operating System (OS) of the management terminal 10. The processing unit 11 is used for executing executable modules stored in the storage unit 13, such as software functional modules and computer programs included in the data management device 100.
It is understood that the structure of the management terminal 10 shown in fig. 1 is only a schematic structure, and the management terminal 10 may further include more or less components than those shown in fig. 1. The components shown in fig. 1 may be implemented in hardware, software, or a combination thereof.
Fig. 2 is a flowchart illustrating a data management method according to a preferred embodiment of the invention. The data management method provided by the invention can be applied to the management terminal 10, can perform visualization processing on a large amount of data, is beneficial to improving the efficiency of visualization processing on the data, and is convenient for a user to check an observation report formed based on the data to be processed.
Each step of the data management method provided in this embodiment will be described in detail below, and in this embodiment, the data management method may include the following steps.
Step S210, obtaining data to be processed, and writing the data to be processed into a message queue.
In this embodiment, the management terminal 10 is in communication connection with at least one data acquisition device 20 in the hydrological observation system, each data acquisition device 20 is preset with an identity, and the at least one data acquisition device 20 constitutes the hydrological observation system and is used for acquiring relevant data of an ecological environment. For example, the method can be used for collecting relevant data (such as water temperature data, soil temperature and humidity data and the like) of rivers and surrounding environments, and can be used for geological environment surveying, climate research and the like. The management terminal 10 may acquire data to be processed from at least some of the at least one acquisition device, and then write the acquired data to be processed into the message queue. The measure of writing the data to be processed into the message queue can ensure that the data receiving and the data storage do not need to be carried out simultaneously, and even if the storage program is interrupted, only the data is accumulated in the queue, and the receiving of the subsequent data is not influenced.
The data to be processed is associated with the identity of the data acquisition terminal that acquired the data to be processed, so that the management terminal 10 can obtain the information of the data acquisition terminal from the data to be processed based on the identity. The information may include identity information of the data collection terminal, geographic location data, a name of the data collection terminal, and the like. The identification may be an identification code composed of numbers and/or character strings, that is, each data acquisition device 20 has a unique identification. In addition, the data to be processed are the water temperature data, the soil humidity data and the like.
Step S220, reading the to-be-processed data from the message queue, and writing the read to-be-processed data into a system form in the management terminal 10.
In this embodiment, the system form may be understood as a database, and may include a plurality of sub-forms, each of which may store data to be processed for a certain amount or a period of time. For example, one sub-form may be used to store at least part of the data to be processed acquired by the acquisition device in one day, and the storage manner of the sub-form is not particularly limited herein. The step S220 may be understood as performing a warehousing operation on the to-be-processed data in the message queue to store and record the to-be-processed data read from the message queue through the management terminal 10.
Step S230, every first preset time, using the to-be-processed data written into the system form within a second preset time as target to-be-processed data, and writing the target to-be-processed data into a temporary table, where the second preset time is less than or equal to the first preset time.
Understandably, at least a part of all the data acquired by the data acquisition device 20 in one day is taken as target data to be processed, and the target data to be processed is written into the temporary table so as to map the data in the temporary table. The temporary table is created in the cache of the management terminal 10, and the target data to be processed is written into the temporary table, which is helpful for improving the drawing speed of drawing the statistical chart. The first preset time period longer than the second preset time period may be set according to specific situations, and is not particularly limited herein.
In this embodiment, the corresponding data to be processed may be stored in groups based on the geographic location of the data acquisition device 20. For example, the data to be processed collected by the data collection device 20 in the preset area is stored in the same sub-table, so that the data collected by the user in different areas can be observed and counted conveniently. The preset area may be set according to actual conditions, and is not specifically limited herein.
Step S240, using variable data of variable data in the target data to be processed in the temporary table within a corresponding preset threshold range as data to be plotted, and generating an observation report according to the data to be plotted and a preset image generation policy, where the observation report includes a statistical graph corresponding to the data to be plotted.
In this embodiment, the variable data may be data that is acquired by the acquisition device and can be changed by the external environment. The variable data includes, but is not limited to, temperature data, wind speed and wind direction data, soil temperature and humidity data, and the like, and is not limited herein. The management terminal 10 may generate an observation report based on the data to be plotted and a preset image generation policy.
For example, the data to be processed obtained from the data acquisition devices 20 in the same preset area in a day may be classified according to the type of the data to be processed, and a statistical graph corresponding to each type of the data to be processed is generated based on each type of the data to be processed and the preset threshold range of each type of the data to be processed, so that all the statistical graphs may form an observation report of the preset area in the day. The preset threshold range can be set according to actual conditions and is used for filtering abnormal data or error data to be processed. For example, when the data acquisition device 20 is abnormal (for example, the various sensors are damaged), the observation value of the to-be-processed data acquired from the data acquisition device 20 is-99999, and a threshold range is preset, such abnormal data can be filtered, which is helpful for improving the accuracy and reliability of the drawing data, so that the statistical graph presented during observation is closer to the actual situation.
In this embodiment, the statistical chart may be, but is not limited to, a bar statistical chart, a polyline statistical chart, a pictogram statistical chart, and a sector statistical chart, and is not limited herein.
Optionally, step S240 may specifically be: and converting the variable number of the variable data in the target data to be processed in the temporary table within the corresponding preset threshold value range into variable data in the JSON format, and taking the variable data in the JSON format as the data to be drawn.
Understandably, the JSON format is a lightweight data exchange format. By converting the variable data into the variable data in the JSON format, the method is beneficial to being easy for developers to read and write, is also easy for machine analysis and generation, and is beneficial to reducing the consumption of memory resources, thereby improving the drawing speed.
In this embodiment, the drawing of the statistical graph corresponding to the data to be processed based on the data to be processed may be understood as performing visualization processing on the data to be processed. The visualization tool may use open source Highcharts and Highstock to derive each type of statistical map.
Optionally, after step S240, the data management method may further include: and clearing the target data to be processed in the temporary table.
Understandably, after the target to-be-processed data in the temporary table is drawn into the statistical graph, the target to-be-processed data in the temporary table can be deleted, so as to reduce the occupation of memory resources. In addition, after the target data to be processed is deleted, the temporary table can also be used for writing the data to be processed in other sub-tables as new target data to be processed.
Optionally, the data management method may further include: and creating a sub-form every other third preset time, and taking the sub-form as a target sub-form, wherein the target sub-form is used for writing the to-be-processed data read from the message queue from after the target sub-form is created to during the creation of a new sub-form, and the third preset time is greater than or equal to the first preset time.
Understandably, in the sub-forms of the system form, the target sub-form is the form currently being subjected to the write operation. While other sub-forms are typically sub-forms that have generated observation reports based on the data to be processed in their sub-forms. In consideration of the large data volume of the acquired to-be-processed data, a new sub-form can be created every third preset time, and the new sub-form is used as a target sub-form for writing the to-be-processed data read from the message queue from after the sub-form is created to during the creation of the next new sub-form. Namely, the form with larger data volume is divided into a plurality of forms with smaller data volume, so that the management and the check of a user are facilitated.
In this embodiment, it is determined in step whether the management terminal 10 has the target sub-form, and if not, the target sub-form is created.
For example, one sub-form is created each day as the target sub-form. Before writing the data to be processed read from the message queue into the system form, judging whether a sub-form is created on the same day, and if the sub-form is not created, creating a sub-form to be used as a target sub-form. If the sub-form is created, the read data to be processed is written into the sub-form (the sub-form is also the target sub-form).
Referring to fig. 3, an interactive schematic diagram of the management terminal 10, the server 30, the user terminal 40, and the data acquisition device 20 according to the preferred embodiment of the invention is provided. In the present embodiment, the management terminal 10 is connected to a server 30 configured with a user account in advance. After step S240, the data management method may further include: converts the observation report into an observation report in PDF format, and sends the observation report in PDF format to the server 30.
In the present embodiment, the file format of the observation report generated by the management terminal 10 is generally in the Html format, and the Html format observation report does not facilitate the user to open and view the contents in the observation report file. The observation report in the Html format can be converted into the observation report in the PDF format, so that the observation report can be conveniently opened by a user. In addition, the management terminal 10 may transmit the observation report in the PDF format to the server 30 so that the server 30 stores and records the observation report.
Further, the server 30 may be communicatively connected to at least one user terminal 40, and a user may log into a user account via a corresponding application on the user terminal 40, based on which an observation report in PDF format may be obtained and viewed from the server 30.
Specifically, for example, the management terminal 10 may send the observation report to the server 30 corresponding to the user mailbox, and the observation report is stored in the mailbox of the user account. When the user logs in the mailbox of the user through the user terminal 40, the observation report in the PDF format sent from the server 30 can be received, which is convenient for the user to view the observation report. The user account for which the management terminal 10 sends the detection report to the server 30 is a pre-associated user account, and may be set according to actual conditions.
It should be noted that the user terminal 40 may be, but is not limited to, a smart phone, a personal computer, a tablet computer, etc., and is not limited to this.
Fig. 4 is a block diagram of a data management apparatus 100 according to a preferred embodiment of the present invention. The data management device 100 provided by the present invention can be applied to the management terminal 10, and is used for executing the data management method, so as to improve the processing efficiency of the data to be processed, and facilitate the user to view the observation report obtained based on the data to be processed. The data management apparatus 100 may include an acquiring and writing unit 110, a first reading and writing unit 120, a second reading and writing unit 130, and a report generating unit 140.
The obtaining and writing unit 110 is configured to obtain data to be processed, and write the data to be processed into a message queue. Specifically, the acquisition writing unit 110 may be configured to execute step S210 shown in fig. 2, and the detailed operation content of the specific execution may refer to the detailed description of step S210.
Optionally, the fetch write unit 110 is configured to: the data to be processed is obtained from at least part of the data acquisition devices 20 in at least one of the data acquisition devices 20, wherein the data to be processed is associated with the identity of the data acquisition device 20.
A first reading and writing unit 120, configured to read the to-be-processed data from the message queue, and write the read to-be-processed data into a system form in the management terminal 10. Specifically, the first read/write unit 120 may be configured to perform step S220 shown in fig. 2, and the detailed operation content of the specific performance may refer to the detailed description of step S220.
The second read/write unit 130 is configured to, every first preset duration, use the to-be-processed data written into the system form within a second preset duration as target to-be-processed data, and write the target to-be-processed data into a temporary table, where the second preset duration is less than or equal to the first preset duration. Specifically, the second read/write unit 130 may be configured to perform step S230 shown in fig. 2, and the detailed operation content of the specific execution may refer to the detailed description of step S230.
The report generating unit 140 is configured to use variable data of the target to-be-processed data in the temporary table within a corresponding preset threshold range as to-be-drawn data, and generate an observation report according to the to-be-drawn data and a preset image generation policy, where the observation report includes a statistical graph corresponding to the to-be-drawn data. Specifically, the report generating unit 140 may be configured to execute step S240 shown in fig. 2, and the detailed operation content of the specific execution may refer to the detailed description of step S240.
From the above description of the embodiments, it is clear to those skilled in the art that the present invention can be implemented by hardware, or by software plus a necessary general hardware platform, and based on such understanding, the technical solution of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.), and includes several instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the method described in the embodiments of the present invention.
In summary, the present invention provides a data management method and apparatus. The data management method comprises the following steps: acquiring data to be processed, and writing the data to be processed into a message queue; reading data to be processed from the message queue, and writing the read data to be processed into a system form in the management terminal; taking the data to be processed written into the system form within a second preset time as target data to be processed every other first preset time, and writing the target data to be processed into a temporary table, wherein the second preset time is less than or equal to the first preset time; and taking variable data of variable data in the target data to be processed in the temporary table within a corresponding preset threshold value range as data to be drawn, and generating an observation report according to the data to be drawn and a preset image generation strategy, wherein the observation report comprises a statistical graph corresponding to the data to be drawn. According to the scheme, the obtained data to be processed is written into the message queue, so that the receiving of subsequent data is facilitated; the drawing speed is improved by drawing the target data to be processed in the temporary table; drawing is carried out based on the variable data within the corresponding preset threshold range, and abnormal data are filtered, so that the accuracy and the reliability of the data to be drawn are improved.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (9)

1. A data management method is applied to a management terminal, and is characterized by comprising the following steps:
acquiring data to be processed, and writing the data to be processed into a message queue;
reading the data to be processed from the message queue, and writing the read data to be processed into a system form in the management terminal, wherein the system form comprises at least one sub-form;
taking the data to be processed written into the system form within a second preset time as target data to be processed every other first preset time, and writing the target data to be processed into a temporary table, wherein the second preset time is less than or equal to the first preset time;
creating a sub-form every other third preset time length, and taking the sub-form as a target sub-form, wherein the target sub-form is used for writing the to-be-processed data read from the message queue from the time after the target sub-form is created to the time when a new sub-form is created, and the third preset time length is greater than or equal to the first preset time length;
and taking variable data of variable data in the target data to be processed in the temporary table within a corresponding preset threshold value range as data to be drawn, and generating an observation report according to the data to be drawn and a preset image generation strategy, wherein the observation report comprises a statistical graph corresponding to the data to be drawn.
2. The method according to claim 1, wherein the management terminal is in communication connection with at least one data acquisition device in the hydrological observation system, each data acquisition device is preset with an identity, and the step of obtaining the data to be processed comprises:
the data to be processed is obtained from at least part of the data acquisition devices in at least one data acquisition device, wherein the data to be processed is associated with the identity of the data acquisition device.
3. The method according to claim 1, wherein before the step of writing the read data to be processed into a system form in the management terminal, the method further comprises:
and judging whether the management terminal has the target sub-form or not, and if not, creating the target sub-form.
4. The method according to claim 1, wherein the step of using variable data of the target data to be processed in the temporary table within a corresponding preset threshold range as the data to be plotted comprises:
and converting the variable data of the target data to be processed in the temporary table within the corresponding preset threshold value range into variable data in the JSON format, and taking the variable data in the JSON format as the data to be drawn.
5. The method of claim 1, wherein the management terminal is communicatively connected to a server that is pre-configured with a user account, and wherein the method further comprises:
and converting the observation report into an observation report in a PDF format, and sending the observation report in the PDF format to the server.
6. The method according to any one of claims 1 to 5, wherein after the step of generating an observation report according to the data to be plotted and a preset image generation strategy, the method further comprises:
and clearing the target data to be processed in the temporary table.
7. The method of claim 1, wherein the statistical map comprises: at least one statistical graph selected from bar statistical graph, broken line statistical graph, pictographic statistical graph and sector statistical graph.
8. A data management apparatus applied to a management terminal, the data management apparatus comprising:
the acquisition writing unit is used for acquiring data to be processed and writing the data to be processed into a message queue;
the first reading and writing unit is used for reading the data to be processed from the message queue and writing the read data to be processed into a system form in the management terminal, and the system form comprises at least one sub-form;
the second reading and writing unit is used for taking the data to be processed written into the system form within a second preset time as target data to be processed every other first preset time, and writing the target data to be processed into a temporary table, wherein the second preset time is less than or equal to the first preset time;
the second reading and writing unit is further configured to create a sub-form every third preset duration, and use the sub-form as a target sub-form, where the target sub-form is used to write the to-be-processed data read from the message queue during a period from when the target sub-form is created to when a new sub-form is created, where the third preset duration is greater than or equal to the first preset duration;
and the report generating unit is used for taking variable data of the variable data in the target data to be processed in the temporary table within a corresponding preset threshold range as data to be drawn, and generating an observation report according to the data to be drawn and a preset image generation strategy, wherein the observation report comprises a statistical graph corresponding to the data to be drawn.
9. The data management device according to claim 8, wherein the management terminal is in communication connection with at least one data acquisition device in the hydrological observation system, each data acquisition device is preset with an identity, and the acquisition writing unit is configured to:
the data to be processed is obtained from at least part of the data acquisition devices in at least one data acquisition device, wherein the data to be processed is associated with the identity of the data acquisition device.
CN201810046305.4A 2018-01-17 2018-01-17 Data management method and device Active CN108287890B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810046305.4A CN108287890B (en) 2018-01-17 2018-01-17 Data management method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810046305.4A CN108287890B (en) 2018-01-17 2018-01-17 Data management method and device

Publications (2)

Publication Number Publication Date
CN108287890A CN108287890A (en) 2018-07-17
CN108287890B true CN108287890B (en) 2020-05-26

Family

ID=62835362

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810046305.4A Active CN108287890B (en) 2018-01-17 2018-01-17 Data management method and device

Country Status (1)

Country Link
CN (1) CN108287890B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110417901B (en) * 2019-07-31 2022-04-29 北京金山云网络技术有限公司 Data processing method and device and gateway server
CN115857826B (en) * 2022-12-27 2023-09-22 铭派技术开发有限公司 Ship industrial control software data storage and display system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101677278A (en) * 2008-09-17 2010-03-24 中兴通讯股份有限公司 Method and system for monitoring availability of network information system
CN102402209A (en) * 2010-09-14 2012-04-04 广州致远电子有限公司 Embedded data acquisition and equipment control system
CN104331505A (en) * 2014-11-20 2015-02-04 合一网络技术(北京)有限公司 Distributed acquisition and storage-based monitoring system
CN104931101A (en) * 2015-06-29 2015-09-23 南京邮电大学 Android-based multi-index real-time environment monitoring terminal system, and method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10754867B2 (en) * 2016-04-08 2020-08-25 Bank Of America Corporation Big data based predictive graph generation system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101677278A (en) * 2008-09-17 2010-03-24 中兴通讯股份有限公司 Method and system for monitoring availability of network information system
CN102402209A (en) * 2010-09-14 2012-04-04 广州致远电子有限公司 Embedded data acquisition and equipment control system
CN104331505A (en) * 2014-11-20 2015-02-04 合一网络技术(北京)有限公司 Distributed acquisition and storage-based monitoring system
CN104931101A (en) * 2015-06-29 2015-09-23 南京邮电大学 Android-based multi-index real-time environment monitoring terminal system, and method

Also Published As

Publication number Publication date
CN108287890A (en) 2018-07-17

Similar Documents

Publication Publication Date Title
US9880012B2 (en) Hybrid road network and grid based spatial-temporal indexing under missing road links
CN106886588B (en) Method and system for displaying weather information on a timeline
CN111212383B (en) Method, device, server and medium for determining number of regional permanent population
Cash et al. Sampling variability and the changing ENSO–monsoon relationship
CN109326087B (en) Urban waterlogging early warning method and device based on drainage pipe network monitoring
CN108287890B (en) Data management method and device
CN104462606A (en) Method for determining diagnosis treatment measures based on log data
CN110516129B (en) Data processing method and device
CN109191408B (en) Rapid circulation ground weather fusion method and device and server
Leung et al. Integration of air pollution data collected by mobile sensors and ground-based stations to derive a spatiotemporal air pollution profile of a city
CN107608630B (en) Data reading and writing method and device
US8624732B2 (en) Providing access to quality indicators for natural resources
CN112883765B (en) Target movement track acquisition method and device, storage medium and electronic equipment
CN116308106A (en) Method and device for processing scene data in flood prevention emergency and computer equipment
JP5563683B1 (en) ENVIRONMENTAL INFORMATION PROVIDING DEVICE AND PROGRAM
US8687018B1 (en) Collection and confirmation of place metadata and graphic representations of fixed objects displayed in a mapping system
CN111611337B (en) Terminal data processing system
CN115374109A (en) Data access method, device, computing equipment and system
CN113887813A (en) Typhoon disaster early warning method and device, server and storage medium
CN114385468A (en) Log analysis method, system and related components
CN113064895A (en) Incremental updating method, device and system for map
JP2012164018A (en) Tag recommendation device
CN116046809B (en) Mountain soil water information acquisition method and device, storage medium and electronic equipment
CN111126120A (en) Urban area classification method, device, equipment and medium
CN110858341A (en) Index monitoring method, device, equipment and medium based on distributed storage system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20200528

Address after: 730000 No.318, Donggang West Road, Chengguan District, Lanzhou City, Gansu Province

Patentee after: NORTHWEST INSTITUTE OF ECO-ENVIRONMENT AND RESOURCES, CAS

Address before: 730000 Gansu city of Lanzhou province Donggang West Road No. 320

Patentee before: Institute of environment and Engineering in cold and dry areas, Chinese Academy of Sciences