Buffer adjustment method and device for rapidio protocol signals

By real-time acquisition and adjustment of the buffer size of RapidIO protocol signals, the problem of fixed buffers being unable to adapt to rapidly changing signals is solved, achieving complete signal capture and efficient resource utilization, and improving the efficiency and accuracy of data acquisition.

CN119342007BActive Publication Date: 2025-12-26AVIC GENERAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411449727.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-17
Publication Date
2025-12-26
Estimated Expiration
2044-10-17

AI Technical Summary

Technical Problem

During transmission, RapidIO protocol signals, due to the use of fixed buffers, are difficult to adapt to rapidly changing dynamic signals, leading to signal loss or resource waste, which affects the efficiency and accuracy of data acquisition.

Method used

By acquiring RapidIO protocol signals in real time, extracting signal characteristics, and adjusting the buffer size in real time based on the signal characteristics, the buffer size change is determined by a formula, and buffer blocks are dynamically allocated and released.

Benefits of technology

It achieves complete signal capture and efficient resource utilization, avoids signal loss and resource waste, and improves the efficiency and accuracy of data acquisition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119342007B_ABST
    Figure CN119342007B_ABST
Patent Text Reader

Abstract

The application discloses a buffer adjustment method and device of a RapidIO protocol signal, and belongs to the technical field of communication. The application considers that a traditional fixed buffer is difficult to adapt to a rapidly changing dynamic signal, and collects the RapidIO protocol signal in real time, adjusts the buffer size in real time according to the signal characteristics of the RapidIO protocol signal, dynamically adjusts the buffer size, can adapt to real-time changes of the signal, and thus can completely capture the RapidIO protocol signal and does not cause resource waste due to setting of a too large buffer.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of communication, in particular to a buffer adjustment method and device for RapidIO protocol signals. BACKGROUND

[0002] RapidIO protocol is a high-performance embedded system interconnection technology, widely used in high-performance computing and communication fields.

[0003] At present, in the process of signal transmission of RapidIO protocol, a fixed buffer (buffer size fixed) is usually used to store signals.

[0004] However, the signals transmitted by RapidIO protocol are often rapidly changing dynamic signals, and the traditional fixed buffer is difficult to adapt to the rapidly changing dynamic signals, resulting in signal loss or resource waste. For example, in the process of high-speed data transmission, a fixed-size buffer may not be able to store the burst data stream in time, resulting in data overflow and loss; while when the signal changes slowly, an excessively large buffer will cause waste of storage resources. These problems seriously affect the efficiency and accuracy of data acquisition, and become a difficult problem to be solved in the current technical field. SUMMARY

[0005] The embodiments of the present application provide a buffer adjustment method and device for RapidIO protocol signals, which can achieve the effects of complete signal capture and resource waste avoidance. The technical solutions are as follows:

[0006] On the one hand, a buffer adjustment method for RapidIO protocol signals is provided, and the method comprises:

[0007] In the process of signal transmission of RapidIO protocol, the RapidIO protocol signals are collected in real time;

[0008] The collected RapidIO protocol signals are subjected to feature extraction to obtain signal features of the RapidIO protocol signals;

[0009] According to the signal features, the buffer size is adjusted in real time.

[0010] In some embodiments, the adjusting the buffer size in real time according to the signal features comprises:

[0011] In response to the signal features indicating that the RapidIO protocol signals change faster, the buffer size is increased;

[0012] In response to the signal features indicating that the RapidIO protocol signals change slower, the buffer size is decreased.

[0013] In some embodiments, the adjusting the buffer size in real time according to the signal feature comprises:

[0014] The buffer size is determined by the following formula:

[0015]

[0016] wherein B(t) is the buffer size at time t, B(t-1) is the buffer size at previous time t-1, a is a buffer increasing coefficient (a>1), b is a buffer decreasing coefficient (0 is the smoothed change rate at time t;

[0017] The currently allocated buffer is adjusted according to the buffer size.

[0018] In some embodiments, the adjusting the currently allocated buffer according to the buffer size comprises:

[0019] The currently required buffer block is evaluated according to the buffer size.

[0020] The closest idle buffer block to the required buffer block is searched in the buffer pool.

[0021] The searched idle buffer block is allocated to the current signal acquisition task and marked as occupied.

[0022] In some embodiments, the acquiring the RapidIO protocol signal in real time during the transmission of the RapidIO protocol signal comprises:

[0023] The RapidIO protocol signal is acquired in real time during the transmission of the RapidIO protocol signal in response to the RapidIO protocol signal reaching a trigger condition.

[0024] In some embodiments, the trigger condition is adjusted based on a prediction result output by a signal state prediction model; the method further comprises:

[0025] The signal feature of the RapidIO protocol signal is input into the signal state prediction model, and the signal state prediction model predicts the signal state of the RapidIO protocol signal based on the signal feature of the RapidIO protocol signal through model parameters, outputs a prediction result, and the prediction result is used to indicate the signal state of the RapidIO protocol signal.

[0026] The trigger condition is adjusted according to the prediction result.

[0027] In some embodiments, the adjusting the trigger condition according to the prediction result comprises:

[0028] setting a threshold in the trigger condition to a first threshold or lowering the threshold in the trigger condition in response to the prediction result indicating that the RapidIO protocol signal is about to change rapidly;

[0029] setting the threshold in the trigger condition to a second threshold or raising the threshold in the trigger condition in response to the prediction result indicating that the RapidIO protocol signal is in a stable state, the second threshold being higher than the first threshold.

[0030] In one aspect, a buffer adjustment device for a RapidIO protocol signal is provided, the device comprising:

[0031] a collection module configured to collect the RapidIO protocol signal in real time during transmission of the RapidIO protocol signal;

[0032] an extraction module configured to extract features of the collected RapidIO protocol signal to obtain signal features of the RapidIO protocol signal;

[0033] an adjustment module configured to adjust a buffer size in real time according to the signal features.

[0034] In some embodiments, the adjustment module is configured to:

[0035] increase the buffer size in response to the signal features indicating that the RapidIO protocol signal is changing faster;

[0036] decrease the buffer size in response to the signal features indicating that the RapidIO protocol signal is changing slower.

[0037] In some embodiments, the adjustment module is configured to:

[0038] determine the buffer size by the following formula:

[0039]

[0040] where B(t) is the buffer size at time t, B(t-1) is the buffer size at previous time t-1, a is a buffer increase coefficient (a>1), β is a buffer decrease coefficient (0<β<1), θ1 is a threshold for signal change rate acceleration, θ2 is a threshold for signal change rate deceleration, is the smoothed change rate at time t;

[0041] adjust a currently allocated buffer according to the buffer size.

[0042] In some embodiments, the adjusting module is configured to:

[0043] evaluate a currently required buffer block according to the buffer size;

[0044] find a closest free buffer block to the required buffer block in a buffer pool;

[0045] allocate the found free buffer block to a current signal acquisition task and mark it as occupied.

[0046] In some embodiments, the acquisition module is configured to:

[0047] acquire the RapidIO protocol signal in real time in response to the RapidIO protocol signal reaching a trigger condition during a RapidIO protocol signal transmission process.

[0048] In some embodiments, the trigger condition is adjusted based on a prediction result output by a signal state prediction model; the apparatus further comprises:

[0049] a prediction module configured to input a signal feature of the RapidIO protocol signal into the signal state prediction model, and predict a signal state of the RapidIO protocol signal based on the signal feature of the RapidIO protocol signal by using model parameters of the signal state prediction model, and output a prediction result, the prediction result being used to indicate the signal state of the RapidIO protocol signal.

[0050] The adjusting module is further configured to adjust the trigger condition according to the prediction result.

[0051] In some embodiments, the adjusting module is configured to:

[0052] in response to the prediction result indicating that the RapidIO protocol signal is about to change rapidly, set a threshold in the trigger condition as a first threshold or lower the threshold in the trigger condition;

[0053] in response to the prediction result indicating that the RapidIO protocol signal is in a stable state, set a threshold in the trigger condition as a second threshold or raise the threshold in the trigger condition, the second threshold being higher than the first threshold.

[0054] In an aspect, an electronic device is provided, which includes one or more processors and one or more memories having at least one computer program stored therein, the at least one computer program is loaded and executed by the one or more processors to implement various optional implementations of the above-mentioned buffer adjustment method for RapidIO protocol signals.

[0055] In an aspect, a computer-readable storage medium is provided, which has at least one computer program stored therein, the at least one computer program is loaded and executed by a processor to implement various optional implementations of the above-mentioned buffer adjustment method for RapidIO protocol signals.

[0056] In an aspect, a computer program product or a computer program is provided, which includes one or more program codes stored in a computer-readable storage medium. One or more processors of an electronic device can read the one or more program codes from the computer-readable storage medium, and execute the one or more program codes, so that the electronic device can perform the above-mentioned buffer adjustment method for RapidIO protocol signals in any possible implementation.

[0057] The present application considers that the traditional fixed buffer is difficult to adapt to the rapidly changing dynamic signals, and real-time collection of RapidIO protocol signals, according to the signal characteristics of the RapidIO protocol signals, real-time adjustment of the buffer size, so that the dynamic adjustment of the buffer size can adapt to the real-time change of the signal, so that the RapidIO protocol signals can be captured completely, and the resource waste caused by setting a too large buffer can be avoided. BRIEF DESCRIPTION OF DRAWINGS

[0058] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0059] Figure 1 is a schematic diagram of an implementation environment of a buffer adjustment method for RapidIO protocol signals provided by the embodiments of the present application;

[0060] Figure 2 is a flowchart of a buffer adjustment method for RapidIO protocol signals provided by the embodiments of the present application;

[0061] Figure 3is a flowchart of a signal acquisition and feature extraction process of a RapidIO protocol provided by an embodiment of the present application;

[0062] Figure 4 is a flowchart of a buffer management mechanism provided by an embodiment of the present application;

[0063] Figure 5 is a flowchart of a buffer adjustment method of a RapidIO protocol signal provided by an embodiment of the present application;

[0064] Figure 6 is a flowchart of a buffer adjustment method of a RapidIO protocol signal provided by an embodiment of the present application;

[0065] Figure 7 is a flowchart of a buffer adjustment method of a RapidIO protocol signal provided by an embodiment of the present application;

[0066] Figure 8 is a flowchart of a buffer adjustment method of a RapidIO protocol signal provided by an embodiment of the present application;

[0067] Figure 9 is a flowchart of a buffer adjustment method of a RapidIO protocol signal provided by an embodiment of the present application;

[0068] Figure 10 is a flowchart of a buffer adjustment method of a RapidIO protocol signal provided by an embodiment of the present application;

[0069] Figure 11 is a structural schematic diagram of a buffer adjustment device of a RapidIO protocol signal provided by an embodiment of the present application;

[0070] Figure 12 is a structural schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0071] In order to make the purpose, technical scheme and advantages of the present application more clear, the embodiments of the present application will be further described in detail below with reference to the drawings.

[0072] The terms "first", "second", etc. are used herein to distinguish between similar or identical items or elements having substantially the same function and it should be understood that there is no logical or chronological dependency between "first", "second", "nth", and that the number and execution order are not limited. It should also be understood that although the following description uses the terms first, second, etc. to describe various elements, these elements should not be limited by the terms. These terms are only used to distinguish one element from another. For example, without departing from the scope of various described examples, a first image can be called a second image, and similarly, a second image can be called a first image. The first image and the second image can both be images, and in some cases, can be separate and distinct images.

[0073] The term "at least one" herein means one or more, and the term "multiple" herein means two or more, for example, multiple data packets means two or more data packets.

[0074] It should be understood that the terms used in the description of various described examples herein are for the purpose of describing particular examples and are not intended to be limiting. As used in the description of various described examples and the appended claims, the singular forms "a", "an" and "the" are intended to include plural forms as well, unless the context clearly indicates otherwise.

[0075] It should also be understood that the term "and / or" used herein means and encompasses any and all possible combinations of one or more of the associated listed items. The term "and / or", is a description of the associated relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent: A exists alone, A and B exist together, and B exists alone. In addition, the character " / " in the present application generally represents an "or" relationship between the associated objects.

[0076] It should also be understood that in various embodiments of the present application, the size of the serial number of each process does not mean the order of execution, and the execution order of each process should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0077] It should also be understood that determining B according to A does not mean that B is determined only according to A, but B can also be determined according to A and / or other information.

[0078] It should also be understood that the terms "comprises", "comprising", "includes", "including", "comprise", "comprising", "comprises", and / or "comprising" when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0079] It should also be understood that the term "if' can be interpreted to mean "when" or "upon" or "in response to determining" or "in response to detecting". Similarly, the phrase "if it is determined" or "if [a stated condition or event] is detected" can be interpreted to mean "upon determining" or "in response to determining" or "upon detecting [the stated condition or event]" or "in response to detecting [the stated condition or event]", depending on the context.

[0080] The following terms related to the present application are explained below.

[0081] Artificial Intelligence (AI) is the use of digital computers or digital computer-controlled machines to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology of computer science, which tries to understand the essence of intelligence and produce a new intelligent machine that can react in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines, so that machines have the functions of perception, reasoning and decision-making.

[0082] Artificial intelligence technology is a comprehensive discipline, involving a wide range of fields, both hardware and software technologies. Artificial intelligence basic technologies generally include technologies such as sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction system, mechatronics, etc. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning, etc.

[0083] Machine Learning (ML) is a multi-disciplinary subject, involving probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory, etc. It is a subject that studies how computers simulate or implement human learning behavior to acquire new knowledge or skills, and reorganize existing knowledge structure to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental approach to making computers intelligent, and its applications are widespread in various fields of artificial intelligence.

[0084] Machine learning and deep learning generally include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and teach-learning techniques.

[0085] With the research and progress of artificial intelligence technology, artificial intelligence technology is researched and applied in many fields, such as common smart home, smart wearable device, virtual assistant, smart speaker, smart marketing, unmanned vehicle, autonomous vehicle, unmanned aerial vehicle, robot, smart medical treatment, smart customer service, etc. It is believed that with the development of technology, artificial intelligence technology will be applied in more fields and play an increasingly important role.

[0086] The scheme provided by the embodiments of the present application relates to machine learning and other technologies of artificial intelligence, which is specifically explained by the following embodiments.

[0087] The implementation environment of the present application is described below.

[0088] Figure 1 is a schematic diagram of an implementation environment of a RapidIO protocol signal buffer adjustment method provided by the embodiments of the present application. The implementation environment includes an electronic device 101 and an electronic device 102. The electronic device 101 and the electronic device 102 are connected through a wireless network or a wired network.

[0089] The electronic device 101 and the electronic device 102 can transmit signals through the RapidIO protocol, and during the signal transmission process, the party receiving the signal can analyze and cache the transmitted RapidIO protocol signal by using the buffer adjustment method.

[0090] The electronic device 101 and the electronic device 102 can be at least one of a server, multiple servers, a cloud computing platform, and a virtualization center.

[0091] The server can be a standalone physical server, a server cluster or a distributed system composed of multiple physical servers, a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, and basic cloud computing services such as big data and artificial intelligence platforms.

[0092] Figure 2 is a flowchart of a RapidIO protocol signal buffer adjustment method provided by the embodiments of the present application. The method is applied to an electronic device, which is a server, as shown in Figure 2 The method includes the following steps.

[0093] 201、The electronic device collects the RapidIO protocol signal in real time during the transmission of the RapidIO protocol signal.

[0094] In the embodiment of the present application, the electronic device can dynamically adjust the buffer size to adapt to the rapid changes of the RapidIO protocol signal, so that in this step 201, the RapidIO protocol signal can be collected in real time during the transmission of the RapidIO protocol signal, and analyzed to determine how to adjust the buffer size.

[0095] In some embodiments, this step 201 can be implemented by a signal collection module. Specifically, the electronic device can collect the RapidIO protocol signal in real time during the transmission of the RapidIO protocol signal through the signal collection module.

[0096] In some embodiments, the signal collection process can be that the electronic device can continuously sample the RapidIO protocol signal at a fixed sampling frequency during the transmission of the RapidIO protocol signal to obtain time series data, where the time series data is the collected RapidIO protocol signal.

[0097] Of course, in some embodiments, the electronic device can continuously sample the RapidIO protocol signal at a fixed sampling frequency during the transmission of the RapidIO protocol signal through the signal collection module to obtain time series data (i.e. the collected RapidIO protocol signal).

[0098] In some embodiments, the electronic device can collect the RapidIO protocol signal and perform preliminary preprocessing to remove environmental noise and interference signals to obtain relatively pure signal data, so that subsequent analysis is not easily disturbed and misidentified, and the accuracy of the data is improved.

[0099] Specifically, in this step 201, after the signal collection is completed, the electronic device performs denoising and filtering processing on the collected RapidIO protocol signal, and then the subsequent step 202 can further process the RapidIO protocol signal after denoising and filtering processing.

[0100] 202, the electronic device extracts features from the collected RapidIO protocol signal to obtain signal features of the RapidIO protocol signal.

[0101] Signal features are used to reflect the inherent properties and trends of signals. Since the electronic device needs to analyze the RapidIO protocol signal to determine how it changes or its amplitude to determine the size of the buffer that can be used to cache it, the electronic device needs to extract features from the RapidIO protocol signal to extract key features, and further determine the buffer size through the key features.

[0102] The steps of feature extraction of the RapidIO protocol signal are different for different signal features. In some embodiments, the signal features can include at least one of a change rate, an amplitude, a waveform, and a frequency. In other embodiments, the signal features can also include other features, which can be set by a person skilled in the relevant art according to experience or requirements, and the embodiments of the present application do not limit this. The steps of feature extraction corresponding to the change rate, the amplitude, the waveform, and the frequency are described below.

[0103] For the change rate, the electronic device can perform differential calculation on the collected RapidIO protocol signal to obtain the change rate of the RapidIO protocol signal. Specifically, the electronic device can calculate the difference value between adjacent sampling points in the RapidIO protocol signal as the change rate of the RapidIO protocol signal at adjacent time points.

[0104] The electronic device can take the change rate of the RapidIO protocol signal at adjacent time points as the signal feature of the RapidIO protocol signal, or further perform smoothing processing to obtain a smoothed change rate as the signal feature. Specifically, after calculating the change rate of the RapidIO protocol signal at adjacent time points, the electronic device can perform average processing on the difference value by using a sliding window to obtain a relatively stable change rate estimate, which is taken as the signal feature.

[0105] In some embodiments, the electronic device can calculate the difference value between adjacent sampling points for the preprocessed time series data to obtain the change rate of the signal.

[0106] In one specific possible implementation, the change rate can be implemented by the following formula A:

[0107] ΔS(t) = S(t) - S(t-1), formula A

[0108] where S(t) represents the signal value at time t, S(t-1) represents the signal value at time t-1, and ΔS(t) represents the signal change rate from time t-1 to t.

[0109] The smoothed change rate can be implemented by the following formula B:

[0110]

[0111] where represents the smoothed change rate at time t, N is the size of the sliding window, is the average value of N change amounts ΔS(i) from time t-N+1 to time t, and i is a time identifier.

[0112] For the amplitude, the electronic device can perform peak detection on the RapidIO protocol signal to obtain a maximum peak value and a minimum valley value, and determine the amplitude range of the RapidIO protocol signal based on the maximum peak value and the minimum valley value.

[0113] Specifically, the electronic device can take the difference between the maximum peak value and the minimum valley value as the amplitude range of the RapidIO protocol signal.

[0114] In one specific possible implementation, the amplitude range can be implemented by the following formula C:

[0115] A(t) = max(S(t)) - min(S(t)), formula C

[0116] Wherein, A(t) represents the signal amplitude (i.e. amplitude range) at time t, max(S(t)) represents the maximum amplitude value of the signal at time t (i.e. maximum peak value), and min(S(t)) represents the minimum amplitude value of the signal at time t (i.e. minimum valley value).

[0117] For the waveform, the electronic device can calculate the mean and variance of the RapidIO protocol signal within a period of time to obtain a waveform feature, which is used to represent the stability and volatility of the RapidIO protocol signal.

[0118] In one specific possible implementation, the mean can be implemented by the following formula D, and the variance can be implemented by the following formula E:

[0119]

[0120]

[0121] Wherein, M is the window size for calculating the mean and variance, μ(t) represents the mean of N signal values between time t-N+1 and time t, σ 2 (t) represents the variance of N signal values between time t-N+1 and time t.

[0122] For the frequency, the electronic device can calculate the period of the RapidIO protocol signal, and calculate the frequency of the RapidIO protocol signal based on the period of the RapidIO protocol signal.

[0123] In some embodiments, the electronic device can extract multiple signal features through feature extraction, and further, the electronic device can combine the multiple signal features of the RapidIO protocol signal to obtain a feature vector, and then in subsequent step 203, the electronic device can adjust the buffer size based on the feature vector.

[0124] For example, the signal features such as the smooth change rate, amplitude range, mean value and variance calculated in the above process can be combined to form a multi-dimensional feature vector. The formula F is used to represent the multi-dimensional feature vector as follows:

[0125]

[0126] In the formula F, the feature vector Feature'(t) is composed of four components at time t.

[0127] represents the derivative or instantaneous change rate of the average change amount .

[0128] A'(t): represents the derivative or instantaneous change rate of the signal amplitude A(t).

[0129] μ'(t): represents the derivative or instantaneous change rate of the mean value μ(t).

[0130] σ 2′ '(t): represents the derivative or instantaneous change rate of the variance σ 2 '(t).

[0131] The feature vector can be used to describe the dynamic change of a system or process at time t, and is commonly used in the fields of dynamic system modeling, prediction and control.

[0132] In some embodiments, after obtaining the multi-dimensional feature vector, the electronic device can also perform dimension reduction processing on the feature vector to extract key signal features, thereby reducing the computational complexity. Specifically, the electronic device can use a principal component analysis (PCA) method or other methods to reduce the dimension of the multi-dimensional feature vector, extract key features, and reduce the computational complexity. The specific dimension reduction processing method is not limited in the embodiments of the present application.

[0133] In some embodiments, the steps 201 and 202 can be implemented by a signal characteristic monitoring module and a feature extraction module.

[0134] The signal characteristic monitoring module is configured to monitor the change rate and amplitude of the signal in real time and extract key features. The technical principle is that the core function of the signal characteristic monitoring module is to monitor the change rate and amplitude of the RapidIO protocol signal in real time and extract key features. These features will be used as important basis for subsequent dynamic adjustment of buffer size and adaptive acquisition strategy.

[0135] The feature extraction module is used to extract key features from the collected signal, such as frequency, amplitude, waveform, etc. The technical principle is as follows: the feature extraction module is a key step in signal processing, which is responsible for extracting useful information for signal recognition and analysis from the original collected signal. These features usually include the frequency, amplitude, waveform, etc. of the signal, which can reflect the inherent properties and trends of the signal, and are crucial for subsequent signal analysis and processing.

[0136] Among them, the signal characteristic monitoring module can execute step 201 to collect the RapidIO protocol signal, and then execute step 202 to perform the calculation step of feature extraction, to obtain the calculation results of each item of the RapidIO protocol signal. The feature extraction module is used to receive or extract key features from the signal characteristic monitoring module, that is, the signal features in the calculation results.

[0137] In one specific embodiment, a specific example is provided. As shown in Figure 3 , it is assumed that in an experiment, the signal acquisition module samples the RapidIO protocol signal at a frequency of 1 kHz, the sliding window size N = 10, and the calculation window size M = 50.

[0138] The data acquisition and data preprocessing process of the signal acquisition module is as follows: the collected time series data is S = [S(1), S(2), …, S(1000)]. After denoising, a digital filter is used to remove noise in the signal, such as Gaussian white noise, etc., to improve the signal quality. The signal is normalized to have a uniform scale, which facilitates subsequent processing. The preprocessed data S' = [S'(1), S'(2), …, S'(1000)] is obtained.

[0139] Rate of change monitoring (difference calculation): calculate the difference value ΔS'(t) = S'(t) - S'(t-1) to obtain the rate of change sequence.

[0140] Smooth rate of change is obtained by using sliding window averaging

[0141] Amplitude monitoring (peak detection): detect the maximum peak and minimum valley, and calculate the amplitude range A'(t).

[0142] Mean and variance calculation: calculate the mean μ(t) and variance σ 2 (t).

[0143] Feature extraction: extract features from the collected signal, such as frequency, amplitude, waveform, etc.

[0144] Feature combination: combine the extracted frequency, amplitude, and waveform features into a feature vector for subsequent signal recognition and analysis.

[0145] For example:

[0146] Feature(t)=[f1,f2,…,f m a1,a2,…,a n w1,w2,…,w p ]

[0147] where f1,f2,…,f m represent frequency features, a1,a2,…,a n represent amplitude features, w1,w2,…,w p represent waveform features, and m, n, p are the number of frequency, amplitude, and waveform features, respectively.

[0148] Feature dimension reduction: extract key features through PCA dimension reduction.

[0149] Through the above steps, the signal characteristic monitoring module can extract key features of the signal in real time and accurately, providing reliable data support for subsequent dynamic adjustment of buffer size and adaptive acquisition strategy.

[0150] 203、The electronic device adjusts the buffer size in real time according to the signal features.

[0151] After the electronic device extracts the signal features, it can analyze the signal change rate, amplitude, waveform, frequency, etc. through the signal features, so as to determine how large the buffer area is needed to store the RapidIO protocol signal. Through these information, the buffer size is adjusted so that the buffer area is not too large or too small, which can ensure complete capture of the signal while avoiding resource waste.

[0152] In some embodiments, the electronic device can first determine the required buffer size according to the signal features; then adjust the currently allocated buffer size according to the required buffer size.

[0153] For example, if the required buffer size determined according to the signal features is greater than the currently allocated buffer size, the electronic device can determine a suitable idle buffer block from the buffer pool and allocate it to the current signal acquisition task. If the required buffer size determined according to the signal features is less than the currently allocated buffer size, the electronic device can release part of the buffer or release the currently allocated buffer and directly determine a suitable idle buffer block from the buffer pool and allocate it to the current signal acquisition task.

[0154] In some embodiments, the electronic device can implement a buffer adjustment algorithm in the step 203, which is based on the monitored signal characteristics to dynamically adjust the buffer size. For example, when the signal change rate is detected to speed up, the buffer size is increased to prevent signal loss; when the signal change rate slows down, the buffer size is reduced to save resources.

[0155] For some possible embodiments of the above steps 201 and 202, the electronic device can monitor the signal change rate through a signal characteristic monitoring module and signal amplitude A(t) and other characteristics, and then in the step 203, the electronic device acquires the signal characteristics based on the signal change rate and signal amplitude A(t) and other characteristics output by the signal characteristic monitoring module.

[0156] For the buffer, it can be initialized in the electronic device, and then adjusted according to real-time signal characteristics during the RapidIO protocol signal transmission process. This process includes buffer size initial setting and buffer adjustment.

[0157] For buffer size initial setting, an initial buffer size B0 can be set, which can be preliminarily estimated according to system resources and signal characteristics, or determined by relevant technical personnel according to experience, and the embodiments of the present application do not limit this.

[0158] For buffer adjustment, a buffer adjustment strategy can be set, which is used to guide how to determine the buffer size according to the signal characteristics. The specific buffer adjustment strategy can be determined by relevant technical personnel according to experience or requirements, and the embodiments of the present application do not limit this. A possible buffer adjustment strategy is given below, which can be seen in detail in the embodiment shown in Figure 6 , which will not be described here.

[0159] In some embodiments, the buffer size can also be limited, that is, it is necessary to ensure that the buffer size is within a reasonable range, so that a target range can be set to limit the buffer size. For example, the upper and lower limits B min and B max of the buffer size B(t) are set to ensure that the buffer size is within a reasonable range.

[0160] B(t) = max(B min , min(B(t), B max ))

[0161] B(t) represents a certain quantity at time t.

[0162] Bmin represents the minimum value of the quantity.

[0163] Bmax represents the maximum value of this quantity.

[0164] max() and min() represent the functions of taking the maximum and minimum values, respectively.

[0165] This formula means that the value of B(t) will not be lower than Bmin nor exceed Bmax.

[0166] After determining the buffer size through the above buffer adjustment strategy, it can be compared with the target range to determine whether the determined buffer size falls within the target range. If the determined buffer size falls within the target range, the buffer size is adjusted to the determined value. If the determined buffer size falls outside the target range, the determined buffer size is normalized to the target range, and then the buffer size is adjusted to the processed value.

[0167] Thus, the above dynamic adjustment process of the buffer can be steps 1 to 4.

[0168] Step 1: Obtain the signal change rate

[0169] Step 2: According to the buffer adjustment strategy, calculate the buffer size B(t) at the current time.

[0170] Step 3: Apply buffer size limit to ensure B(t) within a reasonable range.

[0171] Step 4: Update the buffer size for the next time of signal acquisition.

[0172] In some embodiments, after the electronic device adjusts the buffer size, it can store the RapidIO protocol signal into the buffer. In this way, the signal acquisition task is completed, and the buffer release process can be triggered. In the release process, the electronic device marks the occupied (allocated) buffer block as idle and returns it to the buffer pool.

[0173] In some embodiments, a buffer management module can be provided in the electronic device, which is used to manage the allocation and release of the buffer to ensure efficient use of the buffer. The technical principle is that the buffer management module is a key component to ensure efficient use of system resources, and its main function is to dynamically allocate and release buffer resources to adapt to real-time changes in signal characteristics. Through intelligent management of buffer usage, it can effectively avoid resource waste due to excessive buffer size or signal loss due to insufficient buffer size.

[0174] The specific configuration of the buffer management module can include buffer pool design, dynamic allocation strategy, buffer release strategy, buffer recycling and arrangement, and buffer usage monitoring.

[0175] For the buffer pool design, the buffer pool initialization process can be to pre-allocate a buffer pool containing multiple buffer blocks of different sizes at system startup. The size of each buffer block can be fixed or incrementally increased by a certain percentage. The buffer blocks can also be classified, specifically, the buffer blocks can be classified by size for easy searching and allocation.

[0176] For the dynamic allocation strategy, it includes demand assessment, best match search and allocation operation.

[0177] Demand assessment: according to the current required buffer size B(t) output by the buffer adjustment algorithm, the required buffer block is evaluated.

[0178] Best match search: find the closest idle buffer block to the demand in the buffer pool, and preferentially select the buffer block closest to the demand value and not exceeding the demand value.

[0179] Allocation operation: allocate the found idle buffer block to the current signal acquisition task and mark it as occupied.

[0180] For the buffer release strategy, it includes usage completion detection and release operation.

[0181] Usage completion detection: monitor the completion of the signal acquisition task, and trigger the buffer release process as soon as the task is completed.

[0182] Release operation: mark the occupied buffer block as idle and return it to the buffer pool for subsequent task use.

[0183] For buffer recycling and arrangement, the electronic device can recycle and arrange the buffer blocks in the buffer pool. Specifically, the electronic device can periodically perform defragmentation (e.g., merge adjacent idle buffer blocks to form larger available buffer blocks). Then the electronic device can count the buffer usage rate, and then dynamically adjust the buffer pool size (increase or decrease the number of buffer blocks) according to the system running situation and buffer usage rate, to ensure that there are always enough idle buffer blocks in the pool.

[0184] For buffer usage monitoring, it includes usage rate statistics and exception handling.

[0185] Usage rate statistics: real-time statistics of buffer usage rate, monitoring buffer allocation and release.

[0186] Exception handling: when buffer allocation failure or release exception is detected, trigger the exception handling mechanism to ensure stable operation of the system.

[0187] In some embodiments, the buffer allocation process in the electronic device can be provided with an exception handling mechanism. Specifically, when a buffer allocation failure is detected, the exception handling mechanism is triggered to re-allocate the buffer block. Through the above steps, the buffer management module can efficiently manage the buffer resources, ensure the smooth progress of the signal acquisition task, and optimize the use of system resources.

[0188] In a specific example, as shown in Figure 4 , first, the buffer is initialized, and then during the signal transmission process, the buffer size is determined according to the signal characteristics, and a dynamic allocation strategy is used to perform a best match search in the buffer pool and then perform an allocation operation. After the completion of the current signal acquisition task, a buffer release strategy can be used to perform a release operation on the occupied buffer. The buffer usage is monitored for the buffer, which plays a management role. The buffer pool can be periodically defragmented and the pool size can be dynamically adjusted to meet different signal buffering requirements.

[0189] The present application considers that the traditional fixed buffer is difficult to adapt to the rapidly changing dynamic signal, and real-time acquisition of the RapidIO protocol signal, according to the signal characteristics of the RapidIO protocol signal, the buffer size is adjusted in real time, so that the buffer size is dynamically adjusted to adapt to the real-time change of the signal, so that the RapidIO protocol signal can be completely captured, and the resource waste caused by setting a too large buffer can be avoided.

[0190] Figure 5 is a flowchart of a buffer adjustment method for a RapidIO protocol signal provided by an embodiment of the present application. The method is applied in an electronic device, which is a server, as shown in Figure 5 , the method comprises the following steps.

[0191] 501. The electronic device acquires the RapidIO protocol signal in real time during the transmission of the RapidIO protocol signal.

[0192] This step 501 is the same as the above step 201, and will not be described here.

[0193] 502. The electronic device extracts the characteristics of the acquired RapidIO protocol signal to obtain the signal characteristics of the RapidIO protocol signal.

[0194] This step 502 is the same as the above step 202, and will not be described here.

[0195] 503. In response to the signal characteristics indicating that the RapidIO protocol signal is changing faster, the electronic device increases the buffer size.

[0196] The RapidIO protocol signal changes faster, and the demand for buffering the RapidIO protocol signal becomes greater. Therefore, the electronic device can increase the size of the buffer, avoid signal loss, and achieve complete capture of the signal.

[0197] 504、In response to the signal feature indicating that the RapidIO protocol signal changes slower, the electronic device reduces the size of the buffer.

[0198] The RapidIO protocol signal changes slower, and the demand for buffering the RapidIO protocol signal becomes smaller. Therefore, the electronic device can reduce the size of the buffer, and avoid resource waste caused by an excessively large buffer being idle all the time.

[0199] The application adjusts the size of the buffer in real time according to the change rate of the RapidIO protocol signal. Dynamic adjustment of the size of the buffer can completely capture the RapidIO protocol signal, and can avoid resource waste caused by setting an excessively large buffer.

[0200] Figure 6 is a flowchart of a buffer adjustment method for a RapidIO protocol signal provided by an embodiment of the application. The method is applied to an electronic device, which is a server. Referring to Figure 6 , the method includes the following steps.

[0201] 601、The electronic device collects the RapidIO protocol signal in real time during transmission of the RapidIO protocol signal.

[0202] The step 601 is the same as the steps 201 and 501 described above, and will not be described again here.

[0203] 602、The electronic device extracts a signal feature of the collected RapidIO protocol signal.

[0204] The step 602 is the same as the steps 202 and 502 described above, and will not be described again here.

[0205] 603、The electronic device determines the size of the buffer by the following formula:

[0206]

[0207] wherein B(t) is the size of the buffer at time t, B(t-1) is the size of the buffer at the previous time t-1, α is a buffer increase coefficient (α>1), β is a buffer decrease coefficient (0<β<1), θ1 is a threshold of signal change rate acceleration, and θ2 is a threshold of signal change rate deceleration. Smoothed rate of change at time t.

[0208] The threshold θ1 of the signal rate of change increasing and the threshold θ2 of the signal rate of change decreasing in this step 603 can be set by the relevant technical personnel according to experience or requirements, and the embodiments of the present application do not limit this.

[0209] By setting the threshold of the signal rate of change increasing and the threshold of the signal rate of change decreasing, it is determined whether the signal rate of change is increasing or decreasing, or neither, so as to determine the required buffer size. For the signal at time t, if the rate of change is increasing, the buffer size B(t-1) at the previous time t-1 is increased by using the increasing coefficient α. If the rate of change is decreasing, the buffer size B(t-1) at the previous time t-1 is decreased by using the decreasing coefficient β. If neither increasing nor decreasing, the buffer size is unchanged.

[0210] 604. The electronic device adjusts the currently allocated buffer according to the buffer size.

[0211] The step 604 is the same as the adjustment of the buffer content in the above-mentioned step 203, and will not be described in detail here.

[0212] In a specific example, the signal characteristic is taken as the signal rate of change, and it is assumed that the initial buffer size B0=1024 bytes, the rate of change threshold θ1=0.5, θ2=0.1, the increasing coefficient α=1.2, the decreasing coefficient β=0.8, and the upper and lower limits of the buffer size are B min =512 bytes and B max =2048 bytes, respectively.

[0213] Obtain signal characteristics: obtain the signal rate of change

[0214] Buffer size initial setting: the initial buffer size B0=1024 bytes.

[0215] Buffer adjustment strategy application: since According to the formula B(t)=B(t-1)·α, it is calculated that B(t)=1024·1.2=1228.8 bytes.

[0216] Buffer size limit: the limit condition is applied, and B(t)=max(512,1228.8)=1228 bytes is obtained.

[0217] Dynamic adjustment process: the buffer size is updated to 1228 bytes, and the signal acquisition at the next time is performed. If the signal rate of change at the next time is According to the formula B(t) = B(t-1) * β, B(t) = 1228 * 0.8 = 982.4 bytes is calculated. The restriction condition is applied to obtain B(t) = max(512, 982.4) = 982 bytes.

[0218] Through the above steps, the buffer adjustment algorithm can dynamically adjust the buffer size according to the real-time signal change characteristics, which not only ensures the complete capture of the signal, but also optimizes the resource utilization.

[0219] The application provides a specific buffer size determination formula, which increases the buffer size when the signal change rate of the RapidIO protocol is accelerated, and decreases the buffer size when the signal change rate of the RapidIO protocol is decelerated. If neither acceleration nor deceleration occurs, the buffer size remains unchanged. In this way, the buffer size is dynamically adjusted, the RapidIO protocol signal can be completely captured, and resource waste caused by setting a too large buffer can be avoided.

[0220] Figure 7 is a flowchart of a buffer adjustment method for a RapidIO protocol signal provided by an embodiment of the application. The method is applied to an electronic device, which is a server, as shown in Figure 7 The method comprises the following steps.

[0221] 701. The electronic device collects the RapidIO protocol signal in real time during the transmission of the RapidIO protocol signal.

[0222] This step 701 is the same as the above steps 201, 501 and 601, and will not be described in detail here.

[0223] 702. The electronic device extracts the features of the collected RapidIO protocol signal to obtain the signal characteristics of the RapidIO protocol signal.

[0224] This step 702 is the same as the above steps 202, 502 and 602, and will not be described in detail here.

[0225] 703. The electronic device determines the buffer size by the following formula:

[0226]

[0227] Wherein, B(t) is the buffer size at time t, B(t-1) is the buffer size at the previous time t-1, α is the buffer increase coefficient (α>1), β is the buffer decrease coefficient (0<β<1), θ1 is the threshold of the signal change rate acceleration, θ2 is the threshold of the signal change rate deceleration, is the smooth change rate at time t.

[0228] The step 703 is the same as the step 603 described above, and thus will not be described again.

[0229] 704. The electronic device evaluates a required buffer block according to the buffer size.

[0230] 705. The electronic device searches for a closest idle buffer block in the buffer pool.

[0231] The closest idle buffer block can be determined according to experience or requirements by a person skilled in the art, for example, a buffer block with a size closest to and not exceeding the required value is preferentially selected, and the embodiments of the present application are not limited in this regard.

[0232] 706. The electronic device assigns the found idle buffer block to the current signal acquisition task and marks it as occupied.

[0233] The present application provides a specific way of adjusting the buffer, after evaluating the required buffer block, the best idle buffer block is searched for and assigned, so that the buffer size is just right. Dynamically adjusting the buffer size can completely capture the RapidIO protocol signal and will not cause resource waste due to setting a too large buffer.

[0234] Figure 8 is a flowchart of a buffer adjustment method for a RapidIO protocol signal provided by an embodiment of the present application. The method is applied to an electronic device, which is a server, as shown in Figure 8 The method includes the following steps.

[0235] 801. The electronic device collects the RapidIO protocol signal in real time in response to the RapidIO protocol signal reaching a trigger condition during the transmission of the RapidIO protocol signal.

[0236] In the embodiments of the present application, the electronic device does not need to perform signal collection and adjust the buffer size at every moment, and a trigger condition can be set, and the electronic device will trigger signal collection only when the trigger condition is reached.

[0237] In some embodiments, in response to the RapidIO protocol signal not reaching the trigger condition during the transmission of the RapidIO protocol signal, the electronic device ignores the RapidIO protocol signal.

[0238] 802. The electronic device extracts features of the collected RapidIO protocol signal to obtain signal features of the RapidIO protocol signal.

[0239] The step 802 is the same as the step 202, the step 502, the step 602 and the step 702, and thus will not be described here.

[0240] 803. The electronic device adjusts the buffer size in real time according to the signal feature.

[0241] The step 803 is the same as the step 203, and thus will not be described here.

[0242] Similarly, in some embodiments, the step 803 can be replaced by step one and step two.

[0243] Step one: in response to the signal feature indicating that the RapidIO protocol signal changes faster, the electronic device increases the buffer size. The step one is the same as the step 503, and thus will not be described here.

[0244] Step two: in response to the signal feature indicating that the RapidIO protocol signal changes slower, the electronic device decreases the buffer size. The step two is the same as the step 504, and thus will not be described here.

[0245] Similarly, in some embodiments, the step 803 can be replaced by step A and step B.

[0246] Step A: the electronic device determines the buffer size by the following formula:

[0247]

[0248] Wherein, B(t) is the buffer size at time t, B(t-1) is the buffer size at previous time t-1, α is the buffer increasing coefficient (α>1), β is the buffer decreasing coefficient (0<β<1), θ1 is the threshold of signal change rate acceleration, θ2 is the threshold of signal change rate deceleration, is the smooth change rate at time t. The step A is the same as the step 603, and thus will not be described here.

[0249] Step B: the electronic device adjusts the currently allocated buffer according to the buffer size. The step B is the same as the step 604, and thus will not be described here.

[0250] Similarly, in some embodiments, the step 803 can be replaced by steps ① to ④.

[0251] Step ①: the electronic device determines the buffer size by the following formula:

[0252]

[0253] Wherein, B(t) is the buffer size at time t, B(t-1) is the buffer size at previous time t-1, a is the buffer increasing coefficient (a>1), β is the buffer decreasing coefficient (0<β<1), θ1 is the threshold of signal change rate acceleration, θ2 is the threshold of signal change rate deceleration, The step 1 is the same as the step 603 and the step 703, and thus will not be repeated here.

[0254] The step 2 is the same as the step 704, and thus will not be repeated here.

[0255] The step 3 is the same as the step 705, and thus will not be repeated here.

[0256] The step 4 is the same as the step 706, and thus will not be repeated here.

[0257] In the embodiment of the present application, the electronic device does not need to collect signals and adjust the buffer size at each time, and a trigger condition can be set, so that the electronic device will be triggered to collect signals only when the trigger condition is reached, which greatly reduces the load of the electronic device, and avoids unnecessary collection and adjustment process, effectively improving the accuracy and efficiency of adjustment.

[0258] Figure 9 is a flow chart of a buffer adjustment method of a RapidIO protocol signal provided by the embodiment of the present application, the method is applied to an electronic device, and the electronic device is a server, referring to Figure 9 The method comprises the following steps.

[0259] 901. In the process of transmitting the RapidIO protocol signal, the electronic device collects the RapidIO protocol signal in real time in response to the trigger condition of the RapidIO protocol signal.

[0260] The step 901 is the same as the step 801, and thus will not be repeated here.

[0261] The trigger condition is adjusted based on the prediction result output by the signal state prediction model. The specific adjustment method can be found in the steps 804 and 805.

[0262] 902. The electronic device extracts the signal features of the collected RapidIO protocol signal.

[0263] The step 902 is the same as the steps 202, 502, 602, 702 and 802 described above, and thus will not be described again.

[0264] 903、The electronic device adjusts the buffer size in real time according to the signal feature.

[0265] The step 903 is the same as the steps 203 and 803 described above, and thus will not be described again.

[0266] 904、The electronic device inputs the signal feature of the RapidIO protocol signal into the signal state prediction model, and predicts the signal state of the RapidIO protocol signal based on the signal feature of the RapidIO protocol signal through the model parameters of the signal state prediction model, and outputs a prediction result, which is used to indicate the signal state of the RapidIO protocol signal.

[0267] The electronic device considers that in the related art, the signal collection strategy is usually set in advance, and the signal is collected and stored according to the fixed signal collection strategy. Due to the real-time change of the signal, it is difficult to ensure the complete capture of the signal by using the static collection strategy. In the embodiments of the present application, a dynamic collection strategy is provided, which can predict the signal state of the RapidIO protocol signal through the signal state prediction model, and then adjust different trigger conditions according to different signal states.

[0268] In some embodiments, the signal state includes an impending rapid change and a stable state. It can be understood that when the signal state is used to indicate that the RapidIO protocol signal is about to change rapidly, that is, when the model predicts that the RapidIO protocol signal is about to change rapidly, the trigger condition can be adjusted in advance to ensure that the key signal can be captured. When the signal state is used to indicate that the RapidIO protocol signal is in a stable state, that is, when the model predicts that the RapidIO protocol signal is in a stable state, the trigger condition can be relaxed to reduce invalid collection and reduce device load.

[0269] The signal state prediction model is a machine learning model. The technical principle of the machine learning model is that the machine learning model and the trigger condition adjustment module combine advanced machine learning algorithms and intelligent decision mechanisms to realize the recognition of the dynamic characteristics of the RapidIO protocol signal and the adaptive adjustment of the collection trigger condition. The core of the module is to train a machine learning model that can accurately recognize signal features, and use the prediction result of the model to dynamically adjust the trigger condition of the collection system, so as to ensure that the key signal is not lost, reduce invalid collection, and improve the overall efficiency and accuracy of the system.

[0270] For the signal state prediction model, the signal state prediction model can be trained in advance so as to be called when signal state prediction is needed. In some embodiments, the stock transaction model adopts a preset network architecture and is trained, tested and verified based on sample data. That is, before the signal state prediction model is applied, the signal state prediction model adopts a certain algorithm, designs appropriate network structure and parameters, establishes a prediction model, trains the model through a large number of training sample data, and evaluates and adjusts through validation data and test data.

[0271] The signal state prediction model can adopt a support vector machine (SVM) or a neural network, and the network architecture of the signal state prediction model is not limited in the embodiments of the present application.

[0272] In some embodiments, the signal state prediction model can be trained in advance and stored in the electronic device, and when the electronic device needs to predict the signal state, the signal state prediction model can be called from the local storage. In other embodiments, the signal state prediction model can also be trained in advance and stored in the database of the server, and when the electronic device needs to predict the signal state, the signal state prediction model can be called from the database of the server, or the signal features extracted by the feature extraction can be sent to the server, and the server can perform the step of predicting the signal state in step 904, and then return the output prediction result to the electronic device. The above provides two possible embodiments, and the storage address of the signal state prediction model is not limited in the embodiments of the present application.

[0273] For the training process of the signal state prediction model, a possible training process is provided below, but it is not limited to the following manner, and the specific training method is not limited in the embodiments of the present application.

[0274] In some embodiments, the process of training the signal state prediction model can be: obtaining a large amount of signal feature data of RapidIO protocol signals, each signal feature data carrying labeled data indicating the target signal state of the RapidIO protocol signal in each signal feature data. Then input the signal feature data of a large amount of RapidIO protocol signals into the initial signal state prediction model, and predict the signal state of the RapidIO protocol signal based on the input signal feature data according to the initial model parameters of the initial signal state prediction model, and output the predicted signal state. Then update the model parameters of the initial signal state prediction model according to the error between the predicted signal state and the target signal state in the labeled data. Then continue to input the signal feature data of a large amount of RapidIO protocol signals into the initial signal state prediction model, and continue to predict by the updated model parameters, that is, repeat the above input signal feature data, prediction, and update model parameters process until a target condition is reached, the training is completed, and the signal state prediction model is obtained.

[0275] Wherein, the process of predicting by the initial signal state prediction model based on the input signal feature data and adjusting the model parameters is an iteration process, and the process of model training is a plurality of iteration processes, and the model parameters are updated through a plurality of iterations, so that the prediction performance of the updated model parameters is better and better.

[0276] For the target condition, the target condition can be that the number of iterations reaches a target number, or the error between the predicted signal state and the target signal state in the labeled data converges. The target number can be set by relevant technical personnel according to experience, and the specific value of the target condition and the target number is not limited in the embodiments of the present application.

[0277] In some embodiments, the process of obtaining a large amount of signal feature data of RapidIO protocol signals can be to collect the extracted signal feature data from the above feature extraction module, including frequency, amplitude, waveform, etc. Further, after collecting the extracted signal feature data, data cleaning can be performed to adapt to the required conditions or format requirements of model training. For example, the data cleaning process can be to remove outliers and noise to ensure data quality. Correspondingly, the labeled data can be obtained by labeling the collected data. Further, after collecting the extracted signal feature data and the labeled data, data segmentation can be performed. The process of data segmentation can be to divide the data set into a training set, a validation set, and a test set to ensure the fairness of model training and validation.

[0278] For the model training process, the following is added:

[0279] For model selection, appropriate machine learning models can be selected according to the characteristics of signal features and labeled data, such as support vector machine (SVM), neural network (NN), etc.

[0280] For model training, the selected machine learning model can be trained using labeled data, and the model performance can be optimized by adjusting the model parameters.

[0281] For model validation, independent validation data sets are used to evaluate the accuracy of the model to ensure that the model has good generalization ability.

[0282] For performance indicators: define evaluation indicators of model performance, such as accuracy, recall, F1 score, etc., that is, the above errors can be evaluated by these accuracy, recall, F1 score, etc. The embodiments of the present application are not limited.

[0283] For hyperparameter tuning, that is, in the above model parameter updating process, including hyperparameter tuning, describes how to select and adjust the hyperparameters of the model, for example, using grid search, random search or Bayesian optimization, etc.

[0284] 905, the electronic device adjusts the trigger condition according to the prediction result.

[0285] After obtaining the prediction result by the model, that is, predicting the state of the signal, the trigger condition can be adjusted, and the adaptive acquisition strategy is realized.

[0286] Specifically, how to adjust the trigger condition according to the prediction result can be determined by relevant technical personnel according to demand or experience, for example, in some embodiments, in response to the prediction result indicating that the RapidIO protocol signal is about to change rapidly, the electronic device sets the threshold in the trigger condition to a first threshold or lowers the threshold in the trigger condition. In response to the prediction result indicating that the RapidIO protocol signal is in a stable state, the electronic device sets the threshold in the trigger condition to a second threshold or raises the threshold in the trigger condition, the second threshold being higher than the first threshold. The embodiments of the present application are not limited.

[0287] For trigger condition adjustment strategy, the following can be set:

[0288] Trigger threshold setting: set the trigger threshold according to the model prediction result. For example, when the model predicts that the signal is about to change rapidly, lower the trigger threshold and improve the sensitivity of the acquisition system.

[0289] Dynamic adjustment mechanism: real-time receive model prediction result, dynamically adjust the trigger condition according to the predicted signal state. For example, when the model predicts that the signal is in a stable state, increase the trigger threshold and reduce invalid acquisition.

[0290] Real-time monitoring: Implement a real-time monitoring system that can receive model outputs and quickly adjust the trigger conditions.

[0291] Safety mechanism: Design a safety mechanism to ensure that when the model's prediction is uncertain, the trigger conditions do not lead to incorrect acquisition behavior.

[0292] For the trigger condition adjustment process, the specific steps can include the following:

[0293] Real-time prediction: The machine learning model makes predictions on real-time signal features, outputting signal state prediction results.

[0294] Condition adjustment: Based on the prediction results, dynamically adjust the trigger conditions of the acquisition system.

[0295] Acquisition execution: The acquisition system executes signal acquisition according to the adjusted trigger conditions.

[0296] Feedback loop: Establish a feedback loop to feed back the acquisition results to the model for continuous optimization of model performance.

[0297] Exception handling: Describe how to handle exceptions in model prediction, such as when the model prediction does not match the actual signal state, and how to manually intervene in adjustments.

[0298] In the implementation process, the specific implementation details of the machine learning model and the trigger condition adjustment module may need to be adjusted according to the actual signal characteristics and application requirements. For example, for different signal types, different machine learning models and trigger condition adjustment strategies may be required. In addition, the training and verification process of the model also needs to be optimized according to the specific application scenario to ensure the accuracy and practicality of the model.

[0299] In some embodiments, different signal types correspond to different machine learning models and / or trigger condition adjustment strategies. In step 904, the electronic device can identify the signal type of the RapidIO protocol signal, call the machine learning model corresponding to the signal type according to the signal type, input the signal features of the RapidIO protocol signal into the machine learning model, and predict the signal state of the RapidIO protocol signal based on the signal features of the RapidIO protocol signal. The machine learning model outputs the prediction results. And / or, in step 905, the electronic device can extract the trigger condition adjustment strategy corresponding to the signal type according to the signal type, and then adjust the trigger condition according to the prediction result and the trigger condition adjustment strategy.

[0300] In a specific example, suppose in an experiment we use a neural network as a machine learning model to dynamically identify the features of a RapidIO protocol signal.

[0301] Step 1) Data Preparation and Preprocessing

[0302] Data Collection: Extract signal feature data from RapidIO devices, including frequency, amplitude, waveform, and other parameters. Data Cleaning: Identify and remove outliers and noise through statistical analysis methods to ensure data quality. Data Annotation: Label signals in the dataset as "rapid change," "slow change," or "stable" by domain experts. Data Segmentation: Divide the dataset into training set (70%), validation set (15%), and test set (15%).

[0303] Step 2) Machine Learning Model Training

[0304] Model Selection: Choose deep neural network (DNN) as the machine learning model based on the complexity of signal features and labeled data. Model Training: Train DNN using the training set, including adjusting weights and biases to minimize the loss function. Model Validation: Evaluate the model's performance using the validation set to ensure it does not overfit. Performance Metrics: The model's accuracy reaches 96%, recall reaches 94%, and F1 score reaches 95%. Hyperparameter Tuning: Optimize learning rate, batch size, and neural network layer number using grid search methods.

[0305] Step 3) Trigger Condition Adjustment Strategy

[0306] Trigger Threshold Setting: Set different trigger thresholds based on model predictions. For example, set the threshold to 0.1 when predicting "rapid change" and 0.7 when predicting "stable." Dynamic Adjustment Mechanism: Monitor model output in real-time and dynamically adjust trigger thresholds based on signal state predictions.

[0307] Step 4) Trigger Condition Adjustment Process

[0308] Real-Time Prediction: DNN model predicts real-time signal features and outputs the predicted result of the current signal state.

[0309] Example:

[0310] Real-Time Signal: Monitor RapidIO signals and detect changes.

[0311] Model Prediction: DNN predicts that the signal will change from "stable" to "rapid change" within 2 seconds.

[0312] Trigger Threshold Adjustment: The system reduces the trigger threshold from 0.7 to 0.1.

[0313] Condition Adjustment: Based on the prediction result, the system automatically adjusts the trigger conditions of the acquisition system.

[0314] Collection Execution: The collection system collects signals based on the new trigger conditions.

[0315] Feedback Loop: The collected data is fed back to the model for continuous learning and optimization.

[0316] Abnormality Handling: When the model's prediction does not match the actual signal state, for example, it predicts "stable" but the signal suddenly changes, the system initiates an abnormality handling mechanism.

[0317] Abnormality Handling Example:

[0318] Case: The model predicts the signal as "stable", but the actual signal suddenly rises.

[0319] Response: The system triggers an alarm, the operator intervenes to check the signal and the model's prediction, and manually adjusts the trigger conditions if necessary.

[0320] Through the above steps, the machine learning model and the trigger condition adjustment module can effectively identify the dynamic characteristics of the RapidIO protocol signal and adaptively adjust the trigger conditions, thereby improving the accuracy and efficiency of signal collection.

[0321] The application effectively solves the problem of capturing RapidIO protocol dynamic signals by dynamically adjusting buffer size and adaptive collection strategy, has the advantages of high capture rate, resource efficient utilization and intelligent adaptation, significantly improves the efficiency and accuracy of data collection, and is suitable for high-performance computing and communication fields.

[0322] Figure 10 is a flowchart of a buffer adjustment method for RapidIO protocol signals provided by an embodiment of the present application. The method is applied in an electronic device, which is a server, as shown in Figure 10 The method includes the following steps.

[0323] 1001, the electronic device collects the RapidIO protocol signal in real time in response to the RapidIO protocol signal reaching the trigger condition during the transmission of the RapidIO protocol signal.

[0324] Step 1001 is the same as steps 801 and 901 described above, and will not be described in detail here.

[0325] 1002, the electronic device extracts the signal characteristics of the collected RapidIO protocol signal to obtain the signal characteristics of the RapidIO protocol signal.

[0326] This step 1002 is the same as steps 202, 502, 602, 702, 802 and 902 described above, and will not be described in detail here.

[0327] 1003、the electronic device adjusts the buffer size in real time according to the signal feature.

[0328] The step 1003 is the same as the step 203, the step 803 and the step 903, and thus is not described here again.

[0329] 1004、the electronic device inputs the signal feature of the RapidIO protocol signal into the signal state prediction model, and predicts the signal state of the RapidIO protocol signal based on the signal feature of the RapidIO protocol signal through the model parameters of the signal state prediction model, and outputs a prediction result, which is used to indicate the signal state of the RapidIO protocol signal.

[0330] The step 1004 is the same as the step 904, and thus is not described here again.

[0331] 1005、in response to the prediction result indicating that the RapidIO protocol signal is about to change rapidly, the electronic device sets the threshold in the trigger condition as a first threshold or lowers the threshold in the trigger condition.

[0332] The first threshold can be set by a related technical person according to requirements or experience, and embodiments of the present application do not limit this.

[0333] In the step 1005, when it is predicted that the RapidIO protocol signal is about to change rapidly, the threshold of the trigger condition can be lowered, that is, the trigger condition is adjusted in advance, and thus signal collection can be more realized and signal loss can be avoided. When the model predicts that the signal is about to change rapidly, the trigger threshold is lowered, and the sensitivity of the collection system is improved.

[0334] 1006、in response to the prediction result indicating that the RapidIO protocol signal is in a stable state, the electronic device sets the threshold in the trigger condition as a second threshold or raises the threshold in the trigger condition, the second threshold being higher than the first threshold.

[0335] The second threshold can be set by a related technical person according to requirements or experience, and embodiments of the present application do not limit this.

[0336] In the step 1006, when it is predicted that the RapidIO protocol signal is in a stable state, the threshold of the trigger condition can be raised, that is, the trigger condition is relaxed, and thus invalid collection can be reduced and resource waste can be avoided.

[0337] For example, the trigger threshold setting can be: different trigger thresholds are set according to model prediction. For example, when the prediction is “rapid change”, the threshold is set to 0.1; and when the prediction is “stable”, the threshold is set to 0.7.

[0338] The application solves the problem of dynamic signal capture of the RapidIO protocol by dynamically adjusting the buffer size and the adaptive acquisition strategy, has the advantages of high capture rate, efficient resource utilization and intelligent adaptation, significantly improves the efficiency and accuracy of data acquisition, and is suitable for high-performance computing and communication fields.

[0339] All the optional technical solutions described above can be combined to form optional embodiments of the application, which will not be described one by one here.

[0340] Figure 11 is a structural schematic diagram of a buffer adjustment device for a RapidIO protocol signal provided by an embodiment of the application, referring to Figure 11 The device comprises:

[0341] The acquisition module 1101 is configured to acquire the RapidIO protocol signal in real time during transmission of the RapidIO protocol signal.

[0342] The extraction module 1102 is configured to extract features of the acquired RapidIO protocol signal to obtain signal features of the RapidIO protocol signal.

[0343] The adjustment module 1103 is configured to adjust the buffer size in real time according to the signal features.

[0344] In some embodiments, the adjustment module 1103 is configured to:

[0345] increase the buffer size in response to the signal features indicating that the RapidIO protocol signal changes faster;

[0346] decrease the buffer size in response to the signal features indicating that the RapidIO protocol signal changes slower.

[0347] In some embodiments, the adjustment module 1103 is configured to:

[0348] determine the buffer size by the following formula:

[0349]

[0350] wherein B(t) is the buffer size at time t, B(t-1) is the buffer size at previous time t-1, α is a buffer increase coefficient (α>1), β is a buffer decrease coefficient (0<β<1), θ1 is a threshold value of signal change rate acceleration, θ2 is a threshold value of signal change rate deceleration, is the smooth change rate at time t;

[0351] adjust the currently allocated buffer according to the buffer size.

[0352] In some embodiments, the adjustment module 1103 is configured to:

[0353] According to the buffer size, evaluate a currently required buffer block;

[0354] Find an idle buffer block closest to the required buffer block in a buffer pool;

[0355] Assign the found idle buffer block to the current signal acquisition task and mark it as occupied.

[0356] In some embodiments, the acquisition module 1101 is configured to:

[0357] During the transmission of the RapidIO protocol signal, in response to the RapidIO protocol signal reaching a trigger condition, the RapidIO protocol signal is acquired in real time.

[0358] In some embodiments, the trigger condition is adjusted based on a prediction result output by a signal state prediction model; the device further comprises:

[0359] A prediction module configured to input a signal feature of the RapidIO protocol signal into the signal state prediction model, and predict, by the signal state prediction model, a signal state of the RapidIO protocol signal based on the signal feature of the RapidIO protocol signal through model parameters, and output a prediction result, the prediction result being used to indicate the signal state of the RapidIO protocol signal.

[0360] The adjustment module 1103 is further configured to adjust the trigger condition according to the prediction result.

[0361] In some embodiments, the adjustment module 1103 is configured to:

[0362] In response to the prediction result indicating that the RapidIO protocol signal is about to change rapidly, set a threshold in the trigger condition to a first threshold or lower the threshold in the trigger condition;

[0363] In response to the prediction result indicating that the RapidIO protocol signal is in a stable state, set a threshold in the trigger condition to a second threshold or raise the threshold in the trigger condition, the second threshold being higher than the first threshold.

[0364] The device provided by the embodiments of the present application considers that the traditional fixed buffer is difficult to adapt to the rapidly changing dynamic signal, and the RapidIO protocol signal is acquired in real time, the buffer size is adjusted in real time according to the signal feature of the RapidIO protocol signal, the buffer size is dynamically adjusted, which can adapt to the real-time change of the signal, so that the RapidIO protocol signal can be captured completely, and resource waste caused by setting a too large buffer can be avoided.

[0365] It should be noted that the RapidIO protocol signal buffer adjustment device provided in the above embodiment is used in stock trading based on a deep neural network, and only the division of the above functional modules is used as an example. In actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the RapidIO protocol signal buffer adjustment device is divided into different functional modules to complete all or part of the functions described above. In addition, the RapidIO protocol signal buffer adjustment device provided in the above embodiment and the RapidIO protocol signal buffer adjustment method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.

[0366] Figure 12 is a structural schematic diagram of an electronic device provided by an embodiment of the present application. The electronic device 1200 can have great differences due to different configurations or performances, and can include one or more processors (Central Processing Units, CPUs) 1201 and one or more memories 1202. The memory 1202 stores at least one computer program, which is loaded and executed by the processor 1201 to implement the RapidIO protocol signal buffer adjustment method provided by each method embodiment described above. The electronic device can also include other components for realizing device functions, for example, the electronic device can also have a wired or wireless network interface and an input and output interface, etc., so as to perform input and output. Embodiments of the present application will not be repeated here.

[0367] In an exemplary embodiment, a computer readable storage medium is also provided, for example, a memory including at least one computer program, and the at least one computer program is executable by a processor to complete the RapidIO protocol signal buffer adjustment method in the above embodiment. For example, the computer readable storage medium can be a Read-Only Memory (ROM), a Random Access Memory (RAM), a Compact Disc Read-Only Memory (CD-ROM), a magnetic tape, a floppy disk and an optical data storage device, etc.

[0368] In an example embodiment, a computer program product or computer program is also provided, the computer program product or the computer program comprising one or more program codes stored in a computer readable storage medium. One or more processors of an electronic device can read the one or more program codes from the computer readable storage medium, and execute the one or more program codes, so that the electronic device can perform the above-mentioned buffer adjustment method of RapidIO protocol signals.

[0369] It should be understood that the size of the sequence number of each process described above does not mean the order of execution, and the execution order of each process should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0370] It should be understood that determining B according to A does not mean that B is determined only according to A, but B can also be determined according to A and / or other information.

[0371] Those of ordinary skill in the art can understand that all or part of the steps of the above-mentioned embodiments can be completed by hardware, or by program instructions to relevant hardware, and the program can be stored in a computer readable storage medium. The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc. The above description is only an optional embodiment of the present application, and does not limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. A method for adjusting the buffer of RapidIO protocol signals, characterized in that, The method includes: During the transmission of RapidIO protocol signals, in response to the RapidIO protocol signal reaching the trigger condition, the RapidIO protocol signal is acquired in real time. The RapidIO protocol is an embedded system interconnection technology, and the trigger condition is adjusted based on the prediction result output by the signal state prediction model. Feature extraction is performed on the collected RapidIO protocol signal to obtain the signal features of the RapidIO protocol signal; The buffer size is adjusted in real time based on the signal characteristics. The step of adjusting the buffer size in real time based on the signal characteristics includes: Based on the buffer size, assess the current required buffer block size; Find the free buffer block in the buffer pool that is closest to the required buffer block; The found free buffer block is allocated to the current signal acquisition task and marked as occupied; The step of adjusting the triggering condition based on the prediction result includes: In response to the prediction result indicating that the RapidIO protocol signal is about to change rapidly, the threshold in the trigger condition is set to a first threshold or the threshold in the trigger condition is lowered. In response to the prediction result indicating that the RapidIO protocol signal is in a stable state, the threshold in the trigger condition is set to a second threshold or the threshold in the trigger condition is increased, wherein the second threshold is higher than the first threshold; It also includes buffer pool design, dynamic allocation strategy, buffer release strategy, buffer reclamation and defragmentation, and buffer usage monitoring; The buffer pool initialization process involves pre-allocating a buffer pool containing multiple buffer blocks of different sizes when the system starts up. The dynamic allocation strategy includes demand assessment, best match finding, and allocation operations; The buffer release strategy includes a use-out detection and release operation, wherein the release operation includes marking the occupied buffer block as free and returning it to the buffer pool for use by subsequent tasks; The buffer reclamation and defragmentation includes periodically defragmenting and merging adjacent free buffer blocks to form larger usable buffer blocks.

2. The method for adjusting the buffer of RapidIO protocol signals according to claim 1, characterized in that, The step of adjusting the buffer size in real time based on the signal characteristics includes: In response to the signal characteristics indicating that the RapidIO protocol signal changes faster, the buffer size is increased; In response to the signal characteristics indicating that the RapidIO protocol signal changes are slowing down, the buffer size is reduced.

3. The method for adjusting the buffer of RapidIO protocol signals according to claim 1 or 2, characterized in that, The step of adjusting the buffer size in real time based on the signal characteristics includes: The buffer size is determined using the following formula; , in, For a moment buffer size, For the previous moment buffer size, Increase the buffer size by a factor , Decrease the coefficient for the buffer , The threshold for an accelerated rate of signal change. The threshold for slowing down the rate of change of the signal. For a moment The smooth rate of change; Adjust the currently allocated buffer according to the buffer size.

4. The method for adjusting the buffer of RapidIO protocol signals according to claim 1, characterized in that, The method further includes: The signal characteristics of the RapidIO protocol signal are input into the signal state prediction model. The signal state prediction model predicts the signal state of the RapidIO protocol signal based on the signal characteristics of the RapidIO protocol signal using model parameters, and outputs the prediction result, which is used to indicate the signal state of the RapidIO protocol signal. The triggering conditions are adjusted based on the prediction results.

5. A buffer adjustment device for RapidIO protocol signals, characterized in that, The apparatus is used to implement the buffer adjustment method for RapidIO protocol signals according to any one of claims 1 to 4, comprising: The acquisition module is used to acquire RapidIO protocol signals in real time during the transmission of RapidIO protocol signals in response to the RapidIO protocol signal reaching the trigger condition. The RapidIO protocol is an embedded system interconnection technology, and the trigger condition is adjusted based on the prediction result output by the signal state prediction model. The extraction module is used to extract features from the acquired RapidIO protocol signal to obtain the signal features of the RapidIO protocol signal; An adjustment module is used to adjust the buffer size in real time based on the signal characteristics.

6. An electronic device, characterized in that, The electronic device includes one or more processors and one or more memories, wherein the one or more memories store at least one computer program, which is loaded and executed by the one or more processors to implement the buffer adjustment method for RapidIO protocol signals as described in any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that, The storage medium stores at least one computer program, which is loaded and executed by a processor to implement the buffer adjustment method for RapidIO protocol signals as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Multi-domain fusion data acquisition method and system based on centralized architecture, and medium

    CN117471959A

  • Bluetooth playing buffer dynamic adjustment method, system and device and storage medium

    CN117715118A