File tracing method and device
Through real-time monitoring and session restoration of enterprise network traffic, the relationship between file circulation and changes is constructed, which solves the problem of inaccurate file traceability in the existing technology, and achieves precise positioning of file content tampering and rights protection.
Patent Information
- Application Number
- CN202310389309.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-12
- Publication Date
- 2024-10-18
AI Technical Summary
Existing file traceability methods are difficult to ensure the accuracy of traceability when the file content is tampered with, and cannot accurately locate the tampering process, which affects the legitimate rights and interests of enterprise users.
Through real-time monitoring of enterprise network traffic, session restoration is performed to obtain file and attribute information, the transfer relationship and change relationship of files are constructed, and the file traceability trajectory is determined to improve the accuracy of traceability and accurately locate the tampering process.
It effectively improves the accuracy of traceability when file content is tampered with, accurately locates the tampering process, and protects the legitimate rights and interests of corporate users.
Smart Images

Figure CN118797583A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data security technology, and in particular to a file tracing method and device. Background Art
[0002] In recent years, with the continuous improvement of the level of enterprise informatization construction, the office operations of enterprises are highly dependent on various types of files, such as Office series files, PDF files, text files, compressed files, etc., and files are usually transmitted through the network to improve the convenience of file sharing within the enterprise, but at the same time it also causes great challenges to file security, that is, it is easy to be leaked, tampered with, etc. Once the above situation occurs, it is difficult to trace the file back.
[0003] At present, the existing file traceability is to analyze the enterprise's network traffic, extract the initial IP, destination IP and file information, and then generate a flow traceability portrait of the file based on the initial IP, destination IP and file information to achieve file traceability. However, the above method is difficult to guarantee the accuracy of file traceability when the file content is tampered with, and it is impossible to locate the tampering process of the tampered file, which in turn affects the legitimate rights and interests of enterprise users. Summary of the invention
[0004] In view of the above problems, the present application provides a file tracing method and device, the main purpose of which is to improve the accuracy of file tracing when the file content is tampered with, and accurately locate the tampering process of the tampered file, thereby ensuring the legitimate rights and interests of corporate users.
[0005] In order to solve the above technical problems, this application proposes the following solutions:
[0006] In a first aspect, the present application provides a file tracing method, the method comprising:
[0007] Real-time monitoring of network traffic of designated enterprises;
[0008] Performing session restoration on the network traffic to obtain files corresponding to the network traffic and attribute information corresponding to the files;
[0009] Constructing a file transfer relationship and a file change relationship of the file according to the file and the attribute information corresponding to the file, wherein the file transfer relationship is used to characterize the transfer process corresponding to the file, and the file change relationship is used to characterize the tampering process of the file;
[0010] The file traceability track corresponding to the designated enterprise is determined based on the file flow relationship and the file change relationship of all files.
[0011] In a second aspect, the present application provides a file tracing device, the device comprising:
[0012] A monitoring unit, used to monitor the network traffic of a designated enterprise in real time;
[0013] A processing unit, configured to perform session restoration on the network traffic obtained by the monitoring unit to obtain a file corresponding to the network traffic and attribute information corresponding to the file;
[0014] a construction unit, configured to construct a file flow relationship and a file change relationship of the file according to the file obtained by the processing unit and the attribute information corresponding to the file, wherein the file flow relationship is used to characterize the flow process corresponding to the file, and the file change relationship is used to characterize the tampering process of the file;
[0015] A determination unit is used to determine the file traceability track corresponding to the designated enterprise based on the file flow relationship and the file change relationship of all files obtained by the construction unit.
[0016] In order to achieve the above-mentioned purpose, according to the third aspect of the present application, a storage medium is provided, wherein the storage medium includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the file tracing method of the first aspect mentioned above.
[0017] In order to achieve the above-mentioned purpose, according to the fourth aspect of the present application, an electronic device is provided, which includes at least one processor, and at least one memory and a bus connected to the processor; wherein the processor and the memory communicate with each other through the bus; the processor is used to call the program instructions in the memory to execute the file tracing method of the first aspect mentioned above.
[0018] By means of the above technical scheme, a file tracing method and device provided by the present application is that when it is necessary to trace the source of a file, the network traffic of the designated enterprise is first monitored in real time, and then the network traffic is restored to obtain the file corresponding to the network traffic and the attribute information corresponding to the file, and then the file flow relationship and file change relationship of the file are constructed according to the file and the attribute information corresponding to the file, wherein the file flow relationship is used to characterize the flow process corresponding to the file, and the file change relationship is used to characterize the tampering process of the file, and finally the file tracing trajectory corresponding to the designated enterprise is determined based on the file flow relationship and file change relationship of all files. Through the technical scheme provided by the present application, the corresponding file and the attribute information corresponding to the file can be determined based on the network traffic, and the file flow relationship and the file change relationship can be constructed based on the attribute information corresponding to the file and the file, that is, the flow process and tampering process corresponding to the file, and then the file tracing trajectory corresponding to the designated enterprise is determined based on the file flow relationship and the file change relationship of all files, which effectively improves the accuracy of file tracing when the file content is tampered with, and accurately locates the tampering process of the tampered file, thereby ensuring the legitimate rights and interests of enterprise users.
[0019] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0021] Figure 1 A flow chart of a file tracing method provided in an embodiment of the present application is shown;
[0022] Figure 2 Another method flow chart of file tracing provided by an embodiment of the present application is shown;
[0023] Figure 3 A block diagram showing the composition of a file tracing device provided in an embodiment of the present application is shown;
[0024] Figure 4 A block diagram showing another file tracing device provided in an embodiment of the present application is shown;
[0025] Figure 5 A schematic diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0026] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0027] At present, the existing file traceability is to parse the network traffic of the enterprise, extract the initial IP, destination IP and file information, and then generate the flow traceability portrait of the file based on the initial IP, destination IP and file information, so as to achieve the traceability of the file. However, the above method is difficult to ensure the accuracy of file traceability when the file content is tampered with, and it is impossible to locate the tampering process of the tampered file, thereby affecting the legitimate rights and interests of enterprise users. The present application determines the corresponding file and the attribute information corresponding to the file through network traffic, and constructs the file flow relationship and the file change relationship based on the file and the attribute information corresponding to the file, that is, the flow process and tampering process corresponding to the file, and then determines the file traceability track corresponding to the specified enterprise based on the file flow relationship and file change relationship of all files, effectively improving the accuracy of file traceability when the file content is tampered with, and accurately locates the tampering process of the tampered file, thereby ensuring the legitimate rights and interests of enterprise users.
[0028] To this end, the embodiment of the present application provides a file tracing method, which can improve the accuracy of file tracing when the file content is tampered with, and accurately locate the tampering process of the tampered file, thereby ensuring the legitimate rights and interests of enterprise users. The specific execution steps are as follows: Figure 1 As shown, including:
[0029] 101. Monitor the network traffic of a designated enterprise in real time.
[0030] It should be noted that the executor of this embodiment is a third-party monitoring server. By deploying traffic monitoring code on the server side of the designated enterprise, it is possible to obtain feedback on the network traffic of the designated enterprise. In this embodiment, network traffic refers to the most recent network traffic, that is, the traffic generated by the most recent file transfer of the designated enterprise before the current time point.
[0031] 102. Perform session restoration on the network traffic to obtain files corresponding to the network traffic and attribute information corresponding to the files.
[0032] It should be noted that, in the present embodiment, since the network traffic is file transfer realized in the form of a session, the corresponding multiple session packets can be obtained by performing session restoration on the network traffic, and by reorganizing the multiple session packets, the files transmitted in the session and the file identification information can be obtained, wherein the file identification information includes but is not limited to the file name, MD5 code, etc., and the file transfer information corresponding to the file can be configured based on the relevant information corresponding to this session, wherein the file transfer information includes but is not limited to the transmission medium, source IP, source port, destination IP, destination port, transmission time, etc.
[0033] 103. Construct a file flow relationship and a file change relationship of the file according to the file and the attribute information corresponding to the file.
[0034] Among them, the file flow relationship is used to characterize the flow process corresponding to the file, and the file change relationship is used to characterize the tampering process of the file. It should be noted that in the present embodiment, since the aforementioned steps have determined the file corresponding to the network traffic and the attribute information corresponding to the file, specifically, it is possible to first determine whether the file is a newly created file or an existing file based on the file identification information, for example, by detecting it according to the MD5 code. If it is a newly created file, it means that the file flow process of the file only includes this flow, and the file flow relationship can be constructed based on the file transfer information in the attribute information. If it is an existing file, it means that the file has an associated file flow process, and it only needs to update the associated file flow process of the file based on the file flow process of this flow, and the file The file change relationship is constructed based on the content similarity between the file and the file corresponding to the historical network traffic. If it is an existing file, it means that the file has not been tampered with, so there is no need to determine the file change relationship. If it is a newly created file, it means that the file may have been tampered with, so it is necessary to determine the file change relationship. Specifically, the content similarity between the file and the file corresponding to the historical network traffic can be calculated, and a similarity threshold can be set. The similarity threshold can be used to first determine whether it is a similar file, and then determine the tampering process between the file and the similar file, so as to determine whether the file plagiarizes the similar file, or the similar file plagiarizes the file.
[0035] 104. Determine the file traceability track corresponding to the specified enterprise based on the file flow relationship and file change relationship of all files.
[0036] It should be noted that, in the present embodiment, since the network traffic of the designated enterprise is monitored in real time, that is, the transmission files of the designated enterprise are accumulated in sequence, that is to say, the file flow relationship and file change relationship of all files of the designated enterprise are updated or added in real time. Therefore, the file traceability trajectory corresponding to the designated enterprise can be determined based on the file flow relationship and file change relationship of all files. Specifically, a file traceability image can be drawn based on the file flow relationship and file change relationship of all files, and the attribute information corresponding to the file can be added to the file traceability image as a traceability mark to obtain the file traceability trajectory corresponding to the designated enterprise. When the enterprise user has a file traceability demand, the traceability trajectory of all files of the designated enterprise, that is, the flow process and tampering process of all files, can be viewed, thereby effectively improving the accuracy of file traceability when the file content is tampered with, and accurately locating the tampering process of the file whose content is tampered with, to ensure the legitimate rights and interests of the enterprise users.
[0037] Based on the above Figure 1 It can be seen from the implementation method that a file tracing method provided by this application is to first monitor the network traffic of the specified enterprise in real time when it is necessary to trace the source of the file, and then perform session restoration on the network traffic to obtain the file corresponding to the network traffic and the attribute information corresponding to the file, and then construct the file flow relationship and file change relationship of the file according to the file and the attribute information corresponding to the file, wherein the file flow relationship is used to characterize the flow process corresponding to the file, and the file change relationship is used to characterize the tampering process of the file, and finally determine the file tracing trajectory corresponding to the specified enterprise based on the file flow relationship and file change relationship of all files. Through the technical solution provided by this application, it is possible to determine the corresponding file and the attribute information corresponding to the file based on the network traffic, and simultaneously construct the file flow relationship and the file change relationship based on the attribute information corresponding to the file and the file, that is, the flow process and tampering process corresponding to the file, and then determine the file tracing trajectory corresponding to the specified enterprise based on the file flow relationship and the file change relationship of all files, effectively improve the accuracy of file tracing when the file content is tampered with, and accurately locate the tampering process of the tampered file, thereby ensuring the legitimate rights and interests of enterprise users.
[0038] Further, the preferred embodiment of the present application is in the above Figure 1 Based on this, a detailed description of the process of document tracing is given. The specific steps are as follows: Figure 2 As shown, including:
[0039] 201. Monitor the network traffic of a designated enterprise in real time.
[0040] This step is combined with the description of step 101 in the above method, and the same contents are not repeated here.
[0041] 202. Perform session restoration on the network traffic to obtain files corresponding to the network traffic and attribute information corresponding to the files.
[0042] This step is combined with the description of step 102 in the above method, and the same contents are not repeated here.
[0043] 203. Determine whether the file matches a stored file in a preset file library according to the file identification information.
[0044] Among them, the preset file library is used to represent a file library that stores different files and all the associations corresponding to different files. It should be noted that in this embodiment, the preset file library is a file library dedicated to storing different files obtained through this embodiment and all the associations between different files, wherein the associations include but are not limited to file flow relationships, file change relationships, etc. Since the preset file library stores the files themselves and file associations corresponding to all network traffic before the current time point, and in actual applications, the same file may flow or be tampered with from different source IPs to the destination IP at different times, although the association is updated, that is, there is a new flow process, etc., if the file content is not modified, then directly storing it in the preset file library will cause the file to be stored repeatedly. Therefore, in order to avoid repeated storage of the file itself and the file, The association relationship is stored repeatedly, and the files corresponding to the network traffic and the attribute information corresponding to the files match the stored files contained in the preset file library. If they match, it means that the file is an existing file in the preset file library, that is, a created file, and the subsequent step 205 is executed. If they do not match, it means that the file does not exist in the preset file library, that is, a newly created file, and the subsequent step 204 is executed. The specific detection can be performed based on the MD5 code. MD5 is a file signature, which is equivalent to the identity of the file. It is generated based on the file content, that is, each file can use the MD5 verification program to calculate a fixed MD5 code. Therefore, based on whether the MD5 code is consistent, it can be determined whether the content of the file has been modified or maliciously tampered with.
[0045] 204. Determine that the file is a newly created file, and build a file transfer relationship between the files based on the file transfer information, and add the file transfer relationship between the files to a preset file library.
[0046] It should be noted that, since in step 203, it has been determined that the file is a newly created file, the file flow relationship of the file can be constructed based on the file transfer information, and the file flow relationship between the files can be added to the preset file library to supplement the file flow relationship of all files in the specified enterprise, thereby facilitating subsequent file tracing.
[0047] 205. Determine that the file is a created file, and use the file transfer information to update the file flow relationship of the stored files matching the file, and delete the file.
[0048] It should be noted that, since in step 203, it has been determined that the file is a created file, that is, the file is an existing file in the preset file library, the file transfer information of the file can be used to continue to update the file flow relationship of the existing file that matches the file in the preset file library. Specifically, the file flow relationship of the file can be generated based on the file transfer information of the file, and the file flow relationship of the file can be added to the file flow relationship of the existing file that matches the file in the preset file library to supplement the addition, thereby realizing the update of the file flow relationship. A new file flow relationship can also be regenerated based on the file transfer information of the file and the file transfer information of the existing file that matches the file in the preset file library, instead of overwriting the original file flow relationship. This is not limited in this regard in this embodiment. After the file flow relationship is updated, in order to avoid repeated storage of files with the same content, the file can be deleted, that is, only one copy of the file with the same content is saved.
[0049] 206. Calculate the content similarity between the file and each stored file in the preset file library to obtain a calculation result corresponding to the file and each stored file in the preset file library.
[0050] It should be noted that in actual applications, since files will flow to different destination IPs, and the destination IPs will also serve as source IPs to circulate files again, and after multiple flows, it is inevitable that the file content will be modified or maliciously tampered with, thereby affecting the legitimate rights and interests of corporate users, and the degree of modification is different for different users who have modified or maliciously tampered with operations. Therefore, in order to avoid file plagiarism and unauthorized malicious citation, the file can be stored in the preset file library. The content similarity calculation between the file and each existing file is performed. Since it has been determined in the previous steps that only new files have this storage process, that is, the file content must be different from the file content of the existing file, but the proportion of different contents is uncertain. Therefore, the similarity calculation can be used to determine the similarity result between the file and the existing file, thereby determining whether there is a plagiarism relationship between the file and the existing file, and when a plagiarism relationship exists, which existing file the file plagiarizes, etc. The specific similarity calculation algorithm includes but is not limited to cosine similarity, TF-IDF model, LSI / LSA model, Jaccard coefficient calculation, etc.
[0051] Specifically, the content similarity can be calculated based on the file or the stored file, that is, the first result item of the file being equivalent to different stored files and the second result item of different stored files relative to the file are obtained. The calculation result includes the first result item and the second result item, the second result item is calculated by the file relative to the stored files included in the preset file library, and the second result item is calculated by the stored files included in the preset file library relative to the file. That is, the two results, namely the calculation result composed of the first result item and the second result item, are obtained between the file and each stored file, so as to perform the subsequent step 207.
[0052] 207. Based on the calculation result, similar files of the file and the plagiarism relationship between the file and the similar files are determined in all the stored files included in the preset file library.
[0053] It should be noted that, in the present embodiment, since the calculation result is the calculation result between the file and each stored file, it is possible to determine whether there is a stored file similar to the file in the preset file library and which stored file the similar stored file is based on different calculation results. A similarity threshold can be set for comparison of whether there is a stored file similar to the file in the preset file library, that is, the stored file corresponding to the calculation result exceeding the similarity threshold is the similar file. However, since there are multiple stored files, there is also the possibility that there may be multiple similar files exceeding the similarity threshold. The calculation result includes two result items, namely the first result item and the second result item. Therefore, the plagiarism relationship between the file and the similar file can be determined according to the size of the first result item and the second result item.
[0054] Specifically, determine whether the first result item and / or the second result item in the calculation results of the file and each stored file included in the preset file library exceeds a specified threshold; if so, take the stored files corresponding to the calculation results of the first result item and / or the second result item exceeding the specified threshold as similar files of the file; determine the plagiarism relationship between the file and the similar file based on the size relationship between the two first result items and the second result items in the calculation results of the file and the similar files. Among them, the specified threshold can be customized according to actual conditions. In this regard, this embodiment does not limit the specific value. In actual applications, there is a situation where the contents of different files are integrated to generate a new file, that is, the user plagiarizes a section of content from file A, plagiarizes a section of content from file B, etc. Therefore, it is necessary to treat all stored files whose calculation results exceed the specified threshold as similar files of the file, that is, determine the plagiarism source of the file, so as to ensure the legitimate rights and interests of corporate users and facilitate subsequent accountability, etc. For the above-mentioned process of determining similar files, there are generally three situations, namely, the first result item and the second result item both exceed the specified threshold / the first result item exceeds the specified threshold but the second result item does not exceed the specified threshold / the second result item exceeds the specified threshold but the first result item does not exceed the specified threshold. For the first type, the plagiarism relationship can be determined by comparing the size of the first result item and the second result item. For the second and third types, the plagiarism relationship can be determined based on which of the first result item or the second result item that exceeds the specified threshold is calculated relative to whom.
[0055] For example, assuming there are four files: "Data Classification and Grading Standards.pdf", "Data Classification and Grading Methods.doc", "Data Classification and Grading Technical Plan.doc" and "Data Classification and Grading Construction Plan.docx", the similarity calculation results are as follows:
[0056] The similarity between "Data Classification and Grading Standard.pdf" and "Data Classification and Grading Technical Plan.doc" is (0.95, 0.42), where 0.95 is the first result item and 0.42 is the second result item;
[0057] The similarity between "Data Classification and Grading Method.doc" and "Data Classification and Grading Technical Solution.doc" is (0.96, 0.53), where 0.96 is the first result item and 0.53 is the second result item;
[0058] The similarity between "Data Classification and Grading Technical Plan.doc" and "Data Classification and Grading Construction Plan.docx" is (0.98, 0.68), where 0.98 is the first result item and 0.68 is the second result item;
[0059] Assuming the similarity threshold is set to 0.95, the results that can be determined are:
[0060] The "Data Classification and Grading Standard.pdf" is similar to the "Data Classification and Grading Technical Plan.doc", and the "Data Classification and Grading Standard.pdf" plagiarizes the "Data Classification and Grading Technical Plan.docx";
[0061] "Data Classification and Grading Method.doc" is similar to "Data Classification and Grading Technical Plan.doc", and "Data Classification and Grading Method.doc" plagiarizes "Data Classification and Grading Technical Plan.docx";
[0062] "Data Classification and Grading Technical Plan.doc" is similar to "Data Classification and Grading Construction Plan.docx", and "Data Classification and Grading Technical Plan.doc" plagiarizes "Data Classification and Grading Construction Plan.docx".
[0063] 208. Add the plagiarism relationship as a file change relationship of the file to the preset file library.
[0064] It should be noted that the plagiarism relationship has been determined in the aforementioned step 207, and therefore, the plagiarism relationship can be added to the preset file library as a file change relationship of the file.
[0065] 209. Determine the file traceability track corresponding to the specified enterprise based on the file flow relationship and file change relationship of all files.
[0066] This step is combined with the description of step 104 in the above method, and the same content is not repeated here. It should be noted that, in this embodiment, the specific execution logic of determining the file traceability track corresponding to the specified enterprise based on the file flow relationship and file change relationship of all files is: draw the file traceability image of all files based on the file flow relationship and file change relationship of all files; add the attribute information corresponding to all files as traceability marks to the file traceability image to obtain the file traceability track corresponding to the specified enterprise. Among them, the file traceability image includes the attribute information corresponding to all files, that is, the file transfer information and file identification information of all files are marked for traceability, and the specific file flow relationship and file change relationship can be drawn based on the connection line, thereby referring to its file flow relationship and file change relationship. Through the different superposition and accumulation of this method, the file traceability track corresponding to the specified enterprise can be obtained, which is convenient for subsequent precise traceability and other operations.
[0067] Furthermore, as a response to the above Figure 1-2The implementation of the method embodiment shown in the figure, the embodiment of the present application provides a file tracing device, which is used to improve the accuracy of file tracing when the file content is tampered with, and accurately locate the tampering process of the tampered file, so as to ensure the legitimate rights and interests of corporate users. The embodiment of this device corresponds to the aforementioned method embodiment. For ease of reading, this embodiment will no longer repeat the details of the aforementioned method embodiment one by one, but it should be clear that the device in this embodiment can correspond to all the contents of the aforementioned method embodiment. Specifically, Figure 3 As shown, the device comprises:
[0068] A monitoring unit 31, used to monitor the network traffic of a designated enterprise in real time;
[0069] The processing unit 32 is used to perform session restoration on the network traffic obtained by the monitoring unit 31 to obtain files corresponding to the network traffic and attribute information corresponding to the files;
[0070] A construction unit 33 is used to construct a file flow relationship and a file change relationship of the file according to the file obtained by the processing unit 32 and the attribute information corresponding to the file, wherein the file flow relationship is used to represent the flow process corresponding to the file, and the file change relationship is used to represent the tampering process of the file;
[0071] The determining unit 34 is used to determine the file traceability track corresponding to the designated enterprise based on the file circulation relationship and the file change relationship of all the files obtained by the constructing unit 33.
[0072] Further, such as Figure 4 As shown, the construction unit 33 includes:
[0073] A judgment module 331 is used to judge whether the file matches a stored file contained in a preset file library according to the file identification information, wherein the preset file library is used to represent a file library storing different files and all association relationships corresponding to the different files;
[0074] A first processing module 332 is configured to determine that the file is a new file if the file in the judgment module 331 does not match the stored files in the preset file library, and to construct a file transfer relationship of the file based on the file transfer information, and to add the file and the file transfer relationship of the file to the preset file library;
[0075] The second processing module 333 is used to determine that the file is a created file if the file in the judgment module 331 matches the stored file contained in the preset file library, and use the file transfer information to update the file flow relationship of the stored file matching the file, and delete the file.
[0076] Further, such as Figure 4 As shown, the device also includes:
[0077] a calculation module 334, configured to calculate content similarity between the file and each of the stored files included in the preset file library after the first processing module 332, so as to obtain a calculation result between the file and each of the stored files included in the preset file library, wherein the calculation result includes a similarity result item of the file relative to the stored files included in the preset file library and a similarity result item of the stored files included in the preset file library relative to the file;
[0078] A determination module 335, configured to determine similar files of the file and a plagiarism relationship between the file and the similar files among all the stored files included in the preset file library based on the calculation result obtained by the calculation module;
[0079] The first processing module 332 is further configured to add the plagiarism relationship obtained by the determining module 335 as a file change relationship of the file to the preset file library.
[0080] Further, such as Figure 4 As shown, the calculation result includes a first result item and a second result item, the second result item is obtained by calculating the file relative to the stored file included in the preset file library, and the second result item is obtained by calculating the stored file included in the preset file library relative to the file.
[0081] Further, such as Figure 4 As shown, the determination module 335 is specifically used to:
[0082] Determine whether the first result item and / or the second result item in the calculation results of the file and each of the stored files included in the preset file library exceeds a specified threshold;
[0083] If yes, taking the stored files corresponding to the calculation results of the first result item and / or the second result item exceeding the specified threshold as similar files of the file;
[0084] The plagiarism relationship between the file and the similar file is determined based on the size relationship between the first result item and the second result item in the calculation results of the file and the similar file.
[0085] Further, such as Figure 4 As shown, the determining unit 34 includes:
[0086] A drawing module 341, used for drawing a file traceability image of all files based on the file flow relationship and the file change relationship of all files;
[0087] The adding module 342 is used to add the attribute information corresponding to all files as traceability marks to the file traceability image obtained by the drawing module 341 to obtain the file traceability track corresponding to the designated enterprise.
[0088] Furthermore, an embodiment of the present application also provides an electronic device, the electronic device includes a processor and a memory, the monitoring unit 31, the processing unit 32, the construction unit 33 and the determination unit 34 are all stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions. The processor includes a kernel, and the kernel retrieves the corresponding program unit from the memory.
[0089] The kernel can be set to one or more. By adjusting the kernel parameters, the accuracy of file traceability can be improved when the file content is tampered with, and the tampering process of the tampered file can be accurately located, thereby ensuring the legitimate rights and interests of enterprise users.
[0090] An embodiment of the present application provides a storage medium on which a program is stored, and when the program is executed by a processor, the file tracing method is implemented.
[0091] An embodiment of the present application provides a processor, which is used to run a program, wherein the file tracing method is executed when the program is running.
[0092] The present application provides a file tracing method and device. When it is necessary to trace the source of a file, the network traffic of a specified enterprise is first monitored in real time, and then the network traffic is restored to obtain the file corresponding to the network traffic and the attribute information corresponding to the file. Then, the file flow relationship and the file change relationship of the file are constructed according to the file and the attribute information corresponding to the file, wherein the file flow relationship is used to characterize the flow process corresponding to the file, and the file change relationship is used to characterize the tampering process of the file. Finally, the file tracing trajectory corresponding to the specified enterprise is determined based on the file flow relationship and the file change relationship of all files. Through the technical solution provided by the present application, the corresponding file and the attribute information corresponding to the file can be determined based on the network traffic, and the file flow relationship and the file change relationship can be constructed based on the file and the attribute information corresponding to the file, that is, the flow process and tampering process corresponding to the file, and then the file tracing trajectory corresponding to the specified enterprise is determined based on the file flow relationship and the file change relationship of all files, which effectively improves the accuracy of file tracing when the file content is tampered with, and accurately locates the tampering process of the tampered file, thereby ensuring the legitimate rights and interests of enterprise users.
[0093] The present application embodiment provides a device 40, such as Figure 5 As shown, the device 40 includes at least one processor 401, at least one memory 402 and a bus 403 connected to the processor 401; the processor 401 and the memory 402 communicate with each other through the bus 403; the processor 401 is used to call the program instructions in the memory 402 to execute the above-mentioned file tracing method. The device in this article can be a server, PC, PAD, mobile phone, etc.
[0094] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that initializes the following method steps: real-time monitoring of the network traffic of a designated enterprise; performing session restoration on the network traffic to obtain files corresponding to the network traffic and attribute information corresponding to the files; constructing a file flow relationship and a file change relationship of the files based on the files and the attribute information corresponding to the files, wherein the file flow relationship is used to characterize the flow process corresponding to the files, and the file change relationship is used to characterize the tampering process of the files; and determining the file traceability trajectory corresponding to the designated enterprise based on the file flow relationship and the file change relationship of all files.
[0095] The attribute information of the file includes file transfer information and file identification information; a file flow relationship and a file change relationship of the file are constructed according to the file and the attribute information corresponding to the file, including: judging whether the file matches the stored files contained in the preset file library according to the file identification information, wherein the preset file library is used to represent a file library storing different files and all association relationships corresponding to the different files; if not, determining that the file is a newly created file, and constructing the file flow relationship of the file based on the file transfer information, and adding the file flow relationship between the file and the file to the preset file library; if so, determining that the file is an already created file, and using the file transfer information to update the file flow relationship of the stored file matching the file, and deleting the file.
[0096] After determining that the file is a newly created file, building a file flow relationship of the file based on the file transfer information, and adding the file and the file flow relationship of the file to the preset file library, the method also includes: calculating the content similarity between the file and each of the stored files included in the preset file library to obtain a calculation result corresponding to the file and each of the stored files included in the preset file library; determining similar files of the file and the plagiarism relationship between the file and the similar files among all the stored files included in the preset file library based on the calculation result; and adding the plagiarism relationship as the file change relationship of the file to the preset file library.
[0097] The calculation result includes a first result item and a second result item, wherein the second result item is calculated relative to the stored file included in the preset file library, and the second result item is calculated relative to the file relative to the stored file included in the preset file library.
[0098] Determining similar files of the file and the plagiarism relationship between the file and the similar files based on the calculation result among all the stored files included in the preset file library includes: judging whether the first result item and / or the second result item in the calculation results of the file and each of the stored files included in the preset file library exceeds a specified threshold; if so, taking the stored files corresponding to the calculation results of the first result item and / or the second result item exceeding the specified threshold as similar files of the file; and determining the plagiarism relationship between the file and the similar files based on the size relationship between the two first result items and the second result items in the calculation results of the file and the similar files.
[0099] Based on the file flow relationship and the file change relationship of all files, the file traceability trajectory corresponding to the designated enterprise is drawn, including: based on the file flow relationship and the file change relationship of all files, the file traceability image of all files is drawn; the attribute information corresponding to all files is added as a traceability mark to the file traceability image to obtain the file traceability trajectory corresponding to the designated enterprise.
[0100] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0101] In a typical configuration, the device includes one or more processors (CPU), memory and bus. The device may also include input / output interface, network interface and the like.
[0102] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip. The memory is an example of a computer-readable medium.
[0103] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0104] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0105] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0106] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A file tracing method, characterized in that: The method comprises: Real-time monitoring of network traffic of designated enterprises; Performing session restoration on the network traffic to obtain files corresponding to the network traffic and attribute information corresponding to the files; Constructing a file transfer relationship and a file change relationship of the file according to the file and the attribute information corresponding to the file, wherein the file transfer relationship is used to characterize the transfer process corresponding to the file, and the file change relationship is used to characterize the tampering process of the file; The file traceability track corresponding to the designated enterprise is determined based on the file flow relationship and the file change relationship of all files.
2. The method according to claim 1, characterized in that: The attribute information of the file includes file transfer information and file identification information; and constructing a file transfer relationship and a file change relationship of the file according to the file and the attribute information corresponding to the file, including: Determining whether the file matches a stored file contained in a preset file library according to the file identification information, wherein the preset file library is used to represent a file library storing different files and all association relationships corresponding to the different files; If not, determining that the file is a newly created file, building a file transfer relationship of the file based on the file transfer information, and adding the file and the file transfer relationship of the file to the preset file library; If so, it is determined that the file is a created file, and the file transfer relationship of the stored file matching the file is updated using the file transfer information, and the file is deleted.
3. The method according to claim 2, characterized in that After determining that the file is a newly created file, building a file transfer relationship of the file based on the file transfer information, and adding the file and the file transfer relationship of the file to the preset file library, the method further includes: Calculating the content similarity between the file and each of the stored files included in the preset file library to obtain a calculation result corresponding to the file and each of the stored files included in the preset file library; Determine similar files of the file and the plagiarism relationship between the file and the similar files in all the stored files included in the preset file library based on the calculation result; The plagiarism relationship is added to the preset file library as a file change relationship of the file.
4. The method according to claim 3, characterized in that The calculation result includes a first result item and a second result item, wherein the second result item is calculated relative to the stored files included in the preset file library, and the second result item is calculated relative to the file relative to the stored files included in the preset file library.
5. The method according to claim 4, characterized in that Determining similar files of the file and the plagiarism relationship between the file and the similar files among all the stored files included in the preset file library based on the calculation result includes: Determine whether the first result item and / or the second result item in the calculation results of the file and each of the stored files included in the preset file library exceeds a specified threshold; If yes, taking the stored files corresponding to the calculation results of the first result item and / or the second result item exceeding the specified threshold as similar files of the file; The plagiarism relationship between the file and the similar file is determined based on the size relationship between the first result item and the second result item in the calculation results of the file and the similar file.
6. The method according to claim 1, characterized in that Drawing a file traceability track corresponding to the designated enterprise based on the file flow relationship and the file change relationship of all files includes: Drawing a file traceability image of all files based on the file flow relationship and the file change relationship of all files; The attribute information corresponding to all files is added to the file traceability image as a traceability mark to obtain the file traceability track corresponding to the designated enterprise.
7. A file tracing device, characterized in that: The device comprises: A monitoring unit, used to monitor the network traffic of a designated enterprise in real time; A processing unit, configured to perform session restoration on the network traffic obtained by the monitoring unit to obtain a file corresponding to the network traffic and attribute information corresponding to the file; a construction unit, configured to construct a file flow relationship and a file change relationship of the file according to the file obtained by the processing unit and the attribute information corresponding to the file, wherein the file flow relationship is used to characterize the flow process corresponding to the file, and the file change relationship is used to characterize the tampering process of the file; A determination unit is used to determine the file traceability track corresponding to the designated enterprise based on the file flow relationship and the file change relationship of all files obtained by the construction unit.
8. The device according to claim 7, characterized in that The construction unit comprises: A judgment module, used for judging whether the file matches a stored file contained in a preset file library according to the file identification information, wherein the preset file library is used to represent a file library storing different files and all association relationships corresponding to the different files; A first processing module, configured to determine that the file is a newly created file if the file in the judgment module does not match the stored files in the preset file library, and to construct a file transfer relationship of the file based on the file transfer information, and to add the file and the file transfer relationship of the file to the preset file library; The second processing module is used to determine that the file is a created file if the file determined by the judgment module matches the stored file contained in the preset file library, and to update the file flow relationship of the stored file matching the file using the file transmission information, and to delete the file.
9. A storage medium, characterized in that: The storage medium includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the file tracing method according to any one of claims 1 to 6.
10. An electronic device, comprising at least one processor, and at least one memory and bus connected to the processor; wherein: The processor and the memory communicate with each other via the bus; The processor is used to call the program instructions in the memory to execute the file tracing method according to any one of claims 1 to 6.
Citation Information
Cited By
File circulation tracing method and device, equipment and storage medium
CN120896769A
