Multi-protocol water resource monitoring data format conversion method
Through the multi-protocol water resource monitoring data format conversion method, the conflict problem during multi-protocol format conversion is solved, the accurate conversion and stable transmission of data formats are realized, and the effective collection and processing of water resource monitoring data is ensured.
Patent Information
- Application Number
- CN202411699984.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-03-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When converting existing water resource monitoring data formats, multi-protocol formats are prone to conflicts, resulting in unsmooth data collection, conversion and transmission processes, and the target format is not accurate.
It provides a multi-protocol water resource monitoring data format conversion method, including steps such as data reading, data preprocessing, format conversion, data writing, multi-protocol interconnection and error processing, supports conversion between multiple data formats, and realizes data acquisition and conversion in the format converter box.
By separately processing source data format and target data format, avoid protocol conflicts, ensure the accuracy and stability of data format conversion, and achieve the smooth completion of data collection, conversion and transmission.
Smart Images

Figure HDA0005153035510000011 
Figure HDA0005153035510000021 
Figure HDA0005153035510000031
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data conversion, and in particular to a multi-protocol water resources monitoring data format conversion method. Background Art
[0002] The water resources monitoring system is a real-time monitoring system, which mainly includes on-site terminal acquisition equipment, data transmission equipment, management center software and other parts. It is used to monitor key hydrological information such as water quantity, water level and water quality. Water resources monitoring will generate various monitoring data during work.
[0003] In the field of monitoring, monitoring components usually actively push data to the monitoring system or passively pull data from the monitoring system. Whether actively pushing or passively pulling data, the monitoring component should be compatible with the monitoring system. In other words, in the current processing of monitoring data, one monitoring component is paired with one monitoring system. However, as the number of monitoring systems increases, more and more monitoring components need to be developed to pair with them. This is obviously not a very economical way, so the format of the monitoring data needs to be converted accordingly.
[0004] The existing water resource monitoring data on the market is divided into collection end data and target monitoring data formats. Since there are many different protocols for monitoring data, conflicts are likely to occur during the data format conversion process, which can easily lead to the inability to smoothly complete the format conversion of the data to be converted during the data collection, data conversion, and data transmission processes, and the accuracy of the target format is also poor.
[0005] Therefore, it is necessary to provide a multi-protocol water resources monitoring data format conversion method to solve the above technical problems. Summary of the invention
[0006] The present invention provides a multi-protocol water resource monitoring data format conversion method, which solves the problem in the related art that multi-protocol monitoring formats are prone to conflict during conversion, resulting in poor accuracy of the target format.
[0007] In order to solve the above technical problems, the multi-protocol water resources monitoring data format conversion method provided by the present invention comprises the following steps:
[0008] Step S1: Data reading, responsible for receiving and reading the source data file, judging the type of the read file according to the parameters passed in by the external call, and then calling the corresponding reading function;
[0009] Supported formats: including but not limited to text files, binary files, netCDF files, etc.
[0010] Can read various water resources monitoring data (water volume monitoring data, water level monitoring data, water quality monitoring data, other related information, etc.);
[0011] Step S2: Data preprocessing (sometimes it may be part of the data reading module or exist independently), preprocessing the read data, such as data cleaning, data conversion, etc., to ensure the consistency and accuracy of the data before format conversion;
[0012] Step S3: Format conversion, completing the conversion from the source data format to the target data format, calling the data reading module to read the data, then converting the data according to the requirements of the target format, and finally outputting the converted data;
[0013] Supported conversion types: including conversion between different data formats, such as from CSV to JSON, or from binary to text, etc.
[0014] Convert monitoring data from one format to another, paramsource_data: source data, usually a list containing dictionaries, each dictionary represents a monitoring data point;
[0015] :paramtarget_format: target format, which can be 'json_string' (default), 'csv_string' or other custom formats;
[0016] :return: The converted data, the specific format depends on the target_format parameter;
[0017] Step S4: Data writing, storing the data after format conversion into a file of a specified format, which is similar to the data reading module, but the operation is opposite, that is, writing the data into the target file;
[0018] Supported formats: correspond to the formats supported by the data reading module to ensure that the converted data can be stored;
[0019] Step S5: multi-protocol interconnection, realizing the interconnection between the target data format and the converted data, and the data can be converted and exported according to the target format;
[0020] Step S6: During the data preprocessing and format conversion process, the user is allowed to configure and modify the rules and parameters of the data format conversion;
[0021] Step S7: Error handling, handling errors that may occur during the data format conversion process.
[0022] Preferably, when the water resources monitoring data format is converted, it is all implemented in the format conversion box;
[0023] The format converter box is located on a carrier plate, and a multi-protocol writer box is installed on the upper surface of the carrier plate and located on one side of the format converter box. The interior of the format converter box includes a reading module, the reading module is electrically connected to a processing module through a wire, the processing module is electrically connected to a conversion module through a wire, the processing module and the conversion module are both electrically connected to a management module through a wire, the conversion module is electrically connected to a writing module through a wire, the writing module is electrically connected to a storage module through a wire, and the storage module is electrically connected to a correction module through a wire.
[0024] Preferably, the reading module, the processing module, the conversion module, the writing module and the storage module are electrically connected in series, and the management module, the conversion module and the processing module are electrically connected in parallel.
[0025] Preferably, the storage module and the correction module are electrically interconnected, and the storage module and the multi-protocol writing box are electrically connected in series.
[0026] Preferably, it also includes an optical fiber line;
[0027] A positioning component, a shielding component and a limiting component are arranged above the carrier plate and on the opposite side of the format conversion box and the multi-protocol writing box;
[0028] Flexible wires are fixedly arranged at both left and right ends of the optical fiber line, the positioning assembly comprises a mounting frame fixedly arranged on the upper surface of the carrier plate, the outer wall of the mounting frame is rotatably connected to the first clamping plate and the second clamping plate through a coil spring, the interior of the mounting frame and the bottom keyway of the first clamping plate is connected to the first gear, the interior of the mounting frame and the bottom of the first gear is rotatably connected to the second gear, the upper and lower sides of the second gear are meshedly connected to the first rack and the second rack, the side wall of the first rack is fixedly arranged with a first connecting rod, and the side wall of the second rack is fixedly arranged with a second connecting rod;
[0029] The shielding assembly comprises two flexible frames, and the outer walls of the two flexible frames are fixed with shielding curtains;
[0030] The limiting assembly comprises a mounting plate fixedly arranged on the upper surface of the supporting plate, and the outer wall of the mounting plate is rotatably connected to two limiting plates via a coil spring.
[0031] Preferably, the first gear and the second gear are meshed with each other, the first rack and the second rack are slidably connected to the mounting frame, and the first connecting rod and the second connecting rod are fixedly connected to the two flexible frames.
[0032] Preferably, the correction module includes a judgment module, and the judgment module is electrically connected to the target format writing through a wire;
[0033] The management module includes a classification module, and the classification module is electrically connected to the display module and the processor through a wire.
[0034] Preferably, the judgment module, the target format writing and storage module are electrically connected in parallel, and the judgment module, the processing module and the storage module are electrically connected in series;
[0035] The classification module, the display module and the processor are electrically connected in parallel, and the classification module can be classified into date classification, time period classification and character classification.
[0036] Compared with the related art, the multi-protocol water resources monitoring data format conversion method provided by the present invention has the following beneficial effects:
[0037] The water resource monitoring data collected from various data are processed through the reading module, and finally converted by the conversion module, and finally five common protocol formats on the market are obtained. The data collection and conversion are realized in the format conversion box, and the converted target format data is exported in the multi-protocol writing box, so that the source data format and the target data format are processed separately. Secondly, a single-port design is adopted between each protocol. Therefore, such a design ensures that there will be no conflicts between interrupts. Through the whole process of data collection, data conversion, and data sending, the format conversion of the data to be converted is successfully completed, and the accuracy of the target data obtained by the format conversion is guaranteed. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying creative work.
[0039] Figure 1 A schematic diagram of a monitoring data format conversion method provided by the present invention;
[0040] Figure 2 A schematic diagram of the best structure provided by the present invention;
[0041] Figure 3 for Figure 2 The schematic diagram of the working process of each component inside the format conversion box shown;
[0042] Figure 4 for Figure 2 The schematic diagram of the general structure of the limiting assembly and the optical fiber line shown;
[0043] Figure 5 for Figure 4 The enlarged structural diagram of point A shown;
[0044] Figure 6 for Figure 4 and Figure 5 The optical fiber line shown is a schematic diagram of the installation state without the positioning component and the shielding component;
[0045] Figure 7 for Figure 6 The schematic diagram of the installation status of the optical fiber line, the positioning component and the shielding component shown;
[0046] Figure 8 for Figure 3 The schematic diagram of the correction module workflow shown;
[0047] Fig. 9 for Figure 3 The management module workflow diagram is shown.
[0048] Description of Figure Numbers:
[0049] 1. Support plate;
[0050] 2. Format conversion box;
[0051] 3. Multi-protocol writing box;
[0052] 4. Optical fiber cable, 5. Flexible cable;
[0053] 6. Positioning assembly, 61. Mounting frame, 62. First card plate, 63. Second card plate, 64. First gear, 65. Second gear, 66. First rack, 67. Second rack, 68. First connecting rod, 69. Second connecting rod;
[0054] 7. Shielding assembly, 71. Flexible frame, 72. Shielding curtain;
[0055] 8. Limiting assembly, 81. Mounting plate, 82. Limiting plate;
[0056] 9. Reading module, 10. Processing module, 11. Converting module, 12. Writing module, 13. Storage module;
[0057] 14. Correction module, 141. Judgment module, 142. Target format writing;
[0058] 15. Management module, 151. Classification module, 152. Display module, 153. Processor.
[0059] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0060] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0061] The invention provides a multi-protocol water resources monitoring data format conversion method.
[0062] First embodiment:
[0063] See also Figures 1 to 3 :A multi-protocol water resources monitoring data format conversion method, characterized in that it includes the following steps:
[0064] Step S1: Data reading, responsible for receiving and reading the source data file, judging the type of the read file according to the parameters passed in by the external call, and then calling the corresponding reading function;
[0065] Supported formats: including but not limited to text files, binary files, netCDF files, etc.
[0066] Can read various water resources monitoring data (water volume monitoring data, water level monitoring data, water quality monitoring data, other related information, etc.);
[0067] Step S2: Data preprocessing (sometimes it may be part of the data reading module or exist independently), preprocessing the read data, such as data cleaning, data conversion, etc., to ensure the consistency and accuracy of the data before format conversion;
[0068] Step S3: Format conversion, completing the conversion from the source data format to the target data format, calling the data reading module to read the data, then converting the data according to the requirements of the target format, and finally outputting the converted data;
[0069] Supported conversion types: including conversion between different data formats, such as from CSV to JSON, or from binary to text, etc.
[0070] Convert monitoring data from one format to another, paramsource_data: source data, usually a list containing dictionaries, each dictionary represents a monitoring data point;
[0071] :paramtarget_format: target format, which can be 'json_string' (default), 'csv_string' or other custom formats;
[0072] :return: The converted data, the specific format depends on the target_format parameter;
[0073] Step S4: Data writing, storing the data after format conversion into a file of a specified format, which is similar to the data reading module, but the operation is opposite, that is, writing the data into the target file;
[0074] Supported formats: correspond to the formats supported by the data reading module to ensure that the converted data can be stored;
[0075] Step S5: multi-protocol interconnection, realizing the interconnection between the target data format and the converted data, and the data can be converted and exported according to the target format;
[0076] Step S6: During the data preprocessing and format conversion process, the user is allowed to configure and modify the rules and parameters of the data format conversion;
[0077] Step S7: Error handling, handling errors that may occur during the data format conversion process.
[0078] In step S3, in the specific conversion format, the user can perform programming operations through Python;
[0079] Clarify the source data format and the target data format. Monitoring data usually contains information such as timestamp, metric name, metric value, etc. The following is a simple example showing how to convert one monitoring data format (for example, a list of dictionaries, each dictionary represents a data point) to another format (for example, a string in a specific format for logging or reporting).
[0080] In step S1, water quantity monitoring, water quantity monitoring mainly focuses on the changes in the quantity of water resources, including: precipitation: monitoring precipitation is helpful to understand the water resource replenishment;
[0081] Evaporation: Monitoring evaporation from water bodies helps assess water resource losses;
[0082] Runoff: Monitoring the flow changes of surface water bodies such as rivers and lakes helps predict water supply capacity and formulate scheduling plans;
[0083] Water level monitoring;
[0084] Water level monitoring records the changes in the water surface height of lakes, rivers and other surface water bodies, which is of great significance for flood prevention and disaster reduction, water resources scheduling, etc. By monitoring water level data in real time, the risk and scale of floods can be predicted, providing valuable time and space for flood prevention and disaster reduction work;
[0085] Water quality monitoring;
[0086] Water quality monitoring is an important part of water resource monitoring. It mainly detects the content of pollutants in water, such as heavy metal ions, organic matter, etc., as well as conventional indicators (such as pH value, dissolved oxygen, temperature, transparency, etc.).
[0087] When the water resources monitoring data format is converted, it is all realized in the format conversion box 2;
[0088] The format converter box 2 is located on a carrier plate 1, and a multi-protocol writer box 3 is installed on the upper surface of the carrier plate 1 and on one side of the format converter box 2. The interior of the format converter box 2 includes a reading module 9, and the reading module 9 is electrically connected to a processing module 10 through a wire, and the processing module 10 is electrically connected to a conversion module 11 through a wire, and the processing module 10 and the conversion module 11 are both electrically connected to a management module 15 through a wire, and the conversion module 11 is electrically connected to a writing module 12 through a wire, and the writing module 12 is electrically connected to a storage module 13 through a wire, and the storage module 13 is electrically connected to a correction module 14 through a wire.
[0089] The reading module 9 , the processing module 10 , the conversion module 11 , the writing module 12 and the storage module 13 are electrically connected in series, and the management module 15 , the conversion module 11 and the processing module 10 are electrically connected in parallel.
[0090] The storage module 13 and the correction module 14 are electrically interconnected, and the storage module 13 and the multi-protocol writing box 3 are electrically connected in series.
[0091] Please combine Figure 3 : During the working process, the reading module 9 is used for step S1, the processing module 10 is used for step S2, the conversion module 11 is used for step S3, and the writing module 12 is used for step S4;
[0092] Finally, the data conversion of five protocol ports is realized:
[0093] ONVIF: ONVIF is an open industry standard organization formed by multiple network video equipment manufacturers. It provides a set of interface standards for interoperability between network video products, allowing different brands of surveillance cameras, recorders, video management platforms, etc. to be seamlessly integrated;
[0094] RTSP port: RTSP is a protocol used to control streaming media servers. It allows clients to connect to streaming media servers through the network to achieve real-time audio and video streaming. In monitoring systems, RTSP protocol is often used to control surveillance cameras to transmit real-time video streams to monitoring centers or clients. RTSP protocol supports multiple transmission methods, including UDP, TCP, etc., and is suitable for different network environments and application scenarios.
[0095] TCP / IP port: TCP / IP is a set of widely used communication protocols that form the basis of the Internet and local area networks.
[0096] HTTP port: HTTP is a protocol for transmitting hypertext between computers and is widely used in Web communications. Some surveillance cameras also support the HTTP protocol and obtain video streams or control camera-related parameters through HTTP requests.
[0097] SIP port: SIP is a protocol used to control multimedia communication sessions. It is widely used in VoIP (Voice over IP) and video communication fields. In the monitoring system, the SIP protocol can be used to implement real-time video communication functions, such as remote monitoring, video conferencing, etc. The SIP protocol supports multiple media types, including audio, video and data, and can meet complex monitoring needs.
[0098] In this embodiment, the water resource monitoring data collected from various data are processed through the reading module 9, and finally converted by the conversion module 11, and finally five protocol formats commonly used on the market are obtained. The data collection and conversion are realized in the format conversion box 2, and the converted target format data is exported in the multi-protocol writing box 3. In this way, the source data format and the target data format are processed separately. Secondly, a single-port design is adopted between each protocol. Therefore, such a design ensures that there will be no conflicts between interrupts. Through the whole process of data collection, data conversion, and data sending, the format conversion of the data to be converted is successfully completed, and the accuracy of the target data obtained by the format conversion is guaranteed.
[0099] Second embodiment:
[0100] See also Figures 4 to 7 , further comprising an optical fiber line 4;
[0101] A positioning component 6, a shielding component 7 and a limiting component 8 are arranged above the carrier plate 1 and on the opposite side of the format conversion box 2 and the multi-protocol writing box 3;
[0102] Flexible wires 5 are fixedly arranged at both left and right ends of the optical fiber line 4. The positioning assembly 6 comprises a mounting frame 61 fixedly arranged on the upper surface of the carrier plate 1. The outer walls of the mounting frame 61 are rotatably connected to a first clamping plate 62 and a second clamping plate 63 through coil springs respectively. A first gear 64 is connected to the bottom keyway of the first clamping plate 62 inside the mounting frame 61. A second gear 65 is rotatably connected to the inside of the mounting frame 61 and located below the first gear 64. A first rack 66 and a second rack 67 are meshedly connected to the upper and lower sides of the second gear 65. A first connecting rod 68 is fixedly arranged on the side wall of the first rack 66. A second connecting rod 69 is fixedly arranged on the side wall of the second rack 67.
[0103] The shielding assembly 7 includes two flexible frames 71, and the outer walls of the two flexible frames 71 are fixed with shielding curtains 72;
[0104] The limiting assembly 8 comprises a mounting plate 81 fixed to the upper surface of the carrier plate 1 , and the outer wall of the mounting plate 81 is rotatably connected to two limiting plates 82 via a coil spring.
[0105] Please combine Figure 4 and Figure 5 : When the user needs to export the converted target data format, the user needs to use the optical fiber line 4 for data transmission. During installation, the bottom of the optical fiber line 4 and the two limit plates 82 need to be proofread first, and the optical fiber line 4 needs to be pressed after proofreading.
[0106] Please combine Figure 6 : When the optical fiber line 4 is not installed, the positioning component 6 and the shielding component 7 are both in the retracted state.
[0107] Please combine Figure 5 and Figure 7 When the user presses the optical fiber line 4, the bottom of the optical fiber line 4 will contact the arc surface on the first card plate 62 and the second card plate 63. When receiving the pressure from the upper side, it will drive the first card plate 62 and the second card plate 63 to rotate relative to each other and unfold, ensuring the smooth passage of the optical fiber line 4, and when the first card plate 62 rotates clockwise, it will synchronously drive the first gear 64 to rotate clockwise, and the clockwise rotating first gear 64 will mesh and control the second gear 65 to rotate counterclockwise. At this time, the counterclockwise rotating second gear 65 will mesh and transmit the upper and lower first racks 66 and the second gear 65 to control the first connecting rod 68 and the second connecting rod 69 to drive the two flexible frames 71 to follow the first card plate 62 and the second card plate 63 to move away from each other and separate, ensuring that the optical fiber line 4 can enter the first card plate 62 and the second card plate 63. Finally, when the optical fiber line 4 enters the first card plate 62 and the second card plate 63, the flexible frame 71 will drive its external shielding curtain 72 to fit on the optical fiber line 4.
[0108] It should be noted that the shielding curtain 72 can use metal shielding materials (such as copper foil, aluminum foil, etc.) to wrap or cover the interference source, which can block the propagation of the electromagnetic field, thereby reducing interference;
[0109] The flexible frame 71 can be made of soft plastic with good elasticity.
[0110] The first gear 64 and the second gear 65 are meshed with each other, the first rack 66 and the second rack 67 are slidably connected to the mounting frame 61 , and the first connecting rod 68 and the second connecting rod 69 are fixedly connected to the two flexible frames 71 .
[0111] This embodiment: Compared with the traditional wireless data connection design, this case adopts optical fiber line 4 for connection, and uses flexible line 5 that is freely distributed between format conversion box 2 and multi-protocol writing box 3 and plugged into the required target format socket. The data transmission of optical fiber line 4 is more accurate and stable. Secondly, optical fiber line 4 can also be positioned and engaged to meet the installation requirements of different wiring harnesses. At the same time, during the installation of optical fiber line 4, a shielding curtain 72 will be generated to cover the optical fiber line 4, which plays a role in signal shielding, and can prevent data from being interfered by external interference signals during transmission, thereby ensuring further stability of transmission.
[0112] Third embodiment:
[0113] See also Figure 3 , Figure 8 and Fig. 9 The correction module 14 includes a judgment module 141, and the judgment module 141 is electrically connected to a target format writing module 142 through a wire;
[0114] The management module 15 includes a classification module 151 , and the classification module 151 is electrically connected to a display module 152 and a processor 153 via wires.
[0115] The judgment module 141, the target format writing 142 and the storage module 13 are electrically connected in parallel, and the judgment module 141, the processing module 10 and the storage module 13 are electrically connected in series;
[0116] The classification module 151 , the display module 152 and the processor 153 are electrically connected in parallel, and the classification module 151 can be classified into date classification, time period classification and character classification.
[0117] See also Figure 8 : Whatever target format the user needs to convert, the format needs to be written in the target format writing 142 and enter the judgment module 141. The converted format data will enter the judgment module 141 from the storage module 13. The judgment module 141 will judge and compare the target data format and the converted data format. After the comparison is completed, if the formats of both are correct, they will enter the storage module 13 again for storage. The user can use the optical fiber line 4 to write the data later. If the formats of both are incorrect, they will enter the processing module 10 again for re-conversion and processing.
[0118] See also Fig. 9 : The management module 15 is mainly used for the management of source format data, and can classify and manage the date, time period and character of water resources in order, which can be intuitively observed through the display module 152.
[0119] In this embodiment, during the process of the first embodiment, the present invention is designed with a management module 15 and a correction module 14, which can pre-judge and compare the source format data and the target format data during the data format conversion process, thereby avoiding the occurrence of incorrect formats during conversion and stopping losses in time. Secondly, a management module 15 is also provided, which can be used for the classification and management of various data.
[0120] Please refer to Figures 1 to 9 The working principle of the multi-protocol water resources monitoring data format conversion method provided by the present invention is as follows:
[0121] In step S1, in the specific conversion format, the user can perform programming operations through Python to specify the source data format and the target data format. Monitoring data usually contains information such as timestamp, indicator name, indicator value, etc. The following is a simple example showing how to convert one monitoring data format (for example, a list containing dictionaries, each dictionary represents a data point) to another format (for example, a string in a specific format for logging or reporting);
[0122] Supported conversion types: including conversion between different data formats, such as from CSV to JSON, or from binary to text, etc.
[0123] Convert monitoring data from one format to another, paramsource_data: source data, usually a list containing dictionaries, each dictionary represents a monitoring data point;
[0124] :paramtarget_format: Target format, can be 'json_string' (default), 'csv_string' or other custom formats.
[0125] :return: The converted data, the specific format depends on the target_format parameter.
[0126] Step S2, when writing the target format data, when the user presses the optical fiber line 4, the bottom of the optical fiber line 4 will contact the arc surface on the first card plate 62 and the second card plate 63, and when receiving the pressure from above, it will drive the first card plate 62 and the second card plate 63 to rotate and unfold relative to each other, so as to ensure the smooth passage of the optical fiber line 4, and when the first card plate 62 rotates clockwise, it will synchronously drive the first gear 64 to rotate clockwise, and the clockwise rotating first gear 64 will mesh with the second gear 65 to rotate counterclockwise, and at this time, the counterclockwise rotating second gear 65 will mesh with the transmission of the upper and lower first gears. The rack 66 and the second gear 65 control the first connecting rod 68 and the second connecting rod 69 to drive the two flexible frames 71 to separate as the first card plate 62 and the second card plate 63 move away from each other, ensuring that the optical fiber line 4 can enter the first card plate 62 and the second card plate 63. When the optical fiber line 4 finally enters the first card plate 62 and the second card plate 63, the flexible frame 71 will drive the external shielding curtain 72 to fit on the optical fiber line 4. The shielding curtain 72 can use metal shielding materials (such as copper foil, aluminum foil, etc.) to wrap or cover the interference source, which can block the propagation of the electromagnetic field and thus reduce interference.
[0127] The above description is only a preferred embodiment of the present invention, and does not limit the patent scope of the present invention. All equivalent structural changes made by using the contents of the present invention specification and drawings under the concept of the present invention, or directly / indirectly applied in other related technical fields are included in the patent protection scope of the present invention.
Claims
1. A multi-protocol water resources monitoring data format conversion method, characterized in that: The following steps are involved: Step S1: Data reading, responsible for receiving and reading the source data file, judging the type of the read file according to the parameters passed in by the external call, and then calling the corresponding reading function; Supported formats: including but not limited to text files, binary files, netCDF files, etc. Can read various water resources monitoring data (water volume monitoring data, water level monitoring data, water quality monitoring data, other related information, etc.); Step S2: Data preprocessing (sometimes as part of the data reading module or separately), Preprocess the read data, such as data cleaning and data conversion, to ensure the consistency and accuracy of the data before format conversion; Step S3: Format conversion, completing the conversion from the source data format to the target data format, calling the data reading module to read the data, then converting the data according to the requirements of the target format, and finally outputting the converted data; Supported conversion types: including conversion between different data formats, such as from CSV to JSON, or from binary to text, etc. Convert monitoring data from one format to another, paramsource_data: source data, usually a list containing dictionaries, each dictionary represents a monitoring data point; :paramtarget_format: target format, which can be 'json_string' (default), 'csv_string' or other custom formats; :return: The converted data, the specific format depends on the target_format parameter; Step S4: Data writing, storing the data after format conversion into a file of a specified format, which is similar to the data reading module, but the operation is opposite, that is, writing the data into the target file; Supported formats: correspond to the formats supported by the data reading module to ensure that the converted data can be stored; Step S5: multi-protocol interconnection, realizing the interconnection between the target data format and the converted data, and the data can be converted and exported according to the target format; Step S6: During the data preprocessing and format conversion process, the user is allowed to configure and modify the rules and parameters of the data format conversion; Step S7: Error handling, handling errors that may occur during the data format conversion process.
2. The multi-protocol water resource monitoring data format conversion method according to claim 1 is characterized in that: The multi-protocol water resource monitoring data format conversion steps S1 to S4, step S6 and step S7 are all implemented in the format conversion box when the water resource monitoring data format is converted; The format converter box is located on a carrier plate, and a multi-protocol writer box is installed on the upper surface of the carrier plate and located on one side of the format converter box. The interior of the format converter box includes a reading module, the reading module is electrically connected to a processing module through a wire, the processing module is electrically connected to a conversion module through a wire, the processing module and the conversion module are both electrically connected to a management module through a wire, the conversion module is electrically connected to a writing module through a wire, the writing module is electrically connected to a storage module through a wire, and the storage module is electrically connected to a correction module through a wire.
3. The multi-protocol water resource monitoring data format conversion method according to claim 2 is characterized in that: The reading module, the processing module, the conversion module, the writing module and the storage module are electrically connected in series, and the management module, the conversion module and the processing module are electrically connected in parallel.
4. The multi-protocol water resource monitoring data format conversion method according to claim 2 is characterized in that: The storage module and the correction module are electrically interconnected, and the storage module and the multi-protocol writing box are electrically connected in series.
5. The multi-protocol water resource monitoring data format conversion method according to claim 2 is characterized in that: It also includes fiber optic cables; A positioning component, a shielding component and a limiting component are arranged above the carrier plate and on the opposite side of the format conversion box and the multi-protocol writing box; Flexible wires are fixedly arranged at both left and right ends of the optical fiber line, the positioning assembly comprises a mounting frame fixedly arranged on the upper surface of the carrier plate, the outer wall of the mounting frame is rotatably connected to the first clamping plate and the second clamping plate through a coil spring, the interior of the mounting frame and the bottom keyway of the first clamping plate is connected to the first gear, the interior of the mounting frame and the bottom of the first gear is rotatably connected to the second gear, the upper and lower sides of the second gear are meshedly connected to the first rack and the second rack, the side wall of the first rack is fixedly arranged with a first connecting rod, and the side wall of the second rack is fixedly arranged with a second connecting rod; The shielding assembly comprises two flexible frames, and the outer walls of the two flexible frames are fixed with shielding curtains; The limiting assembly comprises a mounting plate fixedly arranged on the upper surface of the supporting plate, and the outer wall of the mounting plate is rotatably connected to two limiting plates via a coil spring.
6. The multi-protocol water resource monitoring data format conversion method according to claim 5 is characterized in that: The first gear and the second gear are meshed with each other, the first rack and the second rack are slidably connected to the mounting frame, and the first connecting rod and the second connecting rod are fixedly connected to the two flexible frames.
7. The multi-protocol water resource monitoring data format conversion method according to claim 2 is characterized in that: The correction module includes a judgment module, and the judgment module is electrically connected to a target format writing through a wire; The management module includes a classification module, and the classification module is electrically connected to the display module and the processor through a wire.
8. The multi-protocol water resource monitoring data format conversion method according to claim 7 is characterized in that: The judgment module, the target format writing and storage module are electrically connected in parallel, and the judgment module, the processing module and the storage module are electrically connected in series; The classification module, the display module and the processor are electrically connected in parallel, and the classification module can be classified into date classification, time period classification and character classification.