Signal flow message processing method and device, electronic device and storage medium
By synchronizing the PTP clock and updating the timestamps of signal flow messages in the IP matrix equipment, the problem of out-of-synchronization of signal flow RTP timestamps in the IP production and broadcast network system is solved, reducing system costs and delays, and improving system reliability. sex and efficiency.
Patent Information
- Application Number
- CN202310566690.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-18
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2043-05-18
AI Technical Summary
In the IP production and broadcast network system, the RTP timestamp of the signal stream is out of synchronization due to transmission delay or PTP unsynchronization, causing the system to fail to work normally, increasing system construction and maintenance costs, and destroying the seamless protection switching technology. Dual-path transmission idea, single point of failure appears.
By completing PTP synchronization in the IP matrix device, calculating the timestamp offset value of the signal flow message, and updating the timestamp of the signal flow message, the PTP timestamp refresh of the signal flow is realized, avoiding the need for additional IPG devices and separate Timestamp refresh equipment reduces system construction and maintenance costs.
It achieves RTP timestamp synchronization of signal flow, reduces signal transmission delay, maintains the requirements of seamless protection switching technology, improves system reliability and efficiency, and reduces system complexity and cost.
Smart Images

Figure CN116707693B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of time synchronization technology, and in particular to a signal stream message processing method and device, an electronic device, and a storage medium. Background Art
[0002] As the IP-based production and broadcasting network becomes more and more popular, some new scenarios emerge. When the media terminal generates audio and video signals and performs IP encapsulation, it will encapsulate the PTP time of the signal generation into the PTP timestamp field of the RTP header of the IP message (the PTP timestamp is the same as the RTP timestamp). The downstream media terminal will refer to this timestamp when processing the signal to ensure the correct signal processing. When the media terminal processes the signal, it will compare the timestamps of different signals. When the timestamps of different signals differ greatly, it may cause problems. For example, some devices will compare the PTP timestamps of the two video signals when switching the video. When the timestamp difference exceeds the allowable range, the switching will fail. Therefore, there is a need to align the PTP timestamps between different signals. This can be solved within a limited range by relying on the PTP clock synchronization capability of the production and broadcasting network, that is, using the IP-based production and broadcasting network to gradually transmit the PTP clock to different terminal devices that generate media signals, and keep the PTP clock synchronization of these terminal devices within a certain range, so that the PTP timestamp difference of the signals generated by different terminal devices in a production and broadcasting network at the same time can be kept within a certain range. And because the scope of a production and broadcasting domain is limited, the PTP timestamp difference of different signals when they arrive at the same processing terminal device can also be kept within a reasonable range.
[0003] IP network supports long-distance data transmission. However, the data transmission in the network will increase the delay due to the increase of transmission distance and the increase of devices in the middle. For example, the transmission delay of data in optical fiber is about 5 microseconds per kilometer. The delay of each hop of IP network equipment is assumed to be 10 microseconds. When data is transmitted between two places 1000 kilometers away, assuming that it needs to pass through 5 hops of IP network equipment, the delay generated by the IP network will reach 5*1000+5*10=5050 microseconds=5.05 milliseconds (the delay generated by the transmission equipment is not calculated here). In this way, even if the signal generated by the remote production and broadcasting domain is synchronized with the local production and broadcasting domain PTP (such as the PTP clock source comes from the Beidou satellite), the signal generated at the same time will still have a relatively large PTP timestamp difference. If the remote production and broadcasting domain and the local production and broadcasting domain PTP are not synchronized, the PTP timestamp difference may be even greater.
[0004] See also Figure 1When the timestamps of different signals (signal A and signal B) processed by an IP-based production and broadcasting network system are not synchronized (not within a certain error range, such as 1 / 4 frame duration), the IP-based production and broadcasting network system cannot work normally. The timestamps of signal A and signal B are not synchronized in the following two situations: first, the PTP domains generated by signal A and signal B are inconsistent, and the PTP times of the two domains are inconsistent; second, the PTP domains generated by signal A and signal B are consistent, but signal B is transmitted over a long distance, and due to delay, when it arrives at PTP domain A, the message timestamp is already far behind the local signal timestamp.
[0005] On the other hand, problems such as occasional packet loss and sudden increase in delay that may occur in IP transmission will damage the reliability of production and broadcasting services. To solve this problem, after the production and broadcasting network is IP-based, the seamless protection switching technology of SMPTE ST.2022-7 (Seamless Protection Switching of SMPTE ST2022 IP Datagrams) is followed as the basic protection solution. It stipulates a redundant protection mechanism for production and broadcasting signals when they are transmitted over the IP network relying on a 1+1 (A channel and B channel) dual-transmission and selection mechanism. It is generally required that the IP network paths that the A channel and B channel signals must pass through do not overlap, so as to avoid the failure of the redundant mechanism due to a single point failure.
[0006] See also Figure 2 The seamless protection switching technology requires that a signal stream of the production and broadcasting network be replicated at the source end to transmit two IP streams A and B with the same content but different IP header features. The IP 5-tuples of the A and B signals are different (mainly the destination IP addresses, that is, the multicast group addresses must be different), but the timestamps and sequence numbers of the load and RTP layers of A and B need to be synchronized; A and B are generally required to have non-overlapping paths and non-overlapping nodes during network transmission to prevent A and B from being interrupted at the same time when a single point failure occurs; A and B do not distinguish between primary and backup, and are both effective; the media terminal equipment will receive A and B signals at the same time, and will extract the specific load content from A and B according to the rules before finally synthesizing them into video frames; the extraction rules are different for different terminal implementations, but it is very likely that the corresponding message of the expected sequence number is received first based on the RTP timestamp information in the message and the expected sequence number. In the case of the same RTP timestamp of A and B, if A receives the message with the expected sequence number first, A will be selected, and if B receives it first, B will be selected; according to this extraction rule, when any of A and B fails, the final output signal can be kept stable, and seamless protection switching can be completed.
[0007] In the related art, since the RTP timestamps of different signals processed in an IP-based production and broadcasting network system require synchronization, the signals received from the external system are very likely to be out of sync with the signals generated by the system itself due to transmission delay or the PTP itself not being synchronized with the system. Therefore, before the system actually processes the external system signal, its RTP timestamp needs to be aligned with the local PTP time in advance.
[0008] See also Figure 3 , the conversion from external signal to local signal is completed by adding an IP conversion device (IPG) separately. The principle of this conversion is to regenerate the signal in IPG: restore the external IP signal to SDI baseband signal, and then re-encapsulate the SDI baseband signal into local IP signal, and regenerate the PTP timestamp according to the PTP of the local production and broadcasting domain during the re-encapsulation process.
[0009] However, the relevant technology has the following disadvantages, which increase the system construction cost and maintenance cost: additional IPG terminal equipment is required to regenerate PTP timestamps, which increases the equipment procurement cost, and the maintenance costs such as space, power consumption, environment, and personnel also increase accordingly; the signal transmission delay is significantly increased: the process of converting the IP signal into an SDI baseband signal and then repackaging the IP signal according to the SDI baseband signal increases the end-to-end delay of the signal transmission: generally, the conversion equipment will cache at least one frame of signal, so the delay needs to be increased by 1 frame, and the 50P signal is 20ms; the dual-path transmission idea of the seamless protection switching technology of SMPTE ST.2022-7 is destroyed, and a single point of failure occurs. Summary of the invention
[0010] In order to solve the above technical problems or at least partially solve the above technical problems, the embodiments of the present application provide a signal flow message processing method and device, an electronic device and a storage medium.
[0011] In a first aspect, an embodiment of the present application provides a signal flow message processing method, including:
[0012] Complete PTP synchronization between the IP matrix device in the target production and broadcasting domain and the PTP clock of the target production and broadcasting domain;
[0013] In response to the IP matrix device receiving the signal flow message and the timestamp status of the signal flow message being unsynchronized, a timestamp offset value between a current timestamp of the device and a timestamp of the signal flow message is calculated according to the PTP time of the IP matrix device, and the timestamp status of the signal flow message is changed to synchronized;
[0014] In response to the IP matrix device receiving the signal flow message and the timestamp status of the signal flow message being synchronized, the timestamp of the signal flow message is updated according to the timestamp offset value, and the signal flow message with the updated timestamp is forwarded.
[0015] In a possible implementation manner, the timestamp status of the signal flow message is determined by the following steps:
[0016] In response to the IP matrix device receiving the signal flow message, configuring a timestamp refresh function of the signal flow message for the IP matrix device, and changing the timestamp state of the signal flow message from an initial state to an unsynchronized state;
[0017] When the timestamp offset value between the PTP time of the IP matrix device and the timestamp of the signal flow message is obtained, the timestamp state of the signal flow message is changed from unsynchronized to synchronized.
[0018] In a possible implementation, when the timestamp state of the signal flow message is synchronized, in response to receiving a request to recalculate the timestamp offset value, a timestamp refresh function of the signal flow message is deleted, and the timestamp state of the signal flow message is changed from synchronized to an initial state;
[0019] Reconfigure the timestamp refresh function of the signal flow message for the IP matrix device, and change the timestamp status of the signal flow message from the initial status to the unsynchronized status;
[0020] When the timestamp offset value between the PTP time of the IP matrix device and the timestamp of the signal flow message is recalculated, the timestamp state of the signal flow message is changed from unsynchronized to synchronized.
[0021] In a possible implementation manner, calculating the timestamp offset value between the current timestamp of the device and the timestamp of the signal flow message according to the PTP time of the IP matrix device includes:
[0022] When the signal flow in the target production and broadcasting domain is a single-channel signal flow, the current timestamp of the device is calculated according to the PTP time of the IP matrix device;
[0023] The difference between the current timestamp of the device and the timestamp of the signal flow message is used as the timestamp offset value.
[0024] In a possible implementation manner, calculating the timestamp offset value between the current timestamp of the device and the timestamp of the signal flow message according to the PTP time of the IP matrix device includes:
[0025] When the signal stream in the target production and broadcasting domain is a dual-channel signal stream, for each signal stream, the current timestamp of the device is calculated according to the PTP time of the IP matrix device corresponding to the current signal stream, and the difference between the current timestamp of the device and the timestamp of the signal stream message is used as the timestamp offset value;
[0026] One of the timestamp offset values of the two-way signal stream is selected as a common timestamp offset value of the two-way signal stream.
[0027] In a possible implementation, the method further includes:
[0028] In response to receiving a timestamp offset value of one of the dual signal streams within a preset time length, the received timestamp offset value is used as a common timestamp offset value of the dual signal streams.
[0029] In a possible implementation manner, updating the signal flow message timestamp according to the timestamp offset value includes:
[0030] The sum of the signal flow message timestamp and the timestamp offset value is used as the updated signal flow message timestamp.
[0031] In a possible implementation, the method further includes:
[0032] In response to the IP matrix device receiving a signal flow message and the timestamp status of the signal flow message being unsynchronized, when the IP matrix device is in a restart recovery phase or a fault recovery phase, the signal flow message is discarded; when the IP matrix device is in a signal flow detection phase, the signal flow message is directly forwarded.
[0033] In a second aspect, an embodiment of the present application provides a signal flow message processing device, including:
[0034] A synchronization module is used to complete PTP synchronization between the IP matrix device in the target production and broadcasting domain and the PTP clock of the target production and broadcasting domain;
[0035] A calculation module, configured to, in response to an IP matrix device receiving a signal flow message and the timestamp status of the signal flow message being unsynchronized, calculate a timestamp offset value between a current timestamp of the device and a timestamp of the signal flow message according to a PTP time of the IP matrix device, and change the timestamp status of the signal flow message to synchronized;
[0036] The updating module is used for updating the signal flow message timestamp according to the timestamp offset value in response to the IP matrix device receiving the signal flow message and the timestamp status of the signal flow message being synchronized, and forwarding the signal flow message with the updated timestamp.
[0037] In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;
[0038] Memory, used to store computer programs;
[0039] The processor is used to implement the above-mentioned signal flow message processing method when executing the program stored in the memory.
[0040] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, characterized in that the computer program implements the above-mentioned signal flow message processing method when executed by a processor.
[0041] The above technical solution provided by the embodiment of the present application has at least some or all of the following advantages compared with the prior art:
[0042] The signal stream message processing method described in the embodiment of the present application completes PTP synchronization between the IP matrix device in the target production and broadcasting domain and the PTP clock of the target production and broadcasting domain; in response to the IP matrix device receiving the signal stream message and the timestamp status of the signal stream message is not synchronized, according to the PTP time of the IP matrix device, the timestamp offset value between the current timestamp of the device and the timestamp of the signal stream message is calculated, and the timestamp status of the signal stream message is changed to synchronized; in response to the IP matrix device receiving the signal stream message and the timestamp status of the signal stream message is synchronized, the timestamp of the signal stream message is updated according to the timestamp offset value, and the signal stream message with the updated timestamp is forwarded, and the IP matrix scheduled by the signal traffic forwarding is synchronized with the PTP clock of the production and broadcasting domain, and in the process of forwarding the signal stream with asynchronous RTP timestamp through the IP matrix, the IP matrix device modifies the timestamp field of the signal stream message according to the synchronized PTP time information, and the RTP timestamp refresh of the signal stream message in the IP matrix device can be realized without the need for an additional IPG device. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The accompanying drawings herein are incorporated in and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the description, are used to explain the principles of the present application.
[0044] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0045] Figure 1The schematic diagram shows the working principle flow chart of the IP-based production and broadcasting network system in the related technology;
[0046] Figure 2 The schematic diagram shows the structure of the IP-based production and broadcasting network system in the related art;
[0047] Figure 3 The schematic diagram shows the structure of another IP-based production and broadcasting network system in the related art;
[0048] Figure 4 The following is a schematic diagram showing a flow chart of a signal flow message processing method according to an embodiment of the present application;
[0049] Figure 5 A schematic diagram of a timestamp state change of a signal flow message according to an embodiment of the present application is schematically shown;
[0050] Figure 6 The structure diagram of the IP-based production and broadcasting network system according to the embodiment of the present application is schematically shown;
[0051] Figure 7 The structure block diagram of the signal flow message processing device according to the embodiment of the present application is schematically shown;
[0052] Figure 8 The structural block diagram of an electronic device according to an embodiment of the present application is schematically shown. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0054] See also Figure 4 , an embodiment of the present application provides a signal flow message processing method, comprising the following steps:
[0055] S1, complete PTP synchronization between the IP matrix device in the target production and broadcasting domain and the PTP clock of the target production and broadcasting domain.
[0056] S2, in response to the IP matrix device receiving a signal flow message and the timestamp status of the signal flow message being unsynchronized, calculate the timestamp offset value between the device's current timestamp and the signal flow message timestamp according to the PTP time of the IP matrix device, and change the timestamp status of the signal flow message to synchronized.
[0057] In some embodiments, the signal stream message timestamp is an RTP timestamp field obtained by parsing the signal stream message.
[0058] In some embodiments, the current timestamp of the device is calculated through the PTP time of the IP matrix device, and the calculation method complies with the requirements of the corresponding signal encapsulation standards, such as the SMPTE ST.2110 standard and the SMPTE ST.2022-6 standard.
[0059] S3, in response to the IP matrix device receiving the signal flow message and the timestamp status of the signal flow message being synchronized, updating the timestamp of the signal flow message according to the timestamp offset value, and forwarding the signal flow message with the updated timestamp.
[0060] See also Figure 5 In this embodiment, in step S2, the timestamp status of the signal flow message is determined by the following steps:
[0061] In response to the IP matrix device receiving the signal flow message, configuring a timestamp refresh function of the signal flow message for the IP matrix device, and changing the timestamp state of the signal flow message from an initial state to an unsynchronized state;
[0062] When the timestamp offset value between the PTP time of the IP matrix device and the timestamp of the signal flow message is obtained, the timestamp state of the signal flow message is changed from unsynchronized to synchronized.
[0063] exist Figure 5 In the example, offset-tm1 is a timestamp offset value when the signal stream in the target production and broadcasting domain is a single-channel signal stream, and offset-tm2 is a timestamp offset value when the signal stream in the target production and broadcasting domain is a dual-channel signal stream.
[0064] In this embodiment, in step S2, when the timestamp state of the signal flow message is synchronized, in response to receiving a request to recalculate the timestamp offset value, the timestamp refresh function of the signal flow message is deleted, and the timestamp state of the signal flow message is changed from synchronized to an initial state;
[0065] Reconfigure the timestamp refresh function of the signal flow message for the IP matrix device, and change the timestamp status of the signal flow message from the initial status to the unsynchronized status;
[0066] When the timestamp offset value between the PTP time of the IP matrix device and the timestamp of the signal flow message is recalculated, the timestamp state of the signal flow message is changed from unsynchronized to synchronized.
[0067] In some embodiments, the timestamp refresh function may be an RTP (Real-time Transport Protocol) timestamp refresh function of a SMPTE ST.2022-7 signal.
[0068] In this embodiment, in step S2, the timestamp offset value between the current timestamp of the device and the timestamp of the signal flow message is calculated according to the PTP time of the IP matrix device, including:
[0069] When the signal flow in the target production and broadcasting domain is a single-channel signal flow, the current timestamp of the device is calculated according to the PTP time of the IP matrix device;
[0070] The difference between the current timestamp of the device and the timestamp of the signal flow message is used as the timestamp offset value.
[0071] When the signal flow in the target production and broadcasting domain is a dual-channel signal flow, the principle of seamless protection switching of the production and broadcasting network is examined. If the RTP timestamp refresh of the signal message is implemented on the IP matrix device, the dual-channel transmission requirement in seamless protection can be maintained. However, because it is a dual-channel transmission, there is a problem that the refreshed timestamp may not be kept consistent when the dual-channel IP matrix independently refreshes the RTP timestamp.
[0072] The main reasons are due to the following two situations: First, although the A / B IP matrix has completed PTP synchronization, each device on the clock path will have accuracy deviations during the PTP synchronized clock transmission process. Therefore, if the matrix network devices that receive the signal messages on channels A and B independently perform timestamp modifications, it cannot be completely guaranteed that they can be modified to the same value; Second, although the A / B IP matrix has completed PTP synchronization, the A and B signals are transmitted to different receiving network devices in the IP matrix (A / B IP matrix) through different network paths, and because different network paths have different transmission delays, the time when the A and B matrices receive the messages will not be exactly the same. Therefore, if the matrix network devices that receive the signal messages on channels A and B independently perform timestamp modifications, it cannot be completely guaranteed that they can be modified to the same value.
[0073] In this embodiment, in step S2, the timestamp offset value between the current timestamp of the device and the timestamp of the signal flow message is calculated according to the PTP time of the IP matrix device, including:
[0074] When the signal stream in the target production and broadcasting domain is a dual-channel signal stream, for each signal stream, the current timestamp of the device is calculated according to the PTP time of the IP matrix device corresponding to the current signal stream, and the difference between the current timestamp of the device and the timestamp of the signal stream message is used as the timestamp offset value;
[0075] One of the timestamp offset values of the two-way signal stream is selected as a common timestamp offset value of the two-way signal stream.
[0076] In this embodiment, during the period of selecting one of the timestamp offset values of the two-way signal stream as a common timestamp offset value of the two-way signal stream, the method further includes:
[0077] In response to receiving a timestamp offset value of one of the dual signal streams within a preset time length, the received timestamp offset value is used as a common timestamp offset value of the dual signal streams.
[0078] In some embodiments, when the signal flow in the target production and broadcasting domain is a dual-channel signal flow, the A and B IP matrices may not be able to start working at the same time in some cases. For example, when one channel is started later or restarted after a failure, a timeout needs to be set during the negotiation of the timestamp offset value. When the device on the normally working channel cannot receive the timestamp offset value of the other channel after the timeout, the timestamp offset value calculated by this channel is used as the synchronization timestamp offset value of the 2022-7 signal flow. When the other channel resumes working later, the timestamp offset value calculated by this channel is directly used as the synchronization timestamp offset value.
[0079] In this embodiment, in step S3, updating the signal flow message timestamp according to the timestamp offset value includes:
[0080] The sum of the signal flow message timestamp and the timestamp offset value is used as the updated signal flow message timestamp.
[0081] In this embodiment, before step S2, the method further includes:
[0082] In response to the IP matrix device receiving a signal flow message and the timestamp status of the signal flow message being unsynchronized, when the IP matrix device is in a restart recovery phase or a fault recovery phase, the signal flow message is discarded; when the IP matrix device is in a signal flow detection phase, the signal flow message is directly forwarded.
[0083] See also Figure 6 In the signal stream message processing method applied to the IP-based production and broadcasting network system, the signal source of the external system generates IP signal stream messages of A and B channels, which pass through the A and B channels matrices respectively, and then directly modify and refresh the RTP timestamp field in the signal stream message in the A and B channels matrices. The refreshed RTP timestamp is based on the PTP time of this system so that no errors will occur during subsequent process processing, and the RTP timestamp refresh based on the IP matrix under the requirements of seamless protection technology is realized, so that when the RTP timestamp is modified, the modified RTP timestamps of A / B channels are kept the same according to the requirements of the seamless protection technology of SMPTE ST.2022-7.
[0084] The signal stream message processing method of the embodiment of the present application uses the network equipment of the IP matrix to realize the PTP timestamp refresh of the signal stream, reduces the separate timestamp refresh equipment, uses the negotiated timestamp value offset as the basis for the PTP timestamp refresh, avoids adding a separate timestamp refresh equipment, reduces the construction cost and maintenance cost of the system, reduces the end-to-end transmission delay of the signal stream, and provides the requirement of maintaining two independent transmission paths for the signal stream end-to-end for the SMPTE ST.2022-7 signal stream. No single point of failure is added, thereby improving the reliability of the IP-based production and broadcasting network system. There is no need to obtain the PTP time of the production and broadcasting domain for each frame and each message, which reduces the complexity of system implementation and improves the scheduling efficiency of the IP matrix signal stream messages.
[0085] See also Figure 7 , an embodiment of the present application provides a signal flow message processing device, including:
[0086] Synchronization module 11, used for completing PTP synchronization between the IP matrix device in the target production and broadcasting domain and the PTP clock of the target production and broadcasting domain;
[0087] The calculation module 12 is used for calculating the timestamp offset value between the current timestamp of the device and the timestamp of the signal flow message according to the PTP time of the IP matrix device in response to the IP matrix device receiving the signal flow message and the timestamp state of the signal flow message being unsynchronized, and changing the timestamp state of the signal flow message to synchronized;
[0088] The updating module 13 is used for updating the signal flow message timestamp according to the timestamp offset value in response to the IP matrix device receiving the signal flow message and the timestamp status of the signal flow message being synchronized, and forwarding the signal flow message with the updated timestamp.
[0089] In this embodiment, in the calculation module, the timestamp status of the signal flow message is determined by the following steps:
[0090] In response to the IP matrix device receiving the signal flow message, configuring a timestamp refresh function of the signal flow message for the IP matrix device, and changing the timestamp state of the signal flow message from an initial state to an unsynchronized state;
[0091] When the timestamp offset value between the PTP time of the IP matrix device and the timestamp of the signal flow message is obtained, the timestamp state of the signal flow message is changed from unsynchronized to synchronized.
[0092] In this embodiment, in the calculation module, when the timestamp state of the signal flow message is synchronized, in response to receiving a request to recalculate the timestamp offset value, the timestamp refresh function of the signal flow message is deleted, and the timestamp state of the signal flow message is changed from synchronized to an initial state;
[0093] Reconfigure the timestamp refresh function of the signal flow message for the IP matrix device, and change the timestamp status of the signal flow message from the initial status to the unsynchronized status;
[0094] When the timestamp offset value between the PTP time of the IP matrix device and the timestamp of the signal flow message is recalculated, the timestamp state of the signal flow message is changed from unsynchronized to synchronized.
[0095] In this embodiment, in the calculation module, the timestamp offset value between the current timestamp of the device and the timestamp of the signal flow message is calculated according to the PTP time of the IP matrix device, including:
[0096] When the signal flow in the target production and broadcasting domain is a single-channel signal flow, the current timestamp of the device is calculated according to the PTP time of the IP matrix device;
[0097] The difference between the current timestamp of the device and the timestamp of the signal flow message is used as the timestamp offset value.
[0098] In this embodiment, in the calculation module, the timestamp offset value between the current timestamp of the device and the timestamp of the signal flow message is calculated according to the PTP time of the IP matrix device, including:
[0099] When the signal stream in the target production and broadcasting domain is a dual-channel signal stream, for each signal stream, the current timestamp of the device is calculated according to the PTP time of the IP matrix device corresponding to the current signal stream, and the difference between the current timestamp of the device and the timestamp of the signal stream message is used as the timestamp offset value;
[0100] One of the timestamp offset values of the two-way signal stream is selected as a common timestamp offset value of the two-way signal stream.
[0101] In this embodiment, in the calculation module, in response to receiving a timestamp offset value of one of the dual signal streams within a preset time length, the received timestamp offset value is used as a common timestamp offset value of the dual signal streams.
[0102] In this embodiment, in the updating module, the sum of the signal flow message timestamp and the timestamp offset value is used as the updated signal flow message timestamp.
[0103] In this embodiment, the signal flow message processing device is further used for:
[0104] In response to the IP matrix device receiving a signal flow message and the timestamp status of the signal flow message being unsynchronized, when the IP matrix device is in a restart recovery phase or a fault recovery phase, the signal flow message is discarded; when the IP matrix device is in a signal flow detection phase, the signal flow message is directly forwarded.
[0105] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.
[0106] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of the present invention. Ordinary technicians in this field can understand and implement it without paying creative work.
[0107] In the above embodiment, any multiple of the synchronization module 11, the calculation module 12 and the update module 13 can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. At least one of the synchronization module 11, the calculation module 12 and the update module 13 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware and firmware or in an appropriate combination of any of them. Alternatively, at least one of the synchronization module 11, the calculation module 12 and the update module 13 can be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function can be executed.
[0108] See also Figure 8 , the electronic device provided by the embodiment of the present application includes a processor 1110, a communication interface 1120, a memory 1130 and a communication bus 1140, wherein the processor 1110, the communication interface 1120, and the memory 1130 communicate with each other through the communication bus 1140;
[0109] Memory 1130, used for storing computer programs;
[0110] The processor 1110 is used to implement the signal flow message processing method shown below when executing the program stored in the memory 1130:
[0111] Complete PTP synchronization between the IP matrix device in the target production and broadcasting domain and the PTP clock of the target production and broadcasting domain;
[0112] In response to the IP matrix device receiving the signal flow message and the timestamp status of the signal flow message being unsynchronized, a timestamp offset value between a current timestamp of the device and a timestamp of the signal flow message is calculated according to the PTP time of the IP matrix device, and the timestamp status of the signal flow message is changed to synchronized;
[0113] In response to the IP matrix device receiving the signal flow message and the timestamp status of the signal flow message being synchronized, the timestamp of the signal flow message is updated according to the timestamp offset value, and the signal flow message with the updated timestamp is forwarded.
[0114] The communication bus 1140 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus 1140 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0115] The communication interface 1120 is used for communication between the above electronic device and other devices.
[0116] The memory 1130 may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory 1130 may also be at least one storage device located away from the processor 1110.
[0117] The above-mentioned processor 1110 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0118] The embodiment of the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the signal flow message processing method described above is implemented.
[0119] The computer-readable storage medium may be included in the device / apparatus described in the above embodiment; or it may exist independently without being assembled into the device / apparatus. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the signal flow message processing method according to the embodiment of the present application is implemented.
[0120] According to an embodiment of the present application, a computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.
[0121] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0122] The above description is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest range consistent with the principles and novel features applied for herein.
Claims
1. A signal flow message processing method, characterized in that: The method comprises: Complete PTP synchronization between the IP matrix device in the target production and broadcasting domain and the PTP clock of the target production and broadcasting domain; In response to the IP matrix device receiving the signal flow message and the timestamp status of the signal flow message being unsynchronized, a timestamp offset value between a current timestamp of the device and a timestamp of the signal flow message is calculated according to the PTP time of the IP matrix device, and the timestamp status of the signal flow message is changed to synchronized; In response to the IP matrix device receiving the signal flow message and the timestamp status of the signal flow message being synchronized, updating the timestamp of the signal flow message according to the timestamp offset value, and forwarding the signal flow message with the updated timestamp; The timestamp status of the signal flow message is determined by the following steps: In response to the IP matrix device receiving the signal flow message, configuring a timestamp refresh function of the signal flow message for the IP matrix device, and changing the timestamp state of the signal flow message from an initial state to an unsynchronized state; When a timestamp offset value between the PTP time of the IP matrix device and the timestamp of the signal flow message is obtained, the timestamp state of the signal flow message is changed from unsynchronized to synchronized; The calculating the timestamp offset value between the current timestamp of the device and the timestamp of the signal flow message according to the PTP time of the IP matrix device includes: When the signal flow in the target production and broadcasting domain is a single-channel signal flow, the current timestamp of the device is calculated according to the PTP time of the IP matrix device; The difference between the current timestamp of the device and the timestamp of the signal flow message is used as the timestamp offset value; When the signal stream in the target production and broadcasting domain is a dual-channel signal stream, for each signal stream, the current timestamp of the device is calculated according to the PTP time of the IP matrix device corresponding to the current signal stream, and the difference between the current timestamp of the device and the timestamp of the signal stream message is used as the timestamp offset value; Selecting one of the timestamp offset values of the two-way signal stream as a common timestamp offset value of the two-way signal stream; The updating of the signal flow message timestamp according to the timestamp offset value includes: The sum of the signal flow message timestamp and the timestamp offset value is used as the updated signal flow message timestamp; When the timestamp state of the signal flow message is synchronized, in response to receiving a request to recalculate the timestamp offset value, the timestamp refresh function of the signal flow message is deleted, and the timestamp state of the signal flow message is changed from synchronized to an initial state; Reconfigure the timestamp refresh function of the signal flow message for the IP matrix device, and change the timestamp status of the signal flow message from the initial status to the unsynchronized status; When the timestamp offset value between the PTP time of the IP matrix device and the timestamp of the signal flow message is recalculated, the timestamp state of the signal flow message is changed from unsynchronized to synchronized.
2. The method according to claim 1, characterized in that The method further comprises: In response to receiving a timestamp offset value of one of the dual signal streams within a preset time length, the received timestamp offset value is used as a common timestamp offset value of the dual signal streams.
3. The method according to claim 1, characterized in that: The method further comprises: In response to the IP matrix device receiving a signal flow message and the timestamp status of the signal flow message being unsynchronized, when the IP matrix device is in a restart recovery phase or a fault recovery phase, the signal flow message is discarded; when the IP matrix device is in a signal flow detection phase, the signal flow message is directly forwarded.
4. A signal flow message processing device, characterized in that: include: A synchronization module is used to complete PTP synchronization between the IP matrix device in the target production and broadcasting domain and the PTP clock of the target production and broadcasting domain; A calculation module, configured to, in response to an IP matrix device receiving a signal flow message and the timestamp status of the signal flow message being unsynchronized, calculate a timestamp offset value between a current timestamp of the device and a timestamp of the signal flow message according to a PTP time of the IP matrix device, and change the timestamp status of the signal flow message to synchronized; An updating module, configured to update the signal flow message timestamp according to the timestamp offset value in response to the IP matrix device receiving the signal flow message and the timestamp status of the signal flow message being synchronized, and forward the signal flow message with the updated timestamp; The timestamp status of the signal flow message is determined by the following steps: In response to the IP matrix device receiving the signal flow message, configuring a timestamp refresh function of the signal flow message for the IP matrix device, and changing the timestamp state of the signal flow message from an initial state to an unsynchronized state; When a timestamp offset value between the PTP time of the IP matrix device and the timestamp of the signal flow message is obtained, the timestamp state of the signal flow message is changed from unsynchronized to synchronized; The calculating the timestamp offset value between the current timestamp of the device and the timestamp of the signal flow message according to the PTP time of the IP matrix device includes: When the signal flow in the target production and broadcasting domain is a single-channel signal flow, the current timestamp of the device is calculated according to the PTP time of the IP matrix device; The difference between the current timestamp of the device and the timestamp of the signal flow message is used as the timestamp offset value; When the signal stream in the target production and broadcasting domain is a dual-channel signal stream, for each signal stream, the current timestamp of the device is calculated according to the PTP time of the IP matrix device corresponding to the current signal stream, and the difference between the current timestamp of the device and the timestamp of the signal stream message is used as the timestamp offset value; Selecting one of the timestamp offset values of the two-way signal stream as a common timestamp offset value of the two-way signal stream; The updating of the signal flow message timestamp according to the timestamp offset value includes: The sum of the signal flow message timestamp and the timestamp offset value is used as the updated signal flow message timestamp; When the timestamp state of the signal flow message is synchronized, in response to receiving a request to recalculate the timestamp offset value, the timestamp refresh function of the signal flow message is deleted, and the timestamp state of the signal flow message is changed from synchronized to an initial state; Reconfigure the timestamp refresh function of the signal flow message for the IP matrix device, and change the timestamp status of the signal flow message from the initial status to the unsynchronized status; When the timestamp offset value between the PTP time of the IP matrix device and the timestamp of the signal flow message is recalculated, the timestamp state of the signal flow message is changed from unsynchronized to synchronized.
5. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; Memory, used to store computer programs; A processor, used to implement the signal flow message processing method according to any one of claims 1 to 3 when executing a program stored in a memory.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the signal flow message processing method according to any one of claims 1 to 3 is implemented.
Citation Information
Patent Citations
Live broadcast processing system and method, storage medium and electronic equipment
CN113490007A
Method, system and equipment for realizing net switching and storage medium
CN115314643A
