A data processing method, device, computer device, and storage medium
By establishing a dynamic sorting model among fields, the problems of incorrect field attribution and misjudgment of execution scope in data processing in existing technologies are solved, thereby improving the ability to adapt to different structures and allocate tasks, and ensuring the stability and accuracy of data processing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-14
- Publication Date
- 2026-04-07
AI Technical Summary
Existing technologies cannot achieve stable mapping between fields when processing data with inconsistent structures or unstable formats. This can easily lead to errors in field attribution and misjudgment of execution scope, resulting in processing chaos and output failure.
By obtaining the field label order in structured data, locating the first and repeated positions, analyzing the changes in adjacent field combinations, establishing a dynamic sorting model between fields, and combining the label belonging status and the differences in adjacent combinations, the arrangement conditions and belonging positions of fields in the structure are determined, and order adjustment and structure preservation operations are performed to realize the allocation of field processing tasks and result mapping.
It enhances the data processing's ability to adapt to different data structures, identify sequences, and allocate tasks, while avoiding interference from mixed data structures, thus ensuring the stability and accuracy of data processing.
Smart Images

Figure CN121501805B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, in particular to a data processing method and device, computer equipment and a storage medium. BACKGROUND
[0002] The technical field of data processing belongs to the basic application direction of information processing and electronic calculation, mainly involving numerical operation, logical judgment, data format conversion, field identification, sorting and classification, and output reconstruction on raw data. The core matters of this field include data collection accuracy, processing rule setting, operation efficiency control, and result format consistency. Usually, input data is processed to obtain target output by setting fixed execution path, calling predefined function library, executing nested loop statements and conditional branch judgment, etc. Among them, the traditional data processing method refers to the processing scheme of performing format analysis, numerical operation or text conversion operation on input data according to fixed format or field characteristics. The technical matters it aims at include field identification deviation caused by inconsistent data formats, calculation abnormalities caused by numerical type and structure changes, and processing interruption caused by missing execution order and logical conditions. The traditional method usually completes the data processing task by manually setting delimiters for field splitting, calling standard functions for numerical conversion, using discrimination statements to control execution path, and arranging fixed logical sequence through sequential scripts.
[0003] The existing technology takes delimiter splitting and function calling as the basic processing means, and the processing logic depends on the inherent position of the field. It lacks a perception mechanism for changes in the order of fields in structural differences, and cannot realize the correlation identification between fields in the scene where the order of fields is inconsistent or combined. The processing flow does not have the ability to dynamically compare structures, and is prone to field attribution errors and execution range misjudgment problems. The arrangement of fields cannot establish a stable mapping relationship between variable structures, and often appears structural drift, processing confusion and output failure in data processing with unstable structure or format. SUMMARY
[0004] In order to solve the technical problems existing in the prior art, the embodiments of the present application provide a data processing method, device, computer equipment and storage medium, which include the following steps:
[0005] In order to achieve the above purpose, the present application adopts the following technical scheme: a data processing method, comprising the following steps:
[0006] S1: obtaining the order of field labels in structured data, locating the first and repeated positions, analyzing the combination changes of adjacent fields, mapping the order relationship, and obtaining a field arrangement fluctuation identification set;
[0007] S2: Based on the variable field index in the field arrangement fluctuation identifier set, extract the same label field in the current structure, find the corresponding position in the original structure, determine the structure positioning status, and obtain the field structure belonging status set;
[0008] S3: Based on the field number in the field structure belonging status set, extract the upper and lower adjacent field label combinations, compare them with the combination order of the corresponding positions in the template structure, and trace the arrangement mapping path through the matching between combinations to obtain the upper and lower structure consistent record set;
[0009] S4: Based on the consistent record set of the upper and lower structures and the field structure belonging status set, compare the field order and position process, extract the arrangement conditions and corresponding status information of the fields in the structure, associate the field numbers, and obtain the field processing task allocation list.
[0010] S5: Based on the field number in the field processing task allocation list, select the corresponding data processing method according to the structural operation requirements indicated by the field status, perform the order adjustment, structure removal and retention operations, and obtain the data processing result status mapping table.
[0011] As a further embodiment of the present invention, the field arrangement fluctuation identifier set includes first occurrence index, repeated occurrence index, difference in adjacent field combinations, degree of order change, and order mapping between structures; the field structure belonging status set includes changed field number, position matching relationship, field with consistent label position, and structure placement status; the upper and lower structure consistency record set includes field number, upper and lower adjacent field combinations, template corresponding combinations, and combination order consistency; the field processing task allocation list includes field number and status condition, order matching information, position corresponding result, and processing input range; and the data processing result status mapping table includes field number, updated index, removed field content, and retained original structure.
[0012] As a further aspect of the present invention, the specific steps of S1 are as follows:
[0013] S101: Obtain field labels from structured data, assign numbers according to the order in which fields are first read in the structure, locate the first number position of the field label and the positions of all repeated numbers, retain the original positional relationship between the field label and its corresponding number in the data, and obtain the field number position information set;
[0014] S102: Based on the field number position information set, call the number items corresponding to the same field label in the difference structure, extract adjacent number pairs according to the number arrangement order, examine the number position of the number pair in the original structure and the difference structure, compare the changes in the position before and after, filter field number pairs with inconsistent order, and obtain the field number change sequence before and after.
[0015] S103: Based on the field numbers in the sequence of changes before and after the field numbers, track the positions corresponding to the numbered items in the original structure and the difference structure respectively, compare the positions of the same field numbers in the structure, analyze the changes in the position correspondence, and obtain the field arrangement fluctuation identifier set.
[0016] As a further aspect of the present invention, the specific steps of S2 are as follows:
[0017] S201: Based on the field numbers listed in the field arrangement fluctuation identifier set, retrieve the field tags with the same name from the current structure, extract the corresponding index positions according to the order of appearance, associate the field numbers with the positions of the tags, and obtain the field tag position sequence;
[0018] S202: Based on the field label position sequence, call the position data of the same numbered field in the original structure, compare the field positions in the current structure with those in the original structure, determine the field numbers with the same number but different positions, and obtain a list of field position differences;
[0019] S203: Based on the field number in the field position difference list, track the position of the number in the original structure and the current structure, compare whether the position has overlapping segment characteristics, analyze whether it belongs to the original structure position, and obtain the field structure belonging status set.
[0020] As a further aspect of the present invention, the specific steps of S3 are as follows:
[0021] S301: Based on the field numbers provided in the field structure attribution status set, retrieve the tag content of the corresponding field in the order of the numbers, extract the tag names associated with the current number and the adjacent numbers, and slide through the tag sequence in the data structure to obtain the continuous sliding group of field tags;
[0022] S302: Based on the tag group information in the continuous sliding group of the field tags, locate the index position of the corresponding tag in the structure template, analyze the index order of the tags in the current structure and the template structure, remove the field numbers that have the same order, and obtain the field tag order correspondence set;
[0023] S303: Based on the field number corresponding to the field label sequence, extract the position index range of the number in the current structure and the template structure, filter according to the position difference of the index range, extract the field number group with the same trend of position association, and obtain the record set with consistent upper and lower structure.
[0024] As a further aspect of the present invention, the specific steps of S4 are as follows:
[0025] S401: Based on the field numbers in the upper and lower structure consistency record set and the field structure belonging status set, extract the position index of the field in the structure, determine the sorting status between the front and rear field labels by the index direction, determine whether the field has been returned to the original structure position, analyze the positional relationship of the labels before and after, and obtain the field status sequence feature set.
[0026] S402: Based on the sorting status and positioning information in the field status sequence feature set, retrieve entries in the field number that have label order gaps or misaligned positioning, split out a differentiated field set according to the difference in number attribution, and store the set numbers in the corresponding classification channel in order to obtain the field status partition number set.
[0027] S403: Based on the field number groups that have been distinguished in the field status partition number set, extract the position index range of the number in the current structure, expand the number-affected paragraphs, assign executable identifiers to the field number groups respectively, and output them to the data processing flow to obtain the field processing task allocation list.
[0028] As a further aspect of the present invention, the specific steps of S5 are as follows:
[0029] S501: Based on the field numbers listed in the field processing task allocation list, retrieve the field status corresponding to each number, extract the position adjustment requirements, deletion instructions and static status from the status information, and classify and split the field numbers according to the field processing attributes to obtain the field processing behavior mapping set.
[0030] S502: Based on the field number and processing attribute in the field processing behavior mapping set, retrieve the current index position of the number in the structural data, and perform the corresponding position change operation, position clearing action and position maintenance behavior. Output the processed field position number and the original structural position number in parallel to obtain the field position update sequence.
[0031] S503: Based on the index results of the fields in the updated sequence, extract the list of field indexes in the structure before processing, and check the consistency with the indexes corresponding to the field status after processing. Then, overwrite the original structure position with the updated field status to obtain the data processing result status mapping table.
[0032] A data processing apparatus, comprising:
[0033] The field arrangement detection module obtains all field labels in the structured data, extracts the corresponding index positions of the labels in sequence, finds the first and second indices of duplicate labels, analyzes the changes in the combination of adjacent fields, maps the order relationship, and obtains the field arrangement fluctuation identifier set.
[0034] The attribution status analysis module extracts field numbers with the same label based on the variable field index in the field arrangement fluctuation identifier set, finds the corresponding position in the original structure, checks the matching position in the template structure, judges the structure attribution status, and obtains the field structure attribution status set.
[0035] The consistency matching module extracts the labels of adjacent fields based on the field numbers in the field structure belonging status set, compares them with the combination order of the corresponding positions in the template structure, and traces the arrangement mapping path through the matching between combinations to obtain a consistent record set of upper and lower structures.
[0036] The task allocation and extraction module compares the field order and position process based on the consistent field index group of the upper and lower structures and the field structure belonging status set, extracts the arrangement conditions and corresponding status information of the fields in the structure, associates the field numbers, and obtains the field processing task allocation list.
[0037] The structure status output module extracts the position update, clear, and retain instructions in the processing status based on the field numbers to be processed in the field processing task allocation list, re-corresponds the numbers to their positions in the original structure, and forms a corresponding index mapping through the sorting relationship of the field numbers to obtain the data processing result status mapping table.
[0038] A data processing computer device includes a memory and a processor, characterized in that the memory stores a computer program, and the processor executes the computer program to implement a data processing device.
[0039] A data processing storage medium storing a computer program thereon, characterized in that the computer program, when executed by a processor, implements the steps of the data processing method as described above.
[0040] Compared with the prior art, the advantages and positive effects of the present invention are as follows:
[0041] In this invention, by extracting the field order fluctuation features and position mapping relationship, a dynamic sorting model between fields is established. Combining the label belonging status and the difference of adjacent combinations, the arrangement conditions and belonging positions of fields in the structure are determined. Based on the status information, order adjustment, content removal and structure retention operations are performed to limit the data processing scope, avoid interference from mixed structure use, and enhance the structure adaptability, order recognition ability, task allocation ability and result mapping ability. Attached Figure Description
[0042] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0043] Figure 1 This is a schematic diagram of the steps of the present invention;
[0044] Figure 2 This is a detailed schematic diagram of S1 of the present invention;
[0045] Figure 3 This is a detailed schematic diagram of S2 of the present invention;
[0046] Figure 4 This is a detailed schematic diagram of S3 of the present invention;
[0047] Figure 5 This is a detailed schematic diagram of S4 of the present invention;
[0048] Figure 6 This is a detailed schematic diagram of S5 of the present invention;
[0049] Figure 7 This is a flowchart of the equipment of the present invention. Detailed Implementation
[0050] The technical solution of the present invention will now be described with reference to the accompanying drawings.
[0051] In embodiments of the present invention, words such as "exemplarily," "for example," etc., are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" in the present invention should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the word "exemplary" is intended to present the concept in a concrete manner. Furthermore, in embodiments of the present invention, the meaning expressed by "and / or" can be both, or either one.
[0052] In the embodiments of this invention, the terms "image" and "picture" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning. Similarly, the terms "of," "corresponding (relevant)," and "corresponding" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning.
[0053] In this embodiment of the invention, sometimes a subscript such as W1 may be written in a non-subscript form such as W1. When the difference is not emphasized, the meaning they express is the same.
[0054] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.
[0055] Please see Figure 1 This invention provides a data processing method, comprising the following steps:
[0056] S1: Obtain all field labels in the structured data, locate the first and repeated occurrence index of the fields according to their order of appearance, analyze the differences between adjacent field combinations based on the field labels in the differentiated structure, evaluate the degree of change in the order of fields in the structure, map the order of field labels between differentiated structures, and obtain the field arrangement fluctuation identifier set.
[0057] S2: Based on the index of the variable field in the field arrangement fluctuation identifier set, extract the fields with the same label from the current structure, perform position association analysis according to the position of the corresponding field in the original structure, analyze the structural positioning of fields with the same label but changed arrangement position through the position matching process, and obtain the field structure belonging status set;
[0058] S3: Based on the field number in the field structure belonging status set, extract the combination formed by the labels of adjacent fields, compare it with the label combination order in the corresponding position in the structure template, match and track the arrangement relationship between the label combinations, extend to the order correspondence between the field combinations and the template structure, and obtain the upper and lower structure consistent record set;
[0059] S4: Based on the consistent record set of the upper and lower structure and the field structure belonging status set, by comparing the field status through the arrangement order and position correspondence, the status conditions of the field are defined according to the label order matching and position correspondence results, the condition information is matched with the field number, and extended to the required processing input range to obtain the field processing task allocation list.
[0060] S5: Based on the field numbers to be processed in the field processing task allocation list, and according to the status characteristics of the fields, match the executable data operation methods, update the position index of fields whose structure order needs to be adjusted in the structure, remove the corresponding content of fields that do not participate in the processing, retain the original structure settings of fields that have not changed, and obtain the data processing result status mapping table.
[0061] The field arrangement fluctuation identifier set includes first-occurrence index, repeated-occurrence index, differences in adjacent field combinations, degree of order change, and order mapping between structures. The field structure ownership status set includes changed field number, position matching relationship, fields with consistent label positions, and structure placement status. The upper and lower structure consistency record set includes field number, upper and lower adjacent field combinations, template corresponding combinations, and combination order consistency. The field processing task allocation list includes field number and status conditions, order matching information, position corresponding results, and processing input range. The data processing result status mapping table includes field number, updated index, removed field content, and retained original structure.
[0062] Please see Figure 2 The specific steps of S1 are as follows:
[0063] S101: Obtain field labels from structured data, assign numbers according to the order in which fields are first read in the structure, locate the first number position of the field label and the positions of all repeated numbers, retain the original positional relationship between the field label and its corresponding number in the data, and obtain the field number position information set;
[0064] First, retrieve the label string item for each field line by line from the raw data frame containing the field names. For each field label, the position where it is first read in the data needs to be numbered. This number is an integer, starting from 1 and incrementing sequentially. The numbering sequence is set accordingly. Assuming there is a set of field labels A, B, C, A, D, the labels are numbered 1, 2, 3, 4, 5 in sequence. Numbers 1 and 4 both correspond to label A. Therefore, number 1 is considered the initial numbering position, and number 4 is considered the repeating position. For the field labels after the initial numbering, a... Establish the index sequence relationship during the original data reading process. This means ensuring consistency between the numbering and the reading order. The index values corresponding to the initial number and all duplicate numbers need to be extracted to form a control group between the field numbers and the positional indexes in the original data. During this process, the identification of multiple duplicate field labels requires comparing whether the label name strings are completely identical to determine if they are duplicates. It is prohibited to generate label merging relationships using fuzzy matching, keyword segmentation, or other methods. Regarding the above-mentioned field label duplication judgment operation, if there are field label contents of "Field 1" and "Field 1-1", they should be treated as different labels and not assigned to the same label number. After the field numbering is completed, it is also necessary to associate each field number with its column position in the data file and extract the starting reading position of that column, forming a one-to-one relationship between the number and the starting point of reading. This starting point of reading can be directly confirmed by the index number at the time of reading. For example, if field number 2 corresponds to label B, which is located at index position 6 in the original data, then its number is recorded as 2, corresponding to the original index 6. The corresponding data between the number and the index formed here is called the positional mapping relationship, which does not involve a mathematical mapping process. For index value pairing only, after all field numbers and their first and duplicate index values have been processed, all index positions should be reordered in ascending order of field numbers. This allows subsequent processing to retrieve the original data index in the order of field numbers. For example, if the number sequence is 1, 2, 3, 4, 5, and the corresponding original position indexes are 0, 2, 1, 4, 3, then the index values need to be adjusted to 0, 2, 1, 4, 3 in the order of numbers. This index list is the final set of original positions corresponding to the numbers. This set will serve as the basic reference data related to the field reading order to obtain the field number position information set.
[0065] S102: Based on the field number position information set, call the number items corresponding to the same field label in the difference structure, extract adjacent number pairs according to the number arrangement order, examine the number position of the number pair in the original structure and the difference structure, compare the changes in position before and after, filter field number pairs with inconsistent order, and obtain the field number change sequence before and after.
[0066] First, select the field numbers with consistent frequency in the current field labels as reference items. Read the index of the corresponding field label in the difference data and match it one-to-one with the field numbers in the original data. Set the field number extraction order to ascending order, extracting consecutive field number items pairwise starting from number 1, forming multiple number pairs. Each number pair consists of the current number and its adjacent next number. If the field number sequence is 1, 2, 3, 4, 5, then the extracted number pairs are 1-2, 2-3, 3-4, 4-5. Each number pair is treated as an independent comparison object. In subsequent execution, its index position in the original data and its index position in the difference data are retrieved respectively, and the field label and its index position of the number pair are recorded. No calculation method is used during the comparison process; instead, a direct comparison is made based on the order of the two number pairs. If the index corresponding to number 1 in the original data is 2 and the index corresponding to number 2 is 3, and the index corresponding to number 1 in the difference data is 5 and the index corresponding to number 2 is 1, then it can be determined that the order of the number pair has changed. The rule for determining the number order is: if the index corresponding to number 1 is 2 and the index corresponding to number 2 is 3, then the order of the number pair has changed. If the first number in a pair precedes the second number in both the original data and the difference data, it is considered to be in the same order; otherwise, it is considered to be in a different order. All number pairs judged as having a different order during the process are extracted and transferred to the next round of screening. The content of all field labels before and after the process must be completely consistent. Only the positional relationship is judged, not the difference in the label content itself. If there are missing field labels or inconsistent label content in the original data, the number pairs are not included in the scope of the number pairs and are skipped without comparison. In actual calculation, if the field number sequence is A:1, B:2... C: 3, D: 4, E: 5, with index positions of 10, 20, 30, 40, 50 in the original data and 10, 25, 15, 40, 60 in the difference data, then the number pair 1-2 is AB, with the original order being 10<20 and the difference order being 10<25, which is consistent; the number pair 2-3 is BC, with the original order being 20<30 and the difference order being 25>15, which is determined to be a change in order. 2-3 is extracted into the change sequence. After traversing all number pairs in this way, the change sequence of the field numbers before and after is obtained.
[0067] S103: Based on the field numbers in the sequence of changes before and after the field numbers, track the positions corresponding to the numbered items in the original structure and the difference structure respectively, compare the positions of the same field numbers in the structure, analyze the changes in the position correspondence, and obtain the field arrangement fluctuation identifier set;
[0068] First, the read position indexes of each field number in the original data and the difference data are retrieved sequentially. The actual read position of the field corresponding to each number is then retrieved, forming a location table from number to index. For each field number, its corresponding index value in the original data and the difference data is obtained. The index values from the two sources are compared side-by-side to form a one-to-one data pair. It is important to note that the field label content must be completely consistent in both data sets. Field number names that differ are not included in the comparison. Once the number position index is determined, it is necessary to determine whether the position of that number in the two data sets has shifted. The criteria are: if the field number is 2 in the original data and its corresponding index position is 10, and the same number is still 2 in the difference data but its corresponding index position is 14, then the index position has shifted backward; if the index position changes to 8, then it has shifted forward; if the index positions are the same, then there is no change. The direction of movement does not affect subsequent judgments; it only categorizes the results based on whether the position has changed. It does not perform displacement direction statistics or degree measurement. For example, if field numbers are 1, 2, 3, 4, and 5, and the indices in the original data are 10, 20, 30, 40, and 50 respectively, and the indices in the difference data are 10, 25, 30, 42, and 51, then field number 2's index position changes from 20 to 25, indicating a displacement. Field number 3's position remains unchanged. Field number 4's position changes from 40 to 42, indicating a displacement. Field number 5's position changes from 50 to 51, also indicating a displacement. Therefore, numbers 2, 4, and 5 should be identified as numbers whose positions have changed, number 3 remains unchanged, and number 1 remains unchanged. After comparing all numbers, the list of field numbers whose positions have changed is compiled into a summary table. This table only records the field numbers with inconsistent positions and their corresponding index values in the two datasets, resulting in a set of field arrangement fluctuation identifiers.
[0069] Please see Figure 3 The specific steps of S2 are as follows:
[0070] S201: Based on the field numbers listed in the field arrangement fluctuation identifier set, retrieve the field tags with the same name from the current structure, extract the corresponding index positions according to the order of appearance, associate the field numbers with the positions of the tags, and obtain the field tag position sequence;
[0071] First, the entire set of field labels in the current data is retrieved. A full comparison is performed on this set to find label items that are completely identical to the field label corresponding to the target number. The field label comparison must use an exact match method, and there must be no missing, misaligned, space differences, or symbol variations between characters; otherwise, it will not be identified as a matching item. After completing the label matching, the position index of the first occurrence of the successfully matched label item in the current data structure is extracted and used as the initial index position of the current field number. At the same time, the position indices of all other repeated occurrences of the same label item in the data are retrieved. All index positions are arranged in order of the first occurrence of the field label to form the position sequence of the field number in the current structure. Assuming that the field label of number 3 is "Field B", it appears 3 times in the data structure, and is located at index 3, ... If positions 2, 5, and 8 are referenced, then the position index sequence corresponding to number 3 is 2, 5, and 8. During the retrieval process, the unique binding relationship between the field label and each index should be maintained to avoid multiple hits of the same label that could lead to position confusion. After all field numbers have been retrieved, the corresponding field label will form a set of data pairs with all its index positions in the data structure. In this data pair, the key is the field number, and the value is the list of label indexes. This list is not sorted but retains the original retrieval order, which is the actual order in which the labels appear in the data. This order is used for subsequent order-related operations. After all numbers have been retrieved, the field number, field label, and its index in the current data are bound together to form an index reference dataset for subsequent calls, thus obtaining the field label position sequence.
[0072] S202: Based on the field label position sequence, call the position data of the same numbered field in the original structure, compare the field positions in the current structure with those in the original structure, determine the field numbers with the same number but different positions, and obtain a list of field position differences;
[0073] First, the field number is used as an index to sequentially compare the correspondence between the current position and the original position. The field number serves as the basic retrieval unit. The label position corresponding to each number is compared using index value difference analysis under the premise of identical numbers. If the field index of number 4 in the current structure is 15, while the field index of number 4 in the original structure is 10, then it is determined that the field has undergone position displacement. This judgment does not involve directional classification; it is based solely on whether a positional change has occurred. During position data reading, the label position uses its first occurrence index as the primary index. If the same label appears repeatedly in multiple positions, only the first position index corresponding to the number is recorded as the current comparison basis; subsequent repeated positions are not included in the difference judgment. If multiple field numbers simultaneously correspond to the same label, such as number 5 and number 7 both being field "B", then number 5 and number 7 are read separately and participate in the position comparison process independently. To ensure that the binding relationship between the number, label, and location is not replaced or merged throughout the process, the judgment logic must use a one-to-one number mapping rule to perform position value comparison operations. In practical applications, if the field number sequence is 1, 2, 3, and its position index in the current structure is 5, 10, 15, while the position index in the original structure is 5, 12, 15, then the indices of number 1 and 3 are consistent, and the index of number 2 changes from 12 to 10, which is identified as a position change item. Correspondingly, number 2 is included in the position difference list. At the same time, the index pair value corresponding to the original and current structure of the field number is retained as a reference item for tracking in subsequent structural position adjustments. This comparison process does not perform numerical difference calculations, does not set offset thresholds, and only uses whether the absolute index is consistent as the criterion for judging whether there is a change. After all executions are completed, all field numbers with consistent numbers but inconsistent positions are extracted and imported into the comparison result table to obtain the field position difference list.
[0074] S203: Based on the field number in the field position difference list, track the position of the number in the original structure and the current structure, compare whether the position has overlapping segment characteristics, analyze whether it belongs to the original structure position, and obtain the field structure belonging status set.
[0075] First, the index position of each field number in the original and current structures is tracked one by one. The retrieval operation adopts a one-to-one method of number-position. By reading the index values of fields with the same number in the two structures, a set of position intervals corresponding to the number is constructed. During the execution process, the index position of the number in the original structure is first obtained, such as the index corresponding to number 12 being 30. At the same time, the index position of the same number in the current structure is extracted, such as 34. Based on the position interval, the front and rear extension ranges are set, extending by 2 index positions on each side, forming two index segments with the ranges of 28 to 32 and 32 to 36. It is determined whether there are overlapping index segments of the field number in the two structures. If there is overlap, it is considered as a position segment overlap and classified as a position convergence field; otherwise, it is classified as a position free field. In this way, all field numbers are classified and placed in their positions. The judgment action iterates through the two sets of position indices corresponding to the number, and determines whether there is an overlap between the start and end values of the index interval. If there is an overlap, it is marked as an overlap. For example, if the index of number 21 is 45 in the original structure and 46 in the current structure, then the two segments are 43 to 47 and 44 to 48, and the overlapping area is 44 to 47, which meets the position overlap condition and is marked as an affiliated number. Otherwise, it is a deviated number. No threshold setting is introduced when performing the judgment. The logical judgment is only performed through the closed interval formed by the absolute index difference. No numerical difference or normalization coefficient setting is involved. After all numbers are judged, it is summarized whether each field number maintains an approximately close position or has deviated in the two structures. Finally, all the judged number sets are classified to obtain the field structure affiliation status set.
[0076] Please see Figure 4 The specific steps of S3 are as follows:
[0077] S301: Based on the field numbers provided in the field structure attribution status set, retrieve the label content of the corresponding field in numerical order, extract the label name associated with the current number and the adjacent number, and slide through the label sequence in the data structure to obtain the continuous sliding group of field labels;
[0078] First, read the position of each number in the current data arrangement sequentially. Retrieve the corresponding field's label content using the position index, and then perform a horizontal traversal based on the number index. Locate the label items before and after the current number in the label sequence, and extract the label name of the current numbered field and the adjacent numbered field labels sequentially. For example, in the case of number sequence 11, 12, 13, the corresponding field labels are "temperature," "humidity," and "wind speed," respectively. The extracted results are two sets of label pairs: "temperature-humidity" and "humidity-wind speed." After extracting each pair of labels, further perform a sliding traversal process. The traversal method is to move one position forward from the starting number, continuously obtaining the label name sequence corresponding to the current number and the next number. No numbered items are skipped during the operation, ensuring that all consecutive numbers are processed. This process continues until all fields are numbered. After retrieving and extracting the tag names, all numbered tag pairs are uniformly included in a tag set sequence. Then, the set sequence is continuously slid along according to the physical order in which the tags appear. The sliding method is to slide the window with a fixed width of 2 horizontally. That is, the window moves by one number span each time and extracts the tag names corresponding to the two numbers in the window. This method covers the entire set sequence until the last numbered item. For example, if the field number sequence is 21 to 25 and the corresponding tags are "voltage", "current", "frequency", "power" and "phase", the sliding window can obtain continuous segments such as "voltage-current", "current-frequency", "frequency-power", and "power-phase". This operation updates the tags by sliding to the right from the starting number at the left end of the window. After all the sliding operations are completed, a continuous sliding group of field tags is obtained.
[0079] S302: Based on the label group information in the continuous sliding group of field labels, locate the index position of the corresponding label in the structure template, analyze the index order of the label in the current structure and the template structure, remove the field numbers that maintain the same order, and obtain the field label order correspondence set;
[0080] First, the combined content of two adjacent tags in each group is read, and the tag combination is traversed and located in the original template to obtain the index position of the first occurrence of the two tags in the template. The two extracted position values are compared in order to determine whether their relative index positions are consistent with the order of the tag combination in the current structure. If the index corresponding to the "temperature-humidity" combination in the current structure is 5 and 6, while it is 4 and 5 in the template, then the order of the tag group is consistent. If the index is 6 and 5 in the template, then the order is reversed. For the above situation, the tag combination is traversed and compared for each group. All tag order pairs in the sliding group are continuously called, and the complete index order logic judgment is performed. In this process, the traversal results are matched one by one with the template order to extract the corresponding numbers of all tag groups whose order relationship has been reversed. Then, the positions of these numbers in the structure are cross-validated, and the number items whose order has not changed are removed. After one sliding group traversal is completed, those field number items with inconsistent order are retained. Finally, after convergence, aggregation, and filtering out other unchanged numbers, the field tag order correspondence set is obtained.
[0081] S303: Based on the field number in the field label sequence, extract the position index range of the number in the current structure and the template structure, filter according to the position difference of the index range, extract the field number group with the same trend of position association, and obtain the record set with consistent upper and lower structure.
[0082] First, select the numbered items from the set and sequentially call their corresponding tag content in the current data to obtain the position index of these tags in the current structure. Simultaneously, extract the position index of the same numbered items in the template structure. After obtaining the bilateral index data, construct a list of index sequence pairs to form a correspondence sequence between the original index sequence and the target index sequence. Then, according to the numerical relationship between each pair of indices, perform a judgment operation on the direction of relative position change. If the indices of numbered items A, B, and C in the current structure are 2, 5, and 9, while those in the template are 1, 4, and 7, it indicates that all three sets of indices show an increasing relationship, and are identified as having a consistent trend. If the index order of the numbered items is 3, 7, 6 and 1, 4, 2, then the second group has a consistent trend, while the third group has an inconsistent trend. Based on this, a same-direction trend scan is performed on all numbered sequences to determine whether the index direction is consistent. Numbered items with reversed or abrupt changes in order are excluded, and those numbered item groups with consistent index direction are retained. These numbered items are then re-verified in the structure to confirm whether their relative positions among fields in the structure maintain the same direction of increase or decrease. For example, if the index group in the current structure is 4, 8, 11, while the template structure is 2, 6, 9, both are in ascending order, which means they have the same trend. Finally, a consistent record set of upper and lower structures is obtained.
[0083] Please see Figure 5 The specific steps of S4 are as follows:
[0084] S401: Based on the field numbers in the consistent record set of the upper and lower structures and the field structure belonging status set, extract the position index of the field in the structure, determine the sorting status between the field labels before and after by the index direction, determine whether the field has been returned to its original structural position, analyze the positional relationship of the labels before and after, and obtain the field status sequence feature set.
[0085] First, the index value of the current item in the structure is extracted one by one from the two sets of numbers, and the actual label position corresponding to the index value in the structure data is recorded. Then, the order of the index values of adjacent items in the structure is judged to check whether the arrangement direction of the items in the current structure meets the strict monotonicity requirement. For example, if the indices of numbers A, B, and C in the structure are 3, 6, and 9 respectively, it indicates that the sorting direction is ascending. In this process, the index difference of the items is judged by pairwise pairing. If the index of the current item is greater than the index of the previous item, it is marked as ascending; otherwise, it is marked as descending. Then, the current structure is further processed. The sorting status of each group of labels is compared to determine whether it is consistent with the sorting direction of the corresponding numbered items in the original structure. If the labels corresponding to numbers 3, 4, and 5 in the current structure are X, Y, and Z, while the labels corresponding to the same numbers in the original structure are sorted as X, Z, and Y, it indicates that the sorting direction between numbers 4 and 5 has been reversed. It is determined that the position status of this field has deviated from the original position range. Then, combined with the information of the numbered items in the field's belonging status set, it is screened which fields have been returned to their original positions and which are still in an uncertain position. Finally, the order status reflected by the relative position changes of all fields in the previous and subsequent labels is uniformly summarized to obtain the field status sequence feature set.
[0086] S402: Based on the sorting status and positioning information in the field status sequence feature set, retrieve entries in the field number that have label order gaps or misaligned positioning, split out the differentiated field set according to the difference in number attribution, arrange the set number in order and store it into the corresponding classification channel to obtain the field status partition number set.
[0087] First, the sorting direction and status field (whether it has returned to its original position) corresponding to each field number are retrieved. During the retrieval process, the sorting status value of each field number in the status sequence is extracted and associated with its repositioning judgment result value. These two types of information are stored in the index column used for analysis. Based on this, the sorting relationship between adjacent field numbers is compared to see if the fields are arranged continuously. For example, if the label position corresponding to number 13 is later than that of number 14, it is determined that there is a sequence break at that position. Then, it is determined whether number 13 has been returned to the original structure index. If it has not been returned and the sorting direction is reversed, number 13 is marked as a sequence break abnormal field and added to the temporary set of difference fields. Then, the subsequent field numbers are traversed and compared with the current number. If there is a jump with the previous number, that is, when the number values are adjacent but the position order is inconsistent, the current field and its previous field are continuously judged in the belonging status of the belonging field list. Inconsistent fields are continued to be added to the difference set. In addition, when consecutive fields have different belonging statuses, additional markers are also required. For example, if number 21 has been returned to its place but 22 has not, it indicates that a belonging break has occurred. In this case, field 22 also needs to be added to the difference set. Finally, all numbers in the difference set are sorted in ascending order, and the number information is written into different number sequence channels according to the status characteristics. For example, the belonging break number is put into the belonging anomaly channel, and the sorting reversal number is put into the order anomaly channel, forming a clearly defined field number group, and obtaining the field status partition number set.
[0088] S403: Based on the field number groups that have been distinguished in the field status partition number set, extract the position index range of the number in the current structure, expand the paragraphs affected by the number, assign executable identifiers to the field number groups respectively, and output them to the data processing flow to obtain the field processing task allocation list.
[0089] First, extract the actual position index value of each number in the current data for each number group. For each extracted number, query its row number in the original data table. Determine the affected paragraph range based on the distance between this row number and the row number of the next number. If there is a gap of more than three rows between two adjacent numbers, it is considered that the affected paragraph spans a region, and all rows in between must be included in the processing range. During the execution, for the number group [105, 106, 107], the index position in the current data can be sequentially retrieved to be rows 23, 24, and 25. Then, the affected paragraph is set to rows 23 to 25. If it is the number group [112, 115], and the index position is rows 30 and 36, then rows 30 to 36 must be included in the affected paragraph and marked. This group is an extended processing group. Executable identifiers are then generated for each numbered group based on its sorting number. Each group corresponds to a processing category. The identifiers are mapped and coded according to the order of the numbers and the differences in the partitions to which they belong. For example, a field group belonging to the reverse sorting category can be assigned the identifier "RTF-001," while a field group belonging to the relocation anomaly category can be assigned the code "RLF-002." Each numbered item is encoded sequentially according to its number during the coding process, ensuring accurate identification and execution of operations in subsequent processing stages. After the identifiers are completed, the field number groups and executable identifiers are written to the output table, and this output is transmitted to the processing flow entry point. By calling the numbers and their processing identifiers listed in this list, tasks can be assigned according to the numbers, resulting in a field processing task allocation list.
[0090] Please see Figure 6 The specific steps of S5 are as follows:
[0091] S501: Based on the field numbers listed in the field processing task allocation list, retrieve the field status corresponding to each number, extract the position adjustment requirements, deletion instructions and static status from the status information, and classify and split the field numbers according to the field processing attributes to obtain the field processing behavior mapping set.
[0092] First, the processing identifiers corresponding to the field numbers are read item by item. By calling the field numbers recorded in the task allocation table [e.g., B021, B034, B046], the status description content of the corresponding number is retrieved one by one in the field status table. The entries related to position adjustment requirements are read and parsed. For example, if B021 is marked as "Move to B015", the "Move to" action and the target number B015 are extracted. The current index position of B015 is then queried in the data for subsequent rearrangement processing. If the field number, such as B034, is marked as "Delete", its action is parsed as "Remove", and this number is marked as no longer participating in the subsequent processing flow. If the status, such as B046, is "Keep the current position", no operation is performed on it, and this number is retained as a static field number to retain the current processing priority. Based on this, the status information of each field number is classified and processed according to type. For fields containing descriptions of target index position changes... Fields are categorized into three types: "Position Adjustment," "Delete," and "Status." Fields containing the word "Delete" are categorized into "Deletion." Fields whose status descriptions do not contain terms related to change or operation are categorized into "Status." During categorization, a comparison process is performed to identify mixed states of some boundary fields. For example, if field B052 is marked as "Preceded by B051, then deleted," the position of its target field B051 should be extracted first for the "Preceded" action, and then the "Delete" action should be extracted to confirm its final processing behavior as "Ranked first, then Removed." Such fields are categorized into "Composite Processing" and then further split. After categorization, a mapping set is established between all numbered items and their corresponding processing categories, such as [B021: Position Adjustment], [B034: Deletion], and [B046: Static]. This set of processing behaviors will become the basis for driving data transformation behavior in subsequent processes, resulting in a field processing behavior mapping set.
[0093] S502: Based on the field processing behavior mapping set, the field number and processing attribute are mapped to the current index position of the number in the structure data. The corresponding position change operation, position clearing action and position maintenance behavior are executed. The processed field position number and the original structure position number are output in parallel to obtain the field position update sequence.
[0094] First, all field numbers in the mapping set are read, such as B008, B015, B027, etc. For each number, the corresponding current index position value in the structure data is called. If B008 is currently at index position 11, its original position information is recorded as 11. Then, the processing attribute of the field is used for branch judgment. If the processing attribute is "position change", the target position information item needs to be called. For example, if B008 needs to be moved after B003, the current index position of B003 is retrieved as 7. Based on this value, the displacement operation of field B008 is performed in the data structure. The new index value after the rearrangement is marked as 8. If the field number is B015 and the processing attribute is "clear", the deletion action is performed directly, removing field B015 from the data structure. Its position is marked as "empty" in the update result. If the field number is B027 and the processing attribute is "position maintenance", the current index value is kept consistent in the original structure and the new structure. Record the number B008. Position 27 remains unchanged at 17. Subsequently, a reference item is generated for all field numbers that have undergone position changes or removal. The field number, the new position index value, and the corresponding index value in the original structure are arranged in parallel and output. For example, the original position of number B008 is 11, and the new position is 8; the original position of number B015 is 13, and the new position is "empty"; the original position of number B027 is 17, and the new position is still 17. After sorting by number in ascending order, the position update sequence details are obtained. At the same time, the order effect between fields needs to be processed. After B008 moves from index 11 to index 8, the field numbers originally between indexes 8 and 10 need to be shifted sequentially to make room for the target position. If B009 was originally at index 8, it needs to be changed to index 9, and so on, until the original index 10 field number B011 is updated to index 11, to ensure that the field sorting does not cross or become disordered. During this process, each number that has been shifted due to the change and its new index position need to be recorded, and finally the field position update sequence is obtained.
[0095] S503: Based on the field position update sequence, extract the field index list in the structure before processing, and check the consistency with the index corresponding to the field status after processing. Then, overwrite the original structure position with the updated field status to obtain the data processing result status mapping table.
[0096] First, obtain a list of all field numbers and their original indexes in the original structure. Then, compare this list with the new index list corresponding to the field numbers in the update sequence. During this comparison, for each field number, such as B006, B011, and B020, read its index value marked in the original structure and compare it with the updated position index. If field B006's original position is index 6 and its updated index is 9, then mark B006 as moved and write its current state data at index 9. If field B011's original index matches its updated index, mark it as unchanged and retain its original position state information. If field B020 is marked as cleared in the update sequence, assign a null value or write a clear flag, such as "null" or "empty," at its original index position to distinguish that the field's state has changed to invalid. Then, process all the field numbers sequentially. The corresponding index status is used to ensure that each field number is completely covered in the structural position. Then, the updated field status is written to the position mapping record item in sequence. During the overlay process, the status of each index position is verified to avoid omissions or duplicate writing. If multiple field numbers are found to correspond to the same target index position during comparison, these conflicting numbers need to be rearranged according to the preset priority. The priority can refer to the field's classification or processing attribute settings. For example, the "position maintenance" attribute field is written first, followed by the "position change" field, and the "clear" field is processed last. After sorting, the original position status is overwritten one by one according to the priority result, and the operation actions are recorded simultaneously to form an operation trajectory list. Finally, the status data of all processed fields and their corresponding new and old index positions are output to obtain the data processing result status mapping table.
[0097] Please see Figure 7 A data processing apparatus, comprising:
[0098] The field arrangement detection module obtains all field labels in the structured data, extracts the corresponding index positions of the labels in sequence, finds the first and second indices of duplicate labels, analyzes the changes in the combination of adjacent fields, maps the order relationship, and obtains the field arrangement fluctuation identifier set.
[0099] The attribution status analysis module extracts field numbers with the same label based on the index of the changing fields in the field arrangement fluctuation identifier set, finds the corresponding position in the original structure, checks the matching position in the template structure, judges the structure attribution status, and obtains the field structure attribution status set.
[0100] The consistency matching module extracts the labels of adjacent fields based on the field numbers in the field structure belonging status set, compares them with the combination order of the corresponding positions in the template structure, and traces the arrangement mapping path through the matching between combinations to obtain a consistent record set of upper and lower structures;
[0101] The task allocation and extraction module compares the field order and position process based on the consistent field index group and field structure belonging status set, extracts the arrangement conditions and corresponding status information of the fields in the structure, associates the field numbers, and obtains the field processing task allocation list.
[0102] The structure status output module extracts the position update, clear, and retain instructions in the processing status based on the field numbers to be processed in the field processing task allocation list, re-corresponds the numbers to their positions in the original structure, and forms a corresponding index mapping through the sorting relationship of the field numbers to obtain the data processing result status mapping table.
[0103] A data processing computer device includes a memory and a processor, characterized in that the memory stores a computer program, and the processor executes the computer program to implement the data processing device.
[0104] A data processing storage medium storing a computer program thereon, characterized in that the computer program, when executed by a processor, implements the steps of the data processing method described above.
[0105] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A data processing method, characterized in that, Includes the following steps: S1: Obtain the field label order in the structured data, locate the first and repeated positions, analyze the changes in the combination of adjacent fields, map the order relationship, and obtain the field arrangement fluctuation identifier set; S2: Based on the variable field index in the field arrangement fluctuation identifier set, extract the same label field in the current structure, find the corresponding position in the original structure, determine the structure positioning status, and obtain the field structure belonging status set; S3: Based on the field number in the field structure belonging status set, extract the upper and lower adjacent field label combinations, compare them with the combination order of the corresponding positions in the template structure, and trace the arrangement mapping path through the matching between combinations to obtain the upper and lower structure consistent record set; S4: Based on the consistent record set of the upper and lower structures and the field structure belonging status set, compare the field order and position process, extract the arrangement conditions and corresponding status information of the fields in the structure, associate the field numbers, and obtain the field processing task allocation list. S5: Based on the field number in the field processing task allocation list, according to the structural operation requirements indicated by the field status, select the corresponding data processing method, perform order adjustment, structure removal and retention operations, and obtain the data processing result status mapping table; The specific steps of S2 are as follows: S201: Based on the field numbers listed in the field arrangement fluctuation identifier set, retrieve the field tags with the same name from the current structure, extract the corresponding index positions according to the order of appearance, associate the field numbers with the positions of the tags, and obtain the field tag position sequence; S202: Based on the field label position sequence, call the position data of the same numbered field in the original structure, compare the field positions in the current structure with those in the original structure, determine the field numbers with the same number but different positions, and obtain a list of field position differences; S203: Based on the field number in the field position difference list, track the position of the number in the original structure and the current structure, compare whether the position has overlapping segment characteristics, analyze whether it belongs to the original structure position, and obtain the field structure belonging status set. The specific steps for S3 are as follows: S301: Based on the field numbers provided in the field structure attribution status set, retrieve the tag content of the corresponding field in the order of the numbers, extract the tag names associated with the current number and the adjacent numbers, and slide through the tag sequence in the data structure to obtain the continuous sliding group of field tags; S302: Based on the tag group information in the continuous sliding group of the field tags, locate the index position of the corresponding tag in the structure template, analyze the index order of the tags in the current structure and the template structure, remove the field numbers that have the same order, and obtain the field tag order correspondence set; S303: Based on the field number corresponding to the field label sequence, extract the position index range of the number in the current structure and the template structure, filter according to the position difference of the index range, extract the field number group with the same trend of position association, and obtain the record set with consistent upper and lower structure.
2. The data processing method according to claim 1, characterized in that, The field arrangement fluctuation identifier set includes first occurrence index, repeated occurrence index, difference in adjacent field combinations, degree of order change, and order mapping between structures. The field structure belonging status set includes changed field number, position matching relationship, field with consistent label position and structure return status. The upper and lower structure consistency record set includes field number, upper and lower adjacent field combinations, template corresponding combinations, and combination order consistency. The field processing task allocation list includes field number and status condition, order matching information, position corresponding result, and processing input range. The data processing result status mapping table includes field number, updated index, removed field content, and retained original structure.
3. The data processing method according to claim 1, characterized in that, The specific steps of S1 are as follows: S101: Obtain field labels from structured data, assign numbers according to the order in which fields are first read in the structure, locate the first number position of the field label and the positions of all repeated numbers, retain the original positional relationship between the field label and its corresponding number in the data, and obtain the field number position information set; S102: Based on the field number position information set, call the number items corresponding to the same field label in the difference structure, extract adjacent number pairs according to the number arrangement order, examine the number position of the number pair in the original structure and the difference structure, compare the changes in the position before and after, filter field number pairs with inconsistent order, and obtain the field number change sequence before and after. S103: Based on the field numbers in the sequence of changes before and after the field numbers, track the positions corresponding to the numbered items in the original structure and the difference structure respectively, compare the positions of the same field numbers in the structure, analyze the changes in the position correspondence, and obtain the field arrangement fluctuation identifier set.
4. The data processing method according to claim 1, characterized in that, The specific steps of S4 are as follows: S401: Based on the field numbers in the upper and lower structure consistency record set and the field structure belonging status set, extract the position index of the field in the structure, determine the sorting status between the front and rear field labels by the index direction, determine whether the field has been returned to the original structure position, analyze the positional relationship of the labels before and after, and obtain the field status sequence feature set. S402: Based on the sorting status and positioning information in the field status sequence feature set, retrieve entries in the field number that have label order gaps or misaligned positioning, split out a differentiated field set according to the difference in number attribution, and store the set numbers in the corresponding classification channel in order to obtain the field status partition number set. S403: Based on the field number groups that have been distinguished in the field status partition number set, extract the position index range of the number in the current structure, expand the number-affected paragraphs, assign executable identifiers to the field number groups respectively, and output them to the data processing flow to obtain the field processing task allocation list.
5. The data processing method according to claim 1, characterized in that, The specific steps of S5 are as follows: S501: Based on the field numbers listed in the field processing task allocation list, retrieve the field status corresponding to each number, extract the position adjustment requirements, deletion instructions and static status from the status information, and classify and split the field numbers according to the field processing attributes to obtain the field processing behavior mapping set. S502: Based on the field number and processing attribute in the field processing behavior mapping set, retrieve the current index position of the number in the structural data, and perform the corresponding position change operation, position clearing action and position maintenance behavior. Output the processed field position number and the original structural position number in parallel to obtain the field position update sequence. S503: Based on the index results of the fields in the updated sequence, extract the list of field indexes in the structure before processing, and check the consistency with the indexes corresponding to the field status after processing. Then, overwrite the original structure position with the updated field status to obtain the data processing result status mapping table.
6. A data processing apparatus, comprising: The field arrangement detection module obtains all field labels in the structured data, extracts the corresponding index positions of the labels in sequence, finds the first and second indices of duplicate labels, analyzes the changes in the combination of adjacent fields, maps the order relationship, and obtains the field arrangement fluctuation identifier set. The attribution status analysis module extracts field numbers with the same label based on the variable field index in the field arrangement fluctuation identifier set, finds the corresponding position in the original structure, checks the matching position in the template structure, judges the structure attribution status, and obtains the field structure attribution status set. The consistency matching module extracts the labels of adjacent fields based on the field numbers in the field structure belonging status set, compares them with the combination order of the corresponding positions in the template structure, and traces the arrangement mapping path through the matching between combinations to obtain a consistent record set of upper and lower structures. The task allocation and extraction module compares the field order and position process based on the consistent field index group of the upper and lower structures and the field structure belonging status set, extracts the arrangement conditions and corresponding status information of the fields in the structure, associates the field numbers, and obtains the field processing task allocation list. The structure status output module extracts the position update, clear and retain instructions in the processing status based on the field numbers to be processed in the field processing task allocation list, re-corresponds the numbers to the positions in the original structure, and forms a corresponding index mapping through the sorting relationship of the field numbers to obtain the data processing result status mapping table. The specific steps of the attribution status analysis module are as follows: S201: Based on the field numbers listed in the field arrangement fluctuation identifier set, retrieve the field tags with the same name from the current structure, extract the corresponding index positions according to the order of appearance, associate the field numbers with the positions of the tags, and obtain the field tag position sequence; S202: Based on the field label position sequence, call the position data of the same numbered field in the original structure, compare the field positions in the current structure with those in the original structure, determine the field numbers with the same number but different positions, and obtain a list of field position differences; S203: Based on the field number in the field position difference list, track the position of the number in the original structure and the current structure, compare whether the position has overlapping segment characteristics, analyze whether it belongs to the original structure position, and obtain the field structure belonging status set. The specific steps of the consistency matching module are as follows: S301: Based on the field numbers provided in the field structure attribution status set, retrieve the tag content of the corresponding field in the order of the numbers, extract the tag names associated with the current number and the adjacent numbers, and slide through the tag sequence in the data structure to obtain the continuous sliding group of field tags; S302: Based on the tag group information in the continuous sliding group of the field tags, locate the index position of the corresponding tag in the structure template, analyze the index order of the tags in the current structure and the template structure, remove the field numbers that have the same order, and obtain the field tag order correspondence set; S303: Based on the field number corresponding to the field label sequence, extract the position index range of the number in the current structure and the template structure, filter according to the position difference of the index range, extract the field number group with the same trend of position association, and obtain the record set with consistent upper and lower structure.
7. A data processing computer device, comprising a memory and a processor, characterized in that, The memory stores a computer program, and when the processor executes the computer program, it implements the data processing apparatus of claim 6.
8. A data processing storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the data processing method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Cloud platform data analyzing and processing system based on front-end segmentation
CN121117088A