Microsecond-level time series data intelligent push method, device and equipment

By introducing intelligent push methods of timing data buffers and push queues in the field of software radio, the resource occupation and system lag caused by the processing process of waveform data processing unit is solved, and support for microsecond-level waveform data push and multi-waveform display and analysis is realized.

CN119254251BActive Publication Date: 2025-03-14DAYAO INFORMATION TECH (HUNAN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411761368.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-03
Publication Date
2025-03-14
Estimated Expiration
2044-12-03

AI Technical Summary

Technical Problem

In the field of software radio, when waveform generation components push original waveform data at microsecond speeds, the processing process of the waveform data processing unit is milliseconds, resulting in the accumulation of original waveform data, increased memory usage, long-term use of CPU resources, system lag and denial of service, and the inability to support multi-waveform display and analysis.

Method used

Design a microsecond-level intelligent push method for timing data. By introducing a timing data buffer and timing data push queue, the data calculation and conversion process is optimized, so that the data calculation and conversion unit is only in high-speed calculation in the first cycle, and then only special points are calculated to reduce repeated calculations and reduce resource usage.

Benefits of technology

It realizes the push of waveform data in microseconds without losing data and increasing CPU and memory resources, and supports simultaneous display and analysis of multiple users and multiple waveforms, reducing the uncertainty of system performance and improving the efficiency of complex waveform data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119254251B_ABST
    Figure CN119254251B_ABST
Patent Text Reader

Abstract

The present invention relates to a method, device and equipment for intelligently pushing time series data at the microsecond level. A time series data buffer and a time series data pushing queue are introduced by design, and the pushing processing flow is improved, so that a data calculation and conversion unit is basically in a high-speed calculation and conversion process only in the first cycle. After the first cycle ends, the data calculation and conversion unit only needs to calculate special points in the data, so that when the same waveform data is used for display and analysis by multiple user terminals, the data calculation and conversion unit does not need to continue to repeat calculations for multiple user terminals. With the continuous pushing of waveform data, the complexity and resource occupation will become smaller and smaller, and finally the influence of the calculation and conversion time uncertainty of the data calculation and conversion unit on the system performance under different display and analysis requirements is shielded, and the advantages are significant in complex waveform data display and analysis requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of waveform data processing, and relates to a method, device and equipment for intelligently pushing microsecond-level time series data. Background Art

[0002] In the field of software radio, waveform generation components usually push raw waveform data to waveform data processing units at a speed of microseconds. After receiving a set of waveforms, the waveform data processing unit usually needs to recalculate and convert these raw waveform data, such as FFT Fourier transform, in order to graphically display and analyze the raw waveform data.

[0003] Normally, the calculation and conversion process of raw waveform data is very fast. For example, if the length of raw waveform data is 2048, the FFT Fourier transform, log10 transform and data formatting of raw waveform data will be completed within 100 milliseconds. The problem is that the waveform generation component pushes data at the microsecond level, while the processing process of the waveform data processing unit is at the millisecond level. This will cause: (i) A lot of raw waveform data is piled up waiting for the waveform data processing unit to process, and the memory space occupied by it is also increasing until all the memory is consumed; (ii) The millisecond-level data calculation and conversion process will cause the waveform data processing unit to occupy CPU computing resources for a long time, and the server cannot process other business requests, causing serious system jams and even denial of service; (iii) High memory and high CPU usage means that even systems with B / S architecture (browser and server architecture mode) can usually only support the display and analysis of one waveform. In addition, for the display and analysis requirements of complex waveforms, the data calculation and conversion process becomes more complicated, and the resource consumption and processing time will increase significantly. Therefore, studying how to achieve microsecond-level waveform data push without losing data and increasing CPU and memory resources has become a technical problem to be solved. Summary of the invention

[0004] In response to the problems existing in the above-mentioned traditional technologies, the present invention proposes a microsecond-level time series data intelligent push method, a microsecond-level time series data intelligent push device and a computer device, which can realize microsecond-level waveform data push without losing data and increasing CPU and memory resources.

[0005] In order to achieve the above objectives, the embodiments of the present invention adopt the following technical solutions:

[0006] On the one hand, a microsecond-level time series data intelligent push method is provided, comprising the steps of:

[0007] Get the raw waveform data pushed by the waveform generation component at a speed of microseconds;

[0008] Store the original waveform data into the original waveform data queue;

[0009] Taking out one cycle of original waveform data from the original waveform data queue as a basic data unit and generating a microsecond-level timestamp corresponding to the current time of the basic data unit;

[0010] Insert the basic data unit to the end of the time series data push queue according to the current microsecond timestamp, set the data state of the element where the basic data unit is located to unready state and the data block to empty; the elements in the time series data push queue include timestamp, data state and data block;

[0011] Each data point in the basic data unit is read sequentially to the timing data buffer through the data calculation and conversion unit for hit detection; the timing data buffer is used to sort the data items corresponding to the data points in the original waveform data according to the order of the size of the data points, and each data item consists of a data point and the result data obtained after the data point is calculated and converted;

[0012] If a hit occurs, the result data corresponding to the hit data point is directly taken out from the time series data buffer; otherwise, the data point is calculated and converted by the data calculation and conversion unit to obtain the result data of the data point;

[0013] According to the current microsecond timestamp and result data, the data state of the element where the basic data unit in the time series data push queue is located is updated to the ready state and the data block is updated to the result data;

[0014] The time series data push queue is used to push the data blocks in the ready state to the user end in sequence from the head of the queue for waveform data display and analysis, and remove the elements that have been pushed.

[0015] On the other hand, a microsecond-level time series data intelligent push device is also provided, including:

[0016] A data acquisition module is used to acquire the original waveform data pushed by the waveform generation component at a speed of microseconds;

[0017] A queue storage module is used to store the original waveform data into the original waveform data queue;

[0018] A unit generation module, used for taking out a period of original waveform data from the original waveform data queue as a basic data unit and generating a microsecond-level timestamp of the current time corresponding to the basic data unit;

[0019] The push insertion module is used to insert the basic data unit into the tail of the time series data push queue according to the current microsecond timestamp, and set the data state of the element where the basic data unit is located to the unready state and the data block to be empty; the elements in the time series data push queue include timestamp, data state and data block;

[0020] A hit detection module is used to read each data point in the basic data unit in sequence to the timing data buffer for hit detection through the data calculation and conversion unit; the timing data buffer is used to sort the data items corresponding to the data points in the original waveform data according to the size order of the data points, and each data item consists of a data point and the result data obtained after the data point is calculated and converted;

[0021] A result acquisition module is used to directly retrieve the result data corresponding to the hit data point in the time series data buffer when a hit occurs; otherwise, the data calculation and conversion unit is used to perform calculation and conversion of the data point to obtain the result data of the data point;

[0022] The queue update module is used to update the data state of the element where the basic data unit in the time series data push queue is located to the ready state and the data block to the result data according to the current microsecond timestamp and result data;

[0023] The time series data push queue is used to push the data blocks in the ready state to the user end in sequence from the head of the queue for waveform data display and analysis, and remove the elements that have been pushed.

[0024] On the other hand, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the above-mentioned microsecond-level time series data intelligent push method are implemented.

[0025] One of the above technical solutions has the following advantages and beneficial effects:

[0026] The above-mentioned microsecond-level time series data intelligent push method, device and equipment introduce a time series data buffer and a time series data push queue by design, and improve the push processing flow, so that the data calculation and conversion unit is basically in a high-speed calculation and conversion process only in the first cycle. After the first cycle ends, the data calculation and conversion unit only needs to calculate special points in the data, so that when the same waveform data is used for display and analysis by multiple user terminals, the data calculation and conversion unit does not need to continue to repeat calculations for multiple user terminals. As the waveform data is continuously pushed, the data in the time series data buffer is continuously updated, and the number of missed data points will become smaller and smaller, so that the complexity and resource occupancy will also become smaller and smaller, and finally the influence of the calculation and conversion time uncertainty of the data calculation and conversion unit on the system performance under different display and analysis requirements is shielded, and it has significant advantages in complex waveform data display and analysis requirements. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the conventional technology, the drawings required for use in the embodiments or the conventional technology descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0028] Figure 1 It is a flowchart of a method for intelligently pushing microsecond-level time series data in one embodiment;

[0029] Figure 2 A schematic diagram of a data structure of a timing data buffer in an embodiment;

[0030] Figure 3 A schematic diagram of the data structure of a time series data push queue in one embodiment;

[0031] Figure 4 A schematic diagram of the application process of a microsecond-level time series data intelligent push method according to an embodiment;

[0032] Figure 5 Schematic diagram of the module structure of a device for intelligently pushing microsecond-level time series data in an embodiment. DETAILED DESCRIPTION

[0033] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention is further described in detail below in conjunction with the accompanying drawings and Examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those generally understood by those skilled in the art of the present invention. The terms used in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention.

[0034] It should be noted that the reference to "embodiment" in this article means that the specific features, structures or characteristics described in conjunction with the embodiment may be included in at least one embodiment of the present invention. The presentation of this phrase at various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It will be appreciated by those skilled in the art that the embodiments described herein may be combined with other embodiments. The term "and / or" used in the specification of the present invention and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes these combinations.

[0035] The following will describe the implementation of the present invention in detail with reference to the accompanying drawings in the embodiment diagram of the present invention.

[0036] Traditional waveform push technology usually solves the existing deficiencies from two aspects: (i) increasing server resources, such as CPU and memory. The problem with this solution is obvious, that is, the high resource requirements. When multiple waveforms are displayed and analyzed at the same time, the demand for CPU and memory resources will increase rapidly, making it difficult to meet the needs of displaying and analyzing a large number of waveforms at the same time; (ii) using the sampling method to extract the original waveform data at fixed time intervals for calculation and conversion, and then display and analyze it. The remaining data will be discarded. Although the sampling method does not require the addition of a large amount of CPU and memory resources, its disadvantage is also obvious, that is, the waveform data will be lost. In the field of waveform data display and analysis, key information is likely to be in the lost waveform data. Therefore, the sampling method also faces the problem of not being able to meet the display and analysis needs.

[0037] Based on this, the present invention designs a reasonable data structure and system architecture, and uses a timing data caching mechanism to minimize repeated data calculations and conversions as much as possible in the shortest possible time without losing waveform data and increasing CPU and memory resources, thereby achieving the integrity, real-time and timing of waveform data display and analysis. Among them, integrity means that no original waveform data is discarded during the waveform data display and analysis process; real-time means that microsecond-level data push that is almost the same as the waveform generation component can be achieved; timing means that the order of waveform data generation is maintained during the process of pushing waveform data. The waveform data display and analysis solution of the present invention can support the simultaneous display and analysis of multiple users and multiple waveforms under the B / S architecture, and can also effectively avoid the problem of further performance degradation caused by the increase in computational complexity.

[0038] In one embodiment, Figure 1 As shown, a microsecond-level time series data intelligent push method is provided, which may include the following processing steps S10 to S22:

[0039] S10, obtaining the original waveform data pushed by the waveform generation component at a speed of microseconds;

[0040] S12, storing the original waveform data into an original waveform data queue;

[0041] S14, taking out one cycle of original waveform data from the original waveform data queue as a basic data unit and generating a microsecond-level timestamp corresponding to the current time of the basic data unit;

[0042] S16, inserting the basic data unit into the tail of the time series data push queue according to the timestamp in microseconds of the current time, setting the data state of the element where the basic data unit is located to the unready state and the data block to be empty; the elements in the time series data push queue include timestamps, data states and data blocks;

[0043] S18, reading each data point in the basic data unit in sequence to the time series data buffer for hit detection through the data calculation and conversion unit; the time series data buffer is used to sort the data items corresponding to the data points in the original waveform data according to the order of the size of the data points, and each data item consists of a data point and result data obtained after the data point is calculated and converted;

[0044] S20, if a hit occurs, directly taking out the result data corresponding to the hit data point in the time series data buffer; otherwise, the data point is calculated and converted by the data calculation and conversion unit to obtain the result data of the data point;

[0045] S22, according to the microsecond timestamp of the current time and the result data, the data state of the element where the basic data unit is located in the time series data push queue is updated to the ready state and the data block is updated to the result data;

[0046] The time series data push queue is used to push the data blocks in the ready state to the user end in sequence from the head of the queue for waveform data display and analysis, and remove the elements that have been pushed.

[0047] It can be understood that the periodicity of waveform data means that the calculation and conversion of many original waveform data are repeated. The core purpose of this embodiment is to "avoid repeated calculation and conversion of data as much as possible in the shortest time", thereby reducing the usage of CPU and memory resources.

[0048] The calculation and conversion of the original waveform data is completed by the data calculation and conversion unit (which can be referred to as the CCU calculation unit). This unit mainly calculates and converts the original waveform data pushed by the waveform generation component, such as the existing FFT Fourier transform, log10 transform and data formatting operations in this field, so that the user can display and analyze it. The calculation and conversion process of the data by the data calculation and conversion unit depends on the display and analysis requirements of the waveform. In order to achieve the goal of "avoiding repeated calculation and conversion of data as much as possible in the shortest time" and thus achieving the goal of pushing waveform data at the microsecond level, two important data structures are introduced: the timing data buffer and the timing data push queue.

[0049] The main function of the timing data buffer is to combine each data point of the original waveform data and its calculated and converted result data into a data item (which can be recorded as Ci), and sort all the data items Ci according to the size of the original waveform data (in ascending or descending order). Its queue data structure is as follows: Figure 2 As shown. Each data item in the time series data buffer consists of index / original data (which can be recorded as orgdata) and calculated (and converted) data (which can be recorded as culdata), where the index / original data is the original waveform data pushed by the waveform generation component, and is also the index of the time series data buffer, which is used to speed up the cache hit speed; the calculated data is the result data after the original waveform data is calculated and converted by the data calculation and conversion unit, that is, the final data that supports the user end to display and analyze waveform data.

[0050] The timing data buffer maintains an ordered queue sorted by the size of the original waveform data itself. The dynamic creation and update method of the timing data buffer is as follows: a new original waveform data i is first searched in the timing data buffer using a binary search method to see whether the data and its calculation and conversion result data Ri exist. If so (i.e., a hit), the result data Ri corresponding to the original waveform data i is directly returned. If not found (i.e., a miss), the original waveform data i is handed over to the data calculation and conversion unit for calculation and conversion to obtain the result data Ri corresponding to the original waveform data i.

[0051] The main function of the time series data push queue is to store the original waveform data that has been completed or not completed in the time series order of waveform generation. The queue data structure can be as follows: Figure 3 As shown, the timestamp is used as the sorting index. Each element in the time series data push queue consists of a timestamp, a data state (including two states: ready or not-ready) and a data block. The timestamp is the time when the original waveform data in the element is generated, which is an integer in microseconds; the data state includes two states: ready or not-ready. Ready means that the element has completed the calculation and conversion of the data and can be pushed to the user end for waveform data display and analysis, while not-ready means that the element has not yet completed the calculation and conversion of the data and cannot be pushed to the user end for waveform data display and analysis. For example, Figure 3 The data blocks being calculated that are not-ready can be represented by gray element blocks, and the remaining data blocks store the original waveform data of a cycle that has completed calculation and conversion (i.e., ready), that is, the data sent to the user end for waveform data display and analysis.

[0052] The time series data push queue is an ordered queue sorted by the timestamp when the original waveform data is generated. The data management of the time series data push queue can be implemented as follows: first, the original waveform data of one cycle, before calculation and conversion, is composed of elements in the queue according to the data structure of the time series data push queue, and then inserted into the time series data push queue according to the timestamp order of the original waveform data and the data state is set to the not-ready state of uncalculated; then the asynchronous thread is started to take out the result data corresponding to the original waveform data of this cycle from the time series data buffer, or the data calculation and conversion unit calculates and converts the original waveform data of this cycle to obtain the corresponding result data. After the result calculation is completed, the data in the time series data push queue is updated with the timestamp as the index, and the data state is updated to the ready state, waiting to be pushed to the user end for display and analysis of the existing waveform data.

[0053] The above-mentioned microsecond-level intelligent push method for time series data introduces a time series data buffer and a time series data push queue by design, and improves the push processing flow, so that the data calculation and conversion unit is basically in the high-speed calculation and conversion process only in the first cycle. After the first cycle, the data calculation and conversion unit only needs to calculate the special points in the data, so that when the same waveform data is used for display and analysis by multiple user terminals, the data calculation and conversion unit does not need to continue to repeat the calculation for multiple user terminals. With the continuous push of waveform data, the data in the time series data buffer is continuously updated, and the number of missed data points will become smaller and smaller, so that the complexity and resource occupancy will also become smaller and smaller, and finally the influence of the calculation and conversion time uncertainty of the data calculation and conversion unit on the system performance under different display and analysis requirements is shielded, and it has significant advantages in complex waveform data display and analysis requirements.

[0054] In one embodiment, after step S18, the above-mentioned microsecond-level time series data intelligent push method may further include the following steps:

[0055] Compare the current microsecond timestamp with the latest timestamp to determine whether the calculation and conversion of the basic data unit has timed out;

[0056] If the timeout period is exceeded, the element corresponding to the basic data unit in the time series data push queue is removed.

[0057] It can be understood that in this embodiment, the current microsecond timestamp can also be compared with the current latest timestamp. If the calculation and conversion are found to have timed out, the element corresponding to the basic data unit is removed, thereby executing the timeout discard mechanism through the data calculation and conversion unit, further ensuring the smoothness of waveform data display and analysis.

[0058] In one embodiment, after step S20, the above-mentioned microsecond-level time series data intelligent push method may further include the following steps:

[0059] The data points and the result data corresponding to the data points are combined into a data item, which is inserted into the time series data buffer in the order of the size of the data points.

[0060] It can be understood that if it is not found (i.e., it misses), the original waveform data i is handed over to the data calculation and conversion unit for calculation and conversion to obtain the result data Ri corresponding to the original waveform data i. Then, the data item Ci composed of the original waveform data i and the result data Ri can be inserted into the timing data buffer in the order of the size of the original waveform data i to dynamically update the timing data buffer. The timing data buffer can effectively avoid repeated calculation and conversion of the original waveform data through dynamic data update, thereby speeding up the waveform data push speed.

[0061] In one embodiment, the original waveform data is stored in the original waveform data queue in the main thread, and the data calculation and conversion unit is started in the sub-thread to execute the calculation and conversion program. The main thread and the sub-thread are asynchronous threads.

[0062] More specifically, the waveform generation component pushes the original waveform data to the user end for waveform data display and analysis after being processed by the data calculation and conversion unit. The main process can be as follows: Figure 4 As shown, the following steps are included:

[0063] (1) The waveform generation component pushes raw waveform data at microsecond speeds.

[0064] (2) Since the length of data pushed each time by the waveform generation component is not fixed, the data receiving program end (that is, the data calculation and conversion unit) first stores the original waveform data into the original waveform data queue (which can be recorded as: ORIGINAL_Q queue) after receiving the original waveform data pushed by the waveform generation component.

[0065] (3) In the original waveform data queue ORIGINAL_Q, after the number of data points of the original waveform data is sufficient to reach the total number of points M of the original waveform data of one cycle (for example, 2048 or more), all the M data points are taken out to form a basic data unit (which can be denoted as D), and at the same time, a timestamp of the current time in microseconds is generated for the original waveform data of this cycle (which can be denoted as Ti).

[0066] (4) Insert the basic data unit D into the time series data push queue. Specifically, the element consisting of the timestamp Ti, the data state (set to the not-ready state at this time) and the empty data block (the data has not completed the calculation and conversion at this time, so the data block is empty) is inserted into the end of the time series data push queue according to the timestamp Ti, and waits for the original waveform data of this cycle to be calculated and converted before updating its data state and data block.

[0067] (5) The data calculation and conversion unit performs asynchronous calculation and conversion. Specifically, after the elements composed of the basic data unit D are inserted into the time series data push queue, the main thread continues to obtain the original waveform data and inserts it into the time series data push queue through step (3), and the sub-thread starts the data calculation and conversion unit to execute the calculation and conversion program to obtain the data result of the basic data unit D through step (6).

[0068] (6) The data calculation and conversion unit sequentially reads each data point Di in the basic data unit D and the index data in the time series data buffer for hit detection. If a hit is found, the corresponding result data Ri after calculation and conversion stored in the time series data buffer is directly taken out; if a hit is not found, the data calculation and conversion unit executes the existing calculation and conversion program to obtain the result data Ri corresponding to the data point and returns it.

[0069] (7) After the basic data unit D is processed in step (6), the element in the time series data push queue is updated according to the timestamp Ti, and the data state of the element is changed from the previous not-ready state to the ready state, and the data block is set to the corresponding result data Ri.

[0070] (8) Starting from the head of the time series data push queue, the data blocks in the ready state are pushed to the user end for waveform data display and analysis, and the elements that have been pushed are removed from the time series data push queue. In addition, the timestamp Ti can be compared with the latest timestamp at the current time. If the calculation and conversion timeout is found, the data block is removed to ensure the smoothness of data push. The data calculation and conversion unit executes the timeout discard mechanism, which further ensures the smoothness of waveform data display and analysis.

[0071] (9) After receiving the calculated and converted waveform data, the user can display and analyze the specified waveform data.

[0072] (10) Continue to push waveform data until the waveform data display and analysis are completed.

[0073] In this way, by utilizing the timing data buffer and timing data push queue, the repeated calculation of the original waveform data calculation and conversion is reduced to the minimum as much as possible in the shortest time, solving the performance bottleneck problem that existed in the past, thereby achieving microsecond-level push of waveform data.

[0074] The above-mentioned microsecond-level time series data intelligent push method can be applied to the process of graphical display and analysis of waveform data with strong periodicity. In traditional technology, since the waveform generation component continuously pushes the original waveform data at a speed of microseconds, the data calculation and conversion unit has been in a high-load operation state, which consumes a lot of server resources and forms an obvious performance bottleneck. However, in the above-mentioned microsecond-level time series data intelligent push method, the data calculation and conversion unit is basically only in the high-speed calculation and conversion process in the first cycle. After the first cycle, the data calculation and conversion unit only needs to calculate the special points in the data (that is, the missed data points).

[0075] Compared with traditional technologies, the display and analysis of the same waveform data use the same time series data push queue. When the same waveform data is used for display and analysis by multiple client terminals, the above-mentioned microsecond-level time series data intelligent push method does not require repeated calculations, and the hit rate can be close to 100%, so that the data calculation and conversion unit does not need to continue to repeat calculations for multiple client terminals. Therefore, the B / S architecture using the above-mentioned microsecond-level time series data intelligent push method can effectively support multiple users and multiple terminals to display and analyze the same waveform data at the same time, and will not significantly consume additional server resources.

[0076] In addition, in the face of complex display and analysis requirements in traditional technology, the time consumption of the data calculation and conversion unit to perform calculation and conversion will increase significantly, the demand for CPU and memory resources will also increase significantly, and the CPU and memory resources will continue to be occupied. In the above-mentioned microsecond-level time series data intelligent push method, even if the complexity of the calculation and conversion performed by the data calculation and conversion unit increases, after a cycle ends, only special points need to be recalculated and converted, and the complexity and resource occupation are only (N / M)*O (where N is the number of missed data points in a cycle, M is the total number of data points in a cycle, and O is the overall representation of the resource occupation and time consumption when each data point in a cycle requires the data calculation and conversion unit to perform calculation and conversion); as the waveform data is continuously pushed, the data of the time series data buffer is continuously updated, and the number of missed data points N will become smaller and smaller, so the complexity and resource occupation (N / M)*O will also become smaller and smaller, and finally shield the influence of the uncertainty of the calculation and conversion time consumption of the data calculation and conversion unit on the system performance under different display and analysis requirements, and has significant advantages in complex waveform data display and analysis requirements.

[0077] In some implementations, in order to more clearly and intuitively demonstrate the processing flow of the above-mentioned microsecond-level time series data intelligent push method, one of the examples is given here for auxiliary explanation. It should be noted that this example is only for illustration and is not the only limitation on the implementation method of the above-mentioned microsecond-level time series data intelligent push method. Those skilled in the art can implement waveform data push processing under original waveform data queues ORIGINAL_Q of different lengths and basic data units D of different lengths in the same way according to the above-mentioned microsecond-level time series data intelligent push method:

[0078] The waveform generation component pushes data to the original waveform data queue ORIGINAL_Q at a speed of microseconds. Assume that there are 3000 data in the original waveform data queue ORIGINAL_Q at this time.

[0079] (1) Assume that the length M of the basic data unit D is 2048.

[0080] (2) Take 2048 data points from the original waveform data queue ORIGINAL_Q to form a basic data unit D, and generate a microsecond timestamp Ti of the current time (assuming it is 20241029154320).

[0081] (3) An element consisting of the timestamp Ti, the data status (not-ready), and an empty data block is inserted into the tail of the timing data push queue shown in Table 1, and a child thread is started to check the hit status of the current original waveform data in the timing data buffer shown in Table 2, and the original waveform data that does not hit is calculated and converted.

[0082] Table 1

[0083]

[0084] Table 2

[0085]

[0086] (4) Use the main thread to continue executing steps (2) to (3) to continuously insert the original waveform data into the timing data push queue.

[0087] (5) The child thread updates Table 1 with the timestamp Ti (20241029154320) as the index, using the data result read after a hit in the timing data cache and the data result obtained by the data calculation and conversion unit after a miss. The updated data is shown in Table 3.

[0088] Table 3

[0089]

[0090] (6) Starting from the head of the queue in Table 3, all data blocks with a data status of ready are pushed to the user end in sequence for waveform data display and analysis until an element with a data status of not-ready is encountered and the sending is stopped, as shown in Table 4.

[0091] Table 4

[0092]

[0093] (7) After receiving the waveform data, the user end can display and analyze the waveform data.

[0094] It should be understood that although Figure 1 and Figure 4 The steps in the method are shown in sequence as indicated by the arrows, but the steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of the steps, and the steps can be executed in other orders. Figure 1 and Figure 4 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequentially, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0095] In one embodiment, Figure 5 As shown, a microsecond-level time series data intelligent push device 100 is provided, which may include a data acquisition module 11, a queue storage module 13, a unit generation module 15, a push insertion module 17, a hit detection module 19, a result acquisition module 21 and a queue update module 23. Among them, the data acquisition module 11 is used to acquire the original waveform data pushed by the waveform generation component at a speed of microseconds. The queue storage module 13 is used to store the original waveform data in the original waveform data queue. The unit generation module 15 is used to take out a cycle of original waveform data from the original waveform data queue as a basic data unit and generate a microsecond-level timestamp corresponding to the current time of the basic data unit. The push insertion module 17 is used to insert the basic data unit into the tail of the time series data push queue according to the microsecond-level timestamp of the current time, and set the data state of the element where the basic data unit is located to be unready and the data block to be empty; the elements in the time series data push queue include timestamps, data states and data blocks. The hit detection module 19 is used to read each data point in the basic data unit in sequence to the timing data buffer for hit detection through the data calculation and conversion unit; the timing data buffer is used to sort the data items corresponding to the data points in the original waveform data according to the size order of the data points, and each data item consists of a data point and the result data obtained after the data point is calculated and converted. The result acquisition module 21 is used to directly take out the result data corresponding to the hit data point in the timing data buffer when a hit occurs; otherwise, the data calculation and conversion unit is used to perform the calculation and conversion of the data point to obtain the result data of the data point. The queue update module 23 is used to update the data state of the element where the basic data unit is located in the timing data push queue to the ready state and the data block to the result data according to the timestamp and result data of the current time in microseconds.

[0096] Among them, the time series data push queue is used to push the data blocks in the ready state to the user end in sequence from the head of the queue for waveform data display and analysis, and remove the elements that have been pushed.

[0097] The above-mentioned microsecond-level time series data intelligent push device 100 introduces a time series data buffer and a time series data push queue by design, and improves the push processing flow, so that the data calculation and conversion unit is basically in a high-speed calculation and conversion process only in the first cycle. After the first cycle ends, the data calculation and conversion unit only needs to calculate special points in the data, so that when the same waveform data is used for display and analysis by multiple user terminals, the data calculation and conversion unit does not need to continue to repeat calculations for multiple user terminals. As the waveform data is continuously pushed, the data in the time series data buffer is continuously updated, and the number of missed data points will become smaller and smaller, so that the complexity and resource occupancy will also become smaller and smaller, and finally the influence of the calculation and conversion time uncertainty of the data calculation and conversion unit on the system performance under different display and analysis requirements is shielded, and it has significant advantages in complex waveform data display and analysis requirements.

[0098] In one embodiment, the above-mentioned microsecond-level time series data intelligent push device 100 may also include a cache update module, which is used to combine data points and result data corresponding to the data points into a data item, and insert them into the time series data buffer in the order of the size of the data points.

[0099] In one embodiment, the above-mentioned microsecond-level time series data intelligent push device 100 can also include a timeout removal module, which is used to compare the current microsecond-level timestamp with the current latest timestamp to determine whether the calculation and conversion of the basic data unit has timed out. If so, the element corresponding to the basic data unit in the time series data push queue is removed.

[0100] In one embodiment, the original waveform data is stored in the original waveform data queue in the main thread, and the data calculation and conversion unit is started in the sub-thread to execute the calculation and conversion program. The main thread and the sub-thread are asynchronous threads.

[0101] It can be understood that for the specific limitations of the microsecond-level time series data intelligent push device 100, please refer to the corresponding limitations of the microsecond-level time series data intelligent push method above, and no further details will be given here. Each module in the above-mentioned microsecond-level time series data intelligent push device 100 can be implemented in whole or in part through software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of a device with data processing functions in the form of hardware, or can be stored in the memory of the aforementioned device in the form of software, so that the processor can call and execute the operations corresponding to the above modules. The aforementioned device can be but not limited to various types of computing terminals already available in the art.

[0102] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the following processing steps when executing the computer program: obtaining original waveform data pushed by a waveform generation component at a speed of microseconds; storing the original waveform data in an original waveform data queue; taking out a period of original waveform data from the original waveform data queue as a basic data unit and generating a timestamp of the current time in microseconds corresponding to the basic data unit; inserting the basic data unit into the tail of the time series data push queue according to the timestamp of the current time in microseconds, setting the data state of the element where the basic data unit is located to an unready state and the data block to be empty; the elements in the time series data push queue include timestamps, data states and data blocks; block; read each data point in the basic data unit in sequence to the timing data buffer for hit detection through the data calculation and conversion unit; the timing data buffer is used to sort the data items corresponding to the data points in the original waveform data in the order of the size of the data points, and each data item consists of a data point and the result data obtained after the data point is calculated and converted; if a hit is found, the result data corresponding to the hit data point in the timing data buffer is directly taken out; otherwise, the data point is calculated and converted through the data calculation and conversion unit to obtain the result data of the data point; according to the current time microsecond timestamp and result data, the data state of the element where the basic data unit is located in the timing data push queue is updated to the ready state and the data block is updated to the result data.

[0103] The time series data push queue is used to push the data blocks in the ready state to the user end in sequence from the head of the queue for waveform data display and analysis, and remove the elements that have been pushed.

[0104] In one embodiment, when the processor executes the computer program, the added steps or sub-steps in each embodiment of the above-mentioned microsecond-level time series data intelligent push method can also be implemented.

[0105] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following processing steps are implemented: obtaining original waveform data pushed by a waveform generation component at a speed of microseconds; storing the original waveform data in an original waveform data queue; taking out a period of original waveform data from the original waveform data queue as a basic data unit and generating a timestamp of the current time in microseconds corresponding to the basic data unit; inserting the basic data unit into the tail of a time series data push queue according to the timestamp of the current time in microseconds, setting the data state of the element where the basic data unit is located to an unready state and the data block to be empty; the elements in the time series data push queue include timestamps, data states and data blocks; The data calculation and conversion unit sequentially reads each data point in the basic data unit to the timing data buffer for hit detection; the timing data buffer is used to sort the data items corresponding to the data points in the original waveform data according to the size order of the data points, and each data item consists of a data point and the result data obtained after the data point is calculated and converted; if a hit is found, the result data corresponding to the hit data point is directly taken out from the timing data buffer; otherwise, the calculation and conversion of the data point is performed by the data calculation and conversion unit to obtain the result data of the data point; according to the current time microsecond timestamp and result data, the data state of the element where the basic data unit is located in the timing data push queue is updated to the ready state and the data block is updated to the result data.

[0106] The time series data push queue is used to push the data blocks in the ready state to the user end in sequence from the head of the queue for waveform data display and analysis, and remove the elements that have been pushed.

[0107] In one embodiment, when the computer program is executed by a processor, the steps or sub-steps added in each embodiment of the above-mentioned microsecond-level time series data intelligent push method can also be implemented.

[0108] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus dynamic random access memory (RambusDRAM, referred to as RDRAM) and interface dynamic random access memory (DRDRAM).

[0109] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0110] The above embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of protection of the invention. It should be pointed out that, for those of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present invention, which all belong to the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the attached claims.

Claims

1. A microsecond-level time series data intelligent push method, characterized in that: Includes steps: Get the raw waveform data pushed by the waveform generation component at a speed of microseconds; Storing the original waveform data into an original waveform data queue; Taking out one cycle of original waveform data from the original waveform data queue as a basic data unit and generating a microsecond-level timestamp corresponding to the current time of the basic data unit; Insert the basic data unit into the tail of the time series data push queue according to the microsecond timestamp of the current time, and set the data state of the element where the basic data unit is located to be unready and the data block to be empty; the elements in the time series data push queue include timestamp, data state and data block; Each data point in the basic data unit is sequentially read into the time series data buffer by the data calculation and conversion unit for hit detection; the time series data buffer is used to sort the data items corresponding to the data points in the original waveform data according to the size order of the data points, and each data item consists of a data point and result data obtained after the data point is calculated and converted; If a hit occurs, the result data corresponding to the hit data point is directly retrieved from the time series data buffer; Otherwise, the data point is calculated and converted by the data calculation and conversion unit to obtain result data of the data point; According to the microsecond timestamp of the current time and the result data, the data state of the element where the basic data unit is located in the time series data push queue is updated to a ready state and the data block is updated to the result data; The time series data push queue is used to push the data blocks in the ready state to the user end in sequence from the head of the queue for waveform data display and analysis, and remove the elements that have been pushed.

2. The microsecond-level time series data intelligent push method according to claim 1 is characterized in that: After the step of performing calculation and conversion of the data point by the data calculation and conversion unit to obtain result data of the data point, the method further includes the following steps: The data points and the result data corresponding to the data points are combined into a data item, which is inserted into the time series data buffer in the order of the size of the data points.

3. The microsecond-level time series data intelligent push method according to claim 1 or 2, characterized in that: After the step of sequentially reading each data point in the basic data unit to the timing data buffer for hit detection by the data calculation and conversion unit, the step further includes: Compare the microsecond timestamp of the current time with the latest timestamp to determine whether the calculation and conversion of the basic data unit has timed out; If the timeout is reached, the element corresponding to the basic data unit in the time series data push queue is removed.

4. The microsecond-level time series data intelligent push method according to claim 3 is characterized in that: The original waveform data is stored in an original waveform data queue in the main thread, and the data calculation and conversion unit is started in the sub-thread to execute the calculation and conversion program. The main thread and the sub-thread are asynchronous threads.

5. A microsecond-level time series data intelligent push device, characterized in that: include: A data acquisition module is used to acquire the original waveform data pushed by the waveform generation component at a speed of microseconds; A queue storage module, used for storing the original waveform data into an original waveform data queue; A unit generation module, used for taking out one cycle of original waveform data from the original waveform data queue as a basic data unit and generating a microsecond-level timestamp corresponding to the current time of the basic data unit; A push insertion module, used to insert the basic data unit into the tail of the time series data push queue according to the microsecond timestamp of the current time, and set the data state of the element where the basic data unit is located to be unready and the data block to be empty; the elements in the time series data push queue include timestamp, data state and data block; A hit detection module is used to read each data point in the basic data unit in sequence to the time series data buffer for hit detection through the data calculation and conversion unit; the time series data buffer is used to sort the data items corresponding to the data points in the original waveform data according to the order of the size of the data points, and each data item consists of a data point and result data obtained after the data point is calculated and converted; A result acquisition module, for directly taking out the result data corresponding to the hit data point in the time series data buffer when a hit occurs; otherwise, the data calculation and conversion unit is used to perform calculation and conversion of the data point to obtain the result data of the data point; A queue updating module, configured to update the data state of the element where the basic data unit is located in the time series data push queue to a ready state and update the data block to the result data according to the microsecond timestamp of the current time and the result data; The time series data push queue is used to push the data blocks in the ready state to the user end in sequence from the head of the queue for waveform data display and analysis, and remove the elements that have been pushed.

6. The microsecond-level time series data intelligent push device according to claim 5 is characterized in that: It also includes a cache update module, which is used to combine the data point and the result data corresponding to the data point into a data item, and insert it into the time series data buffer in the order of the size of the data point.

7. The microsecond-level time series data intelligent push device according to claim 5 or 6, characterized in that: It also includes a timeout removal module, which is used to compare the microsecond timestamp of the current time with the current latest timestamp to determine whether the calculation and conversion of the basic data unit has timed out. If so, the element corresponding to the basic data unit in the time series data push queue is removed.

8. The microsecond-level time series data intelligent push device according to claim 7 is characterized in that: The original waveform data is stored in an original waveform data queue in the main thread, and the data calculation and conversion unit is started in the sub-thread to execute the calculation and conversion program. The main thread and the sub-thread are asynchronous threads.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the microsecond-level time series data intelligent push method described in any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Generation method of real-time signal and device

    CN103152062A

  • Method and device for controlling sound and picture synchronization, computer equipment and storage medium

    CN117528164A