CN116015526B - Message processing method, device, electronic equipment and machine-readable storage medium - Google Patents

Message processing method, device, electronic equipment and machine-readable storage medium Download PDF

Info

Publication number
CN116015526B
CN116015526B CN202310298007.5A CN202310298007A CN116015526B CN 116015526 B CN116015526 B CN 116015526B CN 202310298007 A CN202310298007 A CN 202310298007A CN 116015526 B CN116015526 B CN 116015526B
Authority
CN
China
Prior art keywords
clock
clock domain
ptp
domain slice
message
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
CN202310298007.5A
Other languages
Chinese (zh)
Other versions
CN116015526A (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.)
New H3C Technologies Co Ltd
Original Assignee
New H3C Technologies 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 New H3C Technologies Co Ltd filed Critical New H3C Technologies Co Ltd
Priority to CN202310298007.5A priority Critical patent/CN116015526B/en
Publication of CN116015526A publication Critical patent/CN116015526A/en
Application granted granted Critical
Publication of CN116015526B publication Critical patent/CN116015526B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides a message processing method, a message processing device, electronic equipment and a machine-readable storage medium, wherein the method comprises the following steps: under the condition of receiving the PTP message, analyzing the PTP message to obtain a first clock domain slice ID carried in a message header of the PTP message; inquiring a first clock Zhong Shili corresponding to the first clock domain slice ID and a first time offset value corresponding to the first clock domain slice ID according to the first clock domain slice ID, performing time repair on the first clock instance according to the first time offset value, and performing time repair on the master clock time in the PTP message according to the first time offset value; and inquiring a first output interface associated with the first clock domain slice ID according to the first clock domain slice ID, and forwarding the PTP message subjected to time repair through the first output interface. By applying the embodiment of the invention, the independent multi-clock domains can be supported in the same deterministic network.

Description

Message processing method, device, electronic equipment and machine-readable storage medium
Technical Field
The present invention relates to the field of network communications technologies, and in particular, to a method and apparatus for processing a message, an electronic device, and a machine-readable storage medium.
Background
TSN (Time Sensitive Network ) adds certainty and reliability to conventional standard ethernet. The time sensitive mechanism of data transmission is added on the traditional Ethernet, so that the traditional Ethernet is used for transmitting critical applications with extremely high quality requirements, such as real-time images, internet of vehicles, industrial automation and the like.
The DetNet (Deterministic Networking, deterministic network) breaks through the limitation of TSN to ethernet, and generally refers to a network capable of guaranteeing deterministic bandwidth, delay, jitter, and packet loss index of service, which is essentially a novel QoS (Quality of Service ) guaranteeing technology.
The high-precision clock synchronization technique, PTP (Precision Time Protocol ), is a technical basis for deterministic networks. Only perfect clock synchronization is realized among all the constituent devices in the deterministic network, and low-delay, low-jitter and low-packet-loss transmission can be supported.
Networks using the PTP protocol are called PTP domains. The PTP domain has only one clock source with which all devices within the domain are synchronized.
Currently, following the technical convention of a unique clock source within the PTP domain, all users using deterministic networks provided by the operator must employ the operator's clock source and are not allowed to use other self-owned clock sources.
Disclosure of Invention
The invention provides a message processing method, a message processing device, electronic equipment and a machine-readable storage medium, which are used for realizing that the same deterministic network supports a plurality of independent clock domains.
According to a first aspect of the present invention, there is provided a message processing method applied to a switching device in a deterministic network provided by an operator, the method comprising:
under the condition of receiving a Precision Time Protocol (PTP) message, analyzing the PTP message to obtain a first clock domain slice ID carried in a message header of the PTP message;
inquiring a first clock Zhong Shili corresponding to the first clock domain slice ID and a first time offset value corresponding to the first clock domain slice ID according to the first clock domain slice ID, performing time repair on the first clock instance according to the first time offset value, and performing time repair on the master clock time in the PTP message according to the first time offset value;
and inquiring a first output interface associated with the first clock domain slice ID according to the first clock domain slice ID, and forwarding the PTP message after time repair through the first output interface.
According to a second aspect of the present invention, there is provided a message processing apparatus for deployment in a switching device in a deterministic network provided by an operator, the apparatus comprising:
the acquisition unit is used for analyzing the PTP message under the condition of receiving the PTP message of the accurate time protocol, and acquiring a first clock domain slice ID carried in a message header of the PTP message;
the repairing unit is configured to query a first time Zhong Shili corresponding to the first clock domain slice ID and a first time offset value corresponding to the first clock domain slice ID according to the first clock domain slice ID, perform time repairing on the first clock instance according to the first time offset value, and perform time repairing on the master clock time in the PTP message according to the first time offset value;
and the forwarding unit is used for inquiring a first outgoing interface associated with the first clock domain slice ID according to the first clock domain slice ID, and forwarding the PTP message subjected to time repair through the first outgoing interface.
According to a third aspect of the present invention there is provided an electronic device comprising a processor and a memory storing machine executable instructions executable by the processor for executing the machine executable instructions to implement the method provided in the first aspect.
According to a fourth aspect of the present invention there is provided a machine-readable storage medium having stored thereon machine-executable instructions which when executed by a processor implement the method provided by the first aspect.
By applying the technical scheme disclosed by the invention, for the switching equipment in the deterministic network provided by an operator, under the condition of receiving the PTP message, analyzing the PTP message, obtaining the first clock domain slice ID carried in the message header of the PTP message, inquiring the first Zhong Shili corresponding to the first clock domain slice ID and the first time offset value corresponding to the first clock domain slice ID according to the first clock domain slice ID, on one hand, repairing the first clock instance according to the first time offset value, on the other hand, repairing the time of the main clock in the PTP message according to the first time offset value, further inquiring the first output interface related to the first clock domain slice ID according to the first clock domain slice ID, forwarding the time repaired message through the first output interface, and realizing the independent multi-clock domain support in the same deterministic network by newly adding the clock domain slice design in the deterministic network, thereby facilitating the user to realize the deterministic transmission with low-latency and low-loss and high reliability by accessing the network under the condition of not modifying the existing clock synchronization scheme.
Drawings
FIG. 1 is a flow chart of a message processing method according to an embodiment of the present invention;
fig. 2 is a schematic architecture diagram of a specific application scenario provided in an embodiment of the present invention;
FIG. 3 is a schematic diagram of a message processing apparatus according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of another message processing apparatus according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of another message processing apparatus according to an embodiment of the present invention;
fig. 6 is a schematic hardware structure of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to better understand the technical solution in the embodiments of the present invention and make the above objects, features and advantages of the embodiments of the present invention more comprehensible, the technical solution in the embodiments of the present invention is described in further detail below with reference to the accompanying drawings.
Referring to fig. 1, a flow chart of a message processing method provided by an embodiment of the present invention is shown, where the message processing method may be applied to a switching device in a deterministic network provided by an operator, and as shown in fig. 1, the message processing method may include the following steps:
and 101, under the condition of receiving the PTP message, analyzing the PTP message to acquire a first clock domain slice ID carried in a message header of the PTP message.
In the embodiment of the invention, in order to support independent multiple clock domains in the same deterministic network, a design of 'clock domain slicing' is newly added, and each 'clock domain slicing' can realize an independent and operable PTP clock domain scheme.
For example, a field-clock domain slice ID for identifying a clock domain slice may be newly added to a header of the PTP packet, where different clock domain slice IDs correspond to different clock domain slices.
Based on the above design, when the switching device in the deterministic network provided by the operator receives the PTP packet, the switching device may parse the received PTP packet to obtain a clock domain slice ID (referred to herein as a first clock domain slice ID) carried in a header of the PTP packet.
In an example, the clock domain slice ID may be carried in a reserved field (reserved) of a header of the PTP packet, and a specific format thereof may be described below with reference to a specific example, which is not described herein.
Step 102, according to the first clock domain slice ID, the first clock Zhong Shili corresponding to the first clock domain slice ID and the first time offset value corresponding to the first clock domain slice ID are queried, the first clock instance is time-repaired according to the first time offset value, and the master clock time in the PTP message is time-repaired according to the first time offset value.
In the embodiment of the invention, one clock domain slice ID may correspond to one clock instance, and different clock instances may correspond to one independently operable PTP clock domain scheme.
When the switching device acquires the first clock domain slice ID carried in the header of the PTP packet, the switching device may query, according to the first clock domain slice ID, a clock instance corresponding to the first clock domain slice ID (herein referred to as first time Zhong Shili).
Considering that the requirements for time accuracy may vary in different PTP clock domain schemes, there may also be a difference in the offset value (corresponding to the delay between the current node and the previous node) of the time repair for different times Zhong Shili in the same switching device.
Accordingly, the switching device may also determine a time offset value (referred to herein as a first time offset value) corresponding to the first clock domain slice ID according to the acquired first clock domain slice ID.
In order to synchronize the local time with the master clock time, in case a first time offset value is determined, on the one hand, a time repair may be performed on the first clock instance in dependence of the first time offset value.
For example, the switching device may acquire the master clock time (e.g., the grandmaster clock time) in the PTP packet, and add the first time offset value based on the clock time, and use the time as the actual time of the master clock to perform time repair, so as to implement time synchronization.
On the other hand, the time repair can be performed on the master clock time in the PTP message according to the first time offset value, so that the next node can more accurately realize synchronization with the master clock time.
In one example, a switching device has multiple clock instances, with different clock domains independent of each other.
For example, a switching device may support multiple clock instances, one clock instance corresponding to each clock domain, with different clock instances isolated from each other and not affecting each other.
Step 103, according to the first clock domain slice ID, inquiring a first outgoing interface associated with the first clock domain slice ID, and forwarding the PTP message after time repair through the first outgoing interface.
In the embodiment of the present invention, under the condition of completing time repair, the switching device may query an outbound interface (referred to herein as a first outbound interface) associated with the first clock domain slice ID according to the first clock domain slice ID, and forward the PTP message after time repair through the first outbound interface.
In the embodiment of the present invention, the time precision corresponding to Zhong Shili is not exactly the same, and the switching device may determine the time precision corresponding to the clock instance according to the clock instance corresponding to the clock domain slice ID carried in the header of the PTP packet in the process of forwarding the PTP packet, and store the PTP packet in the transmission queues with different priorities according to the different time precision.
Illustratively, the higher the time accuracy, the higher the priority.
It can be seen that, in the method flow shown in fig. 1, for the switching device in the deterministic network provided by the operator, under the condition of receiving the PTP packet, the PTP packet is parsed, the first clock domain slice ID carried in the header of the PTP packet is obtained, according to the first clock domain slice ID, the first time Zhong Shili corresponding to the first clock domain slice ID and the first time offset value corresponding to the first clock domain slice ID are queried, on the one hand, the first clock instance is repaired according to the first time offset value, on the other hand, the time of the master clock in the PTP packet is repaired according to the first time offset value, and further, according to the first clock domain slice ID, the first output interface associated with the first clock domain slice ID is queried, and the PTP packet after time repair is forwarded through the first output interface.
In some embodiments, in the case of receiving the PTP packet, analyzing the PTP packet to obtain the target clock domain slice ID carried in the header of the PTP packet may include:
under the condition that the switching equipment is non-source end edge switching equipment and a PTP message is received, analyzing the PTP message to obtain a target clock domain slice ID carried in a message header of the PTP message;
the message processing method provided by the embodiment of the invention can also comprise the following steps:
under the condition that the switching equipment is source end edge switching equipment and a PTP message is received, determining a second clock domain slice ID associated with an access interface according to the access interface of the PTP message, and adding the second clock domain slice ID into a message header of the PTP message;
inquiring a second clock instance corresponding to the second clock domain slice ID and a second time offset value corresponding to the second clock domain slice ID according to the second clock domain slice ID, performing time repair on the second clock instance according to the second time offset value, and performing time repair on the master clock time in the PTP message according to the second time offset value;
and inquiring a second output interface associated with the second clock domain slice ID according to the second clock domain slice ID, and forwarding the PTP message subjected to time repair through the second output interface.
For example, in order to improve the compatibility between the technical solution provided by the embodiment of the present invention and the existing PTP protocol and reduce the influence of the technical solution on the implementation of the existing PTP protocol, the clock domain slice ID may be determined by a source edge switching device in a deterministic network provided by an operator (i.e., a PTP packet is transmitted to the deterministic network provided by the operator through the switching device) and added to a header of the PTP packet.
Accordingly, for the source edge switching device of the deterministic network provided by the operator, in the case of receiving the PTP packet, the clock domain slice ID (referred to herein as the second clock domain slice ID) associated with the ingress interface may be determined according to the ingress interface of the PTP packet, and the second clock domain slice ID may be added to the header of the PTP packet.
It should be noted that, the clock domain slice ID allocated to the user by the switching device may be determined according to the service subscribed by the user, and the association relationship between the interface and the clock domain slice ID allocated to the user is recorded according to the interface accessed by the user.
The services subscribed by the users are different, and different time precision requirements can be met.
For example, in the case that the second clock domain slice ID is determined, the clock instance corresponding to the second clock domain slice ID (herein referred to as the second clock instance) and the time offset value corresponding to the second clock domain slice ID (herein referred to as the second time offset value) may be queried according to the second clock domain slice ID, and on one hand, the second clock instance may be time-repaired according to the second time offset value; on the other hand, the time repair can be performed on the master clock time in the PTP packet according to the second time offset value.
Furthermore, the switching device may query an outbound interface (referred to herein as a second outbound interface) associated with the second clock domain slice ID according to the second clock domain slice ID, and forward the PTP message after time repair through the second outbound interface.
For a non-source edge switching device (such as an intermediate switching device or a destination edge switching device), the received PTP packet may be processed in a manner described in the method flow shown in fig. 1, and the specific implementation thereof will not be described herein.
It should be noted that, in the embodiment of the present invention, the clock domain slice ID in the PTP packet is not limited to be added by a source edge network device in a deterministic network provided by an operator, and may be preconfigured in a device where a master clock node is located, and the PTP packet header of the PTP packet sent by the device where the master clock node is located may carry the clock domain slice ID, which is not limited in the embodiment of the present invention.
In one embodiment, before forwarding the PTP packet after time repair through the first outgoing interface when the switching device is the destination edge switching device, the method further includes:
and deleting the first clock domain slice ID carried in the header of the PTP message.
For example, in order to further reduce the influence of the technical solution provided by the embodiment of the present invention on the implementation of the existing PTP protocol solution, for a destination edge switching device of a deterministic network provided by an operator (i.e., a PTP packet leaves the deterministic network provided by the operator through the switching device), if time repair is completed in a manner described in the method flow shown in fig. 1, before forwarding the PTP packet, the clock domain slice ID carried in the header of the PTP packet may be deleted.
In some embodiments, after querying the first clock instance corresponding to the first clock domain slice ID according to the first clock domain slice ID, the method may further include:
and discarding the PTP message under the condition that the first clock instance corresponding to the first clock domain slice ID is not queried.
For example, for a received PTP packet, when the ID does not query the first clock domain slice ID corresponding to the first clock domain slice ID according to the first clock domain slice carried in the header of the PTP packet, the switching device may determine that the first clock domain slice ID does not belong to the clock domain slice ID that needs to be processed by the device, and in this case, the PTP packet may not be processed, for example, the PTP packet may be discarded.
In order to enable those skilled in the art to better understand the technical solutions provided by the embodiments of the present invention, the technical solutions provided by the embodiments of the present invention are described below with reference to specific examples.
In this embodiment, within the same deterministic network, separate multi-clock domains can be supported: different clock schemes may coexist in the same network. Based on the design of clock domain slicing, each clock domain can be isolated from each other, run independently and are not mutually interfered, and coexist in the same deterministic network. Each user of the deterministic network can realize transparent access, namely, can consider that the user is the only user of the deterministic network, and the clock synchronization scheme of the user is kept unchanged so as to reduce the access cost to the greatest extent. And once the clock source of one user fails, other users cannot be affected, and the failure range is limited to the clock domain of the user.
Specifically, the deterministic network is composed of several network devices; deterministic networks support independent multi-clock domains, i.e. network devices support independent multi-clock domains. On deterministic network devices supporting independent multiple clock domains, a top-level design of a newly added clock domain slice (timezone-slice), each clock domain slice can implement an independently operable PTP clock domain scheme.
To implement the above scheme, a "clock domain slice-ID" may be supported in the PTP header.
The PTP message head has three reserved fields with lengths of 4bits,8bits and 32bits respectively; a total of 44bits are available.
Illustratively, the format of the PTP header may be as shown in table 1:
TABLE 1
Figure SMS_1
The meaning of the relevant fields in the PTP header shown in table 1 may be as shown in table 2:
TABLE 2
Figure SMS_2
As shown in table 1, the PTP header has three reserved fields, 4bits,8bits,32bits in length, respectively; 44bits total, the reserved field can be used to carry the clock domain slice ID.
For example, in case that the length of each reserved domain is insufficient, the reserved domains may be combined.
Based on the modification of the PTP message, the PTP processing procedure needs to be modified accordingly:
1. for devices that support only one clock domain slice: processing is carried out under the condition that the clock domain slice ID carried in the message header of the PTP message belongs to the clock domain slice which needs to be processed (for example, a corresponding clock instance can be inquired); otherwise, the PTP message is filtered.
2. For a device supporting multiple clock domain slices, each clock domain slice that itself needs to be processed separately; the slices of different clock domains are isolated from each other and do not affect each other.
The original PTP function can still be maintained with each clock domain slice, for example:
clock domain slicing supports own intra-slice clock nodes and PTP interfaces (IEEE 1588 v 2), such as: OC common Clock (oridinary Clock); BC Boundary Clock (Boundary Clock); TC transparent clock (Transparent Clock).
For a pair of clock nodes synchronized with each other within the same slice, its master-slave relationship still maintains the previous state:
master/slave node: the clock Node that issues the synchronization time is called a Master Node, and the clock Node that receives the synchronization time is called a Slave Node.
Master/slave clock: the Clock on the Master node is called the Master Clock (Master Clock) and the Clock on the Slave node is called the Slave Clock (Slave Clock).
Master/slave interface: the PTP interface that issues the synchronization time on the clock node is called Master Port, while the PTP interface that receives the synchronization time is called Slave Port, both of which may exist on BC or OC.
Request/grant port: a unicast negotiation request port (request-port) and a grant port (grant-port) are defined in g.8275.2. The request-port is a PTP port that requests and receives PTP services, and the grant-port is a PTP port that grants and provides PTP services. Typically, the grant-port state is Master; when the request-port is selected as the time synchronization interface, the port is in a Slave state, otherwise, the port is in a list state.
In addition, there is a PTP interface that neither issues nor receives synchronization time, called a Passive interface (Passive Port). In the PTP network of the same slice, all clock node types (except TC) are linked together by a master-slave relationship. The master-slave relationship between the clock nodes can be automatically generated through a BMC algorithm or can be manually designated. The function within these slices remains unchanged.
For example, taking the scenario shown in fig. 2 as an example, assume that there are multiple users, gradually joining the same deterministic network, wherein:
the user 1 needs to connect the time sensitive application between different places, the requirement on time precision is very high, the remote factory adopts a self-built 5G private network, and the GPS clock source of the 5G base station is directly used for clock synchronization;
the requirement on time synchronization precision is not high, and the user 2 can directly synchronize own network by using a clock source in a deterministic network provided by an operator;
user 3 and user 2 use different PTP protocol standards, but because of the geographical location relationship of the headquarters of user 3 and user 2, actually access to the same access device of the deterministic network provided by the operator.
In this embodiment, different clock domain Slice IDs (assuming slice_100, slice_200, and slice_300, respectively) may be assigned to user 1, user 2, and user 3, respectively.
For user 1, since it is a private network user, it accesses the network through a deterministic network switching device provided by a specific operator. Under the condition that the switching device receives the PTP message of the user 1, a slice_100 can be added in the message header of the PTP message, a corresponding clock instance and a time offset value are inquired according to the slice_100, the inquired clock instance is subjected to time restoration according to the inquired time offset value, the main clock time in the PTP message is subjected to time restoration according to the time offset value, and further, the PTP message subjected to time restoration is forwarded through an outgoing interface corresponding to the slice_100.
For the destination edge switching device in the PTP message forwarding process, before PTP forwarding, slice_100 carried in the PTP message header may be deleted.
For user 2 and user 3, they access the network through deterministic network switching devices provided by the same operator, including clock instances corresponding to slice_200 and slice_300, respectively (assuming clock instance 2 and clock instance 3, respectively).
Under the condition that the switching device receives the PTP message of the user 2 (user 3), a slice_200 (slice_300) can be added in the message header of the PTP message, the corresponding clock instance and time offset value are queried according to the slice_200 (slice_300), the queried clock instance 2 (clock instance 3) is time repaired according to the queried time offset value, and the time of the master clock in the PTP message is time repaired according to the time offset value, and further, the time-repaired PTP message is forwarded through the output interface corresponding to the slice_100.
For the destination edge switching device in the PTP packet forwarding process, before PTP forwarding is performed, slice_200 (slice_300) carried in the PTP packet header may be deleted.
It can be seen that by adapting switching equipment in a deterministic network provided by an operator, it supports multiple clock source schemes in a "clock domain slicing" manner. The deterministic network formed by networking the equipment can support a plurality of independent clock source synchronization schemes, realizes that the same deterministic network supports a plurality of independent clock domains, and is convenient for users to access the deterministic network to realize low-delay low-jitter low-packet-loss high-reliability deterministic transmission under the condition of not modifying the existing clock synchronization scheme.
Referring to fig. 3, a schematic structural diagram of a message processing apparatus is provided in an embodiment of the present invention, and as shown in fig. 3, the message processing apparatus may include:
an obtaining unit 310, configured to parse the PTP packet under the condition that the PTP packet with the accurate time protocol is received, and obtain a first clock domain slice ID carried in a header of the PTP packet;
a repairing unit 320, configured to query, according to the first clock domain slice ID, a first time Zhong Shili corresponding to the first clock domain slice ID, and a first time offset value corresponding to the first clock domain slice ID, perform time repairing on the first clock instance according to the first time offset value, and perform time repairing on the master clock time in the PTP packet according to the first time offset value;
and the forwarding unit 330 is configured to query a first outbound interface associated with the first clock domain slice ID according to the first clock domain slice ID, and forward the PTP message after time repair through the first outbound interface.
In some embodiments, the obtaining unit 310 parses the PTP packet when receiving the PTP packet to obtain a target clock domain slice ID carried in a header of the PTP packet, including:
under the condition that the switching equipment is non-source end edge switching equipment and a PTP message is received, analyzing the PTP message to obtain a target clock domain slice ID carried in a message header of the PTP message;
as shown in fig. 4, the apparatus further includes:
a message processing unit 340, configured to determine, according to an ingress interface of a PTP message, a second clock domain slice ID associated with the ingress interface and add the second clock domain slice ID to a header of the PTP message when the switching device is a source edge switching device and the PTP message is received;
the repairing unit 320 is further configured to query a second clock instance corresponding to the second clock domain slice ID and a second time offset value corresponding to the second clock domain slice ID according to the second clock domain slice ID, perform time repairing on the second clock instance according to the second time offset value, and perform time repairing on the master clock time in the PTP packet according to the second time offset value;
the forwarding unit 330 is further configured to query a second output interface associated with the second clock domain slice ID according to the second clock domain slice ID, and forward the PTP message after time repair through the second output interface.
In some embodiments, the packet processing unit 340 is further configured to delete, when the switching device is a destination edge switching device, the first clock domain slice ID carried in a header of the PTP packet before forwarding the PTP packet after time repair through the first outgoing interface.
In some embodiments, as shown in fig. 5 (which may be optimized based on the apparatus shown in fig. 3 or fig. 4, which is illustrated as an example based on fig. 3), the apparatus may further include:
and a packet discarding unit 350, configured to discard the PTP packet if the first clock instance corresponding to the first clock domain slice ID is not queried.
In some embodiments, the switching device has multiple clock instances, different clock instances being independent of each other.
In some embodiments, the clock domain slice ID is carried in a reserved field of a header of the PTP message.
The embodiment of the invention provides an electronic device, which comprises a processor and a memory, wherein the memory stores machine executable instructions capable of being executed by the processor, and the processor is used for executing the machine executable instructions to realize the message processing method.
Fig. 6 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present invention. The electronic device may include a processor 601, a memory 602 storing machine-executable instructions. The processor 601 and memory 602 may communicate via a system bus 603. Also, the processor 601 may perform the message processing method described above by reading and executing machine-executable instructions in the memory 602 that correspond to the message processing logic.
The memory 602 referred to herein may be any electronic, magnetic, optical, or other physical storage device that may contain or store information, such as executable instructions, data, or the like. For example, a machine-readable storage medium may be: RAM (Radom Access Memory, random access memory), volatile memory, non-volatile memory, flash memory, a storage drive (e.g., hard drive), a solid state drive, any type of storage disk (e.g., optical disk, dvd, etc.), or a similar storage medium, or a combination thereof.
In some embodiments, a machine-readable storage medium, such as memory 602 in fig. 6, is also provided, having stored therein machine-executable instructions that when executed by a processor implement the message processing method described above. For example, the storage medium may be ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
The implementation process of the functions and roles of each unit in the above device is specifically shown in the implementation process of the corresponding steps in the above method, and will not be described herein again.
For the device embodiments, reference is made to the description of the method embodiments for the relevant points, since they essentially correspond to the method embodiments. The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purposes of the present invention. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
As can be seen from the above embodiments, for the switching device in the deterministic network provided by the operator, under the condition that the PTP message is received, the PTP message is parsed, the first clock domain slice ID carried in the header of the PTP message is obtained, according to the first clock domain slice ID, the first time Zhong Shili corresponding to the first clock domain slice ID and the first time offset value corresponding to the first clock domain slice ID are queried, on one hand, the first clock instance is time repaired according to the first time offset value, on the other hand, the time repair is performed on the master clock time in the PTP message according to the first time offset value, further, according to the first clock domain slice ID, the first output interface associated with the first clock domain slice ID is queried, and the time repaired message is forwarded through the first output interface.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It is to be understood that the invention is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (14)

1. A method of processing a message, applied to a switching device in a deterministic network provided by an operator, the method comprising:
under the condition of receiving a Precision Time Protocol (PTP) message, analyzing the PTP message to obtain a first clock domain slice ID carried in a message header of the PTP message;
inquiring a first clock Zhong Shili corresponding to the first clock domain slice ID and a first time offset value corresponding to the first clock domain slice ID according to the first clock domain slice ID, performing time repair on the first clock instance according to the first time offset value, and performing time repair on the master clock time in the PTP message according to the first time offset value; wherein, a clock domain slice ID corresponds to a clock instance, and a clock instance corresponds to an independently operable PTP clock domain scheme;
and inquiring a first output interface associated with the first clock domain slice ID according to the first clock domain slice ID, and forwarding the PTP message after time repair through the first output interface.
2. The method according to claim 1, wherein the parsing the PTP message in the case of receiving the PTP message to obtain the target clock domain slice ID carried in the header of the PTP message includes:
under the condition that the switching equipment is non-source end edge switching equipment and a PTP message is received, analyzing the PTP message to obtain a target clock domain slice ID carried in a message header of the PTP message;
the method further comprises the steps of:
under the condition that the switching equipment is source end edge switching equipment and a PTP message is received, determining a second clock domain slice ID (identity) associated with an access interface of the PTP message according to the access interface of the PTP message, and adding the second clock domain slice ID into a message header of the PTP message;
inquiring a second clock instance corresponding to the second clock domain slice ID and a second time offset value corresponding to the second clock domain slice ID according to the second clock domain slice ID, performing time repair on the second clock instance according to the second time offset value, and performing time repair on the master clock time in the PTP message according to the second time offset value;
and inquiring a second output interface associated with the second clock domain slice ID according to the second clock domain slice ID, and forwarding the PTP message after time repair through the second output interface.
3. The method according to claim 2, wherein, in the case that the switching device is a destination edge switching device, before forwarding the PTP message after time repair through the first outgoing interface, the method further comprises:
and deleting the first clock domain slice ID carried in the header of the PTP message.
4. The method of claim 1, wherein after querying the first clock instance corresponding to the first clock domain slice ID according to the first clock domain slice ID, further comprising:
and discarding the PTP message under the condition that the first clock instance corresponding to the first clock domain slice ID is not queried.
5. The method of claim 1, wherein the switching device has a plurality of clock instances, the different clock instances being independent of each other.
6. The method of claim 1, wherein the clock domain slice ID is carried in a reserved field of a header of the PTP message.
7. A message processing apparatus, characterized by switching devices deployed in a deterministic network provided by an operator, the apparatus comprising:
the acquisition unit is used for analyzing the PTP message under the condition of receiving the PTP message of the accurate time protocol, and acquiring a first clock domain slice ID carried in a message header of the PTP message;
the repairing unit is configured to query a first time Zhong Shili corresponding to the first clock domain slice ID and a first time offset value corresponding to the first clock domain slice ID according to the first clock domain slice ID, perform time repairing on the first clock instance according to the first time offset value, and perform time repairing on the master clock time in the PTP message according to the first time offset value; wherein, a clock domain slice ID corresponds to a clock instance, and a clock instance corresponds to an independently operable PTP clock domain scheme;
and the forwarding unit is used for inquiring a first outgoing interface associated with the first clock domain slice ID according to the first clock domain slice ID, and forwarding the PTP message subjected to time repair through the first outgoing interface.
8. The apparatus of claim 7, wherein the obtaining unit, when receiving the PTP packet, parses the PTP packet to obtain a target clock domain slice ID carried in a header of the PTP packet, includes:
under the condition that the switching equipment is non-source end edge switching equipment and a PTP message is received, analyzing the PTP message to obtain a target clock domain slice ID carried in a message header of the PTP message;
the apparatus further comprises:
the message processing unit is used for determining a second clock domain slice ID associated with an input interface according to the input interface of the PTP message under the condition that the switching equipment is source end edge switching equipment and the PTP message is received, and adding the second clock domain slice ID into a message header of the PTP message;
the repairing unit is further configured to query a second clock instance corresponding to the second clock domain slice ID and a second time offset value corresponding to the second clock domain slice ID according to the second clock domain slice ID, perform time repairing on the second clock instance according to the second time offset value, and perform time repairing on the master clock time in the PTP packet according to the second time offset value;
the forwarding unit is further configured to query a second output interface associated with the second clock domain slice ID according to the second clock domain slice ID, and forward the PTP message after time repair through the second output interface.
9. The apparatus of claim 8, wherein the device comprises a plurality of sensors,
the message processing unit is further configured to delete the first clock domain slice ID carried in the header of the PTP message before forwarding the PTP message after time repair through the first outgoing interface when the switching device is the destination edge switching device.
10. The apparatus of claim 7, wherein the apparatus further comprises:
and the message discarding unit is used for discarding the PTP message under the condition that the first clock instance corresponding to the first clock domain slice ID is not queried.
11. The apparatus of claim 7, wherein the switching device has a plurality of clock instances, different clock instances being independent of each other.
12. The apparatus of claim 7, wherein the clock domain slice ID is carried in a reserved field of a header of the PTP message.
13. An electronic device comprising a processor and a memory, the memory storing machine executable instructions executable by the processor for executing the machine executable instructions to implement the method of any of claims 1-6.
14. A machine-readable storage medium having stored thereon machine-executable instructions which, when executed by a processor, implement the method of any of claims 1-6.
CN202310298007.5A 2023-03-23 2023-03-23 Message processing method, device, electronic equipment and machine-readable storage medium Active CN116015526B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310298007.5A CN116015526B (en) 2023-03-23 2023-03-23 Message processing method, device, electronic equipment and machine-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310298007.5A CN116015526B (en) 2023-03-23 2023-03-23 Message processing method, device, electronic equipment and machine-readable storage medium

Publications (2)

Publication Number Publication Date
CN116015526A CN116015526A (en) 2023-04-25
CN116015526B true CN116015526B (en) 2023-06-27

Family

ID=86033934

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310298007.5A Active CN116015526B (en) 2023-03-23 2023-03-23 Message processing method, device, electronic equipment and machine-readable storage medium

Country Status (1)

Country Link
CN (1) CN116015526B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101159692A (en) * 2007-11-26 2008-04-09 杭州华三通信技术有限公司 Method and apparatus for obtaining packet slice numbers

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102130735A (en) * 2010-11-09 2011-07-20 华为技术有限公司 Transmission equipment and method thereof for realizing synchronization of clock and time
CN109150350B (en) * 2017-06-13 2021-04-30 中兴通讯股份有限公司 Equipment delay compensation method, system and storage medium
US10812209B2 (en) * 2017-06-26 2020-10-20 Huawei Technologies Co., Ltd. Method and apparatus for provision of timing for a communication network
CN111106889B (en) * 2018-10-25 2021-04-20 华为技术有限公司 Clock synchronization method and device
CN113572559B (en) * 2018-11-21 2022-06-14 华为技术有限公司 Synchronization method and device
CN115242699A (en) * 2021-04-22 2022-10-25 华为技术有限公司 Message transmission method, slice generation method, device and system
CN115694700A (en) * 2021-07-23 2023-02-03 英特尔公司 Apparatus for use in a wireless communication system
CN114827195B (en) * 2022-03-28 2023-06-23 国网福建省电力有限公司 Power 5G low-delay jitter implementation method for distribution network stable protection
CN115297493A (en) * 2022-07-22 2022-11-04 武汉烽火技术服务有限公司 SRv6 network slice configuration management method and system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101159692A (en) * 2007-11-26 2008-04-09 杭州华三通信技术有限公司 Method and apparatus for obtaining packet slice numbers

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Low-latency hardware architecture for cipher-based message authentication code;Imed Ben Dhaou;2017 IEEE International Symposium on Circuits and Systems (ISCAS);全文 *

Also Published As

Publication number Publication date
CN116015526A (en) 2023-04-25

Similar Documents

Publication Publication Date Title
WO2017133478A1 (en) Method and clock for time synchronization
US9667370B2 (en) Communication device with peer-to-peer assist to provide synchronization
US8879586B2 (en) Inband timestamping
US10856158B2 (en) Network resource function supporting multi-region querying
US20130227008A1 (en) Clock synchronization based on predefined grandmaster
JP2023535562A (en) Method, system and computer readable medium for providing network capability discovery service enhancement
CN111585862A (en) Method and device for realizing network intercommunication between EtherCAT and TSN
CN102035638A (en) Clock source selection processing method, device and system
WO2022027666A1 (en) Time synchronization method and apparatus
WO2021233313A1 (en) Port state configuration method, apparatus, system, and storage medium
WO2020089962A1 (en) Time synchronization system, time master, management master, and time synchronization method
CN102342051B (en) For coming the method for synchronised clock and relevant system and module by separating transmission first and second data via at least one time distribution protocol
CN116015526B (en) Message processing method, device, electronic equipment and machine-readable storage medium
CN109728968B (en) Method, related equipment and system for obtaining target transmission path
CN112039621B (en) Time synchronization method and system
Rost et al. 5G plug-and-produce
CN111277349A (en) Clock synchronization method and system
CN115699918A (en) Clock synchronization mode indicating method and communication device
WO2019104522A1 (en) Methods and devices for flexe network
Chowdhury Packet Timing: Precision Time Protocol
EP4152655A1 (en) Mobile radio communication system and method for providing a time-sensitive networking ethernet bridge
CN113890790B (en) Method and device for transmitting service data in industrial network, equipment and storage medium
CN116366570B (en) Message forwarding method and device and programmable device
US11956331B2 (en) System and method for cache synchronization among network gateways in networks such as software defined networks
US20230421280A1 (en) Method and Device for Time Synchronization of Time Synchronization Domains

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