CN116665836A - Editing and storing method, reading and playing method and electronic equipment for sequence data - Google Patents

Editing and storing method, reading and playing method and electronic equipment for sequence data Download PDF

Info

Publication number
CN116665836A
CN116665836A CN202310924862.2A CN202310924862A CN116665836A CN 116665836 A CN116665836 A CN 116665836A CN 202310924862 A CN202310924862 A CN 202310924862A CN 116665836 A CN116665836 A CN 116665836A
Authority
CN
China
Prior art keywords
data
sequence
value
storage
identification bit
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.)
Granted
Application number
CN202310924862.2A
Other languages
Chinese (zh)
Other versions
CN116665836B (en
Inventor
黄斌
王硕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guoyi Quantum Technology Hefei Co ltd
Original Assignee
Chinainstru and Quantumtech Hefei Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Chinainstru and Quantumtech Hefei Co Ltd filed Critical Chinainstru and Quantumtech Hefei Co Ltd
Priority to CN202310924862.2A priority Critical patent/CN116665836B/en
Publication of CN116665836A publication Critical patent/CN116665836A/en
Application granted granted Critical
Publication of CN116665836B publication Critical patent/CN116665836B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H10/00ICT specially adapted for the handling or processing of patient-related medical or healthcare data
    • G16H10/60ICT specially adapted for the handling or processing of patient-related medical or healthcare data for patient-specific data, e.g. for electronic patient records
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0608Saving storage space on storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F5/00Methods or arrangements for data conversion without changing the order or content of the data handled
    • G06F5/06Methods or arrangements for data conversion without changing the order or content of the data handled for changing the speed of data flow, i.e. speed regularising or timing, e.g. delay lines, FIFO buffers; over- or underrun control therefor
    • G06F5/065Partitioned buffers, e.g. allowing multiple independent queues, bidirectional FIFO's
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE 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/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Public Health (AREA)
  • Human Computer Interaction (AREA)
  • Primary Health Care (AREA)
  • Medical Informatics (AREA)
  • Health & Medical Sciences (AREA)
  • Epidemiology (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Management Or Editing Of Information On Record Carriers (AREA)

Abstract

The application discloses an editing and storing method, a reading and playing method and electronic equipment of sequence data, wherein the editing and storing method of the sequence data comprises the following steps: acquiring sequence data generated by any sequence generator; performing initial editing on the sequence data to obtain an initial sequence; and converting the initial sequence into a basic sequence according to a preset storage format, and storing the basic sequence into a data memory, wherein the preset storage format comprises a first identification bit, a second identification bit, a third identification bit and a direct data area. The editing and storing method of the sequence data can compress the data, save the storage space and simultaneously give consideration to the playing requirement of the sequence data.

Description

Editing and storing method, reading and playing method and electronic equipment for sequence data
Technical Field
The present application relates to the field of sequencer technologies, and in particular, to an editing and storing method for sequence data, a reading and playing method for sequence data, and an electronic device.
Background
The sequence data generated by the ASG (Arbitrary Sequence Generator), any sequence generator, is the underlying data (i.e., both 0 or 1). The editing and storing mode of the bottom data in the related technology is to fully expand the sequence and then transmit the sequence to a lower computer for storage and playing through USB (Universal Serial Bus ) or a network port, and the fully expanded sequence mode not only increases the data transmission quantity, but also wastes the storage space.
Disclosure of Invention
The present application aims to solve at least one of the technical problems in the related art to some extent. Therefore, the application aims to provide an editing and storing method, a reading and playing method and electronic equipment for sequence data so as to save storage space.
To achieve the above object, an embodiment of a first aspect of the present application provides an edit storage method for sequence data, the method including: acquiring sequence data generated by any sequence generator; performing initial editing on the sequence data to obtain an initial sequence, wherein the initial sequence comprises the numerical value and the number of the data; the initial sequence is converted into a basic sequence according to a preset storage format, and the basic sequence is stored in a data memory, wherein the preset storage format comprises a first identification bit, a second identification bit, a third identification bit and a direct data area, the first identification bit is used for representing the type of storage data, the type comprises direct data and circulating data, the second identification bit is used for representing the numerical value of the circulating data, the third identification bit is used for representing the effective group number of the direct data when the first identification bit represents the type of storage data is the direct data, the direct data area is used for storing the direct data, and the third identification bit and the direct data area are integrated and used for representing the circulating times of the circulating data when the first identification bit represents the type of storage data is the circulating data.
In addition, the editing and storing method of the sequence data in the embodiment of the application can also have the following additional technical characteristics:
according to one embodiment of the present application, the editing the sequence data to obtain an initial sequence includes: counting the number of the same numerical values when the same numerical values continuously appear in the sequence data; and obtaining M initial sequences according to the same numerical value and the number thereof, wherein M is a positive integer.
According to one embodiment of the present application, the data storage includes a plurality of storage areas, the converting the initial sequence into a base sequence according to a preset storage format, and storing the base sequence in the data storage, including: aiming at the ith initial sequence, acquiring residual data of the ith-1 initial sequence, and splicing the residual data with the data in the ith initial sequence, wherein i is a positive integer greater than or equal to 2; grouping the spliced data to obtain N groups of storage data, a basic sequence corresponding to each group of storage data and the residual data of an ith initial sequence, wherein the basic sequence comprises the value of the first identification bit, the value of the second identification bit, the value of the third identification bit and the numerical value of the direct data area, and N is an integer greater than or equal to 0; determining N target storage areas according to N groups of storage data; and storing the basic sequence into a corresponding target storage area.
According to an embodiment of the present application, the grouping the spliced data to obtain N groups of storage data and a basic sequence corresponding to each group of storage data, and remaining data of an ith initial sequence includes: calculating the difference value between the quantity of the spliced data and a first preset value to obtain a first difference value; and grouping the spliced data according to the first difference value to obtain N groups of storage data, a basic sequence corresponding to each group of storage data and the residual data of the ith initial sequence.
According to an embodiment of the present application, the grouping the spliced data according to the first difference value, to obtain N groups of storage data, a basic sequence corresponding to each group of storage data, and remaining data of an ith initial sequence, includes: if the first difference value is smaller than 0, 0 groups of storage data are obtained, and the residual data of the ith initial sequence are determined to be the spliced data; if the first difference value is equal to 0, the spliced data is used as a group of stored data, the group of stored data is determined to be direct data, the effective group number of the direct data is obtained, and the remaining data of the ith initial sequence is determined to be empty; if the first difference value is larger than 0, taking the first preset value data in the spliced data as a group of stored data, determining the group of stored data as direct data, obtaining the effective group number of the direct data, and calculating the ratio of the first difference value to the second preset value to obtain a first ratio; and grouping the rest spliced data according to the first ratio to obtain N-1 groups of storage data, the value of a first identification bit, the value of a second identification bit, the value of a third identification bit and the value of a direct data area corresponding to each group of storage data, and the rest data of an ith initial sequence.
According to an embodiment of the present application, the grouping the remaining spliced data according to the first ratio to obtain N-1 sets of stored data, the value of the first identification bit, the value of the second identification bit, the value of the third identification bit, and the value of the direct data area corresponding to each set of stored data, and the remaining data of the ith initial sequence include: if the first ratio is smaller than a target ratio threshold, 0 groups of storage data are obtained, and the residual data of the ith initial sequence are determined to be residual spliced data; and if the first ratio is greater than or equal to the target ratio threshold, taking the remaining spliced data as a group of stored data, determining the group of stored data as cyclic data, obtaining the cyclic times of the cyclic data, and determining that the remaining data of the ith initial sequence is null.
According to one embodiment of the present application, the basic sequence includes a value of the first identification bit, a value of the second identification bit, a value of the third identification bit, and a value of the direct data area, including: if the type of the stored data is direct data, the first identification bit value of the basic sequence is the first value, the second identification bit value is null, the third identification bit value is the effective group number, and the numerical value of the direct data area is direct data; and if the type of the stored data is the circulating data, the first identification bit of the target storage area is taken as a second identification bit, the second identification bit is taken as the numerical value of the circulating data, and the third identification bit and the direct data area are integrated and take the value as the circulating times of the circulating data.
According to one embodiment of the present application, the first identification bit, the second identification bit, the third identification bit, and the direct data area have bits of 1bit, 4bit, and 28bit, respectively.
In order to achieve the above object, a second aspect of the present application provides a method for reading and playing sequence data, wherein after the sequence data is stored in a data memory by the method for editing and storing sequence data, the method for reading and playing sequence data includes: acquiring a play sequence of the sequence data; reading the stored data in the data memory according to the playing sequence; storing the stored data into a first-in first-out FIFO (first-out FIFO) queue according to the type of the stored data; and reading and playing the data in the FIFO queue.
To achieve the above object, an embodiment of a third aspect of the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory, where the computer program, when executed by the processor, implements the method for editing and storing sequence data described above.
According to the editing and storing method, the reading and playing method and the electronic device for the sequence data, the initial sequence is obtained by editing the sequence data, and then the initial sequence is stored in the data memory according to the preset storage format, so that the data can be compressed, the storage space is saved, and meanwhile, the playing requirement of the sequence data is met.
Drawings
FIG. 1 is a flow chart of a method for editing and storing sequence data according to an embodiment of the application;
FIG. 2 is a diagram illustrating a data storage format according to an embodiment of the present application;
FIG. 3 is a flowchart of a method for reading and playing sequence data according to an embodiment of the present application;
fig. 4 is a block diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Embodiments of the present application are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are illustrative and intended to explain the present application and should not be construed as limiting the application.
An edit storage method, a read playback method, and an electronic device for sequence data according to embodiments of the present application are described below with reference to the accompanying drawings.
Fig. 1 is a flow chart of an edit storing method of sequence data according to an embodiment of the application.
As shown in fig. 1, the editing and storing method of the sequence data includes:
s1, acquiring sequence data generated by any sequence generator.
As one example, the sequence data may be obtained by calling an interface or using a software package function.
S2, carrying out initial editing on the sequence data to obtain an initial sequence, wherein the initial sequence comprises the numerical value and the number of the data.
As an example, let the amount of data in the active set of direct data be k, editing the sequence data may include: judging whether the length of the sequence data is a multiple of k, if not, carrying out zero padding on the sequence data so that the sequence data is the multiple of k; and then continuing to edit the sequence data to obtain an initial sequence.
S3, converting the initial sequence into a basic sequence according to a preset storage format, and storing the basic sequence into a data memory, wherein the preset storage format comprises a first identification bit, a second identification bit, a third identification bit and a direct data area, the first identification bit is used for representing the type of storage data, the type comprises direct data and circulating data, the second identification bit is used for representing the numerical value of the circulating data, the third identification bit is used for representing the effective group number of the direct data when the first identification bit represents the type of storage data is the direct data, the direct data area is used for storing the direct data, and the third identification bit and the direct data area are integrated and used for representing the circulating times of the circulating data when the first identification bit represents the type of storage data is the circulating data.
According to the editing and storing method of the sequence data, whether direct data or cyclic data are adopted for storage is selected according to the length of the initial sequence to be stored, and the data quantity of the bottom layer data can be compressed, so that the space used for storing the data is reduced. Meanwhile, the playing requirement of the sequence data is considered.
In some embodiments of the present application, editing the sequence data to obtain an initial sequence includes:
s21, counting the number of the same numerical values when the same numerical values continuously appear in the sequence data.
S22, obtaining M initial sequences according to the same numerical value and the number thereof, wherein M is a positive integer.
In particular, the sequence data may be edited by a function library.
As an example, after editing the sequence data (00000000000011111111110000000000), the sequence w1=seq_gen (L, 12; h,10; L, 10) can be obtained, wherein w1 contains 3 initial sequences.
In this embodiment, the initial sequence is obtained based on the levels and the number of consecutive occurrences of the same value in the sequence data, facilitating subsequent storage of the data in the data storage.
In some embodiments of the present application, the data storage includes a plurality of storage areas, converting an initial sequence into a basic sequence according to a preset storage format, and storing the basic sequence in the data storage, including:
s31, aiming at the ith initial sequence, acquiring the residual data of the ith-1 initial sequence, and splicing the residual data with the data in the ith initial sequence, wherein i is a positive integer greater than or equal to 2.
S32, grouping the spliced data to obtain N groups of storage data, a basic sequence corresponding to each group of storage data and the residual data of the ith initial sequence, wherein the basic sequence comprises the value of a first identification bit, the value of a second identification bit, the value of a third identification bit and the numerical value of a direct data area, and N is an integer greater than or equal to 0.
S33, determining N target storage areas according to the N groups of storage data.
S34, storing the basic sequence into a corresponding target storage area.
In this embodiment, by splicing the remaining data of the i-1 th initial sequence with the data in the i-th initial sequence, the storage space can be saved, and the storage space of the data memory can be maximally utilized.
In some embodiments of the present application, grouping the spliced data to obtain N groups of storage data and a basic sequence corresponding to each group of storage data, and remaining data of an i-th initial sequence, where the steps include:
s321, calculating the difference value between the number of the spliced data and the first preset value to obtain a first difference value.
S322, grouping the spliced data according to the first difference value to obtain N groups of storage data, a basic sequence corresponding to each group of storage data and the residual data of the ith initial sequence.
As one example, the first preset value may be a size where direct data is stored in the memory area.
In this embodiment, the efficiency of the data storage process can be improved by calculating the difference between the number of spliced data and the first preset value and then grouping the data. In addition, since the lower computer plays direct data and is high-speed, it is preferable to use direct data when playing a small amount of data. Therefore, the direct data with the data quantity smaller than or equal to the first preset value in the initial sequence is stored, and the cyclic data with the data quantity larger than the first preset value is stored, so that the data quantity is reduced, the storage space is compressed, and the playing speed of the lower computer is also considered.
In some embodiments of the present application, grouping the spliced data according to the first difference value to obtain N groups of storage data, a base sequence corresponding to each group of storage data, and remaining data of an ith initial sequence, where the steps include:
s3221, if the first difference value is smaller than 0, obtaining 0 groups of storage data, and determining the residual data of the ith initial sequence as spliced data.
S3222, if the first difference value is equal to 0, the spliced data is used as a group of storage data, the group of storage data is determined to be direct data, the effective group number of the direct data is obtained, and the remaining data of the ith initial sequence is determined to be null.
S3223, if the first difference value is greater than 0, taking the first preset value data in the spliced data as a group of stored data, determining the group of stored data as direct data, obtaining the effective group number of the direct data, and calculating the ratio of the first difference value to the second preset value to obtain a first ratio.
S3224, the remaining spliced data packets are subjected to first comparison to obtain N-1 groups of storage data, the value of the first identification bit, the value of the second identification bit, the value of the third identification bit and the numerical value of the direct data area corresponding to each group of storage data, and the remaining data of the ith initial sequence.
As an example, the second preset value may be the size of the direct data area in the storage area.
Specifically, according to the first ratio, the remaining spliced data are grouped to obtain N-1 groups of storage data, the value of the first identification bit, the value of the second identification bit, the value of the third identification bit and the value of the direct data area corresponding to each group of storage data, and the remaining data of the ith initial sequence, including:
s32241, if the first ratio is smaller than the target ratio threshold, obtaining 0 groups of storage data, and determining the remaining data of the ith initial sequence as the remaining spliced data.
And S32242, if the first ratio is greater than or equal to the target ratio threshold, taking the remaining spliced data as a group of stored data, determining the group of stored data as circulating data, obtaining the circulating times of the circulating data, and determining the remaining data of the ith initial sequence as null.
In this embodiment, the data with a large amount of spliced data is expressed as cyclic data, so that the storage space of the data memory can be saved.
In some embodiments of the present application, the base sequence includes a value of a first identification bit, a value of a second identification bit, a value of a third identification bit, and a value of a direct data area, including:
and S341, if the type of the stored data is direct data, the first identification bit of the basic sequence is set to be a first value, the second identification position is empty, the third identification bit is set to be an effective group number, and the numerical value of the direct data area is direct data. It should be noted that, here, the second identification position being empty means that the data of the second identification position has no specific meaning, and the second identification position may be any value or be empty.
S342, if the type of the stored data is the circulating data, the first identification bit of the target storage area is set to be a second identification bit, the second identification bit is set to be the numerical value of the circulating data, and the third identification bit and the direct data area are integrated and set to be the circulating times of the circulating data.
Specifically, referring to fig. 2, the format of the data storage area may be 1bit, 4bit, and 28bit, respectively, for the first flag bit, the second flag bit, the third flag bit, and the direct data area.
More specifically, a first identification bit (identification 1), a second identification bit (identification 2), a third identification bit (identification 3) and a direct data area may be defined. The definition is as follows:
identification 1: can be 1 or 0,1 indicating that the data to be stored is direct data; 0 indicates that the data to be stored is loop data. It should be appreciated that the flag 1 may be represented using any other value or symbol, and that 0 or 1 is used in this embodiment to save memory space.
Identification 2: may be 1 or 0 and is only valid when the value of flag 1 is 0; 1 indicates a value of 1 for the cyclic data, and 0 indicates a value of 0 for the cyclic data. It should be appreciated that the identifier 2 may be represented by any other value or symbol, and that a 0 or 1 is used in this embodiment to save memory space.
Identification 3: when the flag 1 is 0, the flag 3 indicates the number of cycles of the cycle data, and when the flag 1 is 1, the flag 3 indicates the number of valid groups of the data to be stored.
As an example, the storage size of the active set is 4 bits, and when the flag 1 is 1, the value of the flag 3 may be 1 to 7. For example, the value of flag 3 is 5, indicating that the first 5 sets (5×4=20) of data stored in the memory area are valid data.
As another example, taking fig. 2 as an example, the number of data to be stored in the initial sequence may be divided by 4 to obtain a first ratio. When the first ratio is greater than 7, the data to be stored is analyzed into cyclic data, and the cyclic times of the cyclic data are obtained. When the first ratio is equal to 7, the data to be stored is parsed into direct data. When the first ratio is smaller than 7, the data to be stored is represented as residual data, and the data to be stored in the next initial sequence is waited to be spliced.
The storage of the sequence will be described next taking the edited sequence w1=seq_gen (H, 29; l,100; H,20; l,50; H,80; l, 1000) as an example. Wherein the sequence represents 29 high levels, 100 low levels, 20 high levels, 50 low levels, 80 high levels, 1000 low levels; in this example, the high level is represented by 1, and the low level is represented by 0.
TABLE 1
As shown in table 1, table 1 is a storage format of the edited base sequence, and the first initial sequence is 29 high levels, that is, is composed of 29 1: 29 divided by 4 equals 7 remainder 1, since the quotient equals 7, then the direct data is resolved, thus identifying 1 as 1, denoted by "1'b1", and "1' b1" representing a 1-bit binary 1; since the flag 1 is 1, the flag 2 has no effect, and can be represented by a null or other arbitrary value, the flag 3 is a group number representing effective data, where the group number of the effective data is 7, in this embodiment, "32' b" represents a 32-bit binary number, where the 32 bits include the flag 3 and the following direct data, and "4' b0111" may be written in the flag 3, and the direct data area is added with "28' b", and in this embodiment, "0111" in the flag 3 represents 7, that is, represents 7 groups of effective data; the number of 1 in 7 groups of 4 bits is 28, 1 less 1 needs to be spliced with the data in the second initial sequence, 27 0 s are selected from the second initial sequence and the rest 1 s are spliced into the second basic sequence, and the second basic sequence contains the rest 1 s in the first basic sequence and 0 s in the second initial sequence, so that the second basic sequence cannot be stored in a circulating mode, the identifier 1 of the second basic sequence is also "1'b1", the identifier 3 is also "32' b0111", and the direct data area is 0 and 1 which need to be stored.
The second initial sequence is 100 low levels, consisting of 100 0: the remainder of dividing 73 by 4 and then equal to 18 is 1, and the quotient is greater than 7, so that the data are analyzed to be cyclic data and cyclic times, the label 1 in the third storage area is 0, the group of data is cyclic data, the label 2 is 0, the cyclic value of the group of data is 0, the label 3 is ' 32'd18 ', the cyclic times are 18, the number of times of 18 is multiplied by 4 and is equal to 72, and 0 is still left to be spliced with the data in the third initial sequence, and the method is used for pushing until all initial sequences needing to be stored are finished.
By way of example, it can be seen that the storage mode of the present application requires only 10×34bit=340 bit storage space. If the traditional fully-expanded data storage mode needs 29+100+20+50+80+1000=1279 bits, the storage mode adopted by the application only needs 340/1279=26.58% of the original storage space, so that the storage space of the data storage is greatly saved.
Corresponding to the above embodiment, the present application also provides a method for reading and playing sequence data.
Fig. 3 is a flowchart of a method for reading and playing sequence data according to an embodiment of the application.
The method for editing and storing the sequence data stores the sequence data into a data memory.
As shown in fig. 3, the method for reading and playing the sequence data includes:
a1, acquiring the playing sequence of the sequence data.
As an example, the manner of sequence combination may be defined by an asg_seq function. Such as s1=asg_seq ([ [ w2 (6), w1 (2) ], [ w3 (2), w4 (2) ] ]; the whole sequence comprises four sequences w1, w2, w3 and w4, and the numbers in brackets indicate the repetition times of the sequence. Wherein w1, w2 form a sub-sequence, w3, w4 form a sub-sequence, the sub-sequence is controlled by the trigger signal in the internal trigger and external trigger modes.
A2, reading the storage data in the data storage according to the playing sequence.
A3, storing the storage data into a first-in first-out FIFO queue according to the type of the storage data.
As one example, storing stored data in a first-in first-out FIFO queue according to a type of the stored data, comprising: whether the stored data to be played is direct data or cyclic data can be determined according to the identifier 1, and if the stored data is direct data, the data in the corresponding direct data area in the basic sequence is directly stored into the FIFO; if the data is the cyclic data, the corresponding basic sequence is analyzed into the direct data according to the identifier 2 and the direct data area, and then the direct data is stored in the FIFO.
And A4, reading and playing the data in the FIFO queue.
As an example, the direct data to be played is assigned to the corresponding channel by an asg_out function. For example, asg_out [1] =s1; indicating assignment of data to lane 1.
According to the method for reading and playing the sequence data, the stored data in the data memory are read according to the playing sequence, then the stored data are stored in the first-in first-out FIFO queue according to the type of the stored data, and finally the data in the FIFO queue are read and played, so that the playing speed of the sequence data can not be influenced, and meanwhile, the sequence data can be played more efficiently.
Corresponding to the embodiment, the application also provides electronic equipment.
Fig. 4 is a block diagram of an electronic device according to an embodiment of the present application.
As shown in fig. 4, the electronic device 500 includes: a processor 501 and a memory 503. The processor 501 is coupled to a memory 503, such as via a bus 502. Optionally, the electronic device 500 may also include a transceiver 504. It should be noted that, in practical applications, the transceiver 504 is not limited to one, and the structure of the electronic device 500 is not limited to the embodiment of the present application.
The processor 501 may be a CPU (Central Processing Unit ), general purpose processor, DSP (Digital Signal Processor, data signal processor), ASIC (Application Specific Integrated Circuit ), FPGA (Field Programmable Gate Array, field programmable gate array) or other programmable logic device, transistor logic device, hardware components, or any combination thereof. Which may implement or perform the various exemplary logical blocks, modules, and circuits described in connection with the present disclosure. The processor 501 may also be a combination that implements computing functionality, such as a combination comprising one or more microprocessors, a combination of a DSP and a microprocessor, and the like.
Bus 502 may include a path to transfer information between the components. Bus 502 may be a PCI (Peripheral Component Interconnect, peripheral component interconnect Standard) bus or an EISA (Extended Industry Standard Architecture ) bus, or the like. The bus 502 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in fig. 4, but not only one bus or one type of bus.
The memory 503 is used to store a computer program corresponding to the edit storage method of the sequence data of the above-described embodiment of the present application, which is controlled to be executed by the processor 501. The processor 501 is configured to execute a computer program stored in the memory 503 to implement what is shown in the foregoing method embodiments.
Among other things, electronic device 500 includes, but is not limited to: mobile terminals of notebook computers, PAD (tablet computers) and the like, stationary terminals of desktop computers and the like. The electronic device 500 shown in fig. 4 is merely an example and should not be construed as limiting the functionality and scope of use of embodiments of the present application.
According to the electronic equipment provided by the embodiment of the application, the data can be compressed by realizing the editing and storing method of the sequence data, so that the storage space is saved.
It should be noted that the logic and/or steps represented in the flowcharts or otherwise described herein, for example, may be considered as a ordered listing of executable instructions for implementing logical functions, and may be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). In addition, the computer readable medium may even be paper or other suitable medium on which the program is printed, as the program may be electronically captured, via, for instance, optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner, if necessary, and then stored in a computer memory.
It is to be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, may be implemented using any one or combination of the following techniques, as is well known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present application. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present application, the meaning of "plurality" means at least two, for example, two, three, etc., unless specifically defined otherwise.
While embodiments of the present application have been shown and described above, it will be understood that the above embodiments are illustrative and not to be construed as limiting the application, and that variations, modifications, alternatives and variations may be made to the above embodiments by one of ordinary skill in the art within the scope of the application.

Claims (10)

1. An edit storage method of sequence data, the method comprising:
acquiring sequence data generated by any sequence generator;
performing initial editing on the sequence data to obtain an initial sequence, wherein the initial sequence comprises the numerical value and the number of the data;
the initial sequence is converted into a basic sequence according to a preset storage format, and the basic sequence is stored in a data memory, wherein the preset storage format comprises a first identification bit, a second identification bit, a third identification bit and a direct data area, the first identification bit is used for representing the type of storage data, the type comprises direct data and circulating data, the second identification bit is used for representing the numerical value of the circulating data, the third identification bit is used for representing the effective group number of the direct data when the first identification bit represents the type of storage data is the direct data, the direct data area is used for storing the direct data, and the third identification bit and the direct data area are integrated and used for representing the circulating times of the circulating data when the first identification bit represents the type of storage data is the circulating data.
2. The method for editing and storing sequence data according to claim 1, wherein said editing said sequence data to obtain an initial sequence comprises:
counting the number of the same numerical values when the same numerical values continuously appear in the sequence data;
and obtaining M initial sequences according to the same numerical value and the number thereof, wherein M is a positive integer.
3. The edit storage method of sequence data according to claim 2, wherein the data memory includes a plurality of memory areas, the converting the initial sequence into a base sequence according to a preset memory format, and storing the base sequence into the data memory, comprising:
aiming at the ith initial sequence, acquiring residual data of the ith-1 initial sequence, and splicing the residual data with the data in the ith initial sequence, wherein i is a positive integer greater than or equal to 2;
grouping the spliced data to obtain N groups of storage data, a basic sequence corresponding to each group of storage data and the residual data of an ith initial sequence, wherein the basic sequence comprises the value of the first identification bit, the value of the second identification bit, the value of the third identification bit and the numerical value of the direct data area, and N is an integer greater than or equal to 0;
determining N target storage areas according to N groups of storage data;
and storing the basic sequence into a corresponding target storage area.
4. The method for editing and storing sequence data according to claim 3, wherein said grouping the spliced data to obtain N groups of stored data and a basic sequence corresponding to each group of stored data, and remaining data of the i-th initial sequence, comprises:
calculating the difference value between the quantity of the spliced data and a first preset value to obtain a first difference value;
and grouping the spliced data according to the first difference value to obtain N groups of storage data, a basic sequence corresponding to each group of storage data and the residual data of the ith initial sequence.
5. The method for editing and storing sequence data according to claim 4, wherein said grouping the spliced data according to the first difference value to obtain N groups of stored data and a basic sequence corresponding to each group of stored data, and remaining data of an i-th initial sequence includes:
if the first difference value is smaller than 0, 0 groups of storage data are obtained, and the residual data of the ith initial sequence are determined to be the spliced data;
if the first difference value is equal to 0, the spliced data is used as a group of stored data, the group of stored data is determined to be direct data, the effective group number of the direct data is obtained, and the remaining data of the ith initial sequence is determined to be empty;
if the first difference value is larger than 0, taking the first preset value data in the spliced data as a group of stored data, determining the group of stored data as direct data, obtaining the effective group number of the direct data, and calculating the ratio of the first difference value to the second preset value to obtain a first ratio;
and grouping the rest spliced data according to the first ratio to obtain N-1 groups of storage data, the value of a first identification bit, the value of a second identification bit, the value of a third identification bit and the value of a direct data area corresponding to each group of storage data, and the rest data of an ith initial sequence.
6. The method for editing and storing sequence data according to claim 5, wherein said grouping remaining spliced data according to the first ratio to obtain N-1 sets of stored data and values of the first flag bit, the second flag bit, the third flag bit and the direct data area corresponding to each set of stored data, and remaining data of the i-th initial sequence includes:
if the first ratio is smaller than a target ratio threshold, 0 groups of storage data are obtained, and the residual data of the ith initial sequence are determined to be residual spliced data;
and if the first ratio is greater than or equal to the target ratio threshold, taking the remaining spliced data as a group of stored data, determining the group of stored data as cyclic data, obtaining the cyclic times of the cyclic data, and determining that the remaining data of the ith initial sequence is null.
7. The edit storage method of sequence data according to claim 6, wherein the basic sequence includes a value of the first flag bit, a value of the second flag bit, a value of the third flag bit, and a value of the direct data area, comprising:
if the type of the stored data is direct data, the first identification bit value of the basic sequence is the first value, the second identification bit value is null, the third identification bit value is the effective group number, and the numerical value of the direct data area is direct data;
and if the type of the stored data is the circulating data, the first identification bit of the target storage area is taken as a second identification bit, the second identification bit is taken as the numerical value of the circulating data, and the third identification bit and the direct data area are integrated and take the value as the circulating times of the circulating data.
8. The edit storage method of sequence data according to claim 7, wherein the first flag bit, the second flag bit, the third flag bit, and the direct data area have bit numbers of 1bit, 4bit, and 28bit, respectively.
9. A read-and-play method of sequence data, characterized in that the sequence data is stored to a data memory according to the edit storage method of sequence data according to any one of claims 1 to 8, the read-and-play method comprising:
acquiring a play sequence of the sequence data;
reading the stored data in the data memory according to the playing sequence;
storing the stored data into a first-in first-out FIFO (first-out FIFO) queue according to the type of the stored data;
and reading and playing the data in the FIFO queue.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory, characterized in that the computer program, when executed by the processor, implements the method of editing and storing sequence data according to any of claims 1-8.
CN202310924862.2A 2023-07-26 2023-07-26 Editing and storing method, reading and playing method and electronic equipment for sequence data Active CN116665836B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310924862.2A CN116665836B (en) 2023-07-26 2023-07-26 Editing and storing method, reading and playing method and electronic equipment for sequence data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310924862.2A CN116665836B (en) 2023-07-26 2023-07-26 Editing and storing method, reading and playing method and electronic equipment for sequence data

Publications (2)

Publication Number Publication Date
CN116665836A true CN116665836A (en) 2023-08-29
CN116665836B CN116665836B (en) 2023-10-27

Family

ID=87717365

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310924862.2A Active CN116665836B (en) 2023-07-26 2023-07-26 Editing and storing method, reading and playing method and electronic equipment for sequence data

Country Status (1)

Country Link
CN (1) CN116665836B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1271479A2 (en) * 2001-06-28 2003-01-02 STMicroelectronics, Inc. A data code and method for coding data
WO2007050018A1 (en) * 2005-10-24 2007-05-03 Algo Trim Ab Method and system for compressing data
US20100039300A1 (en) * 2008-08-13 2010-02-18 International Business Machines Corporation Lzw data compression algorithm
CN104813588A (en) * 2012-10-09 2015-07-29 阿尔卡特朗讯 Secure and lossless data compression
KR101652735B1 (en) * 2015-05-18 2016-08-31 김정훈 Binary data compression and restoration method and apparatus
CN110545106A (en) * 2019-08-06 2019-12-06 清华大学 Method and device for coding time series data
WO2021258512A1 (en) * 2020-06-22 2021-12-30 中科驭数(北京)科技有限公司 Data aggregation processing apparatus and method, and storage medium
US20220085827A1 (en) * 2020-09-15 2022-03-17 Fuji Electric Co., Ltd. Data compression method, data compression device, data decompression method, and data decompression device
CN115913248A (en) * 2022-10-20 2023-04-04 优存微电子(昆山)有限公司 Live broadcast software development data intelligent management system
CN116388769A (en) * 2023-06-06 2023-07-04 莱芜职业技术学院 Computer storage optimization method for environment detection data

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1271479A2 (en) * 2001-06-28 2003-01-02 STMicroelectronics, Inc. A data code and method for coding data
WO2007050018A1 (en) * 2005-10-24 2007-05-03 Algo Trim Ab Method and system for compressing data
US20100039300A1 (en) * 2008-08-13 2010-02-18 International Business Machines Corporation Lzw data compression algorithm
CN104813588A (en) * 2012-10-09 2015-07-29 阿尔卡特朗讯 Secure and lossless data compression
KR101652735B1 (en) * 2015-05-18 2016-08-31 김정훈 Binary data compression and restoration method and apparatus
CN110545106A (en) * 2019-08-06 2019-12-06 清华大学 Method and device for coding time series data
WO2021258512A1 (en) * 2020-06-22 2021-12-30 中科驭数(北京)科技有限公司 Data aggregation processing apparatus and method, and storage medium
US20220085827A1 (en) * 2020-09-15 2022-03-17 Fuji Electric Co., Ltd. Data compression method, data compression device, data decompression method, and data decompression device
CN115913248A (en) * 2022-10-20 2023-04-04 优存微电子(昆山)有限公司 Live broadcast software development data intelligent management system
CN116388769A (en) * 2023-06-06 2023-07-04 莱芜职业技术学院 Computer storage optimization method for environment detection data

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
BIN HUANG, YOU TAN: "Research on optimization of real-time efficient storage algorithm in data information serialization", 《PLOS ONE》 *
党引;吴?荣;李强;: "基于HBase的海量数据分布式序列存储策略优化", 自动化技术与应用, no. 08 *

Also Published As

Publication number Publication date
CN116665836B (en) 2023-10-27

Similar Documents

Publication Publication Date Title
US7500028B2 (en) DMA controller providing for ring buffer and rectangular block transfers
JP3188467B2 (en) Minimum / maximum value search device
JPS60146326A (en) Image conversion from bit map to run display
CN112380148A (en) Data transmission method and data transmission device
US11580055B2 (en) Devices for time division multiplexing of state machine engine signals
CN114676040A (en) Test coverage verification method and device and storage medium
JP4855864B2 (en) Direct memory access controller
US20190354380A1 (en) Systems and devices for accessing a state machine
CN116665836B (en) Editing and storing method, reading and playing method and electronic equipment for sequence data
CN112559392B (en) Method for accelerating reading of storage medium, reading acceleration hardware module and memory
CN115834027B (en) Message filling method, device, equipment and computer readable storage medium
CN112000589A (en) Data writing method, data reading device and electronic equipment
CN111143092A (en) Fault recording data processing method and system and terminal equipment
US6480912B1 (en) Method and apparatus for determining the number of empty memory locations in a FIFO memory device
WO2021237513A1 (en) Data compression storage system and method, processor, and computer storage medium
JP4212508B2 (en) Packet generator
US7467240B2 (en) Serial host interface generates index word that indicates whether operation is read or write operation
CN114070901A (en) Data sending and receiving method, device and equipment based on multi-data alignment
US7051183B2 (en) Circuit for recording digital waveform data and method of doing the same
CN117033270B (en) Chip, device and data processing method
CN111443891B (en) Variable-length merging and sorting implementation method for electric power internet of things data
US11983118B2 (en) Method and apparatus for parsing contiguous system addresses, and electronic device
CN116049032B (en) Data scheduling method, device and equipment based on ray tracing and storage medium
CN109861949B (en) Message filtering method and device and electronic equipment
CN112052189B (en) Memory device, electronic device and related reading method

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
CP01 Change in the name or title of a patent holder

Address after: 230088 floor 1-4, zone a, building E2, phase II, innovation industrial park, No. 2800, innovation Avenue, high tech Zone, Hefei, Anhui Province

Patentee after: Guoyi Quantum Technology (Hefei) Co.,Ltd.

Address before: 230088 floor 1-4, zone a, building E2, phase II, innovation industrial park, No. 2800, innovation Avenue, high tech Zone, Hefei, Anhui Province

Patentee before: Guoyi Quantum (Hefei) Technology Co.,Ltd.

CP01 Change in the name or title of a patent holder