Video stream failover method, system, device, and storage medium
By acquiring the target hierarchical reset strategy library and utilizing the historical representation parameters of the video stream and the preset hierarchical reset strategy algorithm, video stream faults of devices such as vehicle displays and cameras can be quickly recovered, solving the problem of long fault recovery time in existing technologies and improving the system's reliability and fault recovery speed.
Patent Information
- Application Number
- CN202510987222.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-17
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2045-07-17
AI Technical Summary
Peripherals such as vehicle displays and cameras are prone to video stream failures such as stuttering, screen tearing, screen shaking, black screen, and screen flickering under electromagnetic compatibility testing and actual user scenarios. Existing fault recovery strategies are simplistic and time-consuming, and cannot provide rapid recovery.
By acquiring the target hierarchical reset strategy library, utilizing the historical representation parameters of the video stream and the preset hierarchical reset strategy algorithm, the current recovery strategy is determined, video stream faults are quickly recovered, and the entire video stream link or the entire system is avoided from being reset.
It enables rapid recovery from video stream failures, improves system reliability and fault recovery speed, and ensures normal transmission of video streams.
Smart Images

Figure CN120658858B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, in particular to a video stream fault recovery method, system, device and storage medium. BACKGROUND
[0002] The peripherals such as vehicle-mounted display screens and cameras are prone to abnormal phenomena such as lag, screen flicker, screen jitter, black screen and screen flashing in electromagnetic compatibility (EMS) tests and actual user use scenarios. Most of the abnormal phenomena are caused by video stream faults. However, after the video stream fault occurs, the fault recovery takes a long time due to the variety of video stream fault causes and the single existing fault recovery strategy. SUMMARY
[0003] The embodiments of the present application provide a video stream fault recovery method, system, device and storage medium to quickly recover the video stream fault.
[0004] Technical solutions: The video stream fault recovery method provided by the embodiments of the present application comprises:
[0005] Obtaining a target hierarchical reset strategy library, wherein the target hierarchical reset strategy library is determined according to historical characteristic parameters of the video stream and a preset hierarchical reset strategy algorithm;
[0006] According to the current characteristic parameters of the video stream and the target hierarchical reset strategy library, a current recovery strategy is determined to recover the current fault of the video stream through the current recovery strategy.
[0007] In some embodiments, the obtaining of the target hierarchical reset strategy library comprises:
[0008] According to the historical characteristic parameters, the video stream, a preset interference signal and a preset correlation analysis algorithm, a first characteristic parameter and a corresponding first fault phenomenon are determined, wherein the correlation between the first characteristic parameter and the corresponding first fault phenomenon satisfies a first preset correlation condition;
[0009] According to the first characteristic parameter, the first fault phenomenon and the preset hierarchical reset strategy algorithm, the target hierarchical reset strategy library is determined.
[0010] In some embodiments, the determining of the target hierarchical reset strategy library according to the first characteristic parameter, the first fault phenomenon and the preset hierarchical reset strategy algorithm comprises:
[0011] According to the first characteristic parameter, the first fault phenomenon, a preset influence level and a preset hierarchical reset strategy library, a target recovery strategy is determined;
[0012] determine the target hierarchical reset strategy library according to the target recovery strategy and a preset reinforcement learning algorithm.
[0013] In some embodiments, the target recovery strategy is determined according to the first characterization parameter, the first failure phenomenon, a preset influence level, and a preset hierarchical reset strategy library, including:
[0014] determining a target influence level of the first characterization parameter according to the preset influence level;
[0015] adding the first characterization parameter and the corresponding first failure phenomenon in each target influence level that meets a second preset correlation condition to the preset hierarchical reset strategy library;
[0016] and setting all executable target recovery strategies for each target influence level.
[0017] In some embodiments, the target hierarchical reset strategy library is determined according to the target recovery strategy and a preset reinforcement learning algorithm, including:
[0018] reinforcement learning is performed on the target recovery strategy of each target influence level according to the preset reinforcement learning algorithm, and when a preset convergence condition is met, the target hierarchical reset strategy library is determined.
[0019] In some embodiments, the first characterization parameter and the corresponding first failure phenomenon are determined according to the historical characterization parameter, the video stream, a preset interference signal, and a preset correlation analysis algorithm, including:
[0020] applying the preset interference signal to the video stream to determine a second characterization parameter and a corresponding second failure phenomenon from the historical characterization parameter; wherein the second characterization parameter is a parameter in the historical characterization parameter that appears a failure phenomenon under the preset interference signal; and the second failure phenomenon is all failure phenomena that appear under the preset interference signal;
[0021] determining the first characterization parameter and the corresponding first failure phenomenon according to the second characterization parameter, the second failure phenomenon, and the preset correlation analysis algorithm.
[0022] In some embodiments, the first characterization parameter and the corresponding first failure phenomenon are determined according to the second characterization parameter, the second failure phenomenon, and the preset correlation analysis algorithm, including:
[0023] determining the preset correlation analysis algorithm according to the type of the second characterization parameter;
[0024] determining the correlation of the second characterization parameter and the corresponding second failure phenomenon according to the preset correlation analysis algorithm.
[0025] The second characteristic parameter and the second fault phenomenon whose correlation meets the first preset correlation condition are determined as the first characteristic parameter and the corresponding first fault phenomenon respectively.
[0026] Correspondingly, the embodiment of the application further provides a video stream fault recovery system, comprising:
[0027] The acquisition module is configured to acquire a target hierarchical reset strategy library, wherein the target hierarchical reset strategy library is determined according to historical characteristic parameters of the video stream and a preset hierarchical reset strategy algorithm.
[0028] The determination module is configured to determine a current recovery strategy according to current characteristic parameters of the video stream and the target hierarchical reset strategy library.
[0029] The recovery module is configured to recover the current fault of the video stream by using the current recovery strategy.
[0030] Correspondingly, the embodiment of the application further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the video stream fault recovery method as described above when executing the computer program.
[0031] Correspondingly, the embodiment of the application further provides a computer readable storage medium, which stores a computer program, wherein the computer program is executed by a processor to implement the video stream fault recovery method as described above.
[0032] Advantages: compared with the prior art, the video stream fault recovery method, system, device and storage medium provided by the embodiment of the application, the video stream fault recovery method comprises: acquiring a target hierarchical reset strategy library, wherein the target hierarchical reset strategy library is determined according to historical characteristic parameters of the video stream and a preset hierarchical reset strategy algorithm; determining a current recovery strategy according to current characteristic parameters of the video stream and the target hierarchical reset strategy library, so as to recover the current fault of the video stream by using the current recovery strategy. The video stream fault recovery method provided by the application designs a hierarchical reset strategy library based on historical characteristic parameters of video stream faults, so as to quickly determine the fault recovery strategy required by the current video stream according to the hierarchical reset strategy library, without resetting the entire video stream link or the entire system to recover the fault, thereby shortening the fault recovery time and facilitating the quick recovery of the video stream fault. BRIEF DESCRIPTION OF DRAWINGS
[0033] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0034] Figure 1 This is a flowchart of a video stream fault recovery method provided in the embodiments of this application;
[0035] Figure 2 This is a schematic diagram of the structure of an initial hierarchical reset strategy library provided in an embodiment of this application;
[0036] Figure 3 This is a schematic diagram of the overall process of a video stream fault recovery method provided in the embodiments of this application;
[0037] Figure 4 This is a schematic diagram of the principle structure of a video stream fault recovery system provided in the embodiments of this application;
[0038] Figure 5 This is a schematic diagram of the structure of an electronic device provided in the embodiments of this application.
[0039] Figure label:
[0040] 101-Acquisition module; 102-Determination module; 103-Recovery module; 100-Video stream fault recovery system. Detailed Implementation
[0041] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0042] It should be understood that although the terms first, second, etc., may be used herein to describe various components, these components should not be limited by these terms. These terms are used to distinguish one component from another. Therefore, the first component discussed below may be referred to as the second component without departing from the teachings of this application. As used herein, the term "and / or" includes all combinations of any and more of the associated listed items.
[0043] Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of exemplary embodiments and may not be to scale. The modules or processes shown in the drawings are not necessarily essential for implementing this application and therefore should not be used to limit the scope of protection of this application.
[0044] The applicant's research revealed that in-vehicle displays, cameras, and other peripherals are highly prone to exhibiting abnormal phenomena such as stuttering, screen flickering, screen jittering, black screens, and screen flashing under EMS testing and real-world user scenarios. The vast majority of these abnormalities are caused by video stream failures. The fault recovery strategies for related technologies are relatively limited.
[0045] For example, the recovery strategies employed by related technologies often rely on simple, local fault registers to determine the problem. When a fault register is set, the link is reset. However, the registers on which this recovery strategy depends can only reflect part of the hardware state and cannot distinguish between multiple concurrent fault scenarios (such as cyclic redundancy check (CRC) errors and clock lockout occurring simultaneously), resulting in a high false positive rate.
[0046] For example, many related technologies use fixed reset logic (such as global reset or link reset). This fixed reset logic may interrupt normal services and take a long time to recover, and it lacks the ability to accurately isolate local faults.
[0047] For example, most video stream failures rely primarily on manual experience for troubleshooting, lacking a quantitative correlation between abnormal parameters and video phenomena (screen tearing, stuttering, black screen), resulting in slow response times and inefficient fault localization. Furthermore, the diverse causes of video stream failures lead to excessively long recovery times or wide-ranging impacts, making it impossible to quickly resolve video stream failures.
[0048] In view of this, embodiments of this application provide a video stream fault recovery method, system, device, and storage medium. The method of this application designs a hierarchical reset strategy library based on the historical characterization parameters of video stream faults, so as to quickly determine the fault recovery strategy required by the current video stream according to the hierarchical reset strategy library. It does not require resetting the entire video stream link or the entire system to recover the fault, thereby shortening the fault recovery time and facilitating the rapid recovery of video stream faults.
[0049] Figure 1 This is a flowchart illustrating a video stream fault recovery method provided in an embodiment of this application. This method is applicable to video management systems, enabling rapid recovery from video stream faults. The method can be executed by a video stream fault recovery system, which can be implemented in software and / or hardware and configured within the processor or controller of the video management system. Please refer to... Figure 1 The method includes the following steps:
[0050] Step 110: Obtain the target hierarchical reset strategy library.
[0051] The target hierarchical reset strategy library is determined based on the historical characterization parameters of the video stream and the preset hierarchical reset strategy algorithm.
[0052] The video stream can be a video signal from devices such as in-vehicle displays and in-vehicle cameras. Video stream malfunctions include abnormal phenomena such as stuttering, screen tearing, screen shaking, black screen, and screen flickering.
[0053] The historical characterization parameters are historical parameters related to video stream failures across multiple dimensions. These historical parameters include all possible parameters related to video stream failures, such as the video stream's operating parameters and basic configuration parameters.
[0054] Historical characterization parameters are multi-dimensional historical parameters of the acquired video stream. These parameters include categorical parameters, continuous parameters, and discrete parameters.
[0055] Among them, the categorized parameters are the parameter types most relied upon for video stream fault identification, such as binary parameters. For example, binary parameters include chip fault indication registers (where the register value is 0 or 1, where 0 = good / 1 = Failt), link connection status (lock / unlock, video lock / video unlock), error reporting enable (error flag / reporting enable (err_oen)), etc.
[0056] Among them, continuous parameters include channel bit error rate, actual clock frequency (Peripheral Clock, PCLK), voltage drain (VDD) of various chips, chip temperature, device temperature, serializer / deserializer (serdes) protocol transmission rate, Mobile Industry Processor Interface (MIPI) protocol transmission rate, communication latency, etc.
[0057] Among them, discrete parameters include various error counts (e.g., Cyclic Redundancy Check (CRC) error count (CRC ERR COUNT), Forward Error Correction (FEC) error correction failure count (FEC_UNCORRECTABLE_ERRORS), error threshold (link_err_count), equalization (EQ) value, pre-emphasis gain, deemphasis gain, etc.).
[0058] Specifically, historical characterization parameters of the video stream are obtained. Then, based on these historical characterization parameters and a preset hierarchical reset strategy algorithm, a target hierarchical reset strategy library is obtained. This allows for the accurate and rapid determination of the corresponding fault recovery strategy directly based on the current characterization parameters using the hierarchical reset strategy library, without needing to reset the entire video stream link or the entire system to recover from the fault. This shortens the fault recovery time, facilitates rapid recovery from video stream faults, improves system reliability, and ensures the normal transmission of the video stream.
[0059] In some embodiments, determining the target hierarchical reset strategy library includes the following steps:
[0060] Step 1: Determine the first characterization parameter and the corresponding first fault phenomenon based on historical characterization parameters, video stream, preset interference signal, and preset correlation analysis algorithm; wherein, the correlation between the first characterization parameter and the corresponding first fault phenomenon satisfies the first preset correlation condition.
[0061] The preset interference signal can be a controllable interference signal or an actual interference signal. For example, the preset interference signal can be an EMS interference signal, an electrostatic discharge (ESD) interference signal, a radiated immunity (RI) interference signal, or an interference signal emitted by a handheld jamming device.
[0062] Among them, the preset correlation analysis algorithms include the chi-square test, point-bivariate correlation coefficient statistical method, logistic regression algorithm, Mann-Whitney U test, and Spearman rank correlation coefficient method.
[0063] The first preset correlation condition includes: the correlation is significant. Specifically, the first characterization parameter and the corresponding first fault phenomenon are significantly (or strongly) correlated characterization parameters and fault phenomena.
[0064] In some embodiments, determining a first characterization parameter and a corresponding first fault phenomenon based on historical characterization parameters, a video stream, a preset interference signal, and a preset correlation analysis algorithm includes: applying a preset interference signal to the video stream to determine a second characterization parameter and a corresponding second fault phenomenon from historical characterization parameters; wherein the second characterization parameter is a parameter in the historical characterization parameters that exhibits a fault phenomenon under the preset interference signal; the second fault phenomenon is all fault phenomena that exhibit under the preset interference signal; and determining the first characterization parameter and the first fault phenomenon based on the second characterization parameter, the second fault phenomenon, and the preset correlation analysis algorithm.
[0065] Specifically, a preset interference signal is injected into the video stream, and the characterization parameters (i.e., second characterization parameters) and corresponding fault phenomena (i.e., second fault phenomena) of all fault phenomena appearing in the historical characterization parameters under the influence of the preset interference signal are recorded. Furthermore, a preset correlation analysis algorithm is used to perform correlation analysis on all the second characterization parameters and their corresponding second fault phenomena. This helps to filter out the parameters that best characterize the fault phenomena from a large number of parameters, i.e., to select characterization parameters that are strongly correlated with the fault phenomena, so as to achieve rapid recovery of video stream faults in the future.
[0066] It should be noted that applying (or injecting) a preset interference signal to the video stream is to match the parameters when a fault (or abnormal phenomenon) occurs with the fault phenomenon, so that the correlation analysis of the matched fault phenomenon and the corresponding fault parameter can be performed later, thereby improving the speed of subsequent video stream fault recovery.
[0067] In some embodiments, determining the first characterization parameter and the first fault phenomenon based on the second characterization parameter, the second fault phenomenon, and a preset correlation analysis algorithm includes: determining the preset correlation analysis algorithm based on the type of the second characterization parameter; determining the correlation between the second characterization parameter and the corresponding second fault phenomenon based on the preset correlation analysis algorithm; and determining the second characterization parameter and the second fault phenomenon whose correlation satisfies the first preset correlation condition as the first characterization parameter and the first fault phenomenon, respectively.
[0068] The types of the first and second characterization parameters both include categorical parameters (e.g., binary parameters), continuous parameters, and discrete parameters.
[0069] The fault phenomena are generally divided into two types: faulty (such as screen flickering) and non-faulty (such as no screen flickering), so the fault phenomena are binary parameters.
[0070] Specifically, the corresponding preset correlation analysis algorithm is determined based on the specific type of the second characterization parameter to improve the accuracy and reliability of the correlation analysis between the characterization parameter and the corresponding fault phenomenon. For example, when the second characterization parameter is a categorical parameter (e.g., a binary parameter) and a binary parameter (fault phenomenon), the chi-square test can be used to determine the correlation between the characterization parameter and the fault phenomenon. When the second characterization parameter is a continuous parameter (e.g., a chip fault indicator register) and a binary parameter (fault phenomenon), the point-bivariate correlation coefficient statistical method and logistic regression algorithm can be used to determine the correlation between the characterization parameter and the fault phenomenon. When the second characterization parameter is a discrete parameter (e.g., an error threshold) and a binary parameter (fault phenomenon), the Mann-Whitney U test, logistic regression algorithm, and Spearman's rank correlation coefficient method can be used to determine the correlation between the characterization parameter and the fault phenomenon.
[0071] For example, taking the correlation analysis between the chip fault indicator register (i.e., the characterization parameter, hereinafter referred to as the fault register) and the black screen phenomenon (i.e., the fault phenomenon) as an example, the specific process of the correlation analysis between the characterization parameter and the fault phenomenon is as follows:
[0072] First, we analyze the types of characterization parameters and fault phenomena, assuming the characterization parameters are 0 = good and 1 = failure; the fault phenomena include black screen and no black screen. Since both the characterization parameters and fault phenomena are binary parameters, we choose the chi-square test to analyze their correlation.
[0073] Then, a contingency table was constructed. Based on the observed data (i.e., the historical parameters of the acquired chip fault indicator register), the data was organized as shown in Table 1. 2. Contingency table.
[0074] Table 1: 2 2 contingency tables
[0075]
[0076] Secondly, assuming the fault register is independent of the fault phenomenon (null hypothesis), the expected frequencies of a, b, c, and d are calculated as follows:
[0077] E11=40 50 / 100=20;
[0078] E12=40 50 / 100=20;
[0079] E21=60 50 / 100=30;
[0080] E22=60 50 / 100=30;
[0081] Where E11 represents the expected frequency of a, E12 represents the expected frequency of b, E21 represents the expected frequency of c, and E22 represents the expected frequency of d.
[0082] Then, calculate the chi-square statistic. ,as follows:
[0083]
[0084] Next, the significance is determined. The significance is determined based on the calculated value of the chi-square statistic, i.e., 16.66 > 3.841 (significance level 0.05). Therefore, the null hypothesis is rejected, and the two are considered to be significantly correlated.
[0085] Finally, calculate the Phi coefficient ( coefficient), This indicates a moderate positive correlation between the fault register and the black screen phenomenon. The Phi coefficient is a statistic used to measure the strength of the correlation between two binary variables (i.e., variables with only two categories), and its value ranges from [-1, 1]. It is essentially a chi-square test (…). The standardized form of ) is suitable for analyzing 2 In a contingency table, the higher the correlation, the larger the absolute value (positive correlation, negative correlation).
[0086] Therefore, the correlation between the fault register and the black screen phenomenon can be obtained using the chi-square test. Similarly, the corresponding correlation analysis algorithm can be determined based on the type of the characterization parameter and the type of the fault phenomenon, thus obtaining the correlation between the characterization parameter and the fault phenomenon. After determining the correlation between the two (i.e., determining the correlation between the second characterization parameter and the corresponding second fault phenomenon), all second characterization parameters and corresponding second fault phenomena that satisfy strong correlation (or significant correlation) are respectively determined as the first characterization parameter and the first fault phenomenon.
[0087] Step 2: Determine the target hierarchical reset strategy library based on the first characterization parameter, the first fault phenomenon, and the preset hierarchical reset strategy algorithm.
[0088] Among them, the first characterization parameter and the corresponding first fault phenomenon are strongly correlated characterization parameters and corresponding fault phenomena obtained by screening through a preset correlation analysis algorithm and the first preset correlation conditions. Therefore, it is beneficial to improve the accuracy of the target hierarchical reset strategy library in the future, thereby improving the speed of video stream fault recovery in the future.
[0089] It should be noted that the number of first characterization parameters and corresponding first fault phenomena may be one or more sets, that is, the number of strongly correlated characterization parameters and corresponding fault phenomena obtained by the preset correlation analysis algorithm may be one or more sets.
[0090] In some embodiments, determining a target hierarchical reset strategy library based on a first characterization parameter, a first fault phenomenon, and a preset hierarchical reset strategy algorithm includes: determining a target recovery strategy based on the first characterization parameter, the first fault phenomenon, a preset influence level, and the preset hierarchical reset strategy library; and determining the target hierarchical reset strategy library based on the target recovery strategy and a preset reinforcement learning algorithm.
[0091] The preset impact levels include a first impact level, a second impact level, a third impact level, and a fourth impact level. The first, second, third, and fourth impact levels are ordered from lowest to highest.
[0092] The first level of impact is single-chip failure, the second level of impact is single-channel failure, the third level of impact is full-channel failure, and the fourth level of impact is global failure or main chip failure.
[0093] Figure 2 This is a schematic diagram of the structure of an initial hierarchical reset strategy library provided in an embodiment of this application. The preset hierarchical reset strategy library is the initial hierarchical reset strategy library. For an example, please refer to [link to example]. Figure 2 The initial hierarchical reset strategy library includes multiple impact levels, such as single-chip fault level, single-channel fault level, full-channel fault level, global fault, or main chip fault. Each level corresponds to specific characterization parameters (including the corresponding fault phenomena) and a corresponding recovery strategy. For example, characterization parameters for the single-chip fault level include setting the chip fault indicator register and abnormal register configuration, with corresponding recovery strategies of single-chip configuration correction or single-chip configuration reset. Characterization parameters for the single-channel fault level include EQ value deviation, pre-emphasis gain deviation, deemphasis gain deviation, bit error rate deviation, loss of lock, and video loss of lock, with corresponding recovery strategies of single-channel signal quality error correction. Characterization parameters for the full-channel fault level include abnormal fault parameters in all channels, with corresponding recovery strategies of multi-channel signal quality error correction or multi-channel signal quality reset. Characterization parameters for the global fault or main chip fault level include screen freeze, camera freeze, and host freeze, with corresponding recovery strategies of screen recovery, camera recovery, and host recovery.
[0094] Among them, unlock, video loss lock, screen hang, and host hang are binary parameters in the category of parameters. For example, the link connection status "lock" means locked and "unlock" means unlocked, which are binary parameters; "normal screen" means that the screen chip's internal integrated circuit (I2C) can be accessed, and "screen hang" means that all screen chip I2C cannot be accessed.
[0095] Specifically, after obtaining strongly correlated first characterization parameters and corresponding first fault phenomena through a preset correlation analysis algorithm and first preset correlation conditions, each first characterization parameter is classified into levels according to a preset influence level, and the target recovery strategy for each level is determined based on a preset hierarchical reset strategy library. Finally, reinforcement learning is performed on the target recovery strategies at different levels based on the target recovery strategies and a preset reinforcement learning algorithm to determine the target hierarchical reset strategy library. This facilitates the real-time matching of the corresponding video stream fault recovery strategy to the real-time characterization parameters based on the target hierarchical reset strategy library, thereby improving the video stream fault recovery speed and ensuring reliable video stream transmission.
[0096] In some embodiments, determining a target recovery strategy based on a first characterization parameter, a first fault phenomenon, a preset impact level, and a preset hierarchical reset strategy library includes: determining the target impact level of the first characterization parameter based on the preset impact level; adding the first characterization parameter and the corresponding first fault phenomenon that satisfy the second preset correlation condition in each target impact level to the preset hierarchical reset strategy library; and setting all executable target recovery strategies for each target impact level.
[0097] The second preset correlation condition includes extracting the n most correlated representation parameters. Here, n is a natural number, and its specific value can be set according to the actual situation, without being specifically limited here.
[0098] Among these, the characterization parameters are generally clearly related to the target's impact level. For example, a register indicating a chip fault must only be related to that specific chip. Similarly, the bit error rate, describing errors in channel data, must be related to the entire channel, even if the chip itself is functioning normally. A full-channel fault, where all channels experience channel errors, is considered an abnormal characterization parameter and is thus determined to be a full-channel fault. When a global fault occurs, all chips and channels can be considered to be malfunctioning.
[0099] It should be noted that a single characteristic parameter does not necessarily correspond to only one level of influence. It must first be used to determine whether a global fault has occurred, then to determine whether a full-channel fault has occurred, then to determine whether a single-channel fault has occurred, and finally to determine whether a chip fault has occurred. The judgment is made in descending order of fault severity.
[0100] Specifically, after obtaining the first characterization parameter, its corresponding target influence level is determined according to the preset influence level. Then, for each target influence level, the n most relevant characterization parameters (where n is an integer greater than or equal to 1) are extracted and added to the preset hierarchical reset strategy library. This initially maps the characterization parameters of different target influence levels to the pre-set recovery strategies in the library, simplifying the strategy library. For example, if a chip fault indicator register is set, indicating a chip fault, the preset recovery strategy prioritizes resetting or soft-resetting the single chip, or other recovery methods targeting a specific chip (such as single-chip configuration correction waiting). This allows for targeted recovery of specific video stream faults, rather than resetting the entire link or the entire system, thus accelerating the recovery speed of video stream faults.
[0101] In some embodiments, determining a target hierarchical reset strategy library based on a target recovery strategy and a preset reinforcement learning algorithm includes: performing reinforcement learning on the target recovery strategy for each target influence level according to the preset reinforcement learning algorithm until a preset convergence condition is met, and then determining the target hierarchical reset strategy library.
[0102] The preset convergence conditions include satisfying a preset number of iterations, etc. The specific conditions can be set according to the actual situation, and no specific limitations are made here.
[0103] Specifically, after adding the first representation parameter to the preset hierarchical reset strategy library according to the preset influence level and obtaining the target recovery strategy for each target influence level, reinforcement learning is performed on the target recovery strategy for each target influence level according to the preset reinforcement learning algorithm to optimize the initial hierarchical reset strategy library and obtain the optimal target hierarchical reset strategy library.
[0104] The specific implementation process of reinforcement learning for each objective recovery strategy is as follows: First, the recovery strategy weight optimization model is modeled as a Markov Decision Process (MDP), which includes three elements: state, action, and reward.
[0105] Among them, the state element is a quantitative representation of the current combination of characterizing parameters of the system. Binary parameters (such as Lock state = 0 / 1) are directly used as binary features, and the remaining parameters (such as EQ value) are divided into discrete levels (such as low EQ level / medium EQ level / high EQ level).
[0106] Among them, the action element is the reset strategy selected from the preset hierarchical reset strategy library (such as channel EQ reset, link reconnection).
[0107] Among them, the reward element is the comprehensive utility evaluation after the action is performed, which needs to balance the solution effect, the scope of impact, and the recovery time. For example, the following reward function can be designed:
[0108]
[0109] in, To address the weights corresponding to the effects, Weights corresponding to the scope of influence Weights corresponding to recovery time (e.g., It is 0.6. It is 0.1. The value is set to 0.3 (the specific value can be set according to the actual situation, and no specific limit is given here); the solution effect can be binarized (e.g., success = 1, failure = -1) or defined as a continuous value (e.g., fault elimination degree 80%); the impact range is normalized to 0-1 (e.g., partial reset = 0.1, global restart = 0.9); the recovery time is based on the maximum tolerance time. Normalization.
[0110] Then, the Q-Learning algorithm is used to converge the long-term returns of the state-action pair at each influence level. The Q-Learning algorithm learns the optimal recovery strategy by iteratively updating the Q-function. The update rule (i.e., the update formula) of the Q-function is as follows:
[0111]
[0112] in, The learning rate (e.g., 0.1) is used to control the update step size; A discount factor (e.g., 0.9) is used to balance current and future rewards; This refers to the new state after the action is performed (e.g., parameters return to normal after a reset).
[0113] in, Indicates the state Execute action Q value; Indicates the state Take action below The reward received later; Indicates the state The maximum Q value for all possible actions.
[0114] Finally, after completing reinforcement learning, the optimal representation parameter-policy pair that balances the resolution effect, impact range, and recovery time is obtained, which is the optimized hierarchical reset policy library (i.e., the target hierarchical reset policy library). This allows for subsequent fault recovery based on the real-time video stream fault representation parameters and the optimized hierarchical reset policy library, thus improving the fault recovery speed.
[0115] For example, let's take the target recovery strategy corresponding to a single-channel fault level as an example to illustrate how reinforcement learning can be used to optimize the target recovery strategy. The specific process is as follows:
[0116] The first step is to determine the state. The state space has two parameters (only single-channel fault level anomalies are selected for optimization, and the parameters are simplified to two for easy understanding. In practice, the parameters of the state space under different levels are determined based on correlation analysis). Link locking = 0 / Link unlocking = 1. EQ levels are divided into low EQ level / medium EQ level / high EQ level, as shown in Table 2.
[0117] Table 2: State Parameters
[0118]
[0119] The second step is to determine the actions. The action space assumes three operations (the actual operation can be based on the strategy defined in the actual layered reset strategy library), namely: relock: reset the link (takes 50ms); channel EQ resetting: reconfigure equalization parameters (takes 20ms); channel pre-emphasis resetting: reconfigure pre-emphasis parameters (takes 20ms).
[0120] The third step is to determine the reward, and the reward function is designed as follows:
[0121]
[0122] For example, there are two ways to judge the effectiveness of the solution. One is to judge from the perspective of the phenomenon: if the screen is completely normal after the strategy is implemented, the solution is judged to be good, and the score is 1; if the screen is partially normal after the strategy is implemented, the solution is judged to be medium, and the score is 0.5; if the screen is abnormal after the strategy is implemented, the solution is judged to be poor, and the score is 0.
[0123] Secondly, judging from the parameters: A score of 1 indicates a good result (all parameters returning to normal); a score of 1 indicates a moderate result (some parameters returning to normal), where 1 represents the percentage of parameters that have returned to normal (e.g., 0.5 indicates half of the parameters have returned to normal); and a score of 0 indicates a poor result (none of the parameters have returned to normal or other parameters are abnormal). It should be noted that these values can be set according to actual circumstances, and no specific limitations are set here.
[0124] The criteria for determining the scope of impact are user-defined, which is actually based on the recovery level. For example, chip-level recovery is set to 0.1, single-channel recovery is set to 0.7, full-channel recovery is set to 0.9, and global recovery is set to 1. (Generally, the recovery strategy of the corresponding level of fault is used, but it is also possible that a full-channel fault can be recovered by resetting the chip, in which case the scope of impact is determined to be 0.1.)
[0125] The recovery time is determined by: setting a minimum recovery time (e.g., 10 seconds) in advance, and then normalizing the recovery time. If the recovery time is equal to or exceeds this time, it is determined as 1. The rest of the time is taken as the normalized value.
[0126] The fourth step is to determine the update rules.
[0127] Among them, learning rate Set to 0.1, discount factor Set the initial exploration rate to 0.9. Let the initial exploration rate be 0.3. The initial exploration rate represents the probability that the agent will choose a random action instead of the optimal action (the optimal action is the one with the highest Q-value in the current state), used to balance exploration and exploitation. For example, in the technical solution of this application embodiment, each iteration of training can select any one of actions 0, 1, and 2, with a probability of 0.3 for selecting the one with the highest Q-value and a probability of 0.7 for randomly selecting any action. The initial exploration rate can also be other values, which can be set according to the actual situation and are not specifically limited here.
[0128] Fifth, list the initial Q-table. The initial Q-table is shown in Table 3.
[0129] Table 3: Initial Q Table
[0130]
[0131] Step 6: Perform Q-value iteration based on the characterization parameters and recovery strategy effects under each injection of controllable or actual interference signal, as detailed below:
[0132] Episode 1, Current State: State 5 (i.e., link lost, EQ = high); Action Selection: =0.3 Randomly select action 0 (reset link); Execution result: Link recovery locked ( 0), EQ remains unchanged;
[0133] Reward = 0.6 1+0.1 0.3 + 0.3 0.4 = 0.75;
[0134] Among them, the evaluation results are good, so it is judged as 1; the impact range is large, so it is judged as 0.7; the recovery time is moderate, so it is judged as 0.6. Substituting these values into the reward function calculation formula, the reward value is 0.75. Since the value is too small, the reward function value is increased by a factor of 10 for easier calculation, so the final reward value is 7.5.
[0135] Q value update:
[0136] Q(5,0) = 0 + 0.1 [7.5+0.9 max(Q(0)) - 0] = 0 + 0.1 (7.5+0.9) (0-0) = 0.75;
[0137] Since the Q table is pre-set to have Q values of 0 in all states, state 5 becomes state 0 after executing action 0. At this time, it is necessary to read the maximum Q value in state 0. Since this is the first iteration, all Q values in state 0 are 0, so max(Q(0)) = 0 in this iteration.
[0138] Update the Q value for state 5 as shown in Table 4.
[0139] Table 4: Status 5 Update Q Table
[0140]
[0141] Episode 2, Current State: State 2 (i.e., link locked, EQ = high); Action Selection: =0.3 Select the maximum Q value (currently all 0s, randomly select action 1 - EQ reset); Execution result: EQ reset to medium ( State 1);
[0142] Reward = 0.6 1+0.1 0.3 + 0.3 0.9 = 0.9;
[0143] Among them, the evaluation result is good, so it is judged as 1; the impact range is large, so it is judged as 0.7; and the recovery time is short, so it is judged as 0.1. Substituting these values into the reward function calculation formula, the reward value is 0.9. Since the value is too small, the reward function value is increased by a factor of 10 for easier calculation, so the final reward value is 9.
[0144] Q value update:
[0145] Q(2,0) = 0 + 0.1 [9+0.9 max(Q(1))-0]=0+0.1 (9+0.9) 0) = 0.9;
[0146] Since the Q table is pre-set to have Q values of 0 in all states, state 2 becomes state 1 after executing action 1. At this time, it is necessary to read the maximum Q value under state 1. The current iteration is the second round, but the Q value of state 1 in the previous iteration has not changed. All Q values under state 1 are 0, so max(Q(1))=0 in this round of iteration.
[0147] Update the Q value for state 2 as shown in Table 5.
[0148] Table 5: Q Table Updated for Status 2
[0149]
[0150] The two iterations described above are process iterations, and the Q-values for all states have not yet converged (convergence can be determined by various criteria, such as Q-value stability determination—by detecting whether the algorithm has reached the theoretical steady state by checking if the change in the update amount of the Q-function approaches zero). The Q-values for state 5 and state 2 are intermediate values, not final values. For example, in the next test, if action 0 is executed again when state 5 occurs, the Q(5,0) updated in the next round will be calculated by substituting the current Q(5,0) into the Q-value update formula. By iterating and training multiple times using the Q-value update method described above, the Q-table values converge iteratively, resulting in the final state-policy correspondence table shown in Table 6.
[0151] Table 6: Final State-Policy Mapping Table
[0152]
[0153] Ultimately, the recovery strategy with the highest Q value is selected as the optimal recovery strategy based on the actual conditions.
[0154] Step 120: Determine the current recovery strategy based on the current representation parameters of the video stream and the target hierarchical reset strategy library, so as to recover the current fault of the video stream through the current recovery strategy.
[0155] The current characterization parameters are multiple dimensions of parameters related to video stream failures. These current parameters include all possible parameters related to video stream failures, such as the video stream's operating parameters and basic configuration parameters.
[0156] The current characterization parameters are the current parameters of multiple dimensions of the real-time acquired video stream. These characterization parameters include categorical parameters, continuous parameters, and discrete parameters.
[0157] Specifically, the current characterization parameters of the video stream are obtained and input into the target hierarchical reset strategy library. If there is a fault in the current characterization parameters, since the target hierarchical reset strategy library is the optimal hierarchical reset strategy library, the corresponding video stream fault recovery strategy can be directly output through the target hierarchical reset strategy library. This can realize the provision of a corresponding recovery strategy for specific fault characterization parameters without resetting the entire link or the entire system, thereby greatly improving the speed of video stream fault recovery.
[0158] Figure 3 This is a schematic diagram of the overall process of a video stream fault recovery method provided in an embodiment of this application. For an example, please refer to [link to example]. Figure 3The overall implementation process of this video stream fault recovery method is as follows: First, multi-dimensional characterization parameters (including current and historical characterization parameters) are collected in real time. Then, controlled or actual interference is injected into the video stream to filter out characterization parameters and corresponding fault phenomena from the historical characterization parameters. Correlation analysis is performed on the characterization parameters and fault phenomena to filter out strongly correlated characterization parameters and corresponding fault phenomena, and the filtered strongly correlated characterization parameters are sorted according to their correlation magnitude. Next, an initial hierarchical reset strategy library is generated based on the strongly correlated characterization parameters and corresponding fault phenomena. Reinforcement learning is applied to the initial hierarchical reset strategy library, and the optimal hierarchical reset strategy library, i.e., the target hierarchical reset strategy library, is obtained based on the feedback results. Finally, the current characterization parameters are input into the target hierarchical reset strategy library, and the corresponding fault recovery strategy is output when a video stream fault occurs, without needing to reset the entire link or system, thereby improving the speed of video stream fault recovery.
[0159] Therefore, the technical solution provided in this application, through correlation analysis and ranking of multiple parameters and fault phenomena, designs an initial hierarchical reset strategy library, and obtains the optimal target hierarchical reset strategy library through dynamic strategy matching and parameter weight learning training. This enables the rapid selection of the optimal fault phenomenon recovery strategy based solely on changes or anomalies in the characterizing parameters when a video stream fault occurs. Correlation analysis helps to filter the parameters that best characterize the fault phenomenon from a large number of parameters. Strategy hierarchicalization helps to minimize the impact of recovery strategies and, by pre-classifying strategies, reduces the computational load of strategy optimization. The purpose of reinforcement learning is to converge to the optimal strategy and obtain the optimal solution for the recovery strategy. This leads to the optimal target hierarchical reset strategy library, thereby improving the speed of video stream fault recovery.
[0160] Figure 4 This is a schematic diagram of the structural principle of a video stream fault recovery system provided in this application embodiment. Correspondingly, this application embodiment also provides a video stream fault recovery system; please refer to [link to relevant documentation]. Figure 4 The video stream fault recovery system 100 includes: an acquisition module 101, used to acquire a target hierarchical reset strategy library, the target hierarchical reset strategy library being determined based on the historical characterization parameters of the video stream and a preset hierarchical reset strategy algorithm; a determination module 102, used to determine a current recovery strategy based on the current characterization parameters of the video stream and the target hierarchical reset strategy library; and a recovery module 103, used to recover the current fault of the video stream using the current recovery strategy.
[0161] In the technical solution of this application embodiment, a video stream fault recovery system is provided. A hierarchical reset strategy library is designed based on the historical characterization parameters of video stream faults. The fault recovery strategy required by the video stream is quickly determined according to the hierarchical reset strategy library. There is no need to reset the entire video stream link or the entire system to recover the fault, thereby shortening the fault recovery time and facilitating the rapid recovery of video stream faults.
[0162] In some embodiments, the acquisition module 101 is further configured to: determine a first characterization parameter and a corresponding first fault phenomenon based on historical characterization parameters, video stream, preset interference signal, and preset correlation analysis algorithm; wherein the correlation between the first characterization parameter and the corresponding first fault phenomenon satisfies a first preset correlation condition; and determine a target hierarchical reset strategy library based on the first characterization parameter, the first fault phenomenon, and a preset hierarchical reset strategy algorithm.
[0163] In some embodiments, the acquisition module 101 is further configured to: determine a target recovery strategy based on a first characterization parameter, a first fault phenomenon, a preset influence level, and a preset hierarchical reset strategy library; and determine a target hierarchical reset strategy library based on the target recovery strategy and a preset reinforcement learning algorithm.
[0164] In some embodiments, the acquisition module 101 is further configured to: determine the target influence level of the first characterization parameter according to the preset influence level; add the first characterization parameter and the corresponding first fault phenomenon that satisfy the second preset correlation condition in each target influence level to the preset hierarchical reset strategy library; and set all executable target recovery strategies for each target influence level.
[0165] In some embodiments, the acquisition module 101 is further configured to: perform reinforcement learning on the target recovery strategy of each target influence level according to a preset reinforcement learning algorithm until a preset convergence condition is met, and determine the target hierarchical reset strategy library.
[0166] In some embodiments, the acquisition module 101 is further configured to: apply the preset interference signal to the video stream to determine a second characterization parameter and a corresponding second fault phenomenon from historical characterization parameters; wherein, the second characterization parameter is a parameter in the historical characterization parameters that exhibits a fault phenomenon under the preset interference signal; the second fault phenomenon is all fault phenomena that exhibit under the preset interference signal; and determine a first characterization parameter and a first fault phenomenon based on the second characterization parameter, the second fault phenomenon, and a preset correlation analysis algorithm.
[0167] In some embodiments, the acquisition module 101 is further configured to: determine a preset correlation analysis algorithm based on the type of the second characterization parameter; determine the correlation between the second characterization parameter and the corresponding second fault phenomenon based on the preset correlation analysis algorithm; and determine the second characterization parameter and the second fault phenomenon whose correlation satisfies the first preset correlation condition as the first characterization parameter and the first fault phenomenon, respectively.
[0168] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Correspondingly, this application also provides an electronic device; please refer to [link / reference needed]. Figure 5 The electronic device includes 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 video stream fault recovery method described above. Since the video stream fault recovery method has been described in detail above, it will not be repeated here.
[0169] Accordingly, embodiments of this application also provide a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the above-described video stream fault recovery method. Since the video stream fault recovery method has been described in detail above, it will not be repeated here.
[0170] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0171] The video stream fault recovery method, system, device, and storage medium provided in the embodiments of this application have been described in detail above, and specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the technical solutions and core ideas of this application. Those skilled in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A video stream fault recovery method, characterized in that, include: A target hierarchical reset strategy library is obtained, which is determined based on the historical characterization parameters of the video stream and a preset hierarchical reset strategy algorithm. Based on the current characterization parameters of the video stream and the target hierarchical reset strategy library, a current recovery strategy is determined to recover the current fault of the video stream through the current recovery strategy; wherein, the current characterization parameters are the current parameters of multiple dimensions of the video stream collected in real time; The acquisition of the target hierarchical reset strategy library includes: The first characterization parameter and the corresponding first fault phenomenon are determined based on the historical characterization parameters, the video stream, the preset interference signal, and the preset correlation analysis algorithm; wherein the correlation between the first characterization parameter and the corresponding first fault phenomenon satisfies the first preset correlation condition. The target hierarchical reset strategy library is determined based on the first characterization parameter, the first fault phenomenon, and the preset hierarchical reset strategy algorithm. The preset correlation analysis algorithms include the chi-square test, point-bivariate correlation coefficient statistical method, logistic regression algorithm, Mann-Whitney U test, and Spearman rank correlation coefficient method. The first preset correlation condition includes: the correlation is significant; wherein the first characterization parameter and the corresponding first fault phenomenon are significantly correlated characterization parameter and fault phenomenon.
2. The video stream fault recovery method according to claim 1, characterized in that, The step of determining the target hierarchical reset strategy library based on the first characterization parameter, the first fault phenomenon, and the preset hierarchical reset strategy algorithm includes: The target recovery strategy is determined based on the first characterization parameter, the first fault phenomenon, the preset impact level, and the preset hierarchical reset strategy library. The target hierarchical reset strategy library is determined based on the target recovery strategy and the preset reinforcement learning algorithm.
3. The video stream fault recovery method according to claim 2, characterized in that, The step of determining the target recovery strategy based on the first characterization parameter, the first fault phenomenon, the preset impact level, and the preset hierarchical reset strategy library includes: The target influence level of the first characterization parameter is determined according to the preset influence level; Add the first characterization parameter and the corresponding first fault phenomenon that satisfy the second preset correlation condition in each of the target influence levels to the preset hierarchical reset strategy library; And set all executable target recovery strategies for each of the target impact levels.
4. The video stream fault recovery method according to claim 3, characterized in that, The step of determining the target hierarchical reset strategy library based on the target recovery strategy and a preset reinforcement learning algorithm includes: According to the preset reinforcement learning algorithm, the target recovery strategy of each target influence level is reinforced learning until the preset convergence condition is met, and then the target hierarchical reset strategy library is determined.
5. The video stream fault recovery method according to claim 1, characterized in that, The step of determining the first characterization parameter and the corresponding first fault phenomenon based on the historical characterization parameters, the video stream, the preset interference signal, and the preset correlation analysis algorithm includes: The preset interference signal is applied to the video stream to determine a second characterization parameter and a corresponding second fault phenomenon from the historical characterization parameters; wherein, the second characterization parameter is the parameter in the historical characterization parameters that shows a fault phenomenon under the preset interference signal; and the second fault phenomenon is all fault phenomena that show a fault phenomenon under the preset interference signal. The first characterization parameter and the corresponding first fault phenomenon are determined based on the second characterization parameter, the second fault phenomenon, and the preset correlation analysis algorithm.
6. The video stream fault recovery method according to claim 5, characterized in that, The step of determining the first characterization parameter and the corresponding first fault phenomenon based on the second characterization parameter, the second fault phenomenon, and the preset correlation analysis algorithm includes: The preset correlation analysis algorithm is determined based on the type of the second characterization parameter; The correlation between the second characterization parameter and the corresponding second fault phenomenon is determined according to the preset correlation analysis algorithm; The second characterization parameter and the second fault phenomenon that satisfy the first preset correlation condition are respectively determined as the first characterization parameter and the corresponding first fault phenomenon.
7. A video stream fault recovery system, characterized in that, include: The acquisition module is used to acquire a target hierarchical reset strategy library, which is determined based on the historical characterization parameters of the video stream and a preset hierarchical reset strategy algorithm. The determination module is used to determine the current recovery strategy based on the current characterization parameters of the video stream and the target hierarchical reset strategy library; A recovery module is used to recover the current fault of the video stream through the current recovery strategy; wherein, the current characterization parameters are the current parameters of multiple dimensions of the video stream acquired in real time; The acquisition module is further configured to: The first characterization parameter and the corresponding first fault phenomenon are determined based on the historical characterization parameters, the video stream, the preset interference signal, and the preset correlation analysis algorithm; wherein the correlation between the first characterization parameter and the corresponding first fault phenomenon satisfies the first preset correlation condition. The target hierarchical reset strategy library is determined based on the first characterization parameter, the first fault phenomenon, and the preset hierarchical reset strategy algorithm. The preset correlation analysis algorithms include the chi-square test, point-bivariate correlation coefficient statistical method, logistic regression algorithm, Mann-Whitney U test, and Spearman rank correlation coefficient method. The first preset correlation condition includes: the correlation is significant; wherein the first characterization parameter and the corresponding first fault phenomenon are significantly correlated characterization parameter and fault phenomenon.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the video stream fault recovery method as described in any one of claims 1-6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the video stream fault recovery method as described in any one of claims 1-6.
Citation Information
Patent Citations
Intelligent automobile automatic driving fault diagnosis method and system
CN119937519A