CN111225415A - Data transmission method, device, equipment and computer readable storage medium - Google Patents
Data transmission method, device, equipment and computer readable storage medium Download PDFInfo
- Publication number
- CN111225415A CN111225415A CN201911426176.2A CN201911426176A CN111225415A CN 111225415 A CN111225415 A CN 111225415A CN 201911426176 A CN201911426176 A CN 201911426176A CN 111225415 A CN111225415 A CN 111225415A
- Authority
- CN
- China
- Prior art keywords
- parameter information
- data
- packet
- target
- data transmission
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W28/00—Network traffic management; Network resource management
- H04W28/02—Traffic management, e.g. flow control or congestion control
- H04W28/06—Optimizing the usage of the radio link, e.g. header compression, information sizing, discarding information
- H04W28/065—Optimizing the usage of the radio link, e.g. header compression, information sizing, discarding information using assembly or disassembly of packets
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/26—Special purpose or proprietary protocols or architectures
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/30—Services specially adapted for particular environments, situations or purposes
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computing Systems (AREA)
- Computer Security & Cryptography (AREA)
- Mobile Radio Communication Systems (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a data sending method, which comprises the following steps: acquiring a parameter information packet of fixed marine equipment of a ship, and decoding the parameter information packet to acquire navigation parameter information of the ship; generating identification data corresponding to the ship based on the navigation parameter information and a preset rule; and synthesizing the navigation parameter information and the identification data into a target data packet, and sending the target data packet to the mobile maritime equipment. The invention also discloses a data transmission device, equipment and a computer readable storage medium. The invention decodes the parameter information packet of the fixed marine equipment, packages the decoded parameter information packet into a target data packet which can be identified by the mobile marine equipment, and sends the target data packet to the mobile marine equipment, thereby realizing the data transmission between the fixed marine equipment and the mobile marine equipment.
Description
Technical Field
The present invention relates to the field of data transmission technologies, and in particular, to a data transmission method, apparatus, device, and computer readable storage medium.
Background
With the progress and development of society, data transmission technology is widely used by people, and particularly in the field of marine technology, interactive transmission of data can enable marine personnel of different terminal devices to acquire mutual information parameters, so that digital communication is realized and data sharing is realized.
The existing marine communication network generally adopts an NMEA2000 protocol for data transmission, the NMEA2000 is a maritime wired communication network, and is a communication protocol for data exchange among control units in marine applications, which is provided by the National Marine Electronic Association (NMEA) on the basis of J1939, the communication protocol is a special network protocol in the marine field, and PGN (parameter Group number) sentences are mainly transmitted. In practical applications, any stationary marine device that meets the NMEAA2000 protocol can be cabled to enable digital communication between the marine devices, such as: digital communication between the wind speed meter, GPS receiver, engine and its display instrument, electronic chart instrument, and desktop interphone on the ship.
Therefore, other mobile marine devices which are not connected to the same marine wired communication network through cables cannot communicate with the fixed marine devices on the marine wired communication network, that is, other mobile marine devices which are not connected with the NMEA2000 cannot receive and recognize the PGN statement of the NMEA2000, so that communication cannot be realized between the fixed marine devices and the mobile marine devices, and data transmission is not smooth.
Disclosure of Invention
The invention mainly aims to provide a data sending method, a data sending device, equipment and a computer readable storage medium, and aims to solve the technical problem that mobile marine equipment cannot communicate with fixed marine equipment.
In order to achieve the above object, the present invention provides a data transmission method, including the steps of:
receiving a parameter information packet of fixed maritime equipment of a ship, and decoding the parameter information packet to obtain navigation parameter information of the ship;
generating identification data corresponding to the ship based on the navigation parameter information and a preset rule;
and synthesizing the navigation parameter information and the identification data into a target data packet, and sending the target data packet to the mobile maritime equipment.
In one embodiment, the step of receiving the parameter information package of the fixed marine equipment of the ship comprises:
receiving parameter information to be processed of the fixed maritime equipment, and determining sequence number information of the parameter information to be processed;
and processing the parameter information to be processed into the parameter information packet based on the sequence number information.
In an embodiment, the step of processing the parameter information to be processed into the parameter information packet based on the sequence number information includes:
determining the state of the parameter information to be processed;
and processing the parameter information to be processed into the parameter information packet based on the sequence number information and the state.
In an embodiment, the decoding processing on the parameter information packet to obtain the navigation parameter information of the ship includes:
determining coding information of the parameter information packet;
and selecting a port corresponding to the coded information to decode the parameter information packet so as to obtain the navigation parameter information of the ship.
In one embodiment, the step of synthesizing the navigation parameter information and the identification data into a target data packet and sending the target data packet to the mobile maritime device comprises:
synthesizing the navigation parameter information and the identification data into a target data packet based on a preset data type;
and sending the target data packet to the mobile maritime equipment based on the data transmission mode corresponding to the preset data type.
In an embodiment, the step of synthesizing the navigation parameter information and the identification data into a target data packet based on a preset data type includes:
if the preset data type is serial port data, synthesizing the navigation parameter information and the identification data into a target serial port data packet;
the step of sending the target data packet to the mobile maritime equipment based on the data transmission mode corresponding to the preset data type comprises the following steps:
and sending the target serial port data packet to a wireless transmission module through a serial port, and controlling the wireless transmission module to send the target serial port data packet to the mobile maritime equipment.
In an embodiment, the step of synthesizing the navigation parameter information and the identification data into a target data packet based on a preset data type includes:
if the preset data type is peripheral component interconnect standard PCI data, synthesizing the navigation parameter information and the identification data into a target PCI data packet;
the step of sending the target data packet to the mobile maritime equipment based on the data transmission mode corresponding to the preset data type comprises the following steps:
and sending the target PCI data packet to a wireless transmission module through a PCI port, and controlling the wireless transmission module to send the target PCI data packet to the mobile maritime equipment.
In order to achieve the above object, the present invention also provides a data transmission apparatus, including:
the receiving module is used for receiving a parameter information packet of fixed maritime equipment of the ship and decoding the parameter information packet to obtain navigation parameter information of the ship;
the generating module is used for generating identification data corresponding to the ship based on the navigation parameter information and a preset rule;
and the sending module is used for synthesizing the navigation parameter information and the identification data into a target data packet and sending the target data packet to the mobile maritime equipment.
In an embodiment, the receiving module is further configured to:
receiving parameter information to be processed of the fixed maritime equipment, and determining sequence number information of the parameter information to be processed;
and processing the parameter information to be processed into the parameter information packet based on the sequence number information.
In an embodiment, the receiving module is further configured to:
determining the state of the parameter information to be processed;
and processing the parameter information to be processed into the parameter information packet based on the sequence number information and the state.
In an embodiment, the receiving module is further configured to:
determining coding information of the parameter information packet;
and selecting a port corresponding to the coded information to decode the parameter information packet so as to obtain the navigation parameter information of the ship.
In an embodiment, the sending module is further configured to:
synthesizing the navigation parameter information and the identification data into a target data packet based on a preset data type;
and sending the target data packet to the mobile maritime equipment based on the data transmission mode corresponding to the preset data type.
In an embodiment, the sending module is further configured to:
if the preset data type is serial port data, synthesizing the navigation parameter information and the identification data into a target serial port data packet;
the step of sending the target data packet to the mobile maritime equipment based on the data transmission mode corresponding to the preset data type comprises the following steps:
and sending the target serial port data packet to a wireless transmission module through a serial port, and controlling the wireless transmission module to send the target serial port data packet to the mobile maritime equipment.
In an embodiment, the sending module is further configured to:
if the preset data type is peripheral component interconnect standard PCI data, synthesizing the navigation parameter information and the identification data into a target PCI data packet;
the step of sending the target data packet to the mobile maritime equipment based on the data transmission mode corresponding to the preset data type comprises the following steps:
and sending the target PCI data packet to a wireless transmission module through a PCI port, and controlling the wireless transmission module to send the target PCI data packet to the mobile maritime equipment.
To achieve the above object, a data transmission device includes a memory, a processor, and a data transmission program stored in the memory and executable on the processor, the data transmission program implementing the data transmission method as described above when executed by the processor.
To achieve the above object, the present invention also provides a computer-readable storage medium storing a data transmission program that realizes the data transmission method as described above when executed by a processor.
The data sending method provided by the invention receives the parameter information packet of the fixed maritime equipment of the ship, and decodes the parameter information packet to obtain the navigation parameter information of the ship; generating identification data corresponding to the ship based on the navigation parameter information and a preset rule; and synthesizing the navigation parameter information and the identification data into a target data packet, and sending the target data packet to the mobile maritime equipment. The parameter information packet is received and decoded to obtain identifiable navigation parameter information, then the navigation parameter information is synthesized into the target data packet, and the target data packet is sent to the mobile marine equipment, so that the mobile marine equipment can receive the parameter information of the fixed marine equipment and can identify the parameter information, and the mobile marine equipment and the fixed marine equipment can realize data transmission on the premise of complying with the NMEAA2000 protocol.
Drawings
FIG. 1 is a schematic diagram of an apparatus architecture of a hardware operating environment according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a first embodiment of a data transmission method according to the present invention;
fig. 3 is a schematic diagram of a specific scenario provided in a first embodiment of a data transmission method according to the present invention;
the implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention
As shown in fig. 1, fig. 1 is a schematic device structure diagram of a hardware operating environment according to an embodiment of the present invention.
The device of the embodiment of the invention can be a PC or a server device.
As shown in fig. 1, the apparatus may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the device configuration shown in fig. 1 does not constitute a limitation of the data transmission device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a data transmission program.
The operating system is a program for managing and controlling the data transmission equipment and software resources, and supports the operation of the network communication module, the user interface module, the data transmission program and other programs or software; the network communication module is used for managing and controlling the network interface 1002; the user interface module is used to manage and control the user interface 1003.
In the data transmission device shown in fig. 1, the data transmission device calls a data transmission program stored in the memory 1005 by the processor 1001, and performs operations in the respective embodiments of the data transmission method described below.
The main solution of the embodiment of the invention is as follows: receiving a parameter information packet of fixed maritime equipment of a ship, and decoding the parameter information packet to obtain navigation parameter information of the ship; generating identification data corresponding to the ship based on the navigation parameter information and a preset rule; and synthesizing the navigation parameter information and the identification data into a target data packet, and sending the target data packet to the mobile maritime equipment.
The technical terms related to the embodiment of the invention comprise:
PGN: the Parameter Group Number (Parameter Group Number) uniquely identifies a Parameter Group, plays a role of 'index' in the communication process, represents the content and the purpose of the message, and determines the type of the message and the frame Number required by the transmission data. Which may be understood as an index of a set of homogeneous (or common-featured) parameters.
PCI: peripheral Component Interconnect, a Peripheral Component Interconnect standard, is a standard developed by Intel corporation in 1991 for defining local buses.
CAN: controller Area Network, Controller Area Network.
MCU: microcontroller Unit, a single chip microcomputer micro control Unit of a data transmission device, in the following, an MCU denotes a data transmission device, also called a wireless forwarding device.
Based on the above hardware structure, the embodiment of the data transmission method of the present invention is provided.
The embodiment of the invention mainly relates to data transmission of fixed marine equipment and mobile marine equipment of a ship, in particular to a method for decoding a PGN statement which cannot be identified by the mobile marine equipment, namely a parameter information packet in the following, into navigation parameter information which can be identified by the mobile marine equipment by the fixed marine equipment of the ship through data sending equipment, synthesizing the navigation parameter information into a target data packet and sending the target data packet to the mobile marine equipment, so that the mobile marine equipment can receive and identify the data, and the data transmission of the fixed marine equipment and the mobile marine equipment is realized on the premise of not changing an NMEA2000 protocol.
The data sending equipment is also called wireless forwarding equipment in the embodiment, the data sending equipment is connected with the fixed marine equipment, the fixed marine equipment comprises an anemometer, a GPS receiver, an engine and a display instrument thereof, an electronic chart instrument, a desktop marine interphone and other equipment, and a marine wired communication network is formed between the data sending equipment and each fixed marine equipment through an NMEA2000 protocol, so that the data sending equipment can receive and identify PGN sentences of each fixed marine equipment according to the NMEA2000 protocol. The mobile marine equipment can be equipment such as a mobile marine detector, and the mobile marine equipment is not directly connected with the fixed marine equipment, so that the PGN sentences of the fixed marine equipment cannot be directly received and identified.
Referring to fig. 2, fig. 2 is a schematic flow chart of a first embodiment of the present invention, and the method includes:
s101, receiving a parameter information packet of fixed marine equipment of a ship, and decoding the parameter information packet to obtain navigation parameter information of the ship.
In this embodiment, the data sending device obtains PGN information from the NMEA2000 network, that is, a parameter information packet of the fixed marine device of the ship, and specifically, the data sending device is connected to the NMEA2000 network interface on the ship through the NMEA2000 aviation header, so as to receive the PGN information of the NMEA2000, and after the PGN information is converted into a level by the PCA82C250 chip, the PGN information is input to the MCU. In specific implementation, a real-time receiving or timing receiving mode can be adopted to receive the PGN information in the fixed marine device.
After the data sending equipment receives the parameter information packet in the fixed marine equipment of the ship, because the fixed marine equipment collects the corresponding navigation parameter information, in order to transmit on the NMEA2000 network, the navigation parameter information acquired by the NMEA2000 protocol is encapsulated into a parameter information packet, if the engine collects the engine speed, the engine speed will be calculated according to the NMEA2000 protocol, it is packaged into parameter information packet, so in order to obtain the target data packet which can be identified by the mobile maritime equipment, the parameter information packet is decoded first, specifically, the current parameter information packet is decoded according to NMEA2000 protocol, thereby obtaining the navigation parameter information of the ship, the navigation parameter information may be basic operation parameter information of the ship, such as navigation speed, heading, longitude and latitude, wind speed, water temperature, engine speed, oil temperature, oil pressure, power supply voltage, and other parameter information of the ship.
And S102, generating identification data corresponding to the ship based on the navigation parameter information and a preset rule.
In this embodiment, after the data sending device decodes the navigation parameter information, it encodes a frame of identification data according to the navigation parameter information and a preset rule, specifically, determines the packet length of the navigation parameter information and the character string identification code of the ship, and then generates the identification data according to the preset rule, where the preset rule is a user-defined identification data template, and may be as follows:
byte 0 is the packet length;
the 1 st, 2 nd, 3 th and 4 th bytes are head codes and can be character string identification codes of ships set by users;
the 5 th byte is the packet sequence number;
bytes 6, 7, 8 and 9 are StdId identifiers of the CAN bus;
bytes 10, 11, 12 and 13 are the ExtId identifier of the CAN bus;
the 14 th byte is an IDE identifier of a bit CAN bus;
the 15 th byte is the RTR identifier of the bit CAN;
the 16 th byte is the DLC identifier of the bit CAN;
bytes 17 to 24 are Data identifiers of CAN;
byte 25 is the FMI identifier of the bit CAN.
Specifically, the 0 th byte is the length of the limited data packet, the 1 st, 2 nd, 3 th, 4 th bytes are the header code in the identification data, and are the character string identification code, and the specific byte data can be set by the user. The 10 th byte to the 25 th byte are identifiers of the CAN bus, and the receiving position information and the transmission priority of the CAN bus CAN be set by self through setting the identifiers in the message transmission process of the CAN bus.
In specific implementation, the data sending equipment generates corresponding identification data according to the acquired navigation parameter information and a preset rule, namely an identification number data template, so that a target data packet can be sent to corresponding mobile maritime equipment according to the identification data in the subsequent process; or, the target data packet is broadcasted, and only the mobile maritime equipment which can identify the identification data can receive and identify the target data packet, so that the safe transmission of the data is realized.
S103, synthesizing the navigation parameter information and the identification data into a target data packet, and sending the target data packet to the mobile maritime equipment.
In the embodiment, after obtaining the navigation parameter information and the identification data, the data sending device synthesizes the navigation parameter information and the identification data into a target data packet, stores the target data packet into a First Input First Output (FIF 0) storage area for storage, and then sends the target data packet to be sent in the FIFO to the mobile maritime device in a wireless manner according to a First-in First-out sequence.
Specifically, step S103 includes:
synthesizing the navigation parameter information and the identification data into a target data packet based on a preset data type;
in a specific implementation process, the target data packets may be of multiple types, and in a synthesis and sending process, the navigation parameter information and the identification data may be generated into the target data packet of the specified data type according to the preset data type, where the preset data type includes serial port data, PCI data, and the like, and the target data packet of the specified data type includes the target serial port data packet, the target PCI data packet, and the like.
And sending the target data packet to the mobile maritime equipment based on the data transmission mode corresponding to the preset data type.
The data sending equipment sends the target data packet to the mobile maritime equipment according to a data transmission mode corresponding to the preset data type, wherein the data transmission mode corresponding to the preset data type comprises serial port transmission and PCI transmission.
Further, in another embodiment, the step of synthesizing the navigation parameter information and the identification data into a target data packet based on a preset data type includes:
if the preset data type is serial port data, synthesizing the navigation parameter information and the identification data into a target serial port data packet;
in the step, if the preset data type is determined to be serial port data, the navigation parameter information and the identification data are synthesized into a target serial port data packet according to a preset serial port protocol.
Correspondingly, the step of sending the target data packet to the mobile maritime equipment based on the data transmission mode corresponding to the preset data type comprises the following steps:
and sending the target serial port data packet to a wireless transmission module through a serial port, and controlling the wireless transmission module to send the target serial port data packet to the mobile maritime equipment.
That is, after the preset data type is determined to be serial port data, that is, the data transmission mode is determined to be serial port transmission, at this time, the data sending device sends the target serial port data packet to the wireless transmission module through the serial port, and controls the wireless transmission module to send the target serial port data packet to the mobile maritime device.
In another embodiment, the step of synthesizing the navigation parameter information and the identification data into a target data packet based on a preset data type includes:
if the preset data type is peripheral component interconnect standard PCI data, synthesizing the navigation parameter information and the identification data into a target PCI data packet;
in this step, if it is determined that the preset data type is PCI data, the line number parameter information and the identification data are synthesized into target PCI data according to a preset PCI protocol.
Correspondingly, the step of sending the target data packet to the mobile maritime equipment based on the data transmission mode corresponding to the preset data type comprises the following steps:
and sending the target PCI data packet to a wireless transmission module through a PCI port, and controlling the wireless transmission module to send the target PCI data packet to the mobile maritime equipment.
That is, after the preset data type is determined to be PCI data, that is, the data transmission mode is determined to be PCI transmission, at this time, the data sending device sends the target PCI data packet to the wireless transmission module through the PCI port, and controls the wireless transmission module to send the target PCI data packet to the mobile maritime device.
It should be noted that the process of generating the target data packet is substantially an encoding process, that is, encoding the navigation parameter information and the identification data obtained by decoding, in the encoding process, the target data packet may be encoded into serial port data or PCI data, and different data types adopt different data transmission modes, so that the target data packet is smoothly transmitted to the wireless transmission module, and the wireless transmission module is controlled to transmit the target data packet to the mobile maritime equipment.
To further describe the embodiment of the present invention, a specific scenario embodiment is provided below, as shown in fig. 3, in the data transmission method provided in the embodiment of the present invention, the NMEA2000 network collects parameter information packets of the fixed marine equipment, and transmitted to a data transmitting device (MCU) through the NMEA2000 air head, the MCU decodes the data to obtain the navigation parameter information of the ship, wherein the navigation parameter information is the running speed, running direction and the like of the ship, and generates identification data based on the navigation parameter information and a preset rule, and codes the navigation parameter information and the identification data into a target data packet, wherein, the target data packet comprises a target serial port data packet and a target PCI data packet, if the data type of the target data packet is serial port data, sending the target serial port data packet to the wireless transmission module through the serial port, and controlling the wireless transmission module to send the target serial port data packet to the mobile maritime equipment; and if the data type of the target data packet is PCI data, the target PCI data packet is sent to the wireless transmission module through the PCI port, and the wireless transmission module is controlled to send the target PCI data packet to the mobile maritime equipment.
The wireless transmission module consists of an nRF24L01 chip and a peripheral circuit, and is controlled to transmit a target data packet to the mobile maritime equipment in a 2.4G wireless signal mode after the data transmission equipment receives the target data packet.
The embodiment receives a parameter information packet of fixed maritime equipment of a ship, and decodes the parameter information packet to obtain navigation parameter information of the ship; generating identification data corresponding to the ship based on the navigation parameter information and a preset rule; and synthesizing the navigation parameter information and the identification data into a target data packet, and sending the target data packet to the mobile maritime equipment. The parameter information packet is received and decoded to obtain identifiable navigation parameter information, then the navigation parameter information is synthesized into the target data packet, and the target data packet is sent to the mobile marine equipment, so that the mobile marine equipment can receive the parameter information of the fixed marine equipment and can identify the parameter information, and the mobile marine equipment and the fixed marine equipment can realize data transmission on the premise of complying with the NMEAA2000 protocol.
Further, a second embodiment of the data transmission method of the present invention is proposed based on the first embodiment of the data transmission method of the present invention.
The second embodiment of the data transmission method differs from the first embodiment of the data transmission method in that the step of receiving a parameter information package of a stationary marine facility of a ship comprises:
s1011, receiving the parameter information to be processed of the fixed maritime equipment, and determining the serial number information of the parameter information to be processed;
since the PGN information adopts a packet transmission mode, the data transmission device may receive the parameter information to be processed of the fixed marine device in an interrupt reception manner, and then combine the parameter information to be processed into a parameter information packet.
Specifically, in the embodiment, after receiving the to-be-processed parameter information of the fixed maritime device, the data sending device writes the to-be-processed parameter information into the FIF0 storage area for storage, where the FIF0 storage area is a first-in first-out storage area, and the interrupt receiving mode is implemented by an interrupt function, and the interrupt function is used to receive the to-be-processed parameter information and determine the head and tail of the to-be-processed parameter and the packet length. Specifically, in the process of receiving the parameter information to be processed by the data sending device, the interrupt function obtains the packet length of the current parameter information to be processed, judges whether the data formed by the data head and the data tail of the parameter information to be processed is a whole packet or not in real time, interrupts receiving when the data formed by the data head and the data tail of the currently received parameter information to be processed is determined to be a whole packet, and then merges the parameter information to be processed and the parameter information to be processed of other same-sequence-number information into a parameter information packet according to the sequence number information of the parameter information to be processed.
Therefore, after receiving the to-be-processed parameter information of the fixed marine device, the data sending device needs to determine the sequence number information of the to-be-processed parameter information, where the to-be-processed parameter information of the fixed marine device is distinguished according to the NMEA2000 status, and the NMEA2000 status includes:
STATUS _ DEVICE _ INITIALIZE (serial number 0x00),
STATUS _ NDP _ clip _ address (sequence number 0x01),
STATUS _ NDP _ discover (serial number 0x02),
STATUS _ NDP _ CONNECTION (sequence number 0x03),
STATUS _ CMP _ CONNECTION (sequence number 0x04),
STATUS _ NDP _ DATA _ TRANSFER (sequence number 0x05),
STATUS _ CMP _ FIRMWARE _ UPDATE (sequence number 0x06),
STATUS _ CMP _ INTER _ SELFTEST (sequence number 0x07), and the like.
That is, after receiving the current parameter information to be processed, the sequence number information of the current parameter information to be processed can be determined by determining the NMEA2000 state of the corresponding fixed marine equipment.
And S1012, processing the parameter information to be processed into the parameter information packet based on the sequence number information.
And then, merging the parameter information to be processed with the same serial number information according to the serial number information, and finally processing the parameter information to be processed of the fixed maritime equipment into a parameter information packet.
Further, in another embodiment, the step of processing the parameter information to be processed into the parameter information packet based on the sequence number information comprises:
determining the state of the parameter information to be processed;
in this step, the data sending device first determines the state of the parameter information to be processed, where the state may be a network state, including a network busy state, a network idle state, and the like, and in specific implementation, the network state corresponding to the current parameter information to be processed may be detected according to the bandwidth.
And processing the parameter information to be processed into the parameter information packet based on the sequence number information and the state.
Then, according to the sequence number information of the current parameter information to be processed and the measured state, combining the parameter information to be processed with the same sequence number information and the same state into a packet, namely a parameter information packet.
Further, in another embodiment, step S102 includes:
determining coding information of the parameter information packet;
in another embodiment, the data sending device selects different ports to decode according to different parameter packets, that is, different ports fix and decode the corresponding parameter information, so that when the data sending device decodes the parameter packets, the data sending device needs to determine the encoding information of the parameter information first.
Specifically, the encoding information of the parameter packet may be determined according to the source type to which the parameter packet belongs, and the known PGN information received by the data transmission device, that is, the parameter packet includes:
rudder RUDDER direction (PGN code 0x1F10D)
VESSEL _ HEADING SHIP course (PGN encoded as 0x1F112)
RATE _ OF _ TURN Turn Rate (PGN encoded as 0x1F113)
MAGNETIC _ VARIATION MAGNETIC VARIATION (PGN encodes 0x1F11A)
Engine _ PARAMETER _ RAPID _ UPDATE engineering PARAMETER fast UPDATE (PGN encoded as 0x1F200)
ENGINE _ PARAMETER _ DYNAMIC kinetic PARAMETERs (PGN encoded as 0x1F201)
TRANSMISSION _ PARAMETER _ DYNAMIC Transmission PARAMETER (PGN encoded as 0x1F205)
TRIP _ PARAMETER _ TO _ VESSER three PARAMETERs (PGN encoded as 0x1F208)
FLUID _ LEVEL LEVEL (PGN code 0x1F211)
SPEED-WATER-REFERANCED Water flow Rate (PGN encoded as 0x1F503)
WATER DEPTH (PGN encoded as 0x1F50B), etc.
That is, the parameter packets of different source types correspond to different encoding information, so that the corresponding encoding information can be determined according to the source type of the parameter packets.
In addition, other rules may be set, such as encoding the parameter packets in time order.
And selecting a port corresponding to the coding information for decoding processing to obtain the navigation parameter information of the ship.
And then, according to the coding information, determining a port corresponding to the current parameter packet, and then, selecting the port to perform decoding processing on the current parameter packet, specifically, decoding according to the NMEA2000 protocol, which is not described in detail herein.
That is, the data transmission device has a plurality of ports, and each port is decoded specifically, so that the decoding speed and the decoding accuracy can be effectively improved.
According to the scheme, when the parameter information packet of the fixed marine equipment of the ship is received, the parameter information to be processed is acquired and combined based on the serial number information and the state, so that the parameter information packet is obtained. And after receiving the parameter information packet, the corresponding port is selected for decoding processing according to the corresponding coding information, so that the decoding speed and the decoding accuracy are improved.
The present invention also provides a data transmission apparatus, comprising:
the receiving module is used for receiving a parameter information packet of fixed maritime equipment of the ship and decoding the parameter information packet to obtain navigation parameter information of the ship;
the generating module is used for generating identification data corresponding to the ship based on the navigation parameter information and a preset rule;
and the sending module is used for synthesizing the navigation parameter information and the identification data into a target data packet and sending the target data packet to the mobile maritime equipment.
In an embodiment, the receiving module is further configured to:
receiving parameter information to be processed of the fixed maritime equipment, and determining sequence number information of the parameter information to be processed;
and processing the parameter information to be processed into the parameter information packet based on the sequence number information.
In an embodiment, the receiving module is further configured to:
determining the state of the parameter information to be processed;
and processing the parameter information to be processed into the parameter information packet based on the sequence number information and the state.
In an embodiment, the receiving module is further configured to:
determining coding information of the parameter information packet;
and selecting a port corresponding to the coded information to decode the parameter information packet so as to obtain the navigation parameter information of the ship.
In an embodiment, the sending module is further configured to:
synthesizing the navigation parameter information and the identification data into a target data packet based on a preset data type;
and sending the target data packet to the mobile maritime equipment based on the data transmission mode corresponding to the preset data type.
In an embodiment, the sending module is further configured to:
if the preset data type is serial port data, synthesizing the navigation parameter information and the identification data into a target serial port data packet;
the step of sending the target data packet to the mobile maritime equipment based on the data transmission mode corresponding to the preset data type comprises the following steps:
and sending the target serial port data packet to a wireless transmission module through a serial port, and controlling the wireless transmission module to send the target serial port data packet to the mobile maritime equipment.
In an embodiment, the sending module is further configured to:
if the preset data type is peripheral component interconnect standard PCI data, synthesizing the navigation parameter information and the identification data into a target PCI data packet;
the step of sending the target data packet to the mobile maritime equipment based on the data transmission mode corresponding to the preset data type comprises the following steps:
and sending the target PCI data packet to a wireless transmission module through a PCI port, and controlling the wireless transmission module to send the target PCI data packet to the mobile maritime equipment.
The invention also provides a computer readable storage medium.
The computer-readable storage medium of the present invention has stored thereon a data transmission program which, when executed by a processor, implements the steps of the data transmission method as described above.
The method implemented when the multi-currency transaction program running on the processor is executed may refer to various embodiments of the multi-currency transaction method of the present invention, and will not be described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.
Claims (10)
1. A data transmission method, characterized in that the data transmission method comprises the steps of:
receiving a parameter information packet of fixed maritime equipment of a ship, and decoding the parameter information packet to obtain navigation parameter information of the ship;
generating identification data corresponding to the ship based on the navigation parameter information and a preset rule;
and synthesizing the navigation parameter information and the identification data into a target data packet, and sending the target data packet to the mobile maritime equipment.
2. The data transmission method as claimed in claim 1, wherein the step of receiving the parameter information package of the fixed marine equipment of the ship comprises:
receiving parameter information to be processed of the fixed maritime equipment, and determining sequence number information of the parameter information to be processed;
and processing the parameter information to be processed into the parameter information packet based on the sequence number information.
3. The data transmission method according to claim 2, wherein the step of processing the parameter information to be processed into the parameter information packet based on the sequence number information comprises:
determining the state of the parameter information to be processed;
and processing the parameter information to be processed into the parameter information packet based on the sequence number information and the state.
4. The data transmission method according to claim 1, wherein the step of decoding the parameter information packet to obtain the marine parameter information of the ship comprises:
determining coding information of the parameter information packet;
and selecting a port corresponding to the coded information to decode the parameter information packet so as to obtain the navigation parameter information of the ship.
5. The data transmission method according to any one of claims 1 to 4, wherein the step of synthesizing the navigation parameter information and the identification data into a target data packet and transmitting the target data packet to the mobile maritime device comprises:
synthesizing the navigation parameter information and the identification data into a target data packet based on a preset data type;
and sending the target data packet to the mobile maritime equipment based on the data transmission mode corresponding to the preset data type.
6. The data transmission method according to claim 5, wherein the step of synthesizing the navigation parameter information and the identification data into a target data packet based on a preset data type includes:
if the preset data type is serial port data, synthesizing the navigation parameter information and the identification data into a target serial port data packet;
the step of sending the target data packet to the mobile maritime equipment based on the data transmission mode corresponding to the preset data type comprises the following steps:
and sending the target serial port data packet to a wireless transmission module through a serial port, and controlling the wireless transmission module to send the target serial port data packet to the mobile maritime equipment.
7. The data transmission method according to claim 5, wherein the step of combining the navigation parameter information and the identification data into a target data packet based on a preset data type comprises:
if the preset data type is peripheral component interconnect standard PCI data, synthesizing the navigation parameter information and the identification data into a target PCI data packet;
the step of sending the target data packet to the mobile maritime equipment based on the data transmission mode corresponding to the preset data type comprises the following steps:
and sending the target PCI data packet to a wireless transmission module through a PCI port, and controlling the wireless transmission module to send the target PCI data packet to the mobile maritime equipment.
8. A data transmission apparatus, characterized in that the data transmission apparatus comprises:
the receiving module is used for receiving a parameter information packet of fixed maritime equipment of the ship and decoding the parameter information packet to obtain navigation parameter information of the ship;
the generating module is used for generating identification data corresponding to the ship based on the navigation parameter information and a preset rule;
and the sending module is used for synthesizing the navigation parameter information and the identification data into a target data packet and sending the target data packet to the mobile maritime equipment.
9. A data transmission device, characterized in that the data transmission device comprises a memory, a processor and a data transmission program stored in the memory and executable on the processor, which data transmission program, when executed by the processor, implements the data transmission method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a data transmission program which, when executed by a processor, implements the data transmission method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911426176.2A CN111225415B (en) | 2019-12-31 | 2019-12-31 | Data transmission method, device, equipment and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911426176.2A CN111225415B (en) | 2019-12-31 | 2019-12-31 | Data transmission method, device, equipment and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111225415A true CN111225415A (en) | 2020-06-02 |
CN111225415B CN111225415B (en) | 2023-02-10 |
Family
ID=70825848
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911426176.2A Active CN111225415B (en) | 2019-12-31 | 2019-12-31 | Data transmission method, device, equipment and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111225415B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106658764A (en) * | 2017-01-10 | 2017-05-10 | 广州嘉航通信科技有限公司 | Wireless AIS base station |
CN107911290A (en) * | 2018-01-18 | 2018-04-13 | 深圳市夸克云电子信息技术有限公司 | A kind of gateway device for maritime electronic communication |
CN208400324U (en) * | 2018-05-31 | 2019-01-18 | 四川鸿创电子科技有限公司 | A kind of airborne aviation management data set in CNI identification |
-
2019
- 2019-12-31 CN CN201911426176.2A patent/CN111225415B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106658764A (en) * | 2017-01-10 | 2017-05-10 | 广州嘉航通信科技有限公司 | Wireless AIS base station |
CN107911290A (en) * | 2018-01-18 | 2018-04-13 | 深圳市夸克云电子信息技术有限公司 | A kind of gateway device for maritime electronic communication |
CN208400324U (en) * | 2018-05-31 | 2019-01-18 | 四川鸿创电子科技有限公司 | A kind of airborne aviation management data set in CNI identification |
Non-Patent Citations (1)
Title |
---|
孙力文 杨学斌 高旭: "基于NMEA2000标准的无人艇运动控制系统网络研究", 《第十四届中国智能交通年会论文集》 * |
Also Published As
Publication number | Publication date |
---|---|
CN111225415B (en) | 2023-02-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11845451B2 (en) | Automobile diagnostic method, apparatus, device and system, and diagnostic connection device | |
CN110417783B (en) | Data transmission method and device based on Internet of things, storage medium and terminal | |
CN205071021U (en) | Full duplex multiple access instant messaging terminal based on big dipper short message | |
CN110417510A (en) | System and method for dynamic and configurable air interface | |
CN114667761A (en) | Communication method and device, electronic device and storage medium | |
WO2021228131A1 (en) | Information transmission method and apparatus, and electronic device | |
CN112422978A (en) | Intelligent transcoding method and device, electronic equipment and storage medium | |
CN106792581A (en) | A kind of Big Dipper voice communication method and system | |
CN106712837A (en) | Communication node based on Beidou satellite navigation system, and communication method thereof | |
JP5156959B2 (en) | Communication control system, communication control method, and program | |
CN111225415B (en) | Data transmission method, device, equipment and computer readable storage medium | |
CN201839316U (en) | Center service platform device, mobile terminal and network system | |
CN101951406A (en) | Network transmission method and device | |
CN115225881A (en) | Data transmission method, device, equipment and storage medium | |
CN115023965B (en) | WLAN perception measurement establishment termination method and device, electronic equipment and storage medium | |
CN108289165B (en) | Method and device for realizing camera control based on mobile phone and terminal equipment | |
EP3447986B1 (en) | Information processing device, information processing system, and information processing method | |
CN113507530A (en) | Data forwarding method, related system and device and storage medium | |
KR101482492B1 (en) | Method and system for transmitting nmea 2000 network information | |
CN112423386A (en) | Internet of things terminal positioning method and device and related equipment | |
KR101528547B1 (en) | Universal Gateway System for NMEA 2000 | |
CN110636180A (en) | Data transmission method, device, equipment and storage medium | |
CN113518259B (en) | Data processing method and device | |
JPH11261664A (en) | Information communication system | |
CN117176962B (en) | Video encoding and decoding method and device and related equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |