Signal Processing Method, Apparatus and Computer-Readable Storage Medium
Through the blockchain system sharing and processing sampled data, the problem of poor low-frequency signal pickup effect is solved and cost-effective signal processing is achieved.
Patent Information
- Application Number
- CN202111297110.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-03
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2041-11-03
AI Technical Summary
In the prior art, the low-frequency signal picking method has poor effect, high hardware cost, and software methods are subject to foreign copyright restrictions, making it difficult to achieve independent collection.
The blockchain system is used to sample signals, and the sampling data is shared through nodes of the blockchain system, and a restore signal is generated based on the read sampled data to filter out high-frequency signals.
It reduces signal processing costs, improves the pick-up effect of low-frequency signals, and avoids hardware dependence and copyright restrictions.
Smart Images

Figure CN116089794B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of signal processing, and in particular, to a method and apparatus for processing signals and a computer-readable storage medium. Background Art
[0002] In applications such as the Internet of Things, robotics, and intelligent manufacturing, the importance of terminal signal acquisition is self-evident. The signals collected by sensors usually carry a lot of environmental clutter, resulting in the inability to extract and use the obtained signals well. Based on this, existing methods for picking up signals from the collected mixed signals mostly rely on hardware circuit filtering and software filtering designed using the mathematical principles of filters. However, the hardware cost is gradually increasing, and at the same time, good software methods are restricted by foreign copyrights. Therefore, there is an urgent need for a method for independently collecting low-frequency signals. Summary of the Invention
[0003] Embodiments of this application provide a method and apparatus for processing signals and a computer-readable storage medium, aiming to solve the problem of poor performance of low-frequency signal picking methods.
[0004] To achieve the above object, on the one hand, this application provides a method for processing signals, the method including:
[0005] Sampling a signal to be sampled based on the sampling frequency of the blockchain system to obtain sampling data, where the number of nodes in the blockchain system is negatively correlated with the sampling frequency;
[0006] Uploading the sampling data to the blockchain system through the information data uploading node of the blockchain system to share the sampling data among the nodes of the blockchain system;
[0007] Reading the sampling data through the information data reading node of the blockchain system and generating a restored signal corresponding to the signal to be sampled according to the read sampling data to filter out high-frequency signals in the signal to be sampled.
[0008] Optionally, the step of uploading the sampling data to the blockchain system includes:
[0009] Obtaining the time point when the blockchain system generates a first sharing flag after completing data sharing;
[0010] Obtaining the signal data corresponding to the time point, where the signal data includes the time stamp and information data value corresponding to the sampling data;
[0011] Uploading the signal data to the blockchain system.
[0012] Optionally, before the step of uploading the sampling data to the blockchain system, it includes:
[0013] Obtain the second sharing flag of the blockchain system;
[0014] When it is determined that the blockchain has completed data sharing according to the second sharing flag, execute the step of uploading the sampled data to the blockchain system.
[0015] Optionally, before the step of sampling the signal to be sampled based on the sampling frequency of the blockchain system to obtain sampled data, it includes:
[0016] Obtain the preset relationship between the sampling frequency and the frequency of the signal to be sampled;
[0017] Determine the sampling frequency of the blockchain system according to the frequency of the signal to be sampled and the preset relationship.
[0018] Optionally, the method further includes:
[0019] Determine the sampling period of the blockchain system according to the sampling frequency;
[0020] Determine the number of nodes of the blockchain system according to the sampling period, and adjust the current number of nodes of the blockchain system according to the determined number of nodes.
[0021] Optionally, the step of determining the number of nodes of the blockchain system according to the sampling period includes:
[0022] Obtain the sharing duration corresponding to a preset number of nodes;
[0023] Determine the average sharing duration of each node according to the sharing duration;
[0024] Determine the number of nodes of the blockchain system according to the sampling period and the average sharing duration of each node.
[0025] Optionally, the step of reading the sampled data through the information data reading node of the blockchain system includes:
[0026] Obtain the timestamp and information data value corresponding to the sampled data;
[0027] Read the sampled data from the information data reading node according to the timestamp and the information data value.
[0028] In addition, to achieve the above object, another aspect of the present application further provides a signal processing device, and the signal processing device includes a sampling module, an uploading module, and a reading module, wherein:
[0029] The sampling module is used to sample the signal to be sampled based on the sampling frequency of the blockchain system to obtain sampling data, where the number of nodes in the blockchain system is negatively correlated with the sampling frequency;
[0030] The uploading module is used to upload the sampling data to the blockchain system through the information data uploading nodes of the blockchain system, so as to share the sampling data among the nodes of the blockchain system;
[0031] The reading module is used to read the sampling data through the information data reading nodes of the blockchain system, and generate a restored signal corresponding to the signal to be sampled according to the read sampling data, so as to filter out the high-frequency signals in the signal to be sampled.
[0032] In addition, to achieve the above object, another aspect of the present application further provides a signal processing device, where the signal processing device includes a memory, a processor, and a signal processing program stored on the memory and running on the processor. When the processor executes the signal processing program, the steps of the signal processing method as described above are implemented.
[0033] In addition, to achieve the above object, another aspect of the present application further provides a computer-readable storage medium, where a signal processing program is stored on the computer-readable storage medium. When the signal processing program is executed by a processor, the steps of the signal processing method as described above are implemented.
[0034] The present application proposes a signal processing method. By sampling the signal to be sampled based on the sampling frequency of the blockchain system, sampling data is obtained, where the number of nodes in the blockchain system is negatively correlated with the sampling frequency; by using the information data uploading nodes of the blockchain system, the sampling data is uploaded to the blockchain system to share the sampling data among the nodes of the blockchain system; by using the information data reading nodes of the blockchain system to read the sampling data, and generating a restored signal corresponding to the signal to be sampled according to the read sampling data to filter out the high-frequency signals in the signal to be sampled. The present application replaces the existing hardware-based signal processing method with a blockchain soft processing method, reducing the cost of signal processing and improving the effect of signal processing at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 It is a schematic diagram of the terminal structure of the hardware operating environment involved in the embodiment solution of the present application;
[0036] Figure 2 It is a schematic flowchart of the first embodiment of the signal processing method of the present application;
[0037] Figure 3 It is a schematic flowchart of the second embodiment of the signal processing method of the present application;
[0038] Figure 4 It is a schematic diagram of the operation process of the signal processing method of this application;
[0039] Figure 5 It is a functional schematic diagram of the data flow processing pool of this application;
[0040] Figure 6 It is a module schematic diagram of the signal processing device of this application.
[0041] The realization, functional features and advantages of the purpose of this application will be further described in conjunction with the embodiments with reference to the accompanying drawings. Specific embodiments
[0042] It should be understood that the specific embodiments described herein are only used to explain this application and are not used to limit this application.
[0043] The main solution of the embodiment of this application is: sampling the signal to be sampled based on the sampling frequency of the blockchain system to obtain sampling data, wherein the number of nodes of the blockchain system is negatively correlated with the sampling frequency; uploading the sampling data to the blockchain system through the information data uploading node of the blockchain system to share the sampling data among the nodes of the blockchain system; reading the sampling data through the information data reading node of the blockchain system and generating a restored signal corresponding to the signal to be sampled according to the read sampling data to filter out high-frequency signals in the signal to be sampled.
[0044] Existing methods for picking up signals from the collected mixed signals mostly rely on hardware circuit filtering and software filtering designed based on the mathematical principles of filters. However, the hardware cost is gradually increasing, and at the same time, excellent software methods are restricted by foreign copyrights. Therefore, there is an urgent need for a method for independently collecting low-frequency signals.
[0045] This application samples the signal to be sampled based on the sampling frequency of the blockchain system to obtain sampling data, wherein the number of nodes of the blockchain system is negatively correlated with the sampling frequency; uploads the sampling data to the blockchain system through the information data uploading node of the blockchain system to share the sampling data among the nodes of the blockchain system; reads the sampling data through the information data reading node of the blockchain system and generates a restored signal corresponding to the signal to be sampled according to the read sampling data to filter out high-frequency signals in the signal to be sampled. This application replaces the existing hardware-based signal processing method with a blockchain soft processing method, reducing the cost of signal processing and improving the effect of signal processing at the same time.
[0046] As Figure 1 shown, Figure 1Schematic diagram of the terminal device structure for the hardware operating environment involved in the solution of the embodiment of the present application.
[0047] As shown in Figure 1 , the terminal device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display) and an input unit such as a keyboard (Keyboard). Optionally, the user interface 1003 may further include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0048] Those skilled in the art can understand that Figure 1 the terminal device structure shown in
[0049] As shown in Figure 1 , the memory 1005, as a computer-readable storage medium, may include a signal processing program.
[0050] In the terminal device shown in Figure 1 , the network interface 1004 is mainly used for data communication with the background server; the user interface 1003 is mainly used for data communication with the client (user side); the processor 1001 may be used to call the signal processing program in the memory 1005 and perform the following operations:
[0051] Sampling the signal to be sampled based on the sampling frequency of the blockchain system to obtain sampling data, where the number of nodes in the blockchain system is negatively correlated with the sampling frequency;
[0052] Uploading the sampling data to the blockchain system through the information data uploading node of the blockchain system to share the sampling data among the nodes of the blockchain system;
[0053] Reading the sampling data through the information data reading node of the blockchain system and generating a restored signal corresponding to the signal to be sampled according to the read sampling data to filter out the high-frequency signal in the signal to be sampled.
[0054] Refer to Figure 2 ,Figure 2 It is a schematic flowchart of the first embodiment of the signal processing method of the present application.
[0055] The embodiment of the present application provides a signal processing method. It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0056] The signal processing method of this embodiment is applied to a control server and includes the following steps:
[0057] Step S10: Sampling the signal to be sampled based on the sampling frequency of the blockchain system to obtain sampling data, where the number of nodes in the blockchain system is negatively correlated with the sampling frequency;
[0058] It should be noted that the blockchain system of the present application includes a blockchain, a signal acquisition sensor, a data stream processing pool, etc. Among them, the signal acquisition sensor is used to acquire relevant signals in the physical environment; the data stream processing pool is used to perform on-chain processing on the data acquired by the acquisition sensor; the blockchain is used to store the data uploaded by the data stream processing pool.
[0059] The signal to be sampled in the present application refers to the signal to be sampled, that is, the signal to be sampled; and the sampling signal is the signal that acquires the signal to be sampled in the blockchain system. It can be understood that, for example, if there is a sine signal, the signal acquisition sensor in the blockchain system can be used to acquire the sine signal. Then, the sine signal is the signal to be sampled, and the signal used by the signal acquisition sensor to acquire the sine signal is the sampling signal. Usually, the frequency and period of the signal to be sampled are known.
[0060] According to the Shannon sampling theorem, in order to recover the analog signal without distortion, the sampling frequency should be greater than or equal to 2 times the highest frequency in the analog signal spectrum, that is, fs≥2fmax. Based on this, in order to recover the low-frequency signal (i.e., the analog signal) in the signal to be sampled without distortion, the frequency of the sampling signal needs to be greater than or equal to 2 times the highest frequency in the spectrum of the signal to be sampled. For example, assuming the frequency of the sampling signal is f1 and the frequency of the signal to be sampled is f2, then, according to the Shannon sampling theorem, if f1>>2f2, the low-frequency signal in the signal to be sampled can be recovered without distortion.
[0061] In this embodiment, the frequency f2 of the signal to be sampled is obtained, as well as the preset relationship between the frequency f2 of the signal to be sampled and the sampling frequency f1, that is, f1 >> 2f2. Based on this, the sampling frequency of the blockchain system can be determined, where the sampling frequency refers to the frequency at which the signal acquisition sensor samples the signal to be sampled. For example, assuming that the frequency f2 of the signal to be sampled is 2 Hz, then the sampling frequency is f1 ≥ 4 Hz. Among them, the higher the sampling frequency, the closer the restored waveform is to the original signal. Then, the signal acquisition sensor samples the signal to be sampled based on this sampling frequency to obtain sampling data. Among them, the number of nodes in the blockchain system is negatively correlated with the sampling frequency, that is, the more nodes, the smaller the sampling frequency.
[0062] Step S20: Upload the sampling data to the blockchain system through the information data upload node of the blockchain system to share the sampling data among the nodes of the blockchain system.
[0063] It should be noted that the blockchain includes an information data upload node and an information data reading node. Among them, the information data upload node can also be used as an information data reading node, and the information data reading node can also be used as an information data upload node.
[0064] In this embodiment, the blockchain sends a second sharing flag (including a sharing completion flag and an unshared completion flag) to the data stream processing pool. When the data stream processing pool receives this second sharing identifier, it determines whether the blockchain has completed data sharing based on this second sharing identifier. If the data sharing is completed, the sampling data is uploaded to the blockchain through the information data upload node of the blockchain to share the sampling data among the nodes of the blockchain. Specifically, the time point when the first sharing flag is generated after the blockchain system completes data sharing is obtained, where the first sharing flag refers to the sharing completion flag, that is, the blockchain has completed data sharing. Then, the signal data corresponding to this time point is obtained. The signal data includes the time stamp corresponding to the sampling data and the information data value. At the same time, any node in the blockchain is selected as the information data upload node, and then the signal data is uploaded to the blockchain through this information data upload node. After the data is uploaded to the chain, the blockchain shares the sampling data in the information data upload node to other information data reading nodes.
[0065] Step S30: Read the sampling data through the information data reading node of the blockchain system and generate a restored signal corresponding to the signal to be sampled based on the read sampling data to filter out the high-frequency signal in the signal to be sampled.
[0066] It should be noted that due to environmental noise and some other factors, the effective signal is submerged in many useless signals. Therefore, the signal acquisition sensor collects a string of chaotic waveforms (i.e., mixed signals). At the same time, due to the digitalization result of the sensor, the data collected by the signal acquisition sensor will carry the values of the chaotic signals at the time points. And the effective signal is the low-frequency signal in the mixed signal. Therefore, it is necessary to filter out the high-frequency signals in the mixed signal.
[0067] In this embodiment, after the blockchain completes data sharing, it can read the sampling data in any designated information data reading node, and generate a restored signal corresponding to the signal to be sampled based on the read sampling data to filter out the high-frequency signals in the signal to be sampled. Specifically, obtain the time stamp and information data value corresponding to the sampling data, and then query the data in the blockchain according to the time stamp and information data value, and read the sampling data in the information data reading node. Since the sampling frequency of the signal acquisition sensor is much greater than twice the frequency of the signal to be sampled, the signal can be restored without distortion according to the sampling data to obtain the low-frequency signal.
[0068] This embodiment samples the signal to be sampled based on the sampling frequency of the blockchain system to obtain sampling data. Then, through the information data upload node of the blockchain system, the sampling data is uploaded to the blockchain system to share the sampling data among the various nodes of the blockchain system. Then, the sampling data is read through the information data reading node of the blockchain system, and a restored signal corresponding to the signal to be sampled is generated based on the read sampling data to filter out the high-frequency signals of the sampling data. This embodiment picks up the low-frequency signals in the physical environment according to the Shannon sampling theorem and the shared delay characteristics of the blockchain. Then, the sampling data processed by the data flow processing pool is uploaded to the blockchain, and the sampling data is read from the blockchain, and the low-frequency signals in the signal to be sampled are restored based on the sampling data. In this way, there is no need to process the collected signal through hardware, thereby reducing the cost of signal processing and improving the picking effect of the low-frequency signal.
[0069] Further, referring to Figure 3 , a second example of the signal processing method of the present application is proposed based on the first embodiment.
[0070] The method further includes:
[0071] Step S40, determining the sampling period of the blockchain system according to the sampling frequency;
[0072] In this embodiment, after determining the sampling frequency of the signal acquisition sensor, the sampling period of the signal acquisition sensor is determined based on the sampling frequency. For example, assuming that the sampling frequency of the signal acquisition sensor is f1, then the sampling period T1 of the signal acquisition sensor is:
[0073]
[0074] Step S50: Determine the number of nodes in the blockchain system according to the sampling period, and adjust the current number of nodes in the blockchain system according to the determined number of nodes.
[0075] It should be noted that in the blockchain system, the data sharing duration of the blockchain is affected by the number of nodes. Increasing the number of nodes will cause the time unit to change from milliseconds to seconds. At the same time, according to the different network transmission times, it is necessary to test the time when the blockchain data sharing is completed before use. When it is necessary to increase the sharing duration, the number of nodes can be increased.
[0076] In this embodiment, obtain the sharing duration corresponding to a preset number of nodes, then determine the average sharing duration of each node according to the sharing duration, and then determine the number of nodes in the blockchain system according to the sampling period and the average sharing duration of each node. Among them, the sharing duration refers to the time required for the sampled data to be shared in the blockchain after leaving the data processing pool. It can be understood that the sharing duration = the duration for the sampled data to be transmitted from the data stream processing pool to the blockchain node + the consensus duration of the blockchain. For example, assume that there are 4 nodes in the blockchain, and the sharing duration corresponding to the 4 nodes is 8S, then the average sharing duration of each node is 2S. Assume that the sampling period T1 = 10S, then the required number of nodes is 10 / 2 = 5. At this time, it is necessary to increase the number of nodes in the blockchain. For example, increase the number of nodes in the blockchain by modifying the smart contract.
[0077] In this embodiment, the number of nodes in the blockchain system is determined according to the sampling period, and the current number of nodes in the blockchain system is adjusted according to the determined number of nodes. In this way, the processing efficiency of low-frequency signals can be improved.
[0078] To better illustrate the signal processing method of the present application, refer to Figure 4 , Figure 4 which is the operation flow schematic diagram of the signal processing method of the present application.
[0079] This embodiment proposes a signal processing method, including the following processing processes:
[0080] Use a signal acquisition sensor to collect relevant information from the physical environment to be detected. Due to environmental noise and some other factors, the effective signal is submerged in many useless signals. Therefore, the signal acquisition sensor collects a string of chaotic waveforms. At the same time, due to the digitalization result of the sensor, the data collected by the signal acquisition sensor will carry the values of the chaotic signals at the time points.
[0081] The collected data is transmitted into the data stream processing pool for preprocessing before being uploaded to the blockchain. The shared nature of the blockchain is to share all the data uploaded to the blockchain. If the data stream processing pool is not set up, all the data collected by the signal acquisition sensors will be shared, and the blockchain will not play the role of data screening. The role of the data stream processing pool is to upload the incoming data to the blockchain according to the signal indicating the completion of data sharing in the blockchain.
[0082] Select a node in the blockchain to interact with the data stream processing pool and upload the data when the flag indicating the completion of data sharing is given. The blockchain network will automatically share the uploaded data. After the sharing is completed, the blockchain data query process will read the newly uploaded data from a certain node in the blockchain. The read data includes the timestamp at the time of uploading and the information data value of the uploaded data.
[0083] Store the information data value and timestamp read from the blockchain in the database for signal storage. When the signal is needed, the collected signal waveform can be read from the database according to the timestamp and the information data value of the uploaded data.
[0084] Furthermore, the technical solution and principle adopted in this embodiment are as follows:
[0085] First, the time from when the collected data reaches the data stream processing pool to when the data is shared in the blockchain network is set as T1, the corresponding frequency is set as f1, the period of the signal to be sampled is set as T2, and the corresponding frequency is set as f2. According to the relationship between the period and the frequency, we have:
[0086]
[0087] f1 can be assumed to be the frequency of the sampling signal. According to the Shannon sampling theorem, if:
[0088] f1>>2f2
[0089] The low-frequency signal in the signal to be sampled can be restored without distortion, that is, when the frequency of the signal to be sampled is much less than half of the frequency of the sampling signal, the low-frequency signal in the signal to be sampled will be restored without information distortion.
[0090] A signal pickup system usually requires input and output, and the numerical value should not change when data passes through the entire system. The shared feature of blockchain meets this property. Therefore, a certain node of the blockchain can be regarded as a data input node, and other nodes as outputs. The data is shared across the entire network and will not change. At the same time, in order to filter the data, the blockchain system needs to have a certain working frequency, that is, a certain signal data pickup period. Secondly, there is a certain delay in the data sharing of the blockchain network. As the number of block nodes increases, the sharing time will also become longer. Therefore, the data sharing delay gives the blockchain periodicity and thus the property of frequency. In the generation of blockchain blocks, the block body includes two contents: the timestamp at the time of going on-chain and the corresponding information data value collected.
[0091] There are mainly two aspects affecting the sharing time of the blockchain network. One is the time fluctuation of network transmission, and the other is the number of nodes in the blockchain. For the first problem, when the frequency of the signal to be sampled is much less than half of the sampling signal frequency, slight network fluctuations do not affect signal acquisition. When the sampling signal frequency is greater than twice the frequency of the signal to be sampled, the requirements of the sampling theorem can be met. If the network transmission fluctuation is too large, this situation belongs to a system accident, and the system needs to be stabilized again before use. For the second problem, first determine the sharing duration for data sharing to be completed under the condition of fixed nodes. According to this sharing duration and the frequency of the signal to be sampled, determine the final number of nodes required. After the number of nodes is determined, the sharing duration also remains relatively constant.
[0092] Furthermore, referring to Figure 5 , the role of the data flow processing pool: First, after the blockchain completes data sharing, it sends a sharing completion flag to the data flow processing pool. The data flow processing pool determines whether data sharing is completed based on the sharing completion flag. When data sharing is completed, the data flow processing pool uploads the data passed in at this time to the chain. The data format for uploading is defined by a smart contract, and there is no need to hash the data. When sharing is not completed, the data at this time can be discarded, that is, all the data flowing in during the blockchain's shared data operation is not wanted. The data flow processing pool selects data in this way, performing the function of sampling the signal data, giving the entire blockchain network a sampling period like that of a sampling signal, which is an effective operation on the data.
[0093] In this embodiment, the existing hardware-based signal pickup method is replaced by the blockchain soft processing method, saving cost.
[0094] In addition, the present application also provides a signal processing device. The signal processing device includes a memory, a processor, and a signal processing program stored in the memory and running on the processor. The device samples the signal to be sampled based on the sampling frequency of the blockchain system to obtain sampling data, where the number of nodes in the blockchain system is negatively correlated with the sampling frequency; uploads the sampling data to the blockchain system through the information data uploading nodes of the blockchain system to share the sampling data among the nodes of the blockchain system; reads the sampling data through the information data reading nodes of the blockchain system, and generates a restored signal corresponding to the signal to be sampled based on the read sampling data to filter out the high-frequency signals in the signal to be sampled. This device replaces the existing hardware-based signal processing method with a blockchain soft processing method, reducing the cost of signal processing and improving the effect of signal processing at the same time.
[0095] Further, refer to Figure 5 , Figure 5 which is a schematic diagram of the modules of the signal processing device of the present application;
[0096] The signal processing device 100 includes a sampling module 10, an uploading module 20, and a reading module 30, where:
[0097] The sampling module 10 is configured to sample the signal to be sampled based on the sampling frequency of the blockchain system to obtain sampling data, where the number of nodes in the blockchain system is negatively correlated with the sampling frequency;
[0098] The uploading module 20 is configured to upload the sampling data to the blockchain system through the information data uploading nodes of the blockchain system to share the sampling data among the nodes of the blockchain system;
[0099] The reading module 30 is configured to read the sampling data through the information data reading nodes of the blockchain system, and generate a restored signal corresponding to the signal to be sampled based on the read sampling data to filter out the high-frequency signals in the signal to be sampled.
[0100] Further, the uploading module 20 includes a first obtaining unit and an uploading unit;
[0101] The first obtaining unit is configured to obtain the time point when the blockchain system generates a first sharing flag after completing data sharing;
[0102] The first obtaining unit is further configured to obtain the signal data corresponding to the time point, where the signal data includes the time stamp and the information data value corresponding to the sampling data;
[0103] The uploading unit is configured to upload the signal data to the blockchain system.
[0104] Further, the first acquisition unit is further configured to acquire a second sharing flag of the blockchain system;
[0105] The uploading unit is further configured to execute the step of uploading the sampled data to the blockchain system when it is determined according to the second sharing flag that the blockchain has completed data sharing.
[0106] Further, the sampling module 10 includes a second acquisition unit and a first determination unit;
[0107] The second acquisition unit is configured to acquire a preset relationship between the sampling frequency and the frequency of the signal to be sampled;
[0108] The first determination unit is configured to determine the sampling frequency of the blockchain system according to the frequency of the signal to be sampled and the preset relationship.
[0109] Further, the signal processing device 100 further includes a determination module;
[0110] The determination module is configured to determine the sampling period of the blockchain system according to the sampling frequency;
[0111] The determination module is further configured to determine the number of nodes of the blockchain system according to the sampling period, and adjust the current number of nodes of the blockchain system according to the determined number of nodes.
[0112] Further, the determination module includes a third acquisition unit and a second determination unit;
[0113] The third acquisition module is configured to acquire the sharing duration corresponding to a preset number of nodes;
[0114] The second determination module is configured to determine the average sharing duration of each node according to the sharing duration;
[0115] The second determination module is further configured to determine the number of nodes of the blockchain system according to the sampling period and the average sharing duration of each node.
[0116] Further, the reading module 30 includes a fourth acquisition unit and a reading unit;
[0117] The fourth acquisition unit is configured to acquire the time stamp and the information data value corresponding to the sampled data;
[0118] The reading unit is configured to read the sampled data from the information data reading node according to the time stamp and the information data value.
[0119] The implementation of the functions of each module of the above signal processing device is similar to the process in the above method embodiment, and will not be elaborated here one by one.
[0120] In addition, the present application also provides a computer-readable storage medium, on which a signal processing method program is stored. When the signal processing method program is executed by a processor, the steps of the above signal processing method are implemented.
[0121] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0122] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowcharts and / or block diagrams, and the combination of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the specified functions in one process Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0123] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured product including an instruction device, and the instruction device implements the specified functions in one process Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0124] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process. Thus, the instructions executed on the computer or other programmable device provide steps for implementing the specified functions in one process Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0125] It should be noted that in the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in the claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present application can be implemented by means of hardware including several different elements and by means of a suitably programmed computer. In a unit claim listing several devices, several of these devices may be embodied by the same item of hardware. The use of the words first, second, and third, etc. does not denote any order. These words may be interpreted as names.
[0126] Although alternative embodiments of the present application have been described, those skilled in the art can make additional changes and modifications once they learn the basic inventive concept. Therefore, the appended claims are intended to be construed to include alternative embodiments as well as all changes and modifications falling within the scope of the present application.
[0127] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these changes and modifications.
Claims
1. A method for processing a signal, characterized in that, The method includes: Sampling the signal to be sampled based on the sampling frequency of the blockchain system to obtain sampling data, where the number of nodes in the blockchain system is negatively correlated with the sampling frequency; Uploading the sampling data to the blockchain system through the information data uploading nodes of the blockchain system to share the sampling data among the nodes of the blockchain system; Reading the sampling data through the information data reading nodes of the blockchain system and generating a restored signal corresponding to the signal to be sampled according to the read sampling data to filter out high-frequency signals in the signal to be sampled.
2. The method for processing a signal according to claim 1, characterized in that, The step of uploading the sampling data to the blockchain system includes: Obtaining the time point when the blockchain system generates a first sharing flag after completing data sharing; Obtaining the signal data corresponding to the time point, where the signal data includes the time stamp and information data value corresponding to the sampling data; Uploading the signal data to the blockchain system.
3. The method for processing a signal according to claim 1, wherein, Before the step of uploading the sampling data to the blockchain system, it includes: Obtaining the second sharing flag of the blockchain system; When it is determined that the blockchain has completed data sharing according to the second sharing flag, executing the step of uploading the sampling data to the blockchain system.
4. The method for processing a signal according to claim 1, wherein, Before the step of sampling the signal to be sampled based on the sampling frequency of the blockchain system to obtain sampling data, it includes: Obtaining the preset relationship between the sampling frequency and the frequency of the signal to be sampled; Determining the sampling frequency of the blockchain system according to the frequency of the signal to be sampled and the preset relationship.
5. The signal processing method according to claim 1, wherein The method further includes: Determining the sampling period of the blockchain system according to the sampling frequency; Determining the number of nodes in the blockchain system according to the sampling period and adjusting the current number of nodes in the blockchain system according to the determined number of nodes.
6. The method for processing a signal according to claim 5, wherein, The step of determining the number of nodes in the blockchain system according to the sampling period includes: Obtaining the sharing duration corresponding to a preset number of nodes; Determining the average sharing duration of each node according to the sharing duration; Determining the number of nodes in the blockchain system according to the sampling period and the average sharing duration of each node.
7. The signal processing method according to claim 1, wherein The step of reading the sampling data through the information data reading nodes of the blockchain system includes: Obtaining the time stamp and information data value corresponding to the sampling data; Reading the sampling data from the information data reading nodes according to the time stamp and the information data value.
8. A signal processing device, characterized in that, The signal processing device includes a sampling module, an uploading module, and a reading module, where: The sampling module is used to sample the signal to be sampled based on the sampling frequency of the blockchain system to obtain sampling data, where the number of nodes in the blockchain system is negatively correlated with the sampling frequency; The uploading module is used to upload the sampling data to the blockchain system through the information data uploading nodes of the blockchain system to share the sampling data among the nodes of the blockchain system; The reading module is configured to read the sampling data through an information data reading node of the blockchain system, and generate a restored signal corresponding to the signal to be sampled based on the read sampling data, so as to filter out high-frequency signals in the signal to be sampled.
9. A signal processing device, characterized in that The signal processing device includes a memory, a processor, and a signal processing program stored on the memory and running on the processor. When the processor executes the signal processing program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that, A signal processing program is stored on the computer-readable storage medium. When the signal processing program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Motion state recognition system and method based on block chain
CN110169774A
Data processing method, device and system based on block chain
CN111416704A