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

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

Info

Publication number
CN115242823A
CN115242823A CN202110437754.3A CN202110437754A CN115242823A CN 115242823 A CN115242823 A CN 115242823A CN 202110437754 A CN202110437754 A CN 202110437754A CN 115242823 A CN115242823 A CN 115242823A
Authority
CN
China
Prior art keywords
signal
source
target
attribute
bit
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
Application number
CN202110437754.3A
Other languages
Chinese (zh)
Other versions
CN115242823B (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

Images

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 method for processing message data in cross-network 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 which is required to be carried by the message of a target node according to the target node address; after the matching of the signal types of the source signal and the target signal is detected to be consistent and the characterization modes of the same type signals contained in the source signal and the target signal are matched to be consistent, when the attribute inconsistency of at least one signal of the same type on the source signal and the target signal is compared, the signals in the source message are all modified until the attributes of the same type signals on the source signal and the target signal are consistent; and updating the source message based on the modified source signal, and forwarding the source message to the target node. The invention can carry out logic processing on the signal mode of the source message, and is used for solving the problem that the source message and the message required by the target are inconsistent in the aspect of the signal mode.

Description

Method, system and gateway for processing message data in cross-network communication
Technical Field
The present invention relates to the field of communication network management technologies, and in particular, to a method, a system, and a gateway for processing packet data in cross-segment communication.
Background
With the increasing degree of automobile intellectualization and networking, the number of the entire automobile ECUs is increasing, so that the ECUs need to be divided into different sub-network segments such as an automobile body, a power chassis, intelligent driving and new energy sources according to the function realization and interaction conditions of the ECUs, and the gateway plays a role of a transfer station in cross-network segment communication of the ECUs.
At present, a gateway transfers a packet and a signal in a traditional routing manner in cross-network communication, which specifically includes: 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 a gateway of Automotive Open System Architecture (autosave Open System Architecture) software Architecture as an example. In fig. 1, in a conventional message routing manner, a gateway receives a target message from a channel of a source network segment, and reaches a protocol data unit routing layer PDUR via a driver layer CanDrv and an interface layer CanIf, and the protocol data unit routing layer PDUR allocates data to the corresponding interface layer CanIf according to a bus protocol type followed by a target network, and then transmits the data to a bus step by step via the driver layer CanDrv. In fig. 2, in a conventional signal routing manner, a gateway receives a target message from a channel of a source network segment and splits the target message into a plurality of signals, and after reaching a protocol data unit routing layer PDUR via a driver layer CanDrv and an interface layer CanIf, the signals are respectively sent to a communication module layer COM to be recombined into a new signal group, and then the new signals are further packed into new messages one by one via the protocol data unit routing layer PDUR, the interface layer CanIf and the driver layer CanDrv and transmitted to a target bus.
However, the two traditional routing methods do not perform logic processing on signals, and cannot meet the requirements when different network segments adopt different enterprise standard buses, which causes the problem that the source message and the message required by the target are inconsistent in terms of signals.
Disclosure of Invention
The technical problem to be solved by the embodiments of the present invention is to provide a method, a system and a vehicle-mounted gateway for processing message data in cross-network segment communication, which can perform logic processing on a signal of a source message, so as to solve the problem that the source message and a message required by a target are inconsistent in terms of signal.
In order to solve the above technical problem, an embodiment of the present invention provides a method for processing packet data in cross-segment communication, which is implemented on a communication network formed by a plurality of subnets interconnected by a same gateway, and each subnet includes at least one node, where 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 to be carried by a message required by a target node according to the target node address; wherein, the source signal and the target signal are both single signals characterized by one of non-sign bit continuous characters, discrete characters, sign bit continuous characters and check codes or signal groups which are characterized by a plurality of modes in a mixed mode;
s2, after the source signal and the target signal are detected to be matched and consistent in signal type 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 modifying the signals with inconsistent comparison attributes in the source message when the attribute of at least one signal of the same type is inconsistent, until the attributes of the modified source signal and each signal of the same type on the target signal are consistent; wherein, the attribute contrast of the signal is characterized by continuous characters without sign bits, including length and precision; comparing attributes of discrete character representation signals to obtain signal values; the attribute contrast of the signal is characterized by sign bit continuous characters, including sign bit, length and precision; comparing the attributes of the check code representation signals to be check values;
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.
Wherein the step S2 specifically includes:
when the attribute contrast of the same type of signals represented by continuous characters with unsigned bits or continuous characters with signed bits is inconsistent with the length of the target signal, the same type of signals with the attribute contrast of the same type of signals with inconsistent length in the source signal and the target signal are respectively and correspondingly set as a signal A and a signal B;
if the length of the signal A is judged to be larger than that of the signal B, after an effective start bit corresponding to the signal B is determined in the signal A, an effective length area is further determined in the signal A, and other areas except the effective length area in the signal A are correspondingly assigned as invalid values, so that the lengths of the modified signal A and the signal B are consistent;
if the length of the signal A is smaller than that of the signal B, after the effective start bit corresponding to the signal B is determined in the signal A, the effective length area is further extended in the signal A along the preset direction until the length of the signal A after the effective length area is extended is equal to that of the signal B, and the extended effective length areas in the signal A are all assigned to be 0, so that the lengths of the modified signal A and the signal B are consistent.
Wherein, the step S2 further comprises:
when the source signal and the target signal have the same type of signals characterized by continuous characters with no sign bit or continuous characters with sign bit, the attribute contrast of the same type of signals is consistent in length and inconsistent in precision, and the same type of signals in the source signal and the target signal, the attribute contrast of which is consistent in length and inconsistent in precision, are correspondingly set as a signal A and a signal B respectively;
after the effective start bit of the signal B is determined in the signal A, the region position of the signal A is adjusted according to the effective start bit of the signal B, so that the length and the precision of the modified signal A and the signal B are consistent.
Wherein, the specific step of determining the effective start bit of the signal B in the signal A 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 the signal values to be used as a CPU value of a signal A and a CPU value of a signal B;
respectively calculating a physical value of the signal A and a physical value of the signal B by combining the respective preset resolutions and preset offsets of the corresponding source node and the target node, replacing the physical value of the signal A with the physical value of the signal B when the physical value of the signal A is judged to be more than or equal to the physical value of the signal B, and further inversely calculating a CPU value of the signal B by combining the preset resolutions and the preset offsets of the target node;
and determining the effective start bit of the signal B in the signal A according to the inverse CPU value of the signal B.
Wherein, the step S2 further comprises:
when the attribute of a signal of the same type represented by discrete characters on the source signal and the target signal is compared to be inconsistent with a signal value, the signal of the same type with the attribute being compared to be inconsistent with the signal value in the source signal and the target signal is respectively and correspondingly set as a signal A and a signal B;
and mapping the signal value of the A signal to the signal value of the B signal according to a preset signal value mapping table so as to enable the modified signal values of the A signal and the B signal to be consistent.
Wherein, the step S2 further comprises:
when the attribute contrast of a signal of the same type represented by continuous characters with sign bits on the source signal and the target signal is inconsistent with the sign bits, the signal of the same type with the attribute contrast of the sign bits inconsistent in the source signal and the target signal is respectively and correspondingly set as a signal A and a signal B;
and converting the sign bit of the signal A into the sign bit of the signal B according to a preset sign bit conversion rule, so that the sign bits of the modified signal A and the modified signal B are consistent.
Wherein, the step of transforming the sign bit of the signal a into the sign bit of the signal b according to a preset sign bit transformation rule specifically comprises:
if the first bit of the A signal is a non-sign bit, acquiring a CPU value corresponding to a signal value transmitted to the bus by a source node as the A signal, calculating to obtain a physical value of the A signal by combining a preset resolution and a preset offset of the source node, and setting the first bit of the A signal as a sign bit and assigning the sign bit as 0 when the physical value of the A signal is greater than or equal to a preset value; or when the physical value of the A signal is smaller than the preset value, setting the first bit of the A signal as a sign bit and assigning 1;
if the first bit of the A signal is the sign bit of digital 0 or 1, the sign bit of the first bit of the A signal, which is digital 0, is correspondingly converted into the positive sign attribute bit of the B signal, or the sign bit of the first bit of the A signal, which is digital 1, is correspondingly converted into the negative sign attribute bit of the B signal.
Wherein, the step S4 further comprises:
if the attribute contrast of a signal of the same type represented by a check code on the source signal and the target signal is inconsistent, correspondingly setting the signal of the same type with the attribute contrast of the source signal and the target signal being inconsistent as a signal A and a signal B respectively;
and verifying the signal A according to a preset first verification algorithm, and after the signal A is verified to be normal, transforming the verification value of the signal A into the verification value of the signal B according to a preset second verification algorithm so as to enable the modified verification values of the signal A and the signal B to be consistent.
An embodiment of the present invention further provides a system for processing packet data in cross-segment communication, which is implemented on a communication network formed by a plurality of subnets interconnected through a same gateway, and each subnet includes at least one node, including:
a source message receiving unit, configured to determine, when the gateway receives a source message sent by a certain node, a source node address, a destination node address, and a source signal that are carried on the source message, and determine, according to the destination node address, a destination signal that is to be carried by a message required by a destination node; wherein, the source signal and the target signal are both single signals characterized by one of non-sign bit continuous characters, discrete characters, sign bit continuous characters and check codes or signal groups which are characterized by a plurality of modes in a mixed mode;
a source message signal attribute modifying unit, configured to compare attributes of the same type signals on the source signal and the target signal after it is detected that the source signal and the target signal are matched and consistent in signal type and characterization modes of the same type signals are matched and consistent in both, and modify the signals with inconsistent comparison attributes in the source message when at least one attribute of the same type signal is different, until the attributes of the modified source signal and each of the same type signals on the target signal are consistent; wherein, attribute contrast of the signal is characterized by continuous characters without sign bits, including length and precision; comparing attributes of the discrete character representation signals into signal values; the attribute contrast of the signal is characterized by sign bit continuous characters, including sign bit, length and precision; comparing the attributes of the check code representation signals to be check values;
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.
Wherein, the source message signal attribute modifying unit comprises:
a length attribute modification module, configured to, when an attribute comparison of a signal of the same type represented by an unsigned bit continuous character or a signed bit continuous character is inconsistent in length between the source signal and the target signal, set the signal of the same type, in which the attribute comparison is inconsistent in length, in the source signal and the target signal as an a signal and a b signal, respectively;
if the length of the signal A is judged to be larger than that of the signal B, after an effective start bit corresponding to the signal B is determined in the signal A, an effective length area is further determined in the signal A, and other areas except the effective length area in the signal A are correspondingly assigned as invalid values, so that the lengths of the modified signal A and the signal B are consistent;
if the length of the first signal is smaller than that of the second signal, after an effective start bit corresponding to the second signal is determined in the first signal, an effective length area is further extended in the first signal along the preset direction until the length of the first signal after the effective length area is extended is equal to that of the second signal, and the extended effective length areas in the first signal are all assigned to be 0, so that the lengths of the modified first signal and the modified second signal are consistent.
Wherein the source packet signal attribute modification unit further includes:
the precision attribute modification module is used for correspondingly setting signals of the same type, which are represented by continuous characters with no sign bit or continuous characters with sign bit, of the source signal and the target signal and have the same attribute contrast as the signals of the same type, which have the same length and the different precision, as a signal A and a signal B respectively when the source signal and the target signal have the same attribute contrast as the signals of the same type, which are represented by the continuous characters with no sign bit or the continuous characters with sign bit; and
after the effective start bit of the signal B is determined in the signal A, adjusting the region position of the signal A according to the effective start bit of the signal B, so that the length and the precision of the modified signal A and the signal B are consistent;
wherein the source packet signal attribute modification unit further includes:
the signal value attribute modification module is used for respectively and correspondingly setting the signals of the same type with the attribute contrasted as the inconsistency of the signal values in the source signal and the target signal as a signal A and a signal B when the attribute contrasts as the inconsistency of the signal values in the same type with the attribute contrasted as the inconsistency of the signal values in the source signal and the target signal;
and mapping the signal value of the signal A to the signal value of the signal B according to a preset signal value mapping table so as to enable the modified signal values of the signal A and the signal B to be consistent.
Wherein the source packet signal attribute modification unit further includes:
a sign bit attribute modification module, configured to, when the attribute contrast of a signal of the same type represented by a sign bit continuous character on the source signal and the target signal is a sign bit inconsistency, set the signal of the same type whose attribute contrast is the sign bit inconsistency in the source signal and the target signal as an a signal and a b signal, respectively;
and converting the sign bit of the signal A into the sign bit of the signal B according to a preset sign bit conversion rule, so that the sign bits of the modified signal A and the modified signal B are consistent.
Wherein the source packet signal attribute modification unit further includes:
a check value attribute modification module, configured to compare attributes of signals of the same type represented by a check code on the source signal and the target signal to obtain a check value inconsistency, and set the signals of the same type having the attribute compared to the check value inconsistency in the source signal and the target signal as a signal a and a signal b, respectively;
and verifying the signal A according to a preset first verification algorithm, and after the signal A is verified to be normal, transforming the verification value of the signal A into the verification value of the signal B according to a preset second verification algorithm so as to enable the modified verification values of the signal A and the signal B to be consistent.
A gateway according to another embodiment of the present invention is a gateway, which connects a plurality of subnets, each subnet including at least one node, and the gateway includes:
a source message receiving unit, configured to determine, when a source message sent by a certain node is received, a source node address, a destination node address, and a source signal that are carried on the source message, and determine, according to the destination node address, a destination signal that a message required by a destination node should carry; wherein, the source signal and the target signal are both single signals characterized by one of non-sign bit continuous characters, discrete characters, sign bit continuous characters and check codes or signal groups which are characterized by a plurality of modes in a mixed mode;
a source message signal attribute modifying unit, configured to compare attributes of the source signal and the target signal after it is detected that the source signal and the target signal have the same signal type matching and the same signal type matching, and when at least one signal of the same type is different in attribute, modify the signals with different attributes in the source message until the modified source signal and each signal of the same type on the target signal have the same attribute; wherein, the attribute contrast of the signal is characterized by continuous characters without sign bits, including length and precision; comparing attributes of discrete character representation signals to obtain signal values; the attribute contrast of the signal is characterized by sign bit continuous characters, including sign bit, length and precision; comparing attributes of the check code representation signals to obtain 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 needed by the target node through the gateway 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 the logic processing of the signal of the source message and solving the problem that the source message and the message needed by the target are inconsistent in signal aspect.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is within the scope of the present invention for those skilled in the art to obtain other drawings based on the drawings without inventive exercise.
Fig. 1 is a logic diagram of a gateway adopting a conventional message routing manner in the prior art;
fig. 2 is a logic diagram illustrating a conventional signal routing manner adopted by a gateway in the prior art;
fig. 3 is a flowchart of a method for processing message data in cross-network communication according to an embodiment of the present invention;
fig. 4 is a logic diagram adopted in length conversion and/or precision conversion between the first and second signals in an application scenario of the method for processing message data in cross-network segment communication according to the embodiment of the present invention;
fig. 5 is a logic diagram adopted in sign bit conversion and length conversion between the first and second signals in an application scenario of the method for processing message data in cross-network segment communication according to the embodiment of the present invention;
fig. 6 is a logic diagram adopted in signal value conversion between the first signal and the second signal in an application scenario of the method for processing message data in cross-network segment communication according to the embodiment of the present invention;
fig. 7 is a logic diagram adopted in the conversion of check values between the first and second signals in an application scenario of the method for processing message data in cross-network segment communication according to the embodiment of the present invention;
fig. 8 is a schematic structural diagram of a system for processing message data in cross-network 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
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail with reference to the accompanying drawings.
As shown in fig. 3, an embodiment of the present invention provides a method for processing packet data in cross-segment communication, where the method is implemented on a communication network formed by multiple subnets interconnected through a same gateway (e.g., an automotive open system gateway), and each subnet 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 to be carried by a message required by a target node according to the target node address; the source signal and the target signal are both single signals characterized in one of an unsigned bit continuous character, a discrete character, a signed bit continuous character and a check code or signal groups which are characterized in a mixed manner in multiple manners;
step S102, after the source signal and the target signal are detected to be matched and consistent in signal type and the characterization modes of the same type signals contained in the source signal and the target signal are matched and consistent, respectively comparing the attributes of the same type signals on the source signal and the target signal, and modifying the signals with inconsistent comparison attributes in the source message when at least one attribute of the same type signal is inconsistent in comparison until the attributes of the modified source signal and each of the same type signals on the target signal are consistent; wherein, the attribute contrast of the signal is characterized by continuous characters without sign bits, including length and precision; comparing attributes of discrete character representation signals to obtain signal values; the attribute contrast of the signal is characterized by sign bit continuous characters, including sign bit, length and precision; comparing the attributes of the check code representation signals to be check values;
step S103, 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 step S101, after the node on any subnet is awakened, the message can be transmitted and received through the gateway, and in view of different message transmitting and receiving formats of each subnet or each node, the message needs to be converted to realize effective message transmission, so as to solve the problem that the source message and the target message are inconsistent in terms of signal.
At this time, a communication matrix is preset on the gateway, and the communication matrix carries a routing table between each subnet and a specific format of a packet required by each node. When a 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 carried by a message required by the target node can be determined, namely, which target signals in the target node are finally required to be matched by the source message can be known. The source signal and the target signal are single signals characterized by one of an unsigned continuous character, a discrete character, a signed continuous character and a check code or signal groups which are characterized by a plurality of modes in a mixed mode.
It should be noted that the signal to be carried by each node message may be set according to the actual demand type of the vehicle, such as a temperature signal, an oil pressure signal, a battery voltage signal, a battery remaining capacity signal, a speed signal, an acceleration signal, a switch control signal, and other single signals or combined signals of different types. Therefore, if the types of the source signal and the target signal are not matched, the source packet carrying the same type of signal as the target signal or the source packet carrying other types of signals should be waited for to be combined (e.g., increased or decreased), otherwise, the source packet cannot be forwarded.
In step S102, first, it is detected whether the signal types included in the source signal and the target signal are matched; if the source signals are inconsistent, the types of the source signals need to be increased or decreased (for example, waiting for signals carried by other source messages to be subjected to signal completion or deleting redundant signals in the source signals), so that the types of the source signals and the source signals need to be matched and consistent; secondly, whether the representation modes of the signals of the same type contained in the two signals are matched consistently is further detected, and if the representation modes are not consistent, the representation modes of the source signals need to be adjusted to achieve the consistency of matching.
Then, after detecting that the types of the signals contained in the source signal and the target signal are matched and consistent, and the representation 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 modifying the signals with inconsistent comparison attributes in the source message when at least one of the attributes of the signals of the same type is inconsistent, until the attributes of each of the signals of the same type on the modified source signal and the target signal are consistent.
In view of the fact that the signal attributes in different characterization manners are different from each other in comparison with the content, a process of converting a source signal into a target signal needs to be analyzed in detail, which is as follows:
(1) And (3) converting the length attribute: the attribute is applicable to the same type of source signal and target signal which are characterized by either unsigned bit continuous characters or signed bit continuous characters.
At the moment, when the attribute contrast of the same type of signals represented by the continuous characters with the non-sign bit or the continuous characters with the sign bit is inconsistent in length, the same type of signals with the attribute contrast of the same type of signals with the inconsistent length in the source signals and the target signals are respectively and correspondingly set as signals A and signals B;
if the length of the signal A is judged to be larger than that of the signal B, after an effective start bit corresponding to the signal B is determined in the signal A, an effective length area is further determined in the signal A, and other areas except the effective length area in the signal A are correspondingly assigned as invalid values, so that the lengths of the modified signal A and the signal B are consistent;
if the length of the signal A is judged to be smaller than that of the signal B, after an effective start bit corresponding to the signal B is determined in the signal A, an effective length area is further extended in the signal A along a preset direction (such as the end of the signal A starts to be towards a null bit or a null data bit direction) until the length of the signal A after the effective length area is extended is equal to that of the signal B, and the extended effective length areas in the signal A are all assigned to be 0, so that the lengths of the modified signal A and the signal B are consistent.
The specific step of determining the effective start bit of the signal B in the signal A 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 the signal values to be used as a CPU value of a signal A and a CPU value of a signal B; it should be noted that the CPU value is a signal value transmitted to the bus by each node (e.g., ECU), which can be automatically acquired through the gateway.
And respectively calculating a physical value of the signal A and a physical value of the signal B by combining the respective preset resolutions and preset offsets of the corresponding source node and the target node, replacing the physical value of the signal A with the physical value of the signal B when the physical value of the signal A is judged to be more than or equal to the physical value of the signal B, and further inversely calculating the CPU value of the signal B by combining the preset resolutions and the preset offsets of the target node. It should be noted that the resolution is a scaling 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, and it represents 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 signal B in the signal A according to the inverse CPU value of the signal B.
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: the physical value = CPU value × resolution + offset, and the physical value of the signal a and the physical value of the signal b are obtained respectively; the CPU value, the resolution and the offset are respectively the CPU value, 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-offset 2 of a signal a)/resolution 2, and the CPU value of a signal b is inversely calculated; then, according to the CPU value of the signal B obtained through inverse operation, determining the effective initial bit of the signal B in the signal A; packing the second signal into a corresponding message according to the start bit and the signal length of the second signal; finally, judging and uniformly processing the CPU value exceeding the signal B into an invalid value defined by the signal B through the gateway; the CPU value 2 is a CPU value for inverse operation of the b signal, and the resolution2 and the offset2 are respectively a preset resolution and a preset offset of the b signal.
If the physical value of the signal A is smaller than that of the signal B, communication software must be redesigned and changed for the signal A, and adaptation cannot be performed in a gateway processing mode.
In another embodiment, as shown in fig. 4, when the length of the a signal is smaller than the length of the b signal, the gateway follows the formula: the physical value = CPU value × resolution + offset, and the physical value of the signal a and the physical value of the signal b are obtained respectively; the CPU value, resolution and offset are respectively the CPU value, 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: a CPU value of 2= (physical value-offset 2 of a signal a)/resolution 2, and the CPU value of a signal b is inversely calculated; then, according to the CPU value of the signal B obtained through inverse operation, determining the effective initial bit of the signal B in the signal A; then packing the signals into corresponding messages according to the start bits and the signal lengths of the signals B (namely, the effective length area of the signals A is prolonged); finally, uniformly processing the extended length area of the A signal into 0 through a gateway; the CPU value 2 is a CPU value for inverse operation of the b signal, and the resolution2 and the offset2 are respectively a preset resolution and a preset offset of the b signal.
If the physical value of the signal A is smaller than that of the signal B, communication software must be redesigned and changed for the signal A, and adaptation cannot be performed in a gateway processing mode.
(2) And (3) converting the precision attribute: the attribute is applicable to the same type of source signal and target signal which are characterized by either unsigned bit continuous characters or signed bit continuous characters.
When the attribute of the same type of signals represented by continuous characters with non-sign bits or continuous characters with sign bits is compared into the attribute of the same type of signals with consistent length and inconsistent precision, the same type of signals with the attribute of the same type of signals compared into the attribute of the same type of signals with consistent length and inconsistent precision in the source signals and the target signals are respectively and correspondingly set as signals A and signals B;
after the effective start bit of the signal B is determined in the signal A, the region position of the signal A is adjusted according to the effective start bit of the signal B, so that the length and the precision of the modified signal A and the signal B are consistent.
It should be noted that the specific steps for determining the valid start bit of the signal b in the signal a are the same as those related to the length attribute in the above-mentioned (1), and are not described herein again.
It can be understood that, the attribute comparison of the signals of the same type represented by the continuous characters with no sign bit or the continuous characters with sign bit may also be performed simultaneously with the length and the precision, and the contents of (1) and (2) may be combined, which is not described herein again, and can be seen in fig. 4.
(3) Sign bit attribute conversion: the attribute is applicable to source and target signals of the same type characterized by sign bit continuation characters.
When the attribute contrast of the same type of signals represented by continuous characters with sign bits on the source signal and the target signal is inconsistent with the sign bits, the same type of signals with the attribute contrast of the sign bits inconsistent in the source signal and the target signal are respectively and correspondingly set as a signal A and a signal B;
and according to a preset sign bit conversion rule, converting the sign bit of the signal A into the sign bit of the signal B, so that the sign bits of the modified signal A and the signal B are consistent.
The step of converting the sign bit of the signal a into the sign bit of the signal b according to a preset sign bit conversion rule specifically includes:
if the first bit of the A signal is a non-sign bit, acquiring a CPU value corresponding to a signal value transmitted to the bus by a source node as the A signal, calculating to obtain a physical value of the A signal by combining a preset resolution and a preset offset of the source node, and setting the first bit of the A signal as a sign bit and assigning the sign bit as 0 when the physical value of the A signal is greater than or equal to a preset value; or when the physical value of the A signal is smaller than the preset value, setting the first bit of the A signal as a sign bit and assigning 1;
if the first bit of the A signal is the sign bit of digital 0 or 1, the sign bit of the first bit of the A signal, which is digital 0, is correspondingly converted into the positive sign attribute bit of the B signal, or the sign bit of the first bit of the A signal, which is digital 1, is correspondingly converted into the negative sign attribute bit of the B signal. It should be noted that, when the first bit of the a signal is the sign bit, the positive and negative properties of the sign bit may also be determined according to the first occurrence of the characters + and-.
In one embodiment, if the first bit of the a signal is a non-symbol bit, the gateway follows the formula: the physical value = a CPU value × resolution + offset, and a physical value of the a signal is obtained; the CPU value, resolution and offset are respectively the CPU value, the preset resolution and the preset offset of the A signal;
if the physical value > =0, the first bit of the A signal is set as a sign bit and is assigned to be 0; otherwise, if the physical value of the signal a is less than 0, the first bit of the signal a is set as the sign bit and is assigned to 1.
In another embodiment, if the first bit of the signal A is the sign bit of the digital 0, the corresponding is converted into the positive sign attribute bit of the signal B according to the table look-up; on the contrary, if the first bit of the signal A is the sign bit of the number 1, the corresponding is converted into the negative sign attribute bit of the signal B according to the table lookup.
It should be noted that, the attribute comparison of the signals of the same type represented by the continuous characters with the sign bit may also be performed simultaneously with at least one of the length and the precision of the sign bit, and the corresponding one or two of (3), (1) and (2) may be combined, which is not described herein again.
In one embodiment, the comparison of attributes of the same type of signal characterized by consecutive characters having sign bits is instantiated simultaneously as 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 the sign bit, the positive and negative attributes 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 a signal is a non-sign bit and the signed number is obtained by subtracting the offset from the transmitted CPU value, while the b signal represents the signed number by setting the most significant bit of the signal as the sign bit.
Firstly, the gateway obtains the real physical value of the signal A according to a formula, namely the real physical value = CPU value + resolution + offset, and then sets the sign position of the signal B according to the sign attribute of the real physical value of the signal A. If, firstly, the true physical value > = value m of a signal a, the symbol attribute is positive; otherwise, the sign attribute is negative, then, look-up table is carried out, and the first bit of the A signal is correspondingly converted into the corresponding positive and negative sign bit of the B signal.
And secondly, length conversion is carried out. Firstly, the lengths of the signal a and the signal b are compared, and according to the comparison result of different lengths, the effective start bit of the signal b is determined in the signal a, and then the effective start bit is packed into the corresponding message according to the start bit of the signal b and the signal length, and the content is the same as that in the specific embodiment of the above (1), and is not repeated here.
For example, the first bit of the A signal is the sign bit and represents the signed number by setting the most significant bit of the signal as the sign bit, while the B signal is the signed number by subtracting the offset from the transmitted CPU value.
Firstly, judging whether a sign bit is 0 by a gateway to obtain positive and negative attributes of an actual physical value of a signal A;
and secondly, length conversion is carried out. Firstly, comparing the lengths of a signal A and a signal B, and according to the comparison result of different lengths and a formula, obtaining the absolute value of a physical value by the absolute value = CPU value of excluding sign bit + resolution1+ offset1, and combining the sign attribute to obtain a real physical value; then, the inverse operation is performed to obtain the CPU value of the signal b, and the CPU value is filled in the position of the message where the target signal is located, which is the same as the specific embodiment of (1), and is not described herein again.
(4) Signal value attribute conversion: the attribute is applicable to the same type of source signal and target signal characterized by discrete characters.
When the attribute of a signal of the same type represented by discrete characters on the source signal and the target signal is compared to obtain a signal value, correspondingly setting the signal of the same type with the attribute of the signal of different value in the source signal and the target signal as a signal A and a signal B respectively;
and mapping the signal value of the A signal to the signal value of the B signal according to a preset signal value mapping table so as to enable the modified signal values of the A signal and the B signal to be consistent.
In one embodiment, as shown in fig. 6, the signal value of the left signal a is mapped to the signal value of the right signal b by the signal value mapping table carried in the communication matrix.
(5) And (4) check value attribute conversion: the attribute applies to the same type of source and target signals characterized by the check code.
The attribute contrast of a signal of the same type represented by a check code on a source signal and a target signal is used as a check value inconsistency, and the signal of the same type with the attribute contrast of the source signal and the target signal as the check value inconsistency is respectively and correspondingly set as a signal A and a signal B;
and verifying the signal A according to a preset first verification algorithm, and after the signal A is verified to be normal, transforming the verification value of the signal A into the verification value of the signal B according to a preset second verification algorithm so as to enable the modified verification values of the signal A and the signal B to be consistent.
In one embodiment, as shown in fig. 7, the gateway needs to check the a signal at the receiving end according to check algorithm 1. To ensure that no error occurs in the transmission path of the source message sent by the source node to the gateway for reception. After the gateway passes the verification of the first signal, the first signal is packaged into a second signal according to a verification algorithm 2 according to the second signal in the message required by the target node in a repacking mode according to the requirement, so that no error occurs on a transmission path from the source message to the target node for receiving.
It should be understood that, when the source signal is a signal group represented by a mixture of multiple modes of non-sign-bit continuous characters, discrete characters, sign-bit continuous characters and check codes, the above-mentioned (1) to (5) may be combined and analyzed, for details, refer to the relevant contents of the above-mentioned (1) to (5), and will not be described herein again.
As shown in fig. 8, in an embodiment of the present invention, a system for processing packet data in cross-segment communication is provided, where the system is implemented on a communication network formed by a plurality of subnets interconnected through a same gateway, and each subnet includes at least one node, and includes:
a source message receiving unit 201, configured to determine, when the gateway receives a source message sent by a certain node, a source node address, a destination node address, and a source signal carried in the source message, and determine, according to the destination node address, a destination signal that a message required by a destination node should carry; wherein, the source signal and the target signal are both single signals characterized by one of non-sign bit continuous characters, discrete characters, sign bit continuous characters and check codes or signal groups which are characterized by a plurality of modes in a mixed mode;
a source message signal attribute modification unit 202, configured to compare attributes of the same type signals in the source signal and the target signal after it is detected that the source signal and the target signal are matched and consistent in signal type and characterization modes of the same type signals in the source signal and the target signal are matched and consistent, and modify the signals with inconsistent comparison attributes in the source message when at least one attribute of the same type signal is inconsistent in comparison, until the attributes of the modified source signal and each of the same type signals in the target signal are consistent; wherein, attribute contrast of the signal is characterized by continuous characters without sign bits, including length and precision; comparing attributes of the discrete character representation signals into signal values; the attribute contrast of the signal is characterized by sign bit continuous characters, including sign bit, length and precision; comparing attributes of the check code representation signals to obtain a check value;
a source packet updating unit 203, configured to update the source packet based on the modified source signal, and further forward the updated source packet to the target node according to the target node address.
The source packet signal attribute modification unit 202 includes:
a length attribute modification module, configured to, when an attribute comparison of a signal of the same type represented by an unsigned bit continuous character or a signed bit continuous character is inconsistent in length between the source signal and the target signal, set the signal of the same type, in which the attribute comparison is inconsistent in length, in the source signal and the target signal as a signal a and a signal b, respectively;
if the length of the signal A is judged to be larger than that of the signal B, after an effective start bit corresponding to the signal B is determined in the signal A, an effective length area is further determined in the signal A, and other areas except the effective length area in the signal A are correspondingly assigned as invalid values, so that the lengths of the modified signal A and the signal B are consistent;
if the length of the first signal is smaller than that of the second signal, after an effective start bit corresponding to the second signal is determined in the first signal, an effective length area is further extended in the first signal along the preset direction until the length of the first signal after the effective length area is extended is equal to that of the second signal, and the extended effective length areas in the first signal are all assigned to be 0, so that the lengths of the modified first signal and the modified second signal are consistent.
The source packet signal attribute modification unit 202 further includes:
the precision attribute modification module is used for correspondingly setting signals of the same type, which are represented by continuous characters with no sign bit or continuous characters with sign bit, of the source signal and the target signal and have the same attribute contrast as the signals of the same type, which have the same length and the different precision, as a signal A and a signal B respectively when the source signal and the target signal have the same attribute contrast as the signals of the same type, which are represented by the continuous characters with no sign bit or the continuous characters with sign bit; and
after determining the effective start bit of the signal B in the signal A, carrying out region position adjustment on the signal A according to the effective start bit of the signal B so as to enable the lengths and the accuracies of the modified signal A and the signal B to be consistent;
the source packet signal attribute modification unit 202 further includes:
the signal value attribute modification module is used for correspondingly setting the signals of the same type, which are represented by discrete characters and have different attribute contrasts as signal values, in the source signal and the target signal as a signal A and a signal B respectively when the attribute contrasts as the signal values of the signals of the same type, which are represented by the discrete characters, in the source signal and the target signal are inconsistent;
and mapping the signal value of the signal A to the signal value of the signal B according to a preset signal value mapping table so as to enable the modified signal values of the signal A and the signal B to be consistent.
The source packet signal attribute modifying unit 202 further includes:
a sign bit attribute modification module, configured to, when the source signal and the target signal have a same type of signal characterized by a sign bit continuous character whose attribute is compared with that of the signal as a sign bit inconsistency, set the same type of signal in the source signal and the target signal whose attribute is compared with that of the signal as a sign bit inconsistency as an a signal and a b signal, respectively;
and converting the sign bit of the signal A into the sign bit of the signal B according to a preset sign bit conversion rule, so that the sign bits of the modified signal A and the modified signal B are consistent.
The source packet signal attribute modification unit 202 further includes:
a check value attribute modification module, configured to compare attributes of signals of the same type represented by a check code on the source signal and the target signal to obtain a check value inconsistency, and set the signals of the same type having the attribute compared to the check value inconsistency in the source signal and the target signal as a signal a and a signal b, respectively;
and verifying the signal A according to a preset first verification algorithm, and after the signal A is verified to be normal, transforming the verification value of the signal A into the verification value of the signal B according to a preset second verification algorithm so as to enable the modified verification values of the signal A and the signal B to be 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:
a source packet receiving unit 301, configured to determine, when a source packet sent by a certain node is received, a source node address, a target node address, and a source signal that are carried in the source packet, and determine, according to the target node address, a target signal that a packet required by a target node should carry; wherein, the source signal and the target signal are both single signals characterized by one of non-sign bit continuous characters, discrete characters, sign bit continuous characters and check codes or signal groups which are characterized by a plurality of modes in a mixed mode;
a source message signal attribute modification unit 302, configured to compare attributes of the same type signals on the source signal and the target signal respectively after it is detected that the source signal and the target signal are matched in a consistent manner and characterization manners of the same type signals are matched in a consistent manner, and modify signals with inconsistent comparison attributes in the source message when at least one attribute of the same type signal is inconsistent, until the attributes of the modified source signal and each of the same type signals on the target signal are consistent; wherein, attribute contrast of the signal is characterized by continuous characters without sign bits, including length and precision; comparing attributes of the discrete character representation signals into signal values; the attribute contrast of the signal is characterized by sign bit continuous characters, including sign bit, length and precision; comparing the attributes of the check code representation signals to be check values;
a source packet updating unit 303, configured to update the source packet based on the modified source signal, and further forward the updated source packet 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 needed by the target node through the gateway 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 the logic processing of the signal of the source message and solving the problem that the source message and the message needed by the target are inconsistent in signal aspect.
It should be noted that, in the foregoing system embodiment, each included system unit is only divided according to functional logic, but is not limited to the above division as long as the corresponding function can be implemented; in addition, the specific names of the functional units are only for the convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It will be understood by those skilled in the art that all or part of the steps in the method for implementing the above embodiments may be implemented by relevant hardware instructed by a program, and the program may be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present invention, and it is therefore to be understood that the invention is not limited by the scope of the appended claims.

Claims (15)

1. A method for processing message data in cross-network communication is realized on a communication network formed by a plurality of subnets interconnected through a same gateway, and each subnet comprises at least one node, and is characterized by comprising 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 to be carried by a message required by a target node according to the target node address; the source signal and the target signal are both single signals characterized in one of an unsigned bit continuous character, a discrete character, a signed bit continuous character and a check code or signal groups which are characterized in a mixed manner in multiple manners;
s2, after the source signal and the target signal are detected to be matched and consistent in signal type and the characterization modes of the same type signals contained in the source signal and the target signal are matched and consistent, respectively comparing the attributes of the same type signals on the source signal and the target signal, and modifying the signals with inconsistent comparison attributes in the source message when at least one signal with inconsistent attribute is compared until the attributes of the modified source signal and each signal with the same type on the target signal are consistent; wherein, the attribute contrast of the signal is characterized by continuous characters without sign bits, including length and precision; comparing attributes of discrete character representation signals to obtain signal values; the attribute contrast of the signal is characterized by sign bit continuous characters, including sign bit, length and precision; comparing the attributes of the check code representation signals to be check values;
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.
2. The method for processing message data in inter-segment communication according to claim 1, wherein the step S2 specifically includes:
when the attribute contrast of the same type of signals represented by continuous characters with unsigned bits or continuous characters with signed bits is inconsistent with the length of the target signal, the same type of signals with the attribute contrast of the same type of signals with inconsistent length in the source signal and the target signal are respectively and correspondingly set as a signal A and a signal B;
if the length of the signal A is judged to be larger than that of the signal B, after an effective start bit corresponding to the signal B is determined in the signal A, an effective length area is further determined in the signal A, and other areas except the effective length area in the signal A are correspondingly assigned as invalid values, so that the lengths of the modified signal A and the signal B are consistent;
if the length of the signal A is smaller than that of the signal B, after the effective start bit corresponding to the signal B is determined in the signal A, the effective length area is further extended in the signal A along the preset direction until the length of the signal A after the effective length area is extended is equal to that of the signal B, and the extended effective length areas in the signal A are all assigned to be 0, so that the lengths of the modified signal A and the signal B are consistent.
3. The method for processing message data in inter-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 non-sign bits or continuous characters with sign bits is consistent in length and inconsistent in precision, the same type of signals with consistent attribute contrast in the source signals and the target signals are respectively and correspondingly set as signals A and signals B;
after the effective start bit of the signal B is determined in the signal A, the region position of the signal A is adjusted according to the effective start bit of the signal B, so that the length and the precision of the modified signal A and the signal B are consistent.
4. The method according to claim 2 or 3, wherein the step of determining the valid start bit of the signal b in the signal a 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 the signal values to be used as a CPU value of a signal A and a CPU value of a signal B;
respectively calculating a physical value of the signal A and a physical value of the signal B by combining the respective preset resolutions and preset offsets of the corresponding source node and the target node, replacing the physical value of the signal A with the physical value of the signal B when the physical value of the signal A is judged to be more than or equal to the physical value of the signal B, and further inversely calculating a CPU value of the signal B by combining the preset resolutions and the preset offsets of the target node;
and determining the effective start bit of the signal B in the signal A according to the CPU value of the signal B subjected to the inverse operation.
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 of a signal of the same type represented by discrete characters on the source signal and the target signal is compared to be inconsistent with a signal value, the signal of the same type with the attribute being compared to be inconsistent with the signal value in the source signal and the target signal is respectively and correspondingly set as a signal A and a signal B;
and mapping the signal value of the signal A to the signal value of the signal B according to a preset signal value mapping table so as to enable the modified signal values of the signal A and the signal B to be consistent.
6. The method for processing message data in inter-segment communication according to claim 1, wherein the step S2 further comprises:
when the attribute of a signal of the same type represented by a continuous character with a sign bit on the source signal and the target signal is compared to be inconsistent with the sign bit, the signal of the same type with the attribute of the sign bit inconsistent with the sign bit in the source signal and the target signal is respectively and correspondingly set as a signal A and a signal B;
and according to a preset sign bit conversion rule, converting the sign bit of the signal A into the sign bit of the signal B, so that the sign bits of the modified signal A and the signal B are consistent.
7. The method for processing packet data in internetwork section communication according to claim 6, wherein the step of converting the sign bit of the signal a into the sign bit of the signal b according to the preset sign bit conversion rule specifically comprises:
if the first bit of the A signal is a non-sign bit, acquiring a CPU value corresponding to a signal value transmitted to a bus by a source node as the A signal, calculating to obtain a physical value of the A signal by combining a preset resolution and a preset offset of the source node, and setting the first bit of the A signal as a sign bit and assigning the first bit of the A signal as 0 when the physical value of the A signal is greater than or equal to a preset value; or when the physical value of the A signal is smaller than the preset value, setting the first bit of the A signal as a sign bit and assigning 1;
if the first bit of the A signal is the sign bit of digital 0 or 1, the sign bit of the first bit of the A signal, which is digital 0, is correspondingly converted into the positive sign attribute bit of the B signal, or the sign bit of the first bit of the A signal, which is digital 1, is correspondingly converted into the negative sign attribute bit of the B signal.
8. The method for processing message data in inter-segment communication according to claim 1, wherein the step S4 further comprises:
if the attribute contrast of a signal of the same type represented by a check code on the source signal and the target signal is inconsistent, correspondingly setting the signal of the same type with the attribute contrast of the source signal and the target signal being inconsistent as a signal A and a signal B respectively;
and verifying the signal A according to a preset first verification algorithm, and after the signal A is verified to be normal, transforming the verification value of the signal A into the verification value of the signal B according to a preset second verification algorithm so as to enable the modified verification values of the signal A and the signal B to be consistent.
9. A processing system of message data in cross-network communication is realized on a communication network formed by a plurality of subnets interconnected through a same gateway, and each subnet comprises at least one node, and is characterized by comprising:
a source message receiving unit, configured to determine, when the gateway receives a source message sent by a certain node, a source node address, a destination node address, and a source signal that are carried on the source message, and determine, according to the destination node address, a destination signal that is to be carried by a message required by a destination node; the source signal and the target signal are both single signals characterized in one of an unsigned bit continuous character, a discrete character, a signed bit continuous character and a check code or signal groups which are characterized in a mixed manner in multiple manners;
a source message signal attribute modifying unit, configured to compare attributes of the source signal and the target signal after it is detected that the source signal and the target signal have the same signal type matching and the same signal type matching, and when at least one signal of the same type is different in attribute, modify the signals with different attributes in the source message until the modified source signal and each signal of the same type on the target signal have the same attribute; wherein, the attribute contrast of the signal is characterized by continuous characters without sign bits, including length and precision; comparing attributes of the discrete character representation signals into signal values; the attribute contrast of the signal is characterized by sign bit continuous characters, including sign bit, length and precision; comparing the attributes of the check code representation signals to be check values;
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.
10. The system for processing message data in a cross-segment communication of claim 9, wherein the source message signal attribute modification unit comprises:
a length attribute modification module, configured to, when an attribute comparison of a signal of the same type represented by an unsigned bit continuous character or a signed bit continuous character is inconsistent in length between the source signal and the target signal, set the signal of the same type, in which the attribute comparison is inconsistent in length, in the source signal and the target signal as an a signal and a b signal, respectively;
if the length of the signal A is judged to be larger than that of the signal B, after an effective start bit corresponding to the signal B is determined in the signal A, an effective length area is further determined in the signal A, and other areas except the effective length area in the signal A are correspondingly assigned as invalid values, so that the lengths of the modified signal A and the signal B are consistent;
if the length of the first signal is smaller than that of the second signal, after an effective start bit corresponding to the second signal is determined in the first signal, an effective length area is further extended in the first signal along the preset direction until the length of the first signal after the effective length area is extended is equal to that of the second signal, and the extended effective length areas in the first signal are all assigned to be 0, so that the lengths of the modified first signal and the modified second signal are consistent.
11. The system for processing message data in cross-segment communication according to claim 9, wherein the source message signal attribute modification unit further comprises:
the precision attribute modification module is used for correspondingly setting signals of the same type, which are represented by continuous characters with no sign bit or continuous characters with sign bit, of the source signal and the target signal and have the same attribute contrast as the signals of the same type, which have the same length and the different precision, as a signal A and a signal B respectively when the source signal and the target signal have the same attribute contrast as the signals of the same type, which are represented by the continuous characters with no sign bit or the continuous characters with sign bit; and
after the effective start bit of the signal B is determined in the signal A, the region position of the signal A is adjusted according to the effective start bit of the signal B, so that the length and the precision of the modified signal A and the signal B are consistent.
12. The system for processing message data in a cross-segment communication of claim 9, wherein the source message signal attribute modification unit further comprises:
the signal value attribute modification module is used for respectively and correspondingly setting the signals of the same type with the attribute contrasted as the inconsistency of the signal values in the source signal and the target signal as a signal A and a signal B when the attribute contrasts as the inconsistency of the signal values in the same type with the attribute contrasted as the inconsistency of the signal values in the source signal and the target signal;
and mapping the signal value of the A signal to the signal value of the B signal according to a preset signal value mapping table so as to enable the modified signal values of the A signal and the B signal to be consistent.
13. The system for processing message data in a cross-segment communication of claim 9, wherein the source message signal attribute modification unit further comprises:
a sign bit attribute modification module, configured to, when the attribute contrast of a signal of the same type represented by a sign bit continuous character on the source signal and the target signal is a sign bit inconsistency, set the signal of the same type whose attribute contrast is the sign bit inconsistency in the source signal and the target signal as an a signal and a b signal, respectively;
and converting the sign bit of the signal A into the sign bit of the signal B according to a preset sign bit conversion rule, so that the sign bits of the modified signal A and the modified signal B are consistent.
14. The system for processing message data in a cross-segment communication of claim 9, wherein the source message signal attribute modification unit further comprises:
a check value attribute modification module, configured to compare attributes of signals of the same type represented by a check code on the source signal and the target signal to obtain a check value inconsistency, and set the signals of the same type having the attribute compared to the check value inconsistency in the source signal and the target signal as a signal a and a signal b, respectively;
and verifying the signal A according to a preset first verification algorithm, and after the signal A is verified to be normal, transforming the verification value of the signal A into the verification value of the signal B according to a preset second verification algorithm so as to enable the modified verification values of the signal A and the signal B to be consistent.
15. A gateway connecting a plurality of subnets, each subnet comprising at least one node, the gateway comprising:
a source message receiving unit, configured to determine, when a source message sent by a certain node is received, a source node address, a destination node address, and a source signal that are carried on the source message, and determine, according to the destination node address, a destination signal that a message required by a destination node should carry; the source signal and the target signal are both single signals characterized in one of an unsigned bit continuous character, a discrete character, a signed bit continuous character and a check code or signal groups which are characterized in a mixed manner in multiple manners;
a source message signal attribute modifying unit, configured to compare attributes of the source signal and the target signal after it is detected that the source signal and the target signal have the same signal type matching and the same signal type matching, and when at least one signal of the same type is different in attribute, modify the signals with different attributes in the source message until the modified source signal and each signal of the same type on the target signal have the same attribute; wherein, the attribute contrast of the signal is characterized by continuous characters without sign bits, including length and precision; comparing attributes of discrete character representation signals to obtain signal values; the attribute contrast of the signal is characterized by sign bit continuous characters, including sign bit, length and precision; comparing the attributes of the check code representation signals to be check values;
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.
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 true CN115242823A (en) 2022-10-25
CN115242823B 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信号解析方法", 汽车工程学报, no. 01 *
关静;杨欣茹;周亚棱;: "基于信号相似度原理的CAN信号解析方法", 汽车工程学报, no. 01, 20 January 2020 (2020-01-20) *

Also Published As

Publication number Publication date
CN115242823B (en) 2024-03-19

Similar Documents

Publication Publication Date Title
Alexander et al. DHCP options and BOOTP vendor extensions
US11256498B2 (en) Node, a vehicle, an integrated circuit and method for updating at least one rule in a controller area network
US6728268B1 (en) Method and system to connect internet protocol hosts via an application specific bus
US10511668B2 (en) Method of transmitting and receiving data in vehicle network and apparatus for the same
US20080198852A1 (en) Address converter for gateways interconnecting networks of different address formats
US20190313224A1 (en) Automated vehicle systems and control logic for smart data exchanges using enhanced bloom filters
CN110213018B (en) Data communication method and device of vehicle-mounted bus and vehicle
US7917603B2 (en) Method for setting an internet protocol address using a vehicle identification number
CN108683594B (en) Vehicle gateway routing method, device, vehicle and storage medium
US20160234037A1 (en) Communication system and communication method
CN112448813B (en) Method and device for generating an encryption key according to a key derivation model, and vehicle
JP4391025B2 (en) Method for communicating between various nodes of a control system with multiple processing devices
US8161185B2 (en) Method and apparatus for assigning IPv6 link state identifiers
CN113608483A (en) Method for acquiring vehicle signal value, electronic equipment and electronic control unit
CN113542277A (en) Method, system, medium, and apparatus for CANOPEN device bridging through TSN network
CN115242823A (en) Method, system and gateway for processing message data in cross-network communication
JPH10257078A (en) Vehicle multiple communication equipment
CN100377550C (en) Routing table next-hop IP address to MAC address analytic method
US7380020B2 (en) Method and arrangements for router advertisement in a network with mobile anchor points
Elhadeedy et al. 60 GHz Wi-Fi as a Tractor-Trailer Wireless Harness
US6529505B1 (en) System for expanding a parameter encoding field in a message to allow additional parameters to be added while maintaining compatibility with existing parameter encodings
CN112187790A (en) Signal identifier generation method, message transmission method and device
US20020023137A1 (en) Data telegram for transmitting data formatted in accordance with an extraneous standard
CN118612134A (en) Method and device for realizing message routing based on AUTOSAR
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