CN113867637B - Multichannel data rapid storage method and device, electronic equipment and storage medium - Google Patents
Multichannel data rapid storage method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN113867637B CN113867637B CN202111138642.4A CN202111138642A CN113867637B CN 113867637 B CN113867637 B CN 113867637B CN 202111138642 A CN202111138642 A CN 202111138642A CN 113867637 B CN113867637 B CN 113867637B
- Authority
- CN
- China
- Prior art keywords
- data
- spliced
- received
- time tag
- storage
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0614—Improving the reliability of storage systems
- G06F3/0619—Improving the reliability of storage systems in relation to data integrity, e.g. data losses, bit errors
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/061—Improving I/O performance
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0673—Single storage device
- G06F3/0679—Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Mobile Radio Communication Systems (AREA)
- Communication Control (AREA)
Abstract
The invention discloses a multichannel data rapid storage method, a multichannel data rapid storage device, electronic equipment and a storage medium, wherein the method comprises the following steps: when polling scheduling is carried out on a plurality of data acquisition channels, judging whether the number of time tag data received by each data acquisition channel meets a preset threshold value or not; if yes, splicing the received time tag data to obtain first spliced data; the first spliced data is sent to a storage driver, so that the storage driver writes the first spliced data into a memory after receiving the first spliced data; the invention can realize the one-time writing of a plurality of time-stamp data in any data acquisition channel and only needs to read the address once, thereby improving the data writing efficiency and avoiding the problem of data loss caused by the fact that the data cannot be stored in time.
Description
Technical Field
The invention belongs to the technical field of data storage, and particularly relates to a multichannel rapid data storage method, a multichannel rapid data storage device, electronic equipment and a storage medium.
Background
In the time measurement system, when a photon signal is reached, the photon signal is converted into time tag data with a fixed bit width by a time-to-digital converter, the time tag data is sent to a later-stage memory for storage, and finally, the time tag data is uploaded to a computer through interfaces such as USB (Universal Serial Bus) or a network port to acquire original information in the time measurement system.
Currently, in a multi-channel time measurement system, time tag data collected by each channel needs to be written into a memory, and the writing method is as follows: the scheduling module polls each channel, when the current channel is scheduled, the time tag data in the channel is written into the memory, and then the next channel is polled, and the process is circulated until no new data is received.
The foregoing writing method has the following disadvantages: (1) When polling is performed each time, only one data can be written, if a plurality of time tag data are received in one channel at the same time, the polling is required to be performed a plurality of times, namely the next data in the channel can be written only after the plurality of channels are all polled for one time, and the data in the channel can be written into a memory completely after the circulation is performed; meanwhile, the write address needs to be read in each writing; thus, the writing efficiency is greatly reduced; (2) The next data in the channels can be written only after all the channels are polled for one time, and when more data are needed, the data can be lost because the data cannot be stored in time; accordingly, it is desirable to provide a fast storage method for time stamp data.
Disclosure of Invention
The invention aims to provide a multichannel rapid data storage method, a multichannel rapid data storage device, electronic equipment and a multichannel rapid data storage medium, so as to solve the problems of low efficiency and data loss caused by the existing storage method.
In order to achieve the above purpose, the present invention adopts the following technical scheme:
the invention provides a multichannel data storage method, which comprises the following steps:
when polling scheduling is carried out on a plurality of data acquisition channels, the data scheduler judges whether the number of time tag data received by each data acquisition channel meets a preset threshold value or not;
if yes, the data dispatcher splices the received time tag data to obtain first spliced data;
the data dispatcher sends the first spliced data to a storage driver;
the storage driver receives first spliced data sent by the data scheduler;
the storage driver acquires a storage address of the first spliced data;
and the storage driver writes the first spliced data into a storage area corresponding to the storage address in the memory according to the storage address.
Based on the above disclosure, the invention sets the number of data received by each data acquisition channel in a plurality of data acquisition channels, and when the plurality of data acquisition channels are polled and scheduled, judges whether the number of time tag data received by each data acquisition channel meets a preset threshold, if so, splices the received time tag data to obtain first spliced data, sends the first spliced data to a storage driver, and writes the first spliced data into a memory by the storage driver; through the design, when any data acquisition channel is polled, the one-time writing of a plurality of time-stamp data in the channel can be realized, and only the storage address is required to be read once, so that the defect that the data acquisition channels are all polled once and the next data writing can be performed in the traditional writing method can be avoided, the writing efficiency is improved, and the problem of data loss caused by the fact that the data cannot be stored in time is also avoided.
In one possible design, the method further comprises:
when the last time tag data is received, judging whether the number of the time tag data received by a target data acquisition channel meets a preset threshold value, wherein the target data acquisition channel is a data acquisition channel for receiving the last time tag data;
if not, acquiring the supplementary data;
splicing the supplementary data and the time tag data received by the target data acquisition channel to obtain second spliced data;
and sending the second spliced data to a storage driver, so that the storage driver writes the second spliced data into a memory after receiving the second spliced data.
Based on the above disclosure, the invention discloses a processing method when the number of data received by a corresponding data acquisition channel does not meet a preset threshold value when the last time tag data is received, namely, acquiring supplementary data, so that the number of the bad data is filled by the supplementary data, and splicing the supplementary data and the received time tag data to obtain second spliced data; and finally, sending the second spliced data to a storage driver to finish the writing of the last time tag data.
In one possible design, before splicing the supplemental data and the time tag data received by the target data acquisition channel to obtain second spliced data, the method further includes:
and setting an identification tag for each piece of supplementary data, wherein the identification tag is used for indicating that the corresponding piece of supplementary data is invalid data.
Based on the above disclosure, the present invention sets an identification tag for each supplementary data, so that after the supplementary data is stored in the memory, whether the data is the supplementary data can be determined by the identification tag, and if the supplementary data is the supplementary data, the supplementary data can be identified as invalid data and can be discarded.
In one possible design, the bit width of the first spliced data is n×w1, where n represents the number of time tag data received by any data acquisition channel, and W1 represents the bit width of each time tag data.
In a second aspect, the present invention provides a multi-channel data fast storage device, taking a device as an example of a data scheduler, including: a judging unit, a data combining unit and a transmitting unit;
the judging unit is used for judging whether the number of the time tag data received by each data acquisition channel meets a preset threshold value or not when polling scheduling is carried out on the plurality of data acquisition channels;
the data combination unit is used for splicing the received time tag data to obtain first spliced data when the judgment unit judges that the received time tag data is yes;
the sending unit is configured to send the first spliced data to a storage driver, so that the storage driver writes the first spliced data into a memory after receiving the first spliced data.
In one possible design, the apparatus further comprises: a data acquisition unit;
the judging unit is further configured to judge, when the last time tag data is received, whether the number of the time tag data received by the target data acquisition channel meets a preset threshold, where the target data acquisition channel is a data acquisition channel that receives the last time tag data;
the data acquisition unit is used for acquiring the supplementary data when the judgment unit judges that the data is not available;
the data combination unit is further used for splicing the supplementary data and the time tag data received by the target data acquisition channel to obtain second spliced data;
the sending unit is further configured to send the second spliced data to a storage driver, so that the storage driver writes the second spliced data into a memory after receiving the second spliced data.
In a third aspect, this embodiment provides a second multi-channel data flash memory device, taking the device as a storage driver, including: a receiving unit, an address acquisition unit and a storage unit;
the receiving unit is used for receiving the first spliced data sent by the data scheduler;
the address acquisition unit is used for acquiring the storage address of the first spliced data;
and the storage unit is used for writing the first spliced data into a storage area corresponding to the storage address in the memory according to the storage address.
In a fourth aspect, the present invention provides an electronic device comprising a memory, a processor and a transceiver in communication with each other in sequence, wherein the memory is configured to store a computer program, the transceiver is configured to send and receive messages, and the processor is configured to read the computer program and perform the multi-channel data fast storage method as in the first aspect or any one of the possible designs of the first aspect.
In a fifth aspect, the present invention provides a storage medium having stored thereon instructions which, when executed on a computer, perform the multi-channel data fast storage method as in the first aspect or any one of the possible designs of the first aspect.
In a sixth aspect, the invention provides a computer program product comprising instructions which, when run on a computer, cause the computer to perform the multi-channel data flash method as in the first aspect or any one of the possible designs of the first aspect.
Drawings
FIG. 1 is a schematic diagram of a multi-channel data flash memory system according to the present invention;
FIG. 2 is a flowchart illustrating steps of a method for fast storing multi-channel data according to the present invention;
FIG. 3 is a schematic diagram of a data scheduler according to the present invention;
FIG. 4 is a schematic diagram of a memory drive according to the present invention;
fig. 5 is a schematic structural diagram of an electronic device provided by the present invention.
Detailed Description
The invention will be further elucidated with reference to the drawings and to specific embodiments. The present invention is not limited to these examples, although they are described in order to assist understanding of the present invention. Specific structural and functional details disclosed herein are merely representative of example embodiments of the invention. This invention may, however, be embodied in many alternate forms and should not be construed as limited to the embodiments set forth herein.
It will be understood that, although the terms first, second, etc. may be used herein to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another element. For example, a first element could be termed a second element, and, similarly, a second element could be termed a first element, without departing from the scope of example embodiments of the present invention.
It should be understood that for the term "and/or" that may appear herein, it is merely one association relationship that describes an associated object, meaning that there may be three relationships, e.g., a and/or B, may represent: a alone, B alone, and both a and B; for the term "/and" that may appear herein, which is descriptive of another associative object relationship, it means that there may be two relationships, e.g., a/and B, it may be expressed that: a alone, a alone and B alone; in addition, for the character "/" that may appear herein, it is generally indicated that the context associated object is an "or" relationship.
Examples
As shown in fig. 1, a system architecture is provided for the present application, including a time-to-digital converter, a data scheduler, a storage drive, and a memory communicatively coupled; the time-to-digital converter converts each received photon signal into time tag data with the bit width of W1, the data scheduler is provided with a plurality of data acquisition channels and a plurality of data combination modules, and when the plurality of data acquisition channels are polled, the multi-channel data rapid storage method provided by the embodiment is used for splicing the plurality of time tag data in the current polling channel to obtain first spliced data, the first spliced data is sent to the storage driver, and finally the first spliced data is written into the memory by the storage driver; therefore, the one-time writing of a plurality of time tag data in any channel can be realized, and only one address is needed to be read, so that the defect that the next data writing can be performed only by completely polling a plurality of data acquisition channels for one time in the traditional writing method is avoided, the writing efficiency is improved, and the problem of data loss caused by not timely storing the data is also avoided.
The multi-channel data rapid storage method provided in the first aspect of the present embodiment can realize one-time writing of a plurality of time stamp data in any data acquisition channel, and only needs to read an address once, thereby improving data writing efficiency and avoiding the problem of data loss caused by failure to store data in time.
Referring to fig. 2, the method for fast storing multi-channel data provided in the first aspect of the present embodiment may include, but is not limited to, the following steps S1 to S6; of course, the foregoing steps S1 to S6 may be performed at the data scheduler and the storage drive side, but are not limited thereto.
Firstly, describing the hardware support of the multi-channel data fast storage method provided by the embodiment, at present, a memory like DDR (Double Data Rate SDRAM, double rate storage) or FLASH has a BURST mode (i.e. BURST mode, i.e. continuous reading and writing of a plurality of data), and the working principle of the mode is as follows: the data can be continuously operated only by sending the first address, so that the reading and writing efficiency can be improved; therefore, the method provided in this embodiment is used in the foregoing mode, and the implementation process is as follows steps S1 to S6:
s1, when polling scheduling is carried out on a plurality of data acquisition channels, the data scheduler judges whether the number of time tag data received by each data acquisition channel meets a preset threshold value.
And S2, if so, the data dispatcher splices the received time tag data to obtain first spliced data.
In the steps S1 and S2, when a plurality of data acquisition channels are scheduled in a polling manner, it is determined whether the number of time stamp data received by the currently scheduled data acquisition channel reaches a preset threshold value, so that it can be determined whether to splice the time stamp data received in the data acquisition channel according to a determination result, so that the time stamp data is spliced into one data (i.e., first spliced data) and sent to a storage driver, thereby realizing one-time writing of the plurality of data.
For example, assume that there are 4 data acquisition channels numbered 1,2,3, and 4, respectively; and the preset threshold is 3 data; and when the data scheduler is in polling scheduling, polling is started from the first data acquisition channel, the step S1 is executed, namely, when the first data acquisition channel is polled, whether the number of the time tag data received by the first data acquisition channel reaches 3 is judged, if so, the step S2 is executed, namely, the three time tag data received by the first data acquisition channel are spliced to obtain first spliced data, and finally, the first spliced data are sent to a storage driver and written into a memory by the storage driver.
If the number of the received time tag data does not reach 3 when the first data acquisition channel is polled, the next data acquisition channel is polled, namely the second data acquisition channel is polled, and the steps S1 and S2 are repeated, so that the cycle is repeated until no new time tag data is received.
In this embodiment, the splicing of the plurality of time stamp data is substantially as follows: combining the plurality of time tag data to obtain a group of new data, namely first spliced data; after splicing, the bit width of the first spliced data may be, but is not limited to, n×w1, where n represents the number of time-stamp data received by any data acquisition channel, and W1 represents the bit width of each time-stamp data.
After the time tag data in the data acquisition channel of the current polling schedule is spliced into the first spliced data, the data can be written in, as shown in the steps S3 to S6.
S3, the data dispatcher sends the first spliced data to a storage driver.
S4, the storage driver receives the first spliced data sent by the data scheduler.
S5, the storage driver acquires the storage address of the first spliced data.
S6, the storage driver writes the first spliced data into a storage area corresponding to the storage address in the memory according to the storage address.
In this embodiment, after receiving the first spliced data sent by the data scheduler, the storage driver reads a storage address corresponding to the first spliced data, so that writing of the first spliced data is implemented according to the storage address, that is, the first spliced data is stored in a storage area corresponding to the village address in the memory.
In this embodiment, the storage address of the first spliced data may be obtained by way of example, but not limited to, the following two methods:
first kind: a plurality of storage addresses are preset for each data acquisition channel in the plurality of data acquisition channels, so that when each data acquisition channel is scheduled in a polling mode, first spliced data corresponding to each data acquisition channel are stored in the corresponding plurality of storage addresses, and when the first spliced data are stored, the first spliced data are stored in sequence.
For example, the explanation is based on the foregoing examples:
assume that a plurality of storage addresses corresponding to the first data acquisition channel are: an A1 address, an A2 address, an A3 address, and an A4 address; the plurality of storage addresses corresponding to the second data acquisition channel are: b1 address, B2 address, B3 address, and B4 address; the plurality of storage addresses corresponding to the third data acquisition channel are: a C1 address, a C2 address, a C3 address, and a C4 address; the plurality of storage addresses corresponding to the fourth data acquisition channel are: d1 address, D2 address, D3 address, and D4 address, then when storing, the storing process is:
in the first polling scheduling process, after the storage driver receives first spliced data sent by the first data acquisition channel, reading an A1 address, and storing the first spliced data sent by the first data acquisition channel in the first polling scheduling process into a storage area corresponding to the A1 address of the memory; similarly, after receiving the first spliced data sent by the second data acquisition channel, the storage driver reads the B1 address and stores the first spliced data sent by the second data acquisition channel in the first polling scheduling into a storage area corresponding to the B1 address of the memory; similarly, for the first spliced data corresponding to the third data acquisition channel, the first spliced data is stored in the C1 address of the memory, and for the first spliced data corresponding to the fourth data acquisition channel, the first spliced data is stored in the D1 address of the memory.
And after the 4 data acquisition channels are polled and scheduled for one time, performing second polling, namely restarting polling the first data acquisition channel, namely, when the storage driver receives first spliced data sent by the first data acquisition channel in the second polling and scheduling process, reading an A2 address, namely, writing the received first spliced data sent by the first data acquisition channel in the second polling and scheduling process into the A2 address of the memory by the storage driver.
With the cycle, when the third polling is performed, the A3 address is read, namely, the first spliced data corresponding to the first data acquisition channel is written into the A3 address of the memory by the memory driver; when polling is performed for the fourth time, the first spliced data corresponding to the first data acquisition channel is written into an A4 address of the memory by the memory driver; therefore, under the condition of different polling scheduling times, the reading of the storage address corresponding to the first spliced data and the storing of the data can be realized.
The second memory address obtaining mode is:
and setting a plurality of storage addresses for a plurality of data acquisition channels, and starting reading from the first storage address and storing.
The description is also based on the examples given above:
examples of the plurality of memory addresses are: address 1, address 2, address 3, address 4, address 5, address 6, and address 7.
When the first polling scheduling is performed, the storage driver acquires the ground address 1 for the first spliced data corresponding to the first data acquisition channel, namely, the received first spliced data sent by the first data acquisition channel during the first polling scheduling is written into the address 1 of the memory; similarly, for the first spliced data corresponding to the second data acquisition channel, the storage driver acquires the ground address 2, namely the received first spliced data sent by the second data acquisition channel in the first polling scheduling is written into the address 2 of the memory; similarly, writing the first spliced data sent by the received third data acquisition channel in the first polling scheduling into an address 3 of the memory; and writing the first spliced data sent by the received fourth data acquisition channel in the first polling scheduling into the address 4 of the memory.
At this time, the first polling scheduling is finished, and the second polling scheduling is started, that is, in the second polling scheduling process, when the storage driver receives the first spliced data corresponding to the first data acquisition channel, the address 5 is obtained, the received first spliced data sent by the first data acquisition channel in the second polling scheduling process is written into the address 5 of the memory, and the cycle is performed, so that the reading of the storage address corresponding to the first spliced data and the storing of the data under the condition of different polling scheduling times are completed.
Therefore, by the multichannel rapid data storage method described in detail in the steps S1 to S6, the method can realize one-time writing of a plurality of time-stamp data in any data acquisition channel and only needs to read one address, thereby improving the data writing efficiency and avoiding the problem of data loss caused by incapability of timely storing data.
The second aspect of the present embodiment is further optimized based on the first aspect of the present embodiment to solve the problem that when the last time stamp data is received, the number of data corresponding to the data acquisition channels does not reach the preset threshold value, but cannot be written, where the solution process may be, but is not limited to, steps S7 to S10 as follows.
S7, when the last time tag data is received, judging whether the number of the time tag data received by the target data acquisition channel meets a preset threshold value, wherein the target data acquisition channel is the data acquisition channel for receiving the last time tag data.
S8, if not, acquiring the supplementary data.
S9, splicing the supplementary data and the time tag data received by the target data acquisition channel to obtain second spliced data.
S10, sending the second spliced data to a storage driver, so that the storage driver writes the second spliced data into a memory after receiving the second spliced data.
The principle of the steps S7 to S10 is as follows: if the number of the data in the corresponding data acquisition channel does not meet the preset threshold value when the last time tag data is received, filling the data which are bad in the number of the data reaching the preset threshold value with the supplementary data; and then splicing the supplementary data with the time tag data in the data acquisition channel, so that the last time tag data can be written.
For example, when the polling is scheduled to the fourth data acquisition channel, it just receives the last time tag data, and at this time, it is assumed that the number of time tag data received in the fourth data acquisition channel is 1, that is, only the last time tag data; then, 2 pieces of supplementary data can be obtained, so that the two pieces of supplementary data and the last time tag data are spliced to obtain second spliced data, and finally, the second spliced data are sent to a storage driver, so that the storage of the last time tag data is completed.
In this embodiment, the supplementary data may be, but is not limited to, preset by a user; for example, 10 pieces of supplementary data are set, and each piece of supplementary data may be, but is not limited to, a character string.
Meanwhile, in order to facilitate distinguishing the supplementary data from the time tag data in the memory, in this embodiment, before splicing the supplementary data with the time tag data received by the target data acquisition channel to obtain second spliced data, the following step S90 is provided to distinguish the data:
s90, setting an identification tag for each piece of supplementary data, wherein the identification tag is used for indicating that the corresponding piece of supplementary data is invalid.
In step S90, an identification tag is set for each supplementary data, so that it is determined whether the data is supplementary data by the identification tag, and the supplementary data can be identified as invalid data in the memory, that is, data corresponding to the photon signal, and should be discarded at the time of reading.
In this embodiment, an example identification tag may be, but is not limited to,: setting the data length of the supplementary data, such as length 0; i.e., a data length of 0, the data can be considered to be supplementary data, i.e., invalid data.
Therefore, the splicing and sending of the last time tag data and the identification of invalid data in the memory can be realized through the steps S7 to S10 and the substeps thereof.
As shown in fig. 3, a second aspect of the present embodiment provides a hardware device for implementing the multi-channel data fast storage method in the first aspect or the second aspect of the present embodiment, where the device is exemplified by a data scheduler, and the hardware device includes: a judging unit, a data combining unit and a transmitting unit.
The judging unit is used for judging whether the number of the time tag data received by each data acquisition channel meets a preset threshold value or not when polling scheduling is carried out on the plurality of data acquisition channels.
And the data combination unit is used for splicing the received time tag data to obtain first spliced data when the judgment unit judges that the received time tag data is yes.
The sending unit is configured to send the first spliced data to a storage driver, so that the storage driver writes the first spliced data into a memory after receiving the first spliced data.
In one possible design, the apparatus further comprises: and a data acquisition unit.
The judging unit is further configured to judge, when the last time tag data is received, whether the number of the time tag data received by the target data acquisition channel meets a preset threshold, where the target data acquisition channel is a data acquisition channel that receives the last time tag data.
The data acquisition unit is used for acquiring the supplementary data when the judgment unit judges that the data is not.
The data combination unit is further configured to splice the supplementary data and the time tag data received by the target data acquisition channel to obtain second spliced data.
The sending unit is further configured to send the second spliced data to a storage driver, so that the storage driver writes the second spliced data into a memory after receiving the second spliced data.
The working process, working details and technical effects of the hardware device provided in this embodiment may refer to the first aspect or the second aspect of the embodiment, and are not described herein again.
As shown in fig. 4, a fourth aspect of the present embodiment provides a hardware device for implementing the multi-channel data fast storage method in the first aspect or the second aspect of the present embodiment, taking the device as an access driver, where the hardware device includes: a receiving unit, an address acquisition unit and a storage unit.
The receiving unit is used for receiving the first spliced data sent by the data scheduler.
The address acquisition unit is used for acquiring the storage address of the first spliced data.
And the storage unit is used for writing the first spliced data into a storage area corresponding to the storage address in the memory according to the storage address.
The working process, working details and technical effects of the hardware device provided in this embodiment may refer to the first aspect or the second aspect of the embodiment, and are not described herein again.
As shown in fig. 5, a fifth aspect of the present embodiment provides an electronic device, including: the device comprises a memory, a processor and a transceiver which are connected in sequence in communication, wherein the memory is used for storing a computer program, the transceiver is used for receiving and transmitting messages, and the processor is used for reading the computer program and executing the multichannel data rapid storage method according to the first aspect or the second aspect of the embodiment.
By way of specific example, the Memory may include, but is not limited to, random access Memory (random access Memory, RAM), read only Memory (Read Only Memory image, ROM), flash Memory (Flash Memory), first-in first-out Memory (First Input First Output, FIFO) and/or first-out Memory (First In Last Out, FILO), and the like; the processor may not be limited to a processor employing a microprocessor of the STM32F105 family, a reduced instruction set computer (reduced instruction set computer, RSIC) microprocessor, an X86 architecture processor, or an integrated embedded neural Network Processor (NPU); the transceiver may be, but is not limited to, a wireless fidelity (WIFI) wireless transceiver, a bluetooth wireless transceiver, a general packet radio service technology (General Packet Radio Service, GPRS) wireless transceiver, a ZigBee protocol (low power local area network protocol based on the ieee802.15.4 standard), a 3G transceiver, a 4G transceiver, and/or a 5G transceiver, etc. In addition, the device may include, but is not limited to, a power module, a display screen, and other necessary components.
The working process, working details and technical effects of the computer main device provided in this embodiment may refer to the first aspect and the second aspect of the embodiments, which are not described herein.
A sixth aspect of the present embodiment provides a storage medium storing instructions including the multi-channel data fast storage method according to the first or second aspect of the present embodiment, that is, the storage medium storing instructions thereon, when the instructions are executed on a computer, the multi-channel data fast storage method according to the first or second aspect is performed.
The storage medium refers to a carrier for storing data, and may include, but is not limited to, a floppy disk, an optical disk, a hard disk, a flash Memory, a flash disk, and/or a Memory Stick (Memory Stick), where the computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable devices.
The working process, working details and technical effects of the storage medium provided in this embodiment may refer to the first aspect and the second aspect of the embodiment, and are not described herein again.
A seventh aspect of the present embodiment provides a computer program product comprising instructions which, when run on a computer, cause the computer to perform the multi-channel data flash memory method of the first or second aspect of the embodiment, wherein the computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus.
Finally, it should be noted that: the foregoing description is only of the preferred embodiments of the invention and is not intended to limit the scope of the invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (5)
1. A method for fast storing of multi-channel data, comprising:
when polling scheduling is carried out on a plurality of data acquisition channels, judging whether the number of time tag data received by each data acquisition channel meets a preset threshold value, wherein the time tag data is obtained by converting each received photon signal by a time-to-digital converter, and the bit width of the time tag data is W1;
if yes, splicing the received time tag data to obtain first spliced data;
the first spliced data is sent to a storage driver, so that the storage driver acquires a plurality of storage addresses set for a plurality of data acquisition channels after receiving the first spliced data, and reads and stores the first spliced data from the first storage address so as to write the first spliced data into a memory;
the method further comprises the steps of:
when the last time tag data is received, judging whether the number of the time tag data received by a target data acquisition channel meets the preset threshold value, wherein the target data acquisition channel is the data acquisition channel for receiving the last time tag data;
if not, acquiring the supplementary data;
splicing the supplementary data and the time tag data received by the target data acquisition channel to obtain second spliced data;
the second spliced data is sent to a storage driver, so that the storage driver writes the second spliced data into a memory after receiving the second spliced data;
before splicing the supplementary data and the time tag data received by the target data acquisition channel to obtain second spliced data, the method further comprises:
and setting an identification tag for each piece of supplementary data, wherein the identification tag is used for indicating that the corresponding piece of supplementary data is invalid data.
2. The method of claim 1, wherein the first spliced data has a bit width of n x W1, where n represents the number of time stamp data received by any data acquisition channel and W1 represents the bit width of each time stamp data.
3. A multi-channel data flash memory device, comprising: a judging unit, a data combining unit and a transmitting unit;
the judging unit is used for judging whether the number of the time tag data received by each data acquisition channel meets a preset threshold value or not when polling scheduling is carried out on a plurality of data acquisition channels, wherein the time tag data is obtained by converting each received photon signal by the time-to-digital converter, and the bit width of the time tag data is W1;
the data combination unit is used for splicing the received time tag data to obtain first spliced data when the judgment unit judges that the received time tag data is yes;
the sending unit is used for sending the first spliced data to a storage driver, so that the storage driver obtains a plurality of storage addresses set for a plurality of data acquisition channels after receiving the first spliced data, reads from the first storage address and stores the first spliced data so as to write the first spliced data into a memory;
further comprises: a data acquisition unit;
the judging unit is further configured to judge, when the last time tag data is received, whether the number of the time tag data received by the target data acquisition channel meets the preset threshold, where the target data acquisition channel is a data acquisition channel that receives the last time tag data;
the data acquisition unit is used for acquiring the supplementary data when the judgment unit judges that the data is not available;
the data combination unit is further used for splicing the supplementary data and the time tag data received by the target data acquisition channel to obtain second spliced data;
the sending unit is further configured to send the second spliced data to a storage driver, so that the storage driver writes the second spliced data into a memory after receiving the second spliced data;
before splicing the supplementary data and the time tag data received by the target data acquisition channel to obtain second spliced data, the method further comprises the following steps:
and setting an identification tag for each piece of supplementary data, wherein the identification tag is used for indicating that the corresponding piece of supplementary data is invalid data.
4. An electronic device, comprising: the system comprises a memory, a processor and a transceiver which are connected in sequence in communication, wherein the memory is used for storing a computer program, the transceiver is used for receiving and transmitting messages, and the processor is used for reading the computer program and executing the multichannel data rapid storage method according to any one of claims 1-2.
5. A storage medium having instructions stored thereon which, when executed on a computer, perform the multi-channel data fast storage method of any one of claims 1-2.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202111138642.4A CN113867637B (en) | 2021-09-27 | 2021-09-27 | Multichannel data rapid storage method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202111138642.4A CN113867637B (en) | 2021-09-27 | 2021-09-27 | Multichannel data rapid storage method and device, electronic equipment and storage medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN113867637A CN113867637A (en) | 2021-12-31 |
| CN113867637B true CN113867637B (en) | 2024-04-16 |
Family
ID=78991624
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202111138642.4A Active CN113867637B (en) | 2021-09-27 | 2021-09-27 | Multichannel data rapid storage method and device, electronic equipment and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN113867637B (en) |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7827146B1 (en) * | 2007-03-30 | 2010-11-02 | Symantec Operating Corporation | Storage system |
| CN110134366A (en) * | 2019-05-21 | 2019-08-16 | 合肥工业大学 | Method and device for parallel writing to multi-channel FIFO |
| CN110502469A (en) * | 2019-08-29 | 2019-11-26 | 上海燧原智能科技有限公司 | A kind of data distributing method, device, equipment and storage medium |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8965841B2 (en) * | 2006-10-05 | 2015-02-24 | Trimble Navigation Limited | Method for automatic asset classification |
| KR20130084469A (en) * | 2012-01-17 | 2013-07-25 | 삼성전자주식회사 | Method for compressing and storing data and storage device using method thereof |
-
2021
- 2021-09-27 CN CN202111138642.4A patent/CN113867637B/en active Active
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7827146B1 (en) * | 2007-03-30 | 2010-11-02 | Symantec Operating Corporation | Storage system |
| CN110134366A (en) * | 2019-05-21 | 2019-08-16 | 合肥工业大学 | Method and device for parallel writing to multi-channel FIFO |
| CN110502469A (en) * | 2019-08-29 | 2019-11-26 | 上海燧原智能科技有限公司 | A kind of data distributing method, device, equipment and storage medium |
Non-Patent Citations (2)
| Title |
|---|
| Evaluation of a novel photon-counting CT system using a 16-channel MPPC array for multicolor 3-D imaging;T. Maruhashi et al.;《 Nuclear Instruments and Methods in Physics Research Section A: Accelerators, Spectrometers, Detectors and Associated Equipment》;全文 * |
| 基于冷原子系综的量子存储及操控;陈力荣;《中国博士学位论文全文数据库基础科学辑》;全文 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN113867637A (en) | 2021-12-31 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN106294234B (en) | A kind of data transmission method and device | |
| KR101745456B1 (en) | Ecu for transmitting large data in hil test environment, system including the same and method thereof | |
| CN107015927A (en) | A kind of device based on the multiple SPI interface standard groups of SoC supports | |
| CN102253898B (en) | Memory management method and memory management device of image data | |
| TWI475491B (en) | System and method for updating electronic shelf labels and updating apparatus and method of an electronic shelf label | |
| US20020110145A2 (en) | Control method and communication device | |
| CN104320317B (en) | A kind of transfer approach and device of ethernet physical layer chip status | |
| CN112291852B (en) | A UCI transmission and reception method, device, system, equipment and medium | |
| CN109086168A (en) | A kind of method and its system using hardware backup solid state hard disk writing rate | |
| CN113867637B (en) | Multichannel data rapid storage method and device, electronic equipment and storage medium | |
| CN115834739A (en) | Receiving method of indefinite-length data frame in platform area intelligent convergence terminal SPI communication | |
| CN104199783A (en) | Method and device for caching and transmitting of Ethernet data frames in FPGA (field programmable gate array) | |
| US9008070B2 (en) | Information communication apparatus and program storage medium | |
| CN103019990A (en) | Method for uploading data at collection end through starting PCI-E (Peripheral Component Interconnect-Express) bus DMA (Direct Memory Access) | |
| KR20230025858A (en) | Communication device and communication system | |
| CN116450552A (en) | Asynchronous batch register reading and writing method and system based on I2C bus | |
| CN110868458B (en) | Communication method and device for stable control system | |
| CN113454935A (en) | Line coding method and device | |
| CN112764673B (en) | Hyperspectral linear array data storage rate optimization method, device and storage medium | |
| US8812764B2 (en) | Apparatus installing devices controlled by MDIO or SPI protocol and method to control the same | |
| CN106899386B (en) | Method for demodulating fragmented frame signals based on multi-channel communication receiving system | |
| CN113170500B (en) | An information transmission method and device | |
| TWI513208B (en) | Wireless Infrared Control Converter | |
| CN109213710A (en) | High-speed serial interface device and data transmission method thereof | |
| JP5892325B2 (en) | Loopback circuit |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |