Message length field mapping method and system based on dual-reference constraint maintaining detection

By using a dual-benchmark constraint-maintaining probe method, a constraint-maintaining probe set is constructed and the response coefficients of the message length field are separated. This solves the problem that the direction of change of the message length field is difficult to distinguish in the prior art, and achieves accurate message length mapping and reduces the error rate.

CN123145349APending Publication Date: 2026-11-20BEIJING FUTURE JUDIAN INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611659455.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-26
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively distinguish and compensate for changes in the message length field during the mapping process, leading to buffer size calculation errors and fragment reassembly failures. Furthermore, they fail to effectively utilize the impact of different single fragment payload byte counts on the linkage response coefficient.

Method used

A dual-benchmark constraint-maintaining probe method is adopted. By constructing two success benchmarks with different single-fragment payload byte counts, a constraint-maintaining probe set is constructed. Only one free field is changed and the total declared byte count is compensated. Dimensionless identifiability pre-detection and response acquisition are performed. The response coefficient of the message length field is separated, and path mapping determination and response verification are performed.

Benefits of technology

It achieves accurate mapping of the message length field, reduces the error rate, reduces the interference of invalid network calls on response separation, improves the accuracy of segmentation conversion and path attribution, and reduces the risk of buffer calculation and fragment reassembly.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123145349A_ABST
    Figure CN123145349A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of network communication protocol adaptation, in particular to a message length field mapping method and system based on double-reference constraint maintaining detection, wherein the present application constructs constraint maintaining probes on two successful references with different single-fragment payload byte numbers, so that each detection only changes one free field, and meanwhile, the declared total byte number is compensated to a value meeting the interface association consistency check, whereby the detection request can be processed by the target black box interface, and the linkage magnification difference in the two references forms detection information different from the single-reference three directions, so that sufficient and mutually distinguished legal detection directions can be obtained, providing a basis for the subsequent contribution of separating four message length fields.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of network communication protocol adaptation technology, specifically relating to a message length field mapping method and system based on dual-reference constraint-preserving probing. Background Technology

[0002] In industrial internet platforms, when gateways, edge devices, and protocol adapters exchange fragmented message description information, they typically write the number of fragments, the number of bytes per fragment payload, the number of bytes in the extension area, and the total declared bytes into the request. They then configure the message length conversion relationship based on the numerical information in the interface response. The target black-box interface refers to a network interface whose internal field naming and conversion rules cannot be directly read, but which can receive structured requests and return structured responses. The response telemetry path is the location path from the root level of the response to the numerical leaf node, used to identify the response value when field names and nesting levels differ.

[0003] In this context, existing mapping processes often start with a successfully invoked request, modify the length field in the request, and then compare the telemetry path values ​​of the responses before and after the modification. Before allocating a buffer or initiating fragment reassembly, the target black-box interface checks the consistency of the associations of each length field within the request; specifically, the declared total bytes are calculated by multiplying the number of fragments by the payload bytes per fragment, and then including the extension area bytes. To pass this check, the probe request needs to recalculate the declared total bytes while modifying the free fields.

[0004] However, when only the free fields are changed without compensating for the total number of bytes declared, the request will be rejected prematurely by the association consistency check, resulting in a lack of comparable numerical changes in the response. Even with synchronous compensation on a single successful request, the direction of change around the three free fields is less than that of the four length fields that need to be identified. If multiple free fields are changed simultaneously to increase the direction of change, the contributions of each field to a single response become mixed, making it difficult to distinguish between piecewise transformations, truncation, and nonlinear changes. Furthermore, existing single-benchmark probing does not utilize the impact of different single-fragment payload byte numbers on the linkage response coefficient, which can easily lead to multiple candidate mappings conforming to the existing response, thereby writing the error multiplier into the protocol adapter, causing buffer size calculation deviations or fragment reassembly failures.

[0005] To address the aforementioned issues, this invention proposes a message length field mapping method and system based on dual-benchmark constraint-preserving probing. Summary of the Invention

[0006] To address the aforementioned problems in the prior art, the present invention aims to provide a message length field mapping method and system based on dual-reference constraint-preserving probe.

[0007] To achieve the above-mentioned objectives, the technical solution adopted by this invention is as follows: The message length field mapping method based on dual-reference constraint-preserving probe includes: Obtain the request template for the target black-box interface. The request template includes the number of shards, the payload bytes per shard, the number of bytes in the extension area, and the total number of bytes declared. Based on the request template, a first success benchmark and a second success benchmark with different single fragment payload bytes are formed, and each success benchmark satisfies the message length association rule; Based on the first success benchmark and the second success benchmark, a set of constraint-holding probes is constructed. The constraint-holding probes only change one of the free fields: the number of fragments, the number of bytes of payload per fragment, or the number of bytes of the extension area, while compensating for the total number of bytes of the declaration to keep the association rule valid. A dimensionless identifiability pre-detection is performed on the perturbation direction of the constrained probe set. After the pre-detection is passed, the probe is sent and repeated responses are collected to form a stable repeated sampling set. Based on the stable repeated sampling set, separate the response coefficients for the total number of bytes, the number of fragments, the number of bytes of payload per fragment, and the number of bytes of the extension region in a fixed elimination order; Based on the response coefficient, the path mapping is determined to obtain the mapping candidate set, and the reserved requests that did not participate in the coefficient separation are used to verify the response. After successful verification, the mapping candidate set is atomically published as a message length field mapping, and a health check and version rollback are performed.

[0008] Preferably, forming a first success benchmark and a second success benchmark with different single-fragment payload bytes based on the request template includes: Multiply the number of fragments by the number of bytes of payload per fragment, and then include the number of bytes of the extension region in the result. Use this result to overwrite the total number of bytes declared. Send a candidate request that has been reviewed and verified to confirm that the transmission is complete, the application status is successful, and the response contains a parsable numerical leaf node to obtain the first success benchmark; Change the single-fragment payload bytes of the first success benchmark, recalculate the total declared bytes according to the same association rules, send again and confirm success to obtain the second success benchmark; The difference in single-fragment payload bytes between the two successful benchmarks is within a preset range, and common response telemetry paths with uniform units are retained.

[0009] Preferably, a constraint-maintaining probe set is constructed based on a first success criterion and a second success criterion, comprising: Copy the requested content from the first success benchmark, change only the number of fragments and recalculate the total number of bytes declared to obtain the first fragment number probe; Change the single-fragment payload bytes of the first success benchmark while keeping the number of fragments and the number of bytes in the extension area unchanged. Declare the total number of bytes to be updated according to the changed payload length to obtain the payload byte count probe. Change the number of bytes in the extended region of the first success benchmark while keeping the other two free fields unchanged, declare that the total number of bytes is updated synchronously with the extended length, and obtain the extended region byte count probe; Copy the request content from the second success benchmark, change only the number of fragments and synchronously update the declared total number of bytes to obtain the second fragment number probe; The first fragment count probe, the payload byte count probe, the extension region byte count probe, and the second fragment count probe constitute the constraint-maintaining probe set.

[0010] Preferably, a dimensionless discernibility pre-detection is performed on the perturbation direction of the constraint-maintaining probe set, including: The column scale normalization of the field changes of the four probes relative to their respective success benchmarks is performed to obtain a set of dimensionless perturbation directions; Calculate the absolute value of the determinant and the condition number of the normalized perturbation matrix; When the absolute value of the determinant is not higher than the first threshold, increase the difference in the number of single-segment payload bytes between the two successful benchmarks and reconstruct the probe; when the absolute value of the determinant is higher than the first threshold but not higher than the second threshold, retain the direction set; when the condition number is not higher than the second identifiability threshold, allow entry into response acquisition, and when it is higher than the threshold, adjust the perturbation amount of the payload byte number or the perturbation amount of the extension area byte number and then re-pre-detect.

[0011] Preferably, sending probes and collecting repetitive responses to form a stable repetitive sampling set includes: Each probe keeps the request body unchanged and repeatedly calls the target black-box interface, recording the values ​​according to the request identifier, response telemetry path and repeat sequence number; For the same path, the median value is taken as the representative value, and the difference between the maximum and minimum values ​​is taken as the repeating range. If the repeat range is not greater than the preset allowable value, the path is retained; if it is greater than the preset allowable value, the entire group of requests is re-collected; if it is still greater than the preset allowable value after re-collection, coefficient separation is stopped.

[0012] Preferably, the response coefficients of the four message length fields are separated according to a fixed elimination order, including: The difference between the first unit response and the second unit response, combined with the difference in the number of single-fragment payload bytes between the two successful benchmarks, yields the response coefficient of the total declared bytes to the response telemetry path. The fragment number response coefficient is obtained by subtracting the linkage contribution caused by the change of the total number of declared bytes with the number of fragments from the unit response of the first fragment number probe. The unit response of the payload byte count probe is subtracted from the contribution of the declared total bytes amplified by the base fragment count to obtain the single fragment payload byte count response coefficient; The extension region byte count response coefficient is obtained by subtracting the contribution of the total declared byte count from the unit response of the extension region byte count probe.

[0013] Preferably, the path mapping determination based on the response coefficient includes: Calculate the target contribution ratio and the non-target contribution ratio. When the target contribution ratio is not lower than the first attribution threshold and the non-target contribution ratio is not higher than the second attribution threshold, accept path pairing. The accepted path pairings perform a unique occupancy check based on the four request fields. If only the four fields occupy four different paths respectively, the multiplier and offset are checked further. The offset of the path is obtained by subtracting the portion of the corresponding request field converted according to the response coefficient from the response values ​​of the successful baseline and probe. If the maximum difference between the offsets of each record is not greater than the preset allowable value, the mapping candidate is retained.

[0014] Preferably, response verification is performed using a hold-out request, including: Construct a valid request that did not participate in the successful benchmark selection and response coefficient separation, and obtain the predicted values ​​of each response telemetry path based on the multiplier and offset in the mapping candidates; Send a holdout request and read the actual response to obtain the absolute holdout error; If the absolute error of each path is less than or equal to the preset allowable value, it is considered passed. If the absolute error of any path is higher than the preset allowable value, a segmented value appears, or the corresponding path disappears, it is considered a failure, and the mapping candidate set is set to blocked.

[0015] Preferably, after successful verification, the system atomically releases the application and performs health checks and version rollback, including: Verify that the verification credentials match the current configuration version. If the versions match, write the four request fields, four response telemetry paths, multiplier, offset, and applicable range to the same new configuration snapshot, and use an atomic version switch to make the mapping of the entire set of fields effective. After the new configuration version takes effect, a message length conversion and fragment reassembly health check will be performed. If a buffer calculation error caused by length conversion or a fragment reassembly failure is detected in the health check window, the old configuration will be switched back and the new version will be marked as undone; if the window expires and no exception is triggered, the new configuration will be kept as the current valid version.

[0016] Preferably, the message length field mapping system based on dual-reference constraint-preserving probing includes: The probe generation module is used to obtain the request template of the target black box interface, form a first success benchmark and a second success benchmark with different single fragment payload bytes based on the request template, and construct a set of constraint holding probes based on the first success benchmark and the second success benchmark. The constraint holding probes only change one of the free fields of the number of fragments, the single fragment payload bytes, or the number of bytes in the extension area, while compensating for the total number of bytes declared to keep the association rules valid. The response separation module is used to perform a dimensionless identifiability pre-detection on the perturbation direction of the constraint-maintaining probe set. After the pre-detection is passed, the probe is sent and repeated responses are collected to form a stable repeated sampling set. Based on the stable repeated sampling set, the response coefficients of the total number of bytes, the number of fragments, the number of bytes of the single fragment payload, and the number of bytes of the extension area are separated in a fixed elimination order. The mapping verification module is used to perform path mapping determination based on the response coefficients, obtain a mapping candidate set, and use the hold-out requests that did not participate in coefficient separation to perform response verification. The configuration publishing module is used to atomically publish the mapping candidate set as a message length field mapping after successful verification, and to perform health checks and version rollback.

[0017] Beneficial effects 1. This invention constructs constraint-maintaining probes on two success benchmarks with different single-fragment payload byte counts, so that each probe changes only one free field, while compensating the total declared byte count to a value that meets the interface association consistency check. This ensures that the probe request can be processed by the target black-box interface, and utilizes the linkage ratio difference between the two benchmarks to form probe information that is different from the three directions of a single benchmark. This allows for obtaining a sufficient number of mutually distinguishable legitimate probe directions, providing a basis for the subsequent separation of the contributions of the four message length fields.

[0018] 2. This invention, based on pre-transmission identifiability pre-detection, can change the baseline and perturbation range when directional degradation or numerical ill-conditioning occurs, reducing the interference of invalid network calls on subsequent response separation. By employing a fixed elimination order to first obtain the response coefficient of the declared total number of bytes, and then deducting the contribution of this field to the linkage of other probes, the impact of mixed changes in the four length fields on path attribution can be reduced. Utilizing path bijection and offset consistency constraints on candidate mappings, and verifying the predicted response with legitimate requests not involved in coefficient calculation, segmented transformations, non-affine changes, and path conflicts are identified before configuration release.

[0019] 3. This invention maintains the entire mapping group in effect simultaneously by verifying credentials, checking configuration versions, and atomic switching. It retains the old configuration when the call fails, version competition occurs, or runtime health checks are abnormal, thereby reducing the risk of error multipliers entering the buffer calculation and fragment reassembly process. Attached Figure Description

[0020] Figure 1 This is a flowchart of the method of the present invention; Figure 2 This is a system module diagram of the present invention. Detailed Implementation

[0021] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific embodiments. It should be understood that the specific embodiments described herein are merely for explaining the invention and are not intended to limit the scope of protection of the invention.

[0022] Example 1 Please see Figure 1 As shown, this embodiment provides a message length field mapping method based on dual-reference constraint-preserving probe, which includes the following steps: S1. Obtain the request template and form a double success benchmark with different single-fragment payload byte counts; Obtain the request template for the target black-box interface, including the number of fragments, the number of bytes per fragment payload, the number of bytes in the extension area, and the total declared bytes. The number of fragments represents the number of fragments declared in the request; the number of bytes per fragment payload represents the payload length of each fragment participating in the length calculation, in bytes; the number of bytes in the extension area represents the extension length included in the total message length outside the fragment set, in bytes. Multiply the number of fragments by the number of bytes per fragment payload, then add the number of bytes in the extension area to the result. Use this result to overwrite the total declared bytes. If the overwrite result is inconsistent with the value to be sent, stop the current transmission, rewrite the total declared bytes, and then review again.

[0023] The allowed range of the requested fields undergoes boundary checks during baseline selection. The number of shards can range from 2 to 65535, the payload size per shard can range from 64 bytes to 65535 bytes, and the extension area can range from 0 bytes to 4096 bytes. If any field is below the lower limit or above the upper limit, the candidate value is replaced. The declared total number of bytes can be no greater than 16,777,215 bytes. If the correlation recalculation result exceeds this upper limit, the number of shards or the payload size per shard is reduced, and the correlation review is re-executed.

[0024] A success baseline refers to a request record and its response record that satisfy the message length association rules and receive a successful response. The request record stores four length fields and a snapshot of the request body, while the response record writes each numerical leaf node as a response telemetry path and its corresponding value. A candidate request that has undergone association verification is sent to confirm that transmission is complete, the application status is successful, and the response contains resolvable numerical leaf nodes, thus obtaining the first success baseline. The response telemetry path in the first success baseline is persisted according to its hierarchical name and array position; duplicate names are distinguished by their complete hierarchical level. When the response value is text, null, or a non-finite value, the corresponding path is not listed as a candidate. If the numerical unit can be converted to the same measurement baseline, the converted value and original unit are recorded along with the path.

[0025] Change the single-fragment payload bytes of the first success benchmark, recalculate the total declared bytes according to the same association rules, send again and confirm success to obtain the second success benchmark.

[0026] Two successful benchmarks constitute a double-success benchmark, and the difference in the number of bytes of single-fragment payload between the two can range from 256B to 4096B. When the difference in the number of bytes of single-fragment payload is lower than the lower limit of this range, the second candidate value is increased; when it is higher than the upper limit and causes the total number of declared bytes to exceed the limit, the second candidate value is decreased, until both records are successful. The double-success benchmark retains the telemetry paths of responses that occur in common and whose units can be unified; when there are fewer than 4 common paths, the existing response is insufficient to carry a four-field bijection, so the second candidate request is replaced; when the number of common paths obtained again is still less than 4, the probe status is set to blocked and the reason for the interface mode inconsistency is saved.

[0027] S2. Construct a set of constraint-maintaining probes based on a double-success benchmark, where each probe changes only one free field and synchronously compensates for the total number of bytes declared. The request content is copied from the first successful baseline, only the number of fragments is changed, and the total declared bytes are recalculated to obtain the first fragment number probe. The constraint-maintaining probe refers to a probe request that only changes one of the free fields—the number of fragments, the single-fragment payload bytes, or the extension region bytes—while compensating for the total declared bytes to maintain the association rule. The fragment number perturbation can be 1 to 4; if it exceeds the limit after increasing, it is reduced by the same absolute amount; if both exceed the limit in both directions, the baseline is changed. The single-fragment payload bytes of the first successful baseline are changed according to a predetermined perturbation amount, while the number of fragments and the extension region bytes remain unchanged. The total declared bytes are updated according to the changed payload length, thus obtaining the payload byte number probe. The payload byte number perturbation amount can be 64B to 512B; if the increase direction exceeds the field limit or the total declared bytes limit, it is reduced by the decrease direction; if the decrease direction is below the field limit, the perturbation amount is gradually reduced. The number of bytes in the extended region of the first successful benchmark changes according to a predetermined perturbation, while the other two free fields remain unchanged. The total number of bytes declared is updated synchronously with the extended length, thus obtaining the extended region byte count probe. The perturbation amount for the extended region byte count can be from 16B to 128B. If neither increasing nor decreasing the perturbation can maintain the field range, the current benchmark is abandoned, and no out-of-bounds request is sent. The second successful benchmark is copied as another request, changing only the number of fragments and synchronously updating the total number of bytes declared, thus obtaining the second fragment count probe. The first fragment count probe, the payload byte count probe, the extended region byte count probe, and the second fragment count probe constitute a constraint-maintaining probe set, where the latter fragment count probe uses different single-fragment payload byte counts to form different declared total byte count linkage ratios.

[0028] The constraint ensures that the field range and association rules of the probe set are reviewed one by one before network calls. If the local recalculated value of any probe is inconsistent with the declared total number of bytes, only that probe is rebuilt; if it is still inconsistent after recalculation, the entire probe set is canceled to avoid writing rejection responses from illegal requests into the probe log.

[0029] S3. Perform a dimensionless identifiability pre-check on the perturbation direction of the constraint-maintaining probe; The column-scale normalization of the field changes of the four probes relative to their respective success benchmarks yields a set of dimensionless perturbation directions. Normalization only eliminates differences in units and magnitudes among the four fields. If a column of a certain field does not show a valid change, the pre-detection status is set to failed, and the probe corresponding to that field is returned for reconstruction.

[0030] The column scaling factor for each field is the square root of the sum of the squares of the four variations of that column across the four probes. Let the first... The probe relative to its success benchmark in the first The changes in each field are ,in To constrain and maintain the probe index in the probe set, =1, 2, 3, 4, =1, 2, 3, 4, and =1, 2, 3, and 4 correspond to the number of fragments, the payload bytes per fragment, the number of bytes in the extension region, and the total number of bytes declared, respectively; the field change matrix is ​​composed of the field changes of the four probes. . No. Column scale factor satisfy:

[0031] Dividing each column of the field change matrix by the corresponding column scale factor yields the normalized perturbation matrix. ,in:

[0032] The normalized perturbation matrix Equivalent to field change matrix Right-multiply by a diagonal matrix consisting of the reciprocals of the four column scale factors, i.e.:

[0033] Any column of scale factors When the value equals 0, it is determined that the field corresponding to that column has not changed and the current pre-detection is stopped. This yields the set of dimensionless perturbation directions, and the absolute value of the determinant of the subsequent normalized perturbation matrix is... The condition number is .

[0034] In one optional implementation, the changes in the four probes for the four fields are (1, 0B, 0B, 1024B), (0, 128B, 0B, 1024B), (0, 0B, 32B, 32B), and (1, 0B, 0B, 1280B), respectively. Therefore, the column scaling factors for the four columns are 1.4142, 128B, 32B, and 1933.0225B, respectively. After division, the four dimensionless perturbation directions are (0.7071, 0, 0, 0.5297), (0, 1, 0, 0.5297), (0, 0, 1, 0.0166), and (0.7071, 0, 0, 0.6622), respectively. The absolute value of the determinant calculated based on this is 0.0936457468, and the condition number is 21.3102.

[0035] The absolute value of the determinant of the normalized perturbation matrix is ​​obtained from the set of dimensionless perturbation directions. This absolute value characterizes whether the four directions are linearly independent and dimensionless. A first threshold and a second threshold are set for the absolute value of the determinant. The first threshold can be between 0.02 and 0.03, and the second threshold can be between 0.05 and 0.08, with the second threshold being higher than the first threshold. If the absolute value of the determinant is not higher than the first threshold, the difference in single-segment payload bytes between the two successful benchmarks is increased, and the probe is reconstructed. If the absolute value of the determinant is higher than the first threshold but not higher than the second threshold, the set of directions is retained. If the absolute value of the determinant is higher than the second threshold, the set of directions is retained, and condition number pre-detection continues. The condition number of the normalized perturbation matrix is ​​calculated from the normalized perturbation matrix. This condition number characterizes the degree to which the perturbation direction amplifies the response error and is dimensionless. The second identifiability threshold can be between 30 and 80. When the condition number is not higher than the second identifiability threshold, response acquisition is allowed. When it is higher than the threshold, the perturbation amount of the payload bytes or the perturbation amount of the extended area bytes are adjusted so that the scales of each field column are close and then a pre-inspection is performed.

[0036] S4. Send the constraint-holding probe that has passed the pre-detection and collect repeated responses to form a stable set of repeated samples; Each probe that passes the pre-inspection retains its request body and repeatedly calls the target black-box interface. Values ​​are recorded according to the request identifier, response telemetry path, and repetition sequence number, forming a repetitive sampling set. Each request can be repeated 2 to 5 times, with a single response wait limit of 500ms to 1500ms. If a complete response is not obtained after reaching the selected limit, it is considered a timeout, and retrying is performed within an interval of 100ms to 500ms. If consecutive failures occur, the entire sampling set is set to "temporarily uncertain." The median value of the values ​​along the same path in the repetitive sampling set is taken as the representative value, and the difference between the maximum and minimum values ​​is taken as the repetition range. The allowable repetition range is the larger of 0.005 response units to 0.02 response units and 0.1% to 0.5% of the absolute value of the representative value. If the repetition range is not greater than the selected allowable value, the path is retained; if it is higher than the allowable value, the entire request set is re-sampled; if it is still higher than the allowable value after re-sampled, coefficient separation is stopped. The response unit refers to the unit of measurement used by the leaf nodes of the response telemetry path.

[0037] A stable and complete set of repeated samples is subtracted from the success benchmark to which the probe belongs to obtain the probe response difference for each response telemetry path. The response difference is then converted into a unit perturbation response according to the corresponding free field perturbation. The same path generates a first unit response and a second unit response under two sets of fragmented probes, respectively.

[0038] S5. Separate the response coefficients of the four message length fields according to a fixed elimination order; The difference between the first unit response and the second unit response, combined with the difference in the number of single-fragment payload bytes between the two successful benchmarks, yields the response coefficient of the total declared bytes for the telemetry path of that response. This response coefficient represents the change in path value for each unit change in the requested field. If the number of payload bytes between the two successful benchmarks is equal, the difference is incalculable, or the response value is not finite, the probe status is set to blocked, and a new benchmark is selected.

[0039] The unit response of the first fragment number probe is subtracted from the linkage contribution caused by the change in the total declared bytes as the number of fragments changes, resulting in a fragment number response coefficient; the fragment number response coefficient represents the change in path value when the number of fragments changes by 1. The unit response of the payload byte number probe is subtracted from the linkage contribution of the total declared bytes amplified by the base fragment number, resulting in a single fragment payload byte number response coefficient; the single fragment payload byte number response coefficient represents the change in path value when the single fragment payload byte number changes by 1 byte. The unit response of the extension region byte number probe is subtracted in the same way to remove the linkage contribution of the total declared bytes, resulting in an extension region byte number response coefficient; the extension region byte number response coefficient represents the change in path value when the extension region byte number changes by 1 byte.

[0040] Each response telemetry path thus generates four candidate response coefficients, and the absolute contribution of each type is obtained based on the actual span of the corresponding request field in the probe set. The absolute contributions of each type are normalized according to the total contribution of the same path to form the target contribution ratio and the non-target contribution ratio; the former represents the contribution share of the dominant request field, and the latter represents the contribution share of the remaining fields, both of which are dimensionless quantities.

[0041] S6. Perform path mapping determination based on the response coefficient and verify the response using the reserved request; The first attribution threshold for the target contribution percentage can be between 0.9 and 0.98, and the second attribution threshold for the non-target contribution percentage can be between 0.02 and 0.1, with the first attribution threshold being higher than the second attribution threshold. Path pairing is accepted when the target contribution percentage is not lower than the first attribution threshold and the non-target contribution percentage is not higher than the second attribution threshold; if either condition is not met, the pairing is revoked, and numerical evidence is not supplemented based on the path name. Accepted path pairings undergo a unique occupancy check according to the four request fields to obtain a mapping candidate set. If a request field has no corresponding path, two request fields compete for the same path, or a field occupies multiple paths, the entire set of mapping candidates is blocked; if only the four fields occupy four different paths respectively, the multiplier and offset determined by the response coefficient of each field on its corresponding path are further checked.

[0042] The offset of the path is obtained by subtracting the portion of the corresponding request field converted according to the response coefficient from the response values ​​of the successful baseline and probe. The maximum allowable difference in offset can be the greater of 0.005 response units to 0.02 response units and 0.1% to 0.5% of the absolute value of the offset median. If the maximum difference in the offset of each record is not greater than the selected allowable value, the mapping candidate is retained. If it is higher than the allowable value, the unit of measurement and integer rounding rules are first unified. If it still exceeds the limit after review, the path is cancelled. Construct a valid request that did not participate in the selection of successful baseline and separation of response coefficients. Obtain the predicted value of each response telemetry path based on the multiplier and offset in the mapping candidate. Send the reserved request and read the actual response to obtain the verification certificate. The verification certificate records the configuration version, request summary, predicted value, actual value, path-by-path conclusion and overall judgment. The request summary is only used to identify this verification and does not participate in the field attribution judgment.

[0043] The absolute error is left over between the actual response and the predicted response. The allowable value for the leave over error can be the greater of 0.005 response units to 0.02 response units and 0.1% to 0.5% of the absolute value of the predicted value. If the absolute error of the leave over error for each path is less than or equal to the selected allowable value, it is recorded as a pass. If any path exceeds the allowable value, a segmented value appears, or the corresponding path disappears, it is recorded as a failure, and the mapping candidate set is set to blocked.

[0044] S7. After successful verification, atomically publish the message length field mapping and perform health checks and version rollback; Verification credentials that pass the full path are bound to the mapping candidate set, and the configuration version at the start of the probe is checked against the current configuration version. If the versions match, the four request fields, four response telemetry paths, multiplier, offset, and applicable range are written to the same new configuration snapshot, and then an atomic version switch is used to make the entire set of field mappings effective. If the versions do not match, the current version is read, and the leaveout verification is re-executed based on this. The applicable range refers to the range of request field values ​​to which the multiplier and offset in the mapping candidate apply.

[0045] After the new configuration version takes effect, message length conversion and fragment reassembly health checks are performed, and the final output is a field mapping version that can be read by the protocol adapter. The health check window can be 30s to 120s. If a buffer calculation error caused by length conversion or fragment reassembly failure is detected within the window, the old configuration is switched back and the new version is marked as revoked. If the window expires and no exception is triggered, the new configuration is kept as the current valid version. If duplicate range exceeds the limit, a retention exception occurs, or the health check fails, the old configuration is retained and the reason is recorded. After reselecting a successful baseline or adjusting the probe, a new probe task identifier is generated, and the process re-enters pre-check and subsequent processing.

[0046] Example 2 Please see Figure 2 As shown, this embodiment provides a message length field mapping method based on dual-benchmark constraint-maintaining probe, including a probe generation module, a response separation module, a mapping verification module, and a configuration publishing module.

[0047] The probe generation module acquires two successful benchmarks with different single-fragment payload byte counts and generates a constraint-maintaining probe set from these two benchmarks. This module communicates bidirectionally with the target black-box interface. The request template storage provides the module with verification requests, and the module saves successful benchmark records and probe records, enabling the response separation module to form differentials based on their respective benchmarks. Specifically, the benchmark acquisition unit performs a length field correlation verification on the request template, calls the target black-box interface to obtain two successful responses, and outputs dual-success benchmark records with different single-fragment payload byte counts. If there are fewer than four common numerical paths or the benchmark difference does not meet the selection criteria, this unit maintains the candidate benchmark state and replaces the candidate request. The probe construction unit modifies three free fields on the first successful benchmark and changes the fragment number on the second successful benchmark, compensating for the declared total byte count each time, thereby outputting a constraint-maintaining probe set. If a field exceeds the bounds or the correlation verification fails, this unit adjusts the perturbation direction or reconstructs the corresponding probe.

[0048] The response separation module is used for pre-detection constraint holding probes, collecting repeated responses, and separating the response coefficients of the four message length fields. This module's network call interface connects to the target black-box interface. If the pre-detection fails, it returns the cause status to the probe generation module; if the sampling is complete and stable, it outputs a candidate coefficient set organized according to the response telemetry path. The identifiability pre-detection unit converts the field changes of the four probes relative to their respective successful baselines into dimensionless perturbation directions and outputs the pre-detection conclusion based on the absolute value of the determinant and the condition number. If the pre-detection fails, it records the baseline difference or perturbation amount to be adjusted and does not issue a network call. The execution acquisition unit calls the target black-box interface after the pre-detection passes, collects probe responses according to the request identifier, response telemetry path, and repeat sequence number, and outputs a stable and complete set of repeated samples. If a recoverable call failure occurs, it maintains the original request and retryes; if the retry still fails, it outputs a temporarily uncertain status. The differential elimination unit subtracts the repeated sample set from the double-success benchmark record to form the probe response difference. It separates the response coefficients in the order of total declared bytes, number of fragments, single fragment payload bytes, and extension region bytes, and outputs the candidate coefficient set. When the divisor is incalculable, the path is missing, or the value is not finite, it outputs the blocked status.

[0049] The mapping verification module performs path bijection, offset consistency, and holdout response verification based on the candidate coefficient set. This module reads legitimate requests that did not participate in coefficient separation, obtains the actual response via the target black-box interface, and outputs the mapping candidate set along with the verification credentials. If any path fails, the overall decision remains a failure, and no publishable credentials are generated. The mapping decision unit selects the pairing of fields with response telemetry paths based on the target contribution ratio and non-target contribution ratio, checks the unique occupancy relationship of the four fields and four paths, and the consistency of the back-calculated offsets for each record, and outputs the mapping candidate set. If path contention, missing paths for fields, or excessive offsets occur, the entire candidate set is marked as blocked. The holdout verification unit obtains the predicted response to legitimate holdout requests based on the mapping candidate set, calls the target black-box interface to obtain the actual response, compares the holdout absolute error by path, and outputs the verification credentials. If any path exceeds the allowable error or the corresponding path disappears, the overall decision of the verification credentials is recorded as a failure.

[0050] The configuration publishing module is used to atomically write the message length field mapping when verification passes. One end of this module connects to the mapping verification module, and the other end connects to the protocol adapter configuration storage. Before writing, it reads the current configuration version; after writing, it outputs the new configuration version to the protocol adapter, and performs version rollback based on the retained old configuration snapshot when a health check fails. The configuration atomic publishing unit verifies the verification credentials that have passed the entire path and the current configuration version, writes the mapping candidate set to the same new configuration snapshot, and switches the output message length field mapping version using atomic version switching. In case of version contention, atomic write failure, or health check failure, it maintains or restores the old configuration version. The status of the probe task is updated by each module according to the processing results: the candidate baseline status changes to "pending pre-inspection" when both requests are successful and there are at least four common numerical paths; after passing the pre-inspection, it changes to "pending sampling"; after stable sampling is completed, it changes to "pending elimination"; when candidate coefficients can be calculated, it enters "pending verification"; when bijective, offset, and holdout verifications all pass, it enters "writable"; if deterministic failure occurs, it enters "blocked"; if a recoverable call fails, it enters "temporarily uncertain". In the uncertain state, the original request body and the completed baseline record are retained, and the failed network call is re-executed if the number of retries is still within the set range; in the blocked state, the mapping is not automatically published, and it will only re-enter the pre-inspection stage after a successful baseline is reselected or a new probe is formed by adjusting the probe.

[0051] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A message length field mapping method based on dual-reference constraint-preserving probing, characterized in that, include: Obtain the request template for the target black-box interface. The request template includes the number of shards, the payload bytes per shard, the number of bytes in the extension area, and the total number of bytes declared. Based on the request template, a first success benchmark and a second success benchmark with different single fragment payload bytes are formed, and each success benchmark satisfies the message length association rule; Based on the first success benchmark and the second success benchmark, a set of constraint-holding probes is constructed. The constraint-holding probes only change one of the free fields: the number of fragments, the number of bytes of payload per fragment, or the number of bytes of the extension area, while compensating for the total number of bytes of the declaration to keep the association rule valid. A dimensionless identifiability pre-detection is performed on the perturbation direction of the constrained probe set. After the pre-detection is passed, the probe is sent and repeated responses are collected to form a stable repeated sampling set. Based on the stable repeated sampling set, separate the response coefficients of the total number of bytes, the number of fragments, the number of bytes of payload per fragment, and the number of bytes of the extension region in a fixed elimination order; Based on the response coefficient, the path mapping is determined to obtain the mapping candidate set, and the reserved requests that did not participate in the coefficient separation are used to verify the response. After successful verification, the mapping candidate set is atomically published as a message length field mapping, and a health check and version rollback are performed.

2. The message length field mapping method based on dual-reference constraint-preserving probing according to claim 1, characterized in that, Based on the request template, a first success benchmark and a second success benchmark with different single-fragment payload bytes are generated, including: Multiply the number of fragments by the number of bytes of payload per fragment, and then include the number of bytes of the extension region in the result. Use this result to overwrite the total number of bytes declared. Send a candidate request that has been reviewed and verified to confirm that the transmission is complete, the application status is successful, and the response contains a parsable numerical leaf node to obtain the first success benchmark; Change the single-fragment payload bytes of the first success benchmark, recalculate the total declared bytes according to the same association rules, send again and confirm success to obtain the second success benchmark; The difference in single-fragment payload bytes between the two successful benchmarks is within a preset range, and common response telemetry paths with uniform units are retained.

3. The message length field mapping method based on dual-reference constraint-preserving probing according to claim 1, characterized in that, Construct a constraint-maintaining probe set based on the first success benchmark and the second success benchmark, including: Copy the requested content from the first success benchmark, change only the number of fragments and recalculate the total number of bytes declared to obtain the first fragment number probe; Change the single-fragment payload bytes of the first success benchmark while keeping the number of fragments and the number of bytes in the extension area unchanged. Declare the total number of bytes to be updated according to the changed payload length to obtain the payload byte count probe. Change the number of bytes in the extended region of the first success benchmark while keeping the other two free fields unchanged, declare that the total number of bytes is updated synchronously with the extended length, and obtain the extended region byte count probe; Copy the request content from the second success benchmark, change only the number of fragments and synchronously update the declared total number of bytes to obtain the second fragment number probe; The first fragment count probe, the payload byte count probe, the extension region byte count probe, and the second fragment count probe constitute the constraint-maintaining probe set.

4. The message length field mapping method based on dual-reference constraint-preserving probing according to claim 1, characterized in that, Perform a dimensionless discernibility pre-detection on the perturbation direction of the constraint-preserving probe set, including: The column scale normalization of the field changes of the four probes relative to their respective success benchmarks is performed to obtain a set of dimensionless perturbation directions; Calculate the absolute value of the determinant and the condition number of the normalized perturbation matrix; When the absolute value of the determinant is not higher than the first threshold, increase the difference in the number of single-segment payload bytes between the two successful benchmarks and reconstruct the probe; when the absolute value of the determinant is higher than the first threshold but not higher than the second threshold, retain the direction set; when the condition number is not higher than the second identifiability threshold, allow entry into response acquisition, and when it is higher than the threshold, adjust the perturbation amount of the payload byte number or the perturbation amount of the extension area byte number and then re-pre-detect.

5. The message length field mapping method based on dual-reference constraint-preserving probing according to claim 1, characterized in that, Send probes and collect repetitive responses to form a stable set of repetitive samples, including: Each probe keeps the request body unchanged and repeatedly calls the target black-box interface, recording the values ​​according to the request identifier, response telemetry path and repeat sequence number; For the same path, the median value is taken as the representative value, and the difference between the maximum and minimum values ​​is taken as the repeating range. If the repeat range is not greater than the preset allowable value, the path is retained; if it is greater than the preset allowable value, the entire group of requests is re-collected; if it is still greater than the preset allowable value after re-collection, coefficient separation is stopped.

6. The message length field mapping method based on dual-reference constraint-preserving probing according to claim 1, characterized in that, The response coefficients, which separate the four message length fields according to a fixed elimination order, include: The difference between the first unit response and the second unit response, combined with the difference in the number of single-fragment payload bytes between the two successful benchmarks, yields the response coefficient of the total declared bytes to the response telemetry path. The fragment number response coefficient is obtained by subtracting the linkage contribution caused by the change of the total number of declared bytes with the number of fragments from the unit response of the first fragment number probe. The unit response of the payload byte count probe is subtracted from the contribution of the declared total bytes amplified by the base fragment count to obtain the single fragment payload byte count response coefficient; The extension region byte count response coefficient is obtained by subtracting the contribution of the total declared byte count from the unit response of the extension region byte count probe.

7. The message length field mapping method based on dual-reference constraint-preserving probing according to claim 1, characterized in that, Execution path mapping determination based on response coefficients includes: Calculate the target contribution ratio and the non-target contribution ratio. When the target contribution ratio is not lower than the first attribution threshold and the non-target contribution ratio is not higher than the second attribution threshold, accept path pairing. The accepted path pairings perform a unique occupancy check based on the four request fields. If only the four fields occupy four different paths respectively, the multiplier and offset are checked further. The offset of the path is obtained by subtracting the portion of the corresponding request field converted according to the response coefficient from the response values ​​of the successful baseline and probe. If the maximum difference between the offsets of each record is not greater than the preset allowable value, the mapping candidate is retained.

8. The message length field mapping method based on dual-reference constraint-preserving probing according to claim 1, characterized in that, Using holdout requests for response validation includes: Construct a valid request that did not participate in the successful benchmark selection and response coefficient separation, and obtain the predicted values ​​of each response telemetry path based on the multiplier and offset in the mapping candidates; Send a holdout request and read the actual response to obtain the absolute holdout error; If the absolute error of each path is less than or equal to the preset allowable value, it is considered passed. If the absolute error of any path is higher than the preset allowable value, a segmented value appears, or the corresponding path disappears, it is considered a failure, and the mapping candidate set is set to blocked.

9. The message length field mapping method based on dual-reference constraint-preserving probing according to claim 1, characterized in that, After successful verification, the atomic release proceeds with health checks and version rollback, including: Verify that the verification credentials match the current configuration version. If the versions match, write the four request fields, four response telemetry paths, multiplier, offset, and applicable range to the same new configuration snapshot, and use an atomic version switch to make the mapping of the entire set of fields effective. After the new configuration version takes effect, a message length conversion and fragment reassembly health check will be performed. If a buffer calculation error caused by length conversion or a fragment reassembly failure is detected in the health check window, the old configuration will be switched back and the new version will be marked as undone; if the window expires and no exception is triggered, the new configuration will be kept as the current valid version.

10. A message length field mapping system based on dual-reference constraint-preserving probing, characterized in that, include: The probe generation module is used to obtain the request template of the target black box interface, form a first success benchmark and a second success benchmark with different single fragment payload bytes based on the request template, and construct a set of constraint holding probes based on the first success benchmark and the second success benchmark. The constraint holding probes only change one of the free fields of the number of fragments, the single fragment payload bytes, or the number of bytes in the extension area, while compensating for the total number of bytes declared to keep the association rules valid. The response separation module is used to perform a dimensionless identifiability pre-detection on the perturbation direction of the constraint-maintaining probe set. After the pre-detection is passed, the probe is sent and repeated responses are collected to form a stable repeated sampling set. Based on the stable repeated sampling set, the response coefficients of the total number of bytes, the number of fragments, the number of bytes of the single fragment payload, and the number of bytes of the extension area are separated in a fixed elimination order. The mapping verification module is used to perform path mapping determination based on the response coefficients, obtain a mapping candidate set, and use the hold-out requests that did not participate in coefficient separation to perform response verification. The configuration publishing module is used to atomically publish the mapping candidate set as a message length field mapping after successful verification, and to perform health checks and version rollback.