Dynamic variable-length coding analysis method for equipment
By establishing the coding feature library T0 and the simplified sorting coding feature library T, the parsing errors and fragmentation problems of dynamic variable-length coding are solved, and efficient automatic parsing and management of device information are achieved.
Patent Information
- Application Number
- CN202510592687.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-09
- Publication Date
- 2025-09-23
AI Technical Summary
When parsing dynamic variable-length codes for buildings and transportation equipment, existing technologies have problems such as no explicit segmentation features, nested and overlapping feature segments, multiple interpretation ambiguities, and fragmented parsing results, resulting in low parsing efficiency and poor accuracy.
Establish a coding feature library T0, sort and search by length of feature codes to form a simplified sorted coding feature library T, match the codes A to be parsed one by one, use the decoded set COM and the undecoded set UNm to score, and determine the optimal parsing result.
It improves the accuracy and efficiency of code parsing, reduces character fragmentation, realizes the automated management of device information, and reduces the need for manual intervention.
Smart Images

Figure CN120688478A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of device code analysis, and in particular to a device dynamic variable-length code analysis method. Background Art
[0002] In the fields of construction and transportation engineering, the coding systems for equipment such as air conditioners and rail transit generally use a composite string structure, using coded segments to represent equipment models, performance parameters, and configuration features. Existing technologies mostly implement information parsing based on fixed-length coding rules or explicit delimiters (such as "-" / "_"). This is done by extracting parameters through predefined field positions. However, as the degree of equipment customization increases, the proportion of dynamic-length coding has increased significantly, and the parsing of dynamic-length coding has the following technical pain points:
[0003] 1. No explicit segmentation feature: The encoded string consists of multiple variable-length feature segments concatenated continuously (such as "SGCR1000E30D31SUS1PDF25tWA1"), lacking a unified separation mark, making traditional position segmentation methods ineffective;
[0004] Nested and overlapping feature segments: A short feature code may be a subset of a long feature code (such as "CR" and "SGCR"). Simple forward matching can easily lead to misinterpretation.
[0005] 2. Multiple interpretation ambiguity: The same code may have multiple reasonable splitting methods (for example, "SUS1" can be parsed as "SUS+1" or independent codes), and existing technologies lack a quantitative evaluation mechanism;
[0006] 3. Fragmented residue: The conventional greedy algorithm is likely to produce unrecognizable character fragments (such as "5t" residue) after parsing, which requires manual secondary processing.
[0007] 4. The lack of a quantitative evaluation system for analysis results makes it difficult to automatically select the optimal analysis solution in multiple scenarios.
[0008] These defects have seriously restricted the informatization process of building and transportation equipment management. Summary of the Invention
[0009] The purpose of the present invention is to provide a method for parsing dynamic variable-length codes of devices to solve the problems of failure of a large number of devices to parse dynamic variable-length codes using traditional position segmentation methods, parsing errors caused by nested and overlapping long and short feature codes, and residual character fragmentation when using greedy algorithms, requiring manual secondary parsing.
[0010] In order to solve the above technical problems, the present invention provides a device dynamic variable length coding parsing method, comprising:
[0011] Provide dynamic variable length code A of the device to be parsed;
[0012] Establish a coding feature library T0 covering dynamic variable length coding of the device;
[0013]
[0014] In formula (1), T0 is the encoding feature library of the device’s dynamic variable length encoding, x1-x n is the feature code, y1-y n is the meaning corresponding to the feature code, and n is the code sequence number;
[0015] All feature codes in T0 are searched in A, and the feature codes and their meanings in T0 that do not contain characters in A are deleted to form a simplified code feature library. The feature codes in the simplified code feature library are sorted in descending order of character length to form a simplified sorted code feature library T:
[0016]
[0017] In formula (2), T is the simplified sorting encoding feature library of T0, x1-x m is the simplified feature encoding, y1-y m is the meaning corresponding to the simplified feature code, m is the simplified code sequence number, m≤n;
[0018] Search all feature codes in T in A one by one in order, and determine whether there is a string in A that is completely consistent with the feature code currently in order in T. If so, extract the feature code currently in order in T and its meaning into the decoding set, and delete the string in A that is completely consistent with the feature code currently in order in T to update A, and search for the feature code of the next order in T in A; otherwise, continue to search for the feature code of the next order in T in A;
[0019] Determine whether all characters in A are extracted into the decoding set. If so, perform integrity analysis on A based on the meaning corresponding to the feature codes in the decoding set; otherwise, search for the subsequent feature codes in T in A.
[0020] Furthermore, the device dynamic variable length coding parsing method provided by the present invention further includes:
[0021] Determine whether there is an unretrieved feature code in T. If so, continue to search for the subsequent feature codes in T in A until the last feature code in T is retrieved, and extract the unparsed strings in A to the undecoded set UN m Otherwise, end this search.
[0022] Furthermore, the device dynamic variable length coding parsing method provided by the present invention further includes:
[0023] Take the first feature code to the mth feature code in T as the pre-search order, and perform m retrieval and analysis on all feature codes in T according to the order of feature codes from front to back, and get the decoding sets COM1 to COM m and the corresponding undecoded set UN m1 -UN m , by decoding the set COM1 to COM m Perform m completeness analysis on A;
[0024] According to formula (3), the parsing results of A after performing m complete parsings are scored, and the decoding set corresponding to the highest score is determined as the optimal parsing result of A;
[0025] Q m =Q str -Q L -Q UNm (3);
[0026] In formula (3), Q m is the score value of the decoding set corresponding to a certain encoding analysis, Q str is the total length of characters in the decoding set, Q L is the number of feature codes in the decoding set, Q UNm The undecoded set UN parsed for this encoding m The total length of characters in .
[0027] Furthermore, in the equipment dynamic variable length code parsing method provided by the present invention, the construction equipment dynamic variable length code A is composed of two or more of letters, numbers, underscores and hyphens.
[0028] Furthermore, the device dynamic variable length coding parsing method provided by the present invention, after searching all feature codes in T0 in A, forms a simplified coding feature library by extracting character strings in A that are completely consistent with the feature codes in T0 and their meanings.
[0029] Furthermore, the device dynamic variable length coding parsing method provided by the present invention incrementally updates the coding feature library T0 of the device's dynamic variable length coding.
[0030] Compared with the prior art, the device dynamic variable length coding parsing method provided by the present invention has the following beneficial effects:
[0031] By searching the feature codes in the code feature library T0 in the device dynamic variable length code A to be parsed, a simplified sorted code feature library T for A is formed. All feature codes in T are sorted in descending order by character length and searched one by one in A to reduce the amount of feature code data in T. It is determined whether there is a character string in A that is completely consistent with the currently sorted feature code in T. In this way, the device dynamic variable length code A is completely parsed by decoding the meaning corresponding to the feature codes in the set, thereby improving the efficiency of code parsing.
[0032] By sorting all the feature codes in T from long to short according to the length of characters and searching A one by one in A for completeness parsing of A, feature codes with longer character lengths can be parsed first, avoiding the situation where the short feature codes are parsed first in the string of long and short feature codes that are nested and overlapped in A, resulting in parsing errors caused by the long feature codes being split. It also avoids the problem of parsing failure of the position segmentation method, the problem of unrecognizable character fragments easily generated after parsing by the greedy algorithm, and the problem that the same code may have multiple reasonable splitting methods resulting in splitting and parsing errors. The feature code length priority sorting strategy is used to solve the problem of parsing conflicts between long and short feature codes, and has the advantage of high parsing accuracy.
[0033] By performing integrity analysis on the dynamic variable-length codes of equipment, automatic analysis of the dynamic variable-length codes of a large number of equipment can be achieved, thereby improving the information management and analysis efficiency of equipment such as construction equipment and rail transit. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 A flowchart of a method for parsing a dynamic variable length code of a device;
[0035] Figure 2 It is a flowchart of the scoring mechanism. DETAILED DESCRIPTION
[0036] The present invention will be described in detail below with reference to the accompanying drawings. The advantages and features of the present invention will become more apparent from the following description. It should be noted that the drawings are all in a very simplified form and are not accurately scaled, and are only used to facilitate and clearly illustrate the embodiments of the present invention.
[0037] Please refer to Figures 1 to 2 , an embodiment of the present invention provides a device dynamic variable length coding parsing method, comprising:
[0038] Step S1: Provide the dynamic variable-length code A of the device to be parsed. The dynamic variable-length code A can consist of letters and numbers. To improve parsing capabilities and compatibility with various device codes, the dynamic variable-length code A can also include underscores and dashes. For example, the dynamic variable-length code A of a building equipment (air conditioning unit) is SGCR1000E30D31SUS1PDF25tWA1.
[0039] Step S2: Establish a coding feature library T0 covering the dynamic variable length coding of the device, where the structure of T0 is:
[0040]
[0041] In formula (1), T0 is the encoding feature library of the device's dynamic variable length encoding (abbreviated as encoding feature library), x1-x n is the feature code, y1-y n is the meaning corresponding to the feature code, and n is the code sequence number. That is, the coding feature library T0 includes all character segments of feature codes with meanings and their specific meanings. To adapt to the parsing capabilities of dynamic variable-length codes for newly added devices and expand their scope of application, the coding feature library T0 can be incrementally updated. That is, the coding feature library T0 can be expanded to expand the feature codes and their meanings.
[0042] The specific encoding feature library T0 can be expressed as formula 1.1:
[0043]
[0044] In formula 1.1, in the data structure of the coding feature library T0, the left column is the feature code, and the right column is the meaning corresponding to the feature code.
[0045] Step S3: Search all feature codes in the code feature library T0 in the device dynamic variable-length code A to be parsed, delete the feature codes and their meaning data in T0 that do not contain the characters in the device dynamic variable-length code A to be parsed to form a simplified code feature library, that is, form the simplified code feature library by deletion. Alternatively, the simplified code feature library can be formed by extracting character strings in A that are completely consistent with the feature codes in T0 and their meanings, that is, form the simplified code feature library by extraction, wherein the extraction includes deletion extraction and copy extraction; the feature codes in the simplified code feature library and their meanings are sorted in descending order of character length to form a simplified sorted code feature library T:
[0046]
[0047] In formula (2), T is the simplified sorting encoding feature library of T0, x1-xm is the simplified feature encoding, y1-y m is the meaning corresponding to the simplified feature code, m is the simplified code sequence number, m≤n. Wherein m and n are both positive integers.
[0048] The simplified sorted coding feature library T obtained by simplifying and sorting Formula 1.1 is Formula 2.2:
[0049]
[0050] In formula 2.2, in the data structure of the encoding feature library T, the left column is the feature encoding corresponding to x1-x m , the right side is the meaning of the feature code, that is, y1-y m In formula 2.2, m=15.
[0051] Step S4: Search all feature codes in the simplified sorting code feature library T in A one by one according to their sorting order, and determine whether there is a string in A that is completely consistent with the feature code currently sorted in the simplified sorting code feature library T, where a string refers to a continuous character. If so, extract the feature code currently sorted in T and its meaning into the decoding set COM, and delete the string in A that is completely consistent with the feature code currently sorted in T to update the device dynamic variable length code A, and search for the feature code of the next sort in the simplified sorting code feature library T in A; otherwise, continue to search for the feature code of the next sort in the simplified sorting code feature library T in A, and do not update A at this time. Specifically:
[0052] Step S4-1:
[0053] Encode the first feature in T x1 = PDF25t
[0054] A is searched in A=SGCR1000E30D31SUS1PDF25tWA1. At this time, PDF25t exists in A. PDF25t in T and its meaning are extracted and added to the decoding set COM1. At this time, the decoding set COM1 only includes PDF25t in T and its meaning. PDF25t is deleted from A to update A. At this time, the code A=('SGCR1000E30D31SUS1','WA1'); in order to avoid parsing errors caused by the preceding and following characters of the updated A being connected to form a feature code that is not retrieved in T after the corresponding string is deleted or extracted, the broken sections of the deleted or extracted string can be separated by delimiters such as commas, and the characters before and after the break can be quoted by single quotes or double quotes.
[0055] Step S4-2:
[0056] Encode the second feature x in T2= SGCR is searched in A = ('SGCR1000E30D31SUS1', 'WA1'). If SGCR exists in A, the SGCR in T and its meaning are extracted and added to the decoding set COM1. The SGCR in A is deleted. At this time, the decoding set COM1 includes the SGCR, PDF25t and its meaning in T. The updated A = ('1000E30D31SUS1', 'WA1').
[0057] Step S4-3:
[0058] Encode the third feature x in T 3= 1000 is searched in A = ('1000E30D31SUS1', 'WA1'). 1000 exists in A. 1000 in T and its meaning are extracted and added to the decoding set COM1. 1000 in A is deleted. At this time, the decoding set COM1 includes SGCR, 1000, PDF25t and their meanings in T. The updated A = ('E30D31SUS1', 'WA1').
[0059] Step S4-4:
[0060] Encode the fourth feature x in T 4= SUS1 is searched in A = ('E30D31SUS1', 'WA1'). SUS1 exists in A. SUS1 in T is extracted and added to the decoding set COM1. SUS1 in A is deleted. The decoding set COM1 now includes SGCR, 1000, SUS1, PDF25t and their meanings in T. The updated A = ('E30D31', 'WA1'). After executing step S4-4, since the string SUS1 in A is deleted, the eighth feature encoding x in T will not be performed. 8= That is, when A=SGCR1000E30D31SUS1PDF25tWA1 contains the nested and repeated long and short feature codes "SUS1" and "SUS", but because SUS1 in A is in the fourth feature code x in T, 4= In the process of SUS1 parsing A, it is parsed first and SUS1 is deleted after parsing. Therefore, in the eighth feature code x 8= When SUS parses A, it does not perform a secondary parsing of SUS, nor does it generate incorrect parsing or fragmentation of SUS1 in A due to the repeated nested long and short feature codes "SUS1" and "SUS" in T during sorting. This improves the parsing accuracy of A.
[0061] Step S4-5:
[0062] Encode the fifth feature x in T5= E30 is searched in A = ('E30D31', 'WA1'). E30 exists in A. E30 in A is extracted and added to the decoding set COM1. E30 in A is deleted. At this time, the decoding set COM1 includes SGCR, 1000, E30, SUS1, PDF25t in T and their meanings. The updated A = ('D31', 'WA1').
[0063] Steps S4-6:
[0064] Encode the sixth feature x in T 6= D31 is searched in A = ('D31', 'WA1'). D31 exists in A. D31 in A is extracted and added to the decoding set COM1. D31 in A is deleted. At this time, the decoding set COM1 includes SGCR, 1000, E30, D31, SUS1, PDF25t in T and their meanings. The updated A = ('WA1').
[0065] Steps S4-7:
[0066] Encode the seventh feature x in T 7= PDF is searched in A=('WA1'), PDF does not exist in A, and the set UN is not decoded at this time. m Is an empty set.
[0067] Steps S4-8:
[0068] Encode the eighth feature x in T 8= WA1 is searched in A=('WA1'). WA1 exists in A. WA1 in A is extracted and added to the decoding set COM1. WA1 in A is deleted. At this time, the decoding set COM1 includes SGCR, 1000, E30, D31, SUS1, PDF25t, WA1 in T and their meanings. The updated A=(), that is, the code of A is empty, that is, after the eighth search, all codes in A are parsed, so A is empty.
[0069] Steps S4-9:
[0070] Encode the ninth feature x in T 9= SUS is searched in A=(), and SUS does not exist in A at this time, and the set UN is not decoded. m It is an empty set. In this case, in step S4-9, no operation is performed on the decoding set COM1, and there is no need to update A.
[0071] Steps S4-10:
[0072] Encode the tenth feature x in T 10=CR is searched in A=(). At this time, CR does not exist in A and the undecoded set UN is m The principle for resolving the conflict between the nested long and short feature codes of CR and SGCR in A is the same as that for SUS1 and SUS. The principle for resolving the conflict between the nested long and short feature codes will not be elaborated on later.
[0073] Step S4-11:
[0074] Encode the eleventh feature in T x 11= PD is searched in A=(), at this time PD does not exist in A, and the undecoded set UN m Is an empty set.
[0075] Step S4-12:
[0076] Encode the twelfth feature in T x 12= R is searched in A=(), and R does not exist in A at this time, and the undecoded set UN m Is an empty set.
[0077] Step S4-13:
[0078] Encode the thirteenth feature in T x 13= 1 is searched in A=(), but 1 does not exist in A at this time, and the undecoded set UN m Is an empty set.
[0079] Step S4-14:
[0080] Encode the fourteenth feature x in T 13= 2 is searched in A=(), but 2 does not exist in A at this time, and the set UN is not decoded. m Is an empty set.
[0081] Step S4-15:
[0082] Encode the fifteenth feature in T x 13= 3 is searched in A=(), but 3 does not exist in A at this time, and the undecoded set UN m Is an empty set.
[0083] In step S4, the first feature code x1=PDF25t in T is used as the pre-search order, x2-x m Execute in sequence, where m=15, that is, the parsing order is x1-x 15 .
[0084] Step S5, determine whether all the characters in A are extracted into the decoding set, that is, whether the characters in A are an empty set. If so, perform integrity analysis on A through the meaning corresponding to the feature codes in the decoding set COM; otherwise, search for the subsequent feature codes in the simplified sorting code feature library T in A.
[0085] The device dynamic variable-length code parsing method provided by an embodiment of the present invention searches for feature codes in a code feature library T0 in the device dynamic variable-length code A to be parsed, thereby forming a simplified sorted code feature library T for A. All feature codes in T are sorted one by one in A by character length from longest to shortest, thereby reducing the amount of feature code data in T. It is determined whether there is a character string in A that is completely consistent with the currently sorted feature code in T. The device dynamic variable-length code A is then completely parsed by decoding the meaning corresponding to the feature codes in the set, thereby improving the code parsing efficiency.
[0086] The embodiment of the present invention provides a device dynamic variable length code parsing method, which performs integrity parsing of A by sorting all feature codes in T from long to short according to character length and searching A one by one in A. Feature codes with longer character lengths can be parsed first, avoiding the situation in which the short feature code is parsed first in a character string with nested and overlapping long and short feature codes in A, causing the long feature code to be split and causing parsing errors. It also avoids the problem of parsing failure of the position segmentation method, the problem of unrecognizable character fragments easily generated after parsing by the greedy algorithm, and the problem of splitting and parsing errors caused by the possibility of multiple reasonable splitting methods for the same code. The feature code length priority sorting strategy is used to solve the problem of parsing conflicts between long and short feature codes, and has the advantage of high parsing accuracy.
[0087] The device dynamic variable length code parsing method provided in the embodiment of the present invention can realize the automatic parsing of a large number of device dynamic variable length codes by performing integrity parsing on the device dynamic variable length codes, thereby improving the information management and parsing efficiency of equipment such as construction equipment and rail transit.
[0088] In order to further improve the parsing accuracy of the device dynamic variable length code A, the following may also be included:
[0089] Step S6: Determine whether there is any unretrieved feature code in T. If so, continue to search for the subsequent feature codes in T in A until the last feature code in T is retrieved, and extract the unparsed character strings in A into the undecoded set UN. m Otherwise, end this search.
[0090] Step S7, respectively, with the 1st feature code to the mth feature code in the simplified sorting code feature library T as the pre-search order, and according to the feature code in the simplified sorting code feature library T from front to back, perform m search and analysis on all feature code pairs A in the simplified sorting code feature library T, and obtain the decoding sets COM1 to COM m and the corresponding undecoded set UN m1 -UN m , by decoding the set COM1 to COM m Perform m completeness parsing on A.
[0091] Step S8: Score the parsing results of m completeness parsings of A according to formula (3), and determine the decoding set corresponding to the highest score as the optimal parsing result of the device dynamic variable length code A:
[0092] Q m =Q str -Q L -Q UNm (3);
[0093] In formula (3), Q m is the score value of the decoding set corresponding to a certain encoding analysis, Q str is the total length of characters in the decoding set, Q L is the number of feature codes in the decoding set, Q UNm The undecoded set UN parsed for this encoding m The total length of characters in .
[0094] The decoding set COM1 to COM m The analysis results and scoring values for A are as follows:
[0095] COM1=(SGCR,1000,E30,D31,PDF25t,WA1,SUS1)UN1=() Score:
[0096] Q1=27-7-0=20. The feature code retrieval order in T corresponding to COM1 is x1-x 15 . That is, x1 is the preceding search order.
[0097] COM2=(SGCR,1000,E30,D31,PDF25t,WA1,SUS1)UN2=() Score:
[0098] Q2=27-7-0=20. The feature code retrieval order in T corresponding to COM2 is x2, x1, x3-x 15 . That is, x2 is the preceding search order.
[0099] COM3=(SGCR,1000,E30,D31,PDF25t,WA1,SUS1)UN3=() Score:
[0100] Q3=27-7-0=20. The feature code retrieval order in T corresponding to COM3 is x3, x1-x2, x4-x 15 . That is, x3 is the preceding search order.
[0101] COM4=(SGCR,1000,E30,D31,PDF25t,WA1,SUS1)UN4=() Score:
[0102] Q4=27-7-0=20. The feature code retrieval order in T corresponding to COM4 is x4, x1-x3, x5-x 15 That is, x4 is the pre-search order, and the search order of the decoding set with the post-search times is the same as COM3 and will not be elaborated on later.
[0103] COM5=(SGCR,1000,E30,D31,PDF25t,WA1,SUS1)UN5=() Score:
[0104] Q5=27-7-0=20.
[0105] COM6=(SGCR,1000,E30,D31,PDF25t,WA1,SUS1)UN6=() Score:
[0106] Q6=27-7-0=20.
[0107] COM7=(SGCR,1000,E30,D31,PDF,WA1,SUS1,2)UN7=(5t)Score:
[0108] Q7=25-8-2=15.
[0109] COM8=(SGCR,1000,E30,D31,PDF25t,WA1,SUS1)UN8=() Score:
[0110] Q8=27-7-0=20.
[0111] COM9=(SGCR,1000,E30,D31,PDF25t,WA1,SUS,1)UN9=() Score:
[0112] Q8=27-8-0=19.
[0113] COM 10=(CR,1000,E30,D31,PDF25t,WA1,SUS1)UN 10 =(SG) score:
[0114] Q9=25-7-2=16.
[0115] COM 11 =(SGCR,1000,E30,D31,PD,WA1,SUS1,2)UN 11 =(F,5t) score:
[0116] Q 11 =24-8-3=13.
[0117] COM 12 =(1000,E30,D31,PDF25t,WA1,R,SUS1)UN 12 =(SGC) score:
[0118] Q 12 =24-7-3=14.
[0119] COM 13 =(SGCR,E30,PDF25t,SUS,1,1,1,1,3)UN 13 =(000,D,WA) score:
[0120] Q 13 =21-9-6=6.
[0121] COM 14 =(SGCR,1000,E30,D31,PDF,WA1,SUS1,2)UN 14 =(5t) score:
[0122] Q 14 =25-8-2=15.
[0123] COM 15 =(SGCR,1000,PDF25t,WA1,SUS1,1,3,3)UN 15 =(E,0D) score:
[0124] Q 15 =24-8-3=13.
[0125] For ease of understanding, the following decoding set COM obtained from the thirteenth decoding process is 13 The analysis results are described in detail:
[0126] 1. The 13th analysis, x in T 13=1, parsing result ("1", "1", "1", "1"), undecoded set: ("
[0127] SGCR","000E30D3","SUS","PDF25tWA");
[0128] 2. Parse the first feature code PDF25t in T, and the parsing result is ("PDF25t", "1", "1", "1", "1"), and the undecoded set:
[0129] ("SGCR","000E30D3","SUS","WA");
[0130] 3. Parse SGCR, parsing results ("SGCR", "PDF25t", "1", "1", "1", "1"), undecoded set: ("000E30D3", "SUS", "
[0131] WA”);
[0132] 4. Parsing 1000, no match, parsing results ("SGCR", "PDF25t", "1", "1", "1", "1"), undecoded set:
[0133] ("000E30D3","SUS","WA");
[0134] 5. Parsing SUS1, no match, parsing results ("SGCR", "PDF25t", "1", "1", "1", "1"), undecoded set:
[0135] ("000E30D3","SUS","WA");
[0136] 6. Parse E30, parsing results ("SGCR", "E30", "PDF25t", "1", "1", "1", "1"), undecoded set:
[0137] ("000","D3","SUS","WA");
[0138] 7. Parsing D31, no match, parsing results ("SGCR", "E30", "PDF25t", "1", "1", "1", "1"), undecoded set: ("000", "D3", "SUS", "WA");
[0139] 8. Parse PDF, no match, parsing results ("SGCR", "E30", "PDF25t", "1", "1", "1", "1"), undecoded set: ("000", "D3", "SUS", "WA");
[0140] 9. Parsing WA1, no match, parsing results ("SGCR", "E30", "PDF25t", "1", "1", "1", "1"), undecoded set: ("000", "D3", "SUS", "WA");
[0141] 10. Parse SUS, parsing results ("SGCR", "E30", "PDF25t", "SUS", "1", "1", "1", "1"), undecoded set: ("000", "D3", "WA");
[0142] 11. Parsing CR, no match, parsing results ("SGCR", "E30", "PDF25t", "SUS", "1", "1", "1", "1"), undecoded set: ("000", "D3", "WA");
[0143] 12. Parsing PD, no match, parsing results ("SGCR", "E30", "PDF25t", "SUS", "1", "1", "1", "1"), undecoded set: ("000", "D3", "WA");
[0144] 13. Parsing PD, no match, parsing results ("SGCR", "E30", "PDF25t", "SUS", "1", "1", "1", "1"), undecoded set: ("000", "D3", "WA");
[0145] 14. Parse R, no match, parsing results ("SGCR", "E30", "PDF25t", "SUS", "1", "1", "1", "1"), undecoded set: ("000", "D3", "WA");
[0146] 15. Parsing 2, no match, parsing results ("SGCR", "E30", "PDF25t", "SUS", "1", "1", "1", "1"), undecoded set: ("000", "D3", "WA");
[0147] 16. Parsing 3, parsing results ("SGCR", "E30", "PDF25t", "SUS", "1", "1", "1", "1", "1"), undecoded set: ("000", "D", "WA");
[0148] From the scores, it is clear that the parsing results with a score of 20 are the highest. Take one of the sets COM1 = (SGCR, 1000, E30, D31, PDF25t, WA1, SUS1) as the parsing result. The overall meaning of the parsing result corresponding to the air conditioner code A = SGCR1000E30D31SUS1PDF25tWA1 mapped from the decoding set COM1 is:
[0149] AC horizontal concealed type, air volume: 1000m 3 / h, standard static pressure 30Pa, four-pipe system (3 cooling + 1 heating double coil), lower return air box aluminum mesh 25t, design serial number: WA1, stainless steel - extended condensate tray (+100mm)
[0150] The device dynamic variable length coding parsing method provided by the embodiment of the present invention also has the following technical effects:
[0151] Improved parsing accuracy:
[0152] 1. Improved feature conflict resolution rate: By prioritizing feature length, the accuracy of nested feature codes (such as "SGCR" and "CR") is improved.
[0153] 2. Multi-solution decision optimization: reference scoring mechanism, scoring mechanism is based on character utilization (COM m Character length / COM m The number of feature codes) and the fragmentation penalty (UN in A m string length), making the optimal solution more accurate.
[0154] Innovation in engineering management efficiency:
[0155] 1. Breakthrough in parsing speed: The average processing time for a single code is ≤50ms, and it can support batch parsing of 2000+ codes per second, meeting the real-time update requirements of equipment databases in large projects.
[0156] 2. Reduced labor costs: Automated analysis eliminates the need for manual secondary analysis, reducing the workload of manual review and reducing the error rate of equipment information entry from 8.7% to 0.5%.
[0157] Enhanced technical scalability:
[0158] 1. Incremental compatibility of encoding feature library T0: Supports incremental updates of encoding feature code T0 (such as the newly added "WA2" feature code) without the need to reconstruct the parsing algorithm.
[0159] 2. Cross-domain applicability: This method can be applied to the parsing of rail transit equipment codes (such as "BJ-SF15A-ECU01"), with a generalization error rate of <3%. It is also applicable to various construction equipment, including but not limited to construction equipment and building energy equipment.
[0160] The present invention is not limited to the specific embodiments described above. Obviously, the embodiments described above are only some embodiments of the embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention described, all other embodiments obtained by ordinary technicians in this field fall within the scope of protection of the present invention. Those skilled in the art can make other levels of modifications and changes to the present invention. In this way, if these modifications and changes of the present invention fall within the scope of the claims of the present invention, the present invention is also intended to include these changes and changes.
Claims
1. A device dynamic variable length coding parsing method, characterized in that: include: Provide dynamic variable length code A of the device to be parsed; Establish a coding feature library T0 covering dynamic variable length coding of the device; In formula (1), T0 is the encoding feature library of the device’s dynamic variable length encoding, x1-x n is the feature code, y1-y n is the meaning corresponding to the feature code, and n is the code sequence number; All feature codes in T0 are searched in A, and the feature codes and their meanings in T0 that do not contain characters in A are deleted to form a simplified code feature library. The feature codes in the simplified code feature library are sorted in descending order of character length to form a simplified sorted code feature library T: In formula (2), T is the simplified sorting encoding feature library of T0, x1-x m is the simplified feature encoding, y1-y m is the meaning corresponding to the simplified feature code, m is the simplified code sequence number, m≤n; Search all feature codes in T in A one by one in order, and determine whether there is a string in A that is completely consistent with the feature code currently in order in T. If so, extract the feature code currently in order in T and its meaning into the decoding set, and delete the string in A that is completely consistent with the feature code currently in order in T to update A, and search for the feature code of the next order in T in A; otherwise, continue to search for the feature code of the next order in T in A; Determine whether all characters in A are extracted into the decoding set. If so, perform integrity analysis on A based on the meaning corresponding to the feature codes in the decoding set; otherwise, search for the subsequent feature codes in T in A.
2. The device dynamic variable length coding parsing method according to claim 1, characterized in that: Also includes: Determine whether there is an unretrieved feature code in T. If so, continue to search for the subsequent feature codes in T in A until the last feature code in T is retrieved, and extract the unparsed strings in A to the undecoded set UN m Otherwise, end this search.
3. The device dynamic variable length coding parsing method according to claim 2, characterized in that: Also includes: Take the first feature code to the mth feature code in T as the pre-search order, and perform m retrieval and analysis on all feature codes in T according to the order of feature codes from front to back, and get the decoding sets COM1 to COM m and the corresponding undecoded set UN m1 -UN m , by decoding the set COM1 to COM m Perform m completeness analysis on A; According to formula (3), the parsing results of A after performing m complete parsings are scored, and the decoding set corresponding to the highest score is determined as the optimal parsing result of A; Q m =Q str -Q L -Q UNm (3); In formula (3), Q m is the score value of the decoding set corresponding to a certain encoding analysis, Q str is the total length of characters in the decoding set, Q L is the number of feature codes in the decoding set, Q UNm The undecoded set UN parsed for this encoding m The total length of characters in .
4. The device dynamic variable length coding parsing method according to claim 1, characterized in that: The construction equipment dynamic variable length code A is composed of two or more of letters, numbers, underscores, and hyphens.
5. The device dynamic variable length coding parsing method according to claim 1, characterized in that: After searching all feature codes in T0 in A, a simplified coding feature library is formed by extracting character strings in A that are completely consistent with the feature codes in T0 and their meanings.
6. The device dynamic variable length coding parsing method according to claim 1, characterized in that: The coding feature library T0 of the dynamic variable length coding of the construction equipment is incrementally updated.