Processing methods and systems for received bitstream data
By using DDR and FIFO memory in the receiving device to record the write and retrieval times of the bit stream, and setting delay values and threshold conditions, the problems of low processing efficiency and frequent false alarms in satellite signal content comparison are solved, achieving more efficient and accurate processing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 北京数码视讯软件技术发展有限公司
- Filing Date
- 2023-08-04
- Publication Date
- 2026-05-26
AI Technical Summary
Existing technologies are inefficient and generate frequent alarms in satellite signal content comparison because multiple comparisons and simple judgment conditions lead to a large workload and frequent false alarms.
By using DDR and FIFO memory in the receiving device to record the write and retrieval times of the bit stream, setting delay values and threshold conditions, reducing the number of comparisons, and increasing the number of lost locks and time thresholds to optimize the judgment conditions and reduce unnecessary alarms.
It improved processing efficiency, reduced unnecessary alarms, and enhanced the accuracy and simplicity of comparison.
Smart Images

Figure CN117118564B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data transmission technology, and in particular to a method and system for processing received data streams. Background Technology
[0002] Currently, for the content comparison of satellite signals, a fixed delay is applied to the uplink and downlink signals, and a private byte is added to the header of the two signal packets. The same data at the same position is found by comparing and calculating the private bytes, and then the comparison is performed in units of four bytes.
[0003] If each TS packet fails to match twice, the content is considered inconsistent. Simultaneously, the buffers for both signals are monitored; if no signal is retrieved within a fixed time, a flow interruption is considered. Different alarms are generated for failure results and flow interruption conditions.
[0004] The above process requires multiple comparisons, which is cumbersome and results in low processing efficiency; the judgment conditions are too simple, which can easily cause frequent alarms. Summary of the Invention
[0005] In view of this, the purpose of the present invention is to provide a method and system for processing code stream received data. After the comparison between the retrieval time and the storage time passes, continuous comparison is then performed, thereby reducing the number of comparisons, reducing workload, and improving processing efficiency. By adding a pre-set threshold for the number of times the lock is lost and a pre-set threshold for the time to determine the judgment conditions, unnecessary alarms can be reduced first.
[0006] In a first aspect, embodiments of the present invention provide a method for processing received data streams, applied to a receiving device, the receiving device including a DDR, a first FIFO memory, and a second FIFO memory, the method comprising:
[0007] The device receives a first code stream transmitted via wired transmission and a second code stream transmitted via radio transmission, and uses the first code stream as a transmission reference stream and the second code stream as a reception test stream.
[0008] Write the transmit reference stream and the receive test stream into the DDR, and record the write time of the transmit reference stream into the DDR;
[0009] After the transmission reference stream is retrieved from the DDR, the transmission reference stream is stored in the first FIFO memory, and the time when the transmission reference stream is retrieved from the DDR is recorded.
[0010] If the difference between the retrieval time and the write time is greater than a preset delay value, then the first data packet of the transmission reference stream is retrieved from the first FIFO memory, and the second data packet of the reception test stream is retrieved from the second FIFO memory.
[0011] The first data packet and the second data packet are compared to obtain the first comparison result;
[0012] When the first comparison result is successful, the sending reference stream and the receiving test stream are continuously compared to obtain the second comparison result;
[0013] The number of times a successful comparison turned into an unsuccessful comparison and the duration of the unsuccessful comparison are determined based on the first comparison result and the second comparison result;
[0014] Determine whether the number of times the comparison success turns into failure exceeds a preset threshold for the number of times the lock is lost or whether the time of the comparison failure exceeds a preset time threshold;
[0015] If so, display "Unlocked" result;
[0016] If not, the lock result will be displayed.
[0017] Furthermore, the first data packet and the second data packet are compared to obtain a first comparison result, including:
[0018] Use the second data packet as the reference data packet;
[0019] Compare the first data packet and the reference data packet byte by byte;
[0020] When the first data packet and the reference data packet do not match, the first data packet is discarded and the third data packet of the transmission reference stream is retrieved from the first FIFO memory;
[0021] The third data packet is compared with the reference data packet until the first comparison result is successful.
[0022] Furthermore, the transmitted reference stream and the received test stream are continuously compared to obtain a second comparison result, including:
[0023] Extract the first data packet group from the transmission reference stream;
[0024] Extract the second data packet group from the received test stream;
[0025] The first data packet group and the second data packet group are compared sequentially, and the current bit error rate is calculated.
[0026] If the current bit error rate is greater than the preset bit error threshold, the second comparison result is a failure;
[0027] If the current bit error rate is less than the preset bit error threshold, then the second comparison result is successful;
[0028] The number of the first data packet group is the same as the number of the second data packet group.
[0029] Furthermore, writing the transmit reference stream and the receive test stream into the DDR includes:
[0030] The transmit reference stream is written into the first region of the DDR, and the receive test stream is written into the second region of the DDR.
[0031] Furthermore, after receiving a first code stream transmitted via wired transmission and a second code stream transmitted via radio transmission from the radio transmitting device, and using the first code stream as a transmission reference stream and the second code stream as a reception test stream, the method further includes:
[0032] The continuity between adjacent data packets in the received test stream is detected to obtain the detection result.
[0033] The detection results and the received test stream are written together into the DDR.
[0034] Furthermore, before writing the transmit reference stream and the receive test stream into the DDR, the method further includes:
[0035] Identify the PID set in the empty packet data of the received test stream;
[0036] The empty packet data corresponding to the set PID is treated as invalid data.
[0037] Furthermore, the method also includes:
[0038] Within a preset time range, count the number of data packets received from the sending reference stream and the number of data packets received from the receiving test stream;
[0039] When the number of data packets in the transmitted reference stream is less than a preset threshold, the first port of the receiving device experiences a disconnection.
[0040] When the number of data packets in the received test stream is less than a preset threshold, the second port of the receiving device experiences a disconnection.
[0041] Wherein, the first port is the port for transmitting the sending reference stream, and the second port is the port for transmitting the receiving test stream.
[0042] Secondly, embodiments of the present invention provide a data processing system for received bitstreams, applied to a receiving device, the receiving device including a DDR, a first FIFO memory, and a second FIFO memory, the system comprising:
[0043] The code stream receiving module is used to receive a first code stream transmitted by a radio transmitting device via wired transmission and a second code stream transmitted via radio, and to use the first code stream as a transmission reference stream and the second code stream as a reception test stream.
[0044] The writing module is used to write the transmit reference stream and the receive test stream into the DDR, and record the write time of the transmit reference stream into the DDR;
[0045] The storage module is used to retrieve the transmission reference stream from the DDR, store the transmission reference stream in the first FIFO memory, and record the time when the transmission reference stream is retrieved from the DDR.
[0046] The retrieval module is configured to retrieve the first data packet of the transmission reference stream from the first FIFO memory and the second data packet of the reception test stream from the second FIFO memory when the difference between the retrieval time and the writing time is greater than a preset delay value.
[0047] The first comparison module is used to compare the first data packet and the second data packet to obtain a first comparison result;
[0048] The second comparison module is used to continuously compare the transmitted reference stream and the received test stream when the first comparison result is successful, and obtain a second comparison result.
[0049] The determination module is used to determine the number of times a successful comparison is changed to an unsuccessful comparison and the time of the unsuccessful comparison based on the first comparison result and the second comparison result;
[0050] The judgment module is used to determine whether the number of times the comparison success turns into failure exceeds a preset threshold for the number of times the lock is lost or whether the time of the comparison failure exceeds a preset time threshold; if yes, the unlocked result is displayed; if no, the locked result is displayed.
[0051] Thirdly, embodiments of the present invention provide an electronic device, including a memory and a processor, wherein the memory stores a computer program that can run on the processor, and the processor executes the computer program to implement the method described above.
[0052] Fourthly, embodiments of the present invention provide a computer-readable medium having processor-executable non-volatile program code that causes the processor to perform the method described above.
[0053] This invention provides a method and system for processing received data streams, applied to a receiving device. The receiving device includes a DDR, a first FIFO memory, and a second FIFO memory. The method includes: receiving a first data stream transmitted via wired transmission and a second data stream transmitted via radio transmission from a radio transmitting device; using the first data stream as a transmission reference stream and the second data stream as a reception test stream; writing the transmission reference stream and the reception test stream into the DDR and recording the writing time of the transmission reference stream in the DDR; retrieving the transmission reference stream from the DDR and storing it in the first FIFO memory, recording the retrieval time of the transmission reference stream from the DDR; if the difference between the retrieval time and the writing time is greater than a preset delay value, retrieving a first data packet of the transmission reference stream from the first FIFO memory and retrieving the reception test stream from the second FIFO memory. The second data packet of the test stream is used; the first data packet and the second data packet are compared to obtain the first comparison result; when the first comparison result is successful, the sending reference stream and the receiving test stream are continuously compared to obtain the second comparison result; based on the first comparison result and the second comparison result, the number of times a successful comparison turns into an unsuccessful comparison and the time of the unsuccessful comparison are determined; it is judged whether the number of times a successful comparison turns into an unsuccessful comparison exceeds the preset threshold for the number of times the lock is lost or whether the time of the unsuccessful comparison exceeds the preset time threshold; if so, the unlocked result is displayed; if not, the locked result is displayed; after the comparison between the retrieval time and the storage time passes, the continuous comparison is performed again, thereby reducing the number of comparisons, reducing workload, and improving processing efficiency; by adding the preset threshold for the number of times the lock is lost and the preset time threshold for the determination conditions, the generation of unnecessary alarms can be reduced first.
[0054] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained in accordance with the structures particularly pointed out in the description, claims and drawings.
[0055] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0056] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0057] Figure 1 This is a flowchart of a method for processing received code stream data provided in Embodiment 1 of the present invention;
[0058] Figure 2 This is a flowchart of another method for processing received data in embodiment two of the present invention;
[0059] Figure 3 This is a schematic diagram of the data processing system for receiving code streams provided in Embodiment 3 of the present invention. Detailed Implementation
[0060] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0061] To facilitate understanding of this embodiment, the embodiments of the present invention will be described in detail below.
[0062] Example 1:
[0063] Figure 1 This is a flowchart of a method for processing received code stream data provided in Embodiment 1 of the present invention.
[0064] Reference Figure 1 This method is applied to a receiving device, which includes DDR (Double Data Rate) synchronous dynamic random access memory, a first FIFO (First In First Out) memory, and a second FIFO memory. The method includes the following steps:
[0065] Step S101: Receive the first code stream transmitted by the radio transmitting device via wired transmission and the second code stream transmitted via radio, and use the first code stream as the transmission reference stream and the second code stream as the reception test stream;
[0066] Here, the front-end wireless transmission device sends out the prepared bitstream. One path is through wired transmission, transmitting the first bitstream without loss of content to the receiving device; the other path is through wireless transmission, where the receiving device receives the second bitstream.
[0067] Step S102: Write the transmit reference stream and receive test stream to DDR, and record the write time of the transmit reference stream in DDR;
[0068] Specifically, the first bitstream received via wired transmission is stored in a first area designated by DDR as a temporary transmission reference stream; at the same time, the second bitstream received via normal wireless transmission is stored in another second area designated by DDR as a temporary reception test stream.
[0069] Step S103: After retrieving the transmission reference stream from the DDR, store the transmission reference stream in the first FIFO memory and record the time when the transmission reference stream is retrieved from the DDR.
[0070] Step S104: If the difference between the retrieval time and the write time is greater than a preset delay value, then retrieve the first data packet of the transmission reference stream from the first FIFO memory and retrieve the second data packet of the reception test stream from the second FIFO memory.
[0071] Specifically, when the reference stream is written to DDR, the current write time is stored in the header of the reference stream packet. After being retrieved from DDR, the reference stream is first stored in the first FIFO memory without direct comparison. If the difference between the retrieval time and the write time is greater than a preset delay value, the reference stream is retrieved from the first FIFO memory, and content comparison begins. If the difference between the retrieval time and the write time is less than the preset delay value, the reference stream is kept in the first FIFO memory until the difference exceeds the preset delay value, at which point it is retrieved for content comparison.
[0072] Among them, the delay value is controllable and only one stream needs to be delayed, which can effectively reduce the pressure on the receiving device of the stored stream.
[0073] Step S105: Compare the first data packet and the second data packet to obtain the first comparison result;
[0074] Step S106: When the first comparison result is successful, the reference stream and the received test stream will be continuously compared to obtain the second comparison result.
[0075] Step S107: Determine the number of times a successful comparison turns into an unsuccessful comparison and the time of the unsuccessful comparison based on the first comparison result and the second comparison result;
[0076] Step S108: Determine whether the number of times a successful match turns into an unsuccessful match exceeds a preset threshold for the number of times a match is lost or whether the time of an unsuccessful match exceeds a preset time threshold.
[0077] Step S109: If yes, display the unlocked result;
[0078] Step S110: If not, display the lock result.
[0079] Specifically, when determining the final result, a time threshold range and a threshold for the number of times an attempt to match an item fails are preset. Within this time threshold range, if the number of times a successful match turns into an unsuccessful match exceeds the preset threshold for the number of times an attempt to match fails, or if the time spent on an unsuccessful match exceeds the preset time threshold, the current content match is considered to have failed. The preset time threshold is half of the time threshold range; an unlocked result is displayed. Conversely, if the time threshold range is not exceeded, the content match is considered to have succeeded, and a locked result is displayed. The corresponding bit error rate is also reported along with the result.
[0080] Adding more judgment criteria can prioritize reducing unnecessary alarms, thereby avoiding misleading users.
[0081] Furthermore, step S105 includes the following steps:
[0082] Step S201: Use the second data packet as the reference data packet;
[0083] Step S202: Compare the first data packet and the reference data packet byte by byte;
[0084] Step S203: When the first data packet and the reference data packet do not match, the first data packet is discarded and the third data packet for sending the reference stream is retrieved from the first FIFO memory;
[0085] Step S204: Compare the third data packet with the reference data packet until the first comparison result is successful.
[0086] Specifically, a second data packet is first retrieved from the second FIFO memory as a reference data packet in the receive test stream. After the delay value meets the requirements, a first data packet is retrieved from the first FIFO memory storing the transmit reference stream and compared byte by byte with the reference data packet in the receive test stream.
[0087] When two packets do not match, the first data packet retrieved from the reference stream is discarded, and a third data packet is retrieved for comparison, until a match is found. This makes the process of initiating the comparison simpler and more accurate, reducing workload.
[0088] Furthermore, step S106 includes:
[0089] Step S301: Extract the first data packet group from the transmission reference stream;
[0090] Step S302: Extract the second data packet group from the received test stream;
[0091] Step S303: Compare the first data packet group and the second data packet group in sequence, and calculate the current bit error rate;
[0092] Step S304: If the current bit error rate is greater than the preset bit error threshold, the second comparison result is a failure.
[0093] Step S305: If the current bit error rate is less than the preset bit error threshold, the second comparison result is successful.
[0094] The number of the first data packet group is the same as the number of the second data packet group.
[0095] Specifically, when two packets are successfully matched, the continuous comparison phase begins, in which an equal number of packets are extracted from the sending reference stream and the receiving test stream, that is, the packets in the first data packet group and the second data packet group are compared sequentially, and the number of packets extracted can be set.
[0096] After the continuous comparison phase ends, the current bit error rate is calculated. If the current bit error rate is greater than the preset bit error threshold, the second comparison result is a failure, and the first comparison phase is repeated.
[0097] If the current bit error rate is less than the preset bit error threshold, the second comparison result is successful, and the process re-enters the continuous comparison stage. The preset bit error threshold can be set to more flexibly adapt to different application scenarios.
[0098] Furthermore, step S102 includes:
[0099] The transmit reference stream is written to the first area of the DDR, and the receive test stream is written to the second area of the DDR.
[0100] Furthermore, after receiving the first code stream transmitted via wired transmission and the second code stream transmitted via radio transmission from the radio transmitting device, and using the first code stream as a transmission reference stream and the second code stream as a reception test stream, the method further includes the following steps:
[0101] Step S401: Detect whether adjacent data packets in the received test stream are continuous, and obtain the detection result;
[0102] Step S402: Write the detection results and the received test stream together into the DDR.
[0103] Specifically, CC (Continuity Counter) detection is performed on the received test stream. CC detection is used to determine whether adjacent data packets are continuous.
[0104] Assuming the transmitted reference stream itself is error-free, if the received test stream contains more than a certain number of CC errors, it can be considered packet loss during wireless transmission due to natural factors. If the number of CC errors does not exceed a certain limit, the comparison failure can be considered to be caused by human tampering with the bitstream content during radio transmission. A threshold for judging the number of CC errors can also be set.
[0105] In order to display the CC detection results and content comparison results synchronously, when the received test stream is received, CC detection is first performed on the received test stream, the detection results are written into the packet header, and stored in DDR together with the received test stream.
[0106] When the received test stream is retrieved from the DDR, the CC detection result is also retrieved along with it and displayed simultaneously with the content comparison result to aid in judgment. CC detection supports individual detection of one or more PIDs within the bitstream. The principle of CC detection is to count the CC value of each packet in the bitstream, excluding empty packets, and to determine whether the CC values of packets with the same PID are continuous, while also counting the number of discontinuous values occurring within a certain period. This function effectively helps users assess the influence of non-natural factors, thereby making more accurate judgments.
[0107] Furthermore, before writing the transmit reference stream and receive test stream to the DDR, the method also includes the following steps:
[0108] Step S501: Identify the PID set in the empty packet data of the received test stream;
[0109] Step S502: Treat the empty packet data corresponding to the set PID as invalid data.
[0110] Specifically, this application supports filtering empty packets in radio streams. Before storing the two streams into DDR, the specific PID of the empty packet is identified, and the packet enable of the PID is pulled low, that is, it is treated as invalid data and not processed.
[0111] This eliminates the impact of empty packets, allows for direct comparison of bitstream content, improves efficiency, and significantly reduces the pressure on the device from storing the bitstream.
[0112] Furthermore, the method also includes the following steps:
[0113] Step S601: Within a preset time range, count the number of data packets received from the reference stream and the number of data packets received from the test stream.
[0114] Step S602: When the number of data packets sent to the reference stream is less than a preset threshold, the first port of the receiving device experiences a disconnection.
[0115] Step S603: When the number of data packets received in the test stream is less than a preset threshold, the second port of the receiving device experiences a disconnection.
[0116] The first port is for transmitting the reference stream, and the second port is for transmitting the test stream.
[0117] Specifically, to more comprehensively analyze the reasons for content comparison failure, this application simultaneously performs flow interruption detection on both the sending reference stream and the receiving test stream, that is, counts the number of packets received by each stream within a certain time range. When the number of data packets in the sending reference stream is less than a preset threshold, the first port of the receiving device experiences a flow interruption, resulting in content comparison failure and displaying an unlocked result; when the number of data packets in the receiving test stream is less than the preset threshold, the second port of the receiving device experiences a flow interruption, resulting in content comparison failure and displaying an unlocked result.
[0118] In addition, to help users obtain detailed reasons for content comparison failures, this application will display not only the comparison results, bit error rate, and CC detection results when finally displaying the results, but will also display different levels of alarms depending on the situation. There are four alarm levels: Level 1, Level 2, Level 3, and Level 4, corresponding to: no anomalies in either of the two bitstreams but comparison failure; one of the two bitstreams having an anomaly; and both bitstreams having an anomaly (anomalies include stream interruption and CC errors). Alarm information of different levels can help users better analyze the reasons for content comparison failures.
[0119] Example 2:
[0120] Figure 2 This is a flowchart of another method for processing received data in embodiment two of the present invention.
[0121] Reference Figure 2 The method includes the following steps:
[0122] Step S701: The receiving device receives the first code stream transmitted by the radio transmitting device via wired transmission and the second code stream transmitted via radio, and uses the first code stream as the transmission reference stream and the second code stream as the reception test stream.
[0123] Step S702: Write the transmit reference stream and receive test stream to DDR, and record the write time of the transmit reference stream in DDR;
[0124] In step S703, after retrieving the transmit reference stream from the DDR, the transmit reference stream is stored in the first FIFO memory; after retrieving the receive test stream from the DDR, the receive test stream is stored in the second FIFO memory.
[0125] Step S704: If the difference between the retrieval time and the write time is greater than a preset delay value, then retrieve the first data packet of the transmission reference stream from the first FIFO memory and retrieve the second data packet of the reception test stream from the second FIFO memory, and use them as the reference data packet.
[0126] Step S705: Compare the first data packet and the reference data packet byte by byte.
[0127] Step S706: When the first data packet and the reference data packet do not match, the first data packet is discarded and the third data packet for sending the reference stream is retrieved from the first FIFO memory; the third data packet is compared with the reference data packet until the first comparison result is successful.
[0128] Step S707: When the two packets are successfully matched, the continuous matching phase begins, and an equal number of packets are taken from the sending reference stream and the receiving test stream for matching.
[0129] Step S708: If the current bit error rate is greater than the preset bit error threshold, the second comparison result is a failure.
[0130] Step S709: If the number of times a successful comparison turns into an unsuccessful comparison exceeds a preset threshold for the number of times a comparison fails or the time of unsuccessful comparison exceeds a preset time threshold (half of the time threshold range, i.e. half of the statistical period), then an unlocked result is displayed.
[0131] Example 3:
[0132] Figure 3 This is a schematic diagram of the data processing system for receiving code streams provided in Embodiment 3 of the present invention.
[0133] Reference Figure 3 This system is applied to a receiving device, which includes DDR memory, a first FIFO memory, and a second FIFO memory.
[0134] The code stream receiving module is used to receive a first code stream transmitted by a radio transmitting device via wired transmission and a second code stream transmitted via radio, and uses the first code stream as a transmission reference stream and the second code stream as a reception test stream.
[0135] The write module is used to write the transmit reference stream and receive test stream to DDR, and record the write time of the transmit reference stream in DDR;
[0136] The storage module is used to retrieve the transmission reference stream from the DDR, store the transmission reference stream in the first FIFO memory, and record the time when the transmission reference stream is retrieved from the DDR.
[0137] The retrieval module is used to retrieve a first data packet of the transmission reference stream from the first FIFO memory and a second data packet of the reception test stream from the second FIFO memory when the difference between the retrieval time and the write time is greater than a preset delay value.
[0138] The first comparison module is used to compare the first data packet and the second data packet to obtain the first comparison result;
[0139] The second comparison module is used to continuously compare the sent reference stream and the received test stream when the first comparison result is successful, and obtain the second comparison result.
[0140] The determination module is used to determine the number of times a successful comparison is changed to an unsuccessful comparison and the time of the unsuccessful comparison, based on the first comparison result and the second comparison result.
[0141] The judgment module is used to determine whether the number of times a successful comparison turns into an unsuccessful comparison exceeds a preset threshold for the number of times a comparison fails or whether the time of unsuccessful comparison exceeds a preset time threshold. If so, the unlocked result is displayed; if not, the locked result is displayed.
[0142] This invention provides a method and system for processing received data streams, applied to a receiving device. The receiving device includes a DDR, a first FIFO memory, and a second FIFO memory. The method includes: receiving a first data stream transmitted via wired transmission and a second data stream transmitted via radio transmission from a radio transmitting device; using the first data stream as a transmission reference stream and the second data stream as a reception test stream; writing the transmission reference stream and the reception test stream into the DDR and recording the writing time of the transmission reference stream in the DDR; retrieving the transmission reference stream from the DDR and storing it in the first FIFO memory, recording the retrieval time of the transmission reference stream from the DDR; if the difference between the retrieval time and the writing time is greater than a preset delay value, retrieving a first data packet of the transmission reference stream from the first FIFO memory and retrieving a data packet of the reception test stream from the second FIFO memory. The system receives the second data packet of the test stream; compares the first data packet and the second data packet to obtain the first comparison result; when the first comparison result is successful, it continuously compares the sending reference stream and the receiving test stream to obtain the second comparison result; based on the first and second comparison results, it determines the number of times a successful comparison turns into an unsuccessful comparison and the time of the unsuccessful comparison; it judges whether the number of times a successful comparison turns into an unsuccessful comparison exceeds a preset threshold for the number of times the lock is lost or whether the time of the unsuccessful comparison exceeds a preset time threshold; if so, it displays the unlocked result; if not, it displays the locked result; after the comparison between the retrieval time and the storage time passes, it continues to compare, thereby reducing the number of comparisons, reducing workload, and improving processing efficiency; by adding the preset threshold for the number of times the lock is lost and the preset time threshold for the determination conditions, it is possible to prioritize reducing the generation of unnecessary alarms.
[0143] This invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the data processing method for receiving bitstreams provided in the above embodiments.
[0144] This invention also provides a computer-readable medium having processor-executable non-volatile program code, on which a computer program is stored, and which, when run by a processor, executes the steps of the data stream receiving method described above.
[0145] The computer program product provided in this embodiment of the invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the preceding method embodiments. For specific implementation details, please refer to the method embodiments, which will not be repeated here.
[0146] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system and apparatus described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0147] Furthermore, in the description of the embodiments of the present invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in the present invention based on the specific circumstances.
[0148] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0149] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0150] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for processing received code stream data, characterized in that, Applied to a receiving device, the receiving device including DDR, a first FIFO memory and a second FIFO memory, the method includes: The device receives a first code stream transmitted via wired transmission and a second code stream transmitted via radio transmission, and uses the first code stream as a transmission reference stream and the second code stream as a reception test stream. Write the transmit reference stream and the receive test stream into the DDR, and record the write time of the transmit reference stream into the DDR; After the transmission reference stream is retrieved from the DDR, the transmission reference stream is stored in the first FIFO memory, and the time when the transmission reference stream is retrieved from the DDR is recorded. If the difference between the retrieval time and the write time is greater than a preset delay value, then the first data packet of the transmission reference stream is retrieved from the first FIFO memory, and the second data packet of the reception test stream is retrieved from the second FIFO memory. The first data packet and the second data packet are compared to obtain the first comparison result; When the first comparison result is successful, the sending reference stream and the receiving test stream are continuously compared to obtain the second comparison result; The number of times a successful comparison turned into an unsuccessful comparison and the duration of the unsuccessful comparison are determined based on the first comparison result and the second comparison result; Determine whether the number of times the comparison success turns into failure exceeds a preset threshold for the number of times the lock is lost or whether the time of the comparison failure exceeds a preset time threshold; If so, display "Unlocked" result; If not, the lock result will be displayed.
2. The method for processing received code stream data according to claim 1, characterized in that, The first data packet and the second data packet are compared to obtain a first comparison result, including: Use the second data packet as the reference data packet; Compare the first data packet and the reference data packet byte by byte; When the first data packet and the reference data packet do not match, the first data packet is discarded and the third data packet of the transmission reference stream is retrieved from the first FIFO memory; The third data packet is compared with the reference data packet until the first comparison result is successful.
3. The method for processing received code stream data according to claim 1, characterized in that, The transmitted reference stream and the received test stream are continuously compared to obtain a second comparison result, including: Extract the first data packet group from the transmission reference stream; Extract the second data packet group from the received test stream; The first data packet group and the second data packet group are compared sequentially, and the current bit error rate is calculated. If the current bit error rate is greater than the preset bit error threshold, the second comparison result is a failure; If the current bit error rate is less than the preset bit error threshold, then the second comparison result is successful; The number of the first data packet group is the same as the number of the second data packet group.
4. The method for processing received data streams according to claim 1, characterized in that, Writing the transmit reference stream and the receive test stream into the DDR includes: The transmit reference stream is written into the first region of the DDR, and the receive test stream is written into the second region of the DDR.
5. The method for processing received code stream data according to claim 1, characterized in that, After receiving a first code stream transmitted via wired transmission and a second code stream transmitted via radio transmission from a radio transmitting device, and using the first code stream as a transmission reference stream and the second code stream as a reception test stream, the method further includes: The continuity between adjacent data packets in the received test stream is detected to obtain the detection result. The detection results and the received test stream are written together into the DDR.
6. The method for processing received code stream data according to claim 1, characterized in that, Before writing the transmit reference stream and the receive test stream into the DDR, the method further includes: Identify the PID set in the empty packet data of the received test stream; The empty packet data corresponding to the set PID is treated as invalid data.
7. The method for processing received code stream data according to claim 1, characterized in that, The method further includes: Within a preset time range, count the number of data packets received from the sending reference stream and the number of data packets received from the receiving test stream; When the number of data packets in the transmitted reference stream is less than a preset threshold, the first port of the receiving device experiences a disconnection. When the number of data packets in the received test stream is less than the preset threshold, the second port of the receiving device experiences a disconnection. Wherein, the first port is the port for transmitting the sending reference stream, and the second port is the port for transmitting the receiving test stream.
8. A data processing system for receiving code streams, characterized in that, Applied to a receiving device, the receiving device includes DDR, a first FIFO memory, and a second FIFO memory; the system includes: The code stream receiving module is used to receive a first code stream transmitted by a radio transmitting device via wired transmission and a second code stream transmitted via radio, and to use the first code stream as a transmission reference stream and the second code stream as a reception test stream. The writing module is used to write the transmit reference stream and the receive test stream into the DDR, and record the write time of the transmit reference stream into the DDR; The storage module is used to retrieve the transmission reference stream from the DDR, store the transmission reference stream in the first FIFO memory, and record the time when the transmission reference stream is retrieved from the DDR. The retrieval module is configured to retrieve the first data packet of the transmission reference stream from the first FIFO memory and the second data packet of the reception test stream from the second FIFO memory when the difference between the retrieval time and the writing time is greater than a preset delay value. The first comparison module is used to compare the first data packet and the second data packet to obtain a first comparison result; The second comparison module is used to continuously compare the transmitted reference stream and the received test stream when the first comparison result is successful, and obtain a second comparison result. The determination module is used to determine the number of times a successful comparison is changed to an unsuccessful comparison and the time of the unsuccessful comparison based on the first comparison result and the second comparison result; The judgment module is used to determine whether the number of times the comparison success turns into failure exceeds a preset threshold for the number of times the lock is lost or whether the time of the comparison failure exceeds a preset time threshold; if yes, the unlocked result is displayed; if no, the locked result is displayed.
9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, characterized in that, When the processor executes the computer program, it implements the method described in any one of claims 1 to 7.
10. A computer-readable medium having processor-executable non-volatile program code, characterized in that, The program code causes the processor to execute the method according to any one of claims 1 to 7.