Data security processing method and device

By generating temporary files and encrypting data during the MTP protocol transmission, monitoring sensitive information and calling security policies, the problem of sensitive information leakage in MTP protocol transmission is solved, and the security of data files is improved.

CN115514757BActive Publication Date: 2024-11-22北京天空卫士网络安全技术有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211213602.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-30
Publication Date
2024-11-22
Estimated Expiration
2042-09-30

AI Technical Summary

Technical Problem

The MTP protocol has a risk of data leakage when transmitting data between terminal devices, especially the security of sensitive information is low.

Method used

By generating temporary files and encrypting data during transmission, monitoring and analyzing whether the transmitted data contains sensitive information, calling preset security processing policies to block or encrypt transmission, preventing sensitive information leakage.

Benefits of technology

It effectively improves the security of data files, prevents sensitive information from being leaked during the MTP protocol transmission, and enhances the security of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115514757B_ABST
    Figure CN115514757B_ABST
Patent Text Reader

Abstract

The present invention discloses a data security processing method and device, and relates to the field of computer technology. A specific implementation of the method includes: upon monitoring that a first terminal device transmits a data file stored in the first terminal device to a second terminal device via an MTP protocol, generating a temporary file corresponding to the data file, and writing the data included in the data file into the temporary file; performing sensitive information analysis on the data written into the temporary file; and when the analysis result indicates that the temporary file contains sensitive information, calling a preset security processing strategy, performing security processing on the temporary file and the first cache data corresponding to the data file written into the memory, so as to prevent leakage of sensitive information contained in the temporary file. This implementation can effectively improve the security of data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a data security processing method and device. Background Art

[0002] The transmission of data between terminal devices through the MTP protocol (Media Transfer Protocol) is one of the causes of data leakage. For example, a user uses a mobile terminal with the MTP protocol to connect to a terminal device within the company, and transfers relatively private data files on the terminal device within the company to the mobile terminal through the MTP protocol, resulting in low security of private data files. Summary of the invention

[0003] In view of this, an embodiment of the present invention provides a data security processing method and device to control the transmission process of a data file containing sensitive information through the MTP protocol, so as to effectively improve the security of the data file.

[0004] To achieve the above object, according to one aspect of an embodiment of the present invention, a data security processing method is provided, comprising:

[0005] Upon monitoring that the first terminal device transmits its stored data file to the second terminal device through the MTP protocol, a temporary file corresponding to the data file is generated, and data included in the data file is written into the temporary file, wherein the operation of the first terminal device transmitting its stored data file to the second terminal device through the MTP protocol includes the first terminal device generating first cache data for the stored data file, writing the first cache data into its memory, and encrypting and transmitting the first cache data written into the memory to the second terminal device through the MTP protocol;

[0006] Performing sensitive information analysis on the data written to the temporary file;

[0007] When the analysis result indicates that the temporary file contains sensitive information, a preset security processing policy is called to perform security processing on the temporary file and the first cache data to prevent leakage of sensitive information contained in the data file.

[0008] Optionally, the above data security processing method further includes:

[0009] Obtaining a transmission data interface (IPortableDeviceDataStream interface) provided by the windows operating system of the first terminal device, including a write function (write function) for writing the first cache data into a memory and a status function (commit function) for indicating that writing of the first cache data has ended;

[0010] Modify or replace the write function and the commit function;

[0011] By means of the modified or replaced write function, the step of writing the data included in the data file into the temporary file and the step of writing the first cached data into its memory are synchronously executed;

[0012] Based on the modified or replaced commit function, a step of securely processing the temporary file and the first cache data is executed.

[0013] Optionally, the IPortableDeviceDataStream interface, the write function and the commit function are obtained by monitoring the COM library to obtain the Content function of the IPortableDevice interface during the data transmission process of the Windows operating system through the MTP protocol, and further based on the Content function, the IPortableDeviceContent interface is obtained by monitoring the CreateObjectWithPropertiesAndData function of the IPortableDeviceContent interface.

[0014] Optionally, the above data security processing method further includes:

[0015] Get the call status of CreateObjectWithPropertiesAndData function of IPortableDeviceContent interface of Windows running system in real time;

[0016] When the calling condition indicates that the CreateObjectWithPropertiesAndData function call is successful, the step of generating a temporary file corresponding to the data file is performed.

[0017] Optionally, the data security processing method also includes: in response to the windows running system of the first terminal device calling a modified or replaced commit function, synchronously ending the step of writing the data included in the data file into the temporary file and the step of writing the first cached data into its memory to determine that the writing of the temporary file is completed.

[0018] Optionally, the step of writing the data included in the data file into a temporary file and the step of performing sensitive information analysis on the data written into the temporary file are performed simultaneously.

[0019] Optionally, generating a temporary file corresponding to the data file includes: obtaining a source file name of the data file by calling a parameter WPD_OBJECT_ORIGINAL_FILE_NAME of an interface function GetStringValue;

[0020] A temporary file corresponding to the data file is generated based on the source file name.

[0021] Optionally,

[0022] The security processing strategy includes a first processing identifier indicating calling a first security processing program for interrupting transmission or a second processing identifier indicating calling a second security processing program for encrypting the temporary file.

[0023] The secure processing of the temporary file includes:

[0024] When the security processing policy includes a first processing identifier, blocking the transmission of the first cache data in the memory by the first security processing program;

[0025] Or when the security processing strategy includes a second processing identifier, the transmission of the first cache data in the memory is blocked by the second security processing program, the temporary file is encrypted, and second cache data is generated for the encrypted temporary file, and the second cache data is transmitted to the second terminal device.

[0026] Optionally, blocking the transmission of the temporary file by using the first security processing program includes: blocking the windows operating system of the first terminal device from calling an original commit function of the windows operating system by using the first security processing program.

[0027] Optionally, the data security processing method further includes: receiving a security processing policy sent by a server, and configuring the security processing policy for the first terminal device.

[0028] In a second aspect, an embodiment of the present invention provides a data security processing device, comprising: a file generation and analysis unit and a security processing unit, wherein:

[0029] The file generation and analysis unit is used to generate a temporary file corresponding to the data file, write the data included in the data file into the temporary file, and perform sensitive information analysis on the data written into the temporary file when monitoring the operation of the first terminal device transmitting the stored data file to the second terminal device through the MTP protocol, wherein the operation of the first terminal device transmitting the stored data file to the second terminal device through the MTP protocol includes the first terminal device generating first cache data for the stored data file, writing the first cache data into its memory, and encrypting and transmitting the first cache data written into the memory to the second terminal device through the MTP protocol;

[0030] The security processing unit is used to call a preset security processing policy to perform security processing on the temporary file and the first cache data to prevent leakage of sensitive information contained in the data file when the analysis result of the file generation and analysis unit indicates that the temporary file contains sensitive information.

[0031] An embodiment of the above invention has the following advantages or beneficial effects: for the operation of the first terminal device transmitting its stored data file to the second terminal device through the MTP protocol, including the first terminal device generating first cache data for the stored data file, writing the first cache data into its memory, and encrypting and transmitting the first cache data written into the memory to the second terminal device through the MTP protocol, the technical solution provided by the present application generates a temporary file corresponding to the data file when monitoring the operation of the first terminal device transmitting its stored data file to the second terminal device through the MTP protocol, and writes the data included in the data file into the temporary file, and then analyzes the data written into the temporary file for sensitive information to realize sensitive information monitoring of the temporary file, and when the analysis result indicates that the temporary file contains sensitive information, calls the preset security processing strategy, and performs security processing on the temporary file and the first cache data to prevent the leakage of sensitive information contained in the data file. Thus, the data containing sensitive information to be transmitted to the second terminal device is processed for security, and the transmission process of the data file containing sensitive information through the MTP protocol is controlled to effectively improve the security of the data file on the first terminal device.

[0032] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.

[0034] Figure 1 is a schematic diagram of a working process of an operating system of a first terminal device discovered by monitoring the information transmission process of the MTP protocol according to the present invention;

[0035] Figure 2 is a schematic diagram of a system architecture on which an application scenario according to an embodiment of the present invention depends;

[0036] Figure 3 is a schematic diagram of the main process of a data security processing method according to an embodiment of the present invention;

[0037] Figure 4 is a schematic diagram of the main process of another data security processing method according to an embodiment of the present invention;

[0038] Figure 5 is a schematic diagram of a main process of generating a temporary file corresponding to a data file according to an embodiment of the present invention;

[0039] Figure 6 is a schematic diagram of the main process of another data security processing method according to an embodiment of the present invention;

[0040] Figure 7 is a schematic diagram of main units of a data security processing device according to an embodiment of the present invention;

[0041] Figure 8 is a schematic diagram of main devices of a data security processing system according to an embodiment of the present invention;

[0042] Fig. 9 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0043] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0044] There are two main stages for transmitting data files through the MTP protocol. The first stage mainly includes: the process of connecting a terminal device with a Windows operating system (the terminal device with a Windows operating system is the first terminal device) to a mobile terminal through a data line; the second stage mainly includes: the terminal device with a Windows operating system transmits the cache data corresponding to the data file in the memory to the mobile terminal connected through the data line through the MTP protocol. For the above two stages, the Windows operating system is monitored, and the flow from the data file to the cache data and the cache data to the mobile terminal is tracked to determine the working mode or workflow of the Windows operating system during the data file transmission process through the MTP protocol.

[0045] By monitoring the Windows operating system in the above two stages and tracking the flow from data files to cache data and from cache data to mobile terminals, it is found that during the data file transmission via the MTP protocol, the workflow of the Windows operating system can be as follows: Figure 1 shown.

[0046] like Figure 1As shown, after the computer device equipped with the Windows operating system is connected to the mobile phone supporting the MTP protocol through a data cable, the Open() function of the access device interface (IPortableDevice interface) is called (to open the specified mobile device). When the user drags the local file of the computer device equipped with the Windows operating system to the mobile device, the Windows operating system calls the Content() function of the IPortableDevice interface (the interface that returns the object) and obtains the IPortableDeviceContent interface (the interface for operating the device content). Further, the IPortableDeviceContent interface calls the CreateObjectWithPropertiesAndData() function (to create a stream object containing the file data to be transmitted). The CreateObjectWith-PropertiesAndData() function obtains the IStream interface (the interface for operating the stream object). The QueryInterface() function (interface query function) is called through the IStream interface, and then the IPortableDeviceDataStream interface (the interface for transmitting device data) is obtained. Further, the IPortableDeviceDataStream interface generates the first cache data from the file content on the computer device to the computer device memory through the Write() and Commit() functions, and submits the first cache data to the mobile device. The process of transmitting the first cache data through the MTP protocol is encrypted through the MTP protocol, and forms a data file on the mobile device that can be recognized by the mobile device.

[0047] Based on the MTP protocol data transmission process for Windows operating system obtained by this application, the embodiment of the present invention provides a data security processing method and device. Among them, the application scenarios relied on by the data security processing method and device can be as follows: Figure 2 shown.

[0048] Figure 2 The system architecture 200 on which the application scenarios to which the following embodiments of the present invention can be applied is exemplarily shown.

[0049] like Figure 2As shown, the system architecture 200 may include terminal devices 201, 202, 203, mobile terminals 204, 205 connected to the terminal devices 201, 202, 203 via data lines, a network 206, and a server 207. The network 206 is used to provide a medium for a communication link between the terminal devices 201, 202, 203 and the server 207. The network 206 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.

[0050] The terminal devices 201, 202, 203 interact with the server 205 through the network 206, so that the server 205 sends the security processing policy to the terminal devices 201, 202, 203, and enables the terminal devices 201, 202, 203 managed by the server 205 to perform security processing on the data to be transmitted through the MTP protocol based on the security processing policy. Office software and various communication client applications, such as web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only for example) can be installed on the terminal devices 201, 202, 203.

[0051] The terminal devices 201, 202, 203 may be various electronic devices installed with Windows operating system, having a display screen and supporting web browsing, including but not limited to laptop computers and desktop computers.

[0052] The mobile terminals 204 and 205 may be various electronic devices running systems such as Android that support the MTP protocol, having a display screen and supporting web browsing, including but not limited to mobile phones, tablet computers, and the like.

[0053] The server 207 may be a server that provides various services, such as a background management server that provides targeted security processing strategies for the terminal devices 201, 202, and 203 and provides support for the security processing strategies (for example only). The terminal devices 201, 202, and 203 may perform security processing on temporary files corresponding to data files transmitted by the terminal devices 201, 202, and 203 through the MTP protocol and the first cache data corresponding to the data files in the memory of the terminal devices 201, 202, and 203 according to the security processing strategies issued by the server 207, so as to prevent the leakage of sensitive information contained in the data files.

[0054] It should be noted that the data security processing method provided in the embodiment of the present invention is generally executed by the terminal devices 201, 202, and 203. Accordingly, the data security processing apparatuses are respectively arranged in the terminal devices 201, 202, and 203.

[0055] It should be understood that Figure 2The number of terminal devices, mobile devices, networks and server printing devices in the embodiment is only illustrative. According to the implementation requirements, there can be any number of terminal devices, mobile devices, networks and servers.

[0056] Figure 3 FIG. 1 is a schematic diagram of the main flow of a data security processing method according to an embodiment of the present invention. Figure 3 As shown, the data security processing method may include the following steps:

[0057] Step S301: upon monitoring that the first terminal device transmits its stored data file to the second terminal device through the MTP protocol, a temporary file corresponding to the data file is generated, and data included in the data file is written into the temporary file, wherein the process of the first terminal device transmitting its stored data file to the second terminal device through the MTP protocol includes the first terminal device generating first cache data for the stored data file, writing the first cache data into its memory, and transmitting the first cache data written into the memory to the second terminal device through the MTP protocol;

[0058] The first terminal device refers to a device equipped with a Windows operating system.

[0059] Among them, transmitting the stored data file to the second terminal device through the MTP protocol means encrypting and transmitting the cache data corresponding to the data file cached in it to the second terminal device through the MTP protocol, and forming a data file on the second terminal device that can be recognized by the second terminal device.

[0060] Among them, the operation of the first terminal device transmitting its stored data files to the second terminal device through the MTP protocol, in addition to the above-mentioned process of the first terminal device transmitting its stored data files to the second terminal device through the MTP protocol, including the first terminal device generating first cache data for the stored data files, and writing the first cache data into its memory, and transmitting the first cache data written in the memory to the second terminal device through the MTP protocol, may also include the second terminal device being connected to the first terminal device through a data cable, the user dragging the data file from the first terminal device to the second terminal device or copying the data file on the first terminal device and pasting it on the second terminal device, etc. Correspondingly, in this step, the operation of monitoring the first terminal device to transfer its stored data files to the second terminal device through the MTP protocol may be monitoring the second terminal device to be connected to the first terminal device through a data cable, i.e., determining that the first terminal device is monitoring the operation of transferring its stored data files to the second terminal device through the MTP protocol; or it may be monitoring the call of the CreateObjectWith-PropertiesAndData function of the IPortableDeviceContent interface of the Windows running system, i.e., determining that the first terminal device is monitoring the operation of transferring its stored data files to the second terminal device through the MTP protocol; or it may be monitoring the operation of dragging the data file from the first terminal device to the second terminal device, etc.

[0061] The data file generally refers to various types of files stored on the first terminal device. For example, the data file may be a word file, a TXT file, an Excel file, or other office files.

[0062] The MTP protocol (Media Transfer Protocol) is an extension of the PTP (Picture Transfer Protocol) protocol, and is mainly used to encrypt cached data in the transmission memory corresponding to the data file to be transmitted, and transmit the cached data through the MTP protocol.

[0063] It is worth noting that in this step, the Windows operating system of the first terminal device will also synchronously execute its original steps of generating the first cache data and storing the first cache data in the memory, so that the Windows operating system is not affected. In this step, writing the data included in the data file into the temporary file and the first terminal device writing the first cache data into its memory are generally performed synchronously, that is, the generated first cache data is synchronously written into the temporary file while writing into the memory. This ensures the consistency of the data written into the temporary file and the first cache data written into the memory of the first terminal device.

[0064] Step S302: Analyze the data written to the temporary file for sensitive information; if the analysis result indicates that the temporary file contains sensitive information, execute step S303; if the analysis result indicates that the temporary file does not contain sensitive information, execute step S304;

[0065] Among them, sensitive information generally refers to user-defined information that has the potential to leak corporate secrets.

[0066] The sensitive information analysis of the data written to the temporary file can be performed through existing sensitive information analysis technologies such as sensitive information black and white lists, analysis models trained based on samples containing sensitive information, etc., which will not be elaborated here.

[0067] Step S303: calling a preset security processing policy to perform security processing on the temporary file and the first cache data to prevent leakage of sensitive information contained in the data file, and ending the current process;

[0068] By performing sensitive information analysis on the data included in the constructed temporary file, the invasive modification of the original MTP protocol transmission process of the Windows operating system can be reduced, and the difficulty and complexity of performing sensitive information analysis on the data files to be transmitted can be effectively reduced.

[0069] Step S304: Transmit the first cache data to the second terminal device according to the MTP encryption protocol.

[0070] This step S304 is implemented by the transmission process of the original MTP protocol of the Windows operating system. Therefore, the present invention provides a data security processing method that retains the transmission process of the original MTP protocol of the Windows operating system, which can be compatible with the Windows operating system to ensure that the terminal device can operate normally. In addition, the data security processing method can also be made concealed and not easy to be discovered and attacked, so as to effectively improve the security of the data security processing process.

[0071] The step of writing the data included in the data file into the temporary file and the step of performing sensitive information analysis on the data written into the temporary file can be performed simultaneously, or after the step of writing the data included in the data file into the temporary file is completed, the modified or replaced commit function can be called to perform sensitive information analysis on the data written into the temporary file. By performing the steps of writing the data included in the data file into the temporary file, writing the first cache data into the memory of the first terminal device, and performing sensitive information analysis on the data written into the temporary file simultaneously, the efficiency of data security processing can be guaranteed.

[0072] The specific implementation of generating a temporary file corresponding to a data file may include: obtaining the source file name of the data file by calling the parameter WPD_OBJECT_ORIGINAL_FILE_NAME of the interface function GetStringValue; generating a temporary file corresponding to the data file based on the source file name. That is, the temporary file is named by the source file name of the data file, so that the monitored transmitted data files can be managed and queried through the temporary file, and the information of the temporary file recorded in the log can be traced.

[0073] exist Figure 3 In the illustrated embodiment, the process of transmitting a stored data file of a first terminal device to a second terminal device through the MTP protocol includes the first terminal device generating first cache data for the stored data file, writing the first cache data into its memory, and transmitting the first cache data written into the memory to the second terminal device through the MTP protocol. The technical solution provided by the present application generates a temporary file corresponding to the data file upon monitoring that the first terminal device transmits a stored data file to the second terminal device through the MTP protocol, writes the data included in the data file into the temporary file, and then performs sensitive information analysis on the data written into the temporary file to realize sensitive information monitoring of the temporary file, and when the subsequent analysis results indicate that the temporary file contains sensitive information, calls a preset configured security processing strategy, performs security processing on the temporary file and the first cache data, performs security processing on the data containing sensitive information to be transmitted to the second terminal device, and controls the transmission process of the data file containing sensitive information through the MTP protocol to effectively improve the security of the data file on the first terminal device.

[0074] In the embodiment of the present invention, Figure 4 As shown, the above data security processing method may further include the following steps:

[0075] Step S401: obtaining a write function (write function) for writing first cache data into a memory and a status function (commit function) for indicating completion of writing of the first cache data, included in a transmission data interface (IPortableDeviceDataStream interface) provided by a windows operating system of a first terminal device;

[0076] Step S402: modify or replace the write function and the commit function;

[0077] By modifying or replacing the write function and the commit function, on the one hand, the Windows operating system can maintain its operation on the data file transmission process through the MTP protocol; on the other hand, the data included in the monitored data file (i.e., the data file transmitted through the MTP protocol) can be written into a temporary file, so as to determine whether the data file contains sensitive information by performing sensitive information analysis on the temporary file, thereby realizing the monitoring and security management of the data files transmitted through the MTP protocol.

[0078] It is worth noting that the modification or replacement of the write function and the commit function may be to directly modify or replace the original write function and the commit function of the Windows operating system, while retaining the original functions of the write function and the commit function and giving them new functions.

[0079] Step S403: by means of the modified or replaced write function, the step of writing the data included in the data file into the temporary file and the step of writing the first cache data into the memory are synchronously executed;

[0080] Step S404: Based on the modified or replaced commit function, a step of performing security processing on the temporary file and the first cache data.

[0081] By modifying or replacing the write function and the commit function as described above, the Windows operating system can process data files according to its own MTP protocol transmission processing process, making the data security processing process relatively safe, and the user is unaware of the data security processing process, which will not affect the user's use of the Windows operating system.

[0082] Among them, the IPortableDeviceDataStream interface, write function and commit function are obtained by monitoring the COM library to obtain the Content function of the IPortableDevice interface during data transmission through the MTP protocol in the Windows running system, and further based on the Content function, the IPortableDeviceContent interface is obtained by monitoring the CreateObjectWithPropertiesAndData function of the IPortableDeviceContent interface.

[0083] In the embodiment of the present invention, Figure 5 As shown, the above data security processing method may further include the following steps:

[0084] Step S501: obtaining in real time the calling status of the CreateObjectWithPropertiesAndData function of the IPortableDeviceContent interface of the Windows operating system;

[0085] Step S502: When the calling condition indicates that the CreateObjectWithPropertiesAndData function call is successful, a step of generating a temporary file corresponding to the data file is executed.

[0086] Through the above process, a temporary file can be generated in time when the data file is transmitted through the MTP protocol. In addition, when the Windows operating system transfers the first cache data of the data file to the memory of the computer device, the data in the data file can be written into the temporary file, thereby ensuring the integrity of the data stored in the temporary file.

[0087] In an embodiment of the present invention, the data security processing method may further include: in response to the windows running system of the first terminal device calling the modified or replaced commit function, synchronously ending the step of writing the data included in the data file into the temporary file and the step of writing the first cache data into its memory, so as to determine that the writing of the temporary file is completed. This realizes the process of controlling the writing of the temporary file and the first cache data into the memory, and avoids continuous writing of data.

[0088] In an embodiment of the present invention, the security processing strategy may include a first processing identifier indicating interruption of transmission or a second processing identifier indicating encryption processing. Accordingly, the specific implementation method of the above-mentioned security processing of temporary files may include: when the security processing strategy includes the first processing identifier, blocking the transmission of the first cache data in the memory to the second terminal device; or when the security processing strategy includes the second processing identifier, blocking the transmission of the first cache data in the memory to the second terminal device, encrypting the temporary file, generating second cache data for the encrypted temporary file, and transmitting the second cache data to the second terminal device. The specific implementation of blocking the transmission of temporary files may be to call a modified or replaced commit function, and call the first security processing program through the modified or replaced commit function to block the transmission of the first data stream in the memory. More specifically, the first security processing program may be implemented by preventing the windows operating system from executing the original commit function. In addition, the specific implementation of blocking the transmission of the first cache data in the memory to the second terminal device, encrypting the temporary file, generating the second cache data for the encrypted temporary file, and transmitting the second cache data to the second terminal device can be calling the modified or replaced commit function, and calling the second security processing program through the modified or replaced commit function to block the transmission of the first cache data in the memory to the second terminal device, encrypting the temporary file, generating the second cache data for the encrypted temporary file (wherein the encrypted temporary file is an encrypted file), and transmitting the second cache data to the second terminal device, wherein the second security processing program can also block the transmission of the first cache data in the memory to the second terminal device by preventing the Windows operating system from executing the original commit function. It is worth noting that the security processing strategy can allocate different security processing strategies to different computer devices according to user needs or user permissions, so as to realize differentiated security processing of temporary files according to user needs or user permissions, and meet the needs of enterprises for opening different transmission permissions of data files for users of different job levels.

[0089] In an embodiment of the present invention, the specific implementation of blocking the transmission of the first cache data in the memory may include: blocking the windows operating system of the first terminal device from calling the original commit function of the windows operating system. The blocking of calling the original commit function of the windows operating system has been described above and will not be repeated here. By blocking the calling of the original commit function of the windows operating system, the blocking process is simple, easy to operate and implement.

[0090] In an embodiment of the present invention, the above-mentioned data security processing method may further include: receiving a security processing policy sent by the service end, and configuring the security processing policy for the first terminal device.

[0091] The following example uses a mobile device A (hereinafter referred to as device A) that supports the MTP protocol to be connected to a desktop computer device B (hereinafter referred to as device B) running a Windows system via a data cable, and a user transfers one or more data files on device B to device A via the MTP protocol. The following describes in detail the process of device B processing the operation of the user transferring one or more data files on it to device A and the data security processing process provided by this application. Figure 6 As shown, the processing of the data file transmitted by the MTP protocol by the device B of the Windows operating system may include the following steps:

[0092] Step S600: in response to receiving a data packet installation trigger operation, obtaining a write function for writing the first cache data into the memory and a commit function for indicating that the writing of the first cache data is finished, included in the IPortableDeviceDataStream interface provided by the Windows operating system of device B;

[0093] Step S601: modify or replace the write function and the commit function;

[0094] Step S602: The administrator distributes a security processing policy to device B through the server;

[0095] The security processing strategy may be a first processing identifier indicating prohibition of transmission, or a second processing identifier for performing encryption processing.

[0096] Among them, the above steps S600 to S602 can be completed in advance. Through the above steps S600 to S602, the data security processing device is run on device B, so as to implement the following steps through the above-installed running data security processing device to manage the data files transmitted by the MTP protocol on device B.

[0097] Step S603: upon receiving the connection trigger from device A, device B calls the Open function of the device access interface (IPortableDevice interface) through the Windows operating system to open the specified device A;

[0098] Step S604: In response to the user dragging the local data file of device B to device A, the Windows operating system calls the Content function of the IPortableDevice interface to obtain an interface for operating device content (IPortableDeviceContent interface);

[0099] Step S605: Device B further calls a function (CreateObjectWithPropertiesAndData function) for creating a stream object containing the file data to be transmitted through the IPortableDeviceContent interface;

[0100] Step S606: Acquire the calling status of the CreateObjectWithPropertiesAndData function included in the data transmission interface (IPortableDeviceDataStream interface) in real time;

[0101] Step S607: when the calling condition indicates that the CreateObjectWithPropertiesAndData function call is successful, a temporary file corresponding to the data file is generated;

[0102] Step S608: Obtain the interface (IStream interface) for operating the stream object through the CreateObjectWithPropertiesAndData function, call the interface query function (QueryInterface function) through the IStream interface, and then obtain the transmission device data interface (IPortableDeviceDataStream interface);

[0103] Step S609: synchronously writing the data included in the data file into the temporary file and writing the first cache data corresponding to the data file into the memory of device B through the modified or replaced write function under the IPortableDeviceDataStream interface;

[0104] This step S609 is used to synchronize the first cache data content in the memory of device B to a temporary file, so as to perform sensitive data analysis on the temporary file content submitted to device B later.

[0105] This step is achieved by running the system to call the modified or replaced write function multiple times.

[0106] Step S610: Analyze the sensitive information of the data written into the temporary file;

[0107] Among them, sensitive information analysis can be implemented using existing sensitive information analysis technology, which will not be elaborated here.

[0108] In addition, the above-mentioned process of writing the data included in the data file into a temporary file can be executed synchronously with the process of performing sensitive information analysis on the data written to the temporary file, or it can be performed by calling the modified or replaced commit function after the data of the data file is completely written into the temporary file to perform sensitive information analysis on the data written to the temporary file.

[0109] Step S611: when the windows running system of device B calls the modified or replaced commit function, the data included in the data file is finished being written into the temporary file; if the analysis result indicates that the temporary file contains sensitive information, step S612 is executed; if the analysis result indicates that the temporary file does not contain sensitive information, step S613 is executed;

[0110] Step S612: calling a preset security processing policy to perform security processing on the temporary file and the first cache data to prevent leakage of sensitive information contained in the temporary file, and ending the current process;

[0111] The security processing strategy includes a first processing identifier indicating a call interruption transmission or a second processing identifier indicating encryption processing.

[0112] In the case where the security processing policy includes the first processing identifier, step S612 may be performed by calling a modified or replaced commit function, where the modified or replaced commit function calls the first security processing program to block the Windows operating system of device B from calling the original commit function, thereby blocking the transmission of the first cache data;

[0113] In the case where the security processing policy includes a second processing identifier, step S612 can be performed by calling a modified or replaced commit function, which calls a second security processing program to encrypt the temporary file, and generates second cache data for the encrypted temporary file (wherein the encrypted temporary file is an encrypted file), and transmits the second cache data to device A.

[0114] Step S613: The Windows operating system calls the original commit function in the modified or replaced commit function to transfer the first cache data to device A.

[0115] The original commit function refers to the commit function carried by the Windows operating system itself.

[0116] like Figure 7 As shown, an embodiment of the present invention provides a data security processing device 700, which may include: a file generation and analysis unit 701 and a security processing unit 702, wherein:

[0117] The file generation and analysis unit 701 is used to generate a temporary file corresponding to the data file, write the data included in the data file into the temporary file, and perform sensitive information analysis on the data written into the temporary file when monitoring the operation that the first terminal device transmits the stored data file to the second terminal device through the MTP protocol, wherein the process that the first terminal device transmits the stored data file to the second terminal device through the MTP protocol includes the first terminal device generating first cache data for the stored data file, writing the first cache data into its memory, and transmitting the first cache data written into the memory to the second terminal device through the MTP protocol;

[0118] The security processing unit 702 is used to call a preset security processing policy to perform security processing on the temporary file and the first cache data to prevent leakage of sensitive information contained in the data file when the analysis result of the file generation and analysis unit 701 indicates that the temporary file contains sensitive information.

[0119] In the embodiment of the present invention, the data security processing device 700 may further include: a function modification unit 703, wherein:

[0120] The function modification unit 703 is used to obtain a write function (write function) for writing the first cache data into the memory and a status function (commit function) for indicating that the writing of the first cache data is finished, which are included in the transmission data interface (IPortableDeviceDataStream interface) provided by the windows operating system of the first terminal device; modify or replace the write function and the commit function;

[0121] The file generation and analysis unit 701 is further used to synchronously execute the steps of writing the data included in the data file into the temporary file and writing the first cache data into its memory through the modified or replaced write function;

[0122] The security processing unit 702 is further used to execute the step of performing security processing on the temporary file and the first cache data based on the modified or replaced commit function.

[0123] Among them, the IPortableDeviceDataStream interface, write function and commit function are obtained by monitoring the COM library to obtain the Content function of the IPortableDevice interface during data transmission through the MTP protocol in the Windows running system, and further based on the Content function, the IPortableDeviceContent interface is obtained by monitoring the CreateObjectWithPropertiesAndData function of the IPortableDeviceContent interface.

[0124] In the embodiment of the present invention, the file generation and analysis unit 701 is further used to obtain in real time the calling status of the CreateObject-WithPropertiesAndData function of the IPortableDeviceContent interface of the Windows operating system; when the calling status indicates that the CreateObjectWithPropertiesAndData function is successfully called, the step of generating a temporary file corresponding to the data file is executed.

[0125] In the embodiment of the present invention, the file generation and analysis unit 701 is further used to obtain the source file name of the data file by calling the parameter WPD_OBJECT_ORIGINAL_FILE_NAME of the interface function GetStringValue; and generate a temporary file corresponding to the data file based on the source file name.

[0126] In an embodiment of the present invention, the file generation and analysis unit 701 is further used to synchronously end the step of writing the data included in the data file into a temporary file and the step of writing the first cache data into its memory in response to the windows running system calling a modified or replaced commit function of the first terminal device, so as to determine that the writing of the temporary file is completed.

[0127] In the embodiment of the present invention, the file generation and analysis unit 701 synchronously executes the steps of writing the data included in the data file into the temporary file and performing sensitive information analysis on the data written into the temporary file.

[0128] In an embodiment of the present invention, the security processing strategy includes a first processing identifier indicating a call to interrupt transmission or a second processing identifier indicating encryption processing. Accordingly, the security processing unit 702 is further used to transmit the first cache data in the memory of the first security processing program when the security processing strategy includes the first processing identifier; or to block the transmission of the first cache data in the memory and encrypt the temporary file when the security processing strategy includes the second processing identifier, generate second cache data for the encrypted temporary file, and transmit the second cache data to the second terminal device.

[0129] In the embodiment of the present invention, the security processing unit 702 is further used to block the Windows operating system of the first terminal device from calling its original commit function.

[0130] In the embodiment of the present invention, the security processing unit 702 is further used to receive a security processing policy sent by the service end, and configure the security processing policy for the first terminal device.

[0131] like Figure 8 As shown, an embodiment of the present invention provides a data security processing system 800, which may include: a plurality of first terminal devices 801, a second terminal device 802 that transmits data with the first terminal device 801 via the MTP protocol, and a server 803, wherein:

[0132] Each first terminal device 801 is installed with the above Figure 7 The data security processing device 700 provided in the illustrated embodiment is used to transmit a data file to a second terminal device 802 via the MTP protocol, and to perform security processing on a temporary file of the data file to be transmitted or the first cache data in the memory to prevent leakage of sensitive information;

[0133] The server 803 is used to provide the installation package of the data security processing apparatus 700 and the security processing policy corresponding to the first terminal device 801 to the multiple first terminal devices 801 .

[0134] Reference below Fig. 9 , which shows a schematic diagram of the structure of a computer system 900 of a terminal device or a server suitable for implementing an embodiment of the present invention. Fig. 9 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0135] like Fig. 9As shown, the computer system 900 includes a central processing unit (CPU) 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage part 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the system 900 are also stored. The CPU 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.

[0136] The following components are connected to the I / O interface 905: an input section 906 including a keyboard, a mouse, etc.; an output section 907 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN card, a modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the I / O interface 905 as needed. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 910 as needed, so that a computer program read therefrom is installed into the storage section 908 as needed.

[0137] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 909, and / or installed from the removable medium 911. When the computer program is executed by the central processing unit (CPU) 901, the above-mentioned functions defined in the system of the present invention are executed.

[0138] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0139] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0140] The units involved in the embodiments of the present invention may be implemented by software or hardware. The units described may also be arranged in a processor, for example, may be described as: a processor includes a file generation and analysis unit and a security processing unit. The names of these units do not constitute a limitation on the units themselves in certain cases, for example, the security processing unit may also be described as a "unit for performing security processing on temporary files and first cache data".

[0141] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently and not be assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes: when monitoring that the first terminal device transmits its stored data file to the second terminal device through the MTP protocol, a temporary file corresponding to the data file is generated, and the data included in the data file is written into the temporary file, wherein the process of the first terminal device transmitting its stored data file to the second terminal device through the MTP protocol includes the first terminal device generating first cache data for the stored data file, writing the first cache data into its memory, and transmitting the first cache data written into the memory to the second terminal device through the MTP protocol; performing sensitive information analysis on the data written into the temporary file; when the analysis result indicates that the temporary file contains sensitive information, calling the preset configured security processing strategy, and performing security processing on the temporary file and the first cache data to prevent the leakage of sensitive information contained in the temporary file.

[0142] According to the technical solution of the embodiment of the present invention, the operation of the first terminal device transmitting its stored data file to the second terminal device through the MTP protocol includes the first terminal device generating first cache data for the stored data file, writing the first cache data into its memory, and encrypting and transmitting the first cache data written into the memory to the second terminal device through the MTP protocol. The technical solution provided by the present application generates a temporary file corresponding to the data file when monitoring the operation of the first terminal device transmitting its stored data file to the second terminal device through the MTP protocol, and writes the data included in the data file into the temporary file, and then performs sensitive information analysis on the data written into the temporary file to realize sensitive information monitoring of the temporary file. When the analysis result indicates that the temporary file contains sensitive information, the preset configured security processing strategy is called to perform security processing on the temporary file and the first cache data to prevent the leakage of sensitive information contained in the data file. Thus, the data containing sensitive information to be transmitted to the second terminal device is processed for security, and the transmission process of the data file containing sensitive information through the MTP protocol is controlled to effectively improve the security of the data file on the first terminal device.

[0143] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A data security processing method, characterized in that: include: Upon monitoring that the first terminal device transmits its stored data file to the second terminal device through the MTP protocol, a temporary file corresponding to the data file is generated, and data included in the data file is written into the temporary file, wherein the operation of the first terminal device transmitting its stored data file to the second terminal device through the MTP protocol includes the first terminal device generating first cache data for the stored data file, writing the first cache data into its memory, and encrypting and transmitting the first cache data written into the memory to the second terminal device through the MTP protocol; Performing sensitive information analysis on the data written to the temporary file; If the analysis result indicates that the temporary file contains sensitive information, calling a preset security processing policy to perform security processing on the temporary file and the first cache data to prevent leakage of the sensitive information contained in the data file; The security processing strategy includes a first processing identifier indicating interruption of transmission or a second processing identifier indicating encryption processing, The secure processing of the temporary file includes: When the security processing policy includes a first processing identifier, blocking transmission of the first cache data in the memory; Or when the security processing strategy includes a second processing identifier, the transmission of the first cache data in the memory is blocked, the temporary file is encrypted, and second cache data is generated for the encrypted temporary file, and the second cache data is transmitted to the second terminal device.

2. The data security processing method according to claim 1, characterized in that: Also includes: Obtaining a transmission data interface IPortableDeviceDataStream interface provided by the windows operating system of the first terminal device, including a write function for writing the first cache data into the memory and a status function commit function for indicating that the writing of the first cache data is finished; Modify or replace the write function and the commit function; By means of the modified or replaced write function, the steps of writing the data included in the data file into the temporary file and the step of writing the first cached data into its memory are synchronously executed; Based on the modified or replaced commit function, a step of securely processing the temporary file and the first cache data is executed.

3. The data security processing method according to claim 2, characterized in that: The IPortableDeviceDataStream interface, the write function and the commit function are obtained by monitoring the Content function of the IPortableDevice interface by the COM library during the data transmission process of the Windows operating system through the MTP protocol, and further based on the Content function, the IPortableDeviceContent interface is obtained by monitoring the CreateObjectWithPropertiesAndData function of the IPortableDeviceContent interface.

4. The data security processing method according to claim 2 or 3, characterized in that: Also includes: Get the call status of CreateObjectWithPropertiesAndData function of IPortableDeviceContent interface of Windows running system in real time; When the calling condition indicates that the CreateObjectWithPropertiesAndData function call is successful, executing the step of generating a temporary file corresponding to the data file; and / or, The data security processing method also includes: in response to the windows running system of the first terminal device calling a modified or replaced commit function, synchronously ending the step of writing the data included in the data file into the temporary file and the step of writing the first cached data into its memory to determine that the writing of the temporary file is completed.

5. The data security processing method according to claim 2, characterized in that: The step of writing the data included in the data file into a temporary file and the step of performing sensitive information analysis on the data written into the temporary file are performed simultaneously.

6. The data security processing method according to claim 1 or 2, characterized in that: The generating of a temporary file corresponding to the data file comprises: Obtain the source file name of the data file by calling the parameter WPD_OBJECT_ ORIGINAL_FILE_NAME of the interface function GetStringValue; A temporary file corresponding to the data file is generated based on the source file name.

7. The data security processing method according to claim 1, characterized in that: The blocking of the transmission of the first cache data in the memory includes: blocking the Windows operating system of the first terminal device from calling the original commit function of the Windows operating system; and / or, The data security processing method also includes: receiving a security processing policy sent by a service end, and configuring the security processing policy for the first terminal device.

8. A data security processing device, characterized in that: include: File generation and analysis unit and security processing unit, wherein, The file generation and analysis unit is used to generate a temporary file corresponding to the data file, write the data included in the data file into the temporary file, and perform sensitive information analysis on the data written into the temporary file when monitoring the operation of the first terminal device transmitting the stored data file to the second terminal device through the MTP protocol, wherein the operation of the first terminal device transmitting the stored data file to the second terminal device through the MTP protocol includes the first terminal device generating first cache data for the stored data file, writing the first cache data into its memory, and encrypting and transmitting the first cache data written into the memory to the second terminal device through the MTP protocol; The security processing unit is configured to, when the analysis result of the file generation and analysis unit indicates that the temporary file contains sensitive information, call a preset security processing policy to perform security processing on the temporary file and the first cache data to prevent leakage of sensitive information contained in the data file; The security processing strategy includes a first processing identifier indicating interruption of transmission or a second processing identifier indicating encryption processing; The security processing unit is further configured to block transmission of the first cache data in the memory when the security processing policy includes a first processing identifier; Or when the security processing strategy includes a second processing identifier, the transmission of the first cache data in the memory is blocked, the temporary file is encrypted, and second cache data is generated for the encrypted temporary file, and the second cache data is transmitted to the second terminal device.

9. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.

10. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.