Method and related equipment for detecting the safety of printed documents
By detecting printing operations and performing security inspections in the system printing service process, the risk of printing file information leakage in enterprises is solved, and the security detection of printing files without additional detection components is achieved, which improves information security.
Patent Information
- Application Number
- CN202410354353.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-26
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2044-03-26
AI Technical Summary
In enterprises, printed documents may contain commercial or technical information. Unrestricted printing can easily lead to the leakage of key information within the enterprise, bringing security risks.
The printing operation is detected in the system printing service process, and in response to the function related to the printing operation being called, the relevant information of the printing file is obtained, the second printing file in the target format is generated, and the file is safely detected to obtain the security detection result.
This method realizes the security detection of printed files without the need for additional installation of detection components for printing operations, avoids the risk of information leakage and improves the information security of the enterprise.
Smart Images

Figure CN118132016B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method for detecting the security of printed documents and related equipment. Background Art
[0002] In the daily work of enterprises, it is often necessary to print work documents. For example, promotional materials, bidding documents, meeting materials, etc. all require printing. In enterprises, printed documents may contain the company's business information or technical information. Unrestricted printing can easily lead to the leakage of key information within the enterprise, bringing risks to the enterprise or organization. Summary of the invention
[0003] In view of this, the purpose of the present application is to provide a method and related equipment for detecting the security of printed documents, so as to solve or partially solve the above problems.
[0004] Based on the above purpose, in a first aspect, the present application provides a method for detecting the security of a printed document, comprising:
[0005] Detect printing operations in the system printing service process;
[0006] In response to a function related to a printing operation being called, obtaining, according to the function, relevant information of a first printing file corresponding to the printing operation;
[0007] generating a second print file in a target format according to the relevant information of the first print file;
[0008] Perform a security check on the second print file to obtain a security check result.
[0009] In a second aspect of the present application, a device for detecting the security of a printed document is provided, comprising:
[0010] A detection module is configured to detect a printing operation in a system printing service process;
[0011] an acquisition module, configured to, in response to a function related to a printing operation being called, acquire relevant information of a first printing file corresponding to the printing operation according to the function;
[0012] A generating module, configured to generate a second printing file in a target format according to the relevant information of the first printing file;
[0013] The security detection module is configured to perform a security detection on the second print file to obtain a security detection result.
[0014] In a third aspect of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method described in the first aspect is implemented.
[0015] According to a fourth aspect of the present application, a non-transitory computer-readable storage medium is provided, wherein the non-transitory computer-readable storage medium stores computer instructions, wherein the computer instructions are used to enable a computer to execute the method described in the first aspect.
[0016] In a fifth aspect of the present application, a computer program product is provided, comprising computer program instructions, which, when executed on a computer, cause the computer to execute the method described in the first aspect.
[0017] As can be seen from the above, the present application provides a method and related equipment for detecting the security of printed files. The method is applied to the printing service of an enterprise, and the method includes: detecting the printing operation in the system printing service process; in response to the function related to the printing operation being called, obtaining the relevant information of the first printing file corresponding to the printing operation according to the function; generating a second printing file in a target format according to the relevant information of the first printing file; and performing a security detection on the second printing file to obtain a security detection result. The above method realizes the security detection of printed files without installing an additional detection component for the printing operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the present application or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0019] Figure 1 A schematic diagram of an exemplary system according to an embodiment of the present application is shown.
[0020] Figure 2 A schematic flow chart of an exemplary method for security detection of printed documents is shown.
[0021] Figure 3 A flowchart of an exemplary method for detecting the security of a printed document according to an embodiment of the present application is shown.
[0022] Figure 4 A schematic diagram of an exemplary print management option box according to an embodiment of the present application is shown.
[0023] Figure 5A flowchart of an exemplary method for detecting the security of a printed document according to an embodiment of the present application is shown.
[0024] Figure 6 A schematic diagram of an exemplary device for detecting the security of a printed document according to an embodiment of the present application is shown.
[0025] Figure 7 A schematic diagram of an exemplary electronic device according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0026] In order to make the objectives, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.
[0027] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should be the usual meanings understood by people with ordinary skills in the field to which the present application belongs. The "first", "second" and similar words used in the embodiments of the present application do not represent any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing in front of the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0028] It is understandable that before using the technical solutions of each embodiment of the present application, the type, scope of use, usage scenarios, etc. of the personal information involved will be informed to the user in an appropriate manner, and the user's authorization will be obtained.
[0029] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly remind the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can independently choose whether to provide personal information to the electronic device, application, server, storage medium or other software or hardware that performs the operation of the technical solution of the present application according to the prompt message.
[0030] As an optional but non-limiting implementation, in response to receiving the user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0031] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation method of this application. Other methods that meet relevant laws and regulations may also be applied to the implementation method of this application.
[0032] As described in the background technology, in the daily work of an enterprise, it is often necessary to print work documents. For example, promotional materials, bidding documents, meeting materials, etc. all require printing. In an enterprise, the printed documents may contain the business information or technical information of the enterprise. Unrestricted printing can easily lead to the leakage of key information within the enterprise, bringing risks to the enterprise or organization.
[0033] When working, enterprise users need to use printers to print some work-related documents. Some documents need to be kept from being disclosed or exposed, such as documents containing corporate commercial confidential information and technical secrets. If these documents are leaked, they will threaten corporate information security and have a negative impact on the company.
[0034] Figure 1 A schematic diagram of an exemplary system 100 according to an embodiment of the present application is shown.
[0035] like Figure 1 As shown, the system 100 may include a terminal device 102, a server 104, a local printer 106, and a remote printer 108. The terminal device 102 may be connected to the server 104 and the local printer 106 via a network, such as a wired or wireless network connection, etc. The server 104 may be connected to the remote printer 108 via a network, such as a wired or wireless network connection, etc.
[0036] Various applications (Application, APP in English and application in Chinese) and office collaboration systems can be installed on the terminal device 102, such as image processing applications, video conferencing applications, reading applications, video applications, social applications, payment applications, web browsers and instant messaging tools, etc. These applications can all be used to display content.
[0037] The terminal device 102 here can be hardware or software. When the terminal device 102 is hardware, it can be various electronic devices with a display screen, including but not limited to smart phones, tablet computers, e-book readers, MP3 players, laptop computers (Laptops) and desktop computers (PCs), etc. When the terminal device 102 is software, it can be installed in the electronic devices listed above. It can be implemented as multiple software or software modules (for example, to provide distributed services), or it can be implemented as a single software or software module. It is not specifically limited here.
[0038] The server 104 may be a server that provides various servers, for example, a background server that provides support for various applications displayed on the terminal device 102. The server 104 may also be hardware or software. When they are hardware, they may be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When they are software, they may be implemented as multiple software or software modules (for example, to provide distributed services), or as a single software or software module. No specific limitation is made here.
[0039] The local printer 106 can provide local printing services. The remote printer 108 can provide remote printing services. The local printer 106 and the remote printer 108 can also be hardware or software.
[0040] In an exemplary application scenario, a user may prepare a print file, read the print file and input a print command through the terminal device 102. When the local printer 106 receives a print command for the file prepared by the user, the printer driver installed on the terminal device 102 converts the print file data into print data, and then transmits the print data to the local printer 106 for printing.
[0041] The user can also print through the remote printer 108. The terminal device can send the read print file and print command to the server 104. When the remote printer 108 receives the print command, the printer driver installed on the server 104 converts the print file data into print data, and then transmits the print data to the remote printer 108 for printing.
[0042] Figure 2 A schematic flow chart of an exemplary method 200 for detecting security of a printed document is shown.
[0043] In the related art, the terminal device needs to install a printing operation detection component to implement the security detection of the printed file, wherein the printing operation detection component can be a virtual printer.
[0044] Take the printing process of a terminal device using Windows system printing technology to simulate a physical printer (e.g., printer 206) through a virtual printer (e.g., printer 204) as an example. Each application on the terminal device (e.g., application 202a, 202b, and 202c) deploys a printing detection module (e.g., printing detection modules 2022a, 2022b, and 2022c) to implement security detection of printed files during the printing process.
[0045] When a user initiates a printing operation using a physical printer through the operating system of a terminal device (such as a Windows system), the print detection module can forward the relevant information of the print file corresponding to the print operation to the virtual printer through a HOOK (hook). The print detection module pops up a message on the terminal device for the user to select the security information of the document to be printed (for example, confidentiality level, purpose, destination, approver) and fill in the printing information of the document to be printed (for example, title, number of copies, paper, color, horizontal or vertical, single or double-sided). The virtual printer saves the relevant information corresponding to the content of the file to be printed as a temporary print file by calling the GDI (Graphics Device Interface) function of the Windows system. After converting the temporary print file into a file in the target format, the file in the target format is sent to the server for security detection of the print file, thereby completing the security detection process of the print file.
[0046] There are many types and brands of physical printers. Virtual printers are not compatible with physical printers of different types and brands, which may cause some content loss in the files obtained through the virtual printer.
[0047] As mentioned above, the solution of using a virtual printer to perform print content security detection requires the deployment of a print detection module in each application. When a user initiates a print operation through an application, the application will not respond before the security detection of the print file is completed. In this way, the user cannot operate other applications before the security detection of the print file is completed, affecting the user's work efficiency. In addition, if the internal logic of the print detection module is not handled properly, it will cause the application to crash, which will greatly affect the user's office process.
[0048] In view of this, the present application provides a method and related equipment for detecting the security of a print file. The method is applied to the printing service of an enterprise, and the method comprises: detecting a print operation in a system print service process; in response to a function related to the print operation being called, obtaining relevant information of a first print file corresponding to the print operation according to the function; generating a second print file in a target format according to the relevant information of the first print file; and performing a security detection on the second print file to obtain a security detection result. The above method realizes the security detection of print files without installing an additional detection component for the print operation.
[0049] Figure 3 A flowchart of an exemplary method 300 for detecting the security of a printed document according to an embodiment of the present application is shown.
[0050] like Figure 3As shown, in some embodiments, a print detection module 308 can be deployed in the print service process (spoolsv.exe) in the first type of operating system (e.g., Windows system) and the second type of operating system (e.g., Mac system) to HOOK some functions in the print provider corresponding to different print providing types (e.g., local print providing type 304 and remote print providing type 306). The print provider can be divided into a local print provider (localspl.dll) and a remote print provider (win32spl.dll) according to the different print providing types. By deploying the print detection module in the system print service process, there is no need to deploy the print detection module in each application, which avoids the problem that when a print operation is initiated, the application does not respond, thereby causing other applications to be unable to run.
[0051] In some embodiments, for different print provision types, the print detection module 308 detects the print operation in different ways in the system print service process. Further, according to the print provider corresponding to the different print provision types, the print detection module 308 detects the print operation in different ways in the system print service process.
[0052] The print provider may include an export table, which may include functions related to the print operation. When a user initiates a print operation through an application (e.g., application 302a, 302b, and 302c) in a terminal device, the terminal device may complete the related print operation by calling the print function in the export table of the print provider. In some embodiments, the print detection module 308 may detect the print operation by obtaining the called print function.
[0053] In some embodiments, the functions related to the printing operation may include a first function for writing printing data, a second function for starting the printing operation, a third function for ending the printing operation, and a fourth function for obtaining task information related to the printing operation. By obtaining relevant information of the printing file when the functions related to printing are called, the original printing data stream can be obtained, thereby avoiding the problem that the virtual printer is not compatible with physical printers of different brands and types, thereby generating incomplete printed content.
[0054] For the local print provider in the local print provider type 304, in some embodiments, the export table of the local print provider can export functions related to printing. When the user initiates a print operation corresponding to the local print provider type 304 through the terminal device, the terminal device responds to the first function being called, and the printable detection module 308 in the system print service process can obtain the relevant information of the first print file corresponding to the print operation according to the first function. In this way, when the first function for starting the print operation is called, the print detection module 308 can obtain the relevant information of the first print file corresponding to the print operation by obtaining the print action corresponding to the first function.
[0055] In some embodiments, the terminal device may create a temporary print file (e.g., a temporary file) in response to the second function being called. The print detection module 308 may write the acquired relevant information of the first print file into the temporary print file. Thus, when the second function for writing the relevant information of the first print file is called, the print detection module 308 uses the acquired print action corresponding to the second function to write the relevant information of the first print file into the temporary print file.
[0056] In some embodiments, after the print detection module 308 writes the relevant information of the first print file into the print temporary file, the target temporary file can be obtained, and the target temporary file can be converted into a second print file in a target format. In some embodiments, in response to the third function being called, the terminal device can generate a second print file in a target format according to the target temporary file. In this way, when the third function for ending the print operation is called, the print detection module 308 can convert the target temporary file into a second print file in a target format. The terminal device can send the second print file in the target format to the server, so that the server can perform a security detection on the second print file to obtain a security detection result, thereby completing the security detection process of the print file.
[0057] The security detection result may include the confidentiality attribute information of the printed file. In some embodiments, it can be determined whether to intercept the printing operation based on the security detection result. When the confidentiality attribute information reaches the target confidentiality level, the printing operation can be intercepted. In this way, the confidentiality attribute information of the printed file is detected to avoid the problem that unrestricted printing in the enterprise can easily cause the leakage of key information within the enterprise, which will bring risks to the enterprise or organization.
[0058] After the second function is called, the terminal device may receive a return value after the second function is called. In some embodiments, the terminal device may obtain task information corresponding to the printing operation according to the return value. In some embodiments, in response to the fourth function being called, the terminal device may obtain task information corresponding to the printing operation according to the return value.
[0059] For the remote print provider in the remote print providing type 306, in some embodiments, the export table of the remote print provider may include a target function related to printing. The target function may include a function type of a target structure (e.g., LPPRINTPROVIDOR structure). The target structure describes the function information that a complete print provider needs to provide. When a user initiates a print operation corresponding to the remote print providing type 306 through a terminal device, the function related to printing in the target structure is called.
[0060] When the user initiates a printing operation corresponding to the remote printing provision type 306 through the terminal device, in some embodiments, the terminal device responds to the first function being called, and the printable detection module 308 in the system print service process can obtain the relevant information of the first print file corresponding to the printing operation according to the first function. In this way, when the first function for starting the printing operation is called, the printing detection module 308 can obtain the relevant information of the first print file corresponding to the printing operation by obtaining the printing action corresponding to the first function.
[0061] In some embodiments, the terminal device may create a temporary print file (e.g., a temporary file) in response to the second function being called. The print detection module 308 may write the acquired relevant information of the first print file into the temporary print file. Thus, when the second function for writing the relevant information of the first print file is called, the print detection module 308 uses the acquired print action corresponding to the second function to write the relevant information of the first print file into the temporary print file.
[0062] In some embodiments, after the print detection module 308 writes the relevant information of the first print file into the print temporary file, the target temporary file can be obtained, and the target temporary file can be converted into a second print file in a target format. In some embodiments, in response to the third function being called, the terminal device can generate a second print file in a target format according to the target temporary file. In this way, when the third function for ending the print operation is called, the print detection module 308 can convert the target temporary file into a second print file in a target format. The terminal device can send the second print file in the target format to the server, so that the server can perform a security detection on the second print file to obtain a security detection result, thereby completing the security detection process of the print file.
[0063] The security detection result may include the confidentiality attribute information of the printed file. In some embodiments, it can be determined whether to intercept the printing operation based on the security detection result. When the confidentiality attribute information reaches the target confidentiality level, the printing operation can be intercepted. In this way, the confidentiality attribute information of the printed file is detected to avoid the problem that unrestricted printing in the enterprise can easily cause the leakage of key information within the enterprise, which will bring risks to the enterprise or organization.
[0064] After the second function is called, the terminal device may receive a return value after the second function is called. In some embodiments, the terminal device may obtain task information corresponding to the printing operation according to the return value. In some embodiments, in response to the fourth function being called, the terminal device may obtain task information corresponding to the printing operation according to the return value.
[0065] In this way, by injecting the print detection module into the system print service, and calling different print-related functions according to different print provision types to complete the print file security detection process, there is no need to install a virtual printer, saving system memory. At the same time, it is more convenient to implement the print file security detection without installing a virtual printer.
[0066] Figure 4 A schematic diagram of an exemplary print management option box 400 according to an embodiment of the present application is shown.
[0067] like Figure 4 As shown, in some embodiments, the administrator can check the file printing by option 402 in the print management option box 400 of the management background to perform security detection on the confidential file. In some embodiments, the print management option box 400 can also display the system to which the printing method can be applied, for example, the first type of operating system and the second type of operating system. The administrator can implement the printing security detection of the printed content by checking the option through the print management option box 400, which is very convenient.
[0068] During the security detection process of file printing, the server can match the print file of the target format with the confidential information rules. If the print file contains confidential information, the server returns a command prohibiting printing and information related to the print file (for example, printing device information, print document name, print page number, print time, print user name, etc.) to the terminal device; if the print file does not contain confidential information, the server returns a command allowing printing and information related to the print file to the terminal device. In this way, when it is detected that the print file contains confidential information, by returning the information related to the print file to the terminal device, it is convenient for the user to delete the confidential information contained in the file and make other adjustments.
[0069] Figure 51 shows a flow chart of an exemplary printing method 500 according to an embodiment of the present application. The method 500 may be performed by the system 100 (eg, Figure 1 In the system 100 in the embodiment, for example, a user can prepare a print document by using a terminal device 102 (e.g., Figure 1 The terminal device 102 in the system reads the print file and inputs the print command. When the local printer 106 (for example, Figure 1 When a local printer 106 in the terminal device 102 receives a print command for a file prepared by the user, the printer driver installed on the terminal device 102 converts the print file data into print data, and then transmits the print data to the local printer 106 for printing. The user can also print the file to the local printer 106 through a remote printer 108 (for example, Figure 1 The terminal device can send the read print file and print command to the server 104 (for example, Figure 1 When the remote printer 108 receives the print command, the printer driver installed on the server 104 converts the print file data into print data, and then transmits the print data to the remote printer 108 for printing. The method 500 may include the following steps.
[0070] In step 502, a printing operation is detected in the system printing service process.
[0071] In some embodiments, the detecting the printing operation in the system printing service process further comprises: determining the printing provision type; and detecting the printing operation in the system printing service process according to the printing provision type. The printing detection module is deployed in the system printing service process, and there is no need to deploy the printing detection module in each application, thus avoiding the problem that when the printing operation is initiated, the application does not respond, thereby causing other applications to fail to run.
[0072] In some embodiments, the detecting the printing operation in the system printing service process according to the printing providing type further comprises: detecting the printing operation in the system printing service process according to the printing providing program corresponding to the printing providing type. The printing detection module is deployed in the system printing service process, and there is no need to deploy the printing detection module in each application, thus avoiding the problem that when the printing operation is initiated, the application does not respond, thereby causing other applications to fail to run.
[0073] In some embodiments, the detecting the printing operation in the system printing service process according to the printing provider corresponding to the printing providing type further comprises: obtaining the export table of the printing provider; and detecting the printing operation in the system printing service process based on the functions related to the printing operation in the export table. In this way, by injecting the printing detection module into the system printing service, and calling different printing-related functions according to different printing providing types to complete the printing detection process, there is no need to install a virtual printer, thereby avoiding the problem that the user can arbitrarily delete the application corresponding to the virtual printer in the printer list, thereby failing to implement the printing detection.
[0074] In some embodiments, the print offer type includes a local print offer type (e.g., Figure 3 Local print provision type 304 in ), remote print provision type (e.g., Figure 3 In this way, by injecting the print detection module into the system print service and calling different print-related functions according to different print providing types to complete the print detection process, there is no need to install a virtual printer, thus saving system memory. At the same time, the security detection of the printed file can be realized without installing a virtual printer, which is more convenient.
[0075] In step 504, in response to a function related to the printing operation being called, relevant information of a first printing file corresponding to the printing operation is acquired according to the function.
[0076] In some embodiments, the function related to the printing operation includes a first function, the first function is used to write relevant information of the printing file, and in response to the function related to the printing operation being called, obtaining relevant information of the first printing file corresponding to the printing operation according to the function further includes: in response to the first function being called, obtaining relevant information of the first printing file corresponding to the printing operation according to the first function. In this way, when the first function for starting the printing operation is called, the printing detection module can obtain the printing data corresponding to the printing operation by obtaining the printing action corresponding to the first function.
[0077] In some embodiments, the function related to the printing operation includes a second function, the second function is used to start the printing operation, and in response to the function related to the printing operation being called, obtaining the relevant information of the first printing file corresponding to the printing operation according to the function further includes: in response to the second function being called, creating a temporary file for generating the second printing file. In this way, when the second function for writing the printing data is called, the printing detection module uses the obtained printing action corresponding to the second function to write the printing data into the printing temporary file.
[0078] In step 506, a second print file in a target format is generated according to the relevant information of the first print file.
[0079] In some embodiments, generating a second print file in a target format based on relevant information of the first print file further includes: writing relevant information of the first print file into the temporary file to obtain a target temporary file; and generating the second print file based on the target temporary file.
[0080] In some embodiments, the function related to the printing operation includes a third function, and the third function is used to end the printing operation. The generating the second printing file according to the target temporary file further includes: in response to the third function being called, generating the second printing file according to the target temporary file. In this way, when the third function for ending the printing operation is called, the printing detection module can convert the target temporary file into a printing file in a target format. The terminal device can send the printing file in the target format to the server to complete the printing detection process.
[0081] In some embodiments, the method further includes: obtaining a return value after the second function is called; and obtaining task information corresponding to the printing operation according to the return value.
[0082] In some embodiments, the function related to the printing operation includes a fourth function, and the fourth function is used to obtain task information related to the printing operation, and the obtaining of information corresponding to the printing operation according to the return value further includes: in response to the fourth function being called, obtaining task information corresponding to the printing operation according to the return value. In this way, by injecting a printing detection module into the system printing service, and calling different printing-related functions according to different printing provision types to complete the printing detection process, there is no need to install a virtual printer, which saves system memory. At the same time, the security detection of printed files can be achieved without installing a virtual printer, which is more convenient.
[0083] In step 508, a security check is performed on the second print file to obtain a security check result.
[0084] In some embodiments, after performing a security check on the second print file to obtain a security check result, the method further includes: determining whether to intercept the print operation based on the security check result, the security check result including the confidentiality attribute information of the print file; and intercepting the print operation in response to the confidentiality attribute information reaching the target confidentiality level. In this way, the confidentiality attribute information of the print file is checked to avoid the problem that unrestricted printing in the enterprise can easily cause the leakage of key information within the enterprise, which will bring risks to the enterprise or organization.
[0085] The present application provides a method and related equipment for detecting the security of a print file. The method is applied to the printing service of an enterprise, and the method includes: detecting a print operation in a system print service process; in response to a function related to the print operation being called, obtaining relevant information of a first print file corresponding to the print operation according to the function; generating a second print file in a target format according to the relevant information of the first print file; and performing a security detection on the second print file to obtain a security detection result. The above method realizes the security detection of print files without installing an additional detection component for the print operation.
[0086] It should be noted that the method of the embodiment of the present application can be performed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present application, and the multiple devices will interact with each other to complete the described method.
[0087] It should be noted that the above describes some embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0088] Based on the same technical concept, corresponding to any of the above-mentioned embodiments and methods, the present application also provides a device 600 for detecting the security of printed documents.
[0089] refer to Figure 6 The device 600 for detecting the security of a printed document comprises:
[0090] The detection module 602 is configured to detect a printing operation in the system printing service process.
[0091] The detection module 602 is further configured to determine a print provision type; and detect a print operation in a system print service process according to the print provision type.
[0092] The detection module 602 is further configured to detect a printing operation in a system printing service process according to a printing provider corresponding to the printing provider type.
[0093] The detection module 602 is further configured to obtain an export table of the print provider; and detect a print operation in a system print service process based on the functions related to the print operation in the export table.
[0094] The print providing type includes at least one of a local print providing type and a remote print providing type, and the print providing program includes a local print providing program and a remote print providing program.
[0095] The acquisition module 604 is configured to, in response to a function related to the printing operation being called, acquire relevant information of the first printing file corresponding to the printing operation according to the function.
[0096] The acquisition module 604 is further configured to acquire, in response to the first function being called, relevant information of the first printing file corresponding to the printing operation according to the first function.
[0097] The acquisition module 604 is further configured to create a temporary file for generating the second print file in response to the second function being called.
[0098] The generating module 606 is configured to generate a printing file in a target format according to the relevant information of the first printing file.
[0099] The generating module 606 is further configured to write the related information of the first printing file into the temporary file to obtain a target temporary file; and generate the second printing file according to the target temporary file.
[0100] The generating module 606 is further configured to generate the second printing file according to the target temporary file in response to the third function being called.
[0101] The generating module 606 is further configured to obtain a return value after the second function is called; and obtain task information corresponding to the printing operation according to the return value.
[0102] The generating module 606 is further configured to obtain task information corresponding to the printing operation according to the return value in response to the fourth function being called.
[0103] The security detection module 608 is configured to perform a security detection on the second print file to obtain a security detection result.
[0104] The security detection module 608 is further configured to determine whether to intercept the printing operation based on the security detection result, wherein the security detection result includes confidentiality attribute information of the print file; in response to the confidentiality attribute information reaching the target confidentiality level, intercept the printing operation.
[0105] For the convenience of description, the above device is described in terms of functions divided into various modules. Of course, when implementing the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0106] The device of the above embodiment is used to implement the corresponding method 500 in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0107] Based on the same technical concept, corresponding to any of the above-mentioned embodiments, the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method 500 described in any of the above embodiments when executing the program.
[0108] Figure 7 A schematic diagram of an exemplary electronic device according to an embodiment of the present application is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other in communication within the device through the bus 1050.
[0109] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0110] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.
[0111] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.
[0112] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).
[0113] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).
[0114] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.
[0115] The electronic device of the above embodiment is used to implement the corresponding method 500 in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0116] Based on the same technical concept, corresponding to any of the above-mentioned embodiments, the present application also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute method 500 described in any of the above embodiments.
[0117] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be achieved by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, 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, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, tape 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.
[0118] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the method 500 described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0119] Based on the same inventive concept, corresponding to the method 500 described in any of the above embodiments, the present application further provides a computer program product, including computer program instructions, which, when executed on a computer, enable the computer to execute the method 500 described in any of the above embodiments. In some embodiments, the computer program instructions may be executed by one or more processors of a computer so that the computer and / or the processor execute the method 500. Corresponding to the execution subject corresponding to each step in each embodiment of the method 500, the processor that executes the corresponding step may belong to the corresponding execution subject.
[0120] The computer program product of the above embodiment is used to enable the computer and / or the processor to execute the method 500 described in any of the above embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be described in detail here.
[0121] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present application (including the claims) is limited to these examples. In line with the concept of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.
[0122] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present application difficult to understand, the known power supply / ground connection with the integrated circuit (IC) chip and other components may or may not be shown in the provided drawings. In addition, the device can be shown in the form of a block diagram to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform to be implemented in the embodiments of the present application (that is, these details should be fully within the scope of understanding of those skilled in the art). In the case of elaborating specific details (e.g., circuits) to describe exemplary embodiments of the present application, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details or when these specific details are changed. Therefore, these descriptions should be considered to be illustrative rather than restrictive.
[0123] Although the present application has been described in conjunction with specific embodiments of the present application, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.
[0124] The embodiments of the present application are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the scope of protection of the present application.
Claims
1. A method for detecting the security of a printed document, comprising: Detecting a printing operation in a system printing service process, wherein the printing operation includes writing printing data, starting a printing operation, ending a printing operation, and obtaining task information related to the printing operation, and the printing operation is detected by a HOOK deployed in the printing service process; In response to a function related to a printing operation being called, obtaining, according to the function, relevant information of a first printing file corresponding to the printing operation; generating a second print file in a target format according to the relevant information of the first print file; Performing a security check on the second print file to obtain a security check result; Wherein, detecting the printing operation in the system printing service process further includes: Determine the print offer type; According to the print providing type, detecting a print operation in a system print service process; The print providing type includes at least one of a local print providing type and a remote print providing type, and the print providing program includes a local print providing program and a remote print providing program.
2. The method of claim 1, wherein: The function related to the printing operation includes a first function, wherein the first function is used to write relevant information of the printing file. In response to a function related to a printing operation being called, obtaining relevant information of a first printing file corresponding to the printing operation according to the function further includes: in response to the first function being called, obtaining relevant information of the first printing file corresponding to the printing operation according to the first function.
3. The method of claim 1, wherein: The function related to the printing operation includes a second function, wherein the second function is used to start the printing operation. In response to a function related to the printing operation being called, obtaining relevant information of the first printing file corresponding to the printing operation according to the function further includes: in response to the second function being called, creating a temporary file for generating the second printing file.
4. The method of claim 3, wherein: The step of generating a second print file in a target format according to the relevant information in the first print file further comprises: Writing the relevant information of the first print file into the temporary file to obtain a target temporary file; The second print file is generated according to the target temporary file.
5. The method of claim 4, wherein: The function related to the printing operation includes a third function, and the third function is used to end the printing operation. The generating the second print file according to the target temporary file further comprises: in response to the third function being called, generating the second print file according to the target temporary file.
6. The method of claim 3, wherein: The method further comprises: Get the return value after the second function is called; The task information corresponding to the printing operation is acquired according to the return value.
7. The method of claim 6, wherein: The function related to the printing operation includes a fourth function, and the fourth function is used to obtain task information related to the printing operation. The acquiring the task information corresponding to the printing operation according to the return value further includes: in response to the fourth function being called, acquiring the task information corresponding to the printing operation according to the return value.
8. The method of claim 1, wherein: After performing security detection on the second print file to obtain a security detection result, the method further includes: Determining whether to intercept the printing operation according to the security detection result, wherein the security detection result includes confidentiality attribute information of the printed file; In response to the confidentiality level attribute information reaching a target confidentiality level, the printing operation is intercepted.
9. The method of claim 1, wherein: The detecting the printing operation in the system printing service process according to the printing providing type further comprises: A printing operation is detected in a system printing service process according to a printing providing program corresponding to the printing providing type.
10. The method of claim 9, wherein: The detecting the printing operation in the system printing service process according to the printing providing program corresponding to the printing providing type further comprises: Obtaining an export table of the print provider; Based on the functions related to the printing operation in the export table, the printing operation is detected in the system printing service process.
11. A device for detecting the safety of a printed document, comprising: A detection module is configured to detect a printing operation in a system printing service process, wherein the printing operation includes writing printing data, starting a printing operation, ending a printing operation, and obtaining task information related to the printing operation, and the printing operation is detected by a HOOK deployed in the printing service process; an acquisition module, configured to, in response to a function related to a printing operation being called, acquire relevant information of a first printing file corresponding to the printing operation according to the function; A generating module, configured to generate a second printing file in a target format according to the relevant information of the first printing file; A security detection module, configured to perform a security detection on the second print file to obtain a security detection result; The detection module is further configured to determine the print provision type; According to the print providing type, a print operation is detected in a system print service process; the print providing type includes at least one of a local print providing type and a remote print providing type, and the print providing program includes a local print providing program and a remote print providing program.
12. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method according to any one of claims 1 to 10 is implemented.
13. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to make a computer execute the method according to any one of claims 1 to 10.
14. A computer program product, wherein: The method comprises computer program instructions, which, when executed on a computer, cause the computer to execute the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Method, device and equipment for controlling document printing under Linux system and medium
CN114564158A
Data security processing method and device
CN115514757A