Embedded storage interface data transmission method

Through DMA batch transmission and signal feature analysis, combined with DBSCAN density clustering algorithm, the sensor data flow of embedded devices is grouped and the abnormal signal blocks are read first, which solves the efficiency problem of embedded devices when processing periodic signals and improves data transmission efficiency and real-timeness.

CN120371747APending Publication Date: 2025-07-25SHANXI AGRI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510451538.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-11
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

When processing periodic analog signals, embedded devices use traditional sequential reading methods to cause inefficiency in data transmission, especially when communicating with multiple sensors.

Method used

DMA batch transmission and receiving sensor data streams are used, and signal blocks are grouped through signal feature analysis and DBSCAN density clustering algorithm, distinguish between conventional and abnormal signal blocks, prioritize handling of abnormal signal blocks, and use multi-channel DMA batch transmission and ring buffers to improve data transmission efficiency.

Benefits of technology

The priority processing of exception signal blocks is realized, real-time and efficiency of embedded devices when processing exception data is improved, and efficiency bottlenecks under the traditional sequential reading method are solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120371747A_ABST
    Figure CN120371747A_ABST
Patent Text Reader

Abstract

The invention discloses an embedded storage interface data transmission method. The method comprises the following steps: a first buffer area receives a data stream from a sensor, and each buffer unit of the first buffer area stores a signal block of the data stream; grouping the signal blocks written into the first buffer area; transferring each group of signal blocks to a different second buffer area; and sequentially reading the signal blocks in the second buffer areas to the embedded equipment according to the groups. According to the method, the sensor data flow is read in a grouping mode, and the problem that when the embedded device collects the sensor data, timeliness exists when periodic signals are processed in a traditional sequential reading mode is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data transmission, and in particular, to a method for data transmission of an embedded storage interface. Background Art

[0002] Data transmission of an embedded storage interface refers to the process of data reading and writing between a storage unit of an embedded device and an external device through an interface protocol in the embedded device.

[0003] A data buffer is a temporary storage area for data established by an embedded device during data transmission. The data buffer is usually located in the memory and is used to store data read from an input device or data to be written to an output device.

[0004] In the prior art, embedded devices are often used to be deployed at a scene site and collect and analyze output data of sensors. When processing periodic analog signals, the embedded device is prone to encounter bottlenecks when adopting a sequential reading method in the data buffer. Summary of the Invention

[0005] In view of this, a first aspect of the present invention discloses a method for data transmission of an embedded storage interface.

[0006] The method includes:

[0007] A first buffer receives a data stream from a sensor, and each buffer unit of the first buffer stores a signal block of the data stream;

[0008] Group the signal blocks written into the first buffer;

[0009] Transfer each group of the signal blocks to different second buffers;

[0010] Read the signal blocks in each of the second buffers to the embedded device in sequence according to the grouping.

[0011] In some embodiments disclosed by the present invention,

[0012] The first buffer receives the data stream by using DMA bulk transfer.

[0013] In some embodiments disclosed by the present invention,

[0014] The first buffer receives the data streams from multiple sensors by using multi-channel DMA bulk transfer, and the device types of the multiple sensors are the same and the environmental deployment relationships are similar.

[0015] In some embodiments disclosed by the present invention,

[0016] Grouping the signal blocks includes:

[0017] Extract the signal features of the signal blocks;

[0018] Group each of the signal blocks according to the signal features.

[0019] In some embodiments disclosed by the present invention,

[0020] Extract at least one time domain feature and / or at least one frequency domain feature of the signal blocks;

[0021] Group each of the signal blocks according to the time domain feature and / or the frequency feature.

[0022] In some embodiments disclosed by the present invention,

[0023] Grouping each of the signal blocks includes,

[0024] Extract the feature vectors of the signal blocks according to the time domain feature and / or the frequency domain feature;

[0025] Obtain the cosine similarity between each of the feature vectors;

[0026] Cluster according to the cosine similarity to obtain the grouping of each of the signal blocks.

[0027] In some embodiments disclosed by the present invention,

[0028] Grouping the signal blocks includes,

[0029] Group each of the signal blocks based on the DBSCAN density clustering algorithm and the cosine similarity.

[0030] In some embodiments disclosed by the present invention,

[0031] The method includes,

[0032] Divide the grouping of each of the signal blocks into at least one normal grouping and at least one abnormal grouping;

[0033] Transfer each of the abnormal groupings to different second buffers;

[0034] Transfer each of the normal groupings to different third buffers;

[0035] Read the signal blocks in each of the second buffers into the embedded device first;

[0036] Read the signal blocks in each of the third buffers into the embedded device later.

[0037] In some embodiments disclosed by the present invention,

[0038] The method includes,

[0039] Divide at least two of the abnormal groups into different abnormal sub - groups according to the degree of abnormality of the abnormal groups;

[0040] Transfer each of the abnormal groups to different second buffers;

[0041] Arrange the second buffers according to the degree of abnormality;

[0042] Read the signal blocks in each of the second buffers into the embedded device in sequence according to the arrangement order.

[0043] In some embodiments disclosed by the present invention,

[0044] The method includes,

[0045] Synchronously read the signal blocks in each of the second buffers into the embedded device.

[0046] Compared with the prior art, based on the signal characteristics of the sensor data stream, the embedded device groups the signal blocks in the data stream to filter out abnormal signal blocks different from the conventional signal blocks. In data buffering, it can selectively read the abnormal signal blocks preferentially, ensuring the real - time performance and efficiency of the embedded device when processing abnormal data. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0048] Figure 1 It is a schematic flow chart of the data transmission method of the embedded storage interface in this embodiment;

[0049] Figure 2 It is a schematic flow chart of grouping signal blocks in this embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0050] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.

[0051] An embodiment of the present invention discloses a method for data transmission of an embedded storage interface. The transmission method is applied to the data stream transmission and processing of a sensor and its matrix by an embedded device, and grouping processing of each signal block in the data stream is realized based on clustering grouping, especially priority processing of abnormal signal blocks.

[0052] Figure 1 It is a schematic flow chart of the method for data transmission of an embedded storage interface.

[0053] Figure 1 It shows that the method for data transmission of an embedded storage interface includes step 10 to step 40.

[0054] 10 The first buffer receives the data stream from the sensor, and each buffer unit of the first buffer stores the signal blocks of the data stream.

[0055] The data buffer of the embedded device is a reserved storage space in the memory, which is used to buffer the input or output data to reduce the number of data accesses between the embedded device and the storage interface and improve the operation efficiency of the embedded device. The first buffer is generally composed of multiple buffer units. Here, the first buffer can be configured as a circular buffer. The circular buffer uses a fixed-size memory space and realizes data writing and reading through the cyclic movement of the write and read pointers, which can efficiently utilize the memory, process continuous data streams and avoid frequent memory allocation.

[0056] The data stream of the sensor refers to the sensor output signal transmitted between the embedded device and the sensor through a serial storage interface. The sensor output signal includes one or more signal blocks, and each signal block usually contains data points of a complete waveform cycle of at least two consecutive sampling points.

[0057] Among them, in step 10, the first buffer can receive the data stream by using DMA bulk transfer.

[0058] DMA bulk transfer is a high-speed data transfer operation that allows direct data exchange between an external device and a memory. The execution of DMA bulk transfer is realized through a DMA bulk transfer module configured in the memory. Therefore, when the data stream of the sensor contains too many signal blocks, writing data into the first buffer one by one in the traditional way of using a write pointer will affect the data writing efficiency, while using DMA bulk transfer can write multiple signal blocks into the first buffer in batches.

[0059] In addition, in some application scenarios, embedded devices need to establish data communication links with multiple sensors simultaneously to receive data streams from multiple sensors simultaneously or within a short period of time, such as a sensor matrix deployed in an array. Multiple sensors in the sensor matrix generally have the same device type and an environmental deployment relationship with adjacent or similar positions, so as to comprehensively collect information about a certain device, environment, object, etc. in the application scenario, and improve the collection efficiency or accuracy of information through combined analysis and mutual verification. Therefore, for a sensor matrix that transmits data to an embedded device, the first buffer can use multi-channel DMA batch transmission to receive the data stream from the sensor matrix, so as to improve the efficiency of multi-channel collection by the embedded device.

[0060] 20 Cluster and group each of the signal blocks written to the first buffer.

[0061] Clustering and grouping all the written signal blocks means effectively screening out the abnormal signal blocks among all the signal blocks through the method of clustering and grouping. The specific reason is that signal blocks from the same sensor or sensor matrix have basically the same signal characteristics under a stable environment at different stages. For example, the temperature signals collected by a temperature sensor at noon for multiple cycles will be basically the same, or the heart rate signals collected by a heart rate sensor when a user is sleeping at night for multiple cycles will also be basically the same. Therefore, clustering and grouping multiple signal blocks helps to screen out the signal blocks that are significantly abnormal compared with general signal blocks. Significantly abnormal signal blocks are reasonably considered to be those that need to be read and processed preferentially during data transmission.

[0062] Among them, Figure 2 is a schematic flow diagram for grouping the signal blocks.

[0063] Figure 2 It is shown that grouping the signal blocks in step 20 includes steps 21 to 24.

[0064] S21 Extract the signal characteristics of the signal block.

[0065] The signal characteristics of a signal block refer to the time-domain characteristics and frequency-domain characteristics of the signal block. The time-domain characteristics can describe the characteristics of the sensor output signal in time, such as the average level, the degree of fluctuation, etc. The frequency-domain characteristics can describe the distribution and energy distribution of the sensor output signal at different frequencies.

[0066] Preferably, in this embodiment, the mean (μ), variance (σ 2 ) and the main frequency in the frequency domain (f_max) and other time-domain characteristics of the signal block are extracted, and at the same time, the main frequency and other frequency characteristics of the signal block are extracted.

[0067] Of course, in some embodiments, in order to improve the efficiency and accuracy of grouping signal blocks, other time-domain features and / or frequency-domain features, such as kurtosis, etc., may also be extracted.

[0068] S22 Extract the feature vector of the signal block according to the combination of multiple signal features.

[0069] The feature vector of the signal block refers to a vector extracted from the signal block data that can characterize the core characteristics of the signal.

[0070] Preferably, in this embodiment, the feature vector is obtained by combining the normalized mean (μ), variance (σ2), and main frequency in the frequency domain (f_max), where the normalization process is used to eliminate the dimensional difference.

[0071] In some embodiments, according to different sensor types and their application scenarios, signal features sensitive to the sensor and / or application scenario can be screened out. For example, kurtosis has an obvious effect on bearing fault diagnosis through signals.

[0072] S23 Obtain the cosine similarity between each of the feature vectors.

[0073] The cosine similarity refers to evaluating the similarity between two feature vectors by calculating the cosine value of the angle between them.

[0074] For example, where, v i and v j are feature vectors.

[0075] In some embodiments, the cosine similarity matrix between all the feature vectors can also be obtained.

[0076] For example,

[0077] S24 Cluster according to the cosine similarity to obtain the grouping of each of the signal blocks.

[0078] Among them, in this embodiment, each of the signal blocks is grouped based on the DBSCAN density clustering algorithm and the cosine similarity.

[0079] Preferably, in this embodiment, the cosine similarity is first converted into a cosine distance, then the neighborhood radius and the minimum number of samples are determined, and then the core points are marked. Finally, the groups for grouping are expanded according to the core points.

[0080] Obtaining the cosine distance is to convert the cosine similarity so that Among them, the value range of the cosine distance is from 0 to 2, where 0 indicates complete similarity and 2 indicates complete opposition.

[0081] The minimum number of samples is determined by multiplying the number of dimensions of the feature vector of the signal block by a coefficient, which is generally a constant n, where n ≤ 3.

[0082] The neighborhood radius is determined by finding the inflection point of the k-distance curve. For example, after sorting the matrix of cosine distances, the value of the neighborhood radius (ε) corresponding to the distance mutation point or the nearby mean value is selected.

[0083] Core points are marked by counting the number of other signal blocks within the neighborhood radius of each signal block. If the number of signal blocks is greater than or equal to the minimum number of samples, the signal block is marked as a core point.

[0084] Expanding the core points into groups means expanding all the signal blocks within the neighborhood radius of the core points into the same group.

[0085] Therefore, in this embodiment, multiple signal blocks are divided into different groups, and the signal blocks in different groups represent their normal or abnormal states. For example, the signal blocks are divided into an abnormal group and a normal group. The abnormal group represents that there are signal abnormalities in each signal block in the group, that is, there are abnormalities in the object collected by the sensor. The normal group represents that there are no signal abnormalities in each signal block in the group. In a stable environment, most signal blocks will be divided into the normal group, and very few signal blocks will be divided into the abnormal group due to abnormalities in the collected object.

[0086] 30 Transfer the signal blocks of each group to different second buffers.

[0087] Among them, the second buffer has the same architecture as the first buffer. In this embodiment, a circular buffer such as the first buffer can also be used. Each signal block in the same group will be transferred to its corresponding second buffer.

[0088] Preferably, in this embodiment, the abnormal group is first divided into multiple different abnormal sub-groups according to the degree of abnormality, and different abnormal sub-groups can represent various abnormal states of the object collected by the sensor in an unstable environment. Subsequently, each abnormal group is transferred to a different second buffer. Then different second buffers have different priority levels when reading data. At this time, the priority level of the second buffer is determined by the degree of abnormality of the signal block group stored in it. Then, the reading priorities of each second buffer are arranged according to the degree of abnormality, and finally, the signal blocks in each second buffer are read into the embedded device in the arranged order.

[0089] In some embodiments, classifying the signal blocks of each group obtained by clustering into a normal group or an abnormal group can be based on the Euclidean distance or cosine average value of the feature vector pairs of all signal blocks.

[0090] For example, where, Score(C i) is the comprehensive differentiation score for each group compared to all other groups, α is the weight coefficient, D is the average distance between groups, and CH is the contribution of the CH index for each group.

[0091] Among them, A and B are different groups.

[0092] Among them, WGSS is the within-group dispersion, BGSS is the between-group dispersion, N is the total number of signal blocks, and K is the number of groups.

[0093] Therefore, the comprehensive differentiation score can be used to determine the abnormal groups among the various groups. For example, when the comprehensive differentiation score of a certain group exceeds twice the average of the comprehensive differentiation scores of other groups, it is determined that this group is an abnormal group.

[0094] 40 Read each of the signal blocks in the second buffer to the embedded device in sequence according to the groups.

[0095] In some embodiments, this embodiment can always synchronously read each of the signal blocks in the second buffer to the embedded device. After the embedded device reads the signal blocks of each group, the embedded device establishes a priority for the processing order of the signal blocks of each group to ensure that the signal blocks of the abnormal group can be processed with the highest priority.

[0096] Based on this, the method of this embodiment groups each signal block in the data stream by using signal feature analysis and DBSCAN density clustering to distinguish the signal blocks representing different object states, and preferentially reads and processes the signal blocks and their groups representing abnormal object states during the data transmission process, improving the efficiency of data transmission and the timeliness of the embedded device's detection of abnormal data.

[0097] The present invention reads the sensor data stream in groups, solving the efficiency problem existing in the traditional sequential reading method when the embedded device collects sensor data and processes periodic signals.

[0098] The above is only the preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. An embedded storage interface data transmission method, characterized in that, The method includes, A first buffer receives a data stream from a sensor, and each buffer unit of the first buffer stores a signal block of the data stream; Group the signal blocks written into the first buffer; Transfer each group of the signal blocks to different second buffers; Read the signal blocks in each of the second buffers into the embedded device in sequence according to the grouping.

2. The embedded storage interface data transmission method according to claim 1, characterized in that, The first buffer uses DMA batch transmission to receive the data stream.

3. The embedded storage interface data transmission method according to claim 2, characterized in that, The first buffer uses multi-channel DMA batch transmission to receive the data streams from multiple sensors; the device types of the multiple sensors are the same and the environmental deployment relationships are similar.

4. The embedded storage interface data transmission method according to claim 1, characterized in that, Grouping the signal blocks includes, Extracting the signal features of the signal blocks; Grouping each of the signal blocks according to the signal features.

5. The embedded storage interface data transmission method according to claim 4, characterized in that, Extract at least one time-domain feature and / or at least one frequency-domain feature of the signal block; Group each of the signal blocks according to the time-domain feature and / or the frequency feature.

6. The embedded storage interface data transmission method according to claim 5, characterized in that, Grouping each of the signal blocks includes, Extracting a feature vector of the signal block according to the time-domain feature and / or the frequency-domain feature; Obtaining the cosine similarity between each of the feature vectors; Clustering according to the cosine similarity to obtain the grouping of each of the signal blocks.

7. The embedded storage interface data transmission method according to claim 6, characterized in that, Grouping the signal blocks includes, Grouping each of the signal blocks based on the DBSCAN density clustering algorithm and the cosine similarity.

8. The embedded storage interface data transmission method according to claim 7, characterized in that, The method includes, Dividing the grouping of each of the signal blocks into at least one normal group and at least one abnormal group; Transfer each of the abnormal groups to different second buffers; Transfer each of the normal groups to different third buffers; Read the signal blocks in each of the second buffers into the embedded device first; Read the signal blocks in each of the third buffers into the embedded device later.

9. The embedded storage interface data transmission method according to claim 8, characterized in that, The method includes, Dividing at least two of the abnormal groups into different abnormal sub-groups according to the degree of abnormality of the abnormal groups; Transfer each of the abnormal groups to different second buffers; Arranging each of the second buffers according to the degree of abnormality; Read the signal blocks in each of the second buffers into the embedded device in sequence according to the arrangement order.

10. The embedded storage interface data transmission method according to claim 1, characterized in that, The method includes, Synchronously read the signal blocks in each of the second buffers into the embedded device.