File compliance detection tool, use method, equipment, medium and product
Through the combination of the software development kit configured by the OOXML protocol, sensitive word dictionary and security detection rule library, the compliance detection of files in the intranet environment is realized, the problem of file compliance inspection in the intranet environment is solved, and data security is improved detection efficiency and reliability.
Patent Information
- Application Number
- CN202411204369.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2024-12-10
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
It is difficult to conduct file compliance inspections in intranet environments, especially for special units with high confidentiality. The existing optical character recognition technology requires a lot of storage space and powerful computing power, and cannot provide support in intranet environments. .
Provides a file compliance detection tool, including a scanning engine, analysis engine, security policy library and business database, uses a software development kit configured by the OOXML protocol to scan files in OOXML format, extract text content, and use sensitive word dictionary and security The inspection rule library conducts risk analysis and generates a file compliance inspection report.
It realizes lightweight compliance inspection of document format files in an intranet environment, avoids high requirements for computing resources, ensures data security and reliability, and provides file compliance inspection tools suitable for units that cannot be connected to external networks. .
Smart Images

Figure CN119106158A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data management technology, and in particular to a file compliance detection tool, a use method, a device, a medium and a product. Background Art
[0002] With the accelerated development of the digital economy, data resources have gradually become core strategic resources, profoundly affecting the development of the country, economy, and society. Data security has become an important component of national security and an important foundation for the construction of Digital China. How to understand the opportunities and challenges of digital security, accurately and quickly evaluate one's own data security capabilities, and do a good job of self-inspection of data security has become the key to the digital transformation of governments and enterprises. For office scenes such as government agencies, their data assets have specific category characteristics. In addition to the operating data and business data in the server, there are also a large number of unstructured data such as work files in office equipment. The information identification, detection and protection of this type of data has become one of the important components of special units to protect information security. At present, the mainstream data inspection method is to use OCR (Optical Character Recognition) technology to identify all kinds of documents as pictures, thereby extracting the text in the picture, and then analyzing whether the extracted text meets the security regulations. Since OCR text extraction requires the image to be segmented according to the number of characters, and then the pre-stored image feature library is used to match each segment, and then the text corresponding to each segment is determined based on the similarity of the match, this technology requires a large amount of storage space to store the image feature library and requires strong computing power, resulting in this type of data inspection technology often relying on the computing power and storage capacity of cloud services to improve data inspection efficiency. However, some special units with high confidentiality are not allowed to connect to the external network, and the internal network environment is difficult to provide support for OCR technology, resulting in the lack of suitable file compliance inspection tools available for units with high confidentiality. Summary of the invention
[0003] In view of this, the present invention provides a file compliance detection tool, usage method, device, medium and product to solve the problem that it is difficult to perform file compliance checks in an intranet environment.
[0004] In a first aspect, the present invention provides a file compliance detection tool, comprising: a scanning engine, an analysis engine, a security policy library and a business database; the scanning engine is used to obtain a file to be detected in OOXML format, and call a software development kit configured based on the OOXML protocol to scan the file to be detected, and obtain the text content to be detected in the file to be detected; the security policy library is used to save a sensitive word dictionary and a security detection rule library; the analysis engine is used to match the sensitive words to be detected from the text content to be detected according to the sensitive words recorded in the sensitive word dictionary, and use the security detection rule library to perform risk analysis on the sensitive words to be detected to generate a file compliance detection report; the business database is used to save the file compliance detection report and the text content to be detected.
[0005] In some optional embodiments, the software development kit includes: a decompression interface, which is used to decompress the files to be detected to a preset directory; a type identification interface, which is used to determine the file type of each file after decompression; a file positioning interface, which is used to locate at least one target fragment file according to the file type of each file after decompression, and the target fragment file is a fragment containing part of the text content to be detected; a file aggregation interface, which is used to collect all fragment files associated with the target fragment file according to the target fragment file to obtain a file collection; a text extraction interface, which is used to extract all element information in the file collection according to the XML architecture definition, and extract the text part in the element information.
[0006] In some optional implementations, the software development kit is developed using C language or C++ language according to the OOXML protocol.
[0007] In some optional implementations, the security detection rule library includes sensitive word effectiveness rules, security level rules and processing rules. The sensitive word effectiveness rules are used to determine the triggering conditions for the sensitive words to be detected to trigger security risks. The security level rules are used to evaluate the security level to which the sensitive words that trigger the risks belong. The processing rules are used to generate security measures to deal with risks based on the triggered security risks.
[0008] In a second aspect, the present invention provides a method for using a file compliance detection tool, the method comprising: obtaining a file to be detected in OOXML format; calling a software development kit configured based on the OOXML protocol to scan the file to be detected, and obtaining text content to be detected in the file to be detected; matching the sensitive words to be detected from the text content to be detected according to the sensitive words recorded in a sensitive word dictionary; performing risk analysis on the sensitive words to be detected using a security detection rule library, and generating a file compliance detection report.
[0009] In some optional implementations, the calling of a software development kit configured based on the OOXML protocol to scan the file to be detected and obtain the text content to be detected in the file to be detected includes: decompressing the file to be detected to a preset directory; identifying the file type of each file after decompression; locating at least one target fragment file according to the file type of each file after decompression, the target fragment file being a fragment containing part of the text content to be detected; collecting all fragment files associated with the target fragment file according to the target fragment file to obtain a file collection; extracting all element information from the file collection according to the XML architecture definition, and extracting the text part in the element information to obtain the text content to be detected.
[0010] In some optional implementations, the risk analysis of the sensitive words to be detected is performed using a security detection rule library to generate a file compliance detection report, including: judging whether each sensitive word to be detected has triggered a security risk through sensitive word effectiveness rules; marking the security level to which the sensitive words that trigger the risk belong through security level rules; generating security measures to deal with the risk according to the triggered security risk through processing rules; and writing the sensitive words that triggered the security risk, the triggered security risk, the security level and the security measures into a blank text document to obtain the file compliance detection report.
[0011] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0012] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to cause a computer to execute the method of the first aspect or any corresponding embodiment thereof.
[0013] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the method of the first aspect or any corresponding embodiment thereof.
[0014] The technical solution provided by the present invention has the following advantages:
[0015] The software development kit configured based on the OOXML protocol of the present invention realizes the ability to recognize the text content of text data, and integrates a sensitive word dictionary and a security detection rule library to perform compliance detection on the recognized text content. The software development kit configured based on the OOXML protocol is small in size and realizes text recognition based on the XML protocol, does not require a large number of image material libraries, and can realize lightweight compliance detection for document format files other than images. For units with relatively high data security requirements, this solution uses extremely lightweight software to implement the compliance detection function, and its implementation form may be just a U disk or optical disk device, thereby tilting the main computing resources to business functions such as security identification and protection, and its own security and reliability are guaranteed, solving the problem of difficulty in file compliance detection for units that cannot connect to the external network. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0017] Figure 1 is a schematic diagram of the structure of a file compliance detection tool according to an embodiment of the present invention;
[0018] Figure 2 is a flowchart of a method for using a file compliance detection tool according to an embodiment of the present invention;
[0019] Figure 3 is another flowchart of a method for using a file compliance detection tool according to an embodiment of the present invention;
[0020] Figure 4 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0021] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0022] According to an embodiment of the present invention, a file compliance detection tool embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0023] A file compliance detection tool provided in this embodiment includes: a scanning engine, an analysis engine, a security policy library and a business database; the scanning engine is used to obtain a file to be detected in OOXML format, and call a software development kit configured based on the OOXML protocol to scan the file to be detected, and obtain the text content to be detected in the file to be detected; the security policy library is used to save a sensitive word dictionary and a security detection rule library; the analysis engine is used to match the sensitive words to be detected from the text content to be detected according to the sensitive words recorded in the sensitive word dictionary, and use the security detection rule library to perform risk analysis on the sensitive words to be detected to generate a file compliance detection report; the business database is used to save the file compliance detection report and the text content to be detected.
[0024] Specifically, unstructured data is data without specific formats and rules. Formats and rules refer to data presentation aspects, such as pictures, office documents, text, audio, video, reports, etc. This type of data has no basis for regularization, so it is not convenient to retrieve and access. For data other than pictures, document data can mostly be stored in OOXML (Office Open Extensible Markup Language) format. OOXML is an XML-based office document format, including word documents, Excel spreadsheets, PowerPoint presentations, and Charts, Diagrams, Shapes, etc. This specification has been adopted by ISO and IEC as the ISO / IEC29500 standard. The embodiment of the present invention is directly based on this standard, develops a set of basic libraries from the bottom layer of the protocol, and provides most of the APIs compatible with the Open XML software development kit (Software Development Kit, SDK) call style. The upper-layer application uses the corresponding SDK to extract text from the office document format file, thereby realizing the detection of office file data security in special industries.
[0025] like Figure 1As shown, the file compliance detection tool provided by the present invention includes two parts: an execution component and a database. The database includes a security policy library and a business database. The security policy library as the core is divided into two modules. One is a sensitive word dictionary, which will summarize the sensitive word dictionary table built into the customer's business or software according to the current security regulations for retrieval and matching; the other is a security detection rule library. The security detection rule library presets a variety of judgment rules for security detection, which determines which sensitive words are effective and what security risks they have during security compliance analysis, and is a control item for security detection behavior.
[0026] In this embodiment, the business core of the execution component is the scanning engine and the analysis engine. The technical core of the scanning engine is the SDK based on OOXML. The scanning engine first searches for all files matching the file format in the target directory, then extracts the text content in the files matching the file format by calling the SDK, and then stores the extracted text content in the business database (put into Figure 1 In this embodiment, the matching file format file refers to an XML-like file, which can be divided into different types according to its different presentation content, for example: html, ppt, doc, xlx, pptx, docx, etc.
[0027] The analysis engine is separated from the scanning engine, and each performs its own functions independently. The analysis engine is used to load the business database, sensitive word dictionary table and security detection rule base at the same time. First, the sensitive word dictionary and the text in the information database are used as comparison items to match the extracted text content with sensitive words, and then the matched sensitive words are recorded, processed, summarized and other operations are performed according to the security detection rule base as the analysis standard. Finally, the analysis results are sent to the business database as the file compliance detection report for this time, which is used for software presentation or document download for use by security practitioners. Among them, the security policy library and the business database are both components that exist in the form of sql databases.
[0028] Through the technical solution provided by the embodiment of the present invention, the software development kit configured based on the OOXML protocol realizes the ability to recognize the text content of text data, and then integrates the sensitive word dictionary and the security detection rule library to perform compliance detection on the recognized text content, thereby forming a complete software tool. The software development kit configured with the OOXML protocol is small in size and realizes text recognition based on the XML protocol. It does not require a large number of image material libraries, and can realize lightweight compliance detection for document format files other than images. For units with relatively high data security requirements, this solution uses extremely lightweight software to implement compliance detection functions. The file compliance detection tool can be stored in a USB flash drive or optical disk device, thereby tilting the main computing resources to business functions such as security identification and protection, and its own security and reliability are guaranteed, solving the problem of difficulty in file compliance detection for units that cannot connect to the external network.
[0029] In some optional embodiments, the software development kit includes: a decompression interface, which is used to decompress the files to be detected to a preset directory; a type identification interface, which is used to determine the file type of each file after decompression; a file positioning interface, which is used to locate at least one target fragment file according to the file type of each file after decompression, and the target fragment file is a fragment containing part of the text content to be detected; a file aggregation interface, which is used to collect all fragment files associated with the target fragment file according to the target fragment file to obtain a file collection; a text extraction interface, which is used to extract all element information in the file collection according to the XML architecture definition, and extract the text part in the element information.
[0030] Specifically, since the main business of the file compliance detection tool provided by the present invention is to serve data security detection, it is not for performing all common operations on text documents. Therefore, the main function of the software development kit based on the OOXML protocol configuration provided by the present invention is to recognize the text of Office documents and read them in pieces. Each type of XML office document is supported, and each document type only retains the reading function, ensuring that the component is lightweight enough while meeting the requirements.
[0031] According to the OOXML standard, an Office document is actually a zip compressed package consisting of a group of XML files and other types of files (mostly image types). When decompressed in zip format, the following structure can be obtained.
[0032] 1. rels directory: used to store files with the suffix .rels, which records the dependencies between various parts (which can be understood as file fragments).
[0033] 2. docProps directory: used to store file properties and application settings, which has little to do with the actual content of each file.
[0034] 3. [Content_types] directory: The directory name may be doc, ppt, etc. It is used to store fragments of file records with the .xml suffix. The stored fragments are the actual text content recorded in the document.
[0035] 4. [Content_types].xml file: used to record the file type of each file contained in the compressed package. Therefore, it should be noted that the real type of each file in the zip compressed package should not be determined by the file suffix, but should be determined from the [Content_types].xml file. The type corresponding to the target file segment needs to be obtained through *ML. For the meaning of *ML, please refer to the table below.
[0036] Table 1. Markup Language (ML) tags for OOXML parsing
[0037]
[0038]
[0039] Based on the storage characteristics of the above OOXML files, such as Figure 2 As shown, the basic process of parsing OOXML files based on the OOXML protocol in the present invention is as follows:
[0040] 1. Extract the Office file using the zip archive.
[0041] 2. Read the [Content_types].xml file to obtain the types of all files (used to identify whether the actual format of the current zip compression is Word, PPT or Excel, etc.);
[0042] 3. Taking the .docx format as the target file to be read as an example, this step first reads the Relationship file in the rels directory, and obtains the location of the document.xml file through the Relationship file, that is, word / document.xml;
[0043] 4. Read the word / document.xml file and its associated relationship file wprd_rels / document.xml.rels to get the storage location of all the fragments of the word file;
[0044] 5. According to the XML Schema Definition (XSD) definition of WML (the description of data in word in the table), all element information in the file is obtained, so as to extract the text part of the element information.
[0045] For step 5, this embodiment mentions obtaining the content in each file fragment through XSD definition. This is because *ML is defined in XML format, so the corresponding attribute descriptions all conform to the format rules of XML, that is, XSD definition. The functions of XSD definition mainly include: defining elements that can appear in the document; defining attributes that can appear in the document; defining which element is a child element; defining the order of child elements; defining the number of child elements; defining whether an element is empty or whether it can contain text; defining the data types of elements and attributes; defining the default values and fixed values of elements and attributes. Among them, XML elements are the basic units that constitute XML documents. Each element contains a start tag, an end tag and the content between the two. The content between the two tags can be text, child elements, comments, etc. The concepts of child elements, order, attributes, comments, etc. are explained as prior art and are not closely related to the text content to be extracted, so they will not be repeated here.
[0046] Therefore, based on the above file parsing process, the software development kit provided by the present invention mainly includes a decompression interface, a type identification interface, a file location interface, a file summary interface and a text extraction interface, and each interface is called by the scanning engine to function. The decompression interface corresponds to the process of decompressing the zip compressed package to obtain the Office file; the type identification interface corresponds to the process of reading the [Content_types].xml file; the file location interface corresponds to the process of reading the Relationship file under the rels directory, thereby obtaining the word, ppt, excel and other type file fragments; the file summary interface corresponds to the process of reading the corresponding type file and its associated Relationship file, and then obtaining the storage location of all the fragment files of the word, ppt or excel, thereby obtaining the file collection; the text extraction interface corresponds to the process of obtaining all the element information in the file through the XSD definition, thereby extracting the text part of the element information.
[0047] The software development kit configured through the embodiment of the present invention can not only accurately read the text of OOXML format office documents, but also supports each XML office document type, and each document type only retains the reading function, ensuring that the component is lightweight enough while meeting the requirements, and significantly improving the problems of difficult deployment and low detection efficiency of file compliance detection systems in intranet environments.
[0048] In some optional implementations, the software development kit configured in the present invention is developed using C language or C++ language according to the OOXML protocol.
[0049] Specifically, some components based on OOXML format on the market often lack autonomy requirements and are not suitable for the application of security compliance detection software. For example, ApachePOI based on Java implementation requires the deployment of JRE environment to run Java projects. For the cross-platform requirements of security compliance detection software, it is necessary to prepare JRE for Linux and Windows to support the operation of ApachePOI. For example, the Open XML SDK for Office component provided by Microsoft is used to read, write and modify OOXML format documents, but the library is developed based on C# and bound to the .net development framework. No matter which existing component is only suitable for its own system products, it cannot be deployed across platforms, and thus cannot be combined with file detection tools. The file compliance detection tool provided by the embodiment of the present invention has a software development kit based on the OOXML standard, develops a set of basic libraries from the bottom layer of the protocol through the general C language or C++, and provides most of the APIs compatible with the Open XML SDK calling style. The upper-layer application uses the corresponding SDK to extract text from the office document format file, thereby realizing the detection of office file data security in special industries, achieving the effect of cross-platform deployment, and increasing the application scenarios of file compliance detection tools.
[0050] In some optional embodiments, the security detection rule library provided by the present invention includes sensitive word effectiveness rules, security level rules and processing rules. The sensitive word effectiveness rules are used to determine the triggering conditions for the sensitive words to be detected to trigger security risks. The security level rules are used to evaluate the security level to which the sensitive words that trigger the risks belong. The processing rules are used to generate security measures to deal with risks based on the triggered security risks.
[0051] Specifically, by performing security monitoring on the extracted document data through the security detection rule library of the embodiment of the present invention, it is possible to determine which sensitive words are effective in which specific scenarios, thereby determining the triggering of different security risks, and defining different security levels for different sensitive words. It is also possible to generate security measures to respond to risks based on the triggered security risks, and provide a detailed risk location description and response measure description for the subsequently generated file compliance detection report, which not only improves the efficiency of risk response, but also reduces the difficulty of manual risk analysis. Under the condition of only an intranet, the file detection efficiency of file compliance detection tools in special units is improved.
[0052] This embodiment also provides a method for using a file compliance detection tool, such as Figure 3 As shown, the specific steps include:
[0053] Step S301, obtaining a file to be detected in OOXML format;
[0054] Step S302, calling a software development kit configured based on the OOXML protocol to scan the file to be detected, and obtaining the text content to be detected in the file to be detected;
[0055] Step S303, matching the sensitive words recorded in the sensitive word dictionary from the text content to be detected to obtain the sensitive words to be detected;
[0056] Step S304: Perform risk analysis on the sensitive words to be detected using the security detection rule library to generate a file compliance detection report.
[0057] Specifically, the explanation of the principles of the present method embodiment can refer to the relevant description of the aforementioned tool embodiment, which will not be repeated here.
[0058] In some optional implementations, step S302 includes:
[0059] Step a1, decompress the file to be detected to a preset directory;
[0060] Step a2, identifying the file type of each file after decompression;
[0061] Step a3, locating at least one target segment file according to the file type of each decompressed file, where the target segment file is a segment containing part of the text content to be detected;
[0062] Step a4, collecting all the fragment files associated with the target fragment file according to the target fragment file to obtain a file set;
[0063] Step a5, extracting all element information from the file collection according to the XML architecture definition, and extracting the text part in the element information to obtain the text content to be detected.
[0064] Specifically, the explanation of the principles of the present method embodiment can refer to the relevant description of the aforementioned tool embodiment, which will not be repeated here.
[0065] In some optional implementations, step S304 includes:
[0066] Step b1, judging whether each sensitive word to be detected triggers a security risk through the sensitive word effectiveness rule;
[0067] Step b2, marking the security level to which the sensitive words that trigger the risk belong through security level rules;
[0068] Step b3, generating security measures to deal with risks according to the triggered security risks through processing rules;
[0069] Step b4, write the sensitive words that trigger the security risk, the triggered security risk, the security level and the security measures into a blank text document to obtain a file compliance detection report.
[0070] Specifically, the explanation of the principles of the present method embodiment can refer to the relevant description of the aforementioned tool embodiment, which will not be repeated here.
[0071] The embodiment of the present invention also provides a computer device for running the above Figure 1 The file compliance detection tool shown.
[0072] See also Figure 4 , Figure 4 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 4 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 4 A processor 10 is taken as an example.
[0073] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0074] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.
[0075] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0076] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0077] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0078] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0079] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.
[0080] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A file compliance detection tool, characterized in that: include: Scanning engine, analysis engine, security policy library and business database; The scanning engine is used to obtain the file to be detected in OOXML format, and call the software development kit configured based on the OOXML protocol to scan the file to be detected, so as to obtain the text content to be detected in the file to be detected; The security policy library is used to store a sensitive word dictionary and a security detection rule library; The analysis engine is used to match the sensitive words to be detected from the text content to be detected according to the sensitive words recorded in the sensitive word dictionary, and use the security detection rule library to perform risk analysis on the sensitive words to be detected to generate a file compliance detection report; The business database is used to store the file compliance detection report and the text content to be detected.
2. The file compliance detection tool according to claim 1, characterized in that: The software development kit includes: Decompression interface, which is used to decompress the file to be detected into a preset directory; Type identification interface, used to determine the file type of each file after decompression; A file locating interface, used to locate at least one target segment file according to the file type of each decompressed file, wherein the target segment file is a segment containing part of the text content to be detected; A file aggregation interface, used to collect all segment files associated with the target segment file according to the target segment file to obtain a file set; The text extraction interface is used to extract all element information in the document set according to the XML architecture definition, and to extract the text part in the element information.
3. The file compliance detection tool according to claim 1, characterized in that: The software development kit is developed using C language or C++ language according to the OOXML protocol.
4. The file compliance detection tool according to claim 1, characterized in that: The security detection rule library includes sensitive word effectiveness rules, security level rules and processing rules. The sensitive word effectiveness rules are used to determine the triggering conditions for the sensitive words to be detected to trigger security risks. The security level rules are used to evaluate the security level to which the sensitive words that trigger the risks belong. The processing rules are used to generate security measures to deal with the risks based on the triggered security risks.
5. A method for using a file compliance detection tool, characterized in that: The method comprises: Get the file to be tested in OOXML format; Calling a software development kit configured based on the OOXML protocol to scan the file to be detected, and obtaining the text content to be detected in the file to be detected; According to the sensitive words recorded in the sensitive word dictionary, the sensitive words to be detected are matched from the text content to be detected to obtain the sensitive words to be detected; The security detection rule library is used to perform risk analysis on the sensitive words to be detected and generate a file compliance detection report.
6. The method according to claim 5, characterized in that The calling of the software development kit configured based on the OOXML protocol to scan the file to be detected to obtain the text content to be detected in the file to be detected includes: Decompress the file to be detected to a preset directory; Identify the file type of each file after decompression; Locating at least one target segment file according to the file type of each decompressed file, wherein the target segment file is a segment containing part of the text content to be detected; Collect all segment files associated with the target segment file according to the target segment file to obtain a file set; All element information is extracted from the file collection according to the XML architecture definition, and the text part in the element information is extracted to obtain the text content to be detected.
7. The method according to claim 5, characterized in that The method of using the security detection rule library to perform risk analysis on the sensitive words to be detected and generate a file compliance detection report includes: Use the sensitive word effectiveness rules to determine whether each sensitive word to be detected triggers a security risk; Use security level rules to mark the security level to which sensitive words that trigger risks belong; Generate security measures to respond to risks based on triggered security risks through processing rules; The sensitive words that trigger the security risk, the triggered security risk, the security level and the security measures are written into a blank text document to obtain the file compliance detection report.
8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor runs the file compliance detection tool described in any one of claims 1 to 4, or executes the method described in any one of claims 5 to 7 by executing the computer instructions.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to run the file compliance detection tool described in any one of claims 1 to 4, or to execute the method described in any one of claims 5 to 7.
10. A computer program product, characterized in that The method comprises computer instructions for causing a computer to execute the method according to any one of claims 5 to 7.
Citation Information
Patent Citations
Document detection method and device, equipment and storage medium
CN113641885A
Data transaction compliance detection system and method
CN114708100A
Data product security compliance inspection method and device, and server
CN116150349A
Sensitive data scanning method and device, electronic equipment and medium
CN116663040A
Unknown threat defense method and device for OOXML document template injection attack
CN117235716A
Cited By
Electronic document security management system based on dynamic sensitive word detection
CN120596662A
Electronic document security management system based on dynamic sensitive word detection
CN120596662B
Multi-region data compliance adaptation engine intelligent system
CN121167752A
Electronic file compliance verification and closed-loop management method based on rule engine
CN121681835A
A rule engine-based electronic file compliance checking and closed-loop management method
CN121681835B
