Ship equipment parameter acquisition method and device, electronic equipment and storage medium

By adopting the combination of multi-source acquisition protocol and parameter cache pool in smart ships, combined with compression and serialization processing, the demand for second-level data acquisition frequency of smart ships is solved, the acquisition efficiency and transmission efficiency are improved, and the hardware cost is reduced.

CN120223684APending Publication Date: 2025-06-27SHANGHAI MERCHANT SHIP DESIGN & RES INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510359920.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-25
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

It is difficult to achieve the second-level frequency requirements for ship data acquisition during navigation by intelligent ships. The existing serial communication protocol has poor real-time performance and high hardware requirements, so it cannot meet the second-level data acquisition of tens of thousands of signal points.

Method used

The ship equipment parameters are obtained based on the preset multi-source acquisition protocol, combined with the historical data in the parameter cache pool for consistency comparison, and the data volume is reduced through preset compression, and finally the data is serialized to improve transmission efficiency.

Benefits of technology

It improves the efficiency of the acquisition of ship equipment parameters, ensures the acquisition frequency in seconds, reduces hardware costs, and optimizes the data transmission efficiency through compression and serialization processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120223684A_ABST
    Figure CN120223684A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a ship equipment parameter acquisition method and device, electronic equipment and a storage medium. The method comprises the following steps: acquiring current ship equipment parameters of each sensor on a target ship at a current parameter acquisition moment based on a preset multi-source acquisition protocol; consistency comparison is carried out based on the current ship equipment parameters and historical ship equipment parameters in a parameter cache pool, and first ship equipment parameters corresponding to the target ship are determined; compressing the first ship equipment parameter based on a preset compression mode, and determining a second ship equipment parameter corresponding to the target ship; and performing serialization processing on each second ship equipment parameter corresponding to the continuous parameter acquisition time in the preset parameter packaging period, and determining a target ship equipment parameter corresponding to the target ship. According to the technical scheme of the embodiment of the invention, the collection efficiency of the ship equipment parameters is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the technical field of data acquisition, and in particular, to a method, device, electronic device and storage medium for collecting parameters of ship equipment. Background Art

[0002] With the development of technology, the collection frequency of Internet of Things (IoT) data is becoming more and more important. As a special case of IoT data collection, intelligent ships are characterized by their larger volume compared to other industrial equipment, more distributed sensors, and as the hull size increases and the number of sensors increases, the data collection frequency will decrease accordingly, and the requirements for data collection hardware equipment will increase accordingly.

[0003] Currently, during the navigation of intelligent ships, serial communication protocols (Modbus) are usually used to collect ship data. However, due to the unpredictability of sea navigation, intelligent ships have requirements for second-level frequency of ship data collection. This method of collecting ship data using serial communication protocols has poor real-time performance and cannot guarantee high-frequency collection. And this method has a limit of reading at most 124 registers at a time. If this method is used to meet the second-level data collection of tens of thousands of signal points on intelligent ships, at least 100 threads need to be concurrently collected, resulting in higher requirements for the server hardware installed on the ship, and often leading to an increase in hardware costs. Summary of the Invention

[0004] The embodiments of the present invention provide a method, device, electronic device and storage medium for collecting parameters of ship equipment, which improve the collection efficiency of parameters of ship equipment.

[0005] In a first aspect, the embodiments of the present invention provide a method for collecting parameters of ship equipment, including:

[0006] Obtaining current ship equipment parameters of each sensor on a target ship at the current parameter collection moment based on a preset multi-source collection protocol;

[0007] Comparing the consistency between the current ship equipment parameters and historical ship equipment parameters in a parameter cache pool to determine first ship equipment parameters corresponding to the target ship;

[0008] Compressing the first ship equipment parameters based on a preset compression method to determine second ship equipment parameters corresponding to the target ship;

[0009] Serializing the second ship equipment parameters corresponding to consecutive parameter collection moments within a preset parameter encapsulation period to determine target ship equipment parameters corresponding to the target ship.

[0010] Optionally, the method further includes: for each sensor, based on the signal key value of the current sensor in the current ship equipment parameters, determining, from each historical ship equipment parameter in the parameter cache pool, a third ship equipment parameter corresponding to the signal key value; comparing the signal values of the current ship equipment parameters and the third ship equipment parameters to determine each fourth ship equipment parameter corresponding to the target ship; converting each fourth ship equipment parameter into a binary format based on a preset serialization method to determine a first ship equipment parameter corresponding to the target ship.

[0011] Optionally, the method further includes: if the fourth ship equipment parameter is the current ship equipment parameter, updating the third ship equipment parameter based on the current ship equipment parameter to determine the updated historical ship equipment parameter in the parameter cache pool.

[0012] Optionally, the method further includes: comparing the first data volume of the first ship equipment parameter with a preset data volume threshold to determine a parameter processing method corresponding to the first ship equipment parameter; if the parameter processing method is to be compressed, compressing the first ship equipment parameter based on a preset compression method to determine a second ship equipment parameter corresponding to the target ship.

[0013] Optionally, the method further includes: if the parameter processing method is not to be compressed, determining the first ship equipment parameter as the second ship equipment parameter corresponding to the target ship.

[0014] Optionally, the method further includes: publishing the target ship equipment parameter to a topic queue accessible to each parameter collector to obtain the target ship equipment parameter, so that the parameter collector corresponding to each topic can obtain the target ship equipment parameter for real-time monitoring of the target ship and / or fault detection of the target ship from the corresponding topic queue.

[0015] In a second aspect, an embodiment of the present invention further provides a ship equipment parameter acquisition device, and the device includes:

[0016] A current ship equipment parameter acquisition module, configured to obtain current ship equipment parameters of each sensor on a target ship at the current parameter acquisition moment based on a preset multi-source acquisition protocol;

[0017] A first ship equipment parameter determination module, configured to compare the current ship equipment parameters with historical ship equipment parameters in a parameter cache pool to determine a first ship equipment parameter corresponding to the target ship;

[0018] A second ship equipment parameter determination module, configured to compress the first ship equipment parameter based on a preset compression method to determine a second ship equipment parameter corresponding to the target ship;

[0019] A target ship equipment parameter determination module, configured to serialize each second ship equipment parameter corresponding to consecutive parameter acquisition times within a preset parameter encapsulation period, and determine the target ship equipment parameter corresponding to the target ship.

[0020] In a third aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:

[0021] One or more processors;

[0022] A memory for storing one or more programs;

[0023] When the one or more programs are executed by the one or more processors, the one or more processors implement the ship equipment parameter acquisition method provided in any embodiment of the present invention.

[0024] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the ship equipment parameter acquisition method provided in any embodiment of the present invention.

[0025] In a fifth aspect, an embodiment of the present invention provides a computer program product, including a computer program, and when the computer program is executed by a processor, it implements the ship equipment parameter acquisition method provided in any embodiment of the present invention.

[0026] The technical solution of the embodiment of the present invention obtains the current ship equipment parameters of each sensor on the target ship at the current parameter acquisition time based on a preset multi-source acquisition protocol, so that the current ship equipment parameters can be obtained from different types of sensors simultaneously using the preset multi-source acquisition protocol. Compared with the ship equipment parameter acquisition method that cannot cover the entire target ship by the serial communication protocol, while improving the current ship equipment parameter acquisition efficiency, it ensures the second-level acquisition frequency of the ship equipment parameters; based on the consistency comparison between the current ship equipment parameters and the historical ship equipment parameters in the parameter cache pool, determine the first ship equipment parameter corresponding to the target ship; based on a preset compression method, compress the first ship equipment parameter to determine the second ship equipment parameter corresponding to the target ship, thereby using the compression method to reduce the data volume of the ship equipment parameters, improve the transmission efficiency of the second ship equipment parameters, reduce resource occupancy, and provide sufficient resources for the ship equipment parameter acquisition operation at the next parameter acquisition time, further ensuring the ship equipment parameter acquisition efficiency; serialize each second ship equipment parameter corresponding to consecutive parameter acquisition times within a preset parameter encapsulation period, and determine the target ship equipment parameter corresponding to the target ship.

[0027] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0029] Figure 1 is a flowchart of a method for collecting ship equipment parameters provided in Embodiment 1 of the present invention;

[0030] Figure 2 is a flowchart of a method for collecting ship equipment parameters provided in Embodiment 2 of the present invention;

[0031] Figure 3 is a schematic structural diagram of a device for collecting ship equipment parameters provided in Embodiment 3 of the present invention;

[0032] Figure 4 is a schematic structural diagram of an electronic device for implementing the method for collecting ship equipment parameters of the embodiments of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0033] In order to enable those skilled in the art to better understand the solution of the present invention, the following clearly and completely describes the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, rather than all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art without creative efforts based on the embodiments of the present invention shall fall within the protection scope of the present invention.

[0034] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention described herein can be implemented in an order different from those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0035] Embodiment 1

[0036] Figure 1 The following is a flowchart of a method for collecting ship equipment parameters provided in Embodiment 1 of the present invention. This embodiment is applicable to the situation of collecting ship equipment parameters. This method can be executed by a ship equipment parameter collection device, which can be implemented in the form of hardware and / or software, and can be configured in an electronic device. As Figure 1 shown, the method includes:

[0037] S110. Obtain the current ship equipment parameters of each sensor on the target ship at the current parameter collection moment based on a preset multi-source collection protocol.

[0038] Among them, the preset multi-source collection protocol can refer to a parameter collection protocol pre-set for each device on the target ship. The preset multi-source collection protocol can obtain the current ship equipment parameters from different devices or different types of sensors simultaneously. The target ship can refer to a ship that performs real-time detection of ship equipment parameters, especially a ship sailing at sea. The volume of the target ship is much larger than that of other industrial equipment, and there are more distributed sensors. There are tens of thousands of sensors on the target ship that need to collect parameters in real time to achieve real-time and all-round monitoring of the target ship. There can be multiple types of sensors. For example, the sensors can include, but are not limited to, piezoelectric six-element sensors (also known as weather stations), tilt sensors, buoyancy level sensors, and marine speed sensors. Correspondingly, the ship equipment parameters can include, but are not limited to, rotational speed, speed, ship position, forward draft, and aft draft. The current parameter collection moment can refer to the moment when the ship equipment parameters were last collected. The current ship equipment parameters can refer to the monitoring parameters of all sensors on the target ship currently collected.

[0039] Specifically, based on the ship equipment parameter collection instruction of the parameter collection party, use the preset multi-source collection protocol to periodically obtain the current ship equipment parameters of each sensor on the target ship at the current parameter collection moment. For example, the current ship equipment parameters can be periodically obtained with a period of 0.2 seconds.

[0040] S120. Compare the consistency between the current ship equipment parameters and the historical ship equipment parameters in the parameter cache pool to determine the first ship equipment parameters corresponding to the target ship.

[0041] Among them, the parameter cache pool is located between the sensor and the data memory. The parameter cache pool can be used to cache the parameters of the ship equipment whose signal value has changed most recently. There is a corresponding cache location in the parameter cache pool for each sensor on the target ship. The signal value that has changed most recently for the corresponding sensor is cached in this cache location. The historical ship equipment parameters can refer to the ship equipment parameters whose signal value has changed most recently. The first ship equipment parameter can refer to the parameter that has changed when the current ship equipment parameter collected at the current parameter collection moment is compared with the previous ship equipment parameter collected at the previous parameter collection moment.

[0042] Specifically, the current ship equipment parameter corresponding to the same sensor and the historical ship equipment parameter in the parameter cache pool are compared for consistency to obtain the consistency comparison result corresponding to the sensor. The first ship equipment parameter corresponding to the target ship is determined based on the consistency comparison result. If the consistency comparison result indicates that the signal value in the current ship equipment parameter corresponding to the sensor is the same as the signal value in the historical ship equipment parameter, the first ship equipment parameter corresponding to the sensor is empty, and the following steps do not need to be performed for this sensor. If the consistency comparison result indicates that the signal value in the current ship equipment parameter corresponding to the sensor is different from the signal value in the historical ship equipment parameter, the current ship equipment parameter of the sensor is determined as the first ship equipment parameter corresponding to the sensor.

[0043] Based on the above technical solution, "comparing the current ship equipment parameter and the historical ship equipment parameter in the parameter cache pool for consistency to determine the first ship equipment parameter corresponding to the target ship" may include: for each sensor, based on the signal key value of the current sensor in the current ship equipment parameter, the third ship equipment parameter corresponding to the signal key value is determined from each historical ship equipment parameter in the parameter cache pool; the signal values of the current ship equipment parameter and the third ship equipment parameter are compared for consistency to determine each fourth ship equipment parameter corresponding to the target ship; the first ship equipment parameter corresponding to the target ship is determined by converting each fourth ship equipment parameter into a binary format based on a preset serialization method.

[0044] Among them, the current ship equipment parameters may include: signal key values, signal values, and timestamps. The signal key value may refer to the sensor identifier. The signal key value can be used to uniquely identify a certain sensor. The timestamp may refer to the current parameter acquisition time. The third ship equipment parameter may refer to the historical ship equipment parameters cached at the cache location of the current sensor in the parameter cache pool. The fourth ship equipment parameter may refer to the parameter that has changed when comparing the current ship equipment parameters collected at the current parameter acquisition time with the third ship equipment parameters in the parameter cache pool. In the embodiments of the present invention, the current ship equipment parameters, the third ship equipment parameters, and the fourth ship equipment parameters are all in decimal format, while the first ship equipment parameter is in binary format. The preset serialization method may refer to a method of pre-setting to convert an object or data structure into a standard format, which is convenient for storage or transmission and can be restored to the original object or data structure later. For example, the preset serialization method may be, but is not limited to, MessagePack.

[0045] Specifically, for each sensor, based on the signal key value of the current sensor in the current ship equipment parameters, the cache location corresponding to the signal key value is determined from the historical ship equipment parameters at each cache location in the parameter cache pool, and the historical ship equipment parameters at this cache location are determined as the third ship equipment parameters. Based on the current ship equipment parameters and the third ship equipment parameters, a signal value consistency comparison is performed to obtain the consistency comparison result corresponding to the current sensor. If the consistency comparison result indicates that the signal value in the current ship equipment parameters corresponding to the current sensor is the same as the signal value in the third ship equipment parameters, the fourth ship equipment parameter corresponding to the current sensor is empty, and the current sensor does not need to perform the following steps. If the consistency comparison result indicates that the signal value in the current ship equipment parameters corresponding to the current sensor is different from the signal value in the third ship equipment parameters, the current ship equipment parameters of the current sensor are determined as the fourth ship equipment parameter corresponding to the current sensor, and the cache location of the fourth ship equipment parameter is marked as "changed". All sensors are traversed, and each fourth ship equipment parameter corresponding to the target ship is obtained based on all the ship equipment parameters with the "changed" mark in the parameter cache pool. Based on the preset serialization method, the binary format conversion of each fourth ship equipment parameter is performed to obtain an overall binary format parameter, and this overall binary format parameter is determined as the first ship equipment parameter corresponding to the target ship. In the embodiments of the present invention, the advantage of serializing ship equipment parameters is that during the transmission of ship equipment parameters, the serialized ship equipment parameters can be effectively transmitted between different systems or different devices, that is, serialization enables complex data structures to be transmitted in a unified standard format, thereby simplifying the process of transmitting ship equipment parameters and improving the transmission efficiency of ship equipment parameters. Moreover, serialization can combine multiple ship equipment parameters into one for storage and transmission, thereby saving storage space and improving the transmission efficiency.

[0046] Based on the above technical solution, the method further includes: if the fourth ship equipment parameter is the current ship equipment parameter, updating the third ship equipment parameter based on the current ship equipment parameter, and determining the updated historical ship equipment parameter in the parameter cache pool.

[0047] Specifically, if the fourth ship equipment parameter is empty, the historical ship equipment parameter corresponding to the current sensor in the parameter cache pool remains unchanged. If the fourth ship equipment parameter is the current ship equipment parameter, the third ship equipment parameter is updated based on the current ship equipment parameter, and the updated historical ship equipment parameter in the parameter cache pool is determined, so that when the ship equipment parameter is obtained at the next parameter acquisition moment, it can be effectively compared with the signal value of the last time of each sensor on the target ship, and it can be accurately judged whether the states of the ship's various equipment have changed, that is, whether the signal value has changed.

[0048] 130. Compress the first ship equipment parameter based on a preset compression method to determine the second ship equipment parameter corresponding to the target ship.

[0049] Among them, the preset compression method may refer to compression applicable to jump data. Jump data refers to data with a large numerical span. For example, the temperature value is 20°C, and then the pressure is 10 kPa, which can be regarded as jump data. The preset compression method may include: the compression algorithm of Huffman coding and the lossless data compression algorithm (Run-Length Encoding or Lempel-Ziv). The second ship equipment parameter may refer to the ship equipment parameter after compression.

[0050] Specifically, the first ship equipment parameter is compressed using the preset compression method to obtain the compressed parameter, and the "compressed" label is added to the compressed parameter, so as to determine the second ship equipment parameter corresponding to the target ship.

[0051] S140. Serialize each second ship equipment parameter corresponding to consecutive parameter acquisition moments within the preset parameter encapsulation period to determine the target ship equipment parameter corresponding to the target ship.

[0052] Among them, the preset parameter encapsulation period may refer to the encapsulation period of the ship equipment parameters at multiple preset moments. In the embodiment of the present invention, parameter encapsulation can be understood as phased packaging. The preset parameter encapsulation period may include at least two parameter acquisition moments. The target ship equipment parameter may refer to the set of ship equipment parameters corresponding to the changing signal values in the target ship within a preset parameter encapsulation period. For example, the target ship equipment parameter may be an overall ship equipment parameter within the preset parameter encapsulation period.

[0053] Specifically, obtain the second ship equipment parameters corresponding to multiple parameter acquisition times within a preset parameter encapsulation period, and perform serialization processing on all the second ship equipment parameters within the preset parameter encapsulation period based on a preset serialization method to obtain the target ship equipment parameters corresponding to the target ship.

[0054] In the technical solution of the embodiment of the present invention, by obtaining the current ship equipment parameters of each sensor on the target ship at the current parameter acquisition time based on a preset multi-source acquisition protocol, the current ship equipment parameters can be obtained from different types of sensors simultaneously using the preset multi-source acquisition protocol. Compared with the ship equipment parameter acquisition method that cannot cover all the ship equipment parameters of the entire target ship by the serial communication protocol, while improving the acquisition efficiency of the current ship equipment parameters, the second-level acquisition frequency of the ship equipment parameters is ensured; based on the consistency comparison between the current ship equipment parameters and the historical ship equipment parameters in the parameter cache pool, determine the first ship equipment parameters corresponding to the target ship; based on a preset compression method, compress the first ship equipment parameters to determine the second ship equipment parameters corresponding to the target ship, thereby using the compression method to reduce the data volume of the ship equipment parameters, improve the transmission efficiency of the second ship equipment parameters, reduce resource occupancy, and provide sufficient resources for the ship equipment parameter acquisition operation at the next parameter acquisition time, further ensuring the acquisition efficiency of the ship equipment parameters; perform serialization processing on each of the second ship equipment parameters corresponding to consecutive parameter acquisition times within the preset parameter encapsulation period to determine the target ship equipment parameters corresponding to the target ship.

[0055] Based on the above technical solution, the method further includes: publishing the target ship equipment parameters to a topic queue that can be accessed by each parameter acquirer to obtain the target ship equipment parameters, so that the parameter acquirer corresponding to each topic can obtain the target ship equipment parameters for real-time monitoring of the target ship and / or fault detection of the target ship from the topic queue corresponding to each of them.

[0056] Among them, the parameter acquirer may refer to a user who needs to obtain the real-time ship equipment parameters of the target ship. For example, the parameter acquirer may be, but is not limited to, the manufacturer of the equipment on the target ship or the ship equipment parameter monitoring platform to which the target ship belongs. Each parameter acquirer corresponds to a topic. The topic queue can be used to store the target ship equipment parameters in the order of the parameter encapsulation period.

[0057] Specifically, after obtaining the target ship equipment parameters, the target ship equipment parameters can be published to a topic queue where each parameter collector can obtain the target ship equipment parameters based on the data transmission protocol of the publish / subscribe mode (such as AMQP). The data transmission protocol of the publish / subscribe mode can interface with multiple parameter collectors, enabling the parameter collectors to obtain the latest data, that is, the target ship equipment parameters, from the topic queue in the mode of subscribing to topics, thus avoiding performance problems caused by the need to establish multiple long collection connections for multiple parameter collectors in collection methods such as Modbus. Exemplarily, for the scenario of point-to-point collection, the collection protocol can also use a collection protocol based on the request-response mode or WebSocket communication.

[0058] It should be noted that after the parameter collector obtains the target ship equipment parameters, it needs to perform a deserialization operation on the target ship equipment parameters, then perform decompression processing according to the "compression" label, and finally perform a deserialization operation again to obtain the usable ship equipment parameters. The signal values of the usable ship equipment parameters updated and changed in the ship monitoring table can be based on the timestamp. During the serialization and deserialization processes, strict verification of the parameters can be performed to ensure that the parameters conform to specific formats and rules. In addition, the serialization and deserialization methods of each field can be customized according to requirements to meet various complex parameter processing scenarios.

[0059] Embodiment 2

[0060] Figure 2 The flowchart of a ship equipment parameter collection method provided by Embodiment 2 of the present invention. Based on the above embodiments, this embodiment describes in detail the process of determining the second ship equipment parameters. The explanations of the same or corresponding terms in the above embodiments are not repeated here. As Figure 2 shown, the method includes:

[0061] S210. Obtain the current ship equipment parameters of each sensor on the target ship at the current parameter collection moment based on a preset multi-source collection protocol.

[0062] S220. Compare the consistency between the current ship equipment parameters and the historical ship equipment parameters in the parameter cache pool to determine the first ship equipment parameters corresponding to the target ship.

[0063] It should be noted that in a large hull with tens of thousands of collectors distributed, sensors with second-level frequency changes only account for 5%-10%. Through the transformation of signal value collection, the collection and transmission speed of 0.2 seconds can be achieved in the embodiments of the present invention, thereby greatly improving the collection frequency of the general parameter collection method of the target ship.

[0064] S230. Compare the first data volume of the first ship equipment parameter with a preset data volume threshold to determine the parameter processing method corresponding to the first ship equipment parameter.

[0065] Among them, the preset data volume threshold may refer to the maximum data volume that does not require parameter compression set in advance. The preset data volume threshold can be the data volume threshold accurately predicted by using a deep learning model for the target ship, so as to balance the compression time and the compression ratio, ensure the best performance between real-time performance and data volume, and further improve the efficiency of ship equipment parameter acquisition. The preset data volume threshold can also be set according to multiple test results. The parameter processing method may refer to the processing method of whether the first ship equipment parameter needs to be compressed. For example, the first ship equipment parameter can include to be compressed and not compressed.

[0066] Specifically, if the first data volume of the first ship equipment parameter is greater than the preset data volume threshold, it is determined that the parameter processing method corresponding to the first ship equipment parameter is to be compressed. If the first data volume of the first ship equipment parameter is less than or equal to the preset data volume threshold, it is determined that the parameter processing method corresponding to the first ship equipment parameter is not compressed.

[0067] S240. If the parameter processing method is to be compressed, compress the first ship equipment parameter based on a preset compression method to determine the second ship equipment parameter corresponding to the target ship.

[0068] Specifically, if the parameter processing method is to be compressed, the Huffman coding compression algorithm can be used to compress the first ship equipment parameter to determine the second ship equipment parameter corresponding to the target ship, so that the bandwidth occupancy of parameter transmission can be effectively reduced by using the compressed ship equipment parameter, further improving the parameter acquisition frequency and enhancing the real-time performance of the ship equipment parameter.

[0069] Exemplarily, the Huffman coding compression algorithm has a more significant effect in the case of uneven character frequency distribution, and is especially suitable for the scenario of compressing the change signal values of different types of equipment on the ship.

[0070] Based on the above technical solution, the method further includes: if the parameter processing method is not compressed, determine the first ship equipment parameter as the second ship equipment parameter corresponding to the target ship.

[0071] S250. Serialize each second ship equipment parameter corresponding to the continuous parameter acquisition moments within the preset parameter encapsulation period to determine the target ship equipment parameter corresponding to the target ship.

[0072] The technical solution of the embodiment of the present invention compares the first data volume based on the first ship equipment parameter with a preset data volume threshold to determine the parameter processing method corresponding to the first ship equipment parameter; if the parameter processing method is to be compressed, the first ship equipment parameter is compressed based on a preset compression method to determine the second ship equipment parameter corresponding to the target ship, thereby balancing the compression time and the compression rate through the preset data volume threshold, ensuring the best performance between real-time performance and data volume, and further improving the efficiency of ship equipment parameter acquisition.

[0073] It should be noted that the embodiment of the present invention is not limited by the total number of sensors and the hull size. That is, as the total number of sensors changes, the per-frequency change amount (the first ship equipment parameter) of the ship usually remains stable at 5%-10% of the sensors. Therefore, the embodiment of the present invention is not limited by the total number of sensors, can maintain a collection speed of at least 0.2 seconds and has low hardware requirements for the collection system, which can not only save hardware costs but also ensure the collection frequency. Moreover, there is no extra requirement for the hardware as the number of signal points increases, saving the cost of collection hardware compared with other collection methods.

[0074] The following is an embodiment of the ship equipment parameter acquisition device provided by the embodiment of the present invention. This device and the ship equipment parameter acquisition method of the above embodiments belong to the same inventive concept. For the details not described in detail in the embodiment of the ship equipment parameter acquisition device, reference can be made to the embodiments of the above ship equipment parameter acquisition method.

[0075] Embodiment III

[0076] Figure 3 It is a schematic structural diagram of a ship equipment parameter acquisition device provided by Embodiment III of the present invention. As Figure 3 shown, the device includes: a current ship equipment parameter acquisition module 310, a first ship equipment parameter determination module 320, a second ship equipment parameter determination module 330, and a target ship equipment parameter determination module 340.

[0077] Among them, the current ship equipment parameter acquisition module 310 is used to acquire the current ship equipment parameters of each sensor on the target ship at the current parameter acquisition moment based on a preset multi-source acquisition protocol; the first ship equipment parameter determination module 320 is used to perform a consistency comparison based on the current ship equipment parameters and the historical ship equipment parameters in the parameter cache pool to determine the first ship equipment parameter corresponding to the target ship; the second ship equipment parameter determination module 330 is used to compress the first ship equipment parameter based on a preset compression method to determine the second ship equipment parameter corresponding to the target ship; the target ship equipment parameter determination module 340 is used to serialize the respective second ship equipment parameters corresponding to consecutive parameter acquisition moments within a preset parameter encapsulation period to determine the target ship equipment parameter corresponding to the target ship.

[0078] The technical solution of the embodiment of the present invention obtains the current ship equipment parameters of each sensor on the target ship at the current parameter acquisition moment based on a preset multi-source acquisition protocol, so that the current ship equipment parameters can be obtained from different types of sensors simultaneously by using the preset multi-source acquisition protocol. Compared with the ship equipment parameter acquisition method that cannot cover the entire target ship by the serial communication protocol, while improving the acquisition efficiency of the current ship equipment parameters, it ensures the second-level acquisition frequency of the ship equipment parameters; based on the current ship equipment parameters and the historical ship equipment parameters in the parameter cache pool, a consistency comparison is performed to determine the first ship equipment parameters corresponding to the target ship; based on a preset compression method, the first ship equipment parameters are compressed to determine the second ship equipment parameters corresponding to the target ship, thereby using the compression method to reduce the data volume of the ship equipment parameters, improve the transmission efficiency of the second ship equipment parameters, reduce resource occupancy, and provide sufficient resources for the ship equipment parameter acquisition operation at the next parameter acquisition moment, further ensuring the acquisition efficiency of the ship equipment parameters; serialize the respective second ship equipment parameters corresponding to consecutive parameter acquisition moments within the preset parameter encapsulation period to determine the target ship equipment parameters corresponding to the target ship.

[0079] On the basis of the above technical solution, the first ship equipment parameter determination module is specifically used for: for each sensor, based on the signal key value of the current sensor in the current ship equipment parameters, determine the third ship equipment parameter corresponding to the signal key value from each historical ship equipment parameter in the parameter cache pool; perform a signal value consistency comparison based on the current ship equipment parameters and the third ship equipment parameters to determine the respective fourth ship equipment parameters corresponding to the target ship; convert the respective fourth ship equipment parameters into a binary format based on a preset serialization method to determine the first ship equipment parameters corresponding to the target ship.

[0080] On the basis of the above technical solution, the device further includes:

[0081] A historical ship equipment parameter update module, configured to update the third ship equipment parameter based on the current ship equipment parameter if the fourth ship equipment parameter is the current ship equipment parameter, and determine the updated historical ship equipment parameter in the parameter cache pool.

[0082] On the basis of the above technical solution, the second ship equipment parameter determination module 330 may include:

[0083] A parameter processing method determination sub-module, configured to compare the first data volume of the first ship equipment parameters with a preset data volume threshold to determine the parameter processing method corresponding to the first ship equipment parameters;

[0084] The first ship equipment parameter compression sub-module is used to compress the first ship equipment parameters based on a preset compression method if the parameter processing method is to be compressed, and determine the second ship equipment parameters corresponding to the target ship.

[0085] Based on the above technical solution, the second ship equipment parameter determination module 330 may further include:

[0086] The second ship equipment parameter determination sub-module is used to determine the first ship equipment parameters as the second ship equipment parameters corresponding to the target ship if the parameter processing method is not to be compressed.

[0087] Based on the above technical solution, the device further includes:

[0088] The target ship equipment parameter acquisition module is used to publish the target ship equipment parameters to the topic queue where each parameter acquisition party can obtain the target ship equipment parameters, so that each parameter acquisition party corresponding to each topic can obtain the target ship equipment parameters for real-time monitoring of the target ship and / or target ship fault detection from its corresponding topic queue.

[0089] The ship equipment parameter acquisition device provided by the embodiments of the present invention can execute the ship equipment parameter acquisition method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the ship equipment parameter acquisition method.

[0090] It should be noted that in the above embodiments of ship equipment parameter acquisition, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of the functional units are only for the convenience of mutual distinction and do not limit the protection scope of the present invention.

[0091] Embodiment 4

[0092] Figure 4 FIG. shows a schematic structural diagram of an electronic device 10 that can be used to implement the embodiments of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are only examples and are not intended to limit the implementation of the present invention described and / or claimed herein.

[0093] As Figure 4As shown, the electronic device 10 includes at least one processor 11 and a memory communicatively connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc. The memory stores a computer program executable by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0094] Multiple components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disc, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0095] The processor 11 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 11 include but are not limited to a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the method for collecting ship equipment parameters.

[0096] In some embodiments, the method for collecting ship equipment parameters can be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the method for collecting ship equipment parameters described above can be executed. Alternatively, in other embodiments, the processor 11 can be configured to execute the method for collecting ship equipment parameters in any other suitable manner (e.g., by means of firmware).

[0097] The various embodiments of the systems and techniques described above in this specification can be implemented in digital electronic circuitry, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems-on-chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be a special-purpose or general-purpose programmable processor that receives data and instructions from, and transmits data and instructions to, a storage system, at least one input device, and at least one output device.

[0098] The computer programs for implementing the methods of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions / operations specified in the flowchart and / or block diagram to be implemented. The computer programs can be executed entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.

[0099] In the context of the present invention, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0100] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which the user can provide input to the electronic device. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, speech input, or tactile input).

[0101] The systems and techniques described herein can be implemented in a computing system including backend components (e.g., as a data server), or a computing system including middleware components (e.g., an application server), or a computing system including frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system including any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected to each other by digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), blockchain network, and the Internet.

[0102] The computing system can include a client and a server. The client and the server are generally remote from each other and typically interact through a communication network. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system and solves the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.

[0103] An embodiment of the present invention also provides a computer program product, including a computer program which, when executed by a processor, implements the method for collecting ship equipment parameters provided in any embodiment of the present application.

[0104] In the process of implementing the computer program product, computer program code for performing the operations of the present invention can be written in one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network - including a local area network (LAN) or a wide area network (WAN) - or, it can be connected to an external computer (for example, by using an Internet service provider to connect through the Internet). This program product and the ship equipment parameter acquisition method disclosed in the embodiments of the present application belong to the same inventive concept, so it will not be elaborated here.

[0105] It should be understood that various forms of the processes shown above can be used, steps can be reordered, added, or deleted. For example, the steps recited in the present invention can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved, and no limitation is imposed herein.

[0106] The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.

Claims

1. A method for collecting ship equipment parameters, characterized in that: include: Based on the preset multi-source acquisition protocol, the current ship equipment parameters of each sensor on the target ship at the current parameter acquisition time are obtained; Determine the first ship equipment parameter corresponding to the target ship by performing a consistency comparison based on the current ship equipment parameter and the historical ship equipment parameter in the parameter cache pool; Compressing the first ship equipment parameter based on a preset compression method to determine a second ship equipment parameter corresponding to the target ship; The second ship equipment parameters corresponding to the continuous parameter collection moments within the preset parameter encapsulation period are serialized to determine the target ship equipment parameters corresponding to the target ship.

2. The method according to claim 1, characterized in that: The determining the first ship equipment parameter corresponding to the target ship by performing consistency comparison based on the current ship equipment parameter and the historical ship equipment parameter in the parameter cache pool includes: For each sensor, based on the signal key value of the current sensor in the current ship equipment parameter, determine a third ship equipment parameter corresponding to the signal key value from each historical ship equipment parameter in the parameter cache pool; Performing a signal value consistency comparison based on the current ship equipment parameter and the third ship equipment parameter to determine each fourth ship equipment parameter corresponding to the target ship; The fourth ship equipment parameters are converted into binary format based on a preset serialization method to determine the first ship equipment parameters corresponding to the target ship.

3. The method according to claim 2, characterized in that The method further comprises: If the fourth ship equipment parameter is the current ship equipment parameter, the third ship equipment parameter is updated based on the current ship equipment parameter to determine the updated historical ship equipment parameter in the parameter cache pool.

4. The method according to claim 1, characterized in that: The compressing the first ship equipment parameter based on a preset compression method to determine the second ship equipment parameter corresponding to the target ship includes: Determining a parameter processing method corresponding to the first ship equipment parameter based on a comparison between the first data volume of the first ship equipment parameter and a preset data volume threshold; If the parameter processing mode is to be compressed, the first ship equipment parameter is compressed based on a preset compression mode to determine the second ship equipment parameter corresponding to the target ship.

5. The method according to claim 4, characterized in that The method further comprises: If the parameter processing method is non-compression, the first ship equipment parameter is determined as the second ship equipment parameter corresponding to the target ship.

6. The method according to claim 1, characterized in that The method further comprises: The target ship equipment parameters are published to a subject queue from which each parameter collector can obtain the target ship equipment parameters, so that the parameter collector corresponding to each subject can obtain the target ship equipment parameters for real-time monitoring of the target ship and / or target ship fault detection from the corresponding subject queue.

7. A ship equipment parameter collection device, characterized in that: The device comprises: The current ship equipment parameter acquisition module is used to acquire the current ship equipment parameters of each sensor on the target ship at the current parameter acquisition time based on a preset multi-source acquisition protocol; A first ship equipment parameter determination module, configured to determine a first ship equipment parameter corresponding to the target ship based on a consistency comparison between the current ship equipment parameter and the historical ship equipment parameter in the parameter cache pool; A second ship equipment parameter determination module, used to compress the first ship equipment parameter based on a preset compression method to determine the second ship equipment parameter corresponding to the target ship; The target ship equipment parameter determination module is used to serialize the second ship equipment parameters corresponding to the continuous parameter collection moments within the preset parameter encapsulation period to determine the target ship equipment parameters corresponding to the target ship.

8. An electronic device, characterized in that: The electronic device comprises: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the ship equipment parameter collection method as described in any one of claims 1-6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for collecting ship equipment parameters as described in any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for collecting ship equipment parameters as described in any one of claims 1 to 6 is implemented.