A method and system for setting a reference watermark of a block connection library
By generating link library objects with reference watermarks in the block repository and intermediate compiler, the problems of LIB and OBJ file leakage and insufficient usage records in the existing technology are solved, and the source tracing of core link libraries and the tracking of malicious behavior are realized.
Patent Information
- Application Number
- CN202411090570.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-09
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2044-08-09
AI Technical Summary
Existing technologies are insufficient to effectively prevent the leakage of LIB, OBJ, and other files generated by the compiler, and cannot record in detail which component or library the user specifically referenced, making it difficult to trace the source of the leak.
The core linker object list of the caller object is parsed by the block repository. The intermediate compiler then concatenates the caller object information and the core linker object list into the linker template to generate the first linker object with a reference watermark, thus enabling traceability and usage records.
It effectively prevents the leakage of core link libraries and can track malicious behavior by developers during the referencing process, enabling the recording and tracing of code usage.
Smart Images

Figure CN119089413B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data encryption, and in particular to a block connection library reference watermark setting method and system. BACKGROUND
[0002] In the field of software development and management, it is crucial to ensure the security of code and core components. Currently, there are various technologies for protecting software assets, but each technology has its inherent limitations.
[0003] Firstly, file watermarking technology is a method of embedding specific identifiers in files to track the source and usage of the files. However, this technology is mainly applied to documents and media files. For LIB, OBJ, and other files generated by compilers, due to their free calling characteristics, watermarking technology is difficult to effectively apply, and it is unable to effectively prevent the leakage of core LIB.
[0004] Secondly, code encryption is another common protection method. By encrypting the code, it can ensure that the code cannot be read or modified without authorization. However, for large LIB files, the encryption process can be very time-consuming, and the encrypted files may affect performance during runtime due to the decryption process.
[0005] In addition, using Git private repositories for code management is also a common practice. Git private repositories can provide access control to ensure that only authorized users can access the code repository. However, Git private repositories mainly record access records and cannot detail which components or LIBs are specifically referenced by users. This means that even if core LIB is leaked, it is difficult to trace the specific source of the leak.
[0006] In summary, the existing technology has obvious shortcomings in protecting software assets, especially LIB, OBJ, and other files generated by compilers. SUMMARY
[0007] The technical problem to be solved by the present application is to provide a block connection library reference watermark setting method and system that can effectively prevent the leakage of core connection libraries and also achieve usage records of the code.
[0008] To solve the above technical problems, the technical solution adopted by the present application is:
[0009] A block connection library reference watermark setting method, comprising the steps of:
[0010] The block repository receives a caller object initiating a data request, parses a list of core connection library objects to be referenced by the caller object, and sends the list of core connection library objects to the repository node;
[0011] The warehouse node determines the corresponding caller object according to the core connection library object list and sends to the intermediate compiler;
[0012] The intermediate compiler writes the information of the caller object into a pre-created connection library template, references the core connection library object list to the connection library template, generates a first connection library object with a reference watermark, and returns the first connection library object to the warehouse node.
[0013] To solve the above technical problems, another technical solution adopted by the present application is:
[0014] A block connection library reference watermark setting system comprises:
[0015] A block warehouse is configured to receive a caller object initiating a data request, parse a core connection library object list referenced by the caller object, and send the core connection library object list to a warehouse node.
[0016] The warehouse node is configured to determine the corresponding caller object according to the core connection library object list and send to the intermediate compiler.
[0017] The intermediate compiler is configured to write the information of the caller object into a pre-created connection library template, reference the core connection library object list to the connection library template, generate a first connection library object with a reference watermark, and return the first connection library object to the warehouse node.
[0018] The present application has the beneficial effects that after the block warehouse receives the caller object initiating the data request, the core connection library object list referenced by the caller object is parsed and sent to the warehouse node; after the warehouse node determines the corresponding caller object according to the received core connection library object list, the data is sent to the intermediate compiler; the intermediate compiler splices the information of the caller object and the core connection library object list into the connection library template, thereby generating the first connection library object with the reference watermark, so that the reference object of the core connection library can be traced through the first connection library object, the leakage of the core connection library can be effectively prevented, and the use record of the code can be realized. BRIEF DESCRIPTION OF DRAWINGS
[0019] Figure 1 A flowchart of a block connection library reference watermark setting method according to an embodiment of the present application;
[0020] Figure 2 A schematic diagram of a block connection library reference watermark setting system according to an embodiment of the present application;
[0021] Figure 3 A schematic diagram of parsing a core connection library object referenced by a caller object according to an embodiment of the present application. DETAILED DESCRIPTION
[0022] To make the technical contents of the present application, the purposes achieved and the effects more clear, the following will be described in conjunction with the embodiments and the accompanying drawings.
[0023] Please refer to Figure 1 The embodiment of the present application provides a method for setting a reference watermark of a block connection library, comprising the following steps:
[0024] The block warehouse receives a caller object initiating a data request, parses a core connection library object list referenced by the caller object, and sends the core connection library object list to a warehouse node;
[0025] The warehouse node determines the corresponding caller object according to the core connection library object list and sends it to an intermediate compiler;
[0026] The intermediate compiler writes the information of the caller object into a pre-created connection library template, references the core connection library object list to the connection library template, generates a first connection library object with a reference watermark, and returns the first connection library object to the warehouse node.
[0027] From the above description, the beneficial effects of the present application are that after the block warehouse receives the caller object initiating the data request, it parses the core connection library object list referenced by the caller object and sends it to the warehouse node; after the warehouse node determines the corresponding caller object according to the received core connection library object list, it sends the data to the intermediate compiler; the intermediate compiler splices the information of the caller object and the core connection library object list into the connection library template, thereby generating the first connection library object with the reference watermark, so that the reference object of the core connection library can be traced through the first connection library object, which can effectively prevent the leakage of the core connection library and realize the use record of the code.
[0028] Further, the block warehouse parses the core connection library object list referenced by the caller object, comprising:
[0029] The block warehouse parses the caller object, and generates a core connection library list in combination with the connection library to which the caller object belongs and the connection library referenced by the caller object.
[0030] From the above description, since there is a nested reference in the core connection library referenced by the caller object, the core connection library list is generated in combination with the connection library to which the caller object belongs and the connection library referenced by the caller object, which can comprehensively obtain the connection library referenced by the caller object, so as to improve the accuracy of the subsequent traceability.
[0031] Further, the intermediate compiler writes information of the caller object into a pre-created connection library template, including:
[0032] The intermediate compiler writes IP information, device information and access time of the caller object into a pre-created blank connection library template.
[0033] As described above, the IP information, device information and access time of the caller object are written into the blank connection library template in the intermediate compiler, so that the reference information of the object can be traced according to the information of the caller object subsequently.
[0034] Further, the intermediate compiler references the core connection library object list to the connection library template to generate the first connection library object with reference watermark, including:
[0035] The intermediate editor generates a header file, references the core connection library object list to the header file, and references the connection library template with written information in the header file to generate the first connection library object with reference watermark.
[0036] As described above, by referencing the core connection library object list and the connection library template with written information in the header file, the first connection library object with reference watermark can be generated, and through the object, the malicious behavior of the developer in the reference process can be effectively tracked, and the risk caused by the malicious behavior can be restricted.
[0037] Further, the block repository receives a caller object initiating a data request, and previously includes:
[0038] The caller object is generated when the host object references a function, the data is filled in the caller object, and the data request and the block repository are configured for the caller object.
[0039] As described above, the caller object is generated when the host object references a function, that is, the watermark of the user and the reference behavior of the user can be stored when the user references a function, and the use record of the code can be realized.
[0040] Please refer to Figure 2 Another embodiment of the present application provides a reference watermark setting system of a block connection library, including:
[0041] The block repository is configured to receive a caller object initiating a data request, parse a core connection library object list referenced by the caller object, and send the core connection library object list to a repository node.
[0042] The repository node is configured to determine a corresponding caller object according to the core connection library object list and send the corresponding caller object to an intermediate compiler.
[0043] an intermediate compiler configured to write information of the caller object into a pre-created connection library template, reference the core connection library object list to the connection library template to generate a first connection library object with a reference watermark, and return the first connection library object to the warehouse node.
[0044] From the above description, the beneficial effects of the present application are that after the block warehouse receives the caller object initiating the data request, the core connection library object list referenced by the caller object is parsed and sent to the warehouse node; after the warehouse node determines the corresponding caller object from the received core connection library object list, the data is sent to the intermediate compiler; the intermediate compiler splices the information of the caller object and the core connection library object list into the connection library template, thereby generating the first connection library object with the reference watermark, so that the reference object of the core connection library can be traced through the first connection library object, which can effectively prevent the leakage of the core connection library and realize the use record of the code.
[0045] Further, the block warehouse parses the core connection library object list referenced by the caller object, including:
[0046] The block warehouse parses the caller object, and generates a core connection library list in combination with the connection library to which the caller object belongs and the connection library referenced by the caller object.
[0047] From the above description, since there is a nested reference in the core connection library referenced by the caller object, the core connection library list is generated in combination with the connection library to which the caller object belongs and the connection library referenced by the caller object, which can comprehensively obtain the connection library referenced by the caller object, so as to improve the accuracy of the subsequent traceability.
[0048] Further, the intermediate compiler writes the information of the caller object into the pre-created connection library template, including:
[0049] The intermediate compiler writes the IP information, device information and access time of the caller object into the pre-created blank connection library template.
[0050] From the above description, the IP information, device information and access time of the caller object are written into the blank connection library template in the intermediate compiler, so as to trace the reference information of the object according to the information of the caller object in the subsequent process.
[0051] Further, the intermediate compiler references the core connection library object list to the connection library template to generate a first connection library object with a reference watermark, including:
[0052] The intermediate editor generates a header file, references the core connection library object list into the header file, and references the connection library template with written information in the header file to generate the first connection library object with reference watermark.
[0053] As can be seen from the above description, by referencing the core connection library object list and the connection library template with written information in the header file, the first connection library object with reference watermark can be generated, through which the malicious behavior of the developer in the referencing process can be effectively tracked, and the risk caused by the malicious behavior can be restricted.
[0054] Further, the block warehouse receives the caller object initiating the data request, and previously includes:
[0055] The caller object is generated when the host object references the function, data is filled in the caller object, and the data request and the block warehouse are configured for the caller object.
[0056] As can be seen from the above description, the caller object is generated when the host object references the function, that is, the watermark of the user and the referencing behavior of the user can be stored when the user references the function, and the use record of the code can be realized.
[0057] The above-mentioned reference watermark setting method and system of the block connection library are suitable for preventing the leakage of the core connection library by setting the reference watermark in the program development process, and can realize the use record of the code, which will be described below through specific implementation manners.
[0058] Embodiment one
[0059] Please refer to Figure 1 A reference watermark setting method of a block connection library includes the following steps:
[0060] S0, the caller object is generated when the host object references the function, data is filled in the caller object, and the data request and the block warehouse are configured for the caller object.
[0061] In this embodiment, the data filled when the caller object is generated can be start.
[0062] S1, the block warehouse receives the caller object initiating the data request, parses the core connection library object list referenced by the caller object, and sends the core connection library object list to the warehouse node.
[0063] Wherein, when the block warehouse parses the caller object, the core connection library list can be generated in combination with the connection library to which the caller object belongs and the connection library referenced by the caller object.
[0064] In this embodiment, please refer to Figure 3, the start code exists in the.h header file, and its real object exists in the lib file, so for the start code, since it exists in xx.lib, and the _service_data() function existing in xx1.lib is referenced by start, therefore, xx.lib and xx1.lib are contained in the generated core connection library list.
[0065] S2, the warehouse node determines the corresponding caller object according to the core connection library object list, and sends it to the intermediate compiler.
[0066] In this embodiment, if the core connection library object list contains multiple objects, the caller object needs to be split and determined according to the core connection library object list.
[0067] Wherein, the warehouse node can match the corresponding LIB file for the core connection library object list, and can traverse and search the corresponding file with the required file name, that is, the object data of the corresponding LIB file can be obtained.
[0068] S3, the intermediate compiler writes the information of the caller object into the pre-created connection library template, references the core connection library object list to the connection library template, to generate the first connection library object with reference watermark, and returns the first connection library object to the warehouse node.
[0069] Specifically, the intermediate compiler needs to implement the following operations:
[0070] Write the IP information, device information and access time of the caller object into the pre-created blank connection library template; generate a header file, reference the core connection library object list to the header file, and reference the connection library template with written information in the header file, to generate the first connection library object with reference watermark.
[0071] In this embodiment, the intermediate compiler needs to first create a blank LIB template, generate the information (IP information, device information and access time) of the caller object according to the caller object, write the information of the caller object into the blank LIB template, reference the core connection library object list (core LIB) to the blank LIB template, and splice the blank LIB template:
[0072] Generate a.h header file, reference the core LIB to the.h header file, and reference the LIB template with written content in the.h header file, to generate the first connection library object (LIB object) with reference watermark.
[0073] Embodiment two
[0074] Please refer to Figure 2A reference watermark setting system of a block connection library comprises:
[0075] When a host object references a function, a caller object is generated, data is filled in the caller object, and a data request and a block warehouse are configured for the caller object.
[0076] A block warehouse is configured to receive a caller object initiating a data request, parse a list of core connection library objects referenced by the caller object, and send the list of core connection library objects to a warehouse node.
[0077] A warehouse node is configured to determine a corresponding caller object according to the list of core connection library objects and send the caller object to an intermediate compiler.
[0078] An intermediate compiler is configured to write information of the caller object into a pre-created connection library template, reference the list of core connection library objects to the connection library template, generate a first connection library object with a reference watermark, and return the first connection library object to the warehouse node.
[0079] In summary, the reference watermark setting method and system of the block connection library provided by the application can trace the reference object of the core connection library through the first connection library object, record the use of the code, effectively track malicious LIB callers, prevent the leakage of the core connection library, and restrict the risk caused by the leakage of the core connection library information by the developer.
[0080] The above merely illustrates the embodiments of the present application, and is not intended to limit the patent scope of the present application. Any equivalent transformation or direct or indirect application in the related technical field based on the content of the present application specification and drawings is also included in the patent protection scope of the present application.
Claims
1. A method for setting a reference watermark for a blockchain link library, characterized in that, Including the following steps: The block repository receives the caller object that initiates the data request, parses the list of core connection library objects that the caller object needs to reference, and sends the list of core connection library objects to the repository node; The repository node determines the corresponding caller object based on the core linker library object list and sends it to the intermediate compiler; The intermediate compiler writes the information of the caller object into a pre-created linker template, references the list of core linker objects to the linker template, generates a first linker object with a reference watermark, and returns the first linker object to the repository node. The blockchain repository parses the list of core library objects that the caller object needs to reference, including: The block repository parses the caller object and generates a core link library list by combining the link library to which the caller object belongs and the link library referenced by the caller object; The intermediate compiler writes the information of the caller object into a pre-created linker template, including: The intermediate compiler writes the IP information, device information, and access time of the caller object into a pre-created blank linker template. The intermediate compiler references the list of core linker objects into the linker template to generate a first linker object with a reference watermark, including: The intermediate editor generates a header file, references the list of core linker objects in the header file, and references the linker templates with already written information in the header file to generate a first linker object with a reference watermark.
2. The method for setting a reference watermark for a block link library according to claim 1, characterized in that, The blockchain repository receives the caller object that initiated the data request, which previously included: When the host object references the function, a caller object is generated, data is populated in the caller object, and data requests and block repositories are configured for the caller object.
3. A reference watermark setting system for a block link library, characterized in that, include: The block repository is used to receive the caller object that initiates the data request, parse the list of core connection library objects that the caller object needs to reference, and send the list of core connection library objects to the repository node; The repository node is used to determine the corresponding caller object based on the core linker library object list and send it to the intermediate compiler; An intermediate compiler is used to write the information of the caller object into a pre-created linker template, reference the list of core linker objects to the linker template to generate a first linker object with a reference watermark, and return the first linker object to the repository node. The blockchain repository parses the list of core library objects that the caller object needs to reference, including: The block repository parses the caller object and generates a core link library list by combining the link library to which the caller object belongs and the link library referenced by the caller object; The intermediate compiler writes the information of the caller object into a pre-created linker template, including: The intermediate compiler writes the IP information, device information, and access time of the caller object into a pre-created blank linker template. The intermediate compiler references the list of core linker objects into the linker template to generate a first linker object with a reference watermark, including: The intermediate editor generates a header file, references the list of core linker objects in the header file, and references the linker templates with already written information in the header file to generate a first linker object with a reference watermark.
4. The reference watermark setting system for a block link library according to claim 3, characterized in that, The blockchain repository receives the caller object that initiated the data request, which previously included: When the host object references the function, a caller object is generated, data is populated in the caller object, and data requests and block repositories are configured for the caller object.
Citation Information
Patent Citations
Method and system for protecting .NET executable program
CN103955635A
System application watermark generation method and device
CN117556395A