[go: up one dir, main page]

CN112367634B - Message sending method and device - Google Patents

Message sending method and device Download PDF

Info

Publication number
CN112367634B
CN112367634B CN202011248211.9A CN202011248211A CN112367634B CN 112367634 B CN112367634 B CN 112367634B CN 202011248211 A CN202011248211 A CN 202011248211A CN 112367634 B CN112367634 B CN 112367634B
Authority
CN
China
Prior art keywords
message
period value
period
offset
frame
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
CN202011248211.9A
Other languages
Chinese (zh)
Other versions
CN112367634A (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.)
SAIC Motor Corp Ltd
Original Assignee
SAIC Motor Corp 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 SAIC Motor Corp Ltd filed Critical SAIC Motor Corp Ltd
Priority to CN202011248211.9A priority Critical patent/CN112367634B/en
Publication of CN112367634A publication Critical patent/CN112367634A/en
Application granted granted Critical
Publication of CN112367634B publication Critical patent/CN112367634B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/30Services specially adapted for particular environments, situations or purposes
    • H04W4/40Services specially adapted for particular environments, situations or purposes for vehicles, e.g. vehicle-to-pedestrians [V2P]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/0289Congestion control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/08Load balancing or load distribution

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a message sending method and a device, wherein the method comprises the following steps: responding to a congestion time optimization instruction, and acquiring current periodic frame distribution information to be optimized; the period frame distribution information records each frame period message corresponding to each period value and a message sending node to which each frame period message belongs; obtaining the offset interval corresponding to each period value based on the period duration of each period value and the frame number of the period message corresponding to each period value; determining the transmission offset time of each frame period message corresponding to each period value at the message transmission node to which the frame period message belongs based on the offset interval corresponding to each period value; and sending each sending offset time to a corresponding message sending node, so that each message sending node sends the periodic message corresponding to the offset time according to the received sending offset time. By applying the method provided by the invention, the network congestion can be reduced without reducing the network load rate.

Description

Message sending method and device
Technical Field
The present invention relates to the field of data communication technologies, and in particular, to a method and an apparatus for sending a packet.
Background
In recent years, with the increasing of functions of passenger vehicles, the number of vehicle-mounted controllers is increasing, signal interaction among the controllers is increasing, so that the bus load is higher and higher, network congestion time is prolonged continuously, the cycle deviation of low-priority cycle messages in a whole vehicle is increased, the cycle deviation of low-priority cycle messages sent by external equipment to the whole network is increased, and even a message frame loss phenomenon occurs under extreme conditions, so that the transmission performance of the whole network is reduced.
In the prior art, in order to solve the problem of network congestion, in the process of designing a CAN and CAN fd network, it is usually ensured that the network transmission performance meets the design requirements by reducing the network load rate, that is, under the condition that the network transmission performance cannot meet the design requirements due to the increase of the network load rate, a load reduction manner such as deleting part of useless message signals or increasing the frame period is adopted to ensure the real-time transmission. However, in such a manner, the number of signal interactions of the controller is limited, so that the functional implementation of the controller is affected, and the change range of controller software caused by the load reduction process is large, and the maintenance cost is high.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a message sending method, which does not need to reduce the network load rate to avoid network congestion.
The invention also provides a message sending device, which is used for ensuring the realization and the application of the method in practice.
A message sending method comprises the following steps:
responding to a congestion time optimization instruction, and acquiring current periodic frame distribution information to be optimized; the period frame distribution information records each frame period message corresponding to each period value and a message sending node to which each frame period message belongs;
obtaining an offset interval corresponding to each period value based on each period value and the frame number of the period message corresponding to each period value;
determining the transmission offset time of each frame period message corresponding to each period value at the message transmission node to which the message transmission node belongs based on the offset interval corresponding to each period value;
and sending each sending offset time to a corresponding message sending node, so that each message sending node sends a periodic message corresponding to the offset time according to the received sending offset time.
Optionally, the above method, where the obtaining of the current periodic frame distribution information to be optimized includes:
analyzing the congestion time optimization instruction to obtain a file identifier contained in the congestion time optimization instruction;
determining a whole network database file corresponding to the file identifier;
and acquiring the current to-be-optimized periodic frame distribution information in the whole network database file.
Optionally, the obtaining the offset interval corresponding to each period value based on each period value and the number of frames of the period packet corresponding to each period value includes:
calculating the period value and the frame number of the period message of the period value to obtain the initial offset interval corresponding to the period value;
comparing the initial offset interval corresponding to the period value with a preset standard offset interval;
if the initial offset interval corresponding to the period value is smaller than the standard offset interval, taking the standard offset interval as the offset interval corresponding to the period value;
if the initial offset interval corresponding to the period value is not less than the standard offset interval, the initial offset interval is taken as the offset interval corresponding to the period value.
Optionally, the above method, determining, based on the offset interval corresponding to each period value, the transmission offset time of each frame of period packet corresponding to each period value at the packet sending node to which the frame of period packet belongs, includes:
for each period value, determining the transmission offset time of each frame period message corresponding to the period value according to the time interval corresponding to the period value;
judging whether the transmission offset time of at least one frame period message exists in each frame period message belonging to each message transmission node is zero;
and for the message sending node without the sending offset time of the periodic message being zero, determining the periodic message with the minimum period value in the message sending node, and setting the sending offset time of the periodic message with the minimum period value to be zero so as to obtain the sending offset time of each frame of periodic message corresponding to each period value at the message sending node to which the periodic message belongs.
Optionally, the determining the transmission offset time of each frame period packet corresponding to the period value according to the time interval corresponding to the period value includes:
determining a starting offset time in the period value;
setting initial sending offset time for each frame of the periodic message in sequence according to the initial offset time and the time interval corresponding to the period value;
judging whether the initial transmission offset time of each frame of the periodic message is greater than the period value; if the initial transmission offset time of the periodic message is not greater than the period value, determining the initial transmission offset time of the periodic message as the transmission offset time of the message; if the initial transmission offset time of the periodic message is greater than the period value, subtracting the period value from the initial transmission offset time of the periodic message to obtain the transmission offset time of the periodic message.
A message transmitting apparatus, comprising:
the acquiring unit is used for responding to the congestion time optimization instruction and acquiring the current to-be-optimized periodic frame distribution information; the period frame distribution information records each frame period message corresponding to each period value and a message sending node to which each frame period message belongs;
an execution unit, configured to obtain an offset interval corresponding to each period value based on each period value and a frame number of a period packet corresponding to each period value;
a determining unit, configured to determine, based on the offset interval corresponding to each period value, a transmission offset time of each frame period packet corresponding to each period value at the packet sending node to which the frame period packet belongs;
and the sending unit is used for sending each sending offset time to the corresponding message sending node, so that each message sending node sends the periodic message corresponding to the offset time according to the received sending offset time.
The above apparatus, optionally, the obtaining unit includes:
the analysis subunit is configured to analyze the congestion time optimization instruction to obtain a file identifier included in the congestion time optimization instruction;
the first determining subunit is used for determining the whole network database file corresponding to the file identifier;
and the acquisition subunit is used for acquiring the current to-be-optimized periodic frame distribution information from the whole network database file.
The above apparatus, optionally, the execution unit includes:
a calculating subunit, configured to calculate the period value and the frame number of the periodic packet of the period value, so as to obtain an initial offset interval corresponding to the period value;
a comparison subunit, configured to compare the initial offset interval corresponding to the period value with a preset standard offset interval;
a first execution subunit, configured to, if the initial offset interval corresponding to the period value is smaller than the standard offset interval, take the standard offset interval as the offset interval corresponding to the period value;
and a second execution subunit, configured to, if the initial offset interval corresponding to the period value is not smaller than the standard offset interval, take the initial offset interval as the offset interval corresponding to the period value.
The above apparatus, optionally, the determining unit includes:
a second determining subunit, configured to determine, for each period value, the transmission offset time of each frame period packet corresponding to the period value according to the time interval corresponding to the period value;
a judging subunit, configured to judge whether there is a transmission offset time of at least one frame period packet in each frame period packet belonging to each packet transmission node, where the transmission offset time is zero;
a third determining subunit, configured to determine, for a packet sending node where there is no transmission offset time of a periodic packet, a periodic packet with a minimum period value in the packet sending node, and set the transmission offset time of the periodic packet with the minimum period value to zero, so as to obtain the transmission offset time of each frame of periodic packet corresponding to each period value at the packet sending node to which the periodic packet belongs.
The above apparatus, optionally, the second determining subunit is configured to:
determining a starting offset time in the period value;
setting initial sending offset time for each frame of the periodic message in sequence according to the initial offset time and the time interval corresponding to the period value;
judging whether the initial transmission offset time of each frame of the periodic message is greater than the period value; if the initial transmission offset time of the periodic message is not greater than the period value, determining the initial transmission offset time of the periodic message as the transmission offset time of the message; if the initial transmission offset time of the periodic message is greater than the period value, subtracting the period value from the initial transmission offset time of the periodic message to obtain the transmission offset time of the periodic message.
Compared with the prior art, the invention has the following advantages:
the invention provides a message sending method and a device, wherein the method comprises the following steps: responding to a congestion time optimization instruction, and acquiring current periodic frame distribution information to be optimized; the period frame distribution information records each frame period message corresponding to each period value and a message sending node to which each frame period message belongs; obtaining an offset interval corresponding to each period value based on each period value and the frame number of the period message corresponding to each period value; determining the transmission offset time of each frame period message corresponding to each period value at the message transmission node to which the message transmission node belongs based on the offset interval corresponding to each period value; and sending each sending offset time to a corresponding message sending node, so that each message sending node sends the periodic message corresponding to the offset time according to the received sending offset time. By applying the method provided by the invention, the message sending node can send the period based on the sending offset time by sending the sending offset time of the message of each frame period to the corresponding message sending node, thereby effectively reducing the network congestion without deleting useless signals of the controller or increasing the frame period and having low maintenance cost.
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 described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a method for sending a message according to the present invention;
FIG. 2 is a flowchart of a process for obtaining an offset interval corresponding to a period value according to the present invention;
fig. 3 is a diagram illustrating an exemplary network transmission architecture according to the present invention;
fig. 4 is a schematic structural diagram of a message sending apparatus according to the present invention;
fig. 5 is a schematic structural diagram of an electronic device provided in the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
The invention is operational with numerous general purpose or special purpose computing device environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet-type devices, multi-processor apparatus, distributed computing environments that include any of the above devices or equipment, and the like.
The embodiment of the present invention provides a message sending method, which can be applied to various system platforms, an execution subject of the method can be a computer terminal or a processor of various mobile devices, and a flow chart of the method is shown in fig. 1, and specifically includes:
s101: responding to a congestion time optimization instruction, and acquiring current periodic frame distribution information to be optimized; the period frame distribution information records each frame period message corresponding to each period value and a message sending node to which each frame period message belongs, wherein each frame period message has a period value, and each frame period message with the same period value is used as each frame period message corresponding to the period value.
In the method provided by the embodiment of the invention, the message sending node can be a vehicle-mounted controller.
Optionally, the periodic frame distribution information includes a correspondence between a periodic packet identifier and a periodic value and a correspondence between a periodic packet identifier and a packet sending node.
Specifically, the current cycle frame distribution information to be optimized may be obtained from a whole network database file corresponding to the congestion time optimization instruction, where the congestion time optimization instruction may be triggered by a user according to a congestion time optimization requirement.
S102: and obtaining the offset interval corresponding to each period value based on each period value and the frame number of the period message corresponding to each period value.
In the method provided in the embodiment of the present invention, the period value includes a period duration of the packet period, for example, the period value may be 10ms, 20ms, 100ms, 1000ms, or the like.
The offset interval refers to a transmission time interval between each frame period message corresponding to each period value.
S103: and determining the transmission offset time of each frame period message corresponding to each period value at the message transmission node to which the message transmission node belongs based on the offset interval corresponding to each period value.
In the method provided by the embodiment of the present invention, each packet transmission node corresponds to at least one frame period packet with at least one period value, and each packet transmission node can be configured to transmit its corresponding period packet.
Based on the offset interval corresponding to each period value, the transmission offset time of the message in each frame period can be determined.
Specifically, the transmission offset time of each frame period message at the message transmission node to which the frame period message belongs may be: the offset time between the time when the message sending node sends the periodic message and the initial time.
The initial time may be a time when the message sending node sends the periodic message with the sending offset time being zero.
S104: and sending each sending offset time to a corresponding message sending node, so that each message sending node sends the periodic message corresponding to the offset time according to the received sending offset time.
In the method provided by the embodiment of the invention, the sending offset time of each frame of periodic message at the message sending node to which the periodic message belongs is sent to the message sending node, so that the message sending node sends the periodic message based on the sending offset time.
By applying the method provided by the embodiment of the invention, the message sending node can send the period based on the sending offset time by sending the sending offset time of the message of each frame period to the corresponding message sending node, so that the network congestion can be effectively reduced, the useless signals of the controller do not need to be deleted or the frame period does not need to be increased, and the maintenance cost is low.
Based on the above implementation process, the method provided in the embodiment of the present invention specifically obtains the current periodic frame distribution information to be optimized, including:
analyzing the congestion time optimization instruction to obtain a file identifier contained in the congestion time optimization instruction;
determining a whole network database file corresponding to the file identifier;
and acquiring the current to-be-optimized periodic frame distribution information in the whole network database file.
In the method provided by the embodiment of the present invention, the congestion time optimization instruction is analyzed to obtain instruction information of the congestion time optimization instruction.
Specifically, the instruction information may include a file identifier, the file identifier may be obtained from the instruction information, and a whole-network database file corresponding to the file identifier is determined in a pre-established database file set, where the whole-network database file is a DBC file, and the current cycle frame distribution information to be optimized may be obtained from the whole-network database file.
Based on the above implementation process, specifically, a feasible manner for obtaining the offset interval corresponding to each period value based on each period value and the frame number of the period packet corresponding to each period value is described in fig. 2, and includes:
s201: and calculating the period value and the frame number of the period message of the period value to obtain the initial offset interval corresponding to the period value.
In the method provided by the embodiment of the present invention, the period value and the frame number of the periodic packet may be substituted into a preset formula to obtain the initial offset interval corresponding to the period value, where the formula is as follows:
Figure BDA0002770766280000081
wherein, the T i May be a period value, N i The number of frames, P, of the periodic message, which may be a period value i May be the initial offset interval corresponding to the period value, and i is the identification of the period value, which may be the sorting order number of the period value.
S202: and comparing the initial offset interval corresponding to the period value with a preset standard offset interval.
In the method provided by the embodiment of the present invention, the standard offset interval may be set based on actual requirements, for example, may be set to 1ms.
S203: if the initial offset interval corresponding to the period value is smaller than the standard offset interval, the standard offset interval is used as the offset interval corresponding to the period value.
If the standard offset interval is 1ms, the offset interval corresponding to the period value may be set to 1ms when the initial offset interval corresponding to the period value is less than 1ms.
S204: if the initial offset interval corresponding to the period value is not smaller than the standard offset interval, the initial offset interval is used as the offset interval corresponding to the period value.
In the embodiment provided by the present invention, a feasible manner for obtaining the offset interval corresponding to each period value may be that, when the initial offset interval corresponding to the period value is not less than the standard offset interval, it is determined whether the initial offset interval is an integer, if the initial offset interval is an integer, the initial offset interval is used as the offset interval corresponding to the period value, and if the initial offset interval is not an integer, the initial offset interval is rounded to obtain the offset interval corresponding to the period value, where the initial offset interval may be rounded downward.
Based on the above implementation process, the method provided in this embodiment of the present invention specifically determines, based on the offset interval corresponding to each period value, the transmission offset time of each frame of periodic packet corresponding to each period value at the packet transmission node to which the frame of periodic packet belongs, and specifically includes:
for each period value, determining the transmission offset time of each frame period message corresponding to the period value according to the time interval corresponding to the period value;
judging whether the transmission offset time of at least one frame period message exists in each frame period message belonging to each message transmission node is zero;
and for the message sending node without the sending offset time of the periodic message being zero, determining the periodic message with the minimum period value in the message sending node, and setting the sending offset time of the periodic message with the minimum period value to be zero so as to obtain the sending offset time of each frame of periodic message corresponding to each period value at the message sending node to which the periodic message belongs.
In the method provided by the embodiment of the present invention, for a packet sending node that has at least one frame period packet with a transmission offset time of zero, the transmission offset time of the period packet in the packet sending node does not need to be changed, and it can be ensured that each packet sending node has at least one frame period packet with a transmission offset time of zero, where an initial time in each packet sending node is a time when the node sends the period packet with a transmission offset time of zero.
Based on the above implementation process, the method provided in this embodiment of the present invention specifically determines the sending offset time of each frame period packet corresponding to the period value according to the time interval corresponding to the period value, including:
determining a starting offset time in the period value;
setting initial sending offset time for each frame of the periodic message in sequence according to the initial offset time and the time interval corresponding to the period value;
judging whether the initial transmission offset time of each frame of the periodic message is greater than the period value; if the initial transmission offset time of the periodic message is not greater than the period value, determining the initial transmission offset time of the periodic message as the transmission offset time of the message; if the initial transmission offset time of the periodic message is greater than the period value, the period value is subtracted from the initial transmission offset time of the periodic message to obtain the transmission offset time of the periodic message.
In the method provided by the embodiment of the invention, the initial offset time of the period value can be determined based on the sorting sequence number of the period value, and the sorting sequence number is obtained by sorting from small to large based on each period value.
One possible way to determine the start offset time of the period value based on the sorting order number of the period value may be: subtracting a preset time value from the sequence number of the period value to obtain the initial offset time of the period value, where the preset time value may be 1ms.
Specifically, the sorting sequence number is i, the initial offset time can be i-1, and the period value is T i The initial transmission offset time of each periodic message is respectively as follows: i-1,P i +i-1,2P i +i-1,...,(N i -1)P i +i-1。
The message sending method provided in the embodiment of the present invention may be applied to a vehicle-mounted controller area network, which may be a CAN network, and the example of the network transmission architecture thereof, as shown in fig. 3, includes 13 nodes, namely, controller nodes a-M, where the controller nodes are message sending nodes.
Specifically, the period frame distribution information of the vehicle-mounted controller local area network may be obtained first, and the period distribution information of the vehicle-mounted controller local area network is shown in table 1:
Figure BDA0002770766280000101
Figure BDA0002770766280000111
TABLE 1
Each period value (i =1, 2, 3.. 12) of the local area network of the vehicle-mounted controller contains 119 frame period messages, the length of each frame of data can be 8 bytes, the local area network can adopt the baud rate of 500k to transmit data, and T is the rate of 500k i Is a period value i, N i The frame number of the periodic message is the period value i.
In particular, it can be based on the formula P i =T i /N i Calculating the offset interval of the periodic messages with the same period value, wherein the calculation result is shown in table 2:
Ti/ms ni/frame Pi/ms
10 9(Fr1~Fr9) 1
20 15(Fr10~Fr24) 1
25 11(Fr25~Fr35) 2
30 2(Fr36~Fr37) 15
40 1(Fr38) 40
50 13(Fr39~Fr51) 3
100 32(Fr52~Fr83) 3
200 19(Fr84~Fr102) 10
250 1(Fr103) 250
400 2(Fr104~Fr105) 200
500 6(Fr106~Fr112) 83
1000 8(Fr113~Fr119) 125
TABLE 2
Specifically, after the offset interval corresponding to each period value is obtained through calculation, the initial transmission offset time of each frame period packet is set, where the initial offset time may be i-1, and the initial transmission offset times of each period packet with the same period value are respectively: i-1, + i-1,2+ i-1, (-1) + i-1, the initial transmission offset time of each frame period message corresponding to each period value, as shown in table 3:
Figure BDA0002770766280000121
TABLE 3
After the initial transmission offset time of each frame of periodic message is obtained, whether the initial transmission offset time of each frame of periodic message is greater than the period value can be judged; if the initial transmission offset time of the periodic message is not greater than the period value, determining the initial transmission offset time of the periodic message as the transmission offset time of the message; if the initial transmission offset time of the periodic message is greater than the period value, subtracting the period value from the initial transmission offset time of the periodic message to obtain the transmission offset time of the periodic message; judging whether the transmission offset time of at least one frame period message exists in each frame period message belonging to each message transmission node is zero; and for the message sending node without the sending offset time of the periodic message being zero, determining the periodic message with the minimum period value in the message sending node, and setting the sending offset time of the periodic message with the minimum period value to be zero so as to obtain the sending offset time of each frame of periodic message corresponding to each period value at the message sending node to which the periodic message belongs.
Specifically, the sending offset time of the periodic message belonging to each message sending node is implemented in software of each message sending node, that is, each sending offset time is sent to the corresponding message sending node, so that each message sending node sends the periodic message corresponding to the offset time according to the received sending offset time.
In the method provided by the embodiment of the invention, through comparison of simulation results, when the offset time is not set in the whole network period frame, the maximum congestion time of the network is 49.6ms, and after the offset time is set, the maximum congestion time is 6.76ms, so that the maximum congestion time is obviously reduced, and the network performance is obviously improved.
Corresponding to the method described in fig. 1, an embodiment of the present invention further provides a message sending apparatus, which is used for specifically implementing the method in fig. 1, where the message sending apparatus provided in the embodiment of the present invention may be applied to a computer terminal or various mobile devices, and a schematic structural diagram of the message sending apparatus is shown in fig. 4, and specifically includes:
an obtaining unit 401, configured to obtain, in response to the congestion time optimization instruction, current periodic frame distribution information to be optimized; the period frame distribution information records each frame period message corresponding to each period value and a message sending node to which each frame period message belongs;
an executing unit 402, configured to obtain an offset interval corresponding to each period value based on each period value and a frame number of the period packet corresponding to each period value;
a determining unit 403, configured to determine, based on the offset interval corresponding to each period value, a transmission offset time of each frame period packet corresponding to each period value at the packet sending node to which the frame period packet belongs;
a sending unit 404, configured to send each sending offset time to a corresponding packet sending node, so that each packet sending node sends a periodic packet corresponding to the offset time according to the received sending offset time.
In an embodiment provided by the present invention, based on the above scheme, specifically, the obtaining unit 401 includes:
the analysis subunit is configured to analyze the congestion time optimization instruction to obtain a file identifier included in the congestion time optimization instruction;
the first determining subunit is used for determining the whole network database file corresponding to the file identifier;
and the acquisition subunit is used for acquiring the current to-be-optimized periodic frame distribution information from the whole network database file.
In an embodiment of the present invention, based on the above scheme, specifically, the execution unit 402 includes:
a calculating subunit, configured to calculate the period value and the frame number of the period packet of the period value, so as to obtain an initial offset interval corresponding to the period value;
a comparison subunit, configured to compare the initial offset interval corresponding to the period value with a preset standard offset interval;
a first execution subunit, configured to, if the initial offset interval corresponding to the period value is smaller than the standard offset interval, take the standard offset interval as the offset interval corresponding to the period value;
and a second execution subunit, configured to, if the initial offset interval corresponding to the period value is not smaller than the standard offset interval, take the initial offset interval as the offset interval corresponding to the period value.
In an embodiment provided by the present invention, based on the above scheme, specifically, the determining unit 403 includes:
a second determining subunit, configured to determine, for each period value, the transmission offset time of each frame period packet corresponding to the period value according to the time interval corresponding to the period value;
a judging subunit, configured to judge whether there is a transmission offset time of at least one frame period packet in each frame period packet belonging to each packet transmission node, where the transmission offset time is zero;
a third determining subunit, configured to determine, for a packet sending node where there is no transmission offset time of a periodic packet, a periodic packet with a minimum period value in the packet sending node, and set the transmission offset time of the periodic packet with the minimum period value to zero, so as to obtain the transmission offset time of each frame of periodic packet corresponding to each period value at the packet sending node to which the periodic packet belongs.
In an embodiment provided by the present invention, based on the above scheme, specifically, the second determining subunit is configured to:
determining a starting offset time in the period value;
setting initial sending offset time for each frame of the periodic message in turn according to the initial offset time and the time interval corresponding to the periodic value;
judging whether the initial transmission offset time of each frame of the periodic message is greater than the period value; if the initial transmission offset time of the periodic message is not greater than the period value, determining the initial transmission offset time of the periodic message as the transmission offset time of the message; if the initial transmission offset time of the periodic message is greater than the period value, subtracting the period value from the initial transmission offset time of the periodic message to obtain the transmission offset time of the periodic message.
The specific principle and the execution process of each unit and each module in the message sending device disclosed in the embodiment of the present invention are the same as those of the message sending method disclosed in the embodiment of the present invention, and refer to the corresponding parts in the message sending method provided in the embodiment of the present invention, which are not described herein again.
The embodiment of the invention also provides a storage medium, which comprises a stored instruction, wherein when the instruction runs, the equipment where the storage medium is located is controlled to execute the message sending method.
An electronic device is provided in an embodiment of the present invention, and the structural diagram of the electronic device is shown in fig. 5, which specifically includes a memory 501 and one or more instructions 502, where the one or more instructions 502 are stored in the memory 501, and are configured to be executed by one or more processors 503 to perform the following operations according to the one or more instructions 502:
responding to a congestion time optimization instruction, and acquiring current periodic frame distribution information to be optimized; the period frame distribution information records each frame period message corresponding to each period value and a message sending node to which each frame period message belongs;
obtaining an offset interval corresponding to each period value based on each period value and the frame number of the period message corresponding to each period value;
determining the transmission offset time of each frame period message corresponding to each period value at the message transmission node to which the message transmission node belongs based on the offset interval corresponding to each period value;
and sending each sending offset time to a corresponding message sending node, so that each message sending node sends the periodic message corresponding to the offset time according to the received sending offset time.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. For the device-like embodiment, since it is basically similar to the method embodiment, the description is simple, and reference may be made to the partial description of the method embodiment for relevant points.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functions of the units may be implemented in the same software and/or hardware or in a plurality of software and/or hardware when implementing the invention.
From the above description of the embodiments, it is clear to those skilled in the art that the present invention can be implemented by software plus necessary general hardware platform. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which may be stored in a storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments or some parts of the embodiments.
The above detailed description is provided for a message sending method provided by the present invention, and a specific example is applied in this document to explain the principle and the implementation of the present invention, and the description of the above embodiment is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (9)

1. A method for sending a message, comprising:
responding to a congestion time optimization instruction, and acquiring current cycle frame distribution information to be optimized; the period frame distribution information records each frame period message corresponding to each period value and a message sending node to which each frame period message belongs;
calculating the period value and the frame number of the period message of the period value to obtain an initial offset interval corresponding to the period value;
comparing the initial bias interval with a preset standard bias interval;
if the initial offset interval is smaller than the standard offset interval, taking the standard offset interval as the offset interval corresponding to the period value;
if the initial offset interval is not smaller than the standard offset interval, taking the initial offset interval as the offset interval corresponding to the period value;
determining the transmission offset time of each frame period message corresponding to each period value at the message transmission node to which the message transmission node belongs based on the offset interval corresponding to each period value;
and sending each sending offset time to a corresponding message sending node, so that each message sending node sends the periodic message corresponding to the offset time according to the received sending offset time.
2. The method according to claim 1, wherein the obtaining of the current periodic frame distribution information to be optimized comprises:
analyzing the congestion time optimization instruction to obtain a file identifier contained in the congestion time optimization instruction;
determining a whole network database file corresponding to the file identifier;
and acquiring the current to-be-optimized periodic frame distribution information in the whole network database file.
3. The method according to claim 1, wherein the determining the transmission offset time of each frame period packet corresponding to each period value at the packet transmitting node to which the frame period packet belongs based on the offset interval corresponding to each period value comprises:
for each period value, determining the transmission offset time of each frame period message corresponding to the period value according to the time interval corresponding to the period value;
judging whether the transmission offset time of at least one frame period message exists in each frame period message belonging to each message transmission node is zero;
and for the message sending node without the sending offset time of the periodic message being zero, determining the periodic message with the minimum period value in the message sending node, and setting the sending offset time of the periodic message with the minimum period value to be zero so as to obtain the sending offset time of each frame of periodic message corresponding to each period value at the message sending node to which the periodic message belongs.
4. The method of claim 3, wherein the determining the transmission offset time of each frame period packet corresponding to the period value according to the time interval corresponding to the period value comprises:
determining a starting offset time in the period value;
setting initial sending offset time for each frame of the periodic message in sequence according to the initial offset time and the time interval corresponding to the period value;
judging whether the initial transmission offset time of each frame of the periodic message is greater than the period value; if the initial transmission offset time of the periodic message is not greater than the period value, determining the initial transmission offset time of the periodic message as the transmission offset time of the message; if the initial transmission offset time of the periodic message is greater than the period value, subtracting the period value from the initial transmission offset time of the periodic message to obtain the transmission offset time of the periodic message.
5. A message transmission apparatus, comprising:
the acquiring unit is used for responding to the congestion time optimization instruction and acquiring the current to-be-optimized periodic frame distribution information; the period frame distribution information records each frame period message corresponding to each period value and a message sending node to which each frame period message belongs;
the execution unit is used for calculating the period value and the frame number of the period message of the period value to obtain the initial offset interval corresponding to the period value;
the execution unit is further configured to compare the initial bias interval with a preset standard bias interval; if the initial offset interval is smaller than the standard offset interval, taking the standard offset interval as the offset interval corresponding to the period value; if the initial offset interval is not smaller than the standard offset interval, taking the initial offset interval as the offset interval corresponding to the period value;
a determining unit, configured to determine, based on the offset interval corresponding to each period value, a transmission offset time of each frame of period packet corresponding to each period value at the packet sending node to which the frame of period packet belongs;
and the sending unit is used for sending each sending offset time to the corresponding message sending node, so that each message sending node sends the periodic message corresponding to the offset time according to the received sending offset time.
6. The apparatus of claim 5, wherein the obtaining unit comprises:
the analysis subunit is configured to analyze the congestion time optimization instruction to obtain a file identifier included in the congestion time optimization instruction;
the first determining subunit is used for determining the whole network database file corresponding to the file identifier;
and the acquisition subunit is used for acquiring the current cycle frame distribution information to be optimized in the whole network database file.
7. The apparatus of claim 5, wherein the execution unit comprises:
a calculating subunit, configured to calculate the period value and the frame number of the periodic packet of the period value, so as to obtain an initial offset interval corresponding to the period value;
a comparison subunit, configured to compare the initial offset interval corresponding to the period value with a preset standard offset interval;
a first execution subunit, configured to, if the initial offset interval corresponding to the period value is smaller than the standard offset interval, take the standard offset interval as the offset interval corresponding to the period value;
and a second execution subunit, configured to, if the initial offset interval corresponding to the period value is not smaller than the standard offset interval, take the initial offset interval as the offset interval corresponding to the period value.
8. The apparatus of claim 5, wherein the determining unit comprises:
a second determining subunit, configured to determine, for each period value, the transmission offset time of each frame period packet corresponding to the period value according to the time interval corresponding to the period value;
a judging subunit, configured to judge whether there is a transmission offset time of at least one frame period packet in each frame period packet belonging to each packet transmission node, where the transmission offset time is zero;
a third determining subunit, configured to determine, for a packet sending node where there is no transmission offset time of a periodic packet, a periodic packet with a minimum period value in the packet sending node, and set the transmission offset time of the periodic packet with the minimum period value to zero, so as to obtain the transmission offset time of each frame of periodic packet corresponding to each period value at the packet sending node to which the periodic packet belongs.
9. The apparatus of claim 8, wherein the second determining subunit is configured to:
determining a starting offset time in the period value;
setting initial sending offset time for each frame of the periodic message in sequence according to the initial offset time and the time interval corresponding to the period value;
judging whether the initial transmission offset time of each frame of the periodic message is greater than the period value; if the initial transmission offset time of the periodic message is not greater than the period value, determining the initial transmission offset time of the periodic message as the transmission offset time of the message; if the initial transmission offset time of the periodic message is greater than the period value, subtracting the period value from the initial transmission offset time of the periodic message to obtain the transmission offset time of the periodic message.
CN202011248211.9A 2020-11-10 2020-11-10 Message sending method and device Active CN112367634B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011248211.9A CN112367634B (en) 2020-11-10 2020-11-10 Message sending method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011248211.9A CN112367634B (en) 2020-11-10 2020-11-10 Message sending method and device

Publications (2)

Publication Number Publication Date
CN112367634A CN112367634A (en) 2021-02-12
CN112367634B true CN112367634B (en) 2022-12-13

Family

ID=74508679

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011248211.9A Active CN112367634B (en) 2020-11-10 2020-11-10 Message sending method and device

Country Status (1)

Country Link
CN (1) CN112367634B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001142794A (en) * 1999-11-18 2001-05-25 Yanmar Agricult Equip Co Ltd Onboard control device
JP2007081628A (en) * 2005-09-13 2007-03-29 Nec Electronics Corp Method, program, and device for designing network
CN104035901A (en) * 2014-06-23 2014-09-10 中国北方车辆研究所 TTCAN bus timing and data transmitting method
CN106155014A (en) * 2016-06-23 2016-11-23 北京东土科技股份有限公司 A kind of industry internet field layer wideband bus real-time implementation method
CN106411443A (en) * 2015-07-28 2017-02-15 长城汽车股份有限公司 Message transmission method, in-vehicle network system and vehicle
CN106921546A (en) * 2016-12-30 2017-07-04 蔚来汽车有限公司 CAN bus control method and communication system adopting CAN bus
CN107332749A (en) * 2017-07-05 2017-11-07 北京东土科技股份有限公司 Synchronous method and device based on industry internet field layer wideband bus framework
CN109743242A (en) * 2018-12-28 2019-05-10 联创汽车电子有限公司 CAN bus message control system and its control method
CN110798818A (en) * 2019-07-26 2020-02-14 北京锦鸿希电信息技术股份有限公司 Train information transmission method and system for urban rail transit

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3433809A4 (en) * 2016-03-23 2019-10-02 Fedex Corporate Services, Inc. SYSTEMS, APPARATUS AND METHODS FOR AUTOMATIC ADJUSTMENT OF BROADCAST ADJUSTMENT OF A NODE IN A WIRELESS NODE NETWORK
US10814474B2 (en) * 2018-12-20 2020-10-27 Autonomous Roadway Intelligence, Llc Identification and localization of mobile robots

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001142794A (en) * 1999-11-18 2001-05-25 Yanmar Agricult Equip Co Ltd Onboard control device
JP2007081628A (en) * 2005-09-13 2007-03-29 Nec Electronics Corp Method, program, and device for designing network
CN104035901A (en) * 2014-06-23 2014-09-10 中国北方车辆研究所 TTCAN bus timing and data transmitting method
CN106411443A (en) * 2015-07-28 2017-02-15 长城汽车股份有限公司 Message transmission method, in-vehicle network system and vehicle
CN106155014A (en) * 2016-06-23 2016-11-23 北京东土科技股份有限公司 A kind of industry internet field layer wideband bus real-time implementation method
CN106921546A (en) * 2016-12-30 2017-07-04 蔚来汽车有限公司 CAN bus control method and communication system adopting CAN bus
CN107332749A (en) * 2017-07-05 2017-11-07 北京东土科技股份有限公司 Synchronous method and device based on industry internet field layer wideband bus framework
CN109743242A (en) * 2018-12-28 2019-05-10 联创汽车电子有限公司 CAN bus message control system and its control method
CN110798818A (en) * 2019-07-26 2020-02-14 北京锦鸿希电信息技术股份有限公司 Train information transmission method and system for urban rail transit

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Operational performance of a congested corridor with lanes dedicated to autonomous vehicle traffic;ZacharyVander Laan等;《International Journal of Transportation Science and Technology》;20170506;全文 *
一种CAN总线调度算法在机车制动机上的应用研究;刘剑锋等;《小型微型计算机系统》;20090131;全文 *

Also Published As

Publication number Publication date
CN112367634A (en) 2021-02-12

Similar Documents

Publication Publication Date Title
CN112115031B (en) Cluster state monitoring method and device
US20140301218A1 (en) Statistical analysis and prompting method and system for mobile terminal internet traffic
CN108958893A (en) Resource control method, device and the computer readable storage medium of high concurrent business
CN111966289B (en) Partition optimization method and system based on Kafka cluster
CN110493065A (en) The alarm association degree analysis method and system of a kind of cloud center O&M
CN112784992B (en) A network data analysis method, functional entity and electronic device
CN109933610A (en) Data processing method, device, computer equipment and storage medium
CN111652486A (en) Method and device for calculating service index
CN112888021B (en) Task unloading method for avoiding interruption in Internet of vehicles
CN111915892B (en) Data request response method, device, computer equipment and medium
CN114064105A (en) A push method, device, system and storage medium for application program update
CN112596985A (en) IT asset detection method, device, equipment and medium
CN114172819B (en) Method, system, electronic equipment and storage medium for predicting demand resources of NFV network element
EP3723343B1 (en) Resource processing method and system, storage medium and electronic device
CN112367634B (en) Message sending method and device
CN105653550A (en) Web page filtering method and device
CN110019372B (en) Data monitoring method, device, server and storage medium
CN113904940A (en) Resource adjusting method and device, electronic equipment and computer readable storage medium
CN114584627B (en) Middle station dispatching system and method with network monitoring function
CN108770014B (en) Calculation evaluation method, system and device of network server and readable storage medium
CN108632054B (en) Method and device for predicting the amount of information spread
CN116962526A (en) Security protection methods, devices, equipment, media and products
CN114185755A (en) A business capacity evaluation method and system for Tomcat container
CN104750464B (en) A kind of perception of User Status, management method and equipment
CN114138401A (en) Container configuration method, device, equipment and medium based on artificial intelligence

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