CN115242823B - Method, system and gateway for processing message data in cross-network-segment communication - Google Patents

Method, system and gateway for processing message data in cross-network-segment communication Download PDF

Info

Publication number
CN115242823B
CN115242823B CN202110437754.3A CN202110437754A CN115242823B CN 115242823 B CN115242823 B CN 115242823B CN 202110437754 A CN202110437754 A CN 202110437754A CN 115242823 B CN115242823 B CN 115242823B
Authority
CN
China
Prior art keywords
signal
source
target
attribute
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110437754.3A
Other languages
Chinese (zh)
Other versions
CN115242823A (en
Inventor
黄光健
张雁英
程艳阶
何烈炎
李冠佳
刘合霖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Automobile Group Co Ltd
Original Assignee
Guangzhou Automobile Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Automobile Group Co Ltd filed Critical Guangzhou Automobile Group Co Ltd
Priority to CN202110437754.3A priority Critical patent/CN115242823B/en
Publication of CN115242823A publication Critical patent/CN115242823A/en
Application granted granted Critical
Publication of CN115242823B publication Critical patent/CN115242823B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a processing method of message data in cross-network segment communication, which comprises the following steps: when a gateway receives a source message sent by a certain node, determining a source node address, a target node address and a source signal carried on the source message, and determining a target signal carried by a message required by a target node according to the target node address; after detecting that the types of the signals contained in the source signal and the target signal are matched and consistent, and the characterization modes of the signals of the same type contained in the source signal and the target signal are matched and consistent, when the attribute of at least one signal of the same type on the source signal and the target signal is compared, modifying the signals in the source message until the attribute of the signal of the same type on the target signal is consistent; updating the source message based on the modified source signal and forwarding the source message to the target node. The invention can logically process the signal mode of the source message so as to solve the problem that the signal modes of the source message and the target message are inconsistent.

Description

Method, system and gateway for processing message data in cross-network-segment communication
Technical Field
The present invention relates to the field of communication management technologies of communication networks, and in particular, to a method, a system, and a gateway for processing packet data in cross-network segment communication.
Background
Along with the increasing degree of intelligent and networking of automobiles, the number of the ECUs of the whole automobile is increased continuously, so that the ECUs are required to be divided into different sub-network segments such as automobile bodies, power chassis, intelligent driving, new energy sources and the like according to the function realization and interaction conditions of the ECUs, and a gateway plays a role of a transfer station in the process of performing cross-network segment communication on the ECUs.
At present, the gateway adopts a traditional message and signal routing mode to transfer in the inter-network-segment communication, and specifically comprises the following steps: the gateway routes the message or the signal carried by the message from the source network segment to the target network segment so as to meet the function realization requirement of the ECU.
Take an example of a gateway of an AUTOSAR (Automotive Open System Architecture, automobile open system architecture) software architecture. In fig. 1, in the conventional message routing manner, a gateway receives a target message from a channel of a source network segment, and the target message reaches a protocol data unit routing layer PDUR through a driving layer CanDrv and an interface layer CanIf, and the data is distributed to a corresponding interface layer CanIf at the protocol data unit routing layer PDUR according to the type of a bus protocol followed by a target network, and then is transmitted to a bus through the driving layer CanDrv step by step. In fig. 2, the conventional signal routing manner is that a gateway receives a target packet from a channel of a source network segment and splits a plurality of signals, the signals reach a protocol data unit routing layer PDUR through a driving layer CanDrv and an interface layer CanIf, and then are respectively sent to a communication module layer COM to be recombined into a new signal group, and the new signal group is packaged step by step through the protocol data unit routing layer PDUR, the interface layer CanIf and the driving layer CanDrv and is transmitted to a target bus.
However, the above two conventional routing methods do not perform logic processing on signals, and cannot meet the requirements of different network segments when different enterprise standard buses are adopted, which may cause a problem that the source message and the target required message are inconsistent in terms of signals.
Disclosure of Invention
The technical problem to be solved by the embodiment of the invention is to provide a method, a system and a vehicle-mounted gateway for processing message data in cross-network segment communication, which can logically process signals of a source message and are used for solving the problem that the signals of the source message and a target message are inconsistent.
In order to solve the above technical problems, an embodiment of the present invention provides a method for processing packet data in cross-network segment communication, which is implemented on a communication network formed by interconnecting a plurality of subnets through the same gateway, where each of the subnets includes at least one node, and the method includes the following steps:
s1, when receiving a source message sent by a certain node, the gateway determines a source node address, a target node address and a source signal carried on the source message, and determines a target signal which the target node needs to carry in the message according to the target node address; wherein the source signal and the target signal are single signals characterized by one of unsigned continuous characters, discrete characters, signed continuous characters and check codes or signal groups mixed and characterized by a plurality of modes;
S2, after the fact that the types of the signals contained in the source signal and the target signal are matched and consistent and the characterization modes of the signals of the same type contained in the source signal and the target signal are matched and consistent is detected, respectively comparing the attributes of the signals of the same type on the source signal and the target signal, and when the attribute of at least one signal of the same type is inconsistent, modifying the signals of inconsistent comparison attributes in the source message until the attribute of each signal of the same type on the modified source signal and the attribute of each signal of the same type on the target signal are consistent; wherein, the attribute contrast of the signal represented by unsigned bit continuous characters comprises length and precision; comparing the attribute of the discrete character representation signal to be a signal value; the attribute comparison of the signal represented by the continuous characters with sign bits comprises sign bits, length and precision; comparing the attribute of the check code representation signal to be a check value;
and S3, updating the source message based on the modified source signal, and further forwarding the updated source message to the target node according to the target node address.
The step S2 specifically includes:
when the attribute contrast of the same type of signals represented by unsigned continuous characters or signed continuous characters on the source signal and the target signal is inconsistent in length, correspondingly setting the same type of signals in which the attribute contrast of the source signal and the target signal is inconsistent in length as a signal A and a signal B respectively;
If the length of the first signal is determined to be greater than that of the second signal, after the effective initial position corresponding to the second signal is determined in the first signal, an effective length area is further determined in the first signal, and other areas except the effective length area in the first signal are correspondingly assigned as invalid values, so that the lengths of the modified first signal and the modified second signal are consistent;
if the length of the first signal is smaller than the length of the second signal, after the effective start position of the corresponding second signal is determined in the first signal, the effective length area is further prolonged in the first signal along the preset direction until the length of the first signal after the effective length area is prolonged is equal to the length of the second signal, and the prolonged effective length areas in the first signal are assigned to 0, so that the lengths of the modified first signal and the modified second signal are consistent.
Wherein, the step S2 further includes:
when the attribute contrast of the same type of signals represented by unsigned continuous characters or signed continuous characters on the source signal and the target signal is consistent in length and inconsistent in precision, the attribute contrast of the same type of signals in the source signal and the target signal is consistent in length and inconsistent in precision is respectively and correspondingly set as a signal A and a signal B;
After the effective starting position of the second signal is determined in the first signal, the first signal is subjected to regional position adjustment according to the effective starting position of the second signal, so that the lengths and the precision of the modified first signal and the modified second signal are consistent.
The specific step of determining the valid start bit of the second signal in the first signal comprises the following steps:
acquiring a signal value transmitted to a bus by a source node and a signal value transmitted to the bus by a target node, and respectively corresponding to a CPU value serving as a first signal and a CPU value serving as a second signal;
respectively calculating to obtain a physical value of the first signal and a physical value of the second signal by combining the preset resolution and the preset offset of the corresponding source node and the target node, replacing the physical value of the second signal with the physical value of the first signal when the physical value of the first signal is larger than or equal to the physical value of the second signal, and inversely calculating the CPU value of the second signal by further combining the preset resolution and the preset offset of the target node;
and determining the effective start bit of the second signal in the first signal according to the CPU value of the second signal calculated in an inverse way.
Wherein, the step S2 further includes:
when the attribute comparison of the source signal and the target signal, which are characterized by discrete characters, of the same type of signals is inconsistent in signal value, the same type of signals, which are inconsistent in signal value, in the source signal and the target signal are correspondingly set as a signal A and a signal B respectively;
And mapping the signal value of the first signal into the signal value of the second signal according to a preset signal value mapping table so as to enable the signal values of the modified first signal and the modified second signal to be consistent.
Wherein, the step S2 further includes:
when the attribute contrast of the same type of signals represented by continuous characters with sign bits is inconsistent with the sign bits on the source signal and the target signal, correspondingly setting the same type of signals in which the attribute contrast of the source signal and the target signal is inconsistent with the sign bits as a signal A and a signal B respectively;
and according to a preset symbol bit conversion rule, converting the symbol bit of the A signal into the symbol bit of the B signal so as to enable the symbol bits of the modified A signal and the modified symbol bit of the B signal to be consistent.
The step of converting the sign bit of the first signal into the sign bit of the second signal according to a preset sign bit conversion rule specifically comprises the following steps:
if the first bit of the first signal is a non-symbol bit, acquiring a CPU value which is corresponding to the signal value transmitted to the bus by the source node and is used as the first signal, calculating to obtain a physical value of the first signal by combining the preset resolution and the preset offset of the source node, and setting the first bit of the first signal as a symbol bit and assigning 0 when the physical value of the first signal is larger than or equal to a preset numerical value; or when the physical value of the first signal is smaller than the preset value, setting the first bit of the first signal as a sign bit and assigning 1;
If the first bit of the first signal is the sign bit of the number 0 or 1, the sign bit of the first signal with the first bit of the number 0 is correspondingly converted into the positive sign attribute bit of the second signal, or the sign bit of the first signal with the first bit of the number 1 is correspondingly converted into the negative sign attribute bit of the second signal.
Wherein, the step S2 further includes:
the method comprises the steps that if the attribute comparison of the same type of signals represented by check codes on the source signal and the target signal is inconsistent with the check value, the same type of signals in the source signal and the target signal, the attribute of which is inconsistent with the check value, are correspondingly set as a first signal and a second signal respectively;
and after the first signal is checked to be normal, the check value of the first signal is converted into the check value of the second signal according to a preset second check algorithm, so that the check values of the modified first signal and the modified second signal are consistent.
The embodiment of the invention also provides a processing system of message data in cross-network segment communication, which is realized on a communication network formed by interconnecting a plurality of sub-networks through the same gateway, and each sub-network comprises at least one node, and comprises:
The gateway is used for receiving a source message sent by a node, determining a source node address, a target node address and a source signal carried on the source message, and determining a target signal which is required to be carried by the message and is required to be carried by the target node according to the target node address; wherein the source signal and the target signal are single signals characterized by one of unsigned continuous characters, discrete characters, signed continuous characters and check codes or signal groups mixed and characterized by a plurality of modes;
the source message signal attribute modification unit is used for respectively comparing the attributes of the source signal and the signals of the same type on the target signal after the matching and the consistency of the types of the signals contained in the source signal and the target signal are detected and the characterization modes of the signals of the same type are matched and consistent, and modifying the signals of which the comparison attributes are inconsistent in the source message when the attributes of at least one signal of the same type are inconsistent, until the attributes of each signal of the same type on the modified source signal and each signal of the same type on the target signal are consistent; wherein, the attribute contrast of the signal represented by unsigned bit continuous characters comprises length and precision; comparing the attribute of the discrete character representation signal to be a signal value; the attribute comparison of the signal represented by the continuous characters with sign bits comprises sign bits, length and precision; comparing the attribute of the check code representation signal to be a check value;
And the source message updating unit is used for updating the source message based on the modified source signal and further forwarding the updated source message to the target node according to the target node address.
The source message signal attribute modification unit includes:
the length attribute modification module is used for correspondingly setting the signals of the same type with inconsistent length in the source signal and the target signal as a signal A and a signal B respectively when the attribute contrast of the signals of the same type represented by unsigned continuous characters or signed continuous characters is inconsistent in length;
if the length of the first signal is determined to be greater than that of the second signal, after the effective initial position corresponding to the second signal is determined in the first signal, an effective length area is further determined in the first signal, and other areas except the effective length area in the first signal are correspondingly assigned as invalid values, so that the lengths of the modified first signal and the modified second signal are consistent;
if the length of the first signal is smaller than the length of the second signal, after the effective start position of the corresponding second signal is determined in the first signal, the effective length area is further prolonged in the first signal along the preset direction until the length of the first signal after the effective length area is prolonged is equal to the length of the second signal, and the prolonged effective length areas in the first signal are assigned to 0, so that the lengths of the modified first signal and the modified second signal are consistent.
Wherein, the source message signal attribute modification unit further comprises:
the precision attribute modification module is used for correspondingly setting the same type of signals with consistent length and inconsistent precision in the source signal and the target signal as a signal A and a signal B respectively when the attribute contrast of the same type of signals characterized by unsigned continuous characters or signed continuous characters is consistent in length and inconsistent in precision on the source signal and the target signal; and
after determining the effective starting position of the second signal in the first signal, adjusting the area position of the first signal according to the effective starting position of the second signal so that the lengths and the precision of the modified first signal and the modified second signal are consistent;
wherein, the source message signal attribute modification unit further comprises:
the signal value attribute modification module is used for respectively setting the signals of the same type, of which the attribute is compared with the signal value in the source signal and the target signal to be inconsistent, as a signal A and a signal B when the attribute is compared with the signal of the same type, of which the attribute is characterized by discrete characters, on the source signal and the target signal to be inconsistent;
and mapping the signal value of the first signal into the signal value of the second signal according to a preset signal value mapping table so as to enable the signal values of the modified first signal and the modified second signal to be consistent.
Wherein, the source message signal attribute modification unit further comprises:
the sign bit attribute modification module is used for correspondingly setting the signals of the same type with inconsistent sign bits in the source signal and the target signal as a signal A and a signal B respectively when the attribute contrast of the signals of the same type represented by continuous characters with sign bits is inconsistent with the sign bits on the source signal and the target signal;
and according to a preset symbol bit conversion rule, converting the symbol bit of the A signal into the symbol bit of the B signal so as to enable the symbol bits of the modified A signal and the modified symbol bit of the B signal to be consistent.
Wherein, the source message signal attribute modification unit further comprises:
the verification value attribute modification module is used for correspondingly setting the signals of the same type, which are characterized by the verification code and have inconsistent verification values, as a first signal and a second signal respectively when the attributes of the signals of the same type, which are characterized by the verification code, are compared with the attributes of the signals of the same type, which are characterized by the verification code, on the source signal and the target signal;
and after the first signal is checked to be normal, the check value of the first signal is converted into the check value of the second signal according to a preset second check algorithm, so that the check values of the modified first signal and the modified second signal are consistent.
In another embodiment of the present invention, a gateway connects a plurality of subnets, each subnet including at least one node, the gateway includes:
the source message receiving unit is used for determining a source node address, a target node address and a source signal carried on the source message when receiving the source message sent by a certain node, and determining a target signal which the target node needs to carry in the message according to the target node address; wherein the source signal and the target signal are single signals characterized by one of unsigned continuous characters, discrete characters, signed continuous characters and check codes or signal groups mixed and characterized by a plurality of modes;
the source message signal attribute modification unit is used for respectively comparing the attributes of the source signal and the signals of the same type on the target signal after the matching and the consistency of the types of the signals contained in the source signal and the target signal are detected and the characterization modes of the signals of the same type are matched and consistent, and modifying the signals of which the comparison attributes are inconsistent in the source message when the attributes of at least one signal of the same type are inconsistent, until the attributes of each signal of the same type on the modified source signal and each signal of the same type on the target signal are consistent; wherein, the attribute contrast of the signal represented by unsigned bit continuous characters comprises length and precision; comparing the attribute of the discrete character representation signal to be a signal value; the attribute comparison of the signal represented by the continuous characters with sign bits comprises sign bits, length and precision; comparing the attribute of the check code representation signal to be a check value;
And the source message updating unit is used for updating the source message based on the modified source signal and further forwarding the updated source message to the target node according to the target node address. .
The embodiment of the invention has the following beneficial effects:
the invention meets the target signal requirement carried by the message required by the target node by adaptively changing the attribute of the signal on the source message based on the traditional routing mode, such as length conversion, precision conversion, signal value definition conversion, sign bit conversion and check code conversion, thereby realizing logic processing on the signal of the source message and solving the problem that the signal of the source message is inconsistent with the signal of the target message.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions of the prior art, the drawings which are required in the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the description below are only some embodiments of the invention, and that it is within the scope of the invention to one skilled in the art to obtain other drawings from these drawings without inventive faculty.
FIG. 1 is a schematic diagram of a gateway in the prior art using a conventional message routing scheme;
fig. 2 is a logic schematic diagram of a gateway adopting a conventional signal routing manner in the prior art;
FIG. 3 is a flowchart of a method for processing message data in cross-network segment communication according to an embodiment of the present invention;
fig. 4 is a logic diagram adopted in the length conversion and/or the precision conversion between first and second signals in an application scenario of a method for processing message data in cross-network segment communication according to an embodiment of the present invention;
fig. 5 is a logic diagram adopted in symbol bit conversion and length conversion between first and second signals in an application scenario of a method for processing message data in cross-network segment communication according to an embodiment of the present invention;
fig. 6 is a logic diagram adopted when signal values between first and second signals are converted in an application scenario of a method for processing message data in cross-network segment communication according to an embodiment of the present invention;
fig. 7 is a logic diagram adopted when the check value between the first and second signals is converted in the application scenario of the method for processing the message data in the cross-network segment communication according to the embodiment of the present invention;
FIG. 8 is a schematic structural diagram of a processing system for message data in cross-network segment communication according to an embodiment of the present invention;
Fig. 9 is a schematic structural diagram of a gateway according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings, for the purpose of making the objects, technical solutions and advantages of the present invention more apparent.
As shown in fig. 3, in an embodiment of the present invention, a method for processing packet data in cross-network segment communication is provided, which is implemented on a communication network formed by interconnecting a plurality of subnets through the same gateway (e.g. an auto sar gateway), and each of the subnets includes at least one node (e.g. an ECU), and the method includes the following steps:
step S101, when receiving a source message sent by a certain node, the gateway determines a source node address, a target node address and a source signal carried on the source message, and determines a target signal which the target node needs to carry in the message according to the target node address; wherein the source signal and the target signal are single signals characterized by one of unsigned continuous characters, discrete characters, signed continuous characters and check codes or signal groups mixed and characterized by a plurality of modes;
step S102, after the fact that the types of the signals contained in the source signal and the target signal are matched and consistent and the characterization modes of the signals of the same type contained in the source signal and the target signal are matched and consistent is detected, respectively comparing the attributes of the signals of the same type on the source signal and the target signal, and when the attribute of at least one signal of the same type is not matched, modifying the signals of different types in the source message until the attribute of each signal of the same type on the modified source signal and the attribute of each signal of the same type on the target signal are uniform; wherein, the attribute contrast of the signal represented by unsigned bit continuous characters comprises length and precision; comparing the attribute of the discrete character representation signal to be a signal value; the attribute comparison of the signal represented by the continuous characters with sign bits comprises sign bits, length and precision; comparing the attribute of the check code representation signal to be a check value;
Step 103, updating the source message based on the modified source signal, and further forwarding the updated source message to the target node according to the target node address.
In the specific process, after the nodes on any sub-network are awakened, the nodes can send and receive messages through the gateway, and in view of different sending and receiving message formats of each sub-network or each node, the sending and receiving messages need to be converted to realize effective message transmission, so that the problem that the source message and the target required message are inconsistent in terms of signals is solved.
At this time, the gateway is preset with a communication matrix, and the communication matrix carries a routing table between the subnets and a specific format of a message required by each node. When the gateway receives a source message sent by a certain node, data including, but not limited to, a source node address, a target node address, a source signal and the like can be extracted from the source message, so that a routing path can be determined in a communication matrix according to the target node address, and a target signal which the message required by the target node needs to carry can be determined, and it can be known which target signals in the target node need to be matched with the source message finally. Wherein, the source signal and the target signal are single signals characterized by one of unsigned continuous characters, discrete characters, signed continuous characters and check codes or signal groups mixed and characterized by a plurality of modes.
It should be noted that, the signals carried by the node messages may be set according to the actual requirement type of the vehicle, such as a single signal or a combined signal of different types, such as a temperature signal, an oil pressure signal, a battery voltage signal, a battery remaining power signal, a speed signal, an acceleration signal, a switch control signal, and the like. Therefore, if the types of the source signal and the target signal are not matched and consistent, the source message carrying the signal of the same type as the target signal or the source message of other types of signals should be waited for to be combined (such as increased or decreased), otherwise, the message cannot be forwarded.
In step S102, first, it is detected whether the signal types contained in the source signal and the target signal are matched and consistent; if the two types of the source signals are inconsistent, the types of the source signals need to be increased or decreased (for example, signals carried by other source messages need to be subjected to signal compensation or redundant signals in the source signals need to be deleted), so that the types of the two types need to be matched and consistent; and secondly, further detecting whether the characterization modes of the signals of the same type contained in the two signals are matched and consistent, and if the characterization modes are not matched and consistent, adjusting the characterization modes of the source signals to realize the matching and consistent.
And then, after detecting that the types of the signals contained in the source signal and the target signal are matched and consistent, and the characterization modes of the signals of the same type contained in the source signal and the target signal are matched and consistent, respectively comparing the attributes of the signals of the same type on the source signal and the target signal, and when at least one signal of the same type is compared and inconsistent, modifying the signals of the inconsistent comparison attribute in the source message until the attributes of each signal of the same type on the modified source signal and the target signal are consistent.
In view of the difference of signal attribute contrast of different characterization modes, a detailed process of converting a source signal into a target signal is required, which is specifically as follows:
(1) Length attribute conversion: the attribute applies to both the same type of source and target signals characterized by unsigned or signed sequential characters.
At this time, when the attribute contrast of the same type of signals represented by unsigned continuous characters or signed continuous characters on the source signal and the target signal is inconsistent in length, the same type of signals in which the attribute contrast in the source signal and the target signal is inconsistent in length are respectively and correspondingly set as a signal A and a signal B;
if the length of the first signal is determined to be greater than that of the second signal, after the effective initial position corresponding to the second signal is determined in the first signal, an effective length area is further determined in the first signal, and other areas except the effective length area in the first signal are correspondingly assigned as invalid values, so that the lengths of the modified first signal and the modified second signal are consistent;
if the length of the first signal is determined to be smaller than that of the second signal, after the effective start bit corresponding to the second signal is determined in the first signal, the effective length area is further prolonged in the first signal along a preset direction (for example, the tail end of the first signal starts to be in the null bit or null data bit direction) until the length of the first signal after the effective length area is prolonged is equal to that of the second signal, and the prolonged effective length areas in the first signal are assigned to 0, so that the lengths of the modified first signal and the second signal are consistent.
The specific steps of determining the valid start bit of the second signal in the first signal include: acquiring a signal value transmitted to a bus by a source node and a signal value transmitted to the bus by a target node, and respectively corresponding to a CPU value serving as a first signal and a CPU value serving as a second signal; it should be noted that the CPU value is a signal value transmitted to the bus by each node (e.g., ECU), and may be automatically acquired through the gateway.
And respectively calculating the physical value of the first signal and the physical value of the second signal by combining the preset resolution and the preset offset of the corresponding source node and the target node, replacing the physical value of the second signal with the physical value of the first signal when the physical value of the first signal is larger than or equal to the physical value of the second signal, and inversely calculating the CPU value of the second signal by further combining the preset resolution and the preset offset of the target node. It should be noted that the resolution is a scale factor between the actual physical value of the signal carried by each node (e.g., ECU) message and the CPU value transmitted on the bus, which characterizes the signal accuracy; the offset is the offset between the actual physical value of the signal carried by each node (e.g., ECU) and the CPU value transmitted on the bus.
And determining the effective start bit of the second signal in the first signal according to the CPU value of the second signal calculated in an inverse way.
In one embodiment, as shown in fig. 4, when the length of the a signal is greater than the length of the b signal, the gateway follows the formula: physical value=cpu value+resolution+offset, respectively obtaining the physical value of the a signal and the physical value of the b signal; the CPU values and resolution, offset are respectively the CPU values, the preset resolution and the preset offset of the signal A and the signal B;
if the physical value of the a signal > =the physical value of the b signal, then according to the formula: CPU value 2= (physical value of a signal-offset 2)/resolution 2, and calculating the CPU value of a signal b in an inverse manner; then determining the effective initial bit of the second signal in the first signal according to the CPU value of the second signal calculated in an inverse way; packaging the second signal into corresponding message according to the initial bit and signal length of the second signal; finally, judging and uniformly processing the CPU value exceeding the second signal into an invalid value defined by the second signal through the gateway; the CPU value 2 is a CPU value for inversely calculating the second signal, and the resolution2 and the offset2 are respectively the preset resolution and the preset offset of the second signal.
If the physical value of the first signal is less than the physical value of the second signal, the communication software must be redesigned and changed for the first signal, and the adaptation cannot be performed by the gateway processing mode.
In another embodiment, as shown in fig. 4, when the length of the a signal is less than the length of the b signal, the gateway follows the formula: physical value=cpu value+resolution+offset, respectively obtaining the physical value of the a signal and the physical value of the b signal; the CPU values and resolution, offset are respectively the CPU values, the preset resolution and the preset offset of the signal A and the signal B;
if the physical value of the a signal > =the physical value of the b signal, then according to the formula: CPU value 2= (physical value of a signal-offset 2)/resolution 2, and calculating the CPU value of a signal b in an inverse manner; then determining the effective initial bit of the second signal in the first signal according to the CPU value of the second signal calculated in an inverse way; packaging the second signal into a corresponding message according to the start bit and the signal length of the second signal (namely, prolonging the effective length area of the first signal); finally, uniformly processing the length area of the A signal extension into 0 through a gateway; the CPU value 2 is a CPU value for inversely calculating the second signal, and the resolution2 and the offset2 are respectively the preset resolution and the preset offset of the second signal.
If the physical value of the first signal is less than the physical value of the second signal, the communication software must be redesigned and changed for the first signal, and the adaptation cannot be performed by the gateway processing mode.
(2) Precision attribute conversion: the attribute applies to both the same type of source and target signals characterized by unsigned or signed sequential characters.
When the attribute contrast of the same type of signals represented by unsigned continuous characters or signed continuous characters on the source signal and the target signal is consistent in length and inconsistent in precision, the attribute contrast of the same type of signals in the source signal and the target signal is consistent in length and inconsistent in precision is respectively and correspondingly set as a signal A and a signal B;
after the effective starting position of the second signal is determined in the first signal, the first signal is subjected to regional position adjustment according to the effective starting position of the second signal, so that the lengths and the precision of the modified first signal and the modified second signal are consistent.
It should be noted that, the specific step of determining the valid start bit of the b signal in the a signal is the same as the related content of the length attribute of the above (1), and will not be described herein.
It can be understood that the comparison of the attributes of the same type of signal represented by the unsigned continuous character or the signed continuous character can be performed simultaneously with the length and the accuracy, and the contents of the above (1) and (2) can be combined, which is not described herein again, and can be seen in fig. 4.
(3) Symbol bit attribute conversion: the attribute applies to both the same type of source signal and target signal characterized by signed bit sequential characters.
When the attribute contrast of the same type of signals represented by continuous characters with sign bits is inconsistent with the sign bits on the source signal and the target signal, correspondingly setting the same type of signals in which the attribute contrast of the source signal and the target signal is inconsistent with the sign bits as a first signal and a second signal respectively;
and according to a preset symbol bit conversion rule, converting the symbol bit of the A signal into the symbol bit of the B signal so as to enable the symbol bits of the modified A signal and the modified symbol bit of the B signal to be consistent.
The step of converting the sign bit of the first signal into the sign bit of the second signal according to a preset sign bit conversion rule specifically comprises the following steps:
if the first bit of the first signal is a non-symbol bit, acquiring a CPU value which is corresponding to the signal value transmitted to the bus by the source node and is used as the first signal, calculating to obtain a physical value of the first signal by combining the preset resolution and the preset offset of the source node, and setting the first bit of the first signal as a symbol bit and assigning 0 when the physical value of the first signal is larger than or equal to a preset numerical value; or when the physical value of the first signal is smaller than the preset value, setting the first bit of the first signal as a sign bit and assigning 1;
If the first bit of the first signal is the sign bit of the number 0 or 1, the sign bit of the first signal with the first bit of the number 0 is correspondingly converted into the positive sign attribute bit of the second signal, or the sign bit of the first signal with the first bit of the number 1 is correspondingly converted into the negative sign attribute bit of the second signal. It should be noted that, when the first bit of the first signal is a sign bit, the positive and negative properties of the sign bit may be determined according to the presence of the characters + and-in the first bit.
In one embodiment, if the first bit of the a signal is a non-sign bit, the gateway follows the formula: physical value = CPU value × resolution + offset, resulting in the physical value of the a signal; the CPU value and the resolution, offset are the CPU value, the preset resolution and the preset offset of the A signal respectively;
if the physical value of the first signal > =0, the first bit of the first signal is set as a sign bit and is assigned as 0; otherwise, if the physical value of the first signal is less than 0, the first bit of the first signal is set as the sign bit and is assigned as 1.
In another embodiment, if the first bit of the first signal is the sign bit of the number 0, the first signal is converted into the positive sign attribute bit of the second signal according to the table lookup; otherwise, if the first bit of the first signal is the sign bit of the number 1, the corresponding bit is converted into the negative sign attribute bit of the second signal according to the table lookup.
It should be noted that, the attribute comparison of the same type of signals represented by the continuous characters with sign bit may be performed simultaneously with at least one of the length and the precision of the sign bit, and the corresponding one or two contents of (3) and (1) and (2) may be combined, which is not described herein.
In one embodiment, the comparison of the properties of the same type of signal characterized by sequential characters with sign bits is exemplified by both sign bits and length.
As shown in fig. 5, the first bit of the a signal is a sign bit or a non-sign bit; when the first bit of the A signal is a sign bit, the positive and negative properties of the sign bit can be determined according to the positive and negative numbers of the actual physical value of the signal.
For example, the first bit of the signal a is a non-symbol bit, and the signed number is obtained by subtracting the offset from the transmitted CPU value, and the second signal represents the signed number by setting the signal highest bit as the symbol bit.
In the first step, the gateway obtains the real physical value of the first signal according to the formula, wherein the real physical value=cpu value is reset+offset, and then sends the symbol position bit of the second signal according to the symbol attribute of the real physical value of the first signal. If, first, the true physical value of the a signal > =the value m, the sign attribute is positive; otherwise, the sign attribute is negative, and then, looking up a table, correspondingly converting the first bit of the first signal into the corresponding positive and negative sign bit of the second signal.
And secondly, performing length conversion. Firstly, comparing the lengths of the first signal and the second signal, determining the effective start bit of the second signal in the first signal according to the comparison results of different lengths, and packaging the effective start bit and the signal length of the second signal into corresponding messages according to the start bit and the signal length of the second signal, wherein the content is the same as that of the specific embodiment of the above (1), and the details are not repeated here.
For example, the first bit of the signal a is a sign bit, and the highest bit of the signal is set as the sign bit to represent the signed number, and the second signal is obtained by subtracting the offset from the transmitted CPU value.
Firstly, the gateway judges whether the sign bit is 0 or not to obtain positive and negative attributes of the actual physical value of the A signal;
and step two, performing length conversion. Firstly, comparing the lengths of a signal A and a signal B, comparing the results according to different lengths, obtaining the absolute value of a physical value according to a formula by using the absolute value of the physical value = CPU value excluding a sign bit, and obtaining a real physical value by combining a sign attribute; then, the CPU value of the b signal is obtained by inverse operation, and the CPU value is filled in the position of the message where the target signal is located, and the content is the same as that of the embodiment (1) and will not be described herein.
(4) Signal value attribute conversion: this property applies to both source and target signals of the same type characterized by discrete characters.
When the attribute comparison of the same type of signals represented by discrete characters on the source signal and the target signal is inconsistent with the signal value, correspondingly setting the same type of signals of which the attribute comparison in the source signal and the target signal is inconsistent with the signal value as a first signal and a second signal respectively;
and mapping the signal value of the first signal into the signal value of the second signal according to a preset signal value mapping table so as to enable the signal values of the modified first signal and the modified second signal to be consistent.
In one embodiment, as shown in fig. 6, the signal values of the left side a signal are mapped to the signal values of the right side b signal by the signal value mapping table carried in the communication matrix.
(5) Verification value attribute conversion: this property applies to both source and target signals of the same type characterized by a check code.
The method comprises the steps that if the attribute comparison of the same type of signals represented by check codes on a source signal and a target signal is inconsistent with the check value, the same type of signals of which the attribute comparison in the source signal and the target signal is inconsistent with the check value are respectively and correspondingly set as a first signal and a second signal;
and after the first signal is checked to be normal, the check value of the first signal is converted into the check value of the second signal according to a preset second check algorithm, so that the check values of the modified first signal and the modified second signal are consistent.
In one embodiment, as shown in fig. 7, the gateway needs to check the nail signal according to the checking algorithm 1 at the receiving end. To ensure that the source message does not have errors on the transmission path from the source node to the gateway. After the gateway passes the check of the first signal, the gateway needs to repackage the first signal into the second signal according to the second signal in the message required by the target node and the check algorithm 2 so as to ensure that the source message has no error on the transmission path from the gateway to the target node.
It can be understood that when the source signal is a signal group represented by mixing a plurality of unsigned continuous characters, discrete characters, signed continuous characters and check codes, the above (1) to (5) can be combined and analyzed, and details of the above (1) to (5) are referred to herein, and are not repeated herein.
As shown in fig. 8, in an embodiment of the present invention, a processing system for packet data in cross-network segment communication is provided, which is implemented on a communication network formed by interconnecting a plurality of subnets through the same gateway, where each of the subnets includes at least one node, and includes:
a source message receiving unit 201, configured to determine a source node address, a target node address, and a source signal carried on a source message when the gateway receives the source message sent by a certain node, and determine a target signal that the target node needs to carry according to the target node address; wherein the source signal and the target signal are single signals characterized by one of unsigned continuous characters, discrete characters, signed continuous characters and check codes or signal groups mixed and characterized by a plurality of modes;
A source message signal attribute modification unit 202, configured to compare attributes of signals of the same type on the source signal and the target signal after the matching and coincidence of the types of the signals contained in the source signal and the target signal are detected, and after the matching and coincidence of the characterization modes of the signals of the same type are detected, and when at least one attribute of the signals of the same type is compared, modify the signals of the inconsistent comparison attribute in the source message until the attribute of each of the signals of the same type on the modified source signal and the target signal is uniform; wherein, the attribute contrast of the signal represented by unsigned bit continuous characters comprises length and precision; comparing the attribute of the discrete character representation signal to be a signal value; the attribute comparison of the signal represented by the continuous characters with sign bits comprises sign bits, length and precision; comparing the attribute of the check code representation signal to be a check value;
and a source message updating unit 203, configured to update the source message based on the modified source signal, and further forward the updated source message to the target node according to the target node address.
Wherein, the source message signal attribute modification unit 202 includes:
The length attribute modification module is used for correspondingly setting the signals of the same type with inconsistent length in the source signal and the target signal as a signal A and a signal B respectively when the attribute contrast of the signals of the same type represented by unsigned continuous characters or signed continuous characters is inconsistent in length;
if the length of the first signal is determined to be greater than that of the second signal, after the effective initial position corresponding to the second signal is determined in the first signal, an effective length area is further determined in the first signal, and other areas except the effective length area in the first signal are correspondingly assigned as invalid values, so that the lengths of the modified first signal and the modified second signal are consistent;
if the length of the first signal is smaller than the length of the second signal, after the effective start position of the corresponding second signal is determined in the first signal, the effective length area is further prolonged in the first signal along the preset direction until the length of the first signal after the effective length area is prolonged is equal to the length of the second signal, and the prolonged effective length areas in the first signal are assigned to 0, so that the lengths of the modified first signal and the modified second signal are consistent.
Wherein, the source message signal attribute modification unit 202 further includes:
the precision attribute modification module is used for correspondingly setting the same type of signals with consistent length and inconsistent precision in the source signal and the target signal as a signal A and a signal B respectively when the attribute contrast of the same type of signals characterized by unsigned continuous characters or signed continuous characters is consistent in length and inconsistent in precision on the source signal and the target signal; and
after determining the effective starting position of the second signal in the first signal, adjusting the area position of the first signal according to the effective starting position of the second signal so that the lengths and the precision of the modified first signal and the modified second signal are consistent;
wherein, the source message signal attribute modification unit 202 further includes:
the signal value attribute modification module is used for respectively setting the signals of the same type, of which the attribute is compared with the signal value in the source signal and the target signal to be inconsistent, as a signal A and a signal B when the attribute is compared with the signal of the same type, of which the attribute is characterized by discrete characters, on the source signal and the target signal to be inconsistent;
and mapping the signal value of the first signal into the signal value of the second signal according to a preset signal value mapping table so as to enable the signal values of the modified first signal and the modified second signal to be consistent.
Wherein, the source message signal attribute modification unit 202 further includes:
the sign bit attribute modification module is used for correspondingly setting the signals of the same type with inconsistent sign bits in the source signal and the target signal as a signal A and a signal B respectively when the attribute contrast of the signals of the same type represented by continuous characters with sign bits is inconsistent with the sign bits on the source signal and the target signal;
and according to a preset symbol bit conversion rule, converting the symbol bit of the A signal into the symbol bit of the B signal so as to enable the symbol bits of the modified A signal and the modified symbol bit of the B signal to be consistent.
Wherein, the source message signal attribute modification unit 202 further includes:
the verification value attribute modification module is used for correspondingly setting the signals of the same type, which are characterized by the verification code and have inconsistent verification values, as a first signal and a second signal respectively when the attributes of the signals of the same type, which are characterized by the verification code, are compared with the attributes of the signals of the same type, which are characterized by the verification code, on the source signal and the target signal;
and after the first signal is checked to be normal, the check value of the first signal is converted into the check value of the second signal according to a preset second check algorithm, so that the check values of the modified first signal and the modified second signal are consistent.
As shown in fig. 9, in an embodiment of the present invention, a gateway is provided, which connects a plurality of subnets, and each subnet includes at least one node, and the gateway includes:
the source message receiving unit 301 is configured to determine a source node address, a target node address, and a source signal carried on a source message when receiving a source message sent by a certain node, and determine a target signal that the target node needs to carry in a message according to the target node address; wherein the source signal and the target signal are single signals characterized by one of unsigned continuous characters, discrete characters, signed continuous characters and check codes or signal groups mixed and characterized by a plurality of modes;
a source message signal attribute modification unit 302, configured to compare attributes of signals of the same type on the source signal and the target signal after the matching and coincidence of the types of the signals contained in the source signal and the target signal are detected and the matching and coincidence of the characterization modes of the signals of the same type are detected, and when at least one of the attributes of the signals of the same type are compared and inconsistent, modify the signals of the inconsistent comparison attribute in the source message until the attributes of the modified source signal and each of the signals of the same type are consistent; wherein, the attribute contrast of the signal represented by unsigned bit continuous characters comprises length and precision; comparing the attribute of the discrete character representation signal to be a signal value; the attribute comparison of the signal represented by the continuous characters with sign bits comprises sign bits, length and precision; comparing the attribute of the check code representation signal to be a check value;
And a source message updating unit 303, configured to update the source message based on the modified source signal, and further forward the updated source message to the target node according to the target node address.
The embodiment of the invention has the following beneficial effects:
the invention meets the target signal requirement carried by the message required by the target node by adaptively changing the attribute of the signal on the source message based on the traditional routing mode, such as length conversion, precision conversion, signal value definition conversion, sign bit conversion and check code conversion, thereby realizing logic processing on the signal of the source message and solving the problem that the signal of the source message is inconsistent with the signal of the target message.
It should be noted that, in the above system embodiment, each included system unit is only divided according to the functional logic, but not limited to the above division, so long as the corresponding function can be implemented; in addition, the specific names of the functional units are also only for distinguishing from each other, and are not used to limit the protection scope of the present invention.
Those of ordinary skill in the art will appreciate that all or a portion of the steps in implementing the methods of the above embodiments may be implemented by a program to instruct related hardware, where the program may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc.
The foregoing disclosure is illustrative of the present invention and is not to be construed as limiting the scope of the invention, which is defined by the appended claims.

Claims (13)

1. A method for processing message data in cross-network segment communication, which is implemented on a communication network formed by interconnecting a plurality of subnetworks through the same gateway, and each subnetwork includes at least one node, the method comprising the steps of:
s1, when receiving a source message sent by a certain node, the gateway determines a source node address, a target node address and a source signal carried on the source message, and determines a target signal which the target node needs to carry in the message according to the target node address; wherein the source signal and the target signal are single signals characterized by one of unsigned continuous characters, discrete characters, signed continuous characters and check codes or signal groups mixed and characterized by a plurality of modes;
s2, after the fact that the types of the signals contained in the source signal and the target signal are matched and consistent and the characterization modes of the signals of the same type contained in the source signal and the target signal are matched and consistent is detected, respectively comparing the attributes of the signals of the same type on the source signal and the target signal, and when the attribute of at least one signal of the same type is inconsistent, modifying the signals of inconsistent comparison attributes in the source message until the attribute of each signal of the same type on the modified source signal and the attribute of each signal of the same type on the target signal are consistent; wherein, the attribute contrast of the signal represented by unsigned bit continuous characters comprises length and precision; comparing the attribute of the discrete character representation signal to be a signal value; the attribute comparison of the signal represented by the continuous characters with sign bits comprises sign bits, length and precision; comparing the attribute of the check code representation signal to be a check value;
S3, updating the source message based on the modified source signal, and further forwarding the updated source message to the target node according to the target node address;
wherein, the step S2 includes:
when the attribute comparison of the source signal and the target signal, which are characterized by discrete characters, of the same type of signals is inconsistent in signal value, the same type of signals, which are inconsistent in signal value, in the source signal and the target signal are correspondingly set as a signal A and a signal B respectively;
and mapping the signal value of the first signal into the signal value of the second signal according to a preset signal value mapping table so as to enable the signal values of the modified first signal and the modified second signal to be consistent.
2. The method for processing message data in cross-network segment communication according to claim 1, wherein the step S2 specifically includes:
when the attribute contrast of the same type of signals represented by unsigned continuous characters or signed continuous characters on the source signal and the target signal is inconsistent in length, correspondingly setting the same type of signals in which the attribute contrast of the source signal and the target signal is inconsistent in length as a signal A and a signal B respectively;
If the length of the first signal is determined to be greater than that of the second signal, after the effective initial position corresponding to the second signal is determined in the first signal, an effective length area is further determined in the first signal, and other areas except the effective length area in the first signal are correspondingly assigned as invalid values, so that the lengths of the modified first signal and the modified second signal are consistent;
if the length of the first signal is smaller than the length of the second signal, after the effective start position of the corresponding second signal is determined in the first signal, the effective length area is further prolonged in the first signal along the preset direction until the length of the first signal after the effective length area is prolonged is equal to the length of the second signal, and the prolonged effective length areas in the first signal are assigned to 0, so that the lengths of the modified first signal and the modified second signal are consistent.
3. The method for processing message data in cross-network segment communication according to claim 1, wherein the step S2 further comprises:
when the attribute contrast of the same type of signals represented by unsigned continuous characters or signed continuous characters on the source signal and the target signal is consistent in length and inconsistent in precision, the attribute contrast of the same type of signals in the source signal and the target signal is consistent in length and inconsistent in precision is respectively and correspondingly set as a signal A and a signal B;
After the effective starting position of the second signal is determined in the first signal, the first signal is subjected to regional position adjustment according to the effective starting position of the second signal, so that the lengths and the precision of the modified first signal and the modified second signal are consistent.
4. A method for processing packet data in cross-network segment communication according to claim 2 or 3, wherein the specific step of determining the valid start bit of the b signal in the a signal comprises:
acquiring a signal value transmitted to a bus by a source node and a signal value transmitted to the bus by a target node, and respectively corresponding to a CPU value serving as a first signal and a CPU value serving as a second signal;
respectively calculating to obtain a physical value of the first signal and a physical value of the second signal by combining the preset resolution and the preset offset of the corresponding source node and the target node, replacing the physical value of the second signal with the physical value of the first signal when the physical value of the first signal is larger than or equal to the physical value of the second signal, and inversely calculating the CPU value of the second signal by further combining the preset resolution and the preset offset of the target node;
and determining the effective start bit of the second signal in the first signal according to the CPU value of the second signal calculated in an inverse way.
5. The method for processing message data in cross-network segment communication according to claim 1, wherein the step S2 further comprises:
When the attribute contrast of the same type of signals represented by continuous characters with sign bits is inconsistent with the sign bits on the source signal and the target signal, correspondingly setting the same type of signals in which the attribute contrast of the source signal and the target signal is inconsistent with the sign bits as a signal A and a signal B respectively;
and according to a preset symbol bit conversion rule, converting the symbol bit of the A signal into the symbol bit of the B signal so as to enable the symbol bits of the modified A signal and the modified symbol bit of the B signal to be consistent.
6. The method for processing message data in cross-network segment communication as claimed in claim 5, wherein said step of converting the sign bit of the first signal into the sign bit of the second signal according to a predetermined sign bit conversion rule specifically comprises:
if the first bit of the first signal is a non-symbol bit, acquiring a CPU value which is corresponding to the signal value transmitted to the bus by the source node and is used as the first signal, calculating to obtain a physical value of the first signal by combining the preset resolution and the preset offset of the source node, and setting the first bit of the first signal as a symbol bit and assigning 0 when the physical value of the first signal is larger than or equal to a preset numerical value; or when the physical value of the first signal is smaller than the preset value, setting the first bit of the first signal as a sign bit and assigning 1;
If the first bit of the first signal is the sign bit of the number 0 or 1, the sign bit of the first signal with the first bit of the number 0 is correspondingly converted into the positive sign attribute bit of the second signal, or the sign bit of the first signal with the first bit of the number 1 is correspondingly converted into the negative sign attribute bit of the second signal.
7. The method for processing message data in cross-network segment communication according to claim 1, wherein the step S2 further comprises:
the method comprises the steps that if the attribute comparison of the same type of signals represented by check codes on the source signal and the target signal is inconsistent with the check value, the same type of signals in the source signal and the target signal, the attribute of which is inconsistent with the check value, are correspondingly set as a first signal and a second signal respectively;
and after the first signal is checked to be normal, the check value of the first signal is converted into the check value of the second signal according to a preset second check algorithm, so that the check values of the modified first signal and the modified second signal are consistent.
8. A system for processing message data in cross-network segment communication, which is implemented on a communication network formed by interconnecting a plurality of subnetworks through the same gateway, and each subnetwork includes at least one node, the system comprising:
The gateway is used for receiving a source message sent by a node, determining a source node address, a target node address and a source signal carried on the source message, and determining a target signal which is required to be carried by the message and is required to be carried by the target node according to the target node address; wherein the source signal and the target signal are single signals characterized by one of unsigned continuous characters, discrete characters, signed continuous characters and check codes or signal groups mixed and characterized by a plurality of modes;
the source message signal attribute modification unit is used for respectively comparing the attributes of the source signal and the signals of the same type on the target signal after the matching and the consistency of the types of the signals contained in the source signal and the target signal are detected and the characterization modes of the signals of the same type are matched and consistent, and modifying the signals of which the comparison attributes are inconsistent in the source message when the attributes of at least one signal of the same type are inconsistent, until the attributes of each signal of the same type on the modified source signal and each signal of the same type on the target signal are consistent; wherein, the attribute contrast of the signal represented by unsigned bit continuous characters comprises length and precision; comparing the attribute of the discrete character representation signal to be a signal value; the attribute comparison of the signal represented by the continuous characters with sign bits comprises sign bits, length and precision; comparing the attribute of the check code representation signal to be a check value;
A source message updating unit, configured to update the source message based on the modified source signal, and further forward the updated source message to the target node according to the target node address;
the source message signal attribute modification unit includes:
the signal value attribute modification module is used for respectively setting the signals of the same type, of which the attribute is compared with the signal value in the source signal and the target signal to be inconsistent, as a signal A and a signal B when the attribute is compared with the signal of the same type, of which the attribute is characterized by discrete characters, on the source signal and the target signal to be inconsistent; and
and mapping the signal value of the first signal into the signal value of the second signal according to a preset signal value mapping table so as to enable the signal values of the modified first signal and the modified second signal to be consistent.
9. The system for processing message data in cross-network segment communication as recited in claim 8, wherein the source message signal attribute modification unit includes:
the length attribute modification module is used for correspondingly setting the signals of the same type with inconsistent length in the source signal and the target signal as a signal A and a signal B respectively when the attribute contrast of the signals of the same type represented by unsigned continuous characters or signed continuous characters is inconsistent in length;
If the length of the first signal is determined to be greater than that of the second signal, after the effective initial position corresponding to the second signal is determined in the first signal, an effective length area is further determined in the first signal, and other areas except the effective length area in the first signal are correspondingly assigned as invalid values, so that the lengths of the modified first signal and the modified second signal are consistent;
if the length of the first signal is smaller than the length of the second signal, after the effective start position of the corresponding second signal is determined in the first signal, the effective length area is further prolonged in the first signal along the preset direction until the length of the first signal after the effective length area is prolonged is equal to the length of the second signal, and the prolonged effective length areas in the first signal are assigned to 0, so that the lengths of the modified first signal and the modified second signal are consistent.
10. The system for processing message data in cross-network segment communication as recited in claim 8, wherein the source message signal attribute modification unit further comprises:
the precision attribute modification module is used for correspondingly setting the same type of signals with consistent length and inconsistent precision in the source signal and the target signal as a signal A and a signal B respectively when the attribute contrast of the same type of signals characterized by unsigned continuous characters or signed continuous characters is consistent in length and inconsistent in precision on the source signal and the target signal; and
After the effective starting position of the second signal is determined in the first signal, the first signal is subjected to regional position adjustment according to the effective starting position of the second signal, so that the lengths and the precision of the modified first signal and the modified second signal are consistent.
11. The system for processing message data in cross-network segment communication as recited in claim 8, wherein the source message signal attribute modification unit further comprises:
the sign bit attribute modification module is used for correspondingly setting the signals of the same type with inconsistent sign bits in the source signal and the target signal as a signal A and a signal B respectively when the attribute contrast of the signals of the same type represented by continuous characters with sign bits is inconsistent with the sign bits on the source signal and the target signal;
and according to a preset symbol bit conversion rule, converting the symbol bit of the A signal into the symbol bit of the B signal so as to enable the symbol bits of the modified A signal and the modified symbol bit of the B signal to be consistent.
12. The system for processing message data in cross-network segment communication as recited in claim 8, wherein the source message signal attribute modification unit further comprises:
the verification value attribute modification module is used for correspondingly setting the signals of the same type, which are characterized by the verification code and have inconsistent verification values, as a first signal and a second signal respectively when the attributes of the signals of the same type, which are characterized by the verification code, are compared with the attributes of the signals of the same type, which are characterized by the verification code, on the source signal and the target signal;
And after the first signal is checked to be normal, the check value of the first signal is converted into the check value of the second signal according to a preset second check algorithm, so that the check values of the modified first signal and the modified second signal are consistent.
13. A gateway connecting a plurality of subnets, each subnet including at least one node, the gateway comprising:
the source message receiving unit is used for determining a source node address, a target node address and a source signal carried on the source message when receiving the source message sent by a certain node, and determining a target signal which the target node needs to carry in the message according to the target node address; wherein the source signal and the target signal are single signals characterized by one of unsigned continuous characters, discrete characters, signed continuous characters and check codes or signal groups mixed and characterized by a plurality of modes;
the source message signal attribute modification unit is used for respectively comparing the attributes of the source signal and the signals of the same type on the target signal after the matching and the consistency of the types of the signals contained in the source signal and the target signal are detected and the characterization modes of the signals of the same type are matched and consistent, and modifying the signals of which the comparison attributes are inconsistent in the source message when the attributes of at least one signal of the same type are inconsistent, until the attributes of each signal of the same type on the modified source signal and each signal of the same type on the target signal are consistent; wherein, the attribute contrast of the signal represented by unsigned bit continuous characters comprises length and precision; comparing the attribute of the discrete character representation signal to be a signal value; the attribute comparison of the signal represented by the continuous characters with sign bits comprises sign bits, length and precision; comparing the attribute of the check code representation signal to be a check value;
A source message updating unit, configured to update the source message based on the modified source signal, and further forward the updated source message to the target node according to the target node address;
the source message signal attribute modification unit includes:
the signal value attribute modification module is used for respectively setting the signals of the same type, of which the attribute is compared with the signal value in the source signal and the target signal to be inconsistent, as a signal A and a signal B when the attribute is compared with the signal of the same type, of which the attribute is characterized by discrete characters, on the source signal and the target signal to be inconsistent; and
and mapping the signal value of the first signal into the signal value of the second signal according to a preset signal value mapping table so as to enable the signal values of the modified first signal and the modified second signal to be consistent.
CN202110437754.3A 2021-04-22 2021-04-22 Method, system and gateway for processing message data in cross-network-segment communication Active CN115242823B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110437754.3A CN115242823B (en) 2021-04-22 2021-04-22 Method, system and gateway for processing message data in cross-network-segment communication

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110437754.3A CN115242823B (en) 2021-04-22 2021-04-22 Method, system and gateway for processing message data in cross-network-segment communication

Publications (2)

Publication Number Publication Date
CN115242823A CN115242823A (en) 2022-10-25
CN115242823B true CN115242823B (en) 2024-03-19

Family

ID=83666774

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110437754.3A Active CN115242823B (en) 2021-04-22 2021-04-22 Method, system and gateway for processing message data in cross-network-segment communication

Country Status (1)

Country Link
CN (1) CN115242823B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7020701B1 (en) * 1999-10-06 2006-03-28 Sensoria Corporation Method for collecting and processing data using internetworked wireless integrated network sensors (WINS)
CN104660500A (en) * 2015-03-13 2015-05-27 北京经纬恒润科技有限公司 Signal processing method and device
CN105681199A (en) * 2015-12-29 2016-06-15 北京经纬恒润科技有限公司 Method and device for processing message data in vehicular bus
CN106972944A (en) * 2016-12-07 2017-07-21 北京金蚂蚁德创科技有限公司 The collocation method of vehicle-mounted configurable gateway
WO2019137554A1 (en) * 2018-01-15 2019-07-18 中兴通讯股份有限公司 Method and device for ensuring operation security of ring network protocol
CN110641396A (en) * 2019-10-13 2020-01-03 国网山东省电力公司潍坊供电公司 Hybrid network architecture system of new energy commercial vehicle and new energy commercial vehicle
CN111343085A (en) * 2020-03-03 2020-06-26 东风汽车集团有限公司 Routing system and method of vehicle-mounted CAN bus gateway

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7020701B1 (en) * 1999-10-06 2006-03-28 Sensoria Corporation Method for collecting and processing data using internetworked wireless integrated network sensors (WINS)
CN104660500A (en) * 2015-03-13 2015-05-27 北京经纬恒润科技有限公司 Signal processing method and device
CN105681199A (en) * 2015-12-29 2016-06-15 北京经纬恒润科技有限公司 Method and device for processing message data in vehicular bus
CN106972944A (en) * 2016-12-07 2017-07-21 北京金蚂蚁德创科技有限公司 The collocation method of vehicle-mounted configurable gateway
WO2019137554A1 (en) * 2018-01-15 2019-07-18 中兴通讯股份有限公司 Method and device for ensuring operation security of ring network protocol
CN110641396A (en) * 2019-10-13 2020-01-03 国网山东省电力公司潍坊供电公司 Hybrid network architecture system of new energy commercial vehicle and new energy commercial vehicle
CN111343085A (en) * 2020-03-03 2020-06-26 东风汽车集团有限公司 Routing system and method of vehicle-mounted CAN bus gateway

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
关静 ; 杨欣茹 ; 周亚棱 ; .基于信号相似度原理的CAN信号解析方法.汽车工程学报.2020,(第01期),全文. *
基于信号相似度原理的CAN信号解析方法;关静;杨欣茹;周亚棱;;汽车工程学报(第01期);全文 *

Also Published As

Publication number Publication date
CN115242823A (en) 2022-10-25

Similar Documents

Publication Publication Date Title
KR940011491B1 (en) Method and apparatus for managing address information utilized in message transmission and reception
EP1886214B1 (en) Method, apparatus and vehicle network
CN108683594B (en) Vehicle gateway routing method, device, vehicle and storage medium
US20190313224A1 (en) Automated vehicle systems and control logic for smart data exchanges using enhanced bloom filters
CN104125152A (en) Vehicle-mounted gateway-based method for improving vehicle-mounted network reliability
CN105388858A (en) Operation method of communication node in network
CN113542277B (en) Method, system, medium, and apparatus for CANOPEN device bridging through TSN network
KR20200136751A (en) Apparatus for communicating diagnosis of a vehicle, system having the same and method thereof
JP4391025B2 (en) Method for communicating between various nodes of a control system with multiple processing devices
CN113810270A (en) Method and device for realizing SOA (service oriented architecture) of local area network of vehicle-mounted controller
CN114679289B (en) Vehicle-mounted communication system and vehicle
US20190296937A1 (en) Central Data Store in Vehicle Electrical System
CN115242823B (en) Method, system and gateway for processing message data in cross-network-segment communication
CN111083055B (en) Client device management method and device, router and storage medium
US20220335056A1 (en) Vehicle data management device, vehicle data management system, and method of managing vehicle data
CN111464443A (en) Message forwarding method, device, equipment and storage medium based on service function chain
Elhadeedy et al. 60 GHz Wi-Fi as a Tractor-Trailer Wireless Harness
KR20220141271A (en) Gateway for vehicle Ethernet communication and message routing method thereof
CN114338678A (en) Intelligent networking automobile operating system application layer switching method and device
Zeltwanger Zonal Network Architecture and CAN Networks
CN115514639A (en) Network management method, system, switch and storage medium for cross-device link aggregation
KR100773076B1 (en) Method for transmitting and receiving dynamic can communication data
CN118612134A (en) Method and device for realizing message routing based on AUTOSAR
US20230164221A1 (en) Network communication system and process to optimize network performance
CN112565088B (en) Message processing method, system, device and network 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