A storage space adjustment method and device, electronic equipment and storage medium

By merging and adjusting the storage space of the TCSPC circuit, the problem of idle and wasted storage cells was solved, and the analysis accuracy of the time difference histogram was improved.

CN114895843BActive Publication Date: 2025-12-09SUZHOU SOPHOTON TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210321137.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-29
Publication Date
2025-12-09
Estimated Expiration
2042-03-29

AI Technical Summary

Technical Problem

Existing TCSPC circuits suffer from idle and wasted storage cells when storing time difference histograms, resulting in low accuracy of the time difference histograms.

Method used

By adjusting storage space, merging similar time difference intervals, and reducing the storage space of each group, the number of groups for the target difference interval is increased, thus optimizing the allocation of storage space.

Benefits of technology

Without increasing the total storage space, the accuracy and analysis precision of each group in the target difference interval are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114895843B_ABST
    Figure CN114895843B_ABST
Patent Text Reader

Abstract

The application discloses a storage space adjustment method and device, electronic equipment and storage medium. The method comprises the following steps: determining a set of merged difference value intervals and a target difference value interval from a reference difference value interval according to a set of to-be-processed time difference data; determining a group number sequence corresponding to each merged difference value interval, a storage space corresponding to each merged difference value interval, a group number sequence corresponding to the target difference value interval, and a storage space corresponding to the target difference value interval from a preset group number sequence; adjusting the storage space of each group corresponding to each merged difference value interval and the storage space of each group corresponding to the target difference value interval to obtain a released storage space; and adjusting the group number sequence corresponding to the target difference value interval based on the released storage space to obtain a target group number sequence corresponding to the target difference value interval, wherein the number of groups in the target group number sequence is greater than the number of groups in the group number sequence corresponding to the target difference value interval. The application can improve the accuracy of each group in the target difference value interval.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data processing, and in particular to a storage space adjustment method and device, an electronic device, and a storage medium. BACKGROUND

[0002] Time-correlated Single Photon Counting (TCSPC) technology is a technology for accurately measuring the time difference between two physical events, and is widely used in fields with extremely high requirements for time difference measurement accuracy, such as laser radar ranging. In actual applications, under the premise of keeping all experimental parameters the same, the time difference between two physical phenomena measured by TCSPC will be distributed around one or several characteristic values in the time domain due to errors and randomness. When the number of repeated measurements reaches a certain number, a distribution histogram of the measured time difference in the time domain can be obtained, which includes important data of the measured physical phenomenon and is an important basis for data post-processing.

[0003] When TCSPC is implemented in the form of a circuit, the time difference histogram is stored in the corresponding storage unit of the memory. The physical size of the memory determines its information storage capacity and the data size of the stored time difference histogram. A large amount of time difference histogram data can improve the time difference recording accuracy of the TCSPC circuit, obtain a wider data dynamic range, and prolong the maximum time difference recording time. Therefore, the storage size of the memory plays a decisive role in the performance of the TCSPC circuit.

[0004] The existing TCSPC circuit stores the time difference histogram by recording the time difference of the detected event according to the preset parameters during the operation of the TCSPC circuit. Since the time difference of the detected event may be widely distributed, the parameter settings of the distribution histogram also need to cover as wide a time domain as possible. However, in actual storage processes, the time difference of the detected event in a single TCSPC operation cycle is often concentrated around a single or several characteristic time difference values. The idle and waste of other storage units except the single or several characteristic time difference values result in low accuracy of the time difference histogram. SUMMARY

[0005] The embodiments of the present application provide a storage space adjustment method and device, an electronic device, and a storage medium, which can improve the accuracy of each group in the target difference value interval.

[0006] The embodiments of the present application provide a storage space adjustment method, which includes:

[0007] obtaining a to-be-processed time difference data set and a preset group number sequence; the storage space corresponding to each group in the preset group number sequence is equal;

[0008] determining, from the reference difference interval, a set of merged difference intervals and a target difference interval according to the set of time difference data to be processed;

[0009] determining, from the preset group number sequence, a group number sequence corresponding to each merged difference interval, a storage space of each group corresponding to each merged difference interval, a group number sequence corresponding to the target difference interval, and a storage space of each group corresponding to the target difference interval;

[0010] adjusting the storage space of each group corresponding to each merged difference interval and the storage space of each group corresponding to the target difference interval to obtain a released storage space;

[0011] adjusting the group number sequence corresponding to the target difference interval based on the released storage space to obtain a target group number sequence corresponding to the target difference interval; the number of groups in the target group number sequence is greater than the number of groups in the group number sequence corresponding to the target difference interval.

[0012] Further, adjusting the storage space of each group corresponding to each merged difference interval and the storage space of each group corresponding to the target difference interval to obtain a released storage space comprises:

[0013] adjusting the storage space of each group corresponding to each merged difference interval and the storage space of each group corresponding to the target difference interval to obtain a released storage space, a merged storage space of each group corresponding to each merged difference interval, and a target storage space of each group corresponding to the target difference interval;

[0014] wherein the merged storage space of each group corresponding to each merged difference interval is less than the storage space of each group corresponding to each merged difference interval, and the target storage space of each group corresponding to the target difference interval is less than the storage space of each group corresponding to the target difference interval.

[0015] Further, after determining the set of merged difference intervals and the target difference interval from the reference difference interval according to the set of time difference data to be processed, the method further comprises:

[0016] determining, from the preset group number sequence, a to-be-processed group number sequence corresponding to each merged difference interval and a to-be-processed group number sequence corresponding to the target difference interval;

[0017] adjusting the to-be-processed group number sequence corresponding to each merged difference interval and the to-be-processed group number sequence corresponding to the target difference interval to obtain the group number sequence corresponding to each merged difference interval and the group number sequence corresponding to the target difference interval;

[0018] The number of groups in the group number sequence corresponding to each merged difference interval is less than the number of groups in the group number sequence corresponding to each merged difference interval, the number of groups in the group number sequence corresponding to the target difference interval is less than the number of groups in the group number sequence corresponding to the target difference interval, and the storage space corresponding to the group number sequence corresponding to each merged difference interval is greater than the storage space corresponding to the group number sequence corresponding to each merged difference interval.

[0019] Further, the set of merged difference intervals and the target difference interval are determined from the reference difference intervals according to the set of to-be-processed time difference data, including:

[0020] According to the set of to-be-processed time difference data, the first merged difference interval, the target difference interval and the second merged difference interval are determined.

[0021] The number of to-be-processed time difference data corresponding to the first merged difference interval is less than a preset number threshold, the number of to-be-processed time difference data corresponding to the second merged difference interval is less than the preset number threshold, and the number of to-be-processed time difference data corresponding to the target difference interval is greater than or equal to the preset number threshold.

[0022] Further, the to-be-processed group number sequence corresponding to each merged difference interval and the to-be-processed group number sequence corresponding to the target difference interval are adjusted to obtain the group number sequence corresponding to each merged difference interval and the group number sequence corresponding to the target difference interval, including:

[0023] The first group number sequence corresponding to the first merged difference interval is obtained by taking the first two groups in the preset group number sequence as the first group number sequence.

[0024] The second group number sequence corresponding to the second merged difference interval is obtained by taking the last two groups in the preset group number sequence as the second group number sequence.

[0025] The group number sequence corresponding to the target difference interval is obtained by taking the groups in the preset group number sequence other than the first merged group number sequence and the second merged group number sequence as the group number sequence corresponding to the target difference interval.

[0026] Correspondingly, the embodiment of the application provides an adjustment device of storage space, including:

[0027] The acquisition module is configured to acquire a set of to-be-processed time difference data and a preset group number sequence, and the storage space corresponding to each group in the preset group number sequence is equal.

[0028] The first determination module is configured to determine a set of merged difference intervals and a target difference interval from reference difference intervals according to the set of to-be-processed time difference data.

[0029] The second determining module is configured to determine, from the preset group number sequence, a group number sequence corresponding to each merged difference value interval, a storage space of each group corresponding to each merged difference value interval, a group number sequence corresponding to the target difference value interval, and a storage space of each group corresponding to the target difference value interval.

[0030] The first adjusting module is configured to adjust the storage space of each group corresponding to each merged difference value interval and the storage space of each group corresponding to the target difference value interval to obtain a released storage space.

[0031] The second adjusting module is configured to adjust the group number sequence corresponding to the target difference value interval based on the released storage space to obtain a target group number sequence corresponding to the target difference value interval, wherein the number of groups in the target group number sequence is greater than the number of groups in the group number sequence corresponding to the target difference value interval.

[0032] Further, the first adjusting module is configured to adjust the storage space of each group corresponding to each merged difference value interval and the storage space of each group corresponding to the target difference value interval to obtain a released storage space, a merged storage space of each group corresponding to each merged difference value interval, and a target storage space of each group corresponding to the target difference value interval.

[0033] The merged storage space of each group corresponding to each merged difference value interval is less than the storage space of each group corresponding to each merged difference value interval, and the target storage space of each group corresponding to the target difference value interval is less than the storage space of each group corresponding to the target difference value interval.

[0034] Further, the device further comprises:

[0035] The third determining module is configured to, after determining the set of merged difference value intervals and the target difference value interval from the reference difference value interval according to the set of to-be-processed time difference data, determine, from the preset group number sequence, a to-be-processed group number sequence corresponding to each merged difference value interval and a to-be-processed group number sequence corresponding to the target difference value interval.

[0036] The third adjusting module is configured to adjust the to-be-processed group number sequence corresponding to each merged difference value interval and the to-be-processed group number sequence corresponding to the target difference value interval to obtain the group number sequence corresponding to each merged difference value interval and the group number sequence corresponding to the target difference value interval.

[0037] The number of groups in the to-be-processed group number sequence corresponding to each merged difference value interval is less than the number of groups in the group number sequence corresponding to each merged difference value interval, the number of groups in the to-be-processed group number sequence corresponding to the target difference value interval is less than the number of groups in the group number sequence corresponding to the target difference value interval, and the storage space corresponding to the group number sequence corresponding to each merged difference value interval is greater than the storage space corresponding to the to-be-processed group number sequence corresponding to each merged difference value interval.

[0038] Further, the first determining module is configured to determine a first merged difference interval, a target difference interval and a second merged difference interval according to the set of to-be-processed time difference data.

[0039] The number of to-be-processed time difference data corresponding to the first merged difference interval is less than a preset number threshold, the number of to-be-processed time difference data corresponding to the second merged difference interval is less than the preset number threshold, and the number of to-be-processed time difference data corresponding to the target difference interval is greater than or equal to the preset number threshold.

[0040] Further, the third adjusting module comprises:

[0041] The first merging submodule is configured to take two groups at the head of the preset group number sequence as a first group number sequence corresponding to the first merged difference interval.

[0042] The second merging submodule is configured to take two groups at the tail of the preset group number sequence as a second group number sequence corresponding to the second merged difference interval.

[0043] The third merging submodule is configured to take groups other than the first merged group number sequence and the second merged group number sequence in the preset group number sequence as a group number sequence corresponding to the target difference interval.

[0044] Correspondingly, an electronic device is also provided in the embodiments of the present application, and the electronic device comprises a processor and a memory. The memory stores at least one instruction, at least one program, a code set or an instruction set. The at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the above-mentioned storage space adjustment method.

[0045] Correspondingly, a computer readable storage medium is also provided in the embodiments of the present application. The storage medium stores at least one instruction, at least one program, a code set or an instruction set. The at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the above-mentioned storage space adjustment method.

[0046] The embodiments of the present application have the following beneficial effects:

[0047] This application discloses a method, apparatus, electronic device, and storage medium for adjusting storage space. The method includes acquiring a set of time difference data to be processed and a preset sequence of number of groups, where each group in the preset sequence of number of groups has equal storage space. Based on the set of time difference data to be processed, a set of merged difference intervals and a target difference interval are determined from a reference difference interval. Then, from the preset sequence of number of groups, the number of groups corresponding to each merged difference interval, the storage space of each group corresponding to each merged difference interval, the number of groups corresponding to the target difference interval, and the storage space of each group corresponding to the target difference interval are determined. The storage space of each group corresponding to each merged difference interval and the storage space of each group corresponding to the target difference interval are adjusted to release storage space. Furthermore, based on the released storage space, the number of groups corresponding to the target difference interval is adjusted to obtain a target number of groups corresponding to the target difference interval; the number of groups in the target number of groups is greater than the number of groups in the group number of the target difference interval. Based on the embodiments of this application, while retaining the observable time difference range of the reference difference interval, the accuracy of each group in the target difference interval can be improved by reducing the storage space of each group and freeing up storage space to increase the number of groups corresponding to the target difference interval. Attached Figure Description

[0048] To more clearly illustrate the technical solutions and advantages in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0049] Figure 1 This is a schematic diagram of an application environment provided by an embodiment of this application;

[0050] Figure 2 This is a schematic diagram of a static storage method using a TCSPC circuit;

[0051] Figure 3 This is a schematic diagram of another static storage method for TCSPC circuits;

[0052] Figure 4 This is a flowchart illustrating a method for adjusting storage space provided in an embodiment of this application;

[0053] Figure 5 This is a schematic diagram of a storage space adjustment method provided in an embodiment of this application. Figure 1 ;

[0054] Figure 6 This is a schematic diagram of a storage space adjustment method provided in an embodiment of this application. Figure 2 ;

[0055] Figure 7 This is a schematic diagram of a storage space adjustment device provided in an embodiment of this application. Detailed Implementation

[0056] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings. Obviously, the described embodiments are merely one embodiment of this application, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0057] The term "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of this application. In the description of the embodiments of this application, it should be understood that the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first," "second," and "third" may explicitly or implicitly include one or more of that feature. Furthermore, the terms "first," "second," and "third," etc., are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. In addition, the terms "comprising," "having," and "being," and any variations thereof, are intended to cover non-exclusive inclusion.

[0058] Please see Figure 1 The diagram illustrates an application environment provided by an embodiment of this application, including a processor that may be equipped with a time-single-photon counting circuit. The logic processing circuit within the time-single-photon counting circuit acquires a set of time difference data to be processed and a preset group sequence. Each group in the preset group sequence has equal storage space. Based on the set of time difference data to be processed, a set of merged difference intervals and a target difference interval are determined from a reference difference interval. Then, from the preset group sequence, the group sequence corresponding to each merged difference interval, the storage space for each group corresponding to each merged difference interval, the group sequence corresponding to the target difference interval, and the storage space for each group corresponding to the target difference interval are determined. The storage spaces for each group corresponding to each merged difference interval and the target difference interval are adjusted to release storage space. Furthermore, based on the released storage space, the group sequence corresponding to the target difference interval is adjusted to obtain a target group sequence corresponding to the target difference interval; the number of groups in the target group sequence is greater than the number of groups in the group sequence corresponding to the target difference interval.

[0059] In the embodiment of the present application, under the premise of reserving the observable time difference range of the reference difference value interval, the storage space of each group is reduced to release the storage space and increase the number of groups corresponding to the target difference value interval, so that the accuracy of each group in the target difference value interval can be improved.

[0060] Figure 2 It is a schematic diagram of a static storage method of a TCSPC circuit. The storage space with a fixed size of M×K bits in the static storage is divided into M groups to obtain a preset group number sequence, each group uses K bits of storage space to obtain the corresponding storage space of each group. The preset group number sequence and the corresponding storage space of each group in the preset group number sequence constitute a time difference distribution histogram. The storage space of each group needs to accommodate the maximum number of "events" that can be expected to occur within each group. Under the premise of fixed total storage space, the number of groups M depends on the value of the storage space K of each group. In order to meet the accuracy requirements of the test, the accuracy corresponding to each group, i.e. the time difference interval length covered by each group, can be set in advance, and then the reference difference value interval of the TCSPC circuit, i.e. the observable time difference range, can be calculated, which is 0~t max . Wherein, t max =M×dt, t max represents the maximum time difference value. The observable time difference range can also be set in advance as 0~t max , and then the accuracy corresponding to each group, i.e. the time difference interval length covered by each group, can be calculated, which is dt=t max / M.

[0061] In the data storage process of the TCSPC circuit, due to the influence of many factors such as signal noise and physical phenomenon instability, there will be a certain background noise in the time difference interval corresponding to each group in the preset group number sequence. In a specific application scenario, the signal strength of the background noise, i.e. the number of "events" occurring in a unit time difference interval, is fixed, such as Figure 2 , each group uses Q bits of storage space to store the background noise, i.e. the strength of the background noise is less than or equal to Q. When the TCSPC circuit detects a real signal, its signal strength is often much greater than the signal strength of the background noise. At this time, in a relatively narrow time difference interval, such as in Figure 2 , the signal strength begins to increase significantly at time difference value t1 and continues to fall to the strength of the background noise at time difference value t2. Wherein, time difference values t1 to t2 correspond to N+1 to N+P groups of the time difference distribution histogram, if the accuracy corresponding to each group, i.e. the time difference interval length covered by each group, is dt, t2=t1+P×dt can be calculated.

[0062] Based on the static storage method of the TCSPC circuit in the foregoing, the time difference of the detected "events" can be stored in the time difference distribution histogram. However, in the actual storage process, the case of P << M often occurs, causing more groups of M-P corresponding storage spaces in the memory to be used to store background noise, and fewer groups of P corresponding storage spaces to be used to store real signals. That is, in a single TCSPC operation cycle, the time difference of the detected "events" is often concentrated around a single or several characteristic time difference values, which will cause the idle and waste of the storage units other than the single or several characteristic time difference values.

[0063] To solve the problem of the static storage method of the TCSPC circuit, Figure 2 the static storage method of the TCSPC circuit, Figure 3 is another schematic diagram of the static storage method of the TCSPC circuit. In the initial stage of a single TCSPC operation cycle, the TCSPC circuit still follows Figure 2 the static storage method. Then, the single or several characteristic time difference values in the effective signal set are readjusted according to the set of time difference data to be processed, so as to readjust the time difference distribution histogram. For example, when it is determined that the effective signal set is concentrated in the target difference value interval t1-t2, the reference difference value interval 0-t Figure 2 in the time difference distribution histogram of the example can be adjusted to max the target difference value interval t1-t2 in the time difference distribution histogram of the example. Figure 3

[0064] Since Figure 2 the number of groups in the preset group number sequence M and the corresponding storage space K of each group in the time difference distribution histogram of the example are the same as Figure 3 the number of groups in the preset group number sequence M and the corresponding storage space K of each group in the time difference distribution histogram of the example. That is, the number of groups in the preset group number sequence M and the corresponding storage space K of each group before and after the adjustment do not change, and the accuracy of each group in the target difference value interval, that is, the time difference interval length dt'=(t2-t1) / M covered by each group, is higher than the accuracy of each group in the target difference value interval before the adjustment, that is, the time difference interval length dt=t max / M. Since t2-t1<<M, dt'<<dt, that is, the accuracy of each group can be improved. Therefore, in the case of the same total storage space, the original reference difference value interval 0-t max is adjusted to t1-t2, and the analysis accuracy of the effective signal can be improved.

[0065] The following describes a specific embodiment of the storage space, Figure 4 is a flowchart of the adjustment method of the storage space provided in the embodiment of the application, Figure 5 is a schematic diagram of the adjustment method of the storage space provided in the embodiment of the application Figure 1 ​, Figure 6 is a storage space adjustment method provided by an embodiment of the present application Figure 2 The present specification provides method operation steps as shown in the embodiments or flowcharts, but more or fewer operation steps can be included based on conventional or non-inventive labor. The order of steps listed in the embodiments is only one of the many execution orders, and does not represent the only execution order. In actual execution, the method order shown in the embodiments or the drawings can be executed in sequence or in parallel (for example, in a parallel processor or multi-thread processing environment).

[0066] Specifically as shown in 1, 2, 3, 4, 5 and 6, the adjustment method can include: Figure 2 、 4

[0067] S401: Obtain a set of to-be-processed time difference data and a preset group number sequence; the storage space corresponding to each group in the preset group number sequence is equal.

[0068] In the embodiments of the present application, the logic processing circuit in the TCSPC circuit can obtain a set of to-be-processed time difference data and a preset group number sequence M. Each group in the preset group number sequence M can use K bits of storage space. Alternatively, the preset group number sequence can be bin 1, bin2...binM in Figure 2 .

[0069] S403: According to the set of to-be-processed time difference data, determine a set of merged difference value intervals and a target difference value interval from the reference difference value interval.

[0070] In the embodiments of the present application, when a single TCSPC operation cycle is performed, the logic processing circuit can determine, according to the distribution of the set of to-be-processed time difference data in the time difference distribution histogram, a difference value interval corresponding to the to-be-processed time difference data in the reference difference value interval 0~t max with a number less than a preset number threshold as a merged difference value interval, and a difference value interval corresponding to the to-be-processed time difference data in the reference difference value interval 0~t max with a number greater than or equal to the preset number threshold as a target difference value interval.

[0071] In an alternative embodiment, a first merged difference value interval, a target difference value interval and a second merged difference value interval can be determined according to the set of to-be-processed time difference data. The number of to-be-processed time difference data corresponding to the first merged difference value interval is less than a preset number threshold, the number of to-be-processed time difference data corresponding to the second merged difference value interval is less than a preset number threshold, and the number of to-be-processed time difference data corresponding to the target difference value interval is greater than or equal to the preset number threshold. Alternatively, the first merged difference value interval can be 0~t1 in Figure 2 , and the second merged difference value interval can be t2~t Figure 2 in.max The target difference interval can be Figure 5 t1~t2 in the reference difference interval.

[0072] S405: Determine, from the preset group number sequence, a group number sequence corresponding to each merged difference interval, a storage space of each group corresponding to each merged difference interval, a group number sequence corresponding to the target difference interval, and a storage space of each group corresponding to the target difference interval.

[0073] In the embodiments of the present application, after determining the set of merged difference intervals and the target difference interval from the reference difference interval, the group number sequence to be processed corresponding to each merged difference interval and the group number sequence to be processed corresponding to the target difference interval can be determined from the preset group number sequence, and the group number sequence to be processed corresponding to each merged difference interval and the group number sequence to be processed corresponding to the target difference interval are adjusted to obtain the group number sequence corresponding to each merged difference interval and the group number sequence corresponding to the target difference interval. The number of groups in the group number sequence to be processed corresponding to each merged difference interval is less than the number of groups in the group number sequence corresponding to each merged difference interval, the number of groups in the group number sequence to be processed corresponding to the target difference interval is less than the number of groups in the group number sequence corresponding to the target difference interval, and the storage space corresponding to the group number sequence corresponding to each merged difference interval is greater than the storage space corresponding to the group number sequence to be processed corresponding to each merged difference interval.

[0074] Figure 1 is a schematic diagram of a storage space management method provided by the embodiments of the present application Figure 2 In an optional implementation, the first two groups in the head of the preset group number sequence can be used as the first group number sequence corresponding to the first merged difference interval, the last two groups in the tail of the preset group number sequence can be used as the second group number sequence corresponding to the second merged difference interval, and the groups in the preset group number sequence other than the first merged group number sequence and the second merged group number sequence can be used as the group number sequence corresponding to the target difference interval. That is, the groups bin1 and bin2 in Figure 5 can be merged to obtain the first merged group number sequence bin1 in Figure 2 , and the groups binM-1 and binM in Figure 5 can be merged to obtain the second merged group number sequence binM-2 in Figure 5 .

[0075] Since the first two groups in the preset group number sequence are taken as the first merged group number sequence corresponding to the first merged difference interval, and the last two groups in the preset group number sequence are taken as the second merged group number sequence corresponding to the second merged difference interval, the sum of the number of groups in the first merged group number sequence, the number of groups in the second merged group number sequence, and the number of groups in the target group number sequence is M-2, which is less than the number of groups in the preset group number sequence M. Moreover, since the size of the storage space exponentially increases with the corresponding number of bits, doubling the number of bits is often enough to cover the required storage space. Therefore, Figure 2 the storage space corresponding to bin 1 in the first merged group number sequence bin 1 is greater than Figure 2 the storage space corresponding to bin 1 in the first merged group number sequence bin 1, the storage space corresponding to bin M-2 in the second merged group number sequence bin M-2 is greater than Figure 5 the storage space corresponding to bin M in the second merged group number sequence bin M, and Figure 2 the number of groups corresponding to the target group number sequence bin 2~bin M-3 in the first merged group number sequence bin 1 is greater than Figure 5 the number of groups corresponding to the target group number sequence bin 2~bin N+P in the first merged group number sequence bin 1.

[0076] Since the total storage space is constant, Figure 2 the precision corresponding to each group in the target difference interval t1~t2, that is, the time difference interval length dt”=t max / (M-2) is much smaller than Figure 3 the precision corresponding to each group in the target difference interval t1~t2, that is, the time difference interval length dt=t max / M, that is, dt”<<dt, which is much smaller than Figure 5 the precision corresponding to each group in the target difference interval t1~t2, that is, the time difference interval length dt’ is almost equal to dt”, that is, dt”≈dt’. Therefore, under the condition that the total storage space is constant, the analysis precision of the effective signal can be improved.

[0077] S407: adjusting the storage space of each group corresponding to each merged difference interval and the storage space of each group corresponding to the target difference interval to obtain the released storage space.

[0078] Since the precision corresponding to each group, that is, the time difference interval length dt”<<dt, it can be predicted that the maximum number of events occurring in each group will also be reduced. If each group still uses K bits of storage space, it will cause waste of storage space. Therefore, after determining the group number sequence corresponding to each merged difference interval, the storage space of each group corresponding to each merged difference interval, the group number sequence corresponding to the target difference interval, and the storage space of each group corresponding to the target difference interval, the storage space of each group corresponding to each merged difference interval and the storage space of each group corresponding to the target difference interval can be adjusted to obtain the released storage space.

[0079] In one optional implementation, the storage space of each group corresponding to each merge difference interval and the storage space of each group corresponding to the target difference interval can be adjusted to obtain the released storage space, the merged storage space of each group corresponding to each merge difference interval, and the target storage space of each group corresponding to the target difference interval; wherein, the merged storage space of each group corresponding to each merge difference interval is smaller than the storage space of each group corresponding to each merge difference interval, and the target storage space of each group corresponding to the target difference interval is smaller than the storage space of each group corresponding to the target difference interval. Optionally, it can be obtained from... Figure 5 In the example, the storage space for each group is reduced from K bits to K-1 bits, resulting in freed storage space. The reduction from K bits to K-1 bits is merely a specific value listed in this embodiment; other values ​​are possible and are not specifically limited in this embodiment.

[0080] S409: Adjust the number of groups corresponding to the target difference interval based on the released storage space to obtain the target number of groups corresponding to the target difference interval; the number of groups in the target number of groups is greater than the number of groups in the number of groups corresponding to the target difference interval.

[0081] In this embodiment, after obtaining the released storage space, the number of groups corresponding to the target difference interval can be adjusted based on the released storage space to obtain the target number of groups corresponding to the target difference interval. The number of groups in the target number of groups sequence is greater than the number of groups in the number of groups corresponding to the target difference interval.

[0082] In one alternative implementation, the freed storage space can be used to increase... Figure 6 The number of groups within the target difference interval t1 to t2 is obtained as follows: Figure 7 The example shows the target group sequence corresponding to the target difference interval t1~t2, which is to increase the group sequence bin2, bin2...binM-3 corresponding to the target difference interval to bin2, bin2...binJ-1, where J-1 >> M-3. Thus, the accuracy of each group in the target difference interval is equal to the length of the time difference interval covered by each group, dt* < dt. In other words, by feature-enhancing the group sequence corresponding to the target difference interval based on the released storage space, the accuracy of each group in the target difference interval can be further improved.

[0083] By using the storage space adjustment method provided in the embodiments of this application, while preserving the reference difference range, which is the observable time difference range, the storage space of each group is reduced to free up storage space and increase the number of groups corresponding to the target difference range, thereby improving the accuracy of each group in the target difference range.

[0084] This application also provides a storage space adjustment device in its embodiments.Figure 7 is a structural schematic diagram of a storage space adjustment device provided by an embodiment of the present application, as shown in the figure, the device can include: ​

[0085] The acquisition module 701 is configured to acquire a to-be-processed time difference data set and a preset group number sequence; the storage space of each group corresponding to the preset group number sequence is equal;

[0086] The first determination module 703 is configured to determine, from the reference difference value interval, a set of merged difference value intervals and a target difference value interval according to the to-be-processed time difference data set;

[0087] The second determination module 705 is configured to determine, from the preset group number sequence, a group number sequence corresponding to each merged difference value interval, a storage space of each group corresponding to each merged difference value interval, a group number sequence corresponding to the target difference value interval, and a storage space of each group corresponding to the target difference value interval;

[0088] The first adjustment module 707 is configured to adjust the storage space of each group corresponding to each merged difference value interval and the storage space of each group corresponding to the target difference value interval to obtain a released storage space;

[0089] The second adjustment module 709 is configured to adjust the group number sequence corresponding to the target difference value interval based on the released storage space to obtain a target group number sequence corresponding to the target difference value interval; the number of groups in the target group number sequence is greater than the number of groups in the group number sequence corresponding to the target difference value interval.

[0090] In the embodiment of the present application, the first adjustment module is configured to adjust the storage space of each group corresponding to each merged difference value interval and the storage space of each group corresponding to the target difference value interval to obtain a released storage space, a merged storage space of each group corresponding to each merged difference value interval, and a target storage space of each group corresponding to the target difference value interval;

[0091] In the embodiment of the present application, the first adjustment module is configured to adjust the storage space of each group corresponding to each merged difference value interval and the storage space of each group corresponding to the target difference value interval to obtain a released storage space, a merged storage space of each group corresponding to each merged difference value interval, and a target storage space of each group corresponding to the target difference value interval;

[0092] In the embodiment of the present application, the device further includes:

[0093] The third determination module is configured to, after determining, from the reference difference value interval, a set of merged difference value intervals and a target difference value interval according to the to-be-processed time difference data set, determine, from the preset group number sequence, a to-be-processed group number sequence corresponding to each merged difference value interval and a to-be-processed group number sequence corresponding to the target difference value interval;

[0094] ​a third adjusting module, configured to adjust the to-be-processed group number sequence corresponding to each merged difference interval and the to-be-processed group number sequence corresponding to the target difference interval, to obtain a group number sequence corresponding to each merged difference interval and a group number sequence corresponding to the target difference interval;

[0095] In the embodiment of the application, the number of groups in the to-be-processed group number sequence corresponding to each merged difference interval is less than the number of groups in the group number sequence corresponding to each merged difference interval, the number of groups in the to-be-processed group number sequence corresponding to the target difference interval is less than the number of groups in the group number sequence corresponding to the target difference interval, and the storage space corresponding to the group number sequence corresponding to each merged difference interval is greater than the storage space corresponding to the to-be-processed group number sequence corresponding to each merged difference interval.

[0096] In the embodiment of the application, the first determining module is configured to determine the first merged difference interval, the target difference interval and the second merged difference interval according to the to-be-processed time difference data set.

[0097] In the embodiment of the application, the number of to-be-processed time difference data corresponding to the first merged difference interval is less than the preset number threshold, the number of to-be-processed time difference data corresponding to the second merged difference interval is less than the preset number threshold, and the number of to-be-processed time difference data corresponding to the target difference interval is greater than or equal to the preset number threshold.

[0098] In the embodiment of the application, the third adjusting module comprises:

[0099] The first merging submodule is configured to take the first two groups in the head of the preset group number sequence as the first group number sequence corresponding to the first merged difference interval.

[0100] The second merging submodule is configured to take the last two groups in the tail of the preset group number sequence as the second group number sequence corresponding to the second merged difference interval.

[0101] The third merging submodule is configured to take the groups in the preset group number sequence other than the first merged group number sequence and the second merged group number sequence as the group number sequence corresponding to the target difference interval.

[0102] The device and the method embodiment in the embodiment of the application are based on the same application concept.

[0103] The adjusting device for storage space provided in the embodiment of the application can increase the number of groups corresponding to the target difference interval by releasing storage space through reducing the storage space of each group on the premise of reserving the time difference range that can be observed in the reference difference interval, so that the accuracy of each group in the target difference interval can be improved.

[0104] The electronic device can be arranged in a server to save at least one instruction, at least one program, a code set or an instruction set related to the storage space adjustment method, which is loaded and executed by the memory to implement the above-mentioned storage space adjustment method.

[0105] The storage medium can be arranged in a server to save at least one instruction, at least one program, a code set or an instruction set related to the storage space adjustment method, which is loaded and executed by the processor to implement the above-mentioned storage space adjustment method.

[0106] Optionally, in the embodiment, the storage medium can be located in at least one of the plurality of network servers of the computer network. Alternatively, in the embodiment, the storage medium can include, but is not limited to, a variety of storage media capable of storing program codes, such as a U disk, a read-only memory (ROM), a mobile hard disk, a magnetic disk or an optical disk.

[0107] It can be seen from the above embodiments of the storage space adjustment method, device, electronic device and storage medium provided by the present application that the method in the present application includes obtaining a to-be-processed time difference data set and a preset group number sequence, the storage space of each group corresponding to the preset group number sequence is equal, and a merged difference value interval set and a target difference value interval are determined from the reference difference value interval according to the to-be-processed time difference data set. Then, the group number sequence corresponding to each merged difference value interval, the storage space of each group corresponding to each merged difference value interval, the group number sequence corresponding to the target difference value interval and the storage space of each group corresponding to the target difference value interval are determined from the preset group number sequence, and the storage space of each group corresponding to each merged difference value interval and the storage space of each group corresponding to the target difference value interval are adjusted to obtain a released storage space. Further, the group number sequence corresponding to the target difference value interval is adjusted based on the released storage space to obtain a target group number sequence corresponding to the target difference value interval, and the number of groups in the target group number sequence is greater than the number of groups in the group number sequence corresponding to the target difference value interval. Based on the present application, the number of groups corresponding to the target difference value interval can be increased by reducing the storage space of each group to obtain a released storage space while retaining the time difference range that can be observed in the reference difference value interval, which can improve the accuracy of each group in the target difference value interval.

[0108] In the present application, unless otherwise explicitly specified and limited, the terms "connected", "connected", and the like should be understood in a broad sense, for example, it can be fixedly connected, or it can be detachably connected, or it can be integrated; it can be mechanically connected, or it can be electrically connected; it can be directly connected, or it can be indirectly connected through an intermediate medium; it can be the connection between two elements or the interaction relationship between two elements. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.

[0109] It should be noted that the above sequence of the embodiments of the present application is only for description, not representing the advantages and disadvantages of the embodiments, and the above description of the present application is for specific embodiments, and other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be executed in different orders in different embodiments and can achieve the expected results. In addition, the processes depicted in the drawings do not necessarily require a specific order or connection order to achieve the desired results, and in some embodiments, multiple tasks can be processed in parallel or it can be advantageous.

[0110] Each embodiment in the present specification is described in a progressive manner, and the same or similar parts between each embodiment can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the embodiment of the device, since it is based on the similar method embodiment, the description is relatively simple, and the relevant parts can be referred to the part of the method embodiment.

[0111] The above is the preferred embodiment of the present application. It should be noted that for those skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, which are also considered within the scope of protection of the present application.

Claims

1. A method of adjusting a storage space, characterized by, The method comprises: acquiring a to-be-processed time difference data set and a preset group number sequence; a storage space corresponding to each group in the preset group number sequence is equal; The preset group number sequence is a sequence obtained by dividing the storage space of the static memory into M groups, the preset group number sequence and the storage space corresponding to each group in the preset group number sequence constitute a time difference distribution histogram, and the length of the time difference interval corresponding to each group is the maximum time difference value t of the reference difference interval max The ratio of M to the reference difference interval is the maximum time difference value t of the observable time difference range 0-t max The time difference data to be processed in the time difference data set to be processed represent the time difference of the detected event recorded when the TCSPC circuit operates. determining a merged difference interval set and a target difference interval from the reference difference interval according to the to-be-processed time difference data set; the merged difference interval set is a difference interval in the reference difference interval, in which the number of corresponding to-be-processed time difference data is less than a preset number threshold; the target difference interval is a difference interval in the reference difference interval, in which the number of corresponding to-be-processed time difference data is greater than or equal to the preset number threshold; determining, from the preset group number sequence, a group number sequence corresponding to each merged difference interval, a storage space of each group corresponding to each merged difference interval, a group number sequence corresponding to the target difference interval, and a storage space of each group corresponding to the target difference interval; adjusting the storage space of each group corresponding to each merged difference interval and the storage space of each group corresponding to the target difference interval to obtain a released storage space; the released storage space refers to a storage space saved by reducing the storage space of each group in the merged difference interval and the target difference interval; adjusting the group number sequence corresponding to the target difference interval based on the released storage space to obtain a target group number sequence corresponding to the target difference interval; the number of groups in the target group number sequence is greater than the number of groups in the group number sequence corresponding to the target difference interval.

2. The method of claim 1, wherein, The adjusting of the storage space of each group corresponding to each merged difference interval and the storage space of each group corresponding to the target difference interval to obtain a released storage space comprises: adjusting the storage space of each group corresponding to each merged difference interval and the storage space of each group corresponding to the target difference interval to obtain the released storage space, a merged storage space of each group corresponding to each merged difference interval, and a target storage space of each group corresponding to the target difference interval; wherein the merged storage space of each group corresponding to each merged difference interval is less than the storage space of each group corresponding to each merged difference interval, and the target storage space of each group corresponding to the target difference interval is less than the storage space of each group corresponding to the target difference interval.

3. The method of claim 1, wherein, After the determining of the merged difference interval set and the target difference interval from the reference difference interval according to the to-be-processed time difference data set, the method further comprises: determining, from the preset group number sequence, a to-be-processed group number sequence corresponding to each merged difference interval and a to-be-processed group number sequence corresponding to the target difference interval; adjusting the to-be-processed group number sequence corresponding to each merged difference interval and the to-be-processed group number sequence corresponding to the target difference interval to obtain the group number sequence corresponding to each merged difference interval and the group number sequence corresponding to the target difference interval; The number of groups in the group number sequence corresponding to each of the merged difference value intervals is less than the number of groups in the group number sequence corresponding to each of the merged difference value intervals, the number of groups in the group number sequence corresponding to the target difference value interval is less than the number of groups in the group number sequence corresponding to the target difference value interval, and the storage space corresponding to the group number sequence corresponding to each of the merged difference value intervals is greater than the storage space corresponding to the group number sequence corresponding to each of the merged difference value intervals.

4. The method of claim 3, wherein, The method comprises the following steps: According to the set of to-be-processed time difference data, a set of merged difference value intervals and a target difference value interval are determined from a reference difference value interval. According to the set of to-be-processed time difference data, a first merged difference value interval, the target difference value interval and a second merged difference value interval are determined.

5. The method of claim 4, wherein, The number of to-be-processed time difference data corresponding to the first merged difference value interval is less than a preset number threshold, the number of to-be-processed time difference data corresponding to the second merged difference value interval is less than the preset number threshold, and the number of to-be-processed time difference data corresponding to the target difference value interval is greater than or equal to the preset number threshold. The method comprises the following steps: The first two groups at the head of the preset group number sequence are taken as a first merged group number sequence corresponding to the first merged difference value interval. The last two groups at the tail of the preset group number sequence are taken as a second merged group number sequence corresponding to the second merged difference value interval.

6. An adjustment device for a storage space, characterized in that The groups in the preset group number sequence other than the first merged group number sequence and the second merged group number sequence are taken as a group number sequence corresponding to the target difference value interval. The method comprises the following steps: An acquisition module is configured to acquire a set of to-be-processed time difference data and a preset group number sequence. The preset group number sequence is a sequence obtained by dividing the storage space of the static memory into M groups, the preset group number sequence and the storage space corresponding to each group in the preset group number sequence constitute a time difference distribution histogram, and the length of the time difference interval corresponding to each group is the maximum time difference value t of the reference difference interval max The ratio of M to the reference difference interval is the maximum time difference value t of the observable time difference range 0-t max The to-be-processed time difference data in the to-be-processed time difference data set represent the time difference of the detected event recorded when the TCSPC circuit is running. The storage space corresponding to each group in the preset group number sequence is equal. A first determination module is configured to determine a set of merged difference value intervals and a target difference value interval from a reference difference value interval according to the set of to-be-processed time difference data. The set of merged difference value intervals are difference value intervals in the reference difference value interval, the number of to-be-processed time difference data corresponding to which is less than a preset number threshold. The target difference value interval is a difference value interval in the reference difference value interval, the number of to-be-processed time difference data corresponding to which is greater than or equal to the preset number threshold. A second determination module is configured to determine, from the preset group number sequence, a group number sequence corresponding to each of the merged difference value intervals, the storage space of each group corresponding to each of the merged difference value intervals, a group number sequence corresponding to the target difference value interval and the storage space of each group corresponding to the target difference value interval. A first adjustment module is configured to adjust the storage space of each group corresponding to each of the merged difference value intervals and the storage space of each group corresponding to the target difference value interval, to obtain released storage space; the released storage space refers to storage space saved by reducing the storage space of each group in the merged difference value intervals and the target difference value interval. The second adjusting module is configured to adjust the group number sequence corresponding to the target difference interval based on the released storage space, to obtain a target group number sequence corresponding to the target difference interval; and the number of groups in the target group number sequence is greater than the number of groups in the group number sequence corresponding to the target difference interval.

7. The apparatus of claim 6, wherein, The first adjusting module is configured to adjust the storage space of each group corresponding to the each merged difference interval and the storage space of each group corresponding to the target difference interval, to obtain the released storage space, the merged storage space of each group corresponding to the each merged difference interval, and the target storage space of each group corresponding to the target difference interval. The apparatus further comprises:

8. The apparatus of claim 6, wherein, The third determining module is configured to, after determining the merged difference interval set and the target difference interval from the reference difference interval based on the to-be-processed time difference data set, determine, from the preset group number sequence, the to-be-processed group number sequence corresponding to the each merged difference interval and the to-be-processed group number sequence corresponding to the target difference interval. The third adjusting module is configured to adjust the to-be-processed group number sequence corresponding to the each merged difference interval and the to-be-processed group number sequence corresponding to the target difference interval, to obtain the group number sequence corresponding to the each merged difference interval and the group number sequence corresponding to the target difference interval. The number of groups in the to-be-processed group number sequence corresponding to the each merged difference interval is less than the number of groups in the group number sequence corresponding to the each merged difference interval, the number of groups in the to-be-processed group number sequence corresponding to the target difference interval is less than the number of groups in the group number sequence corresponding to the target difference interval, and the storage space corresponding to the group number sequence corresponding to the each merged difference interval is greater than the storage space corresponding to the to-be-processed group number sequence corresponding to the each merged difference interval.

9. The apparatus of claim 8, wherein, The first determining module is configured to determine a first merged difference interval, the target difference interval, and a second merged difference interval based on the to-be-processed time difference data set. The number of to-be-processed time difference data corresponding to the first merged difference interval is less than a preset number threshold, the number of to-be-processed time difference data corresponding to the second merged difference interval is less than the preset number threshold, and the number of to-be-processed time difference data corresponding to the target difference interval is greater than or equal to the preset number threshold. The third adjusting module comprises:

10. The apparatus of claim 9, wherein, A first merging submodule is configured to take two groups at the head of the preset group number sequence as a first merged group number sequence corresponding to the first merged difference interval. A second merging submodule is configured to take two groups at the tail of the preset group number sequence as a second merged group number sequence corresponding to the second merged difference interval. ​ A third merging sub-module is configured to take the groups in the preset group number sequence except the first merging group number sequence and the second merging group number sequence as the group number sequence corresponding to the target difference interval.

11. An electronic device, comprising: The electronic device includes a processor and a memory, and the memory stores at least one instruction, at least one program, a code set or an instruction set, which are loaded and executed by the processor to implement the storage space adjustment method of any one of claims 1-5.

12. A computer-readable storage medium, characterized in that, The storage medium stores at least one instruction, at least one program, a code set or an instruction set, which are loaded and executed by the processor to implement the storage space adjustment method of any one of claims 1-5.

Citation Information

Patent Citations

  • System and method for time-coded time-of-flight distance measurement

    CN110632578A

  • Method and device for processing a time sequence based on dimensionality reduction

    US20140297606A1