Method and device for acquiring shutdown purging data of electric pile and medium

By extracting the key data of the stack shutdown purge from the full amount of data and performing hierarchical label separation, the problems of low data extraction efficiency and insufficient accuracy in the existing technology are solved, and the modeling accuracy and accuracy of the stack shutdown purge model are improved. Low temperature starting consistency.

CN118626446APending Publication Date: 2024-09-10DONGFENG MOTOR GRP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410736359.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-07
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

In the existing technology, the extraction efficiency of stack purge data during shutdown is low and there are redundancies and errors, which affects the modeling accuracy.

Method used

By extracting the key data of the stack shutdown purge stage from the full data sub-folder, the layered labels are determined based on the preset layering threshold, and the data is extracted layered to separate the flow channel, gas diffusion layer and proton exchange Membrane purge data set.

Benefits of technology

It improves the accuracy and efficiency of data extraction, enhances the modeling accuracy of the subsequent stack shutdown purge model, and optimizes the consistency during low-temperature startup and operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118626446A
    Figure CN118626446A
Patent Text Reader

Abstract

The invention provides a method for acquiring shutdown purging data of an electric pile. The method comprises the following steps: extracting key purging data corresponding to a shutdown purging stage of the electric pile from each full data sub-folder; determining layering labels for all the key purging data according to a layering threshold value; performing layered extraction on the key purge data based on a layered label to obtain a purge data set in a runner purge stage, a purge data set in a gas diffusion layer purge stage and a purge data set in a proton exchange membrane purge stage; therefore, a large amount of interference data may exist in the total data in the shutdown purging stage of the stack, so that the key purging data is extracted from the total data sub-folder, and the data precision is improved; besides, in the shutdown purging process of the galvanic pile, the impedance of the galvanic pile is obviously layered along with the change of purging time and the change of time, so that after the key purging data is subjected to layered extraction, the modeling of a subsequent shutdown purging model of the galvanic pile is facilitated, and the modeling precision is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of shutdown purge of a fuel cell stack, and in particular to a method, a device and a medium for acquiring shutdown purge data of a fuel cell stack. Background Art

[0002] The significance of the research on stack shutdown purge is to improve the low-temperature startup performance of the fuel cell and the consistency during operation.

[0003] Specifically, in order to avoid excessive water remaining in the fuel cell after the stack is shut down, it is necessary to purge the stack when it is shut down to prevent the fuel cell from failing to start due to a large amount of ice inside the battery at the next startup. Stack shutdown purge is the main means to control the initial water content of the fuel cell during low-temperature cold start. By studying the shutdown purge process, a reasonable purge strategy can be determined to improve the success rate of low-temperature start of the fuel cell. In addition, by studying the method of fuel cell consistency analysis, the reasons for the differences in the external characteristics of the fuel cell under different working conditions can be more accurately analyzed, thereby improving the hydrothermal management and material transfer methods of the fuel cell, and improving the consistency of the fuel cell during low-temperature startup and operation.

[0004] However, all of the above studies need to use the stack shutdown purge data for modeling. In the prior art, since the fuel cell stack shutdown purge test is not an independent test, the stack shutdown purge data needs to be extracted from the full amount of data before the stack shutdown purge modeling is performed. In the prior art, when extracting the stack shutdown purge data from the full amount of data, the processing time is long and there may be data redundancy and errors, which affects the extraction efficiency and extraction accuracy of the stack shutdown purge data and the subsequent stack shutdown purge modeling accuracy. Summary of the invention

[0005] In response to the problems existing in the prior art, the embodiments of the present invention provide a method, device, medium and equipment for obtaining fuel cell shutdown purge data, so as to solve or partially solve the technical problems in the prior art that when extracting fuel cell shutdown purge data, the processing time is long and the extracted electric propulsion shutdown purge data may contain redundant and erroneous data, thereby affecting the extraction efficiency and extraction accuracy of the fuel cell shutdown purge data and affecting the accuracy of the fuel cell shutdown purge modeling.

[0006] A first aspect of the present invention provides a method for obtaining shutdown purge data of a fuel cell stack, the method comprising:

[0007] For all full data subfolders, extract the key purge data corresponding to the stack shutdown purge stage from each full data subfolder;

[0008] Determine tier labels for key purge data in all full data subfolders based on preset tier thresholds;

[0009] The key purge data are extracted in layers based on the layered labels to obtain a purge data set of a flow channel purge stage, a purge data set of a gas diffusion layer purge stage, and a purge data set of a proton exchange membrane purge stage.

[0010] In the above scheme, extracting the key purge data corresponding to the stack shutdown purge stage from the current full data subfolder includes:

[0011] Extracting basic purge data corresponding to the stack shutdown purge stage from the current full data subfolder according to the identifier of the stack shutdown purge stage;

[0012] The basic purge data is processed by dividing the blocks based on a preset block size and a block function to obtain a plurality of data blocks;

[0013] Each data block is read in turn according to a preset reading cycle, and for the current data block read, corresponding key purge data is extracted based on the key feature fields of the stack shutdown purge stage.

[0014] In the above scheme, after extracting the key purge data corresponding to the stack shutdown purge stage from each full data subfolder, the method further includes:

[0015] The key purge data of the current full data subfolder is saved into a preset data structure; a corresponding name is assigned to the name column in the data structure; the name of the name column is consistent with the name of the current full data subfolder;

[0016] This cycle is repeated until the key purge data in all full data subfolders are saved to the data structure; wherein,

[0017] The key purge data of each full data sub-folder has a unique index in the data structure.

[0018] In the above solution, determining the hierarchical labels for the key purge data of all full data subfolders according to the preset hierarchical threshold includes:

[0019] Create an array, the length of the array is the same as the length of the data structure, and the initial value of all elements in the array is 0;

[0020] For each set of key purge data in the data structure, the following processing is performed on each set of key purge data in turn:

[0021] Obtaining each stack impedance in the key purge data, and determining the second-order derivative of each stack impedance with respect to time;

[0022] Finding a first second-order derivative satisfying a first stratification threshold value among all second-order derivatives and finding a second second-order derivative satisfying a second stratification threshold value;

[0023] Determining a first moment corresponding to the first second-order derivative and determining a second moment corresponding to the second second-order derivative;

[0024] Obtain a first index in the data structure at the first moment and a second index in the data structure at the second moment;

[0025] If the index of the array is consistent with the index of the data structure, determining the starting index of the current group of key purge data in the array according to the starting index of the current group of key purge data in the data structure, and determining the ending index of the current group of key purge data in the array according to the ending index of the current group of key purge data in the data structure;

[0026] In the array, the elements between the start index and the first index are assigned a first hierarchical label, the elements between the first index and the second index are assigned a second hierarchical label, and the elements between the second index and the end index are assigned a third hierarchical label; wherein,

[0027] The key purge data with the same name is a group of key purge data; under the same index, the elements in the array correspond one-to-one to the key purge parameters in the data structure.

[0028] In the above solution, if the index of the array is inconsistent with the index of the data structure, the method further includes:

[0029] Determine a first index quantity corresponding to the first index according to the starting index of the current group of key purge data in the data structure and the first index; starting from the first element in the array whose element value is 0, assign the element of the first index quantity to a first hierarchical label;

[0030] When the first hierarchical label is set, the element whose first element value is 0 is searched again in the array, a second index quantity is determined according to the first index and the second index, and starting from the element whose first element value is 0 that is searched again, the elements of the second index quantity are assigned a second hierarchical label;

[0031] When the second hierarchical label is set, the element whose first element value is 0 is searched again in the array, and the third index quantity is determined according to the second index and the end index of the current group key purge data in the data structure. Starting from the element whose first element value is 0 that is re-searched, the elements of the third index quantity are assigned to the third hierarchical label.

[0032] In the above solution, the step of extracting the key purge data in layers based on the layered labels includes:

[0033] Creating an array object, the index of the array object is consistent with the index of the data structure, and the data of the array object comes from the array; the array object is used to establish an association relationship between the data structure and the array;

[0034] Based on the grouping function and the hierarchical label corresponding to each index in the array object, the key purge data with the first hierarchical label are grouped together to obtain a first data set; the key purge data with the second hierarchical label are grouped together to obtain a second data set; and the key purge data with the third hierarchical label are grouped together to obtain a third data set;

[0035] The first data set is extracted according to the first hierarchical label, the second data set is extracted according to the second hierarchical label, and the third data set is extracted according to the third hierarchical label; wherein

[0036] The first data set is a purge data set in the flow channel purge stage, the second data set is a purge data set in the gas diffusion layer purge stage, and the third data set is a purge data set in the proton exchange membrane purge stage.

[0037] In the above scheme, searching for the first second-order derivative that satisfies the first stratification threshold value among all second-order derivatives and searching for the second second-order derivative that satisfies the second stratification threshold value include:

[0038] If there is no second-order derivative equal to the first stratification threshold value among all second-order derivatives, and there is no second-order derivative equal to the second stratification threshold value, starting from the first second-order derivative, it is determined in sequence whether the absolute value of the first difference between each current second-order derivative and the first stratification threshold value is less than the first threshold value; if it is determined to be less than the first threshold value, the first current second-order derivative corresponding to the difference less than the first threshold value is determined as the first second-order derivative;

[0039] Starting from the next second-order derivative of the first second-order derivative, determine in turn whether the absolute value of the second difference between each current second-order derivative and the second stratification threshold is less than the second threshold; if it is determined to be less than the second threshold, determine the first current second-order derivative corresponding to the second threshold as the second second-order derivative.

[0040] In the above scheme, searching for the first second-order derivative that satisfies the first stratification threshold value among all second-order derivatives and searching for the second second-order derivative that satisfies the second stratification threshold value include:

[0041] If there are multiple first current second-order derivatives equal to the first stratification threshold among all the second-order derivatives, determining the first first current second-order derivative as the first second-order derivative;

[0042] If there is a second current second-order derivative equal to the second stratification threshold among all the second-order derivatives, the first second current second-order derivative is determined as the second second-order derivative.

[0043] A second aspect of the present invention provides a device for obtaining shutdown scanning data of a fuel cell stack, the device comprising:

[0044] A first extraction unit, the first extraction unit is used to extract key purge data corresponding to the stack shutdown purge stage from each full data subfolder for all full data subfolders;

[0045] A determination unit, used to determine a stratification label for key purge data of all full data subfolders according to a preset stratification threshold;

[0046] The second extraction unit is used to perform hierarchical extraction on the key purge data based on the hierarchical labels to obtain a purge data set of a flow channel purge stage, a purge data set of a gas diffusion layer purge stage, and a purge data set of a proton exchange membrane purge stage.

[0047] According to a third aspect of the present invention, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the steps of any one of the methods described in the first aspect are implemented.

[0048] The present invention provides a method, device, medium and equipment for obtaining shutdown purge data of a stack, the method comprising: for all full data subfolders, extracting key purge data corresponding to the shutdown purge stage of the stack from each full data subfolder; determining hierarchical labels for the key purge data of all full data subfolders according to a preset hierarchical threshold; performing hierarchical extraction on the key purge data based on the hierarchical labels, and obtaining a purge data set of a flow channel purge stage, a purge data set of a gas diffusion layer purge stage and a purge data set of a proton exchange membrane purge stage respectively; in this way, since there may be a large amount of data without research significance in the full data of the shutdown purge stage of the stack, the present invention extracts the key purge data from the full data subfolder, thereby improving data accuracy; in addition, since during the shutdown purge process of the stack, as the purge time changes, the stack impedance will undergo obvious stratification with time, so after the present invention performs hierarchical extraction on the key purge data, it is also more conducive to the subsequent modeling of the shutdown purge model of the stack, thereby improving the modeling accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0050] Figure 1 A schematic flow chart of a method for obtaining shutdown purge data of a fuel cell stack according to an embodiment of the present invention is shown;

[0051] Figure 2 A schematic diagram of the full data structure of a stack shutdown purge phase according to an embodiment of the present invention is shown;

[0052] Figure 3 A schematic diagram showing the change of stack impedance over time according to an embodiment of the present invention is shown;

[0053] Figure 4 A schematic diagram showing a change in the first-order derivative of stack impedance with respect to time according to an embodiment of the present invention is shown;

[0054] Figure 5 A schematic diagram showing a change in the first-order derivative of the stack impedance with respect to time and a schematic diagram showing a change in the second-order derivative of the stack impedance with respect to time according to an embodiment of the present invention are shown;

[0055] Figure 6 A schematic diagram of the structure of a device for acquiring shutdown purge data of a fuel cell stack according to an embodiment of the present invention. DETAILED DESCRIPTION

[0056] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0057] The present invention provides a method for obtaining shutdown purge data of a fuel cell stack, such as Figure 1 As shown, the method mainly includes the following steps:

[0058] S110, for all full data sub-folders, extract key purge data corresponding to the stack shutdown purge stage from each full data sub-folder.

[0059] In one implementation, key purge data corresponding to the stack shutdown purge phase is extracted from the current full data subfolder, including:

[0060] Extracting basic purge data corresponding to the stack shutdown purge stage from the current full data subfolder according to the identifier of the stack shutdown purge stage;

[0061] The basic purge data is processed by dividing the blocks based on a preset block size and a block function to obtain a plurality of data blocks;

[0062] Each data block is read in turn according to a preset reading cycle, and for the current data block read, corresponding key purge data is extracted based on the key feature fields of the stack shutdown purge stage.

[0063] Specifically, due to test funding considerations, the stack shutdown purge test is generally not conducted alone, but is conducted together with other stack tests, such as the stack endurance drum test, the stack low-temperature cold start test, etc. Then the data obtained during the entire test process is called full data.

[0064] Since the full data volume is very large, refer to Figure 2 , under the total folder of full data, you can set up full data subfolders according to the test date. Each test date may have multiple tests, so each test date contains multiple full data subfolders. Each full data subfolder is a csv file.

[0065] It is understandable that when conducting multiple tests, the overall test cycle, collection cycle and characteristic quantities of each test type need to be determined in advance. Since each different test type needs to be covered, the collection cycle may be set very short (for example, 0.272s, or even shorter) and a large number of characteristic quantities may be set (possibly greater than 200). The overall test cycle is generally 6 months (can also be adjusted based on actual conditions), which results in a huge amount of total data.

[0066] Since the identifier corresponding to each test stage is different, the present invention can read each full data subfolder in turn, and extract the basic purge data corresponding to the stack shutdown purge stage according to the stack shutdown purge identifier.

[0067] Specifically, the present invention can use Python's built-in csv module to read different full data sub-files under the full data total folder, use the open function to open the full data sub-file in read mode ('r'), create a csv.reader array object, use the csv.reader array object to read the full data sub-file stream line by line, and then disassemble and analyze the file stream one by one to extract basic purge data.

[0068] Since different test types have different corresponding identifiers, for example, the identifier corresponding to the stack shutdown purge stage is FCState_st=33, after reading the data, the basic purge data corresponding to the stack shutdown purge stage can be extracted according to the stack shutdown purge identifier. For example, all data of FCState_st=33 can be extracted, so that the basic purge data of the stack shutdown purge stage is obtained.

[0069] Although the basic purge data is the data of the stack shutdown purge stage, it also includes many irrelevant feature quantities. In order to reduce interference data, it is necessary to extract key purge data from the basic data.

[0070] Considering the efficiency of data extraction, the present invention sets a fixed reading cycle. To facilitate the adjustment of the reading cycle, the time interval is set to the variable dev, and the reading cycle can be conveniently adjusted through the variable dev. Assuming dev = 4, it means that the reading cycle is 4 times the above acquisition cycle, that is, the reading cycle is 4*0.272=1.088s, and the code is implemented as follows:

[0071] i=0#file

[0072] dev=4#4*0.272=1.088 seconds

[0073] df_total = pd.DataFrame()

[0074] for file in files:

[0075] df=pd.read_csv(os.getcwd()+'\\'+filepath+'\\'+files[i],skiprows=1)

[0076] print(files[i])

[0077] df = df [df.index% dev = = 0] # 0, 1, 2, ..., dev - 1, value

[0078] df_total=df_total.append(df)

[0079] i=i+1

[0080] Furthermore, considering that the amount of critical purge data is still large, the present invention uses chunking technology to divide the critical purge data into smaller blocks or "chunks" for processing, thereby avoiding the problem of insufficient memory or slow processing speed when processing all data at once. The code implementation is as follows:

[0081]

[0082] In addition, it is also necessary to set the key feature fields of the stack shutdown purge stage so that the corresponding key feature purge data can be extracted according to the key feature fields during the reading process. Among them, the key feature fields include: purge time Time, air flow Air_fStkIn, cooling inlet temperature Coolt_tStkIn, cooling outlet temperature Coolt_tStkOut and stack impedance R. The core code is implemented as follows:

[0083] vali_vars=['Time','Air_fStkIn','Coolt_tStkIn','Coolt_tStkOut','R']

[0084] df_vali=tmp_df[vali_vars]

[0085] After the key purge data of each full data subfolder is obtained (the key purge data of each full data subfolder is a group), the group of key purge data needs to be stored in a pre-created data structure. Then in one embodiment, after extracting the key purge data corresponding to the stack shutdown purge stage from each full data subfolder, the method also includes:

[0086] Save the key purge data of the current full data subfolder to the preset data structure; assign a corresponding name to the name column in the data structure; the name of the name column is consistent with the name of the current full data subfolder;

[0087] This cycle is repeated until the key purge data in all full data subfolders are saved to the data structure;

[0088] The key purge data of each full data subfolder has a unique index in the data structure.

[0089] Specifically, the data structure may be dataframe. Since the key purge data in different full data subfolders need to be stored in the data structure, in order to conveniently distinguish which full file subfolders the key purge data belongs to, a new name column mfile needs to be created in the data structure (the step of creating a new name column may be performed after storing all the key purge data in the first full data subfolder in the data structure; or it may be performed immediately after the data structure is created, and there is no restriction here).

[0090] Then, each time the key purge data of the current full data subfolder is saved to the data structure, the name column also needs to be assigned a corresponding name. The core code for creating a new name column is as follows:

[0091] Tmp_df['mfile'] = fname;

[0092] For example, the csv1 subfolder is read first, and the key purge data of the csv1 subfolder is obtained (200 lines, a group of key purge data); then the csv2 folder is read, and the key purge data of the csv2 subfolder is obtained (also 200 lines, another group of key data). The key purge data of each full data subfolder is a group of data in the data structure.

[0093] Then, after storing the key purge data of the csv1 subfolder in the data structure, since the key purge data of the csv1 subfolder contains 200 rows of data, the 0th to 199th elements of the name column can be assigned to csv1. Similarly, after storing the key purge data of the csv2 subfolder in the data structure, since the key purge data of the csv2 subfolder also contains 200 rows of data, the 200th to 399th elements of the name column can be assigned to csv2.

[0094] It can be understood that since the key feature field contains 5 fields, each line of key purge data contains 5 purge data, and also includes index, reading time and name. When reading the csv1 subfolder, the reading time is counted from 0s. When reading the csv1 subfolder, the reading time is also counted from 0s. For the convenience of description, assuming that the reading cycle is 1s, if each set of key purge data is 200 lines, then in the data structure, the reading time of each set of key purge data is 0~199s.

[0095] Therefore, the data structure can be shown in Table 1:

[0096] Table 1

[0097]

[0098] Thus, it can be seen from Table 1 that even if there are multiple rows of key purge data stored in the data structure, each row of key purge data has a unique index, and all key purge data in the same full data subfolder have the same name. For example, the full data subfolder csv1 corresponds to the 0th to 199th rows of key purge data in the data structure, so the name corresponding to the 0th to 199th rows of key purge data is csv1; the full data subfolder csv2 corresponds to the 200th to 399th rows of key purge data in the data structure, so the name corresponding to the 200th to 999th rows of key purge data is csv2.

[0099] S111 , determining a stratification label for the key purge data of all full data subfolders according to a preset stratification threshold.

[0100] When all the full data subfolders have been read, the key purge data corresponding to all full subfolders are stored in the data structure. The reason why the present invention needs to perform hierarchical extraction of all key purge data according to the preset hierarchical threshold is mainly due to the fact that during the shutdown purge of the battery stack, as the purge time changes, the impedance of the battery stack will change significantly in three stages over time, which is related to the internal mechanism of the shutdown purge of the battery stack. Therefore, in order to establish a more accurate battery stack shutdown purge model, the present invention needs to perform hierarchical extraction, so firstly, the hierarchical threshold must be determined, and then the hierarchical labels are determined for all key purge data according to the hierarchical threshold.

[0101] Specifically, the purge process of the stack shutdown can be divided into three stages: flow channel purge stage (flow channel), gas diffusion layer purge stage (GDL, Gas Diffusion Layer) and proton exchange membrane purge stage (PEM, Proton Exchange Membrane). Figure 3 As shown, in the flow channel purge stage, with the increase of purge flow rate and purge time, the change of stack impedance is small; in the gas diffusion layer purge stage, with the increase of purge flow rate and purge time, the change of stack impedance gradually increases; in the proton exchange membrane purge stage, with the increase of purge flow rate and purge time, the stack impedance increases significantly.

[0102] Therefore, two stratification thresholds (the first stratification threshold and the second stratification threshold) can be set to divide the key purge data into three layers, and then stratification labels can be determined for all key purge data according to the first stratification threshold and the second stratification threshold, and then all key purge data can be extracted in layers according to the stratification labels.

[0103] In mathematical theory, the Nth order difference can describe the higher-order change trends of the rate and acceleration of the variable in the discrete time series over time. The present invention mainly uses the Nth order difference value (also the Nth order derivative) of the stack impedance to time to characterize the change trend of the stack impedance over time. However, it does not mean that any value of N can meet the requirements, so it is necessary to determine the appropriate N value. Among them, the present invention uses the central difference method.

[0104] Here, the numpy.gradient function of python (which can be understood as a derivative function) can be called to calculate the first-order derivative dRdt_central1 and the second-order derivative d2Rdt2_central of the stack impedance with respect to time. The core code is as follows:

[0105] dRdt_central1=np.gradient(R,t,edge_order=2, method='central')

[0106] d2Rdt2_central=np.gradient(dRdt_central1,t,edge_order=2).

[0107] When N is 1, refer to Figure 4 or reference Figure 5 At mark 51 in the figure, the change of the first-order derivative of the stack impedance with respect to time is unstable. After about 120 seconds, there is an obvious upward trend, which is far away from the 0 point of the x-axis. Therefore, it is inappropriate for N to be 1.

[0108] When N is 2, refer to Figure 5 At mark 52, the second-order derivative of the stack impedance with respect to time fluctuates after about 120 seconds, but is basically distributed near the 0 point of the x-axis, and does not have a trend of always going up or down. Therefore, the second-order derivative of the stack impedance with respect to time can be used to characterize the change trend of the stack impedance with respect to time.

[0109] Therefore, N is suitable to be 2. Therefore, the first stratification threshold and the second stratification threshold can be determined according to the second-order derivative of the stack impedance with respect to time. After obtaining the second-order derivative of the stack impedance with respect to time, the first stratification threshold thsd_d2Rt2_1 and the second stratification threshold thsd_d2Rt2_2 can be determined according to empirical values, and the second stratification threshold is generally 10 times the first stratification threshold. For example, the first stratification threshold can be 0.04-0.05, and the second stratification threshold corresponds to 0.4-0.5.

[0110] Assume thsd_d2Rt2_1 = 0.05, thsd_d2Rt2_2 = 0.5, refer to Figure 5 Mark 52, if the maximum value of the second-order derivative of the stack impedance with respect to time is 30 and the minimum value is 0, then:

[0111] The range of the first second-order derivative is: [0, thsd_d2Rt2_1) = [0, 0.05)

[0112] The second-order derivative range of the second segment is: [thsd_d2Rt2_1, thsd_d2Rt2_2) = [0.05, 0.5)

[0113] The range of the second-order derivative of the third segment is: [thsd_d2Rt2_2,30) = [0.5,30)

[0114] In the range [0, 0.05), from Figure 5 It can be seen from the mark 52 in the figure that the second-order derivative of the stack impedance R with respect to time t does not change much and is relatively stable; this is completely consistent with the characteristic that in the flow channel purge stage, the stack impedance generally changes little with the increase of the purge flow rate and the purge time;

[0115] In the range [0.05, 0.5), from Figure 5 It can be seen from the mark 52 in that the second-order derivative of the stack impedance R with respect to time t gradually increases, which is completely consistent with the characteristics of the gas diffusion layer (GDL) purge, where the stack impedance gradually increases with the increase of the purge flow rate and the purge time;

[0116] In the range [0.5, 30), from Figure 5 It can be seen from the mark 52 that the second-order derivative of the stack impedance R with respect to time t changes significantly, which is completely consistent with the characteristic that during the proton exchange membrane (PEM) purge stage, the stack impedance changes significantly with the increase of the purge flow and the purge time.

[0117] Therefore, it can also be shown that the specific values ​​of the first stratification threshold and the second stratification threshold are reasonable.

[0118] After the first stratification threshold and the second stratification threshold are determined, in one embodiment, determining the stratification label of the key purge data according to the preset stratification threshold includes:

[0119] Create an array. The length of the array is the same as the length of the data structure. The initial value of all elements in the array is 0.

[0120] For each set of key purge data in the data structure, perform the following processing on each set of key purge data in turn:

[0121] Obtain the impedance of each stack in the key purge data; determine the second-order derivative of each stack impedance with respect to time;

[0122] Finding a first second-order derivative satisfying a first stratification threshold value among the second-order derivatives and finding a second second-order derivative satisfying a second stratification threshold value;

[0123] Determining a first moment corresponding to a first second-order derivative and determining a second moment corresponding to a second second-order derivative;

[0124] Obtain a first index in the data structure at a first moment and a second index in the data structure at a second moment;

[0125] If the index of the array is consistent with the index of the data structure, determining the starting index of the current group key purge data in the array according to the starting index of the current group key purge data in the data structure, and determining the ending index of the current group key purge data in the array according to the ending index of the current group key purge data in the data structure;

[0126] In the array, the elements between the start index and the first index are assigned the first hierarchical label, the elements between the first index and the second index are assigned the second hierarchical label, and the elements between the second index and the end index are assigned the third hierarchical label; wherein,

[0127] The key purge data with the same name is a group of key purge data; under the same index, the elements in the array correspond one-to-one to the key purge parameters in the data structure.

[0128] Specifically, the present invention needs to recreate an array strata, which is used to record the hierarchical label of each row of key purge data in the data structure. The core code for creating the array is:

[0129] strata=np.zeros(len(df),dtype=int);

[0130] The df in the code is a data structure dataframe, and the initial value of each element in the array is 0.

[0131] Then, for each set of key purge data, the stack impedance in the set of key purge data is obtained, and the second-order derivative of the stack impedance with respect to time is calculated using the numpy.gradient function of Python.

[0132] For example, if the first set of key purge data includes 200 stack impedances, then 200 second-order derivatives can also be obtained. Regardless of whether the stack impedance is derived or not, the reading time in the data structure remains unchanged, that is, after the derivative is taken, each reading time corresponds to a second-order derivative.

[0133] Then, it is necessary to find the first second-order derivative that meets the first stratification threshold among the 200 second-order derivatives and to find the second second-order derivative that meets the second stratification threshold.

[0134] In one embodiment, searching for a first second-order derivative satisfying a first stratification threshold value among all second-order derivatives and searching for a second second-order derivative satisfying a second stratification threshold value include:

[0135] If there are multiple first current second-order derivatives equal to the first stratification threshold among all the second-order derivatives, determining the first first current second-order derivative as the first second-order derivative;

[0136] If there are a plurality of second current second order derivatives equal to the second stratification threshold among all the second order derivatives, the first second current second order derivative is determined as the second second order derivative.

[0137] Generally speaking, in the flow channel purge stage and the gas diffusion layer purge stage, the second-order derivative is on an upward trend, but there may be fluctuations in the proton exchange membrane purge stage. Therefore, in practical applications, if the 200 second-order derivatives obtained just contain the first current second-order derivative equal to the first stratification threshold (there may be multiple), and contain the second current second-order derivative equal to the second stratification threshold (there may also be multiple). Then the first first current second-order derivative can be directly determined as the first second-order derivative that meets the first stratification threshold, and the first second current second-order derivative can be determined as the second second-order derivative that meets the second stratification threshold.

[0138] For example, assuming that the first stratification threshold is 0.05 and the second stratification threshold is 0.5; if the 200 second-order derivatives happen to contain 2 0.05s (for example, the first current second-order derivative is the 59th second-order derivative, the 59th second-order derivative is 0.05, and the 60th second-order derivative is also 0.05), then the 59th second-order derivative can be determined as the first second-order derivative.

[0139] Similarly, if the 200 second-order derivatives contain exactly 2 0.5s (for example, the first second current second-order derivative is the 120th second-order derivative, the 120th second-order derivative is 0.5, and the 140th second-order derivative is also 0.5), then the first 0.5 (the 120th second-order derivative) can be determined as the second second-order derivative.

[0140] However, if the 200 obtained second-order derivatives do not contain a second-order derivative equal to the first stratification threshold, and do not contain a second-order derivative equal to the second stratification threshold, then in one embodiment, searching for the first second-order derivative that satisfies the first stratification threshold and searching for the second second-order derivative that satisfies the second stratification threshold among all the second-order derivatives includes:

[0141] Starting from the first second-order derivative, determine in turn whether the absolute value of the first difference between each current second-order derivative and the first stratification threshold is less than the first threshold; if it is determined to be less than the first threshold, determine the first current second-order derivative corresponding to the difference less than the first threshold as the first second-order derivative;

[0142] Starting from the next second-order derivative of the first second-order derivative, determine in turn whether the absolute value of the second difference between each current second-order derivative and the second stratification threshold is less than the second threshold; if it is determined to be less than the second threshold, the first current second-order derivative corresponding to the second threshold is determined as the second second-order derivative.

[0143] For example, assuming that the first threshold is 0.01, if the 55th current second-order derivative is 0.045 (the first current second-order derivative that is smaller than the first threshold), the 56th current second-order derivative is also 0.045, and the absolute value of the first difference between 0.045 and 0.05 is 0.005. Since 0.005<0.01, it is only necessary to determine the 55th current second-order derivative as the first second-order derivative.

[0144] Similarly, assuming that the second threshold is also 0.01, the comparison continues from the next second-order derivative after 0.045. If the 119th current second-order derivative is 0.495 (the first current second-order derivative that is smaller than the second threshold), the 140th current second-order derivative is also 0.495, and the absolute value of the second difference between the two 0.495 and 0.5 is 0.005. Since 0.005<0.01, only the 119th current second-order derivative needs to be determined as the second second-order derivative. It is worth noting that even if there are second-order derivatives that meet the second stratification threshold after the 140th current second-order derivative, they are directly ignored.

[0145] It can be understood that after the first second-order derivative and the second second-order derivative are determined, the first moment corresponding to the first second-order derivative can be obtained, and the second moment corresponding to the second second-order derivative can be obtained.

[0146] For example, following the above example, if the 55th second-order derivative is the first second-order derivative, then the corresponding first moment should be 54s; if the 120th second-order derivative is the second second-order derivative, then the corresponding second moment is 119s.

[0147] Referring to the data structure of Table 1, since the reading time corresponding to each group of key purge data includes 0 to 199s, it is necessary to obtain the name of the current group of key purge data in the data structure, and then search for the first index of the first time in the data structure based on the name, and search for the second index of the second time in the data structure.

[0148] Continuing with the example, if each group of key purge data is 200 lines, the name of the current group of key purge data in the data structure is csv1 (the first group of key purge data), the first moment is 54s, then the first index corresponding to the first moment is 54; the second moment is 119s, then the second index corresponding to the second moment is 119.

[0149] If the name of the current group of key purge data in the data structure is csv2 (the second group of key purge data), the first moment is 54s, then the first index corresponding to the first moment is 254; the second moment is 119s, then the second index corresponding to the second moment is 319.

[0150] Since the array has its own default index, the index may be consistent with the index in the data structure, or it may be inconsistent with the index in the data structure. For example, the index in the data structure may be 0, 1, 2, 3...; while the default index in the array may be 0, 1, 2, 3..., or it may be a, b, c, d...

[0151] If the index of the array is consistent with the index of the data structure, after the first index and the second index are determined, since the starting index and ending index of each group of key purge data in the data structure are also different, it is also necessary to determine the starting index of the current group of key purge data in the array according to the starting index of the current group of key purge data in the data structure, and determine the ending index of the current group of key purge data in the array according to the ending index of the current group of key purge data in the data structure.

[0152] Continuing with the above example, if the name of the current group of key purge data in the data structure is csv1 (the first group of key purge data), then the starting index of the current group of key purge data in the data structure is 0 and the ending index is 199.

[0153] If the name of the current group of key purge data in the data structure is csv2 (the second group of key purge data), then the starting index of the current group of key purge data in the data structure is 200 and the ending index is 399.

[0154] Since the index of the data structure is exactly the same as the index of the array, the index of each set of key purge data in the data structure is also the same as the index in the array, so the starting index of the first set of key purge data in the array is also 0, and the ending index of the first set of key purge data in the array is also 199. The starting index of the second set of key purge data in the array is 200, and the ending index of the second set of key purge data in the array is 200.

[0155] After the starting index, ending index, and first and second indexes for stratification of each set of key purge data in the array are determined, for each set of key purge data, in the array, the elements between the starting index and the first index are assigned the first stratification label, the elements between the first index and the second index are assigned the second stratification label, and the elements between the second index and the ending index are assigned the third stratification label. If the first stratification label is 1, the second stratification label is 2, and the third stratification label is 3, then the core code for attaching stratification labels to each set of key purge data in the data structure is as follows:

[0156] strata[:np.where(df['t']==thsd_d2Rt2_t1)[0][0]]=1

[0157] strata[np.where(df['t']==thsd_d2Rt2_t1)[0][0]:np.where(df['R']==thsd_d2Rt2_t2)[0][0]]=2

[0158] strata[np.where(df['t']==thsd_d2Rt2_t2)[0][0]:]=3

[0159] Among them, np.where(df['t'] == thsd_d2Rt2_t1)[0][0]] represents the first index corresponding to the first moment thsd_d2Rt2_t1 in the data structure; the first moment is the reading moment corresponding to the first second-order derivative in the data structure. For example: the first second-order derivative is the 55th second-order derivative, and the reading moment corresponding to the 55th second-order derivative in the data structure is 54s, then the first moment is 54s, and the index corresponding to 54s in the data structure is 54, so the first index is 54.

[0160] np.where(df['R'] == thsd_d2Rt2_t2 represents the second index corresponding to the second moment thsd_d2Rt2_t2 in the data structure; the second moment is the reading moment corresponding to the second second-order derivative in the data structure. The first moment and the second moment are equivalent to the reading moment in the data structure. For example: the second second-order derivative is the 120th second-order derivative, and the reading moment corresponding to the 120th second-order derivative in the data structure is 119s, then the second moment is 119s, and the index corresponding to 119s in the data structure is 119, then the second index is 119.

[0161] As can be seen from the above code, the elements between the start index and the first index are assigned to the first hierarchical label 1, the elements between the first index and the second index are assigned to the second hierarchical label 2, and the elements between the second index and the end index are assigned to the third hierarchical label 3.

[0162] Continuing with the above example, if in the first set of key purge data, the first index corresponding to the first moment is 54, and the second index corresponding to the second moment is 119. In the second set of key purge data, the first index corresponding to the first moment is 254, and the second index corresponding to the second moment is 319. Then the array can be shown in Table 2:

[0163] Table 2

[0164]

[0165]

[0166] Combining Table 1 and Table 2, it can be seen that under the same index, the elements in the array correspond one-to-one to the key purge parameters in the data structure. According to the above method, corresponding hierarchical labels can be set for all elements in the array, that is, corresponding hierarchical labels can be attached to all groups of key purge data.

[0167] However, as mentioned above, the index of the array may not be consistent with the index of the data structure. In this case, the method also includes:

[0168] Determine the first index quantity corresponding to the first index according to the starting index of the current group key purge data in the data structure and the first index; starting from the first element in the array whose element value is 0, assign the element of the first index quantity to the first hierarchical label;

[0169] When the first hierarchical label is set, the element whose first element value is 0 is searched again in the array, the second index quantity is determined according to the first index and the second index, and the elements of the second index quantity are assigned the second hierarchical label starting from the element whose first element value is 0 that is searched again;

[0170] When the second hierarchical label is set, the element whose first element value is 0 is searched again in the array, and the third index quantity is determined according to the second index and the end index of the current group key purge data in the data structure. Starting from the element whose first element value is 0 that is searched again, the elements of the third index quantity are assigned the third hierarchical label.

[0171] Specifically, when setting the hierarchical labels, the order of each group of key purge data in the data structure is also followed. For example, the first group of key purge data is layered first. After the hierarchical labels of the first group of key purge data are set, the second group of key purge data is layered, and so on and so forth until the hierarchical labels of the last group of key purge data are set.

[0172] It can be understood that when the first layer label setting is set for the first set of key purge data, the corresponding element in the array will change from the initial value 0 to 1, when the first layer label setting is set for the first set of key purge data, the corresponding element in the array will change from 0 to 2, and when the third layer label setting is set for the first set of key purge data, the corresponding element in the array will change from 0 to 3.

[0173] Therefore, for each set of key purge data, if the first index quantity contained between the start index and the first index is known, then the first element with a value of 0 can be found in the array first, and starting from this element, the same number of elements can be assigned a value of 1; if the second index quantity contained by the first index and the second index is known, after the first layer label is set, the first element with a value of 0 can be found in the array, and starting from this element, the same number of elements can be assigned a value of 2; if the third index quantity contained by the second index and the end index is known, after the second layer label is set, the first element with a value of 0 can be found in the array, and starting from this element, the same number of elements can be assigned a value of 3.

[0174] For example, for the first set of key purge data, in the data structure, the start index corresponding to the first set of key purge data is 0, the first index corresponding to the first moment is 54; the second index corresponding to the second moment is 119, and the end index is 199.

[0175] Then the first index between the starting index and the first index is 55, so starting from the first 0 element in the array, the values ​​of the subsequent 55 elements are assigned to 1.

[0176] Since the first 55 elements in the array have a value of 1, the first element with a value of 0 should be the 56th element in the array. The second index between the first index and the second index is 65, and starting from the 56th element in the array, the values ​​of the subsequent 65 elements are assigned to 2.

[0177] Since the values ​​of the first 120 elements in the array are not 0, the first element with a value of 0 should be the 121st element in the array. The third index between the second index and the end index is 80, and starting from the 121st element of the array, the values ​​of the subsequent 80 elements are assigned to 3.

[0178] According to the above method, and so on, the hierarchical labels of all key purge data in the data structure are finally set.

[0179] S112, performing hierarchical extraction on the key purge data based on the hierarchical labels to obtain a purge data set of a flow channel purge stage, a purge data set of a gas diffusion layer purge stage, and a purge data set of a proton exchange membrane purge stage.

[0180] After the hierarchical label of each key purge data in the data structure is determined, the key purge data can be extracted based on the hierarchical label to obtain the purge data set of the flow channel purge stage, the purge data set of the gas diffusion layer purge stage, and the purge data set of the proton exchange membrane purge stage. The implementation is as follows:

[0181] Create an array object, the index of the array object is consistent with the index of the data structure, and the data of the array object comes from the array; the array object is used to establish an association relationship between the data structure and the array;

[0182] Based on the grouping function and the hierarchical label corresponding to each index in the array object, the key purge data with the first hierarchical label are grouped together to obtain a first data set; the key purge data with the second hierarchical label are grouped together to obtain a second data set; and the key purge data with the third hierarchical label are grouped together to obtain a third data set;

[0183] The first data set is extracted according to the first hierarchical label, the second data set is extracted according to the second hierarchical label, and the third data set is extracted according to the third hierarchical label; wherein,

[0184] The first data set is a purge data set during the flow channel purge stage, the second data set is a purge data set during the gas diffusion layer purge stage, and the third data set is a purge data set during the proton exchange membrane purge stage.

[0185] Specifically, since the data structure of Table 1 and the array of Table 2 are two independent entities, if the index of the array is inconsistent with the index of the data structure, it is necessary to create a pandas Series array object strata_series to associate the key purge data of the array object with the stratified labels in the array. The core code for creating the array object is as follows:

[0186] strata_series=pd.Series(strata,index=df.index);

[0187] It can be seen that the data of the array object comes from the array, and the index of the array object is consistent with the index in the data structure, which means that each element in strata_series is associated with the corresponding row in the data structure.

[0188] Then use the grouping function groupby to group the key purge data. The code is as follows:

[0189] grouped=df.groupby(strata_series)

[0190] After grouping, the key purge data with the first hierarchical label in the data structure are all grouped together, the key purge data with the second hierarchical label are all grouped together, and the key purge data with the third hierarchical label are all grouped together. Then the first data set can be extracted according to the first hierarchical label, the second data set can be extracted according to the second hierarchical label, and the third data set can be extracted according to the third hierarchical label. The core code is implemented as follows:

[0191] df1 = grouped.get_group(1) extracts all row key purge data with layer label 1 and stores it in df1

[0192] df2 = grouped.get_group(2) extracts all row key purge data with layer label 2 and stores it in df2

[0193] df3 = grouped.get_group(3) extracts all row key purge data with layer label 3 and stores it in df3

[0194] Then df1 stores the purge data set of the flow channel purge stage, df2 stores the purge data set of the gas diffusion layer purge stage, and df3 stores the purge data set of the proton exchange membrane purge stage.

[0195] It is worth noting that if the index in the array is consistent with the index in the data structure, there is no need to create an array object strata_series, and all key purge data in the data structure can be stratified directly using the array and grouping functions.

[0196] For example, if it is necessary to analyze the purge conditions in the flow channel purge stage, the data of df1 can be used for analysis; if it is necessary to analyze the purge conditions in the gas diffusion layer purge stage, the data of df2 can be used for analysis; if it is necessary to analyze the purge conditions in the proton exchange membrane purge stage, the data of df3 can be used for analysis.

[0197] The present invention reads basic purge data in blocks, which can improve data processing speed; and, since there may be a large amount of data irrelevant to the shutdown stage of the stack in the basic purge data, the present invention screens the basic purge data and extracts key purge data, thereby improving data accuracy; in addition, since during the shutdown purge process of the stack, as the purge time changes, the stack impedance will undergo obvious stratification with the change of time, so after the present invention extracts the key purge data in layers, it is also more conducive to the subsequent modeling of the stack shutdown purge model, thereby improving the modeling accuracy.

[0198] In addition, after using the purge data extracted by the present invention in layers to model the stack shutdown purge, the following good results are also achieved:

[0199] Under different external ambient temperatures, precise air compressor purge flow can be provided on the premise of ensuring successful low-temperature cold start; under the premise of ensuring successful low-temperature cold start and precise low-purge flow of the air compressor, the purge time for successful low-temperature cold start of the stack can be shortened (through comparison, under the conditions of ensuring successful cold start at different ambient temperatures, the stack shutdown purge time is shortened); the power consumption of the stack shutdown purge is reduced (the dynamic balance point of the stack purge time t and the purge flow f is determined); low-power purge of the air compressor achieves noise reduction.

[0200] Based on the same inventive concept as in the above-mentioned embodiment, this embodiment also provides a device for obtaining shutdown purge data of a fuel cell stack, such as Figure 6 As shown, the device comprises:

[0201] The first extraction unit 61 is used to extract key purge data corresponding to the stack shutdown purge stage from each full data subfolder for all full data subfolders;

[0202] A determination unit 62, configured to determine a layer label for the key purge data of all full data subfolders according to a preset layer threshold;

[0203] The second extraction unit 63 is used to perform hierarchical extraction on the key purge data based on the hierarchical labels to obtain a purge data set of a flow channel purge stage, a purge data set of a gas diffusion layer purge stage, and a purge data set of a proton exchange membrane purge stage.

[0204] Since the device introduced in the embodiment of the present invention is a device used to implement the method for obtaining the shutdown purge data of the fuel cell stack in the embodiment of the present invention, based on the method introduced in the embodiment of the present invention, the person skilled in the art can understand the specific structure and deformation of the device, so it is not repeated here. All devices used in the method of the embodiment of the present invention belong to the scope of protection of the present invention.

[0205] Based on the same inventive concept, this embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any step of the method described above when executing the computer program.

[0206] Based on the same inventive concept, this embodiment provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the methods described above are implemented.

[0207] Through one or more embodiments of the present invention, the present invention has the following beneficial effects or advantages:

[0208] The present invention provides a method, device, medium and equipment for obtaining shutdown purge data of a stack, the method comprising: for a current full data subfolder, extracting key purge data corresponding to a shutdown purge stage of a stack from the current full data subfolder; when all full data subfolders have been read, determining hierarchical labels for all key purge data according to a preset hierarchical threshold; performing hierarchical extraction on the key purge data based on the hierarchical labels, and obtaining a purge data set for a flow channel purge stage, a purge data set for a gas diffusion layer purge stage and a purge data set for a proton exchange membrane purge stage respectively; in this way, since a large amount of data without research significance may exist in the full data of the shutdown purge stage of the stack, the present invention extracts key purge data from the full data subfolder, thereby improving data accuracy; in addition, since during the shutdown purge process of the stack, as the purge time changes, the stack impedance will undergo obvious stratification as the purge time changes, so after the present invention performs hierarchical extraction on the key purge data, it is also more conducive to the subsequent modeling of a shutdown purge model of the stack, thereby improving modeling accuracy.

[0209] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0210] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for obtaining stack shutdown purge data, characterized in that: The method comprises: For all full data subfolders, extract the key purge data corresponding to the stack shutdown purge stage from each full data subfolder; Determine tier labels for key purge data in all full data subfolders based on preset tier thresholds; The key purge data are extracted in layers based on the layered labels to obtain a purge data set of a flow channel purge stage, a purge data set of a gas diffusion layer purge stage, and a purge data set of a proton exchange membrane purge stage.

2. The method according to claim 1, characterized in that The extracting of key purge data corresponding to the stack shutdown purge stage from the current full data subfolder includes: Extracting basic purge data corresponding to the stack shutdown purge stage from the current full data subfolder according to the identifier of the stack shutdown purge stage; The basic purge data is processed by dividing the blocks based on a preset block size and a block function to obtain a plurality of data blocks; Each data block is read in turn according to a preset reading cycle, and for the current data block read, corresponding key purge data is extracted based on the key feature fields of the stack shutdown purge stage.

3. The method according to claim 1, characterized in that After extracting the key purge data corresponding to the stack shutdown purge stage from each full data subfolder, the method further includes: The key purge data of the current full data subfolder is saved into a preset data structure; a corresponding name is assigned to the name column in the data structure; the name of the name column is consistent with the name of the current full data subfolder; This cycle is repeated until the key purge data in all full data subfolders are saved to the data structure; wherein, The key purge data of each full data sub-folder has a unique index in the data structure.

4. The method according to claim 1, characterized in that Determining the hierarchical labels for the key purge data of all full data subfolders according to the preset hierarchical threshold includes: Create an array, the length of the array is the same as the length of the data structure, and the initial value of all elements in the array is 0; For each set of key purge data in the data structure, the following processing is performed on each set of key purge data in turn: Obtaining each stack impedance in the key purge data, and determining the second-order derivative of each stack impedance with respect to time; Finding a first second-order derivative satisfying a first stratification threshold value among all second-order derivatives and finding a second second-order derivative satisfying a second stratification threshold value; Determining a first moment corresponding to the first second-order derivative and determining a second moment corresponding to the second second-order derivative; Obtain a first index in the data structure at the first moment and a second index in the data structure at the second moment; If the index of the array is consistent with the index of the data structure, determining the starting index of the current group of key purge data in the array according to the starting index of the current group of key purge data in the data structure, and determining the ending index of the current group of key purge data in the array according to the ending index of the current group of key purge data in the data structure; In the array, the elements between the start index and the first index are assigned a first hierarchical label, the elements between the first index and the second index are assigned a second hierarchical label, and the elements between the second index and the end index are assigned a third hierarchical label; wherein, The key purge data with the same name is a group of key purge data; under the same index, the elements in the array correspond one-to-one to the key purge parameters in the data structure.

5. The method according to claim 4, characterized in that If the index of the array is inconsistent with the index of the data structure, the method further includes: Determine a first index quantity corresponding to the first index according to the starting index of the current group of key purge data in the data structure and the first index; starting from the first element in the array whose element value is 0, assign the element of the first index quantity to a first hierarchical label; When the first hierarchical label is set, the element whose first element value is 0 is searched again in the array, a second index quantity is determined according to the first index and the second index, and starting from the element whose first element value is 0 that is searched again, the elements of the second index quantity are assigned a second hierarchical label; When the second hierarchical label is set, the element whose first element value is 0 is searched again in the array, and the third index quantity is determined according to the second index and the end index of the current group key purge data in the data structure. Starting from the element whose first element value is 0 that is re-searched, the elements of the third index quantity are assigned to the third hierarchical label.

6. The method according to claim 5, characterized in that The step of extracting the key purge data in layers based on the layered labels includes: Creating an array object, the index of the array object is consistent with the index of the data structure, and the data of the array object comes from the array; the array object is used to establish an association relationship between the data structure and the array; Based on the grouping function and the hierarchical label corresponding to each index in the array object, the key purge data with the first hierarchical label are grouped together to obtain a first data set; the key purge data with the second hierarchical label are grouped together to obtain a second data set; and the key purge data with the third hierarchical label are grouped together to obtain a third data set; The first data set is extracted according to the first hierarchical label, the second data set is extracted according to the second hierarchical label, and the third data set is extracted according to the third hierarchical label; wherein The first data set is a purge data set in the flow channel purge stage, the second data set is a purge data set in the gas diffusion layer purge stage, and the third data set is a purge data set in the proton exchange membrane purge stage.

7. The method according to claim 4, characterized in that The step of searching for a first second-order derivative satisfying a first stratification threshold value among all second-order derivatives and searching for a second second-order derivative satisfying a second stratification threshold value comprises: If there is no second-order derivative equal to the first stratification threshold value among all second-order derivatives, and there is no second-order derivative equal to the second stratification threshold value, starting from the first second-order derivative, it is determined in sequence whether the absolute value of the first difference between each current second-order derivative and the first stratification threshold value is less than the first threshold value; if it is determined to be less than the first threshold value, the first current second-order derivative corresponding to the difference less than the first threshold value is determined as the first second-order derivative; Starting from the next second-order derivative of the first second-order derivative, determine in turn whether the absolute value of the second difference between each current second-order derivative and the second stratification threshold is less than the second threshold; if it is determined to be less than the second threshold, determine the first current second-order derivative corresponding to the second threshold as the second second-order derivative.

8. The method according to claim 4, characterized in that The step of searching for a first second-order derivative satisfying a first stratification threshold value among all second-order derivatives and searching for a second second-order derivative satisfying a second stratification threshold value comprises: If there are multiple first current second-order derivatives equal to the first stratification threshold among all the second-order derivatives, determining the first first current second-order derivative as the first second-order derivative; If there are a plurality of second current second-order derivatives equal to the second stratification threshold among all the second-order derivatives, the first second current second-order derivative is determined as the second second-order derivative.

9. A device for obtaining shutdown scan data of a fuel cell stack, characterized in that: The device comprises: A first extraction unit is used to extract key purge data corresponding to the shutdown purge stage of the stack from each full data subfolder for all full data subfolders; A determination unit, used to determine a stratification label for key purge data of all full data subfolders according to a preset stratification threshold; The second extraction unit is used to perform hierarchical extraction on the key purge data based on the hierarchical labels to obtain a purge data set of a flow channel purge stage, a purge data set of a gas diffusion layer purge stage, and a purge data set of a proton exchange membrane purge stage.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.