Device and method for protecting seal image of Office electronic document
Monitoring and filtering electronic signature objects through Windows clipboard technology solves the deficiencies in electronic seal image protection in Office electronic documents, achieves stable and comprehensive protection in different Office versions and office software, and avoids the leakage of electronic signature images , and improve user experience.
Patent Information
- Application Number
- CN202111166375.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-30
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2041-09-30
AI Technical Summary
Existing technology cannot effectively protect electronic seal images in Office electronic documents, especially in different Office versions and office software. The traditional read-only/window lock protection mode has leakage risks and is inconvenient to operate.
Using Windows clipboard technology, it monitors clipboard messages, filters and encapsulates electronic signature objects, ensuring that users can copy document content without leaking the electronic seal image. It is suitable for multiple Office versions and office software.
It allows users to freely choose to copy content in office software to avoid the leakage of electronic signature images. It is compatible with office software from multiple manufacturers, reducing dependence on software, and provides precise filtering of clipboard signature image data. A stable and efficient protection solution.
Smart Images

Figure CN114116248B
Abstract
Description
Technical Field
[0001] The invention relates to the field of electronic signature based on Office electronic documents, and relates to a device and method for protecting Office electronic document seal images. Background Art
[0002] In recent years, with the continuous development of government informationization and enterprise informationization, more and more enterprises and institutions have higher and higher requirements for the security of electronic seal images. In order to prevent the leakage of electronic seal images, the traditional method is to restrict users from editing and copying documents, which brings many inconveniences to users' daily office work.
[0003] Traditional solutions generally adopt the read-only / window-locked protection mode, which is effective for Office compound documents (doc type documents); however, for docx type documents, the window protection mode cannot effectively protect the electronic seal image. At the same time, this document protection method sacrifices the user-friendly operation of office software.
[0004] There are many versions of Microsoft Office software, such as Office2003, Office2007, Office2013, Office2016, Office2019, etc. These versions have inconsistent support for document locking protection, and some versions can be copied and leaked. Therefore, the protection method of document read-only / window locking cannot fully protect the seal image.
[0005] Domestic office software such as Kingsoft and Yongzhong are constantly developing and becoming more and more common in daily office work. These office software also have different support for document read-only / window locking protection, so there is also the problem of seal image leakage.
[0006] Therefore, a more stable and comprehensive electronic seal copy protection method is needed, which is applicable to all Office versions and different office software methods, and can allow users to copy the content of documents and protect electronic seal images.
[0007] The disadvantages of traditional electronic seal protection, which uses read-only protection, window lock protection, stamp protection, and real-time clearing of the clipboard:
[0008] 1. Document read-only lock mode. In this protection mode, the document can only be read but not modified. The user can select any location of the document. When the user selects all documents and then copies them, the electronic seal image can be copied together.
[0009] 2. Document window lock protection mode. In this protection mode, users cannot select document elements, and the document cursor is always placed at the beginning of the first page. When selecting an electronic seal image in a doc format document, the document cursor will automatically jump to the beginning of the first page of the document, while in a docx format document, the electronic seal image can be directly selected and copied, and it will not jump to the beginning of the first page. However, docx format documents are the current mainstream streaming document format and can be copied in Kingsoft and Yongzhong office software. Secondly, the document window lock protection mode brings many inconveniences to user operations. When clicking on a page by mistake during document reading, it often automatically jumps to the beginning of the first page.
[0010] 3. Stamp protection: In order to prevent the original stamp image from being copied, the original stamp image is processed by watermarking, atomization, etc. Although this solution can protect the original stamp, the user cannot see the original stamp when reading the document. The original stamp image is only output when printing. This method is inefficient, the process control is complex, non-intuitive, and prone to errors.
[0011] 4. Clear the clipboard in real time. In order to avoid copying the original seal image, clear the clipboard content in real time. In this way, although the purpose of protecting the seal image is achieved, the user cannot copy any content of the document, which is very unfriendly.
[0012] Purpose of the present invention:
[0013] The present invention can overcome the above-mentioned shortcomings of traditional electronic seal image protection, and can realize electronic seal image protection without relying on Office VBA interface. The present invention adopts Windows clipboard technology. First, by monitoring Windows operating system clipboard messages, the content A copied by the user is first obtained. Then, according to the special identification of the electronic signature object, the electronic signature object is directly filtered out from the clipboard information, and the document content B selected by the user is retained. According to the Windows clipboard message format, the content B is repackaged into clipboard data C, the Windows clipboard data is cleared, and the data C is placed in the clipboard. The user can copy the document content according to the operation mode provided by the office software; and the electronic seal image in the document can be protected, so as to achieve the purpose of electronic seal protection, so that the defects of the above-mentioned problems can be avoided, and various Office versions and office software of different manufacturers can be supported more stably and comprehensively.
[0014] Beneficial effects of the present invention:
[0015] 1. In office software, users are allowed to choose to copy content at will, but the electronic seal image cannot be copied out, thus avoiding the leakage of the electronic signature image.
[0016] 2. Compatible with office software from multiple manufacturers and their different versions, reducing dependence on office software.
[0017] 3. The invented device has a simple structure, can accurately filter the clipboard signature image data, and is stable and efficient. Summary of the invention
[0018] The invention overcomes the shortcomings of the prior art and provides a device and method for protecting an Office electronic document seal image.
[0019] A device for protecting Office electronic document seal images, comprising a clipboard monitoring module, a clipboard data interception module, an electronic signature object filtering module, a clipboard data encapsulation module, and a clipboard data write-back module, characterized in that:
[0020] The clipboard monitoring module calls the Windows system API interface SetClipboardViewer to register the main window WIN as a clipboard viewer window according to the Windows operating system clipboard monitoring technology; in order to ensure that the clipboard message is obtained first when the document content is copied, it is necessary to regularly set the current window as a clipboard viewer window, and intercept the WM_CHANGECBCHAIN and WM_DRAWCLIPBOARD messages in the window execution function of the clipboard viewer window. When the clipboard viewer joins or exits the Windows clipboard monitoring chain, it will receive WM_CHANGECBCHAIN, and the connectivity of the entire clipboard viewer monitoring chain needs to be ensured. The Windows clipboard monitoring chain is composed of multiple clipboard viewers, and all clipboard viewers on the Windows clipboard monitoring chain can obtain clipboard data information; when the clipboard data content changes, all viewers on the clipboard viewer chain list will receive the WM_DRAWCLIPBOARD message.
[0021] The clipboard data interception module uses the Windows API interface OpenClipboard to open the Windows clipboard; then uses the IsClipboardFormatAvailable interface to detect whether there is CF_HTML format data, if so, uses the GetClipboardData interface to directly read the clipboard data information A, and uses CloseClipboard to close the Windows clipboard; if not, directly uses CloseClipboard to close the clipboard, and the CF_HTML format data is HTML Format format data;
[0022] The electronic signature object filtering module converts the clipboard data information A into HTML Format format, extracts HTML data B, uses the Html parsing tool to parse HTML data B, traverses all HTML elements, and if the element name is v:shape and the id attribute value starts with "KG_" or "KGD_", further compares whether the id attribute value is in the signature list Sigs. If it exists, delete the element; otherwise, continue to traverse the next element; repeat the above operation until all HTML elements are traversed, the Html parsing tool converts the filtered Html data into a text string C; if all elements are traversed and there is no v:shape element that meets the above requirements, the clipboard data information A is not processed; the electronic signature object filtering module converts the clipboard data information A into HTML Format format, extracts HTML data B, uses the Html parsing tool to parse HTML data B, traverses all HTML elements, and further compares whether the id attribute value is in the signature list Sigs. If it exists, delete the element; otherwise, continue to traverse the next element; repeat the above operation until all HTML elements are traversed, the Html parsing tool converts the filtered Html data into a text string C; if all elements are traversed and there is no v:shape element that meets the above requirements, the clipboard data information A is not processed; Format format, extract HTML data B, use Html parsing tool to parse HTML data B, traverse all HTML elements, if the element name is v:shape, and the id attribute value starts with "KG_" or "KGD_", further compare whether the id attribute value is in the signature list Sigs, the signature list Sigs contains the id attribute value of the electronic seal, if it exists, delete the element; otherwise, continue to traverse the next element; repeat the above operation until all HTML elements are traversed, the Html parsing tool converts the filtered HTML data into a text string C; if all elements are traversed and there is no v:shape element that meets the above requirements, the clipboard data information A is not processed; the Office seal image is displayed in the document as an Office Shape image object, and the image object is named starting with KG, the signature auxiliary information is stored through the Office Shape image object attribute, and this type of image object is named starting with KGD; when the Office office software copies a document, the Office Shape image object is identified by the v:shape element in the clipboard HTML Format, and the id attribute identifies each v:shape object, representing the Office Shape The image object name.
[0023] The clipboard data encapsulation module encapsulates the filtered text string C according to the clipboard HTML Format specification, and at the same time, adds a "FilterFlag" field in the HTML Format header information, with a default value of "OK", to assemble the clipboard data packet D.
[0024] Clipboard data write-back module: Use OpenClipboard to open the Windows clipboard, then use EmptyClipboard to clear the original clipboard data, then use the SetClipboardData interface to write back the clipboard data packet D, and finally use CloseClipboard to close the clipboard. The Windows system will send a WM_DRAWCLIPBOARD message to the current clipboard viewer.
[0025] A method for protecting an Office electronic document seal image, characterized in that it comprises the following steps:
[0026] S1: monitor the clipboard in real time, obtain the main window Win of the Office software, rewrite the window execution process of the main window Win, use the new window execution function WndProc, start the clipboard monitoring module, and set the current main window Win of the Office software as the latest clipboard viewer window before the document copy event, ensure that the main window Win is the current clipboard viewer of Windows, and first obtain the clipboard event WM_DRAWCLIPBOARD.
[0027] S2: intercepting clipboard data. When the content of clipboard data changes, the window execution function WndProc of the main window Win will first obtain the WM_DRAWCLIPBOARD message, and use the clipboard data interception module to obtain the clipboard data C in HTML Format. If there is a FilterFlag field in the header information of the clipboard data C, it means that the clipboard data C has been processed. If the clipboard data C is not processed, the WM_DRAWCLIPBOARD event is directly sent to the next clipboard viewer window according to the Windows clipboard viewer link list; if there is no FilterFlag field, it means that the clipboard data C has not been filtered, and it needs to be further processed according to step S3.
[0028] S3: Filter the electronic signature information, format the clipboard data information C according to the HTML Format, extract the Html data D from the clipboard data C, use the electronic signature object filtering module to analyze the Html data D, traverse all HTML elements, if the element name is v:shape, and the id attribute value starts with "KG_" or "KGD_", further compare whether the id attribute value is in the signature list Sigs, if it exists, delete the element; otherwise, continue to traverse the next element. Repeat the above operation until all HTML elements are traversed, and convert the filtered HTML data into a text string E. If all Html elements are traversed, no element name is detected as v:shapes, and the id attribute value does not start with the "KG_" or "KGD_" tag, and the id attribute value is in the signature list Sigs, indicating that the clipboard data C does not have signature information data, then according to the Windows clipboard viewer link list, directly send the WM_DRAWCLIPBOARD event to the next clipboard viewer window.
[0029] S4: Clipboard data encapsulation, using the clipboard data encapsulation module, encapsulates the filtered text string E according to the clipboard HTML Format format specification, and at the same time, adds the "FilterFlag" field in the HTML Format header information, with the default value of "OK", to assemble into a clipboard data packet F. Adding the "FilterFlag" field in data packet F indicates that data packet F is filtered data. In step S2, it is found that the FilterFlag field exists in the clipboard header information, and the clipboard data is not processed in any way, which can improve the efficiency of signature information filtering.
[0030] S5: Clipboard data write back, using the clipboard data write back module, open the Windows clipboard, clear the original data, and put the clipboard data packet F into the Windows clipboard. The Windows system will send a WM_DRAWCLIPBOARD message to the current clipboard viewer, and terminate the current WM_DRAWCLIPBOARD event to send it to the next window to avoid other clipboard viewer windows processing duplicate messages. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 It is a structural principle diagram of the present invention;
[0032] Figure 2 It is the clipboard viewer related code of the present invention;
[0033] Figure 3 It is a clipboard HTML Format example of the present invention;
[0034] Figure 4 It is the code related to the electronic signature object filtering module of the present invention;
[0035] Figure 5 It is the code related to the electronic signature object filtering module of the present invention;
[0036] Figure 6 It is the code related to the clipboard data encapsulation module of the present invention;
[0037] Figure 7 It is a structural flow chart of the present invention;
[0038] Figure 8 It is the relevant code of the monitoring clipboard process of the present invention;
[0039] Fig. 9 It is the relevant code of the monitoring clipboard process of the present invention; DETAILED DESCRIPTION
[0040] Referring to the attached drawings, a device for protecting Office electronic document seal images includes a clipboard monitoring module, a clipboard data interception module, an electronic signature object filtering module, a clipboard data encapsulation module, and a clipboard data write-back module, and is characterized in that:
[0041] The clipboard monitoring module calls the Windows system API interface SetClipboardViewer to register the main window WIN as a clipboard viewer window according to the Windows operating system clipboard monitoring technology; in order to ensure that the clipboard message is obtained first when the document content is copied, it is necessary to regularly set the current window as a clipboard viewer window, and intercept the WM_CHANGECBCHAIN and WM_DRAWCLIPBOARD messages in the window execution function of the clipboard viewer window. When the clipboard viewer joins or exits the Windows clipboard monitoring chain, it will receive WM_CHANGECBCHAIN, and the connectivity of the entire clipboard viewer monitoring chain needs to be ensured. The Windows clipboard monitoring chain is composed of multiple clipboard viewers, and all clipboard viewers on the Windows clipboard monitoring chain can obtain clipboard data information; when the clipboard data content changes, all viewers on the clipboard viewer chain list will receive the WM_DRAWCLIPBOARD message.
[0042] The clipboard data interception module uses the Windows API interface OpenClipboard to open the Windows clipboard; then uses the IsClipboardFormatAvailable interface to detect whether there is CF_HTML format data, if so, uses the GetClipboardData interface to directly read the clipboard data information A, and uses CloseClipboard to close the Windows clipboard; if not, directly uses CloseClipboard to close the clipboard, and the CF_HTML format data is HTML Format format data;
[0043] The electronic signature object filtering module converts the clipboard data information A into HTML Format format, extracts HTML data B, uses the Html parsing tool to parse HTML data B, traverses all HTML elements, and if the element name is v:shape and the id attribute value starts with "KG_" or "KGD_", further compares whether the id attribute value is in the signature list Sigs. If it exists, delete the element; otherwise, continue to traverse the next element; repeat the above operation until all HTML elements are traversed, the Html parsing tool converts the filtered Html data into a text string C; if all elements are traversed and there is no v:shape element that meets the above requirements, the clipboard data information A is not processed; the electronic signature object filtering module converts the clipboard data information A into HTML Format format, extracts HTML data B, uses the Html parsing tool to parse HTML data B, traverses all HTML elements, and further compares whether the id attribute value is in the signature list Sigs. If it exists, delete the element; otherwise, continue to traverse the next element; repeat the above operation until all HTML elements are traversed, the Html parsing tool converts the filtered Html data into a text string C; if all elements are traversed and there is no v:shape element that meets the above requirements, the clipboard data information A is not processed; Format format, extract HTML data B, use Html parsing tool to parse HTML data B, traverse all HTML elements, if the element name is v:shape, and the id attribute value starts with "KG_" or "KGD_", further compare whether the id attribute value is in the signature list Sigs, the signature list Sigs contains the id attribute value of the electronic seal, if it exists, delete the element; otherwise, continue to traverse the next element; repeat the above operation until all HTML elements are traversed, the Html parsing tool converts the filtered HTML data into a text string C; if all elements are traversed and there is no v:shape element that meets the above requirements, the clipboard data information A is not processed; the Office seal image is displayed in the document as an Office Shape image object, and the image object is named starting with KG, the signature auxiliary information is stored through the Office Shape image object attribute, and this type of image object is named starting with KGD; when the Office office software copies a document, the Office Shape image object is identified by the v:shape element in the clipboard HTML Format, and the id attribute identifies each v:shape object, representing the Office Shape The image object name.
[0044] The clipboard data encapsulation module: encapsulates the filtered text string C according to the clipboard HTML Format format specification, and at the same time, adds a "FilterFlag" field in the HTML Format header information, with a default value of "OK", to assemble a clipboard data packet D.
[0045] Further: A new FilterFlag field is added to the HTML Format header field, indicating that the current clipboard data packet has been processed. After the clipboard data write-back module sets the clipboard data, the clipboard data interception module will obtain the modified clipboard data. When the electronic signature object filtering module parses the HTML Format format, if the FilterFlag header field is found, the clipboard data packet will not be processed at all, and the WM_DRAWCLIPBOARD message will be directly sent to the next Windows clipboard viewer window, thereby improving the efficiency of clipboard data filtering.
[0046] The clipboard data encapsulation module encapsulates the filtered text string C according to the clipboard HTML Format specification, and at the same time, adds a "FilterFlag" field in the HTML Format header information, with a default value of "OK", to assemble the clipboard data packet D.
[0047] The clipboard data write-back module uses OpenClipboard to open the Windows clipboard, then uses EmptyClipboard to clear the original clipboard data, then uses the SetClipboardData interface to write back the clipboard data packet D, and finally uses CloseClipboard to close the clipboard. The Windows system will send a WM_DRAWCLIPBOARD message to the current clipboard viewer.
[0048] A method for protecting an Office electronic document seal image, characterized in that it comprises the following steps:
[0049] S1: monitor the clipboard in real time, obtain the main window Win of the Office software, rewrite the window execution process of the main window Win, use the new window execution function WndProc, start the clipboard monitoring module, and set the current main window Win of the Office software as the latest clipboard viewer window before the document copy event, ensure that the main window Win is the current clipboard viewer of Windows, and first obtain the clipboard event WM_DRAWCLIPBOARD.
[0050] S2: intercepting clipboard data. When the content of clipboard data changes, the window execution function WndProc of the main window Win will first obtain the WM_DRAWCLIPBOARD message, and use the clipboard data interception module to obtain the clipboard data C in HTML Format. If there is a FilterFlag field in the header information of the clipboard data C, it means that the clipboard data C has been processed. If the clipboard data C is not processed, the WM_DRAWCLIPBOARD event is directly sent to the next clipboard viewer window according to the Windows clipboard viewer link list; if there is no FilterFlag field, it means that the clipboard data C has not been filtered and needs to be further processed according to step S3.
[0051] S3: Filter the electronic signature information, format the clipboard data information C according to the HTML Format, extract the Html data D from the clipboard data C, use the electronic signature object filtering module to analyze the Html data D, traverse all HTML elements, if the element name is v:shape, and the id attribute value starts with "KG_" or "KGD_", further compare whether the id attribute value is in the signature list Sigs, if it exists, delete the element; otherwise, continue to traverse the next element. Repeat the above operation until all HTML elements are traversed, and convert the filtered HTML data into a text string E. If all Html elements are traversed, no element name is detected as v:shapes, and the id attribute value does not start with the "KG_" or "KGD_" tag, and the id attribute value is in the signature list Sigs, indicating that the clipboard data C does not have signature information data, then according to the Windows clipboard viewer link list, directly send the WM_DRAWCLIPBOARD event to the next clipboard viewer window.
[0052] S4: Clipboard data encapsulation, using the clipboard data encapsulation module, encapsulates the filtered text string E according to the clipboard HTML Format format specification, and at the same time, adds the "FilterFlag" field in the HTML Format header information, with the default value of "OK", to assemble into a clipboard data packet F. Adding the "FilterFlag" field in data packet F indicates that data packet F is filtered data. In step S2, it is found that the FilterFlag field exists in the clipboard header information, and the clipboard data is not processed in any way, which can improve the efficiency of signature information filtering.
[0053] S5: Clipboard data write back, using the clipboard data write back module, open the Windows clipboard, clear the original data, and put the clipboard data packet F into the Windows clipboard. The Windows system will send a WM_DRAWCLIPBOARD message to the current clipboard viewer, and terminate the current WM_DRAWCLIPBOARD event to send it to the next window to avoid other clipboard viewer windows processing duplicate messages.
Claims
1. A device for protecting Office electronic document seal images, comprising a clipboard monitoring module, a clipboard data interception module, an electronic signature object filtering module, a clipboard data encapsulation module, and a clipboard data write-back module, characterized in that: The clipboard monitoring module calls the Windows system API interface SetClipboardViewer to register the Office main window WIN as a clipboard viewer window according to the Windows operating system clipboard monitoring technology; in order to ensure that the clipboard message is obtained first when the document content is copied, it is necessary to regularly set the current window as the clipboard viewer window, and the window execution function WndProc of the clipboard viewer window intercepts WM_CHANGECBCHAIN and WM_DRAWCLIPBOARD messages. When the clipboard viewer joins or exits the Windows clipboard monitoring chain, WM_CHANGECBCHAIN will be received. It is necessary to ensure the connectivity of the entire clipboard viewer monitoring chain. The Windows clipboard monitoring chain is composed of multiple clipboard viewers, and all clipboard viewers on the Windows clipboard monitoring chain can obtain clipboard data information; When the clipboard data content changes, all viewers on the clipboard viewer list will receive a WM_DRAWCLIPBOARD message; The clipboard data interception module uses the windows API interface OpenClipboard to open the Windows clipboard; there is initial information in the Windows clipboard, and the initial information is the clipboard data information A. Then the IsClipboardFormatAvailable interface is used to detect whether there is CF_HTML format data. If it exists, the GetClipboardData interface is used to directly read the clipboard data information A, and CloseClipboard is used to close the Windows clipboard; if it does not exist, CloseClipboard is directly used to close the clipboard, and the CF_HTML format data is HTMLFormat format data; The electronic signature object filtering module extracts HTML data B from the clipboard data information A according to the HTMLFormat format, uses the Html parsing tool to parse the HTML data B, and traverses all HTML elements. If the element name is v:shape and the id attribute value starts with "KG_" or "KGD_", further compares whether the id attribute value is in the signature list Sigs. The signature list Sigs contains the id attribute value of the electronic seal. If it exists, delete the element; otherwise, continue to traverse the next element; repeat the above operation until all HTML elements are traversed, and the Html parsing tool converts the filtered Html data into a text string C. If all elements are traversed and no v:shape element that meets the above requirements exists, the clipboard data information A will not be processed. The Office seal image is displayed in the document as an OfficeShape image object, and the image object is named starting with KG. The auxiliary information of the signature is stored through the attributes of the OfficeShape image object, and the image object is named starting with KGD. When the Office office software copies the document, the OfficeShape image object is identified by the v:shape element in the clipboard HTMLFormat, and the id attribute identifies each v:shape object, which represents the name of the OfficeShape image object. The clipboard data encapsulation module encapsulates the filtered text string C according to the clipboard HTMLFormat format specification, and at the same time, adds a "FilterFlag" field in the HTMLFormat header information, with a default value of "OK", to assemble the clipboard data packet D; The clipboard data write-back module: uses OpenClipboard to open the Windows clipboard, then uses EmptyClipboard to clear the original data of the clipboard, then uses the SetClipboardData interface to write back the clipboard data packet D, and finally uses CloseClipboard to close the clipboard. The Windows system will send a WM_DRAWCLIPBOARD message to the current clipboard viewer.
2. A method for protecting an Office electronic document seal image, characterized in that: The following steps are involved: S1: Monitor the clipboard in real time, obtain the main window Win of the Office software, rewrite the window execution process of the main window Win, use the new window execution function WndProc, start the clipboard monitoring module, and set the current main window Win of the Office software as the latest clipboard viewer window before the document copy event, to ensure that the main window Win is the current clipboard viewer of Windows and first obtains the clipboard event WM_DRAWCLIPBOARD; S2: intercept the clipboard data; When the content of the clipboard data changes, the window execution function WndProc of the main window Win will first obtain the WM_DRAWCLIPBOARD message, and use the clipboard data interception module to obtain the clipboard data C in HTMLFormat format. If there is a FilterFlag field in the header information of the clipboard data C, it means that the clipboard data C has been processed. Without any processing of the clipboard data C, the WM_DRAWCLIPBOARD event is directly sent to the next clipboard viewer window according to the Windows clipboard viewer link list; if there is no FilterFlag field, it means that the clipboard data C has not been filtered and needs to be further processed according to step S3; S3: Filter the electronic signature information, convert the clipboard data information C into HTMLFormat format, extract the Html data D from the clipboard data C, use the electronic signature object filtering module to analyze the Html data D, traverse all HTML elements, if the element name is v:shape, and the id attribute value starts with "KG_" or "KGD_", further compare whether the id attribute value is in the signature list Sigs, if it exists, delete the element; otherwise, continue to traverse the next element; Repeat the above operation until all html elements are traversed, and convert the filtered html data into text string E; if all Html elements are traversed, and no element name is detected as v:shapes, and the id attribute value does not start with the "KG_" or "KGD_" tag, and the id attribute value is in the signature list Sigs, it means that the clipboard data C does not have signature information data, then according to the Windows clipboard viewer link list, directly send the WM_DRAWCLIPBOARD event to the next clipboard viewer window; S4: Clipboard data encapsulation, using the clipboard data encapsulation module, encapsulates the filtered text string E according to the clipboard HTMLFormat format specification, and at the same time, adds the "FilterFlag" field in the HTMLFormat header information, with the default value of "OK", to assemble into a clipboard data packet F; Adding a "FilterFlag" field to data packet F indicates that data packet F is filtered data. In step S2, it is found that the FilterFlag field exists in the clipboard header information, and the clipboard data is not processed in any way, which can improve the efficiency of signature information filtering; S5: write back the clipboard data, use the clipboard data write back module to open the Windows clipboard, clear the original data, and put the clipboard data packet F into the Windows clipboard; The Windows system will send a WM_DRAWCLIPBOARD message to the current clipboard viewer, and terminate the current WM_DRAWCLIPBOARD event to send it to the next window to avoid other clipboard viewer windows processing duplicate messages.
