LSTM computational precision asymptotic scheduling method, apparatus and electronic equipment

By dynamically dividing the fluctuation phase in LSTM and gradually switching the calculation precision, the problem of excessive power consumption in embedded navigation chips is solved, and more efficient computing resource management is achieved.

CN121209686BActive Publication Date: 2026-04-03CHANGSHA HAIGE BEIDOU INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-26
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing LSTMs consume too much power when running in embedded navigation chips and cannot flexibly switch accuracy according to the task status, resulting in overcomputation or energy waste.

Method used

By calculating the rate of change of the characteristic sequence of the sliding window sequence and the amplitude of the internal state change of the LSTM, the fluctuation stage is dynamically divided, and the calculation precision is gradually switched, gradually reducing the calculation precision from the initial stage to the steady state stage.

Benefits of technology

It effectively reduces the power consumption of navigation chips, improves the flexibility and adaptability of computing, and reduces unnecessary consumption of computing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121209686B_ABST
    Figure CN121209686B_ABST
Patent Text Reader

Abstract

This application provides a method, apparatus, and electronic device for progressively scheduling LSTM computation accuracy, belonging to the field of LSTM state computation technology. The method includes: acquiring navigation system input data and the internal states of the LSTM in the current frame and the previous frame; calculating the sliding window change rate based on the feature sequence of the sliding window sequence, and calculating the change magnitude of the LSTM internal state between the current frame and the previous frame; the sliding window sequence is a sequence obtained by expanding the navigation system input data into a sliding window along the time dimension; determining the fluctuation stage of the current input state of the LSTM inference model based on the sliding window change rate and the change magnitude of the LSTM internal state; and gradually switching the LSTM computation accuracy of the current frame based on the trend of the state fluctuation degree in the fluctuation stage. This application's solution can reduce the power consumption of navigation chips.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of LSTM state computation technology, and specifically to an LSTM computation accuracy asymptotic scheduling method, apparatus, electronic device, and computer-readable storage medium. Background Technology

[0002] In recent years, LSTM (Long Short-Term Memory) networks, as a type of temporal neural network with state memory capabilities, have been gradually introduced into the anti-jamming chip architecture of GNSS (Global Navigation Satellite System) to undertake tasks such as modeling the jamming evolution process and predicting short-term trends.

[0003] However, LSTM structures are computationally complex, containing multiple gating paths, state transition paths, and high-precision matrix multiplication and addition operations. Common implementations rely on floating-point units (such as FP32 and FP16) to maintain state precision. Directly running a full-precision LSTM in embedded navigation chips results in excessively high power consumption.

[0004] Therefore, how to reduce the power consumption of navigation chips remains an unsolved problem. Summary of the Invention

[0005] The purpose of this application is to provide an LSTM computational precision asymptotic scheduling method, apparatus, electronic device, and computer-readable storage medium, which can solve the problem of excessive power consumption in existing navigation chips.

[0006] In a first aspect, embodiments of this application provide an asymptotic scheduling method for LSTM computation accuracy, the method comprising:

[0007] Acquire navigation system input data, as well as the internal state of the LSTM in the current frame and the previous frame;

[0008] The sliding window change rate is calculated based on the feature sequence of the sliding window sequence, and the change magnitude of the LSTM internal state between the current frame and the previous frame is calculated; the sliding window sequence is the sequence obtained by sliding windowing the navigation system input data in the time dimension.

[0009] Based on the sliding window change rate and the change amplitude of the internal state of the LSTM, the fluctuation stage of the current input state of the LSTM inference model is determined;

[0010] Based on the trend of state fluctuation in the fluctuation phase, the LSTM calculation precision of the current frame is gradually switched.

[0011] In one possible implementation of the first aspect, the fluctuation phase includes: an initial phase, a gradually changing phase, and a steady-state phase; the LSTM internal states include: Cell states and Hidden states; based on the sliding window rate of change and the magnitude of change in the LSTM internal states, the fluctuation phase of the current input state of the LSTM inference model is determined, including:

[0012] If the sliding window change rate is greater than the first preset sliding window change rate threshold, and the change amplitude of the Cell state and / or Hidden state is greater than the first preset change amplitude threshold, and this condition is met for several consecutive frames, then the fluctuation phase of the current input state is the initial phase.

[0013] If the sliding window change rate is less than or equal to the first preset sliding window change rate threshold and greater than or equal to the second preset sliding window change rate threshold, and the change amplitude of the Cell state and / or Hidden state is less than or equal to the first preset change amplitude threshold and greater than zero, and this condition is met continuously for several frames, then the fluctuation phase of the current input state is the gradual change phase.

[0014] If the sliding window change rate is less than the second preset sliding window change rate threshold, and the change amplitude of the Cell state and / or Hidden state approaches zero, and this condition is met for several consecutive frames, then the fluctuation phase of the current input state is the steady state phase.

[0015] In one possible implementation of the first aspect, the LSTM computation accuracy includes at least three levels, and the state fluctuation degree of each fluctuation stage includes one or more intervals, each interval corresponding to one or more LSTM computation accuracy levels; based on the trend of the state fluctuation degree of the fluctuation stage, the LSTM computation accuracy of the current frame is gradually switched, including:

[0016] Based on the range of state fluctuations in the initial stage, the LSTM computation accuracy of the current frame is initialized to the corresponding level of LSTM computation accuracy; based on the range of state fluctuations in the gradual change stage, the LSTM computation accuracy of the current frame is switched to the corresponding level of LSTM computation accuracy; based on the range of state fluctuations in the steady-state stage, the LSTM computation accuracy of the current frame is switched to the corresponding level of LSTM computation accuracy; wherein, the trend of state fluctuations from the initial stage to the gradual change stage to the steady-state stage is a gradual decrease.

[0017] In one possible implementation of the first aspect, the method further includes:

[0018] Based on the inference path corresponding to the LSTM calculation precision of the current frame, perform LSTM inference.

[0019] In one possible implementation of the first aspect, the method further includes:

[0020] When performing LSTM inference based on the inference path corresponding to a certain level of LSTM computational accuracy, if the current state fluctuation jumps to the previous interval, the inference path is rolled back to the inference path corresponding to the previous level of LSTM computational accuracy, and the inference path is reactivated.

[0021] In one possible implementation of the first aspect, the method further includes:

[0022] The LSTM calculation precision of the current frame is locked according to the preset precision locking threshold; when the locked LSTM calculation precision meets the lock release condition, the lock is released.

[0023] In one possible implementation of the first aspect, the step of gradually switching the LSTM computation accuracy of the current frame based on the trend of the state fluctuation degree of the fluctuation phase is performed at the boundary of the LSTM inference cycle or the multi-task scheduling safety window.

[0024] Secondly, embodiments of this application provide an LSTM computational accuracy asymptotic scheduling device, the device comprising:

[0025] The acquisition unit is used to acquire navigation system input data, as well as the internal state of the LSTM in the current frame and the previous frame;

[0026] The computation unit is used to calculate the sliding window change rate based on the feature sequence of the sliding window sequence, and to calculate the change magnitude of the LSTM internal state between the current frame and the previous frame; the sliding window sequence is a sequence obtained by sliding windowing the navigation system input data in the time dimension;

[0027] The determination unit is used to determine the fluctuation stage of the current input state of the LSTM inference model based on the sliding window change rate and the change magnitude of the internal state of the LSTM.

[0028] The switching unit is used to gradually switch the LSTM calculation precision of the current frame based on the trend of state fluctuation in the fluctuation phase.

[0029] Thirdly, embodiments of this application provide 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 LSTM computational precision asymptotic scheduling method of any of the first aspects described above.

[0030] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the LSTM computation accuracy asymptotic scheduling method described in any of the first aspects above.

[0031] Fifthly, embodiments of this application provide a computer program product that, when run on an electronic device, causes the electronic device to execute the LSTM computation accuracy asymptotic scheduling method of any one of the first aspects described above.

[0032] The proposed solution first calculates the sliding window change rate based on the feature sequence of the sliding window sequence (obtained by expanding the navigation system input data in the time dimension), and calculates the change amplitude of the LSTM internal state between the current frame and the previous frame. Then, based on the sliding window change rate and the change amplitude of the LSTM internal state, it determines which fluctuation stage the current model input state belongs to. Finally, based on the trend of the fluctuation degree of the fluctuation stage, it gradually switches the LSTM calculation accuracy of the current frame.

[0033] The proposed solution does not directly run a full-precision LSTM, but gradually switches the LSTM calculation precision according to the degree of state fluctuation, thereby reducing the power consumption of the navigation chip and having strong ease of use and practicality.

[0034] Other features and advantages of this application will be described in detail in the following detailed description section. Attached Figure Description

[0035] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the 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.

[0036] Figure 1 This is a schematic diagram of the steps of the LSTM computational precision asymptotic scheduling method provided in the embodiments of this application;

[0037] Figure 2 This is a schematic diagram of the structure of the LSTM precision progressive scheduling control system provided in the embodiments of this application;

[0038] Figure 3 This is a schematic diagram of the LSTM accuracy level switching process provided in the embodiments of this application;

[0039] Figure 4 This is a schematic diagram illustrating the relationship between the interference change stages and precision scheduling provided in an embodiment of this application;

[0040] Figure 5 This is a schematic diagram of the multi-precision LSTM execution path structure provided in the embodiments of this application;

[0041] Figure 6 This is a schematic diagram of the LSTM computational accuracy asymptotic scheduling device provided in the embodiments of this application;

[0042] Figure 7 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0043] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application can also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0044] It should be understood that, when used in this specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or photovoltaic modules, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, photovoltaic modules and / or combinations thereof.

[0045] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0046] It should also be further understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0047] As used in this specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if [the described condition or event] is detected" may be interpreted, depending on the context, as "once determined," "in response to determination," "once [the described condition or event] is detected," or "in response to detection of [the described condition or event]."

[0048] Furthermore, in the description of this application, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0049] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in some other embodiments," "in other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0050] In recent years, LSTM, as a temporal neural network with state memory capabilities, has been gradually introduced into the architecture of GNSS anti-jamming chips, undertaking tasks such as modeling the interference evolution process and predicting short-term trends. LSTM can serialize and model the characteristics of the signal energy sequence, pseudorange residuals, and spectral sliding windows of the receiver input, extracting the "dynamic patterns" of interference behavior from them, and assisting the navigation system in realizing intelligent decision-making functions such as interference prediction, defense scheduling, path selection, or module switching.

[0051] However, LSTM structures are computationally complex, containing multiple gating paths, state transition paths, and high-precision matrix multiplication and addition operations. Common implementations rely on floating-point units (such as FP32 and FP16) to maintain state accuracy. Directly running a full-precision LSTM in an embedded GNSS chip will introduce the following bottlenecks:

[0052] (1) Excessive power consumption: The power consumption of high-precision inference paths (especially FP32) is much higher than that of fixed-point paths, which seriously affects the overall energy consumption control of navigation chips; (2) Large storage and bandwidth burden: High-precision models require larger cache and bus width, resulting in high resource pressure; (3) Limited real-time performance: Full-precision execution path calculation takes a long time, making it difficult to meet the millisecond-level signal response requirements; (4) Rigid and unadjustable precision: The precision of traditional LSTM models is fixed during operation and cannot be flexibly switched with the task state, resulting in "over-computation" or "unnecessary waste".

[0053] To alleviate the aforementioned problems, existing research has attempted to introduce strategies such as Quantization-Aware Training (QAT), Post-training Quantization, and mixed-precision deployment to compress the LSTM computation bit width to INT8, INT4, or even lower precision. However, existing low-precision LSTM inference models still suffer from the following significant drawbacks:

[0054] (1) During the period of sudden interference (e.g., interference outbreak or the initial stage of interference switching), the LSTM state changes drastically, and low-precision inference is prone to gradient vanishing or state instability, causing prediction drift; (2) During the period of stable interference (e.g., the background of continuous amplitude modulation interference), even if high precision is maintained, the result quality will not be significantly improved, resulting in wasted power consumption; (3) The current mainstream precision control mechanism is "static setting" or "determined during training", lacking "dynamic switching mechanism during runtime"; (4) It is impossible to adjust the precision level in a timely manner according to the actual inference task or model state, lacking adaptive capability.

[0055] The following technical problems exist when existing LSTM inference models are run in embedded navigation chips:

[0056] (1) High power consumption due to full precision execution: The power consumption of high precision inference path (especially FP32) is much higher than that of fixed point path, which seriously affects the overall power consumption control of navigation chip; (2) Static precision is difficult to adapt to changes in task state: The precision of traditional LSTM inference model is fixed during operation and cannot be flexibly switched with the task state, resulting in "over-computation" or "unnecessary waste"; (3) Lack of coordinated control between interference modeling precision and power consumption: The degree of interference fluctuation and the inference path are not matched. For example, high precision inference path is still used in the stable stage, which seriously affects the overall power consumption control of navigation chip.

[0057] To address the aforementioned shortcomings, this application provides an LSTM computation accuracy progressive scheduling method. First, the sliding window change rate is calculated based on the feature sequence of the sliding window sequence (obtained by expanding the navigation system input data into a sliding window in the time dimension), and the change amplitude of the LSTM internal state between the current frame and the previous frame is calculated. Then, based on the sliding window change rate and the change amplitude of the LSTM internal state, the fluctuation stage to which the current model input state belongs is determined. Finally, the LSTM computation accuracy of the current frame is gradually switched based on the trend of the fluctuation degree of the fluctuation stage.

[0058] The proposed solution does not directly run a full-precision LSTM, but gradually switches the LSTM calculation precision according to the degree of state fluctuation, thereby reducing the power consumption of the navigation chip and having strong ease of use and practicality.

[0059] The specific process implemented in this application is described below through specific embodiments.

[0060] Please see Figure 1 , Figure 1 This is a schematic diagram illustrating the steps of the LSTM computational precision asymptotic scheduling method provided in the embodiments of this application. For example... Figure 1 As shown, the method includes the following steps:

[0061] S101, acquire navigation system input data, as well as the LSTM internal state of the current frame and the previous frame.

[0062] In one embodiment, this application can be applied to tasks such as GNSS interference memory modeling. The navigation system input data originates from GNSS input data sources, such as pseudorange residuals, signal energy, and spectral feature maps. The internal state of the LSTM includes Cell states and Hidden states.

[0063] S102, calculate the sliding window change rate based on the feature sequence of the sliding window sequence, and calculate the change magnitude of the LSTM internal state between the current frame and the previous frame; the sliding window sequence is the sequence obtained by sliding window expansion of the navigation system input data in the time dimension.

[0064] In one embodiment, temporal variability analysis is performed on GNSS input data such as pseudorange residuals, signal energy, and spectral feature maps. The GNSS input data is expanded into a sliding window over the time dimension to obtain a sliding window sequence, and the sequence (feature sequence) over a certain period is extracted. Within the sliding window, the sliding window change rate is calculated using algorithms such as the variance method, the maximum difference method, and the mean change rate method; the sliding window change rate is a statistical measure.

[0065] In one embodiment, the sliding window sequence is: The formula for calculating variance is as follows:

[0066]

[0067] in, Indicates the rate of change of the sliding window. t Indicates time, i Represents ordinal numbers. N This indicates the number of GNSS input signals within the sliding window. x Indicates the GNSS input signal. This represents the average value of the GNSS input signal within the sliding window. The GNSS input signal can be either pseudorange or carrier phase.

[0068] In one embodiment, the calculation formula for the maximum difference method is as follows:

[0069]

[0070] in, max Indicates the maximum value. min This represents the minimum value.

[0071] It should be noted that the difference value is calculated using the maximum difference method. The amplitude range is obtained by subtracting the maximum and minimum values ​​of the GNSS input signal within the sliding window; a larger value indicates more severe fluctuations.

[0072] In one embodiment, the mean change rate can be understood as the arithmetic mean of the change rates of each channel, but this is only one strategy. The mean change rate can be calculated on a single-channel basis and then weighted, or the difference ratio of the overall mean of the multi-channel input sequence can be directly calculated.

[0073] In one embodiment, the magnitude of the change in Cell state c(t) is: The magnitude of the change in the hidden state h(t) is .

[0074] S103, based on the sliding window change rate and the change amplitude of the internal state of the LSTM, determine the fluctuation stage of the current input state of the LSTM inference model.

[0075] In one embodiment, an LSTM state fluctuation detection mechanism is constructed. Based on the sliding window change rate and the change magnitude of Cell state and Hidden state, the model input state is divided into an initial stage (aggressive phase), a gradual change stage (gradual change phase), and a steady-state stage (steady-state phase), which serve as the basis for precision scheduling triggering.

[0076] It should be noted that the model input state is divided into three stages (aggressive phase, gradual phase, and steady-state phase) based on the sliding window rate of change and the magnitude of changes in the internal state of the LSTM. This not only utilizes the statistical volatility of externally observed signals but also introduces the model's own memory dynamics, resulting in more robust judgments.

[0077] The three phases are as follows: **Agitation Phase:** Both input and internal state fluctuate significantly, requiring high-precision calculation / updates; **Gradual Change Phase:** Input changes to some extent, but the magnitude is small, allowing for a moderate reduction in precision or update frequency; **Steady-State Phase:** Input and internal state are stable, triggering state freezing and low-precision operation.

[0078] According to one embodiment of this application, the fluctuation stage of the current input state of the LSTM inference model is determined based on the sliding window change rate and the change amplitude of the internal state of the LSTM, including:

[0079] If the sliding window change rate is greater than the first preset sliding window change rate threshold, and the change amplitude of the Cell state and / or Hidden state is greater than the first preset change amplitude threshold, and this condition is met for several consecutive frames, then the fluctuation phase of the current input state is the initial phase.

[0080] If the sliding window change rate is less than or equal to the first preset sliding window change rate threshold and greater than or equal to the second preset sliding window change rate threshold, and the change amplitude of the Cell state and / or Hidden state is less than or equal to the first preset change amplitude threshold and greater than zero, and this condition is met continuously for several frames, then the fluctuation phase of the current input state is the gradual change phase.

[0081] If the sliding window change rate is less than the second preset sliding window change rate threshold, and the change amplitude of the Cell state and / or Hidden state approaches zero, and this condition is met for several consecutive frames, then the fluctuation phase of the current input state is the steady state phase.

[0082] In one embodiment, the first preset sliding window change rate threshold is denoted as T1, the second preset sliding window change rate threshold is denoted as T2, and the first preset change amplitude threshold is denoted as S1.

[0083] It should be noted that Δc(t) and Δh(t) typically only need to satisfy one of the decision conditions (e.g., 0 < Δc(t) ≤ S1, or 0 < Δh(t) ≤ S1, and this condition is maintained for K frames) to determine the fluctuation stage (e.g., a gradual change stage) of the current input state, in conjunction with the sliding window rate of change. It is not mandatory for Δc(t) and Δh(t) to simultaneously satisfy the decision conditions, because their sensitivities to memory units and outputs differ; being overly stringent would reduce the decision sensitivity.

[0084] It should be noted that, whether at the very beginning (cold start / initial stage) or after entering a steady state, the judgment condition needs to be met for K consecutive frames to avoid misjudgment due to instantaneous fluctuations. The size of K can be configured according to the specific situation in the actual application scenario (e.g., 5~10 frames), which is equivalent to a time smoothing window.

[0085] S104, based on the trend of state fluctuation in the fluctuation phase, gradually switch the LSTM calculation precision of the current frame.

[0086] According to one embodiment of this application, the LSTM computation accuracy includes at least three levels, and the state fluctuation degree of each fluctuation stage includes one or more intervals, with each interval corresponding to one or more LSTM computation accuracy levels. Based on the trend of state fluctuation degree in each fluctuation stage, the LSTM computation accuracy of the current frame is gradually switched, including:

[0087] Based on the range of state fluctuations in the initial stage, the LSTM computation accuracy of the current frame is initialized to the corresponding level of LSTM computation accuracy; based on the range of state fluctuations in the gradual change stage, the LSTM computation accuracy of the current frame is switched to the corresponding level of LSTM computation accuracy; based on the range of state fluctuations in the steady-state stage, the LSTM computation accuracy of the current frame is switched to the corresponding level of LSTM computation accuracy; wherein, the trend of state fluctuations from the initial stage to the gradual change stage to the steady-state stage is a gradual decrease.

[0088] In one embodiment, the LSTM calculation precision of the current frame is switched based on the adjacent intervals of the state fluctuation degree of each fluctuation phase and the LSTM calculation precision of the previous frame. If the state fluctuation degree of each fluctuation phase has only one interval, then the intervals of the state fluctuation degree of the initial phase, the gradual change phase, and the steady state phase are adjacent.

[0089] Among them, the degree of state fluctuation in the initial stage is greater than the first preset state fluctuation threshold; the second preset state fluctuation threshold is less than or equal to the degree of state fluctuation in the gradual change stage and less than or equal to the first preset state fluctuation threshold; and 0 is less than or equal to the degree of state fluctuation in the steady state stage and less than or equal to the second preset state fluctuation threshold.

[0090] In another embodiment, if the state fluctuation degree of each fluctuation stage has multiple intervals, then the intervals of the state fluctuation degree of each fluctuation stage are adjacent, the last interval of the initial stage is adjacent to the first interval of the gradual change stage, and the last interval of the gradual change stage is adjacent to the first interval of the steady state stage.

[0091] In one embodiment, a multi-level precision scheduler is designed, setting at least three LSTM computation precision levels (e.g., FP16, INT8, INT4). The computation precision used for the current frame is dynamically selected based on the input state and model state.

[0092] In one embodiment, if the degree of state fluctuation in each fluctuation stage has only one range, and each range corresponds to a precision level, the three precision levels correspond to the three fluctuation stages respectively: the most direct mapping, that is, the abrupt change period corresponds to high precision (such as FP16), the gradual change period corresponds to medium precision (such as INT8), and the steady state period corresponds to low precision (such as INT4).

[0093] Accordingly, based on the range of state fluctuations during the abrupt change period, the LSTM computation precision of the current frame is initialized to FP16; based on the range of state fluctuations during the gradual change period, FP16 is switched to INT8; and based on the range of state fluctuations during the steady-state period, INT8 is switched to INT4.

[0094] In another embodiment, when there are more than 3 accuracy levels, the degree of state fluctuation in each fluctuation stage can be divided into an interval, and the accuracy level can be further subdivided within a certain fluctuation stage. For example, abrupt change period: FP32 / FP16; gradual change period: INT8 / INT6; steady state period: INT4 / INT2.

[0095] Accordingly, based on the range of state fluctuations during the abrupt change period, the LSTM computation precision of the current frame is initialized to FP32 or FP16; based on the range of state fluctuations during the gradual change period, FP32 or FP16 is switched to INT8 or INT6; based on the range of state fluctuations during the steady-state period, INT8 or INT6 is switched to INT4 or INT2.

[0096] In another embodiment, threshold binning can be used to divide the numerical range of the sliding window change rate and the change amplitude of the LSTM internal state into several intervals, with each interval mapping to a precision level. It should be noted that the state fluctuation level is a general description of the sliding window change rate and the change amplitude of the LSTM internal state. For example, if the state fluctuation level is greater than a first preset state fluctuation level threshold, then the sliding window change rate is greater than a first preset sliding window change rate threshold, and the change amplitude of the LSTM internal state is greater than a first preset change amplitude threshold.

[0097] In one embodiment, the input state refers to the volatility determined by statistical indicators such as variance, rate of change of mean, and maximum difference after constructing a sliding window for the GNSS input sequence (e.g., pseudorange residuals, signal energy, spectral feature sequences, etc.). The model state refers to the Cell state c(t) and Hidden state h(t) within the LSTM, and their variation amplitude reflects the dynamics of network memory and output.

[0098] In one embodiment, the model input state can be determined into three stages based on a combination of input signal volatility and model internal state volatility: abrupt change, gradual change, and steady state. Task state can be understood as an external application-layer definition, such as normal navigation, navigation degradation, or severe interference. The model input state is closer to the algorithm's internal control criteria than the task state at the business level.

[0099] In one embodiment, the computational precision used in the current frame is dynamically selected based on the fluctuation stage of the model input state. The specific process is as follows: detect the sliding window change rate of the input signal (external signal), and detect the change amplitude of the internal state (c(t), h(t)) of the LSTM; comprehensively determine which fluctuation stage (aggressive period / gradual change period / steady state) the current model input state belongs to; the precision scheduler selects the corresponding precision level (e.g., FP16 / INT8 / INT4) according to the fluctuation stage.

[0100] According to one embodiment of this application, the method further includes: performing LSTM inference based on the inference path corresponding to the LSTM calculation precision of the current frame.

[0101] In one embodiment, each level corresponds to a set of sub-inference paths, involving MAC (Multiply-Accumulate) structures, activation functions, and register channels.

[0102] According to one embodiment of this application, the method further includes: when performing LSTM inference based on an inference path corresponding to a certain level of LSTM computational accuracy, if the current state fluctuation level jumps to the previous interval, the inference path is rolled back to the inference path corresponding to the previous level of LSTM computational accuracy, and the inference path is reactivated.

[0103] In one embodiment, when performing LSTM inference with an INT8 precision inference path, if the sliding window change rate is greater than a first preset sliding window change rate threshold, and the change amplitude of the Cell state and / or Hidden state is greater than a first preset change amplitude threshold, and this condition is met for several consecutive frames, then INT8 is switched to FP16, the inference path is rolled back to the FP16 precision path, and the FP16 precision path is reactivated.

[0104] In another embodiment, when performing LSTM inference with the INT4 precision inference path, if the sliding window change rate is less than or equal to the first preset sliding window change rate threshold and greater than or equal to the second preset sliding window change rate threshold, and the change amplitude of the Cell state and / or Hidden state is less than or equal to the first preset change amplitude threshold and greater than zero, and this condition is met continuously for several frames, then INT4 is switched to INT8, the inference path is rolled back to the INT8 precision path, and the INT8 precision path is reactivated.

[0105] It should be noted that the accuracy path rollback process can also be described based on the degree of state fluctuation. The correspondence between the degree of state fluctuation and the sliding window change rate and the change amplitude of the internal state of the LSTM has been described in the above embodiments and will not be repeated here.

[0106] According to one embodiment of this application, the method further includes: locking the LSTM calculation precision of the current frame according to a preset precision locking threshold; and unlocking the LSTM calculation precision when the locked precision meets the lock release condition.

[0107] In one embodiment, the preset precision lock threshold can be set with an upper threshold (triggering high precision lock) and a lower threshold (unlocking), and combined with the number of consecutive frames to avoid jitter. The thresholds are the sliding window change rate threshold and the threshold for the change amplitude of the LSTM's internal state.

[0108] In one embodiment, the lock release condition is: N consecutive frames less than the lower threshold, and basic quality recovery conditions are met (e.g., C / N0 (signal-to-noise ratio, carrier-to-noise ratio) recovery, positioning accuracy meeting the standard, etc.), then the lock can be released.

[0109] According to one embodiment of this application, the step of gradually switching the LSTM computation accuracy of the current frame based on the trend of state fluctuation in the fluctuation phase is executed at the boundary of the LSTM inference cycle or the multi-task scheduling safety window, which can ensure the continuity of the model state.

[0110] According to one embodiment of this application, a precision switching and execution control mechanism is implemented: all precision levels use a unified instruction structure, supporting seamless switching during runtime; the precision switching controller supports hardware and software collaborative triggering (state-driven + interrupt-driven); the switching point can be implemented at the boundary of the inference cycle or in the multi-task scheduling safety window to ensure the continuity of the model state; the precision change instruction can be written to the control register or dynamically initiated by the TFLite (TensorFlow Lite, a deep learning inference framework) Micro Delegate interface.

[0111] According to one embodiment of this application, a configurable parameter interface is provided, which supports configuration of: the minimum precision level corresponding to each type of state; the number of frames to switch the smoothing window; a whitelist of task IDs to prohibit precision reduction; precision lock threshold and release conditions; and policy groups that can be dynamically issued by the main control MCU (Microcontroller Unit) according to the task characteristics.

[0112] Please see Figure 2 , Figure 2 This is a schematic diagram of the LSTM precision progressive scheduling control system provided in an embodiment of this application. Figure 2 As shown, the system includes: an LSTM state fluctuation analyzer, an input fluctuation monitoring module, a precision switching controller, and a multi-precision LSTM execution path module.

[0113] In one embodiment, the LSTM state fluctuation analyzer is used to calculate Δc(t) and Δh(t); the input fluctuation monitoring module is used for sliding window rate of change analysis and disturbance level judgment; the precision switching controller is used for state switching judgment and current precision level management; the multi-precision LSTM execution path module is used to perform inference based on FP16, INT8 or INT4 execution paths and call the calculation unit according to instructions; finally, the LSTM output result is the state / inference value.

[0114] According to one embodiment of this application, the application background and task input are as follows: LSTM is used to model and memorize the interference state feature sequence input to a GNSS receiver. Typical inputs include, but are not limited to: sliding window spectral energy distribution (FFT (fast Fourier transform) result); time-domain signal envelope change (RSSI (Received Signal Strength Indicator) sliding window); sliding window pseudorange residuals and filter front-end noise indicators; GNSS channel status codes or modulation symbol error rates, etc. The input vector dimension of each frame is D=832, and the sliding window length is N=510, forming a time-series feature matrix mathbf[X]{t-N+1:t}.

[0115] In one embodiment, the objective is to identify whether a persistent interference state exists and predict whether the interference has entered a burst state or a stable state, thereby assisting the navigation chip in adjusting the antenna array, shielding the channel, or adjusting the measurement strategy.

[0116] According to one embodiment of this application, high-precision inference is initiated in the initial stage (interference mutation period). In the stage where interference has just occurred and feature mutations are frequent, the system detects that: the sliding window change rate R(t) > T1, and Δc(t) and / or Δh(t) > S1, and this condition is met continuously for K frames; the LSTM output prediction confidence fluctuates highly, and the prediction output is non-stationary.

[0117] At this point, the system initializes the precision switching controller to the highest precision level (e.g., FP16), and all matrix operations and state writes maintain a high dynamic range to ensure state transition accuracy and model stability. This phase typically lasts 5-20 frames, specifically controlled by the input fluctuation threshold determination module.

[0118] According to one embodiment of this application, the system switches to a medium-precision path during the gradual change phase (stable modeling period or stable memory period). When the system detects that the sliding window rate of change decreases frame by frame (T2≤R(t)≤T1), and the amplitude of model state change (state fluctuation amplitude) tends to stabilize (0<Δc(t) and / or Δh(t)≤S1), and this condition is met for K consecutive frames, and the confidence level of the LSTM output increases, the system enters the gradual change state.

[0119] At this point, the precision switching controller will automatically issue a command to switch to the INT8 precision path: using the INT8 bit width to perform LSTM gated path operations and activation; maintaining multiply-accumulate precision in the Q7.8 ~ Q5.10 range; saving more than 50% of power consumption and bandwidth compared to the FP16 path. This stage is suitable for scenarios where the model memory structure gradually stabilizes and the speed of disturbance evolution slows down.

[0120] According to one embodiment of this application, the system switches to a low-precision energy-saving path during the steady-state phase (background phase). When the system detects that: the sliding window change rate R(t) < T2, and the change amplitude of the internal state of the LSTM approaches 0 (Δc(t) and / or Δh(t) approaches 0), and continuously satisfies K frames; the output result is stable (e.g., the predicted interference-free probability is continuously higher than a preset threshold).

[0121] At this point, the precision switching controller will trigger a "low precision degradability decision" and switch to the INT4 path (4-bit quantization) at the inference cycle boundary: the computation path performs low-width multiplication and addition; the activation function can use a lookup table or approximation; significantly reducing the pressure on registers, memory, and the bus. This stage is suitable for interference-free states or static interference background segments.

[0122] According to one embodiment of this application, precision recovery and multiple switching control are performed. If, during the operation of INT8 or INT4, a sudden and drastic fluctuation in the input state is detected, or a significant change in the internal state output of the LSTM is observed (interference flag or mode change appears), the precision switching controller automatically rolls back the precision path and reactivates the FP16 or INT8 path.

[0123] In one embodiment, during the INT8 stage, a sudden and drastic fluctuation in the input state occurs when the sliding window change rate is detected to exceed the threshold T1 again and persists for a certain number of frames (to avoid jitter), indicating that the input state has re-entered the "abrupt period".

[0124] In one embodiment, during the INT8 phase, a significant change in the LSTM's internal state output occurs when the magnitude of the change in the LSTM's internal state again exceeds a threshold, i.e., Δc(t) and / or Δh(t) > S1 (it can be triggered if only one threshold is exceeded, rather than both exceeding the threshold). This is used to determine that the network memory is no longer stable and that higher precision calculations are needed to meet the dynamic change requirements.

[0125] In one embodiment, common GNSS interference monitoring indicators include: sudden drop in C / N0 (signal-to-noise ratio of multiple satellites drops by more than X dB), tracking loop unlock (loss-of-lock indicator), sudden increase in pseudorange residual (root mean square of residual exceeds the threshold), sudden increase in spectrum energy (FFT energy surges in certain frequency bands), J / S (interference-to-signal ratio) exceeding the warning value, and alarm bits triggered by anti-interference modules (e.g., alarms issued by null-steering arrays).

[0126] In one embodiment, "mode" in "mode change" refers to the system operating mode or environmental state mode, such as: interference mode for normal tracking (the system detects the entry of interference); acquisition mode for steady-state tracking (requiring full-power search); transition from low-dynamic to high-dynamic scenarios (abrupt changes in motion state); signal mode switching: such as switching from L1-only to L1+L5, or switching tracking loop mode under weak / strong signal interference. These mode changes all imply increased system complexity, requiring a return to higher precision (e.g., FP16 / INT8) to ensure robustness.

[0127] According to one embodiment of this application, in order to avoid frequent switching causing model instability, the following configuration is made: (1) Switching protection window: freeze N frames after each round of switching; (2) Rollback delay counter: avoid occasional erroneous fluctuations triggering erroneous accuracy increases or decreases; (3) Minimum accuracy locking mechanism: the master controller can lock the current accuracy level and no longer adjust it.

[0128] Please see Figure 3 , Figure 3 This is a schematic diagram of the LSTM accuracy level switching process provided in an embodiment of this application. The diagram illustrates the correspondence between the input state fluctuation level and the path accuracy level switching in the form of a state machine. The process includes the following steps:

[0129] (1) Initialization, FP16 is used by default;

[0130] (2) Input change rate (sliding window change rate) detection;

[0131] (3) If the state fluctuation is high, then under the current state, the precision = FP16;

[0132] (4) If the state fluctuation is moderate, the precision is switched to INT8;

[0133] (5) If the state is stable and the number of stable frames is ≥ N, then the precision is switched to INT4.

[0134] In one embodiment, if any sudden increase in fluctuation occurs when the state fluctuation is moderate or the state is stable, the accuracy switches to FP16.

[0135] In one embodiment, the accuracy level is scheduled to have three levels: FP16, INT8, and INT4; the number of frames in which the state remains stable (e.g., N=5) is used to determine whether to enter a low-precision state; the accuracy of each frame can be adjusted to ensure timely revert to a high-precision state when the state changes.

[0136] It should be noted that, Figure 3In the input change rate detection, if the state fluctuation / interference fluctuation is high, enter the judgment branch, and then switch FP16, INT8, INT4. The judgment is based on the degree of fluctuation of the input state (sliding window change rate), and does not include the fluctuation amplitude Δc(t) and Δh(t) of the internal state of LSTM.

[0137] therefore, Figure 3 It embodies a simplified version of the three-state switching logic: high input window fluctuation, maintain high precision FP16; moderate fluctuation, corresponding to INT8; continuous and stable fluctuation for N frames, corresponding to INT4; any sudden increase in fluctuation, return to high precision.

[0138] Please see Figure 4 , Figure 4 This is a schematic diagram illustrating the relationship between the interference change stages and accuracy scheduling provided in an embodiment of this application. For example... Figure 4 As shown, the time axis is t0, t1, t2, t3, t4, t5, t6; the high interference intensity corresponds to the rising period (abrupt change segment), with a corresponding accuracy of FP16; the slow decrease of interference corresponds to the stable segment (gradual change segment), with a corresponding accuracy of INT8; the continuous absence of interference corresponds to the background segment (steady state), with a corresponding accuracy of INT4.

[0139] It should be noted that the interference modeling task has a clear evolution process. Based on this evolution process, the execution accuracy of LSTM is accurately mapped to achieve no loss of accuracy in the critical stage and active energy saving in the stable stage.

[0140] Please see Figure 5 , Figure 5 This is a schematic diagram of the multi-precision LSTM execution path structure provided in an embodiment of this application. The diagram illustrates the LSTM unit data transmission path from the perspective of the RTL (Register Transfer Language) functional module. For example... Figure 5 As shown, the LSTM precision selector (MUX, Multiplexer) selects FP16, INT8, and INT4; the LSTM units can independently or share the multiply-accumulate array, and the state write-back & output buffer module performs state write-back and output buffering.

[0141] It should be noted that the LSTM precision selector switches paths by outputting the SEL (Select) signal from the controller; the three precision LSTM paths can share the multiply-accumulate array and the bit width can be dynamically set during configuration; the output paths are uniformly written back, and the interface is no different from the main controller.

[0142] According to one embodiment of this application, the method can be deployed on a 28nm GNSS SoC (System on Chip) platform, with the LSTM configuration as follows:

[0143] (1) Single-layer LSTM, number of hidden units H = 32; (2) Three precision inference paths: FP16, INT8, INT4; (3) Inference cycle is updated every 10 frames; (4) Data set: from urban occlusion environment and vehicle multi-source interference trajectory.

[0144] In one embodiment, a comparison of the effectiveness of the precision scheduling strategy of this application and the prior art is shown in Table 1, as follows:

[0145] Table 1

[0146]

[0147] The accuracy loss is calculated based on RMSE (Root Mean Square Error). The accuracy scheduling strategy in this application is dynamic switching.

[0148] The LSTM computation accuracy progressive scheduling method provided in this application first calculates the sliding window change rate based on the feature sequence of the sliding window sequence (obtained by expanding the navigation system input data in the time dimension), and calculates the change amplitude of the LSTM internal state between the current frame and the previous frame. Then, based on the sliding window change rate and the change amplitude of the LSTM internal state, it determines which fluctuation stage the current model input state belongs to. Finally, based on the trend of the fluctuation degree of the fluctuation stage, it gradually switches the LSTM computation accuracy of the current frame.

[0149] The proposed solution does not directly run a full-precision LSTM, but gradually switches the LSTM calculation precision according to the degree of state fluctuation, thereby reducing the power consumption of the navigation chip and having strong ease of use and practicality.

[0150] The proposed solution addresses the problems of "excessive power consumption due to full-precision execution", "difficulty in adapting static accuracy to changes in task state", and "lack of coordinated control between accuracy and energy consumption in interference modeling" that exist when existing LSTM inference models are run in embedded navigation chips.

[0151] This application proposes a scheduling mechanism that supports task phase awareness, state evolution tracking, and dynamic switching of multi-precision running paths. This mechanism enables the gradual adjustment of LSTM computation precision, allowing the model to use high precision in the initial stage of interference to maintain modeling accuracy, and medium to low precision in the stable stage of interference to optimize energy saving. This improves the overall system energy efficiency and model deployment flexibility, making it particularly suitable for tasks such as GNSS signal interference situation modeling, prediction, and scheduling.

[0152] The proposed solution has an incremental scheduling mechanism that automatically adjusts the LSTM computation accuracy according to the task stage. While ensuring the integrity of the state memory, it dynamically reduces redundant computing resources, improves the system's energy efficiency ratio, and adapts to the deployment requirements of lightweight chips.

[0153] Compared with the prior art, the solution of this application has the following significant technical advantages:

[0154] (1) Accuracy-energy consumption co-optimization: The model maintains high accuracy during the critical modeling stage to ensure the integrity of the state construction; during the stable state period, it actively reduces the accuracy to a low level to reduce power consumption waste and improve the energy efficiency ratio by 30%~60%;

[0155] (2) Strong adaptive deployment capability: It does not rely on retraining or model structure modification, and can be directly applied to post-training quantized LSTM models, supporting one-click switching of TFLite deployment structure;

[0156] (3) Supports intelligent scheduling during runtime: Based on the real-time task status perception mechanism, it can realize adaptive switching of different precision paths, dynamically adapt to the evolution of task status, and no longer rely on static configuration;

[0157] (4) Ensure numerical continuity and stability: Through state fluctuation limitation and switching transition control, the change in accuracy will not cause state interruption or prediction drift, thus ensuring the continuity of model prediction logic;

[0158] (5) Hardware deployment friendly: The precision switching signal can be mapped to the MAC array control signal or the path selection switch, with low hardware resource overhead, and is suitable for lightweight deployment in 32nm / 28nm SoC architecture;

[0159] (6) Wide range of applicable tasks: In addition to GNSS interference modeling, it can also be applied to LSTM precision control scenarios in tasks such as pseudorange trend prediction, lockout warning, and multipath identification.

[0160] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0161] Corresponding to the method in the above embodiments, Figure 6 This is a schematic diagram of the LSTM computational accuracy asymptotic scheduling device provided in the embodiments of this application. For ease of explanation, only the parts related to the embodiments of this application are shown.

[0162] Please see Figure 6 The device includes:

[0163] The acquisition unit 601 is used to acquire navigation system input data, as well as the internal state of the LSTM in the current frame and the previous frame;

[0164] The calculation unit 602 is used to calculate the sliding window change rate based on the feature sequence of the sliding window sequence, and to calculate the change magnitude of the LSTM internal state between the current frame and the previous frame; the sliding window sequence is a sequence obtained by sliding windowing the navigation system input data in the time dimension.

[0165] The determination unit 603 is used to determine the fluctuation stage of the current input state of the LSTM inference model based on the sliding window change rate and the change amplitude of the internal state of the LSTM.

[0166] The switching unit 604 is used to gradually switch the LSTM calculation precision of the current frame based on the trend of the state fluctuation degree in the fluctuation stage.

[0167] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.

[0168] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0169] Figure 7 This is a schematic diagram of the structure of the electronic device 7 provided in an embodiment of this application. Figure 7 As shown, the electronic device 7 of this embodiment includes: at least one processor 701 ( Figure 7 Only one is shown in the diagram), memory 703, and computer program 702 stored in memory 703 and executable on at least one processor 701. When processor 701 executes computer program 702, it implements the steps in the above method embodiments.

[0170] Electronic device 7 can be a desktop computer, laptop, handheld computer, or mobile phone, etc. This electronic device 7 may include, but is not limited to, a processor 701 and a memory 703. Those skilled in the art will understand that... Figure 7 This is merely an example of electronic device 7 and does not constitute a limitation on electronic device 7. It may include more or fewer components than shown, or combine certain components, or different components, such as input / output devices, network access devices, etc.

[0171] The processor 701 may be a Central Processing Unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware photovoltaic modules, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0172] In some embodiments, memory 703 may be an internal storage unit of electronic device 7, such as a hard disk or memory of electronic device 7. In other embodiments, memory 703 may be an external storage device of electronic device 7, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc., equipped on electronic device 7. Furthermore, memory 703 may include both internal and external storage units of electronic device 7. Memory 703 is used to store operating system, application programs, boot loader, data, and other programs, such as program code of computer programs. Memory 703 may also be used to temporarily store data that has been output or will be output.

[0173] If the integrated units described above 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, when implementing all or part of the processes in the methods of the above embodiments, this application can use a computer program to instruct related hardware. This computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps applied in the method embodiments. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable storage medium can include at least: any entity or device capable of carrying computer program code to a computing device / electronic device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, such as a USB flash drive, a portable hard drive, a magnetic disk, or an optical disk.

[0174] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps in the various method embodiments described above.

[0175] This application provides a computer program product that, when run on an electronic device, causes the electronic device to execute the steps described in the various method embodiments above.

[0176] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0177] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0178] In the embodiments provided in this application, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. The device / electronic device embodiments described above are merely illustrative, and the division of modules or units described above is only a logical functional division. In actual implementation, there may be other division methods. For example, multiple units or photovoltaic modules may be combined or integrated into another system, and some features may be ignored. Furthermore, the indirect coupling, direct coupling, or communication connection shown or discussed between them can be through some interfaces, devices, or units, and can be electrical, mechanical, or other forms.

[0179] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0180] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the above embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications 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 this application, and should all be included within the protection scope of this application.

Claims

1. A method for asymptotic scheduling of LSTM computational accuracy, characterized in that, The method includes: Acquire navigation system input data, as well as the internal state of the LSTM in the current frame and the previous frame; The sliding window change rate is calculated based on the feature sequence of the sliding window sequence, and the change amplitude of the LSTM internal state between the current frame and the previous frame is calculated; the sliding window sequence is a sequence obtained by sliding window expansion of the navigation system input data in the time dimension, and the sliding window change rate is calculated based on the variance method, the maximum difference method, or the mean change rate method. Based on the sliding window change rate and the change amplitude of the internal state of the LSTM, the fluctuation stage of the current input state of the LSTM inference model is determined; Based on the trend of state fluctuation in the fluctuation phase, the LSTM calculation precision of the current frame is gradually switched. The fluctuation phases include: the initial phase, the gradual change phase, and the steady-state phase. The internal states of the LSTM include: the Cell state and the Hidden state. Based on the sliding window rate of change and the magnitude of change in the internal states of the LSTM, the fluctuation phase of the current input state of the LSTM inference model is determined, including: If the sliding window change rate is greater than the first preset sliding window change rate threshold, and the change amplitude of the Cell state and / or Hidden state is greater than the first preset change amplitude threshold, and this condition is met continuously for several frames, then the fluctuation stage of the current input state is the initial stage. If the sliding window change rate is less than or equal to the first preset sliding window change rate threshold and greater than or equal to the second preset sliding window change rate threshold, and the change amplitude of the Cell state and / or Hidden state is less than or equal to the first preset change amplitude threshold and greater than zero, and this condition is met continuously for several frames, then the fluctuation phase of the current input state is the gradual change phase. If the sliding window change rate is less than the second preset sliding window change rate threshold, and the change amplitude of the Cell state and / or Hidden state approaches zero, and this condition is met continuously for several frames, then the fluctuation phase of the current input state is the steady-state phase.

2. The LSTM computational accuracy asymptotic scheduling method according to claim 1, characterized in that, The LSTM computational accuracy includes at least three levels. The degree of state fluctuation in each fluctuation stage includes one or more intervals, and each interval corresponds to one or more levels of LSTM computational accuracy. Based on the trend of state fluctuation during the fluctuation phase, the LSTM calculation precision of the current frame is gradually switched, including: Based on the range of state fluctuations in the initial stage, the LSTM calculation precision of the current frame is initialized to the corresponding level of LSTM calculation precision. Based on the range of state fluctuation degree in the gradual change phase, the LSTM calculation accuracy of the current frame is switched to the corresponding level of LSTM calculation accuracy. Based on the range of state fluctuations in the steady-state phase, the LSTM calculation precision of the current frame is switched to the corresponding level of LSTM calculation precision. The degree of state fluctuation gradually decreases from the initial stage to the gradual change stage to the steady state stage.

3. The LSTM computational accuracy asymptotic scheduling method according to claim 2, characterized in that, The method further includes: Based on the inference path corresponding to the LSTM calculation precision of the current frame, perform LSTM inference.

4. The LSTM computational accuracy asymptotic scheduling method according to claim 3, characterized in that, The method further includes: When performing LSTM inference based on the inference path corresponding to a certain level of LSTM computational accuracy, if the current state fluctuation jumps to the previous interval, the inference path is rolled back to the inference path corresponding to the previous level of LSTM computational accuracy, and the inference path is reactivated.

5. The LSTM computation accuracy asymptotic scheduling method according to claim 1, characterized in that, The method further includes: The LSTM calculation precision of the current frame is locked according to a preset precision locking threshold. The LSTM is unlocked when the calculation accuracy after locking meets the unlocking condition.

6. The LSTM computational accuracy asymptotic scheduling method according to any one of claims 1-5, characterized in that, The step of gradually switching the LSTM computation accuracy of the current frame based on the trend of state fluctuation in the fluctuation phase is executed at the boundary of the LSTM inference cycle or the safety window of multi-task scheduling.

7. An LSTM computational precision asymptotic scheduling device, characterized in that, The device includes: The acquisition unit is used to acquire navigation system input data, as well as the internal state of the LSTM in the current frame and the previous frame; The calculation unit is used to calculate the sliding window change rate based on the feature sequence of the sliding window sequence, and to calculate the change magnitude of the LSTM internal state between the current frame and the previous frame; the sliding window sequence is a sequence obtained by sliding window expansion of the navigation system input data in the time dimension, and the sliding window change rate is calculated based on the variance method, the maximum difference method, or the mean change rate method. The determination unit is used to determine the fluctuation stage of the current input state of the LSTM inference model based on the sliding window change rate and the change magnitude of the internal state of the LSTM. The switching unit is used to gradually switch the LSTM calculation precision of the current frame based on the trend of the state fluctuation degree in the fluctuation stage. The fluctuation phase includes an initial phase, a gradual change phase, and a steady-state phase; the internal states of the LSTM include Cell states and Hidden states; the determining unit is also used for: If the sliding window change rate is greater than the first preset sliding window change rate threshold, and the change amplitude of the Cell state and / or Hidden state is greater than the first preset change amplitude threshold, and this condition is met continuously for several frames, then the fluctuation stage of the current input state is the initial stage. If the sliding window change rate is less than or equal to the first preset sliding window change rate threshold and greater than or equal to the second preset sliding window change rate threshold, and the change amplitude of the Cell state and / or Hidden state is less than or equal to the first preset change amplitude threshold and greater than zero, and this condition is met continuously for several frames, then the fluctuation phase of the current input state is the gradual change phase. If the sliding window change rate is less than the second preset sliding window change rate threshold, and the change amplitude of the Cell state and / or Hidden state approaches zero, and this condition is met continuously for several frames, then the fluctuation phase of the current input state is the steady-state phase.

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 LSTM computational precision asymptotic scheduling method as described in any one of claims 1-6.

9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the LSTM computational precision asymptotic scheduling method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Method, device and equipment for correcting real-time dynamic sea surface height and medium

    CN118759555A

  • GNSS model adaptive optimization method for navigation scene perception enhancement in high-precision positioning

    CN119024393A