Method and related device for tracing third-party code embedded in passive code software

By performing interval analysis and decompilation recovery on source-free domestic software, generating function semantic micro-fingerprints, and constructing version genealogy diagrams, the accuracy and verifiability issues of tracing the source of third-party code in source-free domestic software are solved. It is adapted to compilation optimization and code splitting and merging scenarios, and achieves accurate tracing and credible evidence output.

CN123137708APending Publication Date: 2026-11-20ANNING BUREAU OF ULTRA HIGH VOLTAGE TRANSMISSION
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611389105.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-08
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

Existing technologies cannot accurately identify and trace third-party code embedded in source-free domestic software. Especially in scenarios such as code compilation optimization and function splitting and merging, they cannot distinguish version ranges and lack verifiable evidence chains, leading to version identification bias and misjudgment.

Method used

By performing interval parsing and multi-result retention decompilation on the target program, a function semantic micro-fingerprint is generated, an open-source component version genealogy is constructed, and by combining multi-dimensional evidence identification and genealogy joint probability inference, the source tracing results and verification evidence chains are output.

Benefits of technology

It accurately identifies and traces third-party code in software without source code, adapts to code splitting and merging scenarios, improves the accuracy and verifiability of tracing, and reduces version misjudgment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123137708A_ABST
    Figure CN123137708A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of network security, and in particular to a passive code creation software third-party code embedding traceability method and related equipment. The method comprises the following steps: performing interval analysis and multi-result reserved decompilation recovery on target program code, obtaining a target program segment cluster set, performing decompilation difference semantic coding on a target function candidate, and generating function semantic micro-fingerprints. Meanwhile, entity change classification and change intensity quantification are carried out on the iteration process of the open source component, and a version pedigree chart is constructed. Then, effective coverage is obtained by relying on the hierarchical matching degree of the semantic micro-fingerprints, abnormal changes are identified by combining the pedigree chart and the effective coverage to form an observation evidence set, and finally, the precise traceability result and the verifiable evidence chain are output through pedigree joint probability inference. The method can reduce the influence of homologous judgment, retain local features capable of distinguishing version evolution, and explain the inheritance relationship between function splitting, merging, data layout change and maintenance branches.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of network security technology, and in particular to a source tracing method and related equipment for embedding third-party code in source-free domestic software. Background Technology

[0002] In the context of domestic software development, many software deliverables only provide executable files and dynamic link libraries. Developers often incorporate trimmed-down versions of open-source component source code, static library functions, and protocol implementations into the program. Combined with compilation optimizations, function inlining, link simplification, and vendor adaptation modifications, the fragmented nature of third-party code within the program makes it impossible to accurately identify component information directly through package manifests and dynamic dependency tables. Current third-party component identification primarily relies on string, function hash, and feature library matching. This method is only applicable to unmodified, complete open-source components. Faced with code changes due to software compilation optimizations, as well as scenarios such as function splitting and merging, constant replacement, and partial backporting, traditional identification methods can only locate broad component families, failing to accurately determine the version range of the code. Furthermore, the existence of single features spanning multiple versions can easily lead to version mismatches. Simultaneously, open-source component evolution is not linear; it involves version backporting, branch customization, and code mixing. Vendor-customized software often mixes old and new version component code. Existing technologies that rely on the number of feature hits to determine the version are prone to misclassifying mixed code as complete versions and cannot distinguish whether missing code features are due to version aging or program trimming, further exacerbating version identification errors.

[0003] While existing research covers technical directions such as risk identification of large language model libraries, code attribute graph analysis, taint propagation detection, and vulnerability location verification, several core technical shortcomings remain. First, after compilation, optimization, and linking, the byte sequence and boundaries of functions in programs without source code change significantly. Traditional precise hashing cannot reliably match the same source code, lacking an identification fingerprint that adapts to compilation differences and preserves version evolution differences. Second, existing technologies treat version numbers as independent flat labels, ignoring the evolutionary relationships of inheritance, branching, merging, and backporting between open-source component versions, making it impossible to analyze the code source based on the actual evolution path. Third, it cannot adapt to scenarios with fragmented program components and mixed multi-version compilation, making it difficult to accurately distinguish between various version forms such as complete, trimmed, branched, and backported versions. Fourth, only outputting a single component name and version number lacks complete verification basis and a verifiable chain of evidence, hindering security personnel from conducting item-by-item verification and investigation.

[0004] In summary, the technical problems existing in the relevant technologies need to be improved. Summary of the Invention

[0005] The main purpose of this application is to propose a source tracing method and related equipment for embedded third-party code in source-free domestic software, which can reduce the impact on same-source judgment, while retaining local features that can distinguish version evolution, and explaining function splitting, merging, data layout changes and maintaining the inheritance relationship between branches, thereby reducing version misjudgment caused by code trimming.

[0006] To achieve the above objectives, one aspect of this application proposes a source tracing method for embedded third-party code in source-code-free domestic software, the method comprising the following steps: The target program's executable code is subjected to range parsing and multi-result preservation decompilation and recovery processing to obtain a set of target program fragment clusters; Each candidate objective function is subjected to decompilation differential semantic encoding to obtain the function semantic microfingerprint; The version iteration process of open source components is classified into entity changes and the intensity of changes is quantified to obtain the version genealogy of open source components. Based on the functional semantic microfingerprint, hierarchical candidate matching measurement processing is performed on the target program fragment cluster set and open source reference entities to obtain effective coverage. Based on the version genealogy of the open-source component and the effective coverage, candidate versions are subjected to multi-dimensional evidence screening and abnormal change identification to obtain an observation evidence set. Based on the effective coverage and the set of observational evidence, a phylogenetic joint probability inference process is performed on the multi-source version source hypothesis to obtain the source tracing results and the verification evidence chain.

[0007] Preferably, the step of performing range parsing and multi-result-preserving decompilation and recovery processing on the target program's executable code to obtain a set of target program fragment clusters includes the following steps: The target program's executable code is subjected to interval parsing to obtain the code interval, read-only data interval, and relocation item parsing results; Based on the code interval, the read-only data interval, and the relocation item parsing results, the code region with boundary uncertainty is decompiled and restored to obtain a set of function candidates. The function candidates in the function candidate set are aggregated and clustered to obtain the target program fragment cluster set.

[0008] Preferably, the step of performing decompilation differential semantic encoding on each candidate objective function to obtain a function semantic microfingerprint includes the following steps: The candidate objective function is subjected to stable semantic information extraction processing to obtain a set of stable semantic units; the set of stable semantic units includes control skeleton, calling behavior role, constant operation relationship, data layout access mode and string context. The stable semantic units in the set of stable semantic units are subjected to adaptive weight adjustment to obtain stability weights; The stable semantic units with the stability weights are normalized, aggregated, and block-joined to obtain the functional semantic microfingerprint.

[0009] Preferably, the step of classifying entity changes and quantifying the intensity of changes during the version iteration process of the open-source component to obtain a version genealogy diagram of the open-source component includes the following steps: The open-source component version is processed to generate reference entities and semantic micro-fingerprints to obtain a set of reference code entities; The differences in code entities between nodes in the reference code entity set are classified by change type to obtain an entity change set; the entity change set includes addition, deletion, modification, splitting, merging, moving, and data layout changes; Based on the entity change set, the change intensity of the edges between the spectral nodes is calculated to obtain the change intensity parameters of the spectral edges. Based on the change intensity parameter, the version nodes, evolutionary relationship edges, edge attributes, and change markers are associated and assembled to obtain the version genealogy diagram of the open source component.

[0010] Preferably, the step of performing hierarchical candidate matching measurement processing on the target program fragment cluster set and open-source reference entities based on the functional semantic micro-fingerprint to obtain effective coverage includes the following steps: A coarse screening process is performed on the target fragment clusters in the target program fragment cluster set to obtain a candidate open source component family set; Based on the functional semantic microfingerprint, the entity matching cost is calculated for the open-source reference entities within the candidate open-source component family set to obtain the matching cost; the calculation mechanism of the matching cost supports matching a single target entity with a connected subgraph composed of multiple open-source reference entities. Based on the matching cost, the matching strength of all target entity open-source reference entity matching pairs is calculated to obtain the matching strength. Based on the reference entity discrimination weight, the matching strength, and the deduplication normalization operation, the target fragment cluster and the candidate version are sequentially subjected to coverage statistics processing to obtain the effective coverage.

[0011] Preferably, the step of performing multi-dimensional evidence screening and abnormal change identification on candidate versions based on the open-source component version genealogy and the effective coverage to obtain an observation evidence set includes the following steps: Based on the entities, call relationships, and data layout of the candidate versions in the open-source component version genealogy, positive feature extraction is performed on the matching results of the target program fragment cluster set to obtain positive evidence; Based on the functional integrity information already retained in the target program fragment cluster set, the missing features of the candidate version are identified to determine the causes of missing features and obtain negative evidence. Based on the evolutionary timeline and change constraints of the positive and negative evidence on the open-source component version genealogy, isolated changes are subjected to backport candidate identification processing to obtain evolutionary evidence and backport candidate changes. The positive evidence, the negative evidence, the evolutionary evidence, and the back-transfer candidate changes are encapsulated into a set to obtain the observation evidence set.

[0012] Preferably, the step of performing phylogenetic joint probability inference processing on the multi-source version source hypothesis based on the effective coverage and the observation evidence set to obtain the source tracing results and verification evidence chain includes the following steps: Based on the effective coverage, the set of observational evidence, and the preset multi-class penalty constraints, the energy function modeling process is performed on the multi-source version source hypothesis to obtain the total energy value; Dynamic programming is performed on the version genealogy of the open-source component to obtain a set of candidate main genealogy paths; the dynamic programming process includes pre-screening of main genealogy paths with no backporting changes; Based on the candidate main lineage path set, the candidate changes for back-transplantation are sequentially carried out through incremental preferential introduction and total energy comparison of the updated total energy value to obtain the tracing result and the verification evidence chain.

[0013] Preferably, the step of incrementally selecting and comparing the total energy value of the updated total energy value to obtain the tracing result and the verification evidence chain based on the candidate main lineage path set for back-transplantation candidate changes includes the following steps: The source hypothesis of the total energy value after the introduction of the back-transfer candidate change and the update is processed by posterior probability normalization calculation to obtain the normalized posterior probability; Based on the preset cumulative posterior probability threshold, the source hypothesis carrying the normalized posterior probability is subjected to a reliable version interval determination process to obtain a set of filtered reliable source hypotheses. Evidence association and candidate exclusion analysis are performed on the set of credible source hypotheses to obtain the source tracing results and the verification evidence chain.

[0014] To achieve the above objectives, another aspect of this application proposes a source tracing system for third-party code embedded in source-code-free domestic software, the system comprising: The decompilation and recovery module is used to perform range parsing and multi-result preservation decompilation and recovery processing on the executable code of the target program to obtain a set of target program fragment clusters. The differential semantic encoding module is used to perform decompilation differential semantic encoding on each candidate target function to obtain the function semantic micro-fingerprint; The intensity quantification module is used to classify entity changes and quantify the intensity of changes in the version iteration process of open source components, and obtain the version genealogy of open source components. The matching measurement module is used to perform hierarchical candidate matching measurement processing on the target program fragment cluster set and open source reference entities based on the function semantic microfingerprint to obtain effective coverage. The identification module is used to perform multi-dimensional evidence identification and abnormal change identification on candidate versions based on the version genealogy of the open-source component and the effective coverage, so as to obtain an observation evidence set. The inference output module is used to perform phylogenetic joint probability inference processing on the multi-source version source hypothesis based on the effective coverage and the observation evidence set, so as to obtain the source tracing results and the verification evidence chain.

[0015] To achieve the above objectives, another aspect of this application proposes an electronic device comprising a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method described above.

[0016] This application includes at least the following beneficial effects: It provides a source tracing method and related equipment for embedding third-party code in source-free domestic software. This solution constructs a set of target program fragment clusters through decompilation recovery processing that retains multiple results, avoiding the errors of traditional single decompilation results and the mismatch problem of short functions across components. It is suitable for real-world scenarios where executable file code boundaries are ambiguous and fragmented. By generating function semantic micro-fingerprints through decompilation difference semantic encoding, it eliminates features susceptible to interference from compilation optimization, register allocation, and address relocation, effectively solving the problem of traditional hash matching failing to recognize the same source code due to different compilation configurations and optimization levels. By constructing an open-source component version genealogy diagram with entity change classification and change intensity quantification, it breaks the limitation of existing technologies that treat versions as independent labels, accurately restoring the true evolutionary relationship of open-source component version inheritance, branching, merging, and backporting. By calculating effective coverage through hierarchical candidate matching metrics, it adapts to tampering scenarios involving code splitting and merging, improving the matching accuracy of fragmented components. By leveraging the version genealogy of open-source components and effective coverage to conduct multi-dimensional evidence screening, it can accurately distinguish between code trimming and original version missingness, and accurately identify backporting changes, thus overcoming the shortcomings of the one-sidedness of existing technical evidence judgments. Finally, through genealogy joint probability inference, it completes the selection of the best multi-source hypothesis, outputting accurate tracing results and a complete verification evidence chain. This overcomes the pain points of traditional technologies, such as large errors in single-version judgment and lack of verifiable evidence, and significantly improves the accuracy, stability, and verifiability of tracing the source of embedded third-party code in software without source code. Attached Figure Description

[0017] Figure 1 This is a flowchart of the source tracing method for embedding third-party code in source-code-free domestic software provided in this application embodiment; Figure 2 This is a schematic diagram of the version genealogy of open-source components and the observation mapping of target segments; Figure 3 This is a schematic diagram illustrating the generation of the traceability results and verification evidence chain; Figure 4 This is a flowchart illustrating the source tracing method for embedded third-party code in source-free domestic software. Figure 5 This is a schematic diagram of the structure of the source tracing system for embedded third-party code in source code-free domestic software provided in this application embodiment; Figure 6 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit it. In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with those of this application; they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this application.

[0019] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0020] Before providing a detailed description of the embodiments of this application, some of the nouns and terms involved in the embodiments of this application will be explained first. The nouns and terms involved in the embodiments of this application are subject to the following interpretations.

[0021] Information technology innovation software: Information technology innovation refers to the application innovation of information technology. Information technology innovation software is application software that is adapted to the domestic software and hardware ecosystem. It can run on domestic processors and operating systems and is mostly used in key business scenarios such as government and enterprise, power, etc. There is often a need for traceability of the open source of components.

[0022] ELF without source code: ELF is the mainstream executable file format under Linux. ELF without source code refers to only the compiled binary program file, which lacks the original source code. It can only be analyzed and traced by decompiling.

[0023] Figure 1 This is an optional flowchart of the source tracing method for embedding third-party code in source-free domestic software provided in this application embodiment. Figure 1 The method may include, but is not limited to, steps S110 to S160.

[0024] Step S110: Perform range parsing and multi-result preservation decompilation and recovery processing on the target program's executable code to obtain a set of target program fragment clusters; Step S120: Perform decompilation differential semantic encoding on each candidate objective function to obtain the function semantic microfingerprint; Step S130: Perform entity change classification and change intensity quantification on the open source component version iteration process to obtain the open source component version genealogy. Step S140: Based on the function semantic micro-fingerprint, perform hierarchical candidate matching measurement processing on the target program fragment cluster set and open source reference entities to obtain the effective coverage. Step S150: Based on the open-source component version genealogy and effective coverage, perform multi-dimensional evidence screening and abnormal change identification on candidate versions to obtain an observation evidence set. Step S160: Based on the effective coverage and the set of observational evidence, perform phylogenetic joint probability inference processing on the multi-source version source hypothesis to obtain the source tracing results and verification evidence chain.

[0025] Steps S110 to S160 as shown in the embodiments of this application involve performing interval parsing and multi-result retention decompilation recovery processing on the target program execution code to construct a set of target program fragment clusters, thereby avoiding the judgment bias caused by a single decompilation result; performing decompilation difference semantic encoding processing on each target function candidate to generate a function semantic micro-fingerprint with anti-compilation disturbance characteristics, eliminating interference from compilation optimization, register allocation, instruction changes, etc. Subsequently, entity change classification and intensity quantification were performed on the open-source component version iteration process. An open-source component version genealogy diagram containing version evolution correlation, entity change type, and change intensity was constructed to restore the actual iteration and branch evolution relationship of the component. Then, based on the generated function semantic micro-fingerprint, hierarchical candidate matching measurement was performed on the target program fragment cluster set and open-source reference entities to accurately calculate the effective coverage corresponding to each candidate version and complete the cross-version matching quantification of code entities. Combining the open-source component version genealogy diagram and effective coverage results, multi-dimensional evidence screening and abnormal change identification were performed on each candidate version. A complete set of observational evidence containing positive, negative, and evolutionary features was integrated to distinguish between program trimming missing and version native missing, and accurately identify abnormal changes in backporting. Finally, based on the effective coverage and observational evidence set, genealogy joint probability inference processing was performed on the multi-source version source hypothesis. The optimal hypothesis was selected by combining version evolution constraints and backporting scenario characteristics. Finally, accurate source tracing results and a verifiable verification evidence chain were output, effectively solving the defects of traditional technology version misjudgment, inability to adapt to mixed compilation backporting scenarios, and unverifiable results.

[0026] In some embodiments, steps S110 to S120 involve performing range parsing and multi-result retention decompilation recovery processing on the target program's executable code to accurately obtain the target program fragment cluster set. Specifically, range parsing is first performed on the executable file, shared library, or firmware code segment of the software to be analyzed, identifying and outputting complete code ranges, read-only data ranges, and relocation item parsing results, while simultaneously completing basic identification of file format, instruction set, and byte order. Decompilation recovery processing is then performed based on the relocation item parsing results, fully recovering function candidates, basic blocks, direct and indirect call candidates, constant references, and data object access information in the program. For code regions where function boundaries are uncertain after decompilation, this application does not use a single decompilation partitioning result, but instead retains multiple sets of function partitioning results covering the same address range, avoiding tracing errors caused by distortion from a single decompilation result, ultimately forming a complete set of function candidates. Based on this, the candidate function set is aggregated and clustered to filter out candidates that share high call density, share read-only data resources, or share the same data layout structure. Clustering is then performed by combining intra-cluster call relationships, shared data layout, and string and constant context to construct the target program fragment cluster set. The overall fragment cluster set is represented by the following formula: ; Where Z is the set of all fragment clusters of the target program, M is the total number of fragment clusters, and m is the fragment cluster index. For the m-th fragment cluster, Corresponding to the function candidate set, intra-cluster call relationship, shared data layout, and string and constant context of the fragment cluster, this application uses the fragment cluster as the basic judgment unit for tracing, effectively solving the problem of mismatch caused by repeated matching of a single short function across multiple components.

[0027] By performing decompilation difference semantic encoding on each candidate target function, a function semantic micro-fingerprint that is resistant to compilation disturbances and has version differentiation capabilities is generated. Specifically, stable semantic information extraction processing is first performed on each candidate target function, removing interference information that is easily affected by compiler, optimization level, and linking method, such as absolute code addresses, register numbers, and temporary variable names. Only highly stable semantic units are retained to form a set of stable semantic units, which includes five core semantic information categories: control skeleton (only branch merging, loop entry, return point, and exception edge), call behavior roles based on business functions, constant operation relationships formed by constant operation comparison positions, data layout access patterns, and string context. Subsequently, adaptive adjustment processing of stable semantic unit weights is carried out. The stability weights of each semantic unit are iteratively optimized based on entity samples of adjacent versions of open source components. The weights of feature units that are stable across compilation configurations and sensitive to version iteration changes are increased, while the weights of feature units that fluctuate frequently with compilation configurations are decreased, resulting in the stability weights corresponding to each semantic unit.

[0028] Stable semantic units carrying stability weights are normalized, aggregated, and joined in blocks to generate the final functional semantic microfingerprint. The functional semantic microfingerprint is calculated using the following formula: ; in This is a normalized aggregate representation of single-class observations, calculated by f incorporating the original feature vector of semantic units, nonlinear mapping, stability weights, and L2 norm constraints. In the formula, f represents the code entity to be processed. This represents the semantic micro-fingerprint corresponding to the code entity, where R is the total number of semantic observation categories and r is the observation category index. Let u be a set of stable semantic units of code entities, where u is the index of the semantic unit. The original feature vector of the semantic unit. To adapt to the r-th type of nonlinear mapping affected by different compilation perturbations, This represents the stability weight of the semantic unit under the corresponding observation dimension. It is a norm 2. To prevent smoothing constants with denominators of zero, This involves block-based join operations performed according to observation categories. The semantic micro-fingerprint generated in this way abandons the traditional single hash value format, retaining multiple sets of independently verifiable local semantic evidence, balancing the stability of compilation environment adaptation with the ability to differentiate between component versions. If a feature is stable under different compilation configurations but distinguishable between versions with substantial code changes, its weight is increased; if a feature changes frequently with compilation configurations, its weight is decreased. The resulting micro-fingerprint is not a single-value hash of the complete function, but rather retains multiple independently verifiable local pieces of evidence.

[0029] In some embodiments, in step S130, such as Figure 2 As shown, entity change classification and change intensity quantification are performed on the open-source component version iteration process to obtain an open-source component version genealogy. Specifically, reference entity and semantic micro-fingerprint generation processes are first performed on the open-source component versions to obtain a set of reference code entities. This involves obtaining the public versions, branches, and commit records of candidate open-source components. For each version, various compilation configurations are used to generate corresponding reference entities, and semantic micro-fingerprints are generated for each reference entity. This yields a complete set of reference code entities, providing a benchmark sample for subsequent version difference comparisons.

[0030] Next, the code entity differences between nodes in the reference code entity set are categorized by change type, resulting in an entity change set. All code entity differences between adjacent nodes in the version hierarchy are divided into seven categories: addition, deletion, modification, splitting, merging, moving, and data layout changes, forming the entity change set. Combined with... Figure 2 The genealogical evolution example shown shows that the main version successively went through v1.0 basic implementation, v1.1 new parsing branch, v1.2 structure adjustment, v2.0 function splitting, and v2.1 boundary repair. At the same time, a branch version v1.1-b vendor adaptation rewrite was derived from v1.1. The structure adjustment, function splitting, and vendor adaptation rewrite generated during the above version iteration and branch derivation process will all be classified into the corresponding entity change type.

[0031] Then, based on the entity change set, the change intensity of the edges between the phylogenetic nodes is calculated to obtain the change intensity parameters of the phylogenetic edges. The change intensity of the phylogenetic edges is calculated using the following formula: ; Where [0, 1) represents adjacent phylogenetic nodes. and The intensity of change between the two; i and j are the phylogenetic node indices; , , , The non-negative weights are, in order, for modification, splitting, merging, and data layout changes, and within the same candidate component family. The parameter value remains unchanged; , , , These options are: modify the number of entities, split the number of entities, merge the number of entities, and keep the number of entities constant. This represents the change in data layout after normalization. This represents an exponential function with the natural constant e as its base. This parameter, representing the intensity of change, allows us to distinguish between minor version iterations and versions that undergo significant code restructuring, such as... Figure 2 The function splitting from v1.2 to v2.0 will result in a higher change intensity value.

[0032] Finally, based on the change intensity parameter, version nodes, evolutionary relationship edges, edge attributes, and change markers are associated and assembled to obtain the open-source component version genealogy diagram. (Constructing the version genealogy diagram) The version genealogy is denoted as , For a set of version or commit nodes, Figure 2 v1.0, v1.1, v1.1-b, v1.2, v2.0, and v2.1 all belong to the lineage nodes; It is the set of edges formed by the parent-child, branch, merge, and back-port relationships between nodes. Figure 2 In the middle, v1.1 refers to branch version v1.1-b, which is the branch relationship edge; This is a set of attribute trees for storing entity evolution information such as additions, deletions, modifications, splits, merges, moves, and data layout changes recorded on each edge. For each version-specific change, it configures the occurrence node, persistence interval, revoked node, and repatriation marker. After assembly, an open-source component version genealogy graph is obtained. This genealogy graph can achieve observation mapping with target fragment clusters Z1 and Z2, supporting subsequent judgment of the hybrid source hypothesis combination for main genealogy intervals and branch repatriation.

[0033] In some embodiments, during steps S140 to S150, in the process of performing hierarchical candidate matching measurement processing on the target program fragment cluster set and open-source reference entities based on the function semantic micro-fingerprint to obtain effective coverage, specifically, firstly, a coarse screening retrieval process is performed on the target fragment clusters in the target program fragment cluster set, relying on string context, data layout outline, and calling role information to filter and obtain a candidate open-source component family set. Then, based on the function semantic micro-fingerprint, entity matching cost calculation processing is performed on each open-source reference entity within the candidate open-source component family set to obtain the matching cost between the target entity and the reference entity. The calculation mechanism of this matching cost supports matching of a single target entity and a connected subgraph composed of multiple open-source reference entities, adapting to the entity matching requirements in function splitting and function merging scenarios. The matching cost is defined by the following formula: ; in, R represents the non-negative matching cost between the target entity f and the reference entity g; f and g are the target code entity and the reference code entity, respectively; R is the total number of block categories in the semantic microfingerprint, and r is the block index; , These are the r-th class blocks of the semantic microfingerprints of the target entity and the reference entity, respectively. The weights are the weights corresponding to the r-th class block, and the weights satisfy the following conditions: and ; Let the distance scale parameter of the r-th class block satisfy the following condition: ; It is a norm 2 operator; , These represent the penalties for incompatibility in normalized data layout and the penalties for incompatibility in calling roles, respectively. , These are the weight coefficients for the two types of penalty items mentioned above, with values ​​greater than or equal to 0; It is an exponential function.

[0034] After obtaining the matching cost, the matching strength is calculated for all target entity-open source reference entity matching pairs to obtain the matching strength s(f,g), which satisfies s(f,g)=exp[-d(f,g)], with a value range of (0,1). Further combining the reference entity's discriminative weight and the matching strength, a deduplication normalization operation is introduced, and coverage statistics are performed sequentially for the target fragment cluster and candidate versions to finally obtain the effective coverage. The effective coverage is calculated using the following formula: ; In the formula, Represents target fragment clusters Effective coverage relative to candidate version v; m is the fragment cluster index; v represents the candidate version node; For fragment clusters The set of all candidate objective functions within the internal domain; This is the set of all reference entities corresponding to candidate version v; >0 represents the version distinguishability weight of the reference entity g; The reference entity g was not represented The joint residual quantity matched by any target entity in the product term can avoid the problem of multiple similar objective functions repeatedly counting the same reference entity; the denominator term Used to normalize the overall results.

[0035] After obtaining effective coverage, a technical process is executed to perform multi-dimensional evidence screening and abnormal change identification on candidate versions based on the open-source component version genealogy and effective coverage, resulting in an observation evidence set. First, based on the entities, call relationships, and data layout information recorded in the open-source component version genealogy of candidate versions, positive feature extraction is performed on the matching results of the target program fragment cluster set to obtain positive evidence. This positive evidence specifically includes version-specific entities, call relationships, and data layout features appearing in the target program. Then, combined with the functional integrity information already retained in the target program fragment cluster set, the causes of missing features in candidate versions are screened to obtain negative evidence. When screening the causes of missing features, the feature retention probability is estimated based on the functional roles observed in the fragment cluster. If a feature belongs to a functional submodule already retained in the target program, and both upstream and downstream entities of that feature have been observed, the absence of that feature will generate strong negative evidence. If the corresponding complete submodule has not entered the target program, the current candidate version will not be negated solely based on the absence of that feature, thus distinguishing between code trimming scenarios and version missing scenarios.

[0036] After obtaining positive and negative evidence, based on the evolutionary sequence and change constraints of the positive and negative evidence on the open-source component version genealogy, backporting candidate identification is performed on isolated changes within the program to obtain evolutionary evidence and backporting candidate changes. Evolutionary evidence includes the order of appearance of target features on the genealogy, common persistence intervals, and mutual exclusion relationships. The determination of backporting candidate changes requires simultaneous satisfaction of multiple constraints: the change can be independently applied on the genealogy; the target program's internal context is compatible with the previous version; introducing the change requires explaining fewer missing features compared to using a completely new version; and the backporting candidate change corresponds to an abnormal change situation where the target simultaneously exhibits basic features of the old version and isolated changes of the new version, but other evolutionary features in between are absent. Finally, the positive evidence, negative evidence, evolutionary evidence, and backporting candidate changes are uniformly encapsulated into an observation evidence set, which will serve as input data for subsequent genealogy joint probability inference processing.

[0037] In some embodiments, in step S160, during the process of performing phylogenetic joint probability inference on the multi-source version source hypothesis based on the effective coverage and the set of observational evidence to obtain the source tracing results and verification evidence chain, specifically, the step of performing energy function modeling on the multi-source version source hypothesis based on the effective coverage, the set of observational evidence, and preset multi-class penalty constraints to obtain the total energy value is first executed. This process uses the multi-source version source hypothesis H as the modeling object, and the source hypothesis H is defined as... Where P represents the main lineage path, and I represents the narrowest version interval on the path. This represents a set of branch changes or backport changes; it splits the set of observation evidence into a set of positive observations. With the set of negative observations Combining the fragment matching information carried by the effective coverage rate, and introducing pre-defined multi-class penalty constraints, an energy function for the source hypothesis is constructed. The energy function expression is as follows: ; In the formula, The total energy corresponds to the source hypothesis H. The smaller the total energy value, the higher the sufficiency of the source hypothesis in explaining the observational evidence. , These represent the positive observation set and the negative observation set, respectively; e is the observation evidence index; This represents the probability of hypothesis H explaining evidence e. It is a logarithmic smoothing constant to avoid calculation anomalies caused by zero logarithmic inputs; The relative weighting coefficients corresponding to the refutation evidence; , , , The weights are, in order: evolutionary order penalty, mutual exclusion change penalty, phylogenetic gap penalty, and origin complexity penalty. For non-negative penalty functions that violate the evolutionary order, To simultaneously select non-negative penalty functions for mutually exclusive changes, b represents the non-negative penalty function corresponding to unexplained lineage gaps; b represents the set of back-transfer changes. Single branch or backport changes within the scope; This represents the phylogenetic distance between the change and the major version node; log() represents the natural logarithm operation. This energy function simultaneously performs observation fitting, evolutionary continuity constraints, negative evidence penalty, and source complexity constraints, corresponding to... Figure 3 The phylogenetic energy minimization process for sparse back-transfer terms.

[0038] After completing the energy function modeling and obtaining the total energy values ​​corresponding to each source hypothesis, a dynamic programming solution is performed on the open-source component version genealogy graph to obtain a set of candidate main genealogy paths. This dynamic programming solution includes pre-screening main genealogy paths without backporting changes. This process relies on the topology of the open-source component version genealogy graph, prioritizing the pre-screening of main genealogy paths that do not introduce any backporting changes. Multiple candidate main genealogy paths are output, forming a candidate main genealogy path set, thus obtaining a basic set of candidate version evolution paths. This provides a path base for the incremental introduction of subsequent backporting changes.

[0039] After obtaining the candidate main lineage path set, a process is initiated to incrementally select and introduce back-transfer candidate changes based on the candidate main lineage path set, and then compare the total energy value after updating. This process uses the pre-screened candidate main lineage path set as a base, and selectively introduces back-transfer candidate changes into the source hypothesis one by one. For each back-transfer candidate change introduced, the total energy value of the corresponding source hypothesis is recalculated and updated, and the change in total energy before and after the introduction of the change is compared. If the decrease in total energy brought about by introducing the back-transfer candidate change is less than the increase in complexity penalty brought about by the introduction of the back-transfer item, then the back-transfer candidate change is abandoned in the current source hypothesis. This sparsity constraint avoids relying on a large number of scattered submissions to piece together a source hypothesis that is not feasible in engineering.

[0040] After comparing the incremental selection of candidate changes for backporting with the total energy, the posterior probability normalization calculation is performed on the source hypotheses of the updated total energy value after introducing candidate changes for backporting, resulting in normalized posterior probabilities. The K source hypotheses with the lowest total energy are selected for posterior probability normalization calculation. The formula for normalized posterior probability calculation is as follows: ; In the formula, Represents all observations The k-th source hypothesis under the condition The posterior probability; the entire set of observations K represents the total number of candidate source hypotheses participating in the normalization operation; k and j are the candidate hypothesis indices. , These represent the total energy values ​​corresponding to the hypothetical source. K is a temperature parameter used to control the smoothness of the posterior probability distribution; exp() is an exponential function. This process remains constant throughout the same joint probability inference of the phylogenetic hierarchy. This calculation process corresponds to the phylogenetic posterior and confidence interval processing steps within the attached diagram.

[0041] After obtaining the normalized posterior probabilities, the source hypotheses carrying normalized posterior probabilities are subjected to a credibility version interval determination process based on a preset cumulative posterior probability threshold, resulting in a filtered set of credibility source hypotheses. The source hypotheses are then sorted in descending order of posterior probability, and their posterior probabilities are accumulated. The hypothesis with the accumulated posterior probability reaching the preset cumulative posterior probability threshold is selected. The minimum set of hypotheses forms the set of credible source hypotheses; when there are multiple adjacent versions that cannot be distinguished from each other based on existing observational evidence, the version range is output as the credible output result, rather than forcing the output of a single version number.

[0042] After obtaining the set of credible source hypotheses after screening, evidence association and candidate exclusion analysis are performed on the set of credible source hypotheses to obtain the source tracing results and verification evidence chains. When generating the source tracing results, the component family information, main lineage path, narrowest supported version range, branch nodes, backporting commit information, and corresponding posterior probabilities are output to form version conclusions and source descriptions. Each source tracing conclusion is associated with the corresponding target address range, target entity micro-fingerprint, open source reference files and commit records, evidence support strength, and compilation difference explanations. At the same time, candidate exclusion analysis is completed, outputting the candidate source hypotheses with higher rankings but not adopted, along with the corresponding reasons for exclusion. Exclusion reasons include missing key version features, mutually exclusive data layouts, invalid evolution order, and the need to introduce too many backporting items. For target program fragment clusters with insufficient evidence, the corresponding candidate range is retained, and they are not forcibly merged into a definite source. The final output source tracing results include source descriptions and version conclusions, and the verification evidence chain includes verification materials, evidence strength, conflict items, candidate ranking, and uncertainties, completely corresponding to the three types of output modules on the output side of the attached diagram, completing the joint probability inference processing of the entire lineage.

[0043] like Figure 3 As shown, Figure 3This paper demonstrates the source tracing and inference process of open-source components. First, a candidate source hypothesis H is input, including component family, version range, branch, and backport set. Positive evidence is extracted sequentially, covering stable semantic micro-fingerprints, version-specific changes, fragment coverage continuity, and data layout compatibility. Then, negative evidence is extracted, including features that should appear but are missing, mutually exclusive version changes, impossible evolutionary sequences, and compiler configuration interpretability, completing the phylogenetic posterior and confidence interval calculations. Subsequently, phylogenetic energy minimization with sparse backport terms is performed, comprehensively considering observation fitting, evolutionary continuity, negative evidence penalties, and source complexity constraints, outputting three types of results: 1) Source description, outputting hit fragments, missing fragments, and corresponding open-source commits; 2) Version conclusion, outputting the narrowest supportable interval, branch, and backport description; 3) Verification materials, outputting evidence strength, conflict terms, candidate ranking, and uncertainty, fully realizing the phylogenetic joint probability inference of multi-source version source hypotheses, obtaining the source tracing results and verification evidence chain.

[0044] In some embodiments, such as Figure 4 As shown, Figure 4 This paper illustrates the overall process of tracing the source code of open-source components. First, the target program's executable code undergoes range parsing and multi-result retention decompilation and recovery processing to complete the target binary partitioning and function recovery, resulting in a set of target program fragment clusters. Next, each candidate target function is processed for decompilation difference semantic encoding, generating function semantic micro-fingerprints based on constant relationships, calling roles, data layout, control skeleton, and string context. Then, the open-source component version iteration process is categorized for entity changes and the intensity of changes is quantified, completing the construction of the open-source repository genealogy. The genealogy is built using versions, commits, and branches as nodes, and various code changes and backports as edge attributes.

[0045] Subsequently, based on the functional semantic micro-fingerprint, hierarchical candidate matching measurement processing, including candidate family retrieval and fragment coverage estimation, is performed on the target program fragment cluster set and open-source reference entities. This achieves one-to-many and many-to-one matching between entities, avoids duplicate counting, and outputs the effective coverage rate. Multi-dimensional evidence screening and abnormal change identification are then performed based on the open-source component version genealogy and effective coverage rate. Observational evidence is extracted, and further, empirical and refutation evidence is deduced to form an observational evidence set. This identifies back-porting candidates and distinguishes between code trimming and version feature missing scenarios.

[0046] Based on effective coverage and observation evidence set, joint inference of lineage consistency is carried out. A lineage energy function is constructed that includes observation fitting, evolutionary continuity, mutually exclusive changes, lineage gaps, and sparse back-transfer complexity. Lineage joint probability inference processing is performed on the multi-source version source hypothesis, the sparse back-transfer term is constrained, the component source path, version range and branch changes are determined, and the source tracing results and verification evidence chain are obtained.

[0047] Semantic microfingerprints reduce interference from compilation differences while preserving version distinguishing features; version genealogy graphs can represent various code evolution and inheritance relationships; the combination of positive and negative evidence reduces version misjudgment caused by pruning; sparse backporting constraints avoid false version combinations and mismatches; the source version range is output for tracing results, verifying the evidence chain association with target addresses, entities, open source commits, positive and negative evidence, and uncertainties, without forcing the output of a single version, which facilitates review and software component management.

[0048] The following is a detailed description and explanation of the solutions in the embodiments of the present invention, using specific application examples: For the source-code-free ELF target component of the power monitoring auxiliary system, interval parsing and multi-result retention decompilation recovery processing were performed to complete binary code parsing and function candidate recovery, yielding 48 function candidates from the target program's network message processing area. Combining the program's shared data layout, read-only constant context, and function call density characteristics, all function candidates were aggregated and clustered. Ultimately, 31 core functions were integrated into a main fragment cluster, and the remaining functions were clustered into two smaller fragment clusters, constructing the target program fragment cluster set used for this tracing, providing the basic analysis units for subsequent matching and tracing.

[0049] Subsequently, decompilation differential semantic encoding was performed on all candidate target functions to extract stable control skeletons, calling behavior roles, constant operation relationships, data layout access patterns, and string contexts, generating function semantic micro-fingerprints resistant to compilation perturbations. Based on the generated semantic micro-fingerprints, hierarchical candidate matching measurement processing was carried out. Three candidate component families with similar message parsing logic were obtained through coarse screening in the open-source reference library. Fine screening was performed through data structure compatibility and the number of high-discrimination entity matches. Only candidate family A achieved 17 valid entity matches, while the other families had problems with data layout incompatibility and insufficient number of matches. Finally, family A was selected as the valid source object, and the accurate fragment effective coverage rate was calculated.

[0050] Next, entity change classification and change intensity quantification were carried out for candidate component A, and a complete open source component version genealogy was constructed, covering 11 official versions and 2 maintenance branches from 1.4 to 2.2. The core iteration characteristics of each version were fully recorded, including the addition of message length verification in version 1.7, the adjustment of structure fields in version 1.9, the splitting of parsing functions in version 2.0, and the independent boundary repair and porting changes in the 1.7-e maintenance branch.

[0051] Based on the constructed version genealogy and effective coverage results, multi-dimensional evidence screening and abnormal change identification were carried out to form a complete set of observational evidence. The target program simultaneously detected the length verification feature of version 1.7 and the function splitting structure of version 2.0, but lacked the data layout adjustment feature of version 1.9. Combined with the function retention range screening, it was determined that the missing feature was due to version iteration differences rather than program code trimming. At the same time, the function splitting of version 2.0 was identified as a candidate change for backporting that can be applied independently.

[0052] Finally, based on the effective coverage and observational evidence set, joint probabilistic inference of the genealogy was carried out, and an energy function was constructed to quantitatively evaluate the multi-source version origin hypothesis. The complete 2.0 version hypothesis had an energy value of 8.64, the 1.8 version double-return transfer hypothesis had an energy value of 6.37, while the 1.7-e maintenance branch superposition function split-back transfer hypothesis had an energy of only 4.21, which was the optimal solution. After posterior probability normalization calculation, the probability of this optimal hypothesis reached 0.81, far higher than other hypotheses.

[0053] The final source of the traceability output is the 1.7-e maintenance branch, which determines the trusted version range and clarifies the existence of backporting changes to the main version. At the same time, a complete verification data chain is generated, which accurately associates the characteristic entities of the target program's corresponding memory address, open source reference commit records and missing features, and realizes fine-grained traceability that can be manually reviewed item by item, effectively avoiding the misjudgment problem of single version judgment in traditional solutions.

[0054] Please see Figure 5 This application also provides a source tracing system for third-party code embedded in source-code-free domestic software, which can implement the above-mentioned method. The system includes: The decompilation and recovery module is used to perform range parsing and multi-result preservation decompilation and recovery processing on the executable code of the target program to obtain a set of target program fragment clusters. The differential semantic encoding module is used to perform decompilation differential semantic encoding on each candidate target function to obtain the function semantic micro-fingerprint; The intensity quantification module is used to classify entity changes and quantify the intensity of changes in the version iteration process of open source components, and obtain the version genealogy of open source components. The matching metric module is used to perform hierarchical candidate matching metric processing on the target program fragment cluster set and open source reference entities based on the function semantic microfingerprint to obtain effective coverage. The identification module is used to perform multi-dimensional evidence identification and abnormal change identification on candidate versions based on the version genealogy and effective coverage of open source components, and obtain the set of observation evidence. The inference output module is used to perform phylogenetic joint probability inference processing on the source hypothesis of multiple sources based on the effective coverage and the set of observational evidence, so as to obtain the source tracing results and the verification evidence chain.

[0055] It is understood that the content of the above method embodiments is applicable to this system embodiment. The specific functions implemented in this system embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.

[0056] This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described method. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.

[0057] It is understood that the content of the above method embodiments is applicable to this device embodiment. The specific functions implemented by this device embodiment are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0058] Please see Figure 6 , Figure 6 The hardware structure of an electronic device according to another embodiment is illustrated. The electronic device includes: The processor 601 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application. The memory 602 can be implemented as a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 602 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 602 and is called and executed by the processor 601 using the methods described in the embodiments of this application. The input / output interface 603 is used to implement information input and output; The communication interface 604 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.). Bus 605 transmits information between various components of the device (e.g., processor 601, memory 602, input / output interface 603, and communication interface 604); The processor 601, memory 602, input / output interface 603, and communication interface 604 are connected to each other within the device via bus 605.

[0059] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

[0060] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.

[0061] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0062] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.

[0063] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0064] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0065] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0066] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.

Claims

1. A method for tracing the source of embedded third-party code in source-code-free domestic software, characterized in that, The method includes the following steps: The target program's executable code is subjected to range parsing and multi-result preservation decompilation and recovery processing to obtain a set of target program fragment clusters; Each candidate objective function is subjected to decompilation differential semantic encoding to obtain the function semantic microfingerprint; The version iteration process of open source components is classified into entity changes and the intensity of changes is quantified to obtain the version genealogy of open source components. Based on the functional semantic microfingerprint, hierarchical candidate matching measurement processing is performed on the target program fragment cluster set and open source reference entities to obtain effective coverage. Based on the version genealogy of the open-source component and the effective coverage, candidate versions are subjected to multi-dimensional evidence screening and abnormal change identification to obtain an observation evidence set. Based on the effective coverage and the set of observational evidence, a phylogenetic joint probability inference process is performed on the multi-source version source hypothesis to obtain the source tracing results and the verification evidence chain.

2. The method according to claim 1, characterized in that, The process of performing range parsing and multi-result preservation decompilation and recovery on the target program's executable code to obtain a set of target program fragment clusters includes the following steps: The target program's executable code is subjected to interval parsing to obtain the code interval, read-only data interval, and relocation item parsing results; Based on the code interval, the read-only data interval, and the relocation item parsing results, the code region with boundary uncertainty is decompiled and restored to obtain a set of function candidates. The function candidates in the function candidate set are aggregated and clustered to obtain the target program fragment cluster set.

3. The method according to claim 1, characterized in that, The step of performing decompilation differential semantic encoding on each candidate objective function to obtain a function semantic microfingerprint includes the following steps: The candidate objective function is subjected to stable semantic information extraction processing to obtain a set of stable semantic units; the set of stable semantic units includes control skeleton, calling behavior role, constant operation relationship, data layout access mode and string context. The stable semantic units in the set of stable semantic units are subjected to adaptive weight adjustment to obtain stability weights; The stable semantic units with the stability weights are normalized, aggregated, and block-joined to obtain the functional semantic microfingerprint.

4. The method according to claim 1, characterized in that, The process of classifying entity changes and quantifying the intensity of changes during the version iteration of open-source components to obtain a version genealogy diagram of open-source components includes the following steps: The open-source component version is processed to generate reference entities and semantic micro-fingerprints to obtain a set of reference code entities; The differences in code entities between nodes in the reference code entity set are classified by change type to obtain an entity change set; the entity change set includes addition, deletion, modification, splitting, merging, moving, and data layout changes; Based on the entity change set, the change intensity of the edges between the spectral nodes is calculated to obtain the change intensity parameters of the spectral edges. Based on the change intensity parameter, the version nodes, evolutionary relationship edges, edge attributes, and change markers are associated and assembled to obtain the version genealogy diagram of the open source component.

5. The method according to claim 1, characterized in that, The step of performing hierarchical candidate matching measurement processing on the target program fragment cluster set and open-source reference entities based on the functional semantic microfingerprint to obtain effective coverage includes the following steps: A coarse screening process is performed on the target fragment clusters in the target program fragment cluster set to obtain a candidate open source component family set; Based on the functional semantic microfingerprint, the entity matching cost is calculated for the open-source reference entities within the candidate open-source component family set to obtain the matching cost; the calculation mechanism of the matching cost supports matching a single target entity with a connected subgraph composed of multiple open-source reference entities. Based on the matching cost, the matching strength of all target entity open-source reference entity matching pairs is calculated to obtain the matching strength. Based on the reference entity discrimination weight, the matching strength, and the deduplication normalization operation, the target fragment cluster and the candidate version are sequentially subjected to coverage statistics processing to obtain the effective coverage.

6. The method according to claim 1, characterized in that, The process of performing multi-dimensional evidence screening and abnormal change identification on candidate versions based on the version genealogy of the open-source components and the effective coverage to obtain an observation evidence set includes the following steps: Based on the entities, call relationships, and data layout of the candidate versions in the open-source component version genealogy, positive feature extraction is performed on the matching results of the target program fragment cluster set to obtain positive evidence; Based on the functional integrity information already retained in the target program fragment cluster set, the missing features of the candidate version are identified to determine the causes of missing features and obtain negative evidence. Based on the evolutionary timeline and change constraints of the positive and negative evidence on the open-source component version genealogy, isolated changes are subjected to backport candidate identification processing to obtain evolutionary evidence and backport candidate changes. The positive evidence, the negative evidence, the evolutionary evidence, and the back-transfer candidate changes are encapsulated into a set to obtain the observation evidence set.

7. The method according to claim 1, characterized in that, The process of performing phylogenetic joint probability inference on the multi-source version origin hypothesis based on the effective coverage and the observation evidence set to obtain the source tracing results and verification evidence chain includes the following steps: Based on the effective coverage, the set of observational evidence, and the preset multi-type penalty constraints, the multi-source version source hypothesis is modeled using an energy function to obtain the total energy value. Dynamic programming is performed on the version genealogy of the open-source component to obtain a set of candidate main genealogy paths; the dynamic programming process includes pre-screening of main genealogy paths with no backporting changes; Based on the candidate main lineage path set, the candidate changes for back-transplantation are sequentially carried out through incremental preferential introduction and total energy comparison of the updated total energy value to obtain the tracing result and the verification evidence chain.

8. The method according to claim 7, characterized in that, The process of back-transplanting candidate changes based on the candidate main lineage path set, sequentially performing incremental preferential introduction and total energy comparison of the updated total energy value, to obtain the tracing result and the verification evidence chain, includes the following steps: The source hypothesis of the total energy value after the back-transfer candidate change and the update is subjected to posterior probability normalization calculation to obtain the normalized posterior probability. Based on the preset cumulative posterior probability threshold, the source hypothesis carrying the normalized posterior probability is subjected to a credible version interval determination process to obtain a set of filtered credible source hypotheses. Evidence association and candidate exclusion analysis are performed on the set of credible source hypotheses to obtain the source tracing results and the verification evidence chain.

9. A source tracing system for third-party code embedded in source-code-free domestic software, characterized in that, The system includes: The decompilation and recovery module is used to perform range parsing and multi-result preservation decompilation and recovery processing on the target program's executable code to obtain a set of target program fragment clusters. The differential semantic encoding module is used to perform decompilation differential semantic encoding on each candidate target function to obtain the function semantic micro-fingerprint; The intensity quantification module is used to classify entity changes and quantify the intensity of changes in the version iteration process of open source components, and obtain the version genealogy of open source components. The matching measurement module is used to perform hierarchical candidate matching measurement processing on the target program fragment cluster set and open source reference entities based on the function semantic microfingerprint to obtain effective coverage. The identification module is used to perform multi-dimensional evidence identification and abnormal change identification on candidate versions based on the version genealogy of the open-source component and the effective coverage, so as to obtain an observation evidence set. The inference output module is used to perform phylogenetic joint probability inference processing on the multi-source version source hypothesis based on the effective coverage and the observation evidence set, so as to obtain the source tracing results and the verification evidence chain.

10. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method according to any one of claims 1 to 8.