A data exchange method and system based on a markup language

By evaluating the characteristics of the markup language packets, dynamically adjusting the packet processing order and performing key updates, the lack of flexibility and security of data exchange in the prior art is solved, and efficient and secure data transmission and analysis are achieved.

CN120090983BActive Publication Date: 2025-07-22BEIJING LIGONGDAXUE PRESS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510563987.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-30
Publication Date
2025-07-22
Estimated Expiration
2045-04-30

AI Technical Summary

Technical Problem

The prior art lacks flexibility in the data exchange process and cannot dynamically adjust the processing order according to the actual load or data packet complexity, resulting in the risk of transmission delay or loss, and redundant information is not identified and cleaned in time, and static encryption key management is likely to lead to leakage or cracking.

Method used

By evaluating the number of tags, nested structure complexity and field length of the markup language packets, dynamically adjusting the packet processing priority and transmission timing, identifying redundant tags and invalid metadata, monitoring the load in real time and performing key updates, and optimizing tag resolution paths and parameters.

Benefits of technology

It improves data transmission efficiency, reduces latency and resource waste, improves data security and parsing accuracy, and ensures the efficiency and security of data exchange in high concurrency scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120090983B_ABST
    Figure CN120090983B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of data exchange technology, and specifically provides a data exchange method and system based on markup language, which includes the following steps: determining the processing priority based on the number and complexity of data packet tags, monitoring the load and adjusting the processing sequence, optimizing the IO response time, identifying redundant fields and evaluating the key risk, performing key updates, and optimizing the accuracy and efficiency of tag parsing. In the present invention, through the precise analysis of the markup language in the data packet, it is possible to optimize the scheduling, transmission, and parsing in the data exchange process. The evaluation of the number of tags, the complexity of the nested structure, and the field length enables each data packet to be dynamically assigned a priority according to its characteristics, thereby effectively improving the data transmission efficiency and reducing latency. By real-time monitoring the load and the transmission timing of data packets, it is possible to dynamically adjust the processing order of data packets and reduce the waste of resources caused by the overload of the data exchange system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data exchange, and particularly to a data exchange method and system based on a markup language. Background Art

[0002] Data exchange technology mainly involves data transmission and sharing between different systems, platforms or applications. Its core goal is to ensure that data can be exchanged between different computers or devices in a standardized and efficient manner, so that systems can understand and process this data. It is widely used in many fields such as information exchange, data synchronization, and remote communication. Data exchange technology usually includes standardization of data formats, design and implementation of transmission protocols, and compression and encryption of data.

[0003] Among them, the data exchange method based on a markup language refers to a technology that uses a markup language (such as XML, JSON, etc.) as the data format and transmits data through a network or computer system. The core is to use a standardized markup language to represent the data structure, so that different systems can easily parse and process the data. Its main purpose is to simplify the data transmission process between different platforms, improve the interoperability and compatibility of data exchange, and is widely used in scenarios such as Web services, e-commerce, and information sharing in many information exchange and integration applications to ensure that data can be transmitted accurately and quickly.

[0004] In the prior art, during the data exchange process, relying on fixed rules and standards results in a lack of flexibility in the processing process. The scheduling of data packets and the allocation of transmission priorities cannot be dynamically adjusted according to the actual load or the complexity of data packets. Therefore, in a high-concurrency environment, the resource utilization rate cannot be maximized. The prior art cannot effectively distinguish the complexity of data packets, so it is impossible to optimize the processing order, resulting in the risk that some important data packets may face transmission delays or losses. In addition, there are still defects in the processing of data redundancy and invalid metadata. Redundant information cannot be identified and cleaned in time, increasing the transmission burden during the data exchange process. The existing encryption key management method is static and cannot be dynamically updated based on redundant data or real-time risk assessment, thus easily leading to potential threats of key leakage or cracking. Summary of the Invention

[0005] The purpose of the present invention is to solve the drawbacks existing in the prior art, and to propose a data exchange method and system based on a markup language.

[0006] To achieve the above purpose, the present invention adopts the following technical solution: A data exchange method based on a markup language, including the following steps,

[0007] S1: Based on the received markup language data packets, determine the number of tags in each data packet. Through hierarchical analysis, evaluate the complexity of the nested structure in the markup language, measure the field length of each tag, match it with the classification criteria, determine the processing priority of the data packet, and obtain the structural priority score.

[0008] S2: Based on the structural priority score, monitor the current load of the data exchange system, determine the transmission timing of each data packet, adjust the processing sequence of the data packets through queue management, refine the distribution order within the queue, and generate an asynchronous queuing delay difference.

[0009] S3: Based on the asynchronous queuing delay difference, analyze the markup language content in the data packet, identify duplicate tag fields and invalid metadata, calculate the proportion of redundant tags or fields, conduct a risk assessment on the key sensitivity of the redundant content, and determine whether to execute the key update mechanism to obtain the redundant key update parameter.

[0010] S4: According to the redundant key update parameter, evaluate the security of the multi-segment encryption key currently in use. Through the key segment mapping table, determine the key interval that needs to be updated, overwrite the original encrypted old value with the new key hash value, and generate the key replacement update amount.

[0011] The improvements of the present invention are that the structural priority score includes the number of tags, the complexity of the nested level, and the field length; the asynchronous queuing delay difference includes the queue processing order, the data packet transmission timing, and the IO response delay; the redundant key update parameter includes the proportion of redundant fields, the proportion of redundant tags, and the key sensitivity evaluation result; the key replacement update amount includes the key update interval, the key hash change information, and the encryption segment replacement result.

[0012] The improvements of the present invention are that the specific steps for obtaining the structural priority score are as follows:

[0013] S111: Based on the received markup language data packets, detect the number of tags in each data packet, identify the field length of the tags, and obtain the field length data.

[0014] S112: Process the tags through hierarchical analysis, evaluate the complexity of the nested structure, and combine the field length data. Use the formula:

[0015] ;

[0016] Calculate the nested structure complexity value , where represents the field length of the th tag, is the average value of the field lengths of all tags, is the The nesting depth of a tag, is the total number of tags in the data packet;

[0017] S113: Based on the complexity value of the nested structure, match the nested structure complexity according to the classification criteria, evaluate the priority of each data packet, and obtain the structural priority score.

[0018] The improvement of the present invention is that the specific steps for obtaining the asynchronous queuing delay difference are as follows:

[0019] S211: Based on the structural priority score, monitor the current load of the data exchange system, and use the formula:

[0020] ;

[0021] Determine the transmission timing of the data packet , and adjust the processing sequence of the data packet through queue management, where represents the packet priority score, represents the load score of the current system, represents the processing time of the data packet, represents the delay adjustment coefficient, represents the queuing duration of the data packet, represents the expected processing time, represents the system priority benchmark;

[0022] S212: Based on the processing sequence of the data packet, refine the distribution order of the data packets in the queue, adjust the processing time and response order of the data packets, and reorder them to optimize the IO response time and generate the asynchronous queuing delay difference.

[0023] The improvement of the present invention is that the specific steps for obtaining the redundant key update parameter are as follows:

[0024] S311: Based on the asynchronous queuing delay difference, perform structured processing on the markup language content in the data packet, split the tag fields hierarchically, detect the correspondence between the field names, nested structures and data contents at each level, identify the number of times the field names appear repeatedly and the consistency interval of the field values, and obtain the tag field repetition degree;

[0025] S312: According to the tag field repetition degree, combined with the field naming frequency, nesting depth and field value update interval, filter out invalid metadata, extract the nested positions of the repeated tag fields, and use the formula:

[0026] ;

[0027] Obtain the redundant tag field density value , and obtain the tag redundancy interval distribution amount, where Represents the weight parameter of the th field, represents the repetition count of the th field, represents the valid value count of the th field, represents the nested level of the th field, indicates the data update density of the th field, indicates the set of update densities of all fields, represents the total number of fields;

[0028] S313: According to the label redundancy interval distribution quantity, judge the corresponding position between the field distribution density and the data packet key information, identify the field nested structure path containing the key pattern characters, mark the field group that matches the sensitive key pattern rule, compare the key positions for verification, and obtain the redundant key update parameter.

[0029] The improvement of the present invention is that the obtaining step of the key replacement update quantity is specifically as follows:

[0030] S411: Based on the redundant key update parameter, perform a multi-segment security evaluation on the currently used encryption key, filter the key intervals to be updated through the key segment mapping table, and obtain the preliminary key interval update data;

[0031] S412: Based on the preliminary key interval update data, perform a key replacement process, replace the hash value of the original encryption key, and generate a new key hash value, using the formula:

[0032] ;

[0033] Obtain the key replacement update quantity , where and respectively represent the hash values of the th and th key intervals, and respectively represent the encryption key values of the th and th key intervals, represents the total number of key intervals.

[0034] The improvement of the present invention is that the step further includes:

[0035] S5: According to the key replacement update amount, evaluate the markup language parsing requirements in the data packet, analyze the nested path of each tag, and combine the depth of the tag path and the complexity of the markup content to dynamically adjust the parameters in the data packet parsing process, optimize the accuracy and efficiency of tag parsing, and obtain the tag parsing optimization result;

[0036] The tag parsing optimization result includes the tag nesting depth, the tag path structure, and the parsing accuracy.

[0037] The improvement of the present invention is that the obtaining steps of the tag parsing optimization result are specifically as follows:

[0038] S511: According to the key replacement update amount, identify the path and its depth of each tag in the data packet, extract the structural information of the tag content, and evaluate the nesting level of the tag path and the complexity of the markup content to obtain tag evaluation data;

[0039] S512: Based on the tag evaluation data, optimize the tag path, and dynamically adjust the markup path by real-time monitoring the data packet parsing process to obtain the tag path adjustment configuration;

[0040] S513: Based on the tag path adjustment configuration, optimize the parsing path and perform parameter adjustment according to the requirements of tag parsing accuracy and efficiency to obtain the tag parsing optimization result.

[0041] A markup language-based data exchange system, the system includes:

[0042] The priority evaluation module, based on the received markup language data packet, determines the number of tags in each data packet, evaluates the complexity of the nested structure in the markup language through hierarchical analysis, measures the field length of each tag, matches with the classification standard, determines the processing priority of the data packet, and obtains the structure priority score;

[0043] The scheduling optimization module, based on the structure priority score, monitors the current load of the data exchange system, determines the transmission timing of each data packet, adjusts the processing sequence of the data packets through queue management, refines the distribution order in the queue, and generates the asynchronous queuing delay difference;

[0044] The redundancy and key update module, based on the asynchronous queuing delay difference, analyzes the markup language content in the data packet, identifies duplicate tag fields and invalid metadata, calculates the proportion of redundant tags or fields, conducts a risk assessment on the key sensitivity of the redundant content, and determines whether to execute the key update mechanism to obtain the redundant key update parameter;

[0045] The key replacement module evaluates the security of the multi-segment of the currently used encryption key according to the redundant key update parameter, determines the key interval to be updated through the key segment mapping table, executes the key replacement process, covers the original encrypted old value with the new key hash value, and generates the key replacement update amount.

[0046] The label parsing optimization module evaluates the markup language parsing requirements in the data packet according to the key replacement update amount, analyzes the nested path of each label, and dynamically adjusts the parameters in the data packet parsing process in combination with the depth of the label path and the complexity of the markup content, and obtains the label parsing optimization result.

[0047] Compared with the prior art, the advantages and positive effects of the present invention are as follows:

[0048] In the present invention, by accurately analyzing the markup language in the data packet, the scheduling, transmission, and parsing in the data exchange process can be optimized. The evaluation of the number of labels, the complexity of the nested structure, and the field length enables each data packet to be dynamically assigned priorities according to its characteristics, thereby effectively improving the data transmission efficiency and reducing the delay. By real-time monitoring the load and the transmission timing of the data packet, the processing order of the data packets can be dynamically adjusted, and the resource waste caused by the overload of the data exchange system can be reduced. The detection of redundant data and the dynamic update mechanism of the encryption key effectively reduce the impact of redundant information on the transmission efficiency and improve the data security. By optimizing the label parsing path and dynamically adjusting the parsing parameters, complex data structures can be processed more accurately, and the accuracy and efficiency of data parsing can be improved. Especially in the face of heterogeneous systems and high-concurrency scenarios, the efficiency and security of data exchange can be guaranteed. Brief Description of the Drawings

[0049] Figure 1 It is a flowchart of a data exchange method based on a markup language proposed by the present invention;

[0050] Figure 2 It is a flowchart for obtaining the structure priority score in the present invention;

[0051] Figure 3 It is a flowchart for obtaining the asynchronous queuing delay difference in the present invention;

[0052] Figure 4 It is a flowchart for obtaining the redundant key update parameter in the present invention;

[0053] Figure 5 It is a flowchart for obtaining the key replacement update amount in the present invention;

[0054] Figure 6 It is a flowchart for obtaining the label parsing optimization result in the present invention. Detailed Embodiment

[0055] In order to make the objectives, technical solutions and advantages of the present invention more clear and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0056] In the description of the present invention, it should be understood that the orientation or positional relationship indicated by the terms "length", "width", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc. is based on the orientation or positional relationship shown in the accompanying drawings. It is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus should not be construed as a limitation to the present invention. In addition, in the description of the present invention, the meaning of "a plurality of" is two or more, unless otherwise specifically defined.

[0057] Embodiment:

[0058] Please refer to Figure 1 , the present invention provides a technical solution: a data exchange method based on a markup language, including the following steps:

[0059] S1: Based on the received markup language data packet, determine the number of tags in each data packet, evaluate the complexity of the nested structure in the markup language through hierarchical analysis, measure the field length of each tag, match it with the classification standard, and determine the processing priority of the data packet according to the matching result to obtain a structure priority score;

[0060] S2: Based on the structure priority score, monitor the current load of the data exchange system, determine the transmission timing of each data packet, adjust the processing sequence of the data packets through queue management, refine the distribution order in the queue, optimize the IO response time, and generate an asynchronous queuing delay difference;

[0061] S3: Based on the asynchronous queuing delay difference, analyze the markup language content in the data packet, identify duplicate tag fields and invalid metadata, calculate the proportion of redundant tags or fields, perform a risk assessment on the key sensitivity of the redundant content, and determine whether to execute the key update mechanism to obtain a redundant key update parameter;

[0062] S4: Based on the redundant key update parameter, evaluate the security of the multi-segment encryption key currently in use, determine the key interval to be updated through the key segment mapping table, execute the key replacement process, overwrite the original encrypted old value with the new key hash value, and generate a key replacement update amount;

[0063] S5: According to the key replacement update amount, evaluate the markup language parsing requirements in the data packet, analyze the nested paths of each tag, and combine the depth of the tag path and the complexity of the tag content to dynamically adjust the parameters in the data packet parsing process, optimize the accuracy and efficiency of tag parsing, and obtain the tag parsing optimization result.

[0064] A tag refers to the basic element or structural unit in a markup language, usually used to identify and describe the attributes or structure of data content. For example, in markup languages such as XML, HTML, and JSON, tags are used to mark the start and end of data and classify or describe the data.

[0065] A tag path refers to the path used to locate a specific data element or tag, which describes the hierarchical relationship and nesting order of a tag in the data structure. A tag path represents starting from the root element, passing through each level of child elements in turn, and finally locating to a specific data tag. Each level of tag in the path will be nested within the previous level of tag, forming a hierarchical structure.

[0066] The structure priority score includes the number of tags, the complexity of the nesting level, and the field length. The asynchronous queuing delay difference includes the queue processing order, the data packet transmission timing, and the IO response delay. The redundant key update parameter includes the redundant field ratio, the redundant tag ratio, and the key sensitivity evaluation result. The key replacement update amount includes the key update interval, the key hash change information, and the encryption segment replacement result. The tag parsing optimization result includes the tag nesting depth, the tag path structure, and the parsing accuracy.

[0067] Please refer to Figure 2 , and the specific steps for obtaining the structure priority score are as follows:

[0068] S111: Based on the received markup language data packet, detect the number of tags in each data packet, identify the field length of the tags, and obtain the field length data;

[0069] Receive markup language data packets and process each of them. Identify the number of tags within the data packet and confirm the field length of each tag. In this way, the tag information of each data packet can be carefully extracted for subsequent analysis. In practical applications, assume that a markup language data packet is received, which contains 5 tags with field lengths of 50, 100, 150, 120, and 80 respectively. By processing each tag, count the number and obtain the field length information of each tag. Next, the data will be further used to analyze the structural complexity of the data packet. For example, assume there is a data packet containing the following field length data: [50, 100, 150, 120, 80]. Based on the field data, calculate the average length, identify the longest and shortest tag lengths, and conduct subsequent structural complexity evaluations. The field length data will be the key input in the subsequent steps to ensure accurate calculations and effective output results during analysis and evaluation. Finally, the number of tags (5 tags) and the field length data will be obtained.

[0070] S112: Process the tags through hierarchical analysis to evaluate the complexity of the nested structure. Combine the field length data and use the formula:

[0071] ;

[0072] Calculate the nested structure complexity value , where, represents the field length of the th tag, that is, the length of the data field contained in each tag in the data packet, is the average value of all tag field lengths, that is, the sum of all tag field lengths divided by the number of tags, used as a benchmark for the field length, is the nested depth of the th tag, that is, the nested level of the tag in the markup language structure, is the total number of tags in the data packet;

[0073] If there are 5 tags with corresponding field lengths of: [50, 100, 150, 120, and 80] respectively, and the nested depths are: [2, 1, 3, 2, and 1], next, calculate the average length of all tag fields ( ):

[0074] ;

[0075] For the calculation of the nested complexity of each tag, if the following nested depth data has been obtained: [2, 1, 3, 2, and 1], according to the formula, it is necessary to process the difference between the field length and the average length of each tag, and then combine the nested depth to calculate the complexity value. The field length of the first tag is 50, the average length is 100, and the nested depth is 2. The complexity contributed by it is calculated as follows:

[0076] Field length of Tag 1 , nested depth ;

[0077] ;

[0078] Field length of Tag 2 , nested depth ;

[0079] ;

[0080] Field length of Tag 3 , nested depth ;

[0081] ;

[0082] Field length of Tag 4 , nested depth ;

[0083] ;

[0084] Field length of Tag 5 , nested depth ;

[0085] ;

[0086] Add up the complexity values of all tags:

[0087] ;

[0088] Obtain the nested complexity value of 2.3834, which will reflect the nested complexity of the data packet and provide a basis for subsequent priority evaluation.

[0089] S113: Based on the nested structure complexity value, match the classification criteria with the nested structure complexity, evaluate the priority of each data packet, and obtain the structure priority score;

[0090] Based on the aforementioned nested structure complexity values, the priority of each data packet is evaluated according to the classification criteria. By comparing the nested complexity values with the preset classification criteria, a structural priority score is obtained. For example, assume the set criteria are: if the nested complexity is greater than 1.5, the priority is high; if it is between 1 and 1.5, the priority is medium; if it is less than 1, the priority is low. According to the aforementioned nested complexity values, the priority score of each data packet can be obtained, and the data packets are sorted. The data packets with higher complexity are processed first. For example, if the nested complexity value of a certain data packet is 2.0, then according to the classification criteria, its priority is high. Through this step, the structural priority score of each data packet will be obtained, and the data packets will be sorted according to the score to determine their processing order.

[0091] Please refer to Figure 3 , and the steps for obtaining the asynchronous queuing delay difference are specifically as follows:

[0092] S211: Based on the structural priority score, monitor the current load of the data exchange system, and use the formula:

[0093] ;

[0094] Determine the transmission timing of the data packet , and adjust the processing sequence of the data packet through queue management, where represents the data packet priority score, represents the load score of the current system, represents the processing time of the data packet, which refers to the time interval from the start of processing to completion, represents the delay adjustment coefficient, which is used to adjust the change in processing time caused by network delay or system response, represents the queuing duration of the data packet, which refers to the time the data packet waits in the queue, represents the expected processing time, which refers to the time the system should process the data packet under ideal conditions, represents the system priority benchmark;

[0095] Obtain the current load score of the system ( ) and the priority score of the data packet ( ), for example, assume the priority score of data packet A ( ) is 80, and the current system load score ( ) obtained through monitoring is 60. Then, obtain the processing time of the data packet ( ), assume it is 10 milliseconds, which is the processing time of data packet A in the system. The network delay adjustment coefficient ( ) is set to 1.1 to reflect the impact of actual network delay. This coefficient is obtained based on the delay situation of past transmissions. The queuing duration of data packet A ( ) is 30 milliseconds, while the expected processing time ( ) is 50 milliseconds. These two are based on the performance goals set by the system. Finally, the priority benchmark of the system ( ) is 20. Based on the above parameters, calculate the transmission timing of the data packet ( ):

[0096] ;

[0097] Therefore, the transmission timing of data packet A is 77.7 milliseconds, which reflects the timing of data packet A being processed in the queue. The calculated result can help the system reasonably arrange the priorities and transmission orders of each data packet, thereby optimizing the overall data transmission efficiency.

[0098] S212: Based on the processing sequence of the data packets, refine the distribution order of the data packets in the queue, adjust the processing time and response order of the data packets, and reorder them to optimize the IO response time and generate an asynchronous queuing delay difference;

[0099] Based on the calculated transmission timing of the data packet ( ), combined with the queuing duration of the data packet ( ) and the expected processing time ( ), sort the data packets. Based on this, adjust the processing time and response order of the data packets. Assume that at a certain moment, the queuing duration of data packet A is 50 milliseconds and the expected processing time is 60 milliseconds, while the queuing duration of data packet B is 30 milliseconds and the expected processing time is 40 milliseconds. Then the system will reorder according to the parameters to ensure that those tasks with longer waiting times and expected processing times close to each other are processed first. After reordering, the system can effectively optimize the IO response time and avoid unnecessary delays during the transmission of the data packets in the queue, generating an asynchronous queuing delay difference.

[0100] Please refer to Figure 4 , the specific steps for obtaining the redundant key update parameters are as follows:

[0101] S311: Based on the asynchronous queuing delay difference, structurally process the markup language content in the data packet, split the tag fields hierarchically, detect the corresponding relationships between the field names, nested structures and data contents at each level, identify the number of times the field names appear repeatedly and the consistency intervals of the field values, and obtain the tag field repetition degree;

[0102] By parsing the packet data using a markup language, the tag fields within it are split out. Tag fields are usually contained within multiple hierarchical structures of the packet. For example, in network transmission, each packet contains multiple tags such as "IP address", "data type", etc. And tags have a multi-level nested structure, where each tag contains different sub-tags or nested items. The core of the task is to identify the tag fields and their nested relationships. To this end, by detecting the naming rules of each tag field, it is verified whether they conform to the expected standards (such as whether they are pre-defined tag names). In terms of the data content, the specific values of each tag field are further analyzed to determine whether they are consistent at different transmission times, whether they conform to the defined rules, and to ensure the stability and consistency of the field values. For example, the value of the "IP address" tag field should vary within a certain range, while the value of the "data type" tag should be one of the pre-defined types. Through the rules, the number of times the field name appears repeatedly can be identified, the consistency interval of the field values can be checked, and finally the tag field repetition degree can be obtained based on the analysis results. For example, assuming that in a certain packet, the field "IP address" appears three times, its value remains consistent, and the field name repeats in multiple levels. At this time, it can be determined that the repetition degree of this tag field is relatively high. This operation can further help identify potential redundant fields in the packet, thus contributing to subsequent tag redundancy identification and risk assessment.

[0103] S312: According to the tag field repetition degree, combined with the field naming frequency, nested structure depth, and field value update interval, filter out invalid metadata, and extract the nested positions of the repeated tag fields. Use the formula:

[0104] ;

[0105] Obtain the redundant tag field density value , and get the tag redundancy interval distribution quantity. Among them, represents the weight parameter of the th field, represents the number of repetitions of the th field, represents the number of valid values of the th field, represents the nested level of the th field, represents the data update density of the th field, represents the set of update densities of all fields, represents the total number of fields;

[0106] Deeply analyze the tag fields according to the repetition degree of the tag fields, and screen out invalid metadata by combining the field naming frequency, the depth of the nested structure, and the update interval of the field values. First, evaluate the field naming frequency and check whether each field is repeated multiple times, especially those tag fields that are repeated many times. For example, if the "user information" tag appears repeatedly in multiple locations, it can be considered that the repetition degree of this field is relatively high. Then, analyze the depth of the nested structure. For each tag field, check whether it is nested in multiple hierarchical structures. For example, the "address" tag contains sub-tags such as "city", "province", and "postal code". The deeper the nested level of the field, the more complex its structure usually indicates, and there is more redundant information. Finally, consider the update interval of the field values and check the change frequency of the field values. If the values of some fields have not changed for a long time, it indicates that they are invalid metadata. For example, assume that the "IP address" field and the "device ID" field in a data packet appear frequently during transmission and their values are updated relatively frequently, while the value of the "user name" field remains unchanged for a long time. Then, it can be considered that the validity of the "user name" field is relatively low, while the validity of the "IP address" and "device ID" fields is relatively high. Based on this, invalid metadata can be further screened out, and the nested positions of the repeated tag fields can be extracted. During this process, the density value of the redundant tag fields is calculated through a formula, and the following data is available:

[0107] For field 1 ("IP address"), the weight is 2, the number of repetitions is 5, the number of valid values is 5, the nested level is 1, and the update density is 4;

[0108] For field 2 ("device ID"), the weight is 1.5, the number of repetitions is 4, the number of valid values is 4, the nested level is 2, and the update density is 3;

[0109] For field 3 ("user name"), the weight is 1, the number of repetitions is 1, the number of valid values is 0, the nested level is 1, and the update density is 1.

[0110] According to the data, calculate the density value of the redundant tag fields:

[0111] ;

[0112] For field 1:

[0113] ;

[0114] For field 2:

[0115] ;

[0116] For field 3:

[0117] ;

[0118] Calculate the density value of the redundant tag field:

[0119] ;

[0120] Therefore, the density value of the redundant tag field is approximately 0.118. This result indicates that in the case of the field, the density of the redundant tag field is low, indicating that there are few redundant tag fields in the data packet.

[0121] S313: According to the distribution quantity of the tag redundancy interval, judge the corresponding position between the field distribution density and the data packet key information, identify the field nested structure path containing the key pattern characters, mark the field group that matches the sensitive key pattern rule, compare and verify the key position, and obtain the redundant key update parameter;

[0122] By obtaining the distribution quantity of the redundant tag redundancy interval, judge the corresponding position between the field distribution density and the data packet key information. Specifically, first, it is necessary to detect the distribution density of the field, that is, which tag fields appear frequently in the entire data packet, especially the part of the field containing sensitive information. Further, by identifying the field nested structure path containing the key pattern characters, the fields can be marked to ensure that the fields do not involve redundant sensitive information. Then, by comparing and verifying the key positions of the fields, it is judged whether the field positions conform to the set key pattern rules. If some fields appear frequently and contain the key pattern, a further key update mechanism needs to be executed to avoid redundant or invalid key fields. According to this process, the redundant key update parameter is finally obtained. The role of the redundant key update parameter is to optimize the key fields in the data packet to ensure that the sensitive information in the data packet is properly protected.

[0123] Please refer to Figure 5 , and the specific steps for obtaining the key replacement update amount are as follows:

[0124] S411: Based on the redundant key update parameter, conduct a multi-segment security assessment of the currently used encryption key, and through the key segment mapping table, screen the key intervals that need to be updated to obtain the preliminary key interval update data;

[0125] By analyzing the security of the current encryption key and checking whether it meets the requirements of multi-segment encryption, it is necessary to rely on the key segment mapping table to help identify the intervals corresponding to each encryption key. Taking practical applications as an example, if it is assumed that in a certain encryption system, the key interval is divided into three segments, each segment involves different encryption strengths and lengths. Then, for the segments, the key segment mapping table can be used to determine which intervals of the keys need to be updated. For example, if it is assumed that the encryption strength of key interval 1 is too low and needs to be updated, while other intervals remain unchanged. By screening out the key intervals that need to be updated, preliminary key interval update data can be obtained, preparing for subsequent key replacement.

[0126] S412: Based on the preliminary key interval update data, perform the key replacement process, replace the hash value of the original encryption key, and generate a new key hash value, using the formula:

[0127] ;

[0128] Obtain the key replacement update amount , where and respectively represent the th and the th key interval hash values. The hash value is used to determine the security of the key interval and for calculations during key replacement. and respectively represent the th and the th key interval encryption key values. The encryption key value is the key data that needs to be replaced. represents the total number of key intervals;

[0129] According to the preliminary key interval update data, perform the key replacement process. The key lies in replacing the hash value in the original key interval and generating a new hash value. Specifically, for each key interval, by analyzing the changes in its hash value and encryption key value, calculate the key replacement update amount. During the key replacement process, use the formula to calculate the update amount for each key interval, replace the original hash value in the key interval, and generate a new key hash value. There are two key intervals, and the parameters are as follows: - The hash value of the first key interval , - The hash value of the second key interval , - The encryption key value of the first key interval , - The encryption key value of the second key interval , substitute into the formula to calculate the key replacement update amount :

[0130] ;

[0131] Therefore, the key replacement update amount is approximately 90.35. This result indicates that by replacing the hash values and encryption key values in the first and second key intervals, the obtained key replacement update amount is 90.35, further reflecting the strength and necessity of key replacement.

[0132] Please refer to Figure 6 , and the specific steps for obtaining the optimized result of label parsing are as follows:

[0133] S511: According to the key replacement update amount, identify the path and depth of each label in the data packet, extract the structural information of the label content, and evaluate the nesting level of the label path and the complexity of the marked content to obtain label evaluation data;

[0134] For each label in the data packet, first identify the label path through the key replacement update amount. The depth of the path is the number of nested layers of the label in the tree structure. The deeper the label, the more complex its structure usually is. Then, extract the structural information of the label content, such as the type, length of the label content, and whether it contains sub-labels, etc. This data helps to determine the complexity of the label. Then, calculate the depth value based on the nesting level of the label path. The greater the depth, the more complex the nesting level. Its calculation formula is the weighted sum of the nesting depth of the label path. Suppose there is a label with a depth of 3 and a path complexity index of 2. Finally, obtain the label complexity evaluation data through weighted calculation. In this process, the nesting level and complexity are used to evaluate the computing resources required for label parsing and help identify which labels cause bottlenecks in the parsing process.

[0135] S512: Based on the label evaluation data, optimize the label path. By real-time monitoring the data packet parsing process, dynamically adjust the marked path to obtain the label path adjustment configuration;

[0136] First, analyze the efficiency of the current path based on the label evaluation data, and calculate the number of jumps of each label path. The number of jumps is the number of times the label path frequently jumps during the parsing process. Too many jumps will cause parsing delays, so dynamic adjustment is required. For each path, real-time monitor the node depth of the label path. If the path depth is large or the node complexity is high, more processing time needs to be added to optimize the parsing accuracy of the label. Suppose a certain path has 5 jumps, a node depth of 4, and a complexity coefficient of 1.2. Dynamically adjust the parsing strategy according to the parameters to reduce unnecessary jumps, thereby optimizing the parsing speed. On this basis, generate an adjustment plan to ensure the effectiveness of the label path.

[0137] S513: Based on the label path adjustment configuration, according to the requirements of label parsing accuracy and efficiency, optimize the parsing path and adjust the parameters to obtain the optimized result of label parsing;

[0138] Combined with the tag path adjustment scheme, analyze the relationship between the parsing time and complexity of the tag path. First, by comparing the parsing times of each path, select the path with the shortest parsing time and the lowest complexity for further optimization. The parsing time refers to the total time required from the start of the data packet to the completion of parsing. To optimize the path, the parameter settings during the parsing process, such as cache size, jump frequency, and resource allocation, are adjusted appropriately. Suppose the parsing time of a certain path is 50 milliseconds and the complexity coefficient is 2.0. After adjustment, the time is reduced to 40 milliseconds and the complexity drops to 1.5. Finally, the optimized tag path parsing result is obtained. This result represents that through a series of optimization strategies, the path parsing efficiency is improved, and the parsing process is more efficient and accurate.

[0139] A data exchange system based on a markup language, the system includes:

[0140] The priority evaluation module measures the number of tags in each data packet based on the received markup language data packet, evaluates the complexity of the nested structure in the markup language through hierarchical analysis, measures the field length of each tag, matches it with the classification standard, determines the processing priority of the data packet, and obtains the structure priority score;

[0141] The scheduling optimization module monitors the current load of the data exchange system based on the structure priority score, determines the transmission timing of each data packet, adjusts the processing sequence of the data packets through queue management, refines the distribution order within the queue, and generates an asynchronous queuing delay difference;

[0142] The redundancy and key update module analyzes the markup language content in the data packet based on the asynchronous queuing delay difference, identifies duplicate tag fields and invalid metadata, calculates the proportion of redundant tags or fields, conducts a risk assessment on the key sensitivity of the redundant content, determines whether to execute the key update mechanism, and obtains the redundant key update parameters;

[0143] The key replacement module evaluates the security of the multi-segment encryption key currently in use based on the redundant key update parameters, determines the key interval to be updated through the key segment mapping table, executes the key replacement process, overwrites the original encrypted old value with the new key hash value, and generates the key replacement update amount;

[0144] The tag parsing optimization module evaluates the tag language parsing requirements in the data packet according to the key replacement update amount, analyzes the nested path of each tag, combines the depth of the tag path and the complexity of the tag content, dynamically adjusts the parameters during the data packet parsing process, and obtains the tag parsing optimization result.

[0145] The above are only the preferred embodiments of the present invention, and do not limit the present invention in other forms. Any person skilled in the relevant art may use the technical content disclosed above to make changes or modifications into equivalent embodiments with equivalent changes and apply them to other fields. However, as long as it does not depart from the technical solution content of the present invention, any simple modification, equivalent change and modification made to the above embodiments based on the technical essence of the present invention still fall within the protection scope of the technical solution of the present invention.

Claims

1. A data exchange method based on a markup language, characterized in that Including the following steps: S1: Based on the received markup language data packets, determine the number of tags in each data packet. Through hierarchical analysis, evaluate the complexity of the nested structure in the markup language, measure the field length of each tag, match it with the classification criteria, determine the processing priority of the data packet, and obtain the structural priority score; S2: Based on the structural priority score, monitor the current load of the data exchange system, determine the transmission timing of each data packet, adjust the processing sequence of the data packets through queue management, refine the distribution order within the queue, and generate an asynchronous queuing delay difference; S3: Based on the asynchronous queuing delay difference, analyze the markup language content in the data packet, identify duplicate tag fields and invalid metadata, calculate the proportion of redundant tags or fields, conduct a risk assessment on the key sensitivity of the redundant content, and determine whether to execute the key update mechanism to obtain the redundant key update parameter; S4: Based on the redundant key update parameter, evaluate the security of the multi-segment encryption key currently in use. Through the key segment mapping table, determine the key interval that needs to be updated, and overwrite the original encrypted old value with the new key hash value to generate the key replacement update amount.

2. The data exchange method based on a markup language according to claim 1, wherein The structural priority score includes the number of tags, the complexity of the nested level, and the field length. The asynchronous queuing delay difference includes the queue processing order, the data packet transmission timing, and the IO response delay. The redundant key update parameter includes the proportion of redundant fields, the proportion of redundant tags, and the key sensitivity evaluation result. The key replacement update amount includes the key update interval, the key hash change information, and the encryption segment replacement result.

3. The data exchange method based on a markup language according to claim 1, wherein The specific steps for obtaining the structural priority score are as follows: S111: Based on the received markup language data packets, detect the number of tags in each data packet, identify the field length of the tags, and obtain the field length data; S112: Process the tags through hierarchical analysis, evaluate the complexity of the nested structure, and combine the field length data to use the formula: ; Calculate the complexity value of the nested structure , where represents the field length of the th tag, is the average value of the field lengths of all tags, is the nesting depth of the th tag, is the total number of tags in the data packet; S113: Based on the nested structure complexity value, match it with the classification criteria according to the nested structure complexity, conduct a priority evaluation on each data packet, and obtain the structural priority score.

4. The data exchange method based on a markup language according to claim 1, characterized in that, The specific steps for obtaining the asynchronous queuing delay difference are as follows: S211: Based on the structural priority score, monitor the current load of the data exchange system, and use the formula: ; Determine the transmission timing of data packets , and adjust the processing sequence of data packets through queue management, where represents the priority score of the data packet, represents the load score of the current system, represents the processing time of the data packet, represents the delay adjustment coefficient, represents the queuing duration of the data packet, represents the expected processing time, represents the system priority benchmark; S212: Based on the processing sequence of the data packets, refine the distribution order of the data packets in the queue, adjust the processing time and response order of the data packets, and reorder them to optimize the IO response time and generate an asynchronous queuing delay difference.

5. The data exchange method based on a markup language according to claim 1, characterized in that The specific steps for obtaining the redundant key update parameter are as follows: S311: Based on the asynchronous queuing delay difference, conduct a structured processing on the markup language content in the data packet, split the tag fields by level, detect the corresponding relationship between the field naming, nested structure, and data content at the level, identify the number of times the field name appears repeatedly and the consistency interval of the field value, and obtain the tag field repeatability; S312: Based on the tag field repeatability, combine the field naming frequency, nested structure depth, and field value update interval, screen out the invalid metadata, and extract the nested positions of the duplicate tag fields, and use the formula: ; Obtain the redundancy tag field density value , obtain the label redundancy interval distribution quantity, where represents the weight parameter of the th field, represents the repetition times of the th field, represents the valid value times of the th field, represents the nesting level of the th field, represents the data update density of the th field, represents the set of update densities of all fields, represents the total number of fields; S313: Based on the distribution quantity of the label redundancy interval, determine the corresponding position between the field distribution density and the data packet key information, identify the field nested structure path containing key pattern characters, mark the field group that matches the sensitive key pattern rule, compare the key positions for verification, and obtain the redundant key update parameter.

6. The data exchange method based on a markup language according to claim 1, wherein The specific steps for obtaining the key replacement update quantity are as follows: S411: Based on the redundant key update parameter, conduct a multi-segment security assessment of the currently used encryption key. Through the key segment mapping table, screen the key intervals that need to be updated to obtain the preliminary key interval update data. S412: Based on the preliminary key interval update data, perform a key replacement process, replace the hash value of the original encryption key, and generate a new key hash value. Use the formula: ; Obtain the key replacement update amount , where and represent the hash values of the -th and -th key intervals respectively, and represent the encryption key values of the -th and -th key intervals respectively, represents the total number of key intervals.

7. The data exchange method based on a markup language according to claim 1, wherein The steps further include: S5: Based on the key replacement update quantity, evaluate the markup language parsing requirements in the data packet, analyze the nested path of each label, and combine the depth of the label path and the complexity of the markup content to dynamically adjust the parameters during the data packet parsing process, optimize the accuracy and efficiency of label parsing, and obtain the label parsing optimization result. The label parsing optimization result includes the label nesting depth, the label path structure, and the parsing accuracy.

8. The data exchange method based on a markup language according to claim 7, wherein The specific steps for obtaining the label parsing optimization result are as follows: S511: Based on the key replacement update quantity, identify the path and depth of each label in the data packet, extract the structural information of the label content, and evaluate the nesting level of the label path and the complexity of the markup content to obtain the label evaluation data. S512: Based on the label evaluation data, optimize the label path, and dynamically adjust the markup path by real-time monitoring the data packet parsing process to obtain the label path adjustment configuration. S513: Based on the label path adjustment configuration, optimize the parsing path and perform parameter adjustment according to the requirements of label parsing accuracy and efficiency to obtain the label parsing optimization result.

9. A data exchange system based on a markup language, characterized in that, Executed according to the markup language-based data exchange method described in any one of claims 1-8, the system includes: The priority evaluation module, based on the received markup language data packet, determines the number of labels in each data packet, evaluates the complexity of the nested structure in the markup language through hierarchical analysis, measures the field length of each label, matches with the classification standard, determines the processing priority of the data packet, and obtains the structure priority score. The scheduling optimization module, based on the structure priority score, monitors the current load of the data exchange system, determines the transmission timing of each data packet, adjusts the processing sequence of the data packets through queue management, refines the distribution order within the queue, and generates the asynchronous queuing delay difference. The redundancy and key update module, based on the asynchronous queuing delay difference, analyzes the markup language content in the data packet, identifies duplicate label fields and invalid metadata, calculates the proportion of redundant labels or fields, conducts a risk assessment of the key sensitivity of the redundant content, and determines whether to execute the key update mechanism to obtain the redundant key update parameter. The key replacement module evaluates the security of the multi-segment of the currently used encryption key according to the redundant key update parameter, determines the key interval to be updated through the key segment mapping table, executes the key replacement process, overwrites the original encrypted old value with the new key hash value, and generates the key replacement update amount; The tag parsing optimization module evaluates the markup language parsing requirements in the data packet according to the key replacement update amount, analyzes the nested path of each tag, and dynamically adjusts the parameters in the data packet parsing process in combination with the depth of the tag path and the complexity of the markup content to obtain the tag parsing optimization result.

Citation Information

Patent Citations

  • Encryption technique method based on digital signature in data communication transmission

    CN101247232A

  • Data exchange method, tool, system, equipment and medium

    CN114679324A