Method and device for generating analog signal data, computer equipment and storage medium
By generating analog signal data to replace actual signal data, the problem of time-consuming and labor-consuming fixture design and debugging in traditional signal verification is solved, and an efficient and economical signal verification process is achieved.
Patent Information
- Application Number
- CN202411866211.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-03-14
AI Technical Summary
The prior art requires the design and commissioning of special fixtures during signal verification, resulting in high consumption of manpower, material resources and time resources.
By obtaining the frequency parameters of the sensor's actual signal data and signal law information required for signal verification, analog signal data is generated to replace the actual signal data and signal verification is performed.
It avoids the high cost and time consumption of fixture design and debugging, shortens the signal verification cycle, and improves the efficiency and economicality of signal verification.
Smart Images

Figure CN119618293A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of testing and verification technology, and in particular to a method, device, computer equipment and storage medium for generating analog signal data. Background Art
[0002] Smart wearable devices contain many sensors. At present, in the process of verifying the signal data collected by the sensors, special fixtures are needed to verify some signal data. The special fixtures are used to collect signals with certain rules to complete the verification. This method generally requires a lot of manpower and material resources to design qualified fixtures. The debugging and verification of the fixtures also takes a lot of time, which consumes a lot of manpower and material resources. Summary of the invention
[0003] Based on this, it is necessary to provide a method, device, computer equipment and storage medium for generating analog signal data in response to the above technical problems.
[0004] In a first aspect, the present application provides a method for generating analog signal data, the method comprising:
[0005] Obtain frequency parameters of actual signal data collected by the sensor;
[0006] Obtain signal regularity information required for signal verification;
[0007] Based on the frequency parameters and the signal regularity information, simulated signal data is generated; wherein the simulated signal data is used to replace the actual signal data for signal verification.
[0008] In a second aspect, the present application also provides a device for generating analog signal data, comprising:
[0009] An acquisition module is used to obtain the frequency parameters of the actual signal data collected by the sensor; and obtain the signal regularity information required for signal verification;
[0010] A generation module is used to generate simulated signal data based on the frequency parameters and the signal regularity information; wherein the simulated signal data is used to replace the actual signal data for signal verification.
[0011] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in the first aspect is implemented.
[0012] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method described in the first aspect.
[0013] In a fifth aspect, the present application further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the method described in the first aspect.
[0014] The method, device, computer equipment, storage medium and computer program product for generating analog signal data include: obtaining frequency parameters of actual signal data collected by the sensor; obtaining signal regularity information required for signal verification; generating analog signal data based on the frequency parameters and the signal regularity information; wherein the analog signal data is used to replace the actual signal data for signal verification. Through this scheme, by obtaining the frequency parameters of the actual signal data of the sensor and the signal regularity information required for signal verification, analog signal data is generated to replace the actual signal data for signal verification. Traditional signal verification often relies on making special jigs to collect signals with specific regularities. This process not only requires a lot of manpower to design and debug jigs, but also requires a lot of investment in material resources, from the preparation of jig materials to the use of processing equipment. At the same time, the whole process is extremely time-consuming. This scheme is based on parameter acquisition and analog data generation at the software level, which cleverly avoids the jig production link. There is no need for professionals to spend a lot of time and energy to conceive and build complex jig structures, nor is there a need to purchase a large amount of jig production materials and use related equipment, which greatly reduces the investment of manpower in jig-related matters. In terms of material resources, it avoids the waste of materials and equipment occupation caused by fixture production. And because there is no need to wait for the design, production and debugging of the fixture to be completed, the signal verification cycle is greatly shortened, allowing the entire project to be advanced more efficiently, thus achieving considerable savings in manpower, material resources and time costs, and providing an economical, efficient and convenient solution for signal verification work in related technical fields. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0016] Figure 1 A schematic diagram of a method for generating analog signal data in one embodiment Figure 1 ;
[0017] Figure 2 A schematic diagram of replacing actual signal data with simulated signal data in one embodiment;
[0018] Figure 3A schematic diagram of a method for generating analog signal data in one embodiment Figure 2 ;
[0019] Figure 4 A structural block diagram of an apparatus for generating analog signal data in one embodiment;
[0020] Figure 5 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0021] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0022] The method for generating analog signal data provided in the embodiment of the present application can be applied to a device or computer device for generating analog signal data. The device for generating analog signal data can be a functional module or functional entity in a computer device for implementing the method for generating analog signal data. The computer device can include but is not limited to the following devices:
[0023] (1) Industrial control computers: In the field of industrial automation, it is often necessary to simulate and verify various sensor signals. Industrial control computers can run relevant software to implement the method of generating simulated signal data. It has powerful computing power and rich interfaces, and can be connected to various sensor networks or test platforms to obtain the frequency parameters of actual signal data, and generate simulated signal data based on signal verification requirements. It is used to replace real sensor signals in scenarios such as industrial equipment debugging and production line testing to check the control system's response to different signals and ensure the stability and accuracy of the entire industrial production process.
[0024] (2) Embedded development boards: For example, embedded development boards based on the Advanced RISC Machine (ARM) architecture. When developing sensor-related functional modules in embedded systems, developers can use this type of device to generate analog signal data. It can be integrated into the development environment to generate analog signal data by obtaining the frequency parameter information of the sensor and setting the signal law requirements. It can be used to verify the correctness of signal processing algorithms, drivers, etc. during the development and testing phase of embedded software without relying on external complex signal source equipment or a large number of physical sensor tests, saving development costs and time.
[0025] In an exemplary embodiment, Figure 1 As shown, a schematic diagram of a method for generating analog signal data is provided. Figure 1, the method may include the following steps:
[0026] 101. Obtain frequency parameters of actual signal data collected by the sensor.
[0027] The above-mentioned sensor can be any sensor, for example, a temperature sensor, an acceleration sensor, a pressure sensor, etc.
[0028] Among them, the frequency parameter of the actual signal data mentioned above refers to the numerical description related to the number of times the signal actually collected by the sensor repeats changes in a unit time. For example, for a periodic electrical signal, it can be intuitively reflected as the number of times the signal waveform appears completely per second, and the unit is usually Hertz (Hz). The signal frequencies collected by different types of sensors are different. For example, the frequency of the heart rate signal collected by the heart rate sensor may be relatively low, while the signal frequency collected by the acceleration sensor during rapid motion detection may be higher. This parameter reflects the rhythmic characteristics of the signal changing in the time dimension.
[0029] In the above step 101, first, an effective connection needs to be established with the corresponding sensor, which can be connected and communicated by wired (such as an interface connection method using a data line to transmit signals) or wireless (such as Bluetooth, Wi-Fi and other communication protocols, if the sensor supports wireless transmission functions). Under normal working conditions, the sensor will collect physical quantities in the external environment in real time and convert them into actual signal data in the form of electrical signals, and then analyze these signal data through its built-in data processing module or external acquisition equipment connected to it (such as a data acquisition card, etc., if the sensor itself does not have complex processing functions), extract the parameter value reflecting the frequency of repeated changes in the signal, and finally pass this frequency parameter to the main device (such as a computer, embedded device, etc.) that executes the analog signal data generation method for use in subsequent steps.
[0030] 102. Obtain signal regularity information required for signal verification.
[0031] Among them, the signal regularity information is a description of the requirements for signal characteristics and change laws set according to the signal verification target to be carried out. Common signal regularity information includes different types of waveform characteristics such as square wave signal (a periodic rectangular pulse signal, the signal level periodically switches between high and low states, with a fixed duty cycle), triangle wave signal (the waveform is triangular, and its amplitude changes linearly with time), sine wave signal (a continuous waveform signal that changes according to the law of the sine function), etc. In addition, some other characteristic requirements of the signal may also be involved, such as signal amplitude range, phase characteristics, etc., which clarifies the shape and change rules that the analog signal to be generated should have.
[0032] In some embodiments, the signal regularity information includes any of the following:
[0033] Square wave signal, triangle wave signal, sine wave signal.
[0034] In the above step 102, the user can manually input the type of signal law to be simulated (such as selecting square wave, triangle wave or sine wave, etc.) and the corresponding specific parameter requirements (such as inputting the duty cycle value when selecting square wave) in a specific operation interface (for example, in the interface of the developed signal simulation software, there are corresponding setting option boxes or interactive elements such as drop-down menus). It can also be determined by reading the corresponding signal law information from a pre-configured signal verification task configuration file. These configuration files can be text files or database records stored in a local device in advance based on previous test experience, specific project requirements, etc. The obtained signal law information will provide a basis for the next step of accurately generating simulated signal data that meets the requirements.
[0035] 103. Generate analog signal data based on the frequency parameters and signal regularity information.
[0036] The simulated signal data is used to replace the actual signal data for signal verification.
[0037] The above method for generating analog signal data obtains the frequency parameters of the actual signal data of the sensor and the signal regularity information required for signal verification, and then generates analog signal data to replace the actual signal data for signal verification. Traditional signal verification often relies on making special fixtures to collect signals with specific regularities. This process not only requires a lot of manpower to design and debug the fixtures, but also requires considerable investment in material resources, from the preparation of fixture materials to the use of processing equipment. At the same time, the whole process is extremely time-consuming. This solution is based on software-level parameter acquisition and analog data generation, which cleverly avoids the fixture production link. There is no need for professionals to spend a lot of time and energy to conceive and build complex fixture structures, nor is there a need to purchase a large amount of fixture production materials and use related equipment, which greatly reduces the investment of manpower in fixture-related affairs. In terms of material resources, it avoids material waste and equipment occupation caused by fixture production. And because there is no need to wait for the design, production, and debugging of the fixture to be completed, the signal verification cycle is greatly shortened, so that the entire project can be promoted more efficiently, thereby achieving considerable savings in manpower, material resources, and time costs, and providing a cost-effective and convenient solution for signal verification work in related technical fields.
[0038] In some embodiments, the process of generating analog signal data based on frequency parameters and signal law information may include but is not limited to: determining the initial state data and basic parameters of the analog signal data based on the signal law information; configuring the output frequency of the data generation timer based on the frequency parameters; when the data generation timer is triggered according to the output frequency, updating the initial state data based on the initial state data and basic parameters according to the signal law information to obtain a state data sequence, and using the state data sequence as the analog signal data.
[0039] The initial state data of the analog signal data is the numerical representation corresponding to the initial state of the signal set when the analog signal data is generated. For example, to generate a sine wave analog signal, the initial state data can be the specific values of the signal amplitude, phase, etc. corresponding to the initial moment, which is equivalent to determining the appearance of the analog signal at the beginning, and provides a starting point for the subsequent generation of a complete signal data sequence over time.
[0040] The basic parameters of the above analog signal data refer to some key constant values that determine the overall characteristics and variation range of the analog signal. Taking the sine wave as an example, the basic parameters include amplitude (determines the maximum range of the amplitude fluctuation of the sine wave signal), angular frequency (related to the frequency of the signal, affecting the speed of the signal change), phase (determines the relative position of the signal starting on the time axis), etc. These parameters play a basic regulatory role in the entire analog signal generation process, ensuring that the generated signal conforms to the expected rules.
[0041] In the above embodiment, after obtaining the signal regularity information, if it is a square wave signal, its initial state data may be the level state (high level or low level) of the square wave at the initial moment, and the basic parameter is its duty cycle value (for example, the duty cycle is 50%, which means the ratio of the high level time to the total time of a cycle); if it is a sine wave, the initial state data is determined by using the relevant mathematical formulas according to the requirements for the sine wave in the signal regularity information, such as setting the initial phase value, initial amplitude, etc. The basic parameters are determined as specific values such as amplitude and angular frequency. This process usually requires corresponding calculation and assignment operations based on the mathematical models corresponding to different signal types and the given verification requirements, so as to lay the foundation for the subsequent generation of complete analog signal data.
[0042] In the output frequency of the above-mentioned data generation timer, the data generation timer is a tool that generates a trigger signal at a preset time interval, and its output frequency is the frequency value of how often it is triggered. In the process of analog signal data generation, this output frequency determines the rhythm of analog signal data update. For example, if it is set to trigger once every 0.1 seconds, the analog signal data will be continuously updated and changed according to the corresponding rules at this time interval, so as to simulate a signal with a specific frequency.
[0043] In the above embodiment, the output frequency of the timer can be set by performing corresponding conversion or direct assignment according to the frequency parameters of the actual signal data obtained. For example, if the frequency of the actual signal is 10Hz, the timer can be configured to trigger once every 0.1 seconds (1÷10 = 0.1 seconds). This can be achieved by calling the timer-related setting functions and interfaces provided by the device operating system or programming language to ensure that the timer can be triggered at the desired rhythm, thereby controlling the frequency of the analog signal data update to match the actual signal or meet the specific verification requirements.
[0044] In the above embodiment, as the data generation timer (hereinafter also referred to as the timer) is triggered according to the set frequency, the analog signal data is continuously updated and changed at different times. The analog signal data values corresponding to these different times are arranged in sequence to form a state data sequence, which completely records the changes of the analog signal over time, that is, the specific presentation form of the analog signal data finally generated.
[0045] The above data generation timer starts to work according to the set output frequency trigger. Each time it is triggered, it is calculated and updated according to the mathematical model corresponding to the signal law information. For example, for a sine wave signal, each time the timer is triggered, according to the sine function formula, combined with the current initial state data (such as the current phase and amplitude) and basic parameters (fixed values such as amplitude and angular frequency), the new signal amplitude value corresponding to this moment is calculated to update the initial state data. As the timer is continuously triggered, the signal data obtained after each update is recorded in sequence to form a state data sequence. This state data sequence is the final generated analog signal data, which completely simulates the analog signal that meets the frequency parameters and signal law information requirements.
[0046] The implementation method in the above embodiment is an analog signal data generation mechanism that determines relevant parameters based on signal rules and relies on mathematical models for support, ensuring that the analog signal meets expectations and effectively reducing test errors. In terms of flexibility, parameters and timer frequencies can be adjusted as needed to adapt to different frequencies and diversified verification requirements, with good versatility and scalability. In terms of resource utilization and efficiency, the timer triggers updated data at a rhythm, makes rational use of resources, efficiently generates signal data, and speeds up project progress. In terms of repeatability, clear steps and fixed methods make the generation process repeatable, facilitate standardized comparison and verification, and provide strong technical support for related work.
[0047] In some embodiments, generating analog signal data based on frequency parameters and signal law information may include but is not limited to: parsing the signal law information and extracting key feature values of the signal law information; generating analog signal data based on frequency parameters and key feature values.
[0048] Among them, if the signal regularity information is a square wave signal, the key characteristic value includes the duty cycle; if the signal regularity information is a triangle wave, the key characteristic value includes the slope variation range; if the signal regularity information is a sine wave, the key characteristic value includes the amplitude range.
[0049] In the embodiment of the present application, after the analog signal data is generated, the analog signal data can be used to replace the actual signal data collected by the sensor, and signal verification is performed based on the analog signal data.
[0050] For example, Figure 2 It is a schematic diagram of replacing actual signal data with simulated signal data in one embodiment.
[0051] like Figure 2 As shown, the process may include: sensor data reading. The sensor can read the frequency parameters of the real data (i.e., actual signal data) it collects, and acquires analog signal data based on the frequency parameters and the signal regularity information required for signal verification. After that, the analog signal data is used to replace the real data of the sensor, and then it is transmitted back to the upper layer for processing. That is, it is transmitted back to the upper layer for signal verification.
[0052] Among them, from the perspective of system architecture, sensors are located at the bottom layer and are mainly responsible for collecting raw data. When the analog signal data replaces the real data of the sensor, these data will be passed to the modules or software components located above the sensor in the system hierarchy. These "upper layer" modules may include parts that perform signal verification algorithm processing, user interface parts responsible for displaying and analyzing verification results, or system control units that use the verified signal data for further control and decision-making. For example, in an industrial automation control system, sensors collect data at the bottom layer, and the "upper layer" may be monitoring software running in an industrial control computer, which receives the replaced analog signal data for signal verification and decides whether to issue control instructions to industrial equipment based on the verification results.
[0053] In an exemplary embodiment, Figure 3 As shown, a schematic diagram of a method for generating analog signal data is provided. Figure 2 , the method may include the following steps:
[0054] 301. Obtain frequency parameters of actual signal data collected by the sensor.
[0055] 302. Obtain signal regularity information required for signal verification.
[0056] 303. Generate analog signal data based on the frequency parameter and signal law information.
[0057] For the description of the above steps 301 to 303 , reference may be made to the above related description of steps 101 to 103 , which will not be repeated here.
[0058] 304. Perform integrity verification on the state data sequence in the analog signal data.
[0059] First, add an index mark to each data point in the state data sequence to clarify its position in the sequence. At the same time, record the expected length of the state data sequence, which can be determined based on the preset timer trigger times, signal cycle times, and other information. For example, if a state data sequence of 100 data points should be generated in theory according to certain frequency parameters and timer output frequency, then 100 is used as the expected length.
[0060] By traversing the state data sequence, check whether each data point has a valid value. Simple value range judgment can be used, such as checking whether the data is within a reasonable signal amplitude range, or whether it is a valid value that meets the data type requirements (such as non-null values, values that do not exceed the data representation range, etc.). At the same time, compare the actual number of data points with the expected length. If the two are consistent and each data point is valid, it is preliminarily judged that the state data sequence is complete; if the number of data points is less than the expected length or there are invalid data points, it is considered that there may be data missing or damage.
[0061] 305. When it is determined that there is data missing in the state data sequence, based on the state data adjacent to the data missing position in the state data sequence and signal regularity information, generate state data corresponding to the actual position of the data to obtain complete analog signal data.
[0062] Among them, when data is found to be missing, the specific position range of the missing data is determined according to the index mark added before. Find the valid state data points adjacent to the missing position and record their values and positions. For example, if the data points with indexes 30-35 are found to be missing, then the values of the adjacent data points with indexes 29 and 36 are obtained. Determine the change mode of the signal according to the signal law information. If it is a square wave signal and the duty cycle and other information are known, the data of the missing position is generated according to the law of the square wave in combination with the level state of the adjacent data points. For the triangle wave signal, the slope change range information is used to calculate the value of the missing position through the slope relationship of the adjacent data points. Taking the sine wave as an example, according to the characteristics of the sine function, the amplitude and phase of the adjacent data points are known (assuming that the phase information is contained in the adjacent data points or can be derived through the signal law information), as well as the basic parameters such as amplitude and angular frequency, the sine wave amplitude value corresponding to the missing position is calculated. Finally, the generated data of the missing position can be inserted into the corresponding position in the state data sequence to obtain a complete analog signal data sequence.
[0063] 306. Use complete analog signal data to perform signal verification.
[0064] In some embodiments, complete analog signal data is used to perform signal verification, including: decomposing and extracting features from the complete analog signal data to obtain feature data of the analog signal data; comparing the feature data of the analog signal data with a feature range of a standard signal to obtain a feature comparison result; and generating a signal verification report based on the feature comparison result.
[0065] The characteristic data includes at least one of the following:
[0066] Spectral distribution, time domain characteristic parameters, and harmonic components of the signal.
[0067] The above-mentioned time domain characteristic parameters include mean, variance, peak value and the like.
[0068] In the above decomposition and feature extraction process, the following specific processes can be included:
[0069] 1) Spectrum distribution extraction: Perform spectrum analysis algorithms such as fast Fourier transform (FFT) on the complete analog signal data to convert the signal from the time domain to the frequency domain to obtain the spectrum distribution of the signal. The spectrum distribution shows the different frequency components and their amplitudes contained in the signal, which is used to analyze the frequency characteristics of the signal.
[0070] 2) Calculation of time domain characteristic parameters: Calculate the mean of the analog signal data, that is, add up all the data points and divide by the number of data points to get the average amplitude of the signal. Calculate the variance to describe the discreteness of the signal by measuring the degree of deviation of the data points from the mean. The peak-to-peak value is the difference between the maximum and minimum values of the signal, reflecting the fluctuation range of the signal amplitude. These time domain characteristic parameters describe the characteristics of the signal in the time domain from different angles.
[0071] 3) Harmonic component analysis: For periodic signals, in addition to the fundamental frequency, they may also contain harmonic components. Through specific harmonic analysis algorithms, such as those based on Fourier series expansion, the harmonic frequencies and amplitudes present in the signal are determined to analyze the purity and complexity of the signal.
[0072] In the above feature comparison process, the feature data of the extracted analog signal data can be compared with the feature range of the standard signal. For the spectrum distribution, compare whether the amplitude of the signal at each frequency component is within the amplitude range corresponding to the standard signal. For the time domain feature parameters, check whether the mean, variance, peak value, etc. meet the requirements of the standard signal. For example, if the mean of the standard signal is 5, the variance is 2, and the peak value is 10 - 12, then compare the corresponding feature parameters of the analog signal data with it. For the harmonic component, check whether the harmonic frequency and amplitude of the analog signal are consistent with the harmonic range allowed by the standard signal.
[0073] The signal verification report includes at least one of the following information:
[0074] (1) The matching of the simulated signal data and the standard signal in terms of the characteristics of each dimension;
[0075] (2) Verification passed or failed;
[0076] (3) Optimized frequency parameters during the simulation signal data generation process, and / or optimized signal regularity information.
[0077] In the above matching situation, the matching situation of the analog signal data and the standard signal in various dimensional features such as spectrum distribution, time domain characteristic parameters, harmonic components, etc. can be recorded in detail. For example, in the spectrum distribution, which frequency components have a good amplitude match and which have deviations; in terms of time domain characteristic parameters, the specific differences in mean, variance, peak-to-peak value and standard signal, etc.
[0078] In the above verification conclusion, if the characteristic data of the analog signal data meets the characteristic range of the standard signal in all compared dimensions, then the verification is determined to be passed; otherwise, the verification is determined to be failed.
[0079] The above optimization suggestions can provide the following content: If the verification fails, analyze which part of the frequency parameters and signal law information in the analog signal data generation process may have problems based on the deviation in the feature comparison results. For example, if the amplitude of a frequency component in the spectrum distribution is too high, it may be necessary to adjust the frequency parameters or basic parameters when generating the analog signal data. In the report, clearly put forward optimization suggestions for the frequency parameters and / or signal law information in the analog signal data generation process to improve the generation of analog signals in the future.
[0080] The method for generating analog signal data provided by the above embodiment can timely discover and process data missing, ensure the integrity of analog signal data, and lay the foundation for subsequent accurate verification. In signal feature analysis, the characteristics of analog signals can be comprehensively analyzed with the help of spectrum distribution extraction, time domain feature parameter calculation and harmonic component analysis, which can provide deep insight into the intrinsic structure and behavior of the signal. The feature comparison link accurately compares the analog signal with the standard signal, and can accurately judge the signal quality and compliance, and clarify the verification results. The signal verification report covers multi-dimensional information, which not only gives the matching situation to allow users to intuitively understand the differences, but also determines the verification status and provides optimization suggestions, which is convenient for tracing back the analog signal generation process, and adjusting the frequency parameters and signal law information in a targeted manner, so as to improve the accuracy and reliability of analog signal generation, and effectively promote the efficient development and continuous optimization of signal verification work in related technical fields.
[0081] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0082] Based on the same inventive concept, the embodiment of the present application also provides a device for generating analog signal data for implementing the method for generating analog signal data involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the one or more embodiments of the device for generating analog signal data provided below can refer to the limitations of the method for generating analog signal data above, and will not be repeated here.
[0083] In an exemplary embodiment, Figure 4As shown, a device for generating analog signal data is provided, comprising:
[0084] The acquisition module 401 is used to acquire the frequency parameters of the actual signal data collected by the sensor; and to acquire the signal regularity information required for signal verification;
[0085] The generating module 402 is used to generate simulated signal data based on the frequency parameters and the signal regularity information; wherein the simulated signal data is used to replace the actual signal data for signal verification.
[0086] In some embodiments, the generating module 402 is specifically used to:
[0087] Based on the signal regularity information, determining initial state data and basic parameters of the analog signal data;
[0088] generating an output frequency of the timer based on the frequency parameter configuration data;
[0089] When the data generation timer is triggered according to the output frequency, the initial state data is updated according to the signal regularity information, based on the initial state data and basic parameters to obtain a state data sequence, and the state data sequence is used as the analog signal data.
[0090] In some embodiments, the device also includes: a signal verification module 403, which is used to verify the integrity of the state data sequence in the analog signal data after generating the analog signal data based on the frequency parameters and the signal law information; when it is determined that there is data missing in the state data sequence, based on the state data adjacent to the data missing position in the state data sequence and the signal law information, generate state data corresponding to the actual position of the data to obtain complete the analog signal data; use the complete analog signal data to perform signal verification.
[0091] In some embodiments, the signal verification module 403 is specifically used to:
[0092] Decomposing and extracting features from the complete analog signal data to obtain feature data of the analog signal data, wherein the feature data includes at least one of the following:
[0093] Spectral distribution, time domain characteristic parameters, and harmonic components of the signal;
[0094] Comparing the characteristic data of the analog signal data with the characteristic range of the standard signal to obtain a characteristic comparison result;
[0095] A signal verification report is generated based on the feature comparison result, and the signal verification report includes at least one of the following information:
[0096] Matching of the analog signal data with the standard signal in terms of features in each dimension;
[0097] Verification passed or failed;
[0098] The frequency parameters optimized during the simulation signal data generation process, and / or the signal regularity information optimized.
[0099] In some embodiments, the signal regularity information includes any of the following:
[0100] Square wave signal, triangle wave signal, sine wave signal.
[0101] In some embodiments, the generating module 402 is specifically used to:
[0102] Analyzing the signal regularity information to extract key feature values of the signal regularity information;
[0103] Based on the frequency parameter and the key characteristic value, generating analog signal data;
[0104] Among them, if the signal regularity information is a square wave signal, the key characteristic value includes the duty cycle; if the signal regularity information is a triangle wave, the key characteristic value includes the slope variation range; if the signal regularity information is a sine wave, the key characteristic value includes the amplitude range.
[0105] Each module in the above-mentioned device for generating analog signal data can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each of the above modules.
[0106] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 5As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for generating analog signal data is implemented.
[0107] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0108] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the method for generating analog signal data shown in the above method embodiment is implemented.
[0109] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method for generating analog signal data shown in the above method embodiment is implemented.
[0110] In one embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the method for generating analog signal data shown in the above method embodiment is implemented.
[0111] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods 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 the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0112] 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.
[0113] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for generating analog signal data, characterized in that: The method comprises: Obtain frequency parameters of actual signal data collected by the sensor; Obtain signal regularity information required for signal verification; Based on the frequency parameters and the signal regularity information, simulated signal data is generated; wherein the simulated signal data is used to replace the actual signal data for signal verification.
2. The method according to claim 1, characterized in that The generating of analog signal data based on the frequency parameter and the signal regularity information comprises: Based on the signal regularity information, determining initial state data and basic parameters of the analog signal data; generating an output frequency of the timer based on the frequency parameter configuration data; When the data generation timer is triggered according to the output frequency, the initial state data is updated according to the signal regularity information, based on the initial state data and basic parameters to obtain a state data sequence, and the state data sequence is used as the analog signal data.
3. The method according to claim 2, characterized in that After generating the analog signal data based on the frequency parameter and the signal regularity information, the method further includes: Performing integrity verification on a state data sequence in the analog signal data; When it is determined that there is data missing in the state data sequence, state data corresponding to the actual position of the data is generated based on the state data adjacent to the data missing position in the state data sequence and the signal regularity information, so as to obtain the complete analog signal data; The complete analog signal data is used to perform signal verification.
4. The method according to claim 3, characterized in that The complete analog signal data is used to perform signal verification, including: Decomposing and extracting features from the complete analog signal data to obtain feature data of the analog signal data, wherein the feature data includes at least one of the following: Spectral distribution, time domain characteristic parameters, and harmonic components of the signal; Comparing the characteristic data of the analog signal data with the characteristic range of the standard signal to obtain a characteristic comparison result; A signal verification report is generated based on the feature comparison result, and the signal verification report includes at least one of the following information: Matching of the analog signal data with the standard signal in terms of features in each dimension; Verification passed or failed; The frequency parameters optimized during the simulation signal data generation process, and / or the signal regularity information optimized.
5. The method according to any one of claims 1 to 4, characterized in that: The signal regularity information includes any of the following: Square wave signal, triangle wave signal, sine wave signal.
6. The method according to claim 5, characterized in that The generating of analog signal data based on the frequency parameter and the signal regularity information comprises: Analyzing the signal regularity information to extract key feature values of the signal regularity information; Based on the frequency parameter and the key characteristic value, generating analog signal data; Among them, if the signal regularity information is a square wave signal, the key characteristic value includes the duty cycle; if the signal regularity information is a triangle wave, the key characteristic value includes the slope variation range; if the signal regularity information is a sine wave, the key characteristic value includes the amplitude range.
7. A device for generating analog signal data, characterized in that: The device comprises: An acquisition module is used to obtain the frequency parameters of the actual signal data collected by the sensor; and obtain the signal regularity information required for signal verification; A generation module is used to generate simulated signal data based on the frequency parameters and the signal regularity information; wherein the simulated signal data is used to replace the actual signal data for signal verification.
8. 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 method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.