Wave recording data structure and wave recording data storage method based on distributed time slot mapping
Patent Information
- Application Number
- CN202610855543.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-12
- Publication Date
- 2026-10-09
AI Technical Summary
[0003]本发明提供了一种录波数据结构及基于分布式时隙映射的录波数据存录方法,以解决现有录波数据结构无法在低频写入条件下完整保留信号高采样率时间序列信息的问题
Smart Images

Figure CN122884965A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power system monitoring and fault analysis technology, specifically to waveform recording data structure and waveform recording data storage method based on distributed time slot mapping. Background Technology
[0002] In existing waveform recording techniques, one approach is to uniquely map a physical signal to a single stored variable in the waveform file. The recording frequency directly determines the observable temporal resolution; increasing the recording frequency is necessary to improve observation accuracy, leading to a surge in data volume and increased storage and bandwidth pressure. Another approach is segmented variable-precision waveform recording, which reduces the recording frequency during non-critical periods to save resources, but discards high-precision data from those periods. Neither of these methods can fully preserve the high sampling rate information of the signal at low recording frequencies. Summary of the Invention
[0003] This invention provides a waveform recording data structure and a waveform recording data storage method based on distributed time slot mapping to solve the problem that existing waveform recording data structures cannot completely retain high sampling rate time series information of signals under low frequency writing conditions.
[0004] In a first aspect, the present invention provides a waveform recording data structure for storing sampled signals; the waveform recording data structure includes: A reference waveform recording time sequence and at least one waveform recording vector; The waveform recording vector includes multiple data storage items. The number of data storage items is equal to the quotient obtained by dividing the waveform recording period by the sampling period, and the quotient is an integer greater than or equal to a preset value. The multiple data storage items have serial numbers starting from 1 and ending at the quotient. Among them, the data storage item with any serial number is used to store all sampled values of the target physical signal, where the sampling time of the sampled value is equal to the reference waveform recording time plus the serial number minus one multiplied by the sampling period.
[0005] The waveform recording data structure provided by this invention stores the sampled values of the target physical signal into multiple data storage items with fixed serial numbers according to the phase offset of the sampling time relative to the reference waveform recording time. This ensures that each data storage item stores only the sampled values of the same phase. Thus, under the condition that the waveform recording period remains unchanged (i.e., low-frequency writing), all sampling information with a higher sampling period is completely preserved. This achieves lossless recording of high sampling rate signals, avoids the surge in data volume and storage bandwidth pressure caused by increasing the waveform recording frequency, and solves the problem that existing waveform recording data structures cannot completely preserve the high sampling rate time series information of signals under low-frequency writing conditions.
[0006] Secondly, this invention provides a method for recording waveform data based on distributed time-slot mapping, the method comprising: Multiple discrete sampled values of the target physical signal are acquired using the sampling period; Using the waveform data structure described in the first aspect above, a corresponding waveform vector is created for the target physical signal; Calculate the phase difference between the sampling time of each discrete sample value and the corresponding reference recording time, determine the corresponding time slot phase index based on the phase difference, and assign each discrete sample value to the specified data storage item in the recording vector; At each reference recording time, the latest assigned discrete sample value from all data storage items of the recording vector is written as a whole into the preset recording file.
[0007] This invention provides a method for recording waveform data based on distributed time-slot mapping. By mapping high-sampling-rate discrete sampled values to different data storage items of the waveform recording vector according to their phase difference with the reference waveform recording time, and writing all storage items of the entire waveform recording vector into the waveform recording file at each reference waveform recording time, the writing frequency of the waveform recording file is kept at a low waveform recording period, while all sampled information with a higher sampling period can be completely preserved. This achieves lossless recording of high-sampling-rate signals without increasing the waveform recording frequency or storage bandwidth, effectively avoiding the data volume expansion and hardware resource pressure caused by increasing observation accuracy.
[0008] In one alternative implementation, a corresponding waveform vector is created for the target physical signal, including: In the preset waveform recording file, multiple data storage items are allocated for the target physical signal, and these multiple data storage items are logically associated into a vector group, which has a unified identifier.
[0009] In the above technical solution, multiple data storage items of the same target physical signal are pre-allocated and logically associated into a vector group with a unified identifier in the waveform recording file, so that all phase sampling data of the signal form an overall identifiable data structure in the file, which facilitates subsequent rapid positioning, parsing and reuse. At the same time, it is compatible with the storage format of existing waveform recording files, and the organization and management of multi-phase data can be realized without changing the underlying storage architecture of the file.
[0010] In one alternative implementation, the phase difference is equal to the sampling time minus the corresponding reference recording time, where the corresponding reference recording time is the maximum reference recording time that is not greater than the corresponding sampling time.
[0011] In the above technical solution, the reference recording period to which the sampled value belongs ensures a strict one-to-one correspondence between the sampling time axis and the reference recording time sequence, guaranteeing that any sampling point can be uniquely and unambiguously mapped to the corresponding time slot phase index, thereby avoiding sampling point misalignment or data overlay errors caused by phase ambiguity.
[0012] In one optional implementation, determining the corresponding time slot phase index based on the phase difference includes: The time slot phase index is determined based on the position of the sequence number corresponding to the ratio of phase difference to sampling period.
[0013] In the above technical solution, by using the index position corresponding to the ratio of phase difference to sampling period as the time slot phase index, a deterministic mapping from continuous time phase to discrete integer index is realized. This ensures that each sampled value is uniquely and unambiguously assigned to the corresponding storage location according to its phase offset, avoiding index ambiguity or conflict, and thus providing an accurate address basis for the correct grouping and storage of subsequent sampled values.
[0014] In one alternative implementation, the position number is obtained by dividing the phase difference by the sampling period, rounding down, and then adding 1.
[0015] In the above technical solution, by dividing the phase difference by the sampling period, rounding down, and then adding 1, the continuously changing phase difference is unambiguously mapped to a discrete index starting from 1. This allows each sampled value to be uniquely assigned to the corresponding storage item based on which sampling period interval it falls into. The calculation process is simple and has no rounding error, avoiding overlapping or omission of sampling points and ensuring the determinism and consistency of the phase index.
[0016] In one alternative implementation, assigning each discrete sampled value to a designated data storage item in the waveform recording vector includes: Based on the time slot phase index, a data storage item that uniquely corresponds to the time slot phase index is determined from multiple data storage items of the recorded waveform vector, and the discrete sampled values are stored in the corresponding data storage item.
[0017] In the above technical solution, by determining the unique corresponding data storage item from the waveform recording vector based on the time slot phase index and storing the sampled value, each sampled value is accurately stored in its dedicated location according to its phase index, avoiding the aliasing or overwriting of sampled values of different phases. This ensures that each storage item in the waveform recording vector stores the latest sampled value of the same phase, providing a guarantee of data integrity for subsequent lossless reconstruction of high-precision waveforms.
[0018] In one alternative implementation, the method further includes: Based on the values of each data storage item in the waveform vector written to the waveform file, the sampled value of the target physical signal at the specified sampling time is restored.
[0019] In the above technical solution, by calculating the corresponding phase index and reading the value of the corresponding storage item based on the value of each data storage item of the waveform vector stored in the waveform recording file according to the specified sampling time, the original sampling value of the target physical signal at any high-precision sampling time can be restored from the vector data recorded at low frequency without loss, thus realizing the decoupling of low-frequency storage and high-frequency restoration.
[0020] Thirdly, the present invention provides a waveform recording data storage device based on distributed time slot mapping, the device comprising: The sampling module is used to acquire multiple discrete sampled values of the target physical signal at a sampling period. The time slot mapping and vector management module is used to create a corresponding recording vector for the target physical signal using the recording data structure of the first aspect mentioned above; calculate the phase difference between the sampling time of each discrete sample value and the corresponding reference recording time; determine the corresponding time slot phase index based on the phase difference; and assign each discrete sample value to a specified data storage item in the recording vector. The low-frequency waveform recording and writing module is used to write the latest assigned discrete sampled values from all data storage items of the waveform recording vector as a whole to a preset waveform recording file at each reference waveform recording time.
[0021] In one optional implementation, the time slot mapping and vector management module includes: The waveform recording vector initialization unit is used to allocate multiple data storage items for the target physical signal in a preset waveform recording file, and logically associate the multiple data storage items into a vector group, which has a unified identifier.
[0022] In one alternative implementation, the phase difference is equal to the sampling time minus the corresponding reference recording time, where the corresponding reference recording time is the maximum reference recording time that is not greater than the corresponding sampling time.
[0023] In one optional implementation, the time slot mapping and vector management module further includes: The time slot mapping unit is used to determine the time slot phase index based on the sequence number position corresponding to the ratio of the phase difference to the sampling period.
[0024] In one alternative implementation, the position number is obtained by dividing the phase difference by the sampling period, rounding down, and then adding 1.
[0025] In one optional implementation, the time slot mapping and vector management module further includes: The vector update unit is used to determine the data storage item that uniquely corresponds to the time slot phase index from multiple data storage items of the recorded waveform vector based on the time slot phase index, and to store the discrete sampled value into the corresponding data storage item.
[0026] In one alternative embodiment, the device further includes: The signal restoration module is used to restore the sampled value of the target physical signal at a specified sampling time based on the values of each data storage item in the waveform vector written to the waveform file.
[0027] Thirdly, the present invention provides a power electronic equipment valve base control device, which includes the waveform recording data storage device based on distributed time slot mapping of the second aspect above or any corresponding embodiment.
[0028] Fourthly, the present invention provides an electronic device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the waveform data recording method based on distributed time slot mapping described in the second aspect or any corresponding embodiment thereof.
[0029] Fifthly, the present invention provides a computer-readable storage medium storing computer instructions, which are used to cause a computer to execute the waveform data recording method based on distributed time slot mapping described in the second aspect or any corresponding embodiment thereof.
[0030] In a sixth aspect, the present invention provides a computer program product, including computer instructions for causing a computer to execute the waveform data storage method based on distributed time slot mapping described in the second aspect or any corresponding embodiment thereof. Attached Figure Description
[0031] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0032] Figure 1 This is a schematic diagram of an application scenario according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the waveform recording principle based on distributed time slot mapping according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the first process of a waveform data storage method based on distributed time slot mapping according to an embodiment of the present invention; Figure 4 This is a schematic diagram of the second process of the waveform data storage method based on distributed time slot mapping according to an embodiment of the present invention; Figure 5This is a schematic diagram of waveform recording based on distributed time slot mapping with a sampling accuracy of 10μs and a recording accuracy of 50μs according to an embodiment of the present invention. Figure 6 This is a schematic diagram illustrating the method of using waveform recording files according to an embodiment of the present invention; Figure 7 This is a structural block diagram of a waveform recording data storage device based on distributed time slot mapping according to an embodiment of the present invention; Figure 8 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0033] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0034] It is understood that before using the technical solutions disclosed in the various embodiments of the present invention, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in the present invention and their authorization should be obtained in accordance with relevant laws and regulations through appropriate means.
[0035] As an optional application scenario of this invention, such as Figure 1 As shown, application 101 is installed in terminal device 110, and user 130 can interact with application 101 through terminal device 110 and / or access device of terminal device 110.
[0036] For example, application 101 can be any application that provides question-and-answer related services. For instance, application 101 could be a question-and-answer interactive application, such as a text-to-text application, an image-to-text application, etc. Figure 1 In the application scenario shown, if application 101 is active, the terminal device 110 can display the interface 102 of application 101. The interface 102 may include various pages that application 101 can provide, such as interactive pages, settings pages, query pages, etc.
[0037] In some embodiments, terminal device 110 is communicatively connected to server 120 to provide services to application 101. Terminal device 110 may be a mobile terminal, fixed terminal, or portable terminal, etc., including but not limited to mobile phones, desktop computers, laptop computers, multimedia tablets, e-book devices, gaming devices, or any combination thereof, including accessories and peripherals of these devices or any combination thereof. In some embodiments, terminal device 110 may also support any type of interface, and server 120 may be various types of computing systems or servers capable of providing computing power, including but not limited to mainframes, edge computing nodes, computing devices in cloud environments, etc.
[0038] It should be noted that, Figure 1 This is merely an example of an application scenario and does not limit the scope of protection of this invention.
[0039] The embodiments of the present invention will now be described with reference to the accompanying drawings. It should be understood that the pages shown in the drawings are merely examples, and various page designs are possible in practice. The various graphic elements on the page may have different arrangements and different visual representations; one or more elements may be omitted or replaced, and one or more other elements may also be present, without any limitation in the embodiments of the present invention. Furthermore, the embodiments described below primarily pertain to terminal device 110. It should be understood that the actions described relative to terminal device 110 can be performed by application 101 on terminal device 110, or can be performed by application 101 in conjunction with its server (e.g., server 120).
[0040] This invention provides a waveform recording data structure for storing sampled signals; the waveform recording data structure includes: A reference waveform recording time sequence and at least one waveform recording vector; the waveform recording vector includes multiple data storage items, the number of which is equal to the quotient obtained by dividing the waveform recording period by the sampling period, and the quotient is an integer greater than or equal to a preset value; the multiple data storage items have serial numbers starting from 1 and ending at the quotient; wherein, a data storage item with any serial number is used to store all sampled values of the target physical signal, wherein the sampling time of the sampled value is equal to the reference waveform recording time plus the serial number minus one multiplied by the sampling period.
[0041] Specifically, the waveform recording vector consists of n data storage items, where the k-th (1≤k≤n) data storage item is used to store all sampled values of the target physical signal at the time that satisfies sampling time = reference waveform recording time + (k-1)Δt, i.e., the waveform recording vector (V): for a high sampling rate signal S(t), the waveform recording vector is defined in the waveform recording file by... A set V = [V1, V2, ..., Vn] consisting of data storage items. This vector, as a whole, is represented by the recording cycle. renew.
[0042] Where Δt is the sampling period of the target physical signal, and the sampling period is... The actual physical sampling interval of the signal to be observed (e.g., 10 μs).
[0043] Reference recording time The actual time sequence recorded in the waveform file. .
[0044] Recording period The time interval (e.g., 50 μs) for performing data write operations on the waveform file. ( (A number greater than 1).
[0045] For example, such as Figure 2 As shown, the waveform recording data structure divides the sampling times into n groups according to phase, where each group corresponds to a fixed phase offset (e.g., the first group corresponds to time m×n+1, (m+1)×n+1, etc., the second group corresponds to time m×n+2, (m+1)×n+2, etc., up to the nth group corresponding to time (m+1)×n, (m+2)×n, etc.). At each reference waveform recording time (i.e., the time corresponding to the waveform recording accuracy), the sampled values of all phases in the current period are recorded respectively (e.g., the first waveform recording time records the data at time m×n+1, the second waveform recording time records the data at time m×n+2, ..., the nth waveform recording time records the data at time (m+1)×n), so that the waveform recording file stores all high-precision sampled values at a low waveform recording frequency, and each data storage item only stores the continuous sampled values of the same phase.
[0046] The waveform recording data structure provided in this embodiment stores the sampled values of the target physical signal into multiple data storage items with fixed serial numbers according to the phase offset of the sampling time relative to the reference waveform recording time. This ensures that each data storage item stores only the sampled values of the same phase. Thus, under the condition that the waveform recording period remains unchanged (i.e., low-frequency writing), all sampling information with a higher sampling period is completely preserved. This achieves lossless recording of high sampling rate signals, avoids the surge in data volume and storage bandwidth pressure caused by increasing the waveform recording frequency, and solves the problem that existing waveform recording data structures cannot completely preserve the high sampling rate time series information of signals under low-frequency writing conditions.
[0047] According to an embodiment of the present invention, a method for recording waveform data based on distributed time slot mapping is also provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0048] This embodiment provides a method for recording waveform data based on distributed time slot mapping, which can be used in the aforementioned electronic devices or terminal devices. Figure 3 This is a flowchart of a waveform data storage method based on distributed time slot mapping according to an embodiment of the present invention, as shown below. Figure 3 As shown, the process includes the following steps: Step S301: Acquire multiple discrete sampled values of the target physical signal using the sampling period.
[0049] Here, "object" refers to the data acquired and recorded by the waveform recording system. It can be a discrete value sequence of an analog signal after sampling, or a state value sequence of a digital signal. This invention uses a distributed time-slot mapping method to create a waveform recording vector for each target physical signal requiring high-precision observation, and stores the high-frequency sampling information of the signal losslessly into a low-frequency written waveform recording file.
[0050] In this embodiment, the target physical signal refers to the analog and / or digital quantities that need to be recorded and observed in the flexible DC transmission valve base control equipment, including but not limited to bridge arm current, DC bus voltage, protection action flag, overcurrent flag, and IGBT (Insulated Gate Bipolar Transistor) fault feedback signal.
[0051] Specifically, with high sampling frequency Instantaneous sampling of the target physical signal S(t) yields a discrete sequence S1, S2, ..., S3. The sampling period of the target physical signal.
[0052] Step S302: Using the waveform data structure, a corresponding waveform vector is created for the target physical signal.
[0053] Specifically, the quotient (i.e. the number of data storage items) is calculated based on the preset recording period and sampling period. The corresponding number of data storage items are allocated to the target physical signal in the preset recording file, and these data storage items are logically associated into a vector group with a unified identifier, thereby forming a recording vector that uniquely corresponds to the signal, which is used to store the sampled values of different phases according to the phase index.
[0054] Step S303: Calculate the phase difference between the sampling time of each discrete sample value and the corresponding reference recording time, determine the corresponding time slot phase index based on the phase difference, and assign each discrete sample value to the specified data storage item in the recording vector.
[0055] Among them, the time slot phase index : k∈{1,2,...,n}, represents the high sampling point relative to its corresponding reference recording time. The phase position, the first Phase corresponding time is .
[0056] In one alternative implementation, the phase difference is equal to the sampling time minus the corresponding reference recording time, where the corresponding reference recording time is the maximum reference recording time that is not greater than the corresponding sampling time.
[0057] Specifically, for each discrete sampled value, firstly, the reference recording period to which its sampling time belongs is determined, that is, the maximum reference recording time not greater than the sampling time is found as the reference recording time. Then, the time difference between the two is calculated to obtain the phase difference. After dividing the phase difference by the sampling period, the corresponding time slot phase index is determined. This index directly indicates which data storage item in the recording vector should receive the sampled value. Finally, the current sampled value is stored in the data storage item corresponding to the index, completing one phase mapping and update of the sampled value.
[0058] Step S304: At each reference recording time, the latest assigned discrete sampled values in all data storage items of the recording vector are written as a whole into the preset recording file.
[0059] Among them, the preset waveform recording file refers to the file that is pre-created or initialized in the valve base control device for persistent storage of waveform recording data. The waveform recording file is located in a non-volatile storage medium (such as Flash, hard disk, SD card, etc.) and is used to save the waveform recording vector data written at each reference waveform recording moment for subsequent fault analysis or waveform reconstruction.
[0060] Specifically, when each reference recording time arrives, a write operation is triggered to copy or transfer all data storage items (each storage item stores the latest sampled value of its corresponding phase) contained in the recording vector maintained in the time slot mapping and vector management module to the corresponding storage area of the preset recording file, thus completing a data synchronization from memory vector to persistent file, thereby permanently saving the high-precision sampling information of multiple phases at the frequency of the recording cycle.
[0061] In a waveform recording file, n data storage items for the same physical signal are logically associated as a vector or group, and are updated and stored synchronously. The value of n (n≥2) ensures that the effective sampling period represented by the data in the waveform recording file is 1 / n of the waveform recording period.
[0062] The waveform recording data storage method based on distributed time slot mapping provided in this embodiment maps high-sampling-rate discrete sampled values to different data storage items of the waveform recording vector according to their phase difference with the reference waveform recording time. At each reference waveform recording time, all storage items of the entire waveform recording vector are written into the waveform recording file. This keeps the writing frequency of the waveform recording file at a low waveform recording period, while still completely preserving all sampled information with a higher sampling period. This achieves lossless recording of high-sampling-rate signals without increasing the waveform recording frequency or storage bandwidth, effectively avoiding the data volume expansion and hardware resource pressure caused by increasing observation accuracy.
[0063] This embodiment provides a method for recording waveform data based on distributed time slot mapping, which can be used in the aforementioned electronic devices or terminal devices. Figure 4 This is a flowchart of a waveform data storage method based on distributed time slot mapping according to an embodiment of the present invention, as shown below. Figure 4 As shown, the process includes the following steps: Step S401: Acquire multiple discrete sample values of the target physical signal according to the sampling period. See details below. Figure 3 Step S301 of the illustrated embodiment will not be described again here.
[0064] Step S402: Using the waveform data structure, a corresponding waveform vector is created for the target physical signal.
[0065] Specifically, step S402 includes: Step a: Assign multiple data storage items to the target physical signal in the preset waveform recording file, and logically associate the multiple data storage items into a vector group, which has a unified identifier.
[0066] For example, during the initialization phase of the waveform recording system of the valve-based control device, the waveform recording period T and sampling period are pre-configured. The quotient n is calculated, and then n consecutive data storage slots are reserved in the preset waveform file for the target physical signal (e.g., bridge arm current). Each slot corresponds to a fixed phase offset (0, Δt, 2Δt, …, (n-1)Δt). These slots are logically bound into a vector group and assigned a unique group identifier (e.g., ArmCurrent_Vector) so that subsequent write operations can directly locate the entire group of slots through this identifier, while ensuring that during reading, it can be identified that these slots belong to the distributed waveform data of the same signal.
[0067] Step S403: Calculate the phase difference between the sampling time of each discrete sample value and the corresponding reference recording time, determine the corresponding time slot phase index based on the phase difference, and assign each discrete sample value to the specified data storage item in the recording vector.
[0068] In some optional implementations, step S403 above includes: Step S4031: Determine the time slot phase index based on the index position corresponding to the ratio of phase difference to sampling period; the index position is obtained by dividing the phase difference by the sampling period, rounding down, and then adding 1.
[0069] Specifically, for each sampling point S[i], calculate its corresponding reference recording time. ( ≤Sampling time< ) and time slot phase index k (k = floor((sampling time- () / Δt) +1, to round the data.
[0070] Step S4032: Based on the time slot phase index, determine the data storage item that uniquely corresponds to the time slot phase index from multiple data storage items of the recorded waveform vector, and store the discrete sampled values into the corresponding data storage item.
[0071] This step is a vector update step, which temporarily assigns or buffers the discrete sampled value S[i] to the corresponding component Vk in the waveform vector V. That is, Vk is responsible for collecting all discrete sampled values with time slot phase index k.
[0072] Step S404: At each reference recording time, the latest assigned discrete sampled values from all data storage items of the recording vector are written as a whole to the preset recording file. For details, please refer to [link to relevant documentation]. Figure 3 Step S304 of the illustrated embodiment will not be described again here.
[0073] Step S405: Based on the values of each data storage item in the waveform vector written to the waveform file, the sampled value of the target physical signal at the specified sampling time is restored.
[0074] The method for restoring the signal waveform from the waveform recording file generated using the methods described in steps S401 to S404 is as follows: Step 1: The user provides a high-precision time tq that needs to be queried.
[0075] Step 2: Determine the reference recording time Tm to which tq belongs (satisfying Tm ≤ tq) <Tm+T)。
[0076] Step 3: Calculate the time slot phase index k corresponding to tq (k=floor((tq-Tm) / Δt)+1). tq may not completely coincide with the actual sampling time; in this case, k points to the phase of the nearest sampling point after tq.
[0077] Step 4: Read the waveform vector V(Tm) recorded at the reference waveform recording time Tm in the waveform recording file, and extract the sampled value of its k-th component Vk(Tm).
[0078] Step 5: The value Vk(Tm) is the sampled value of signal S(t) at sampling time Tm+(k-1)×Δt (i.e., the nearest sampling point after tq). By continuously querying, the high-precision time series of the signal can be reconstructed without loss.
[0079] This embodiment provides a distributed time-slot mapping-based waveform recording data storage method. The core idea of distributed time-slot mapping is to distribute and store a high-sampling-frequency physical signal, according to the phase difference between its sampling time point and the waveform recording reference time, across multiple low-update-frequency storage variables in the waveform recording file, forming a logical waveform recording vector or logical channel group. This method can record and restore high-sampling-rate time-series information of specific signals losslessly without increasing or even decreasing the overall recording frequency of the waveform recording file, thereby achieving a significant improvement in the observation accuracy of key signals with extremely low hardware modification costs. This invention is particularly suitable for technical transformation and performance upgrades of existing waveform recording systems.
[0080] As one or more specific application embodiments of the present invention, the method for recording waveform data based on distributed time slot mapping provided by the present invention will be further described in detail, and the specific process is as follows: Step 1, Signal Sampling: at a high sampling frequency The target physical signal S(t) is sampled to obtain a discrete sequence S1, S2, ..., S3.
[0081] Step 2, Time Slot Mapping: For each sampling point S[i], calculate its corresponding reference recording time. ( ≤Sampling time< ) and time slot phase index k (k = floor((sampling time- The function `() / Δt) + 1` rounds the data to the nearest whole number.
[0082] Step 3, Vector Update: The discrete sampled value S[i] is temporarily assigned or cached to the corresponding component Vk in the waveform vector V. That is, Vk is responsible for collecting all discrete sampled values with time slot phase index k.
[0083] Step 4, Vector Submission: At each reference recording time Upon arrival, the instantaneous values of all components [V1, V2, ..., Vn] of the current waveform vector V (i.e., the latest sampled values of the corresponding phases) are written to the waveform file at once.
[0084] Repeat steps 1 through 4 above.
[0085] This method records the waveform vector V at a lower frequency (1 / T), but the waveform vector V contains all the phase-distributed information of the signal S(t) sampled at a higher frequency (1 / Δt). The hardware only needs to process the data writing at a frequency of 1 / T, yet achieves a high-precision, complete recording of the target physical signal at 1 / Δt.
[0086] This embodiment also provides a method for restoring a signal waveform from a waveform recording file generated using the methods described in steps 1 to 4 above, as follows: Step 1: The user provides a high-precision time tq that needs to be queried.
[0087] Step 2: Determine the reference recording time Tm to which tq belongs (satisfying Tm ≤ tq) <Tm+T)。
[0088] Step 3: Calculate the time slot phase index k corresponding to tq (k=floor((tq-Tm) / Δt)+1). tq may not completely coincide with the actual sampling time; in this case, k points to the phase of the nearest sampling point after tq.
[0089] Step 4: Read the waveform vector V(Tm) recorded at the reference waveform recording time Tm in the waveform recording file, and extract the sampled value of its k-th component Vk(Tm).
[0090] Step 5: The value Vk(Tm) is the sampled value of signal S(t) at sampling time Tm+(k-1)×Δt (i.e., the nearest sampling point after tq). By continuously querying, the high-precision time series of the signal can be reconstructed without loss.
[0091] Taking a flexible DC valve control system as an example, the control cycle (mainstream waveform recording accuracy) is 50μs(T), and the bridge arm overcurrent protection requires a sampling accuracy of 10μs(Δt), so n=5.
[0092] Waveform recording design: such as Figure 5 As shown, a 5-dimensional waveform recording vector V_I = [I_phase1, I_phase2, I_phase3, I_phase4, I_phase5] is defined for the bridge arm current signal. The waveform recording file is recorded in 50μs periods.
[0093] I_phase1: Records the current values at times t0+0μs, t0+50μs, t0+100μs...
[0094] I_phase2: Record the current values at times t0+10μs, t0+60μs, t0+110μs...
[0095] ...and so on.
[0096] Every 50μs, these 5 values are simultaneously written to the waveform file.
[0097] Fault analysis applications: such as Figure 6 As shown, if the overcurrent flag of I_phase2 (corresponding to t1+10μs) changes from 0 to 1 in the vector recorded at the reference recording time t1, the fault can be accurately located at t1+10μs. During analysis, by directly reading the values of I_phase2 of V_I at time t1 and the corresponding phase values of several consecutive reference recording times before that, the continuous current waveform with an accuracy of 10μs before the fault can be obtained, which can be used to verify the protection criteria.
[0098] For technical upgrade projects, the valve-controlled waveform recording accuracy technology is relatively outdated, typically designed to be 100μs or 50μs, and generally reserving many spare waveform data positions. However, after the upgrade, the protection action speed will generally be improved, which requires improving the waveform recording accuracy of protection-related analog and digital quantities. To adapt to the waveform recording technology in the field, the waveform data storage method based on distributed time slot mapping proposed in this embodiment can be used. This method represents a protection analog or digital quantity in a distributed manner using multiple spare positions of waveform vectors in an existing waveform file (e.g., ...). Figure 5 , Figure 6 As shown in the figure, this allows for high sampling accuracy and display accuracy of waveform recordings at a lower cost.
[0099] The waveform data storage method based on distributed time slot mapping in this invention has the following advantages: 1. Decoupling of resources and accuracy: This invention decouples signal sampling accuracy from recording frequency, allowing for lossless, high-precision historical data tracing capabilities for critical signals while maintaining low storage and input / output bandwidth pressure.
[0100] 2. Data integrity and losslessness: Compared with the methods of discarding data or reducing accuracy in segments in the background technology, the present invention completely preserves all sampling point information of high sampling rate signals through distributed time slot mapping, and the data restoration is distortion-free.
[0101] 3. Significantly reduced upgrade costs and high compatibility: This invention is particularly suitable for technical upgrade scenarios. It does not require replacing the original low-speed waveform recording hardware. By simply upgrading the software to modify the data organization and processing logic, the original equipment can obtain high-precision waveform recording capabilities for some signals. It has excellent economic efficiency and engineering feasibility.
[0102] 4. Unified and simplified design: This invention uses a single, lower recording frequency, avoiding the synchronization, alignment, and fusion problems caused by multi-rate recording, thus reducing system complexity and maintenance costs.
[0103] 5. Defining a new type of data asset: The waveform file generated by this invention is a new data structure with implicit high-precision time mapping relationship, which provides a richer and more accurate data foundation for subsequent big data analysis and intelligent diagnosis.
[0104] This embodiment also provides a waveform data storage device based on distributed time slot mapping. This device is used to implement the above embodiments and preferred embodiments, and details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0105] This embodiment provides a waveform recording data storage device based on distributed time slot mapping, such as... Figure 7 As shown, it includes: The sampling module 701 is used to acquire multiple discrete sampled values of the target physical signal at a sampling period.
[0106] The time slot mapping and vector management module 702 is used to create a corresponding recording vector for the target physical signal using the recording data structure of the first aspect described above; calculate the phase difference between the sampling time of each discrete sample value and the corresponding reference recording time; determine the corresponding time slot phase index based on the phase difference; and assign each discrete sample value to a specified data storage item in the recording vector.
[0107] The low-frequency waveform recording and writing module 703 is used to write the latest assigned discrete sampled values from all data storage items of the waveform recording vector as a whole to a preset waveform recording file at each reference waveform recording time.
[0108] In one alternative implementation, the time slot mapping and vector management module 702 includes: The waveform recording vector initialization unit is used to allocate multiple data storage items for the target physical signal in a preset waveform recording file, and logically associate the multiple data storage items into a vector group, which has a unified identifier.
[0109] In one alternative implementation, the phase difference is equal to the sampling time minus the corresponding reference recording time, where the corresponding reference recording time is the maximum reference recording time that is not greater than the corresponding sampling time.
[0110] In an optional implementation, the time slot mapping and vector management module 702 further includes: The time slot mapping unit is used to determine the time slot phase index based on the sequence number position corresponding to the ratio of phase difference to sampling period.
[0111] In one alternative implementation, the position number is obtained by dividing the phase difference by the sampling period, rounding down, and then adding 1.
[0112] In an optional implementation, the time slot mapping and vector management module 702 further includes: The vector update unit is used to determine the data storage item that uniquely corresponds to the time slot phase index from multiple data storage items of the recorded waveform vector based on the time slot phase index, and to store the discrete sampled value into the corresponding data storage item.
[0113] In one alternative embodiment, the device further includes: The signal restoration module is used to restore the sampled value of the target physical signal at a specified sampling time based on the values of each data storage item in the waveform vector written to the waveform file.
[0114] The waveform recording data storage device based on distributed time slot mapping provided in this invention can execute the waveform recording data storage method based on distributed time slot mapping provided in any embodiment of this invention, and has the corresponding functional modules and beneficial effects of the method. Further functional descriptions of the above modules and units are the same as in the corresponding embodiments described above, and will not be repeated here.
[0115] This invention provides a valve-based control device for power electronic equipment, including the aforementioned waveform recording data storage device based on distributed time-slot mapping. Further functional descriptions of the waveform recording data storage device based on distributed time-slot mapping in the valve-based control device for power electronic equipment are the same as those in the corresponding embodiments described above, and will not be repeated here.
[0116] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention.
[0117] The following is a detailed reference. Figure 8 This diagram illustrates a suitable structural schematic for implementing an electronic device according to embodiments of the present invention. The electronic device may include a processor (e.g., a central processing unit, graphics processor, etc.) 801, which can perform various appropriate actions and processes based on a program stored in read-only memory (ROM) 802 or a program loaded from memory 808 into random access memory (RAM) 803. The RAM 803 also stores various programs and data required for the operation of the electronic device. The processor 801, ROM 802, and RAM 803 are interconnected via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0118] Typically, the following devices can be connected to I / O interface 805: input devices 806 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 807 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; memory devices 808 including, for example, magnetic tapes, hard disks, etc.; and communication devices 809. Communication device 809 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 8 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown, and more or fewer devices may be implemented or have instead.
[0119] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 809, or installed from a memory 808, or installed from a ROM 802. When the computer program is executed by the processor 801, it performs the functions defined in the distributed time-slot mapping-based waveform data storage method of the embodiments of the present invention.
[0120] Figure 8 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of the present invention.
[0121] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as recordable on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, the waveform data recording method based on distributed time-slot mapping shown in the above embodiments is implemented.
[0122] A portion of this invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the invention through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.
[0123] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A waveform recording data structure, characterized in that, Used for storing sampled signals; the waveform recording data structure includes: A reference waveform recording time sequence and at least one waveform recording vector; The waveform recording vector includes multiple data storage items. The number of the multiple data storage items is equal to the quotient obtained by dividing the waveform recording period by the sampling period, and the quotient is an integer greater than or equal to a preset value. The multiple data storage items have serial numbers starting from 1 and ending at the quotient. The data storage item with any serial number is used to store all sampled values of the target physical signal, wherein the sampling time of the sampled value is equal to the reference waveform recording time plus the serial number minus one multiplied by the sampling period.
2. A method for recording waveform data based on distributed time-slot mapping, characterized in that, The method includes: Multiple discrete sampled values of the target physical signal are acquired using the sampling period; Using the waveform data structure as described in claim 1, a corresponding waveform vector is created for the target physical signal; Calculate the phase difference between the sampling time of each discrete sample value and the corresponding reference recording time, determine the corresponding time slot phase index based on the phase difference, and assign each discrete sample value to a specified data storage item in the recording vector; At each reference recording time, the latest assigned discrete sample value from all data storage items of the recording vector is written as a whole into a preset recording file.
3. The method according to claim 2, characterized in that, Creating a corresponding waveform vector for the target physical signal includes: In the preset waveform recording file, multiple data storage items are allocated for the target physical signal, and the multiple data storage items are logically associated into a vector group, which has a unified identifier.
4. The method according to claim 2, characterized in that, The phase difference is equal to the sampling time minus the corresponding reference recording time, where the corresponding reference recording time is the maximum reference recording time that is not greater than the corresponding sampling time.
5. The method according to claim 2, characterized in that, Determining the corresponding time slot phase index based on the phase difference includes: The time slot phase index is determined based on the position corresponding to the ratio of the phase difference to the sampling period.
6. The method according to claim 5, characterized in that, The position number is obtained by dividing the phase difference by the sampling period, rounding down, and then adding 1.
7. The method according to claim 2, characterized in that, Assigning each discrete sampled value to a designated data storage item in the waveform recording vector includes: Based on the time slot phase index, a data storage item that uniquely corresponds to the time slot phase index is determined from multiple data storage items of the recorded waveform vector, and the discrete sampled value is stored in the corresponding data storage item.
8. The method according to claim 2, characterized in that, The method further includes: Based on the values of each data storage item in the waveform vector written to the waveform file, the sampled value of the target physical signal at the specified sampling time is restored.
9. A waveform recording data storage device based on distributed time-slot mapping, characterized in that, The device includes: The sampling module is used to acquire multiple discrete sampled values of the target physical signal at a sampling period. The time slot mapping and vector management module is used to create a corresponding waveform recording vector for the target physical signal using the waveform recording data structure as described in claim 1; calculate the phase difference between the sampling time of each discrete sample value and the corresponding reference waveform recording time; determine the corresponding time slot phase index based on the phase difference; and assign each discrete sample value to a specified data storage item in the waveform recording vector. The low-frequency waveform recording and writing module is used to write the latest assigned discrete sampled values from all data storage items of the waveform recording vector as a whole into a preset waveform recording file at each reference waveform recording time.
10. The apparatus according to claim 9, characterized in that, The time slot mapping and vector management module includes: The waveform recording vector initialization unit is used to allocate multiple data storage items for the target physical signal in the preset waveform recording file, and logically associate the multiple data storage items into a vector group, wherein the vector group has a unified identifier.
11. The apparatus according to claim 9, characterized in that, The phase difference is equal to the sampling time minus the corresponding reference recording time, where the corresponding reference recording time is the maximum reference recording time that is not greater than the corresponding sampling time.
12. The apparatus according to claim 9, characterized in that, The time slot mapping and vector management module includes: The time slot mapping unit is used to determine the time slot phase index based on the sequence number position corresponding to the ratio of the phase difference to the sampling period.
13. The apparatus according to claim 12, characterized in that, The position number is obtained by dividing the phase difference by the sampling period, rounding down, and then adding 1.
14. The apparatus according to claim 12, characterized in that, The time slot mapping and vector management module also includes: The vector update unit is used to determine, based on the time slot phase index, a data storage item that uniquely corresponds to the time slot phase index from multiple data storage items of the recorded waveform vector, and store the discrete sampled value into the corresponding data storage item.
15. The apparatus according to claim 9, characterized in that, The device further includes: The signal restoration module is used to restore the sampled value of the target physical signal at a specified sampling time based on the values of each data storage item in the waveform vector written into the waveform file.
16. A valve base control device for power electronic equipment, characterized in that, The device includes a waveform data storage device based on distributed time slot mapping as described in any one of claims 9 to 15.
17. An electronic device, characterized in that, include: The system includes a memory and a processor, which are interconnected. The memory stores computer instructions, and the processor executes the computer instructions to perform the waveform data recording method based on distributed time slot mapping as described in any one of claims 2 to 8.
18. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to execute the waveform data recording method based on distributed time slot mapping as described in any one of claims 2 to 8.
19. A computer program product, characterized in that, It includes computer instructions for causing a computer to execute the waveform data storage method based on distributed time slot mapping as described in any one of claims 2 to 8.