CN112363981A - Automatic error correction method and system for LDIF file - Google Patents

Automatic error correction method and system for LDIF file Download PDF

Info

Publication number
CN112363981A
CN112363981A CN202011271901.6A CN202011271901A CN112363981A CN 112363981 A CN112363981 A CN 112363981A CN 202011271901 A CN202011271901 A CN 202011271901A CN 112363981 A CN112363981 A CN 112363981A
Authority
CN
China
Prior art keywords
error correction
ldif
line
content
format
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011271901.6A
Other languages
Chinese (zh)
Inventor
商雷
高格英
王朝元
陈博
林赞磊
刘纯艳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Great Wall Computer Software & Systems Inc
Original Assignee
Great Wall Computer Software & Systems Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Great Wall Computer Software & Systems Inc filed Critical Great Wall Computer Software & Systems Inc
Priority to CN202011271901.6A priority Critical patent/CN112363981A/en
Publication of CN112363981A publication Critical patent/CN112363981A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/14Details of searching files based on file metadata
    • G06F16/148File search processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/3332Query translation
    • G06F16/3334Selection or weighting of terms from queries, including natural language queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/103Formatting, i.e. changing of presentation of documents
    • G06F40/117Tagging; Marking up; Designating a block; Setting of attributes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/163Handling of whitespace

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Computational Linguistics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Library & Information Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses an automatic error correction method and system for an LDIF file, and relates to the technical field of computers. The method comprises the following steps: acquiring an LDIF source file, and reading the LDIF source file line; analyzing the line content, if the line content is not the end of the file stream, carrying out keyword detection on the line content, and carrying out error correction according to keywords; and after the error correction is finished, writing the updated content into the LDIF source file. The invention is suitable for automatic error correction of the LDIF file, realizes the verification and automatic error correction of the basic format of the LDIF file, can reduce the format specification requirements of relevant personnel on the LDIF file only by correcting the errors of relevant parts of the service, and can be better integrated into an LDAP system framework for reading after being processed by the method.

Description

Automatic error correction method and system for LDIF file
Technical Field
The invention relates to the technical field of computers, in particular to an automatic error correction method and system for LDIF files.
Background
LDIF (LDAP Data exchanged Format) is short for lightweight directory access protocol Data exchange format, and is a standard text file format for storing LDAP configuration information and directory contents, so that the use of text files for storing the information is convenient for reading and modifying, which is also the format adopted by most other service configuration files. The method is generally used for exchanging data and exchanging data among OpenLDAP servers, and can realize the operations of importing and exporting data files and adding, modifying, renaming and the like of the data files through LDIF, the information needs to be operated according to the specification of schema in LDAP and is checked by the schema, and if the information does not meet the requirements of the specification of OpenLDAP schema, a relevant syntax error is prompted.
Currently, modification entries are usually added by manually defining the LDIF file, which requires understanding about relevant features of the LDIF file, otherwise various syntax errors are prompted. And defining LDIF files in the OpenLDAP server, wherein each entry must contain an objectclass attribute and a value needs to be defined, the objectclass attribute has a top level, the dependency of the objectclass needs to be known before defining the objectclass, otherwise, a relevant syntax error is prompted when adding or modifying. Therefore, a method for automatically correcting errors of an LDIF file is needed.
Disclosure of Invention
The invention provides an automatic error correction method and system for LDIF files, aiming at the defects of the prior art.
The technical scheme for solving the technical problems is as follows:
an automatic error correction method for LDIF files, comprising:
acquiring an LDIF source file, and reading the LDIF source file line;
analyzing the line content, if the line content is not the end of the file stream, carrying out keyword detection on the line content, and carrying out error correction according to keywords;
and after the error correction is finished, writing the updated content into the LDIF source file.
The error correction method provided by the invention is suitable for automatic error correction of the LDIF file, the verification and automatic error correction of the basic format of the LDIF file are realized by reading the row content of the LDIF file and then carrying out keyword detection on the row content according to the keyword detection error correction, a programmer only needs to correct the error of the part related to the service, the format specification requirement of related personnel on the LDIF file can be reduced, and the LDIF file can be better integrated into a system framework of LDAP for reading after being processed by the method.
Further, the invention can be improved as follows:
performing keyword detection on the row content, and performing error correction according to the keyword, specifically including:
and identifying keywords of the attributes in the row content, judging whether the keywords of the attributes have format errors, and if so, performing automatic format processing.
The beneficial effect of adopting the further scheme is that: by detecting the keywords of the attributes and detecting the format errors of the keywords, whether the information behind the attributes is complete or not can be automatically judged, for example, spaces can be automatically detected, and attribute values can be automatically added after the spaces are added, so that the completeness of the attribute information is ensured, and the accuracy of high automatic error correction can be provided.
Further, the invention can be improved as follows:
performing keyword detection on the row content, and performing error correction according to the keyword, further comprising:
and identifying the dn entry name in the line content, judging whether the dn entry name has a format error, and if so, performing automatic format processing.
The beneficial effect of adopting the further scheme is that:
by identifying the dn entry name in the line content, whether an empty line exists before line changing can be judged, so that the automatic filling of the empty line is realized, the type and the range of automatic error correction can be improved, and the applicability of the invention is improved.
Further, the invention can be improved as follows:
performing keyword detection on the row content, and performing error correction according to the keyword, further comprising:
and identifying a preset symbol in the row content, judging whether the preset symbol has a format error, and if so, performing automatic format processing.
The beneficial effect of adopting the further scheme is that:
by identifying the preset symbols in the line content, the automatic filling of the space behind the specific symbol can be realized, the type and the range of automatic error correction can be further improved, and the applicability of the invention is further improved.
Further, the invention can be improved as follows:
performing keyword detection on the row content, and performing error correction according to the keyword, further comprising:
and identifying the line tail of the line content, automatically removing the space if the line tail has the space, and automatically removing the tab if the line tail has the tab.
The beneficial effect of adopting the further scheme is that:
the basic format check of the LDIF file can be realized by identifying the line tail of the line content, automatically removing the blank and the tab, so that a programmer only needs to correct the error of the part related to the service when using the LDIF file, and the requirement of related personnel on the format specification of the LDIF file can be reduced.
Another technical solution of the present invention for solving the above technical problems is as follows:
an automatic error correction system for LDIF files, comprising:
the acquisition unit is used for acquiring the LDIF source file and reading the LDIF source file line;
the error correction unit is used for analyzing the line content, detecting keywords of the line content if the line content is not the end of the file stream, and correcting errors according to the keywords;
and the updating unit is used for writing the updated content into the LDIF source file after the error correction is finished.
The error correction system provided by the invention is suitable for automatic error correction of the LDIF file, the verification and automatic error correction of the basic format of the LDIF file are realized by reading the row content of the LDIF file and then carrying out keyword detection on the row content according to the keyword detection error correction, a programmer only needs to correct the error of the part related to the service, the format specification requirement of related personnel on the LDIF file can be reduced, and the LDIF file can be better integrated into a system framework of LDAP for reading after being processed by the method.
Further, the invention can be improved as follows:
the error correction unit is specifically configured to identify a keyword of an attribute in the row content, determine whether the keyword of the attribute has a format error, and if so, perform automatic format processing.
The beneficial effect of adopting the further scheme is that: by detecting the keywords of the attributes and detecting the format errors of the keywords, whether the information behind the attributes is complete or not can be automatically judged, for example, spaces can be automatically detected, and attribute values can be automatically added after the spaces are added, so that the completeness of the attribute information is ensured, and the accuracy of high automatic error correction can be provided.
Further, the invention can be improved as follows:
the error correction unit is further configured to identify a dn entry name in the line content, determine whether the dn entry name has a format error, and if so, perform automatic format processing.
The beneficial effect of adopting the further scheme is that:
by identifying the dn entry name in the line content, whether an empty line exists before line changing can be judged, so that the automatic filling of the empty line is realized, the type and the range of automatic error correction can be improved, and the applicability of the invention is improved.
Further, the invention can be improved as follows:
the error correction unit is further configured to identify a preset symbol in the row content, determine whether the preset symbol has a format error, and if so, perform automatic format processing.
The beneficial effect of adopting the further scheme is that:
by identifying the preset symbols in the line content, the automatic filling of the space behind the specific symbol can be realized, the type and the range of automatic error correction can be further improved, and the applicability of the invention is further improved.
Further, the invention can be improved as follows:
the error correction unit is also used for identifying the line tail of the line content, automatically removing the space if the line tail has the space, and automatically removing the tab if the line tail has the tab.
The beneficial effect of adopting the further scheme is that:
the basic format check of the LDIF file can be realized by identifying the line tail of the line content, automatically removing the blank and the tab, so that a programmer only needs to correct the error of the part related to the service when using the LDIF file, and the requirement of related personnel on the format specification of the LDIF file can be reduced.
Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Drawings
FIG. 1 is a flow chart of an embodiment of the present invention for an automatic error correction method for LDIF files;
fig. 2 is a structural framework diagram provided by an embodiment of the automatic error correction system for LDIF files of the present invention.
Detailed Description
The principles and features of this invention are described below in conjunction with the following drawings, which are set forth to illustrate, but are not to be construed to limit the scope of the invention.
In multi-terminal unified user management, OpenLDAP is a free and open-source implementation of Lightweight Directory Access Protocol (LDAP), is issued under its OpenLDAP license, and has been included in many popular Linux releases. LDIF (LDAP Data exchanged Format) is short for lightweight directory access protocol Data exchange format, and is a standard text file format for storing LDAP configuration information and directory contents, so that the use of text files for storing the information is convenient for reading and modifying, which is also the format adopted by most other service configuration files. The method is generally used for exchanging data and exchanging data among OpenLDAP servers, and can realize the operations of importing and exporting data files and adding, modifying, renaming and the like of the data files through LDIF, the information needs to be operated according to the specification of schema in LDAP and is checked by the schema, and if the information does not meet the requirements of the specification of OpenLDAP schema, a relevant syntax error is prompted.
The LDIF file is characterized as follows:
the end of each line of the LDIF file is not allowed to have spaces or tabs.
The LDIF file allows the associated attributes to be repeatedly assigned and used.
LDIF files are named at the end of the LDIF.
The line in the LDIF file beginning with the # number is annotated and can be used as an explanation.
All the assignment modes of the LDIF file are as follows: the attributes are as follows: [ blank ] attribute value.
The LDIF file defines an entry by an empty row, with an entry before a space followed by the beginning of another entry.
# notes for interpreting entries
dn: item name
objectClass (object class): attribute value
objectClass (object class): attribute value
……
If the LDIF file is manually defined to add the modification items, the relevant characteristics of the LDIF file need to be known; otherwise, various syntax errors are prompted. And defining LDIF files in the OpenLDAP server, wherein each entry must contain an objectclass attribute and a value needs to be defined, the objectclass attribute has a top level, the dependency of the objectclass needs to be known before defining the objectclass, otherwise, a relevant syntax error is prompted when adding or modifying.
The method can solve the problem of checking and automatic error correction of the basic format of the LDIF file, and can be better integrated into a system framework of LDAP for reading after being processed by the method.
As shown in fig. 1, a schematic flowchart is provided for an embodiment of an automatic error correction method for an LDIF file according to the present invention, where the automatic error correction method can be used for automatic error correction and basic format check of the LDIF file, and the method includes:
s1, acquiring an LDIF source file, and reading the LDIF source file line;
it should be noted that the LDIF source file may move data in a proprietary format into the LDAP directory for generation by means of a preset generation tool; scripts may also be written to generate data in LDIF format.
For example, the preset generation tool may be awk or perl, etc.
An exemplary LDIF file format is given below.
The first non-annotated line of the LDIF file is a version number, which is followed by one or more records. Each record is made up of multiple fields, one field in a row. The rows are separated by linens or carriage returns/linens pairs, with each record separated by one or more empty rows.
There are two different types of LDIF records: content recording and change recording. There is no limitation on the number of records that an LDIF file can contain, but they must be of the same type. There cannot be both content and change records in the same LDIF file. The lines starting with the pound (#) character are annotation lines and will be ignored when processing the LDIF file.
It will be appreciated that a line read of the LDIF source file is a read of the fields of each segment of the record.
S2, analyzing the line content, if the file flow is not the end, detecting the key words of the line content, and correcting the error according to the key words;
it should be understood that if the file stream is end, the LDIF source file is output and ends.
It should be noted that, what kind of keywords are specifically selected may be set according to actual requirements, for example, for an LDIF file, there are a symbol, an attribute, dn, and the like, and therefore, a symbol may be selected as a keyword, for example, a colon or a space may be selected as a keyword, and a dn or an attribute may also be selected as a keyword.
Because the LDIF file has a specific format, the keywords also have a certain format, and therefore, after the keywords are detected, error correction can be carried out according to a preset automatic format processing rule.
For example, taking the keyword attribute as an example, the format is "attribute: [ space ] attribute value ", for" attribute "post-presence": and the section can automatically judge the section which is not immediately followed by the space, and if not, the section can add the space and then the attribute value, thereby realizing automatic format error correction.
As another example, with the keyword "dn: the entry name "is taken as an example, the row should be a null row before, null row identification can be performed after the keyword" dn "is detected, and if no null row appears before the row, the null row is automatically filled, so that automatic format error correction is realized.
As another example, by keyword ": "as an example,": "should be followed by a space, then the keyword is detected": "thereafter, space recognition can be performed if the": and if no space appears after the correction, automatically filling the space, thereby realizing automatic format correction.
It should be noted that, those skilled in the art may also select other keywords in the LDIF file for error correction according to actual requirements, which may be selected and set by those skilled in the art without creative efforts, and details are not described here.
S3, after the error correction is completed, the updated content is written into the LDIF source file.
It should be understood that the error corrected file may be imported into the server as an LDIF file.
The error correction method provided by the embodiment is suitable for automatic error correction of the LDIF file, the verification of the basic format of the LDIF file and automatic error correction are realized by reading the row content of the LDIF file and then carrying out keyword detection on the row content according to the keyword detection error correction, a programmer only needs to correct the errors of the part related to the service, the format specification requirements of related personnel on the LDIF file can be reduced, and the LDIF file can be better integrated into a system framework of LDAP for reading after being processed by the method.
Optionally, in some possible embodiments, performing key detection on the line content, and performing error correction according to the key specifically includes:
identifying keywords of the attributes in the row content, judging whether the keywords of the attributes have format errors, and if so, performing automatic format processing.
It should be noted that the attribute has a fixed format, and therefore, it is possible to determine whether the format has an error by detecting whether the format of the attribute meets a preset format requirement, for example, the attribute format is "attribute: [ space ] attribute value ", for" attribute "post-presence": and the section can automatically judge the section which is not immediately followed by the space, and if not, the section can add the space and then the attribute value, thereby realizing automatic format error correction.
By detecting the keywords of the attributes and detecting the format errors of the keywords, whether the information behind the attributes is complete or not can be automatically judged, for example, spaces can be automatically detected, and attribute values can be automatically added after the spaces are added, so that the completeness of the attribute information is ensured, and the accuracy of high automatic error correction can be provided.
Optionally, in some possible embodiments, performing key word detection on the line content, and performing error correction according to the key word, further includes:
and identifying the dn entry name in the line content, judging whether the dn entry name has a format error, and if so, performing automatic format processing.
It should be noted that the dn entry name has a fixed format, and therefore, it may be determined whether the format has an error by detecting whether the format of the dn entry name meets a preset format requirement, for example, if the row where the dn entry name is located is an empty row, the empty row identification may be performed after detecting the keyword "dn", and if the row is not empty, the empty row is automatically filled, so as to implement automatic format error correction.
By identifying the dn entry name in the line content, whether an empty line exists before line changing can be judged, so that the automatic filling of the empty line is realized, the type and the range of automatic error correction can be improved, and the applicability of the invention is improved.
Optionally, in some possible embodiments, performing key word detection on the line content, and performing error correction according to the key word, further includes:
and identifying the preset symbol in the row content, judging whether the preset symbol has a format error, and if so, performing automatic format processing.
It should be noted that, the symbols in the LDIF file usually have a fixed format, and therefore, it can be determined whether the format has an error by detecting whether the format of the preset symbols meets the preset format requirement, for example, ": "should be followed by a space, then the keyword is detected": "thereafter, space recognition can be performed if the": and if no space appears after the correction, automatically filling the space, thereby realizing automatic format correction.
By identifying the preset symbols in the line content, the automatic filling of the space behind the specific symbol can be realized, the type and the range of automatic error correction can be further improved, and the applicability of the invention is further improved.
Optionally, in some possible embodiments, performing key word detection on the line content, and performing error correction according to the key word, further includes:
and identifying the line tail of the line content, automatically removing the space if the line tail has the space, and automatically removing the tab if the line tail has the tab.
The basic format check of the LDIF file can be realized by identifying the line tail of the line content, automatically removing the blank and the tab, so that a programmer only needs to correct the error of the part related to the service when using the LDIF file, and the requirement of related personnel on the format specification of the LDIF file can be reduced.
It is to be understood that in some possible implementations, some other embodiments may include all or part of any of the above-described implementations, as long as they are implemented.
As shown in fig. 2, a structural framework diagram is provided for an embodiment of the present invention of an automatic error correction system for LDIF files, which can be used for automatic error correction and basic format check of LDIF files, the system includes:
an obtaining unit 1, configured to obtain an LDIF source file and perform line reading on the LDIF source file;
the error correction unit 2 is used for analyzing the line content, detecting keywords of the line content if the line content is not the end of the file stream, and correcting errors according to the keywords;
and the updating unit 3 is used for writing the updated content into the LDIF source file after the error correction is finished.
The error correction system provided by the embodiment is suitable for automatic error correction of the LDIF file, the verification of the basic format of the LDIF file and automatic error correction are realized by reading the row content of the LDIF file and then carrying out keyword detection on the row content according to the keyword detection and error correction, a programmer only needs to correct the errors of the part related to the service, the format specification requirements of related personnel on the LDIF file can be reduced, and the LDIF file can be better integrated into a system framework of LDAP for reading after being processed by the method.
Optionally, in some possible embodiments, the error correction unit 2 is specifically configured to identify a keyword of an attribute in the line content, determine whether the keyword of the attribute has a format error, and if so, perform an automated format processing.
By detecting the keywords of the attributes and detecting the format errors of the keywords, whether the information behind the attributes is complete or not can be automatically judged, for example, spaces can be automatically detected, and attribute values can be automatically added after the spaces are added, so that the completeness of the attribute information is ensured, and the accuracy of high automatic error correction can be provided.
Optionally, in some possible embodiments, the error correction unit 2 is further configured to identify a dn entry name in the line content, determine whether a format error exists in the dn entry name, and if so, perform an automated format processing.
By identifying the dn entry name in the line content, whether an empty line exists before line changing can be judged, so that the automatic filling of the empty line is realized, the type and the range of automatic error correction can be improved, and the applicability of the invention is improved.
Optionally, in some possible embodiments, the error correction unit 2 is further configured to recognize a preset symbol in the line content, determine whether a format error exists in the preset symbol, and if so, perform an automated format processing.
By identifying the preset symbols in the line content, the automatic filling of the space behind the specific symbol can be realized, the type and the range of automatic error correction can be further improved, and the applicability of the invention is further improved.
Optionally, in some possible embodiments, the error correction unit 2 is further configured to identify a line end of the line content, and automatically remove a space if the line end has a space, and automatically remove a tab if the line end has a tab.
The basic format check of the LDIF file can be realized by identifying the line tail of the line content, automatically removing the blank and the tab, so that a programmer only needs to correct the error of the part related to the service when using the LDIF file, and the requirement of related personnel on the format specification of the LDIF file can be reduced.
It is to be understood that in some possible implementations, some other embodiments may include all or part of any of the above-described implementations, as long as they are implemented.
It should be understood that the above embodiments are product embodiments corresponding to the method embodiments of the present invention, and the technical solutions of the two embodiments correspond, so that the detailed description of the product embodiments may refer to the above method embodiments, and will not be described herein again.
It is to be understood that the present invention may also provide a storage medium having stored therein instructions, which when read by a computer, cause the computer to execute the automatic error correction method for an LDIF file as described in any of the above embodiments.
It is to be understood that the present invention may also provide an electronic device comprising:
a memory for storing a computer program;
a processor configured to execute the computer program to implement the automatic error correction method for an LDIF file according to any of the above embodiments.
The reader should understand that in the description of this specification, reference to the description of the terms "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described method embodiments are merely illustrative, and for example, the division of steps into only one logical functional division may be implemented in practice in another way, for example, multiple steps may be combined or integrated into another step, or some features may be omitted, or not implemented.
The above method, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention essentially or partially contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
While the invention has been described with reference to specific embodiments, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. An automatic error correction method for LDIF files, comprising:
acquiring an LDIF source file, and reading the LDIF source file line;
analyzing the line content, if the line content is not the end of the file stream, carrying out keyword detection on the line content, and carrying out error correction according to keywords;
and after the error correction is finished, writing the updated content into the LDIF source file.
2. The method as claimed in claim 1, wherein the detecting of the keyword for the line content and the error correction according to the keyword comprise:
and identifying keywords of the attributes in the row content, judging whether the keywords of the attributes have format errors, and if so, performing automatic format processing.
3. The automatic error correction method for an LDIF file according to claim 2, wherein the line contents are subjected to keyword detection and error correction is performed according to keywords, further comprising:
and identifying the dn entry name in the line content, judging whether the dn entry name has a format error, and if so, performing automatic format processing.
4. The automatic error correction method for an LDIF file according to claim 2, wherein the line contents are subjected to keyword detection and error correction is performed according to keywords, further comprising:
and identifying a preset symbol in the row content, judging whether the preset symbol has a format error, and if so, performing automatic format processing.
5. The automatic error correction method for LDIF file as recited in any of claims 2 to 4, wherein said line contents are subjected to keyword detection and error correction is performed according to keywords, further comprising:
and identifying the line tail of the line content, automatically removing the space if the line tail has the space, and automatically removing the tab if the line tail has the tab.
6. An automatic error correction system for LDIF files, comprising:
the acquisition unit is used for acquiring the LDIF source file and reading the LDIF source file line;
the error correction unit is used for analyzing the line content, detecting keywords of the line content if the line content is not the end of the file stream, and correcting errors according to the keywords;
and the updating unit is used for writing the updated content into the LDIF source file after the error correction is finished.
7. The system of claim 6, wherein the error correction unit is specifically configured to identify a keyword of the attribute in the row content, determine whether the keyword of the attribute has a format error, and if so, perform an automated format processing.
8. The system of claim 7, wherein the error correction unit is further configured to identify a dn entry name in the row content, determine whether the dn entry name has a format error, and if so, perform an automated format process.
9. The system of claim 7, wherein the error correction unit is further configured to identify a predetermined symbol in the row content, determine whether the predetermined symbol has a format error, and if so, perform an automatic format process.
10. The system of any of claims 7 to 9, wherein the error correction unit is further configured to identify a line end of the line content, automatically remove a space if the line end has a space, and automatically remove a tab if the line end has a tab.
CN202011271901.6A 2020-11-13 2020-11-13 Automatic error correction method and system for LDIF file Pending CN112363981A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011271901.6A CN112363981A (en) 2020-11-13 2020-11-13 Automatic error correction method and system for LDIF file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011271901.6A CN112363981A (en) 2020-11-13 2020-11-13 Automatic error correction method and system for LDIF file

Publications (1)

Publication Number Publication Date
CN112363981A true CN112363981A (en) 2021-02-12

Family

ID=74515613

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011271901.6A Pending CN112363981A (en) 2020-11-13 2020-11-13 Automatic error correction method and system for LDIF file

Country Status (1)

Country Link
CN (1) CN112363981A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1848851A (en) * 2005-04-14 2006-10-18 国际商业机器公司 Computer and method for establishing light weight catalog access data protocol exchange format fragment
CN106485243A (en) * 2016-10-31 2017-03-08 用友网络科技股份有限公司 A kind of bank slip recognition error correction method and device
CN109492203A (en) * 2018-11-21 2019-03-19 深圳中广核工程设计有限公司 A kind of nuclear power large-scale synthesis reporting format method of calibration and system
CN110968989A (en) * 2018-09-27 2020-04-07 北京国双科技有限公司 Method and device for displaying error correction information on front-end page
CN111680634A (en) * 2020-06-10 2020-09-18 平安科技(深圳)有限公司 Document file processing method and device, computer equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1848851A (en) * 2005-04-14 2006-10-18 国际商业机器公司 Computer and method for establishing light weight catalog access data protocol exchange format fragment
CN106485243A (en) * 2016-10-31 2017-03-08 用友网络科技股份有限公司 A kind of bank slip recognition error correction method and device
CN110968989A (en) * 2018-09-27 2020-04-07 北京国双科技有限公司 Method and device for displaying error correction information on front-end page
CN109492203A (en) * 2018-11-21 2019-03-19 深圳中广核工程设计有限公司 A kind of nuclear power large-scale synthesis reporting format method of calibration and system
CN111680634A (en) * 2020-06-10 2020-09-18 平安科技(深圳)有限公司 Document file processing method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
US7392267B2 (en) Annotation validity using partial checksums
CN109558525B (en) Test data set generation method, device, equipment and storage medium
CN110597771B (en) Method, device, equipment and readable storage medium for quickly importing DBF (digital binary flash) files
CN114090671A (en) Data import method and device, electronic equipment and storage medium
CN114493551B (en) Contract generation method and device, electronic equipment and storage medium
CN115391439B (en) Document data export method, device, electronic equipment and storage medium
US9189478B2 (en) System and method for collecting data from an electronic document and storing the data in a dynamically organized data structure
EP1591914A1 (en) Method, computer program product and device for importing a plurality of data sets into a system
CN112363981A (en) Automatic error correction method and system for LDIF file
CN111290999B (en) Library file self-adaptive matching method, device and computer readable storage medium
CN110764777B (en) ELF file generation method, ELF file, equipment and storage medium
CN112632132A (en) Method, device and equipment for processing abnormal import data
CN112148721A (en) Data checking method and device, electronic equipment and storage medium
CN112231300B (en) Function analysis method and device and electronic equipment
CN117272953B (en) Automatic document information filling method, system and storage medium
CN115545008B (en) Spectrogram file analyzing method, device, equipment and storage medium
CN112364040B (en) Data checking method, device, medium and electronic equipment
CN116681051B (en) Multi-language testing method and device for application program, storage medium and equipment
CN115495483B (en) Data batch processing method, device, equipment and computer readable storage medium
CN117667882A (en) Method and device for checking sql code
CN116166247A (en) Method, medium and device for data verification during excel file importing
CN117149755A (en) Method, system, equipment and storage medium for detecting data quality
CN115687812A (en) Information acquisition method and device and computer readable storage medium
CN114398317A (en) Container read-write method and device, electronic equipment and storage medium
CN112579079A (en) File processing method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 100190 17-19 / F, building a 1, 66 Zhongguancun East Road, Haidian District, Beijing

Applicant after: New Great Wall Technology Co.,Ltd.

Address before: 100190 17-19 / F, building a 1, 66 Zhongguancun East Road, Haidian District, Beijing

Applicant before: GREAT WALL COMPUTER SOFTWARE & SYSTEMS Inc.