A document number search method
Patent Information
- Application Number
- CN202511488133.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-17
- Publication Date
- 2026-11-03
- Estimated Expiration
- 2045-10-17
AI Technical Summary
In existing technologies, the lack of strict naming rules for dual-document publication numbers leads to low retrieval efficiency and a significant impact on system performance, especially when dealing with massive amounts of data, affecting system performance and increasing costs.
A method based on user-defined search rules is provided. The method includes a module for building user-defined search rules, which supports advanced rules and ordinary rules. The search rules are customized according to user needs, and the search is performed in the database by building search tasks. The search process is optimized by combining the task start time specified by the user.
It improves user search efficiency, reduces system load, minimizes the impact of multi-user searches on system performance, and achieves efficient retrieval without requiring hardware upgrades.
Smart Images

Figure CN121412423B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data retrieval technology, specifically to a document number retrieval method. Background Technology
[0002] The "dual disclosure" system refers to a system whereby administrative organs, after making decisions on administrative licenses or penalties, publicly disclose relevant information through government websites and credit platforms. The dual disclosure documents include both the administrative license and administrative penalty disclosure documents. The dual disclosure system has been gradually implemented since 2015. For example... Figure 1 The image shows an example of a dual-publicity document for administrative penalties and administrative licenses. The specific content of the administrative penalty publicity document includes: the name of the administrative counterpart, the administrative penalty decision document number, the facts of the penalty, and the type of penalty. These publicity documents are submitted to the relevant government websites by the issuing department for public display. However, after ten years of use, the amount of publicity documents has become extremely large, especially in some cities with large populations where the number of publicity documents on government websites is in the millions. For various reasons, this historical data of publicity documents still needs to be queried and viewed by users in subsequent work.
[0003] When these public notice documents are uploaded to the system, a dual public notice document number will be entered simultaneously, such as... Figure 1 The document number is the one that has been publicly announced twice. Later, when searching in the database, this document number will also be used as the keyword for retrieval. The naming rule for the document number is: document number prefix + [+year+] + number + sequence number, such as... Figure 1 Examples are provided. However, due to various reasons, although there are naming rules for these document numbers, the rules are not strictly enforced. For instance, whether square brackets should be added around the year varies depending on the historical continuity rules of each uploading department; moreover, the document numbers entered by different users when uploading to the website may be irregular due to human error. This means that when a user needs to retrieve a historical double-publication document, they may need to search repeatedly due to the irregular naming of the document numbers during uploading, which takes a long time. In addition, given the massive amount of historical data, if multiple users are online simultaneously and repeatedly searching for document numbers, it can even lead to a deterioration in the overall system performance. Usually, system performance can be improved by increasing hardware performance, but if system performance is improved solely by upgrading system hardware configuration, the system cost will increase year by year as the amount of data increases. Summary of the Invention
[0004] To address the issues of low efficiency and potential impact on system performance when retrieving public documents with irregular names in existing technologies, this application provides a document number retrieval method that can improve user retrieval efficiency at a lower cost and reduce the probability of user retrieval behavior affecting system performance.
[0005] The solution in this application is as follows: a document number retrieval method, characterized by comprising the following steps: S1: Construct a module for customizing user search rules; The rule customization module allows users to customize search rules according to their actual needs. The search rules include: advanced rules and ordinary rules; The general rules allow users to search using the style data of double-public document naming, and the style data allows users to search according to the naming rules of double-public document numbers, wherein the serial number part of the document number is based on wildcard placeholders; The advanced rules allow users to configure any part of the dual-document number in detail; When customizing the ordinary rules and the advanced rules, the department that submitted the double-publicity document must be entered; S2: Obtain user-defined search rules, denoted as: search rules to be processed; For each of the search rules to be processed, a search task is constructed, and the search task is started according to the task start time specified by the user; the search task is executed to search the database, and the document numbers that meet the search rules are retained and recorded as: the initial search results; S3: The initial search results are processed according to the display rules specified by the user and then saved; S4: Obtain the departments that report double-publicized documents included in the search rules to be processed, search the subordinate departments of the reporting departments in the system, and record the reporting departments and sub-departments together as: supplementary search departments; S5: Based on the supplementary retrieval department, a search is performed in the database. After deleting the content of the initial retrieval result from the obtained retrieval results, the remaining document number data is recorded as: supplementary retrieval result; S6: In the supplementary search results, find all document numbers that do not contain any Chinese characters and save them separately as other groups; record all document numbers that contain Chinese characters as: document numbers to be processed; S7: For all document numbers to be processed, find the last digit of each document number and denote it as the base number; denote all characters before the base number as sorting characters; S8: Sort the document numbers to be processed according to the following method; a1: Grouped according to the uploading department, denoted as: Supplementary Group; a2: For each supplementary group of document numbers, sort all document numbers to be processed using the characters according to the sorting method described above; a3: For document numbers with the same sorting characters, sort them according to the base sequence number; a4: For document numbers where both the base sequence number and the sorting characters are the same, sort them according to the characters following the base sequence number; a5: Randomly sort duplicate document numbers that are exactly the same; S9: Save the sorted document numbers to be processed; S10: Provide the user with the initial search results and the supplementary search results as the results of the search task execution; S11: When a user needs to further search for a document number, the search is performed based on the results of the search task.
[0006] Its further features are: In step S3, the initial search results are processed according to the display rules specified by the user, specifically including the following steps: b1: Determine if the user has selected to display search results sequentially after sorting by serial number; If you choose to sort by serial number consecutively, then proceed to step a3; If you choose not to sort by serial number and then proceed to step a2; b2: Save the initial search results directly without sorting them; b3: Group and sort the search results, extract all duplicate document numbers and save them separately, find all missing document numbers and save the missing document numbers separately; b4: Save the sorted initial search results, duplicate document numbers, and missing document numbers separately, and provide them to the user as search results; Step b3 specifically includes the following steps: c1: Find the last digit of each document number, and denote it as: the base number; All characters preceding the baseline number are designated as sorting characters. c2: Group all document numbers according to the sorting order using characters, denoted as: initial grouping; Sort all groups according to the sorting character to obtain the initial group after inter-group sorting; c3: Randomly select one of the initial groups, denoted as: the group to be processed; Sort all document numbers in the group to be processed according to their sequence number to obtain the initial sorted group to be processed; The number of document numbers included in the group to be processed is denoted as N1; c4: Retrieve the minimum sequence number start and the maximum sequence number end from the document numbers corresponding to the sorted unprocessed group; c5: Initialize i=0, initialize empty arrays Num, RE and Miss; c6: Place the serial numbers in the document numbers into the array Num in ascending order; c7: Compares the difference between two adjacent document numbers in the array Num; temp1 = Num[i] – Num[i+1]; If temp1 is 0, it means that the sequence number of the i-th document number is the same as the sequence number of the (i+1)-th document number, then proceed to step c8; Otherwise, proceed to step c9; c8: Take the index from Num[i+1] and put it into array RE, and shift the indexes after Num[i+1] forward by one position in sequence; Repeat steps c7 to c8; c9: Set i=i+1; Determine if i is equal to N1; If so, it means that all document numbers in the array Num are included in the calculation to obtain the deduplication group; and step c10 is performed on the deduplication group to process missing data. If they are not equal, then repeat steps c7 to c9. c10: Initialize j = 0; Retrieve the number of document numbers included in the array Num, denoted as N2; c11: Compares the sequence numbers of two adjacent document numbers in the array Num; Make temp2 = (Num[j] + 1) - Num[j + 1]; Check if temp2 is 0; If so, it means that the two adjacent serial numbers are arranged in order and there is no missing value in between, then proceed to step c12; Otherwise, it means that there is no missing value in the middle of the two adjacent serial numbers, and step c13 is executed; c12: Set j = j + 1; Determine if j equals N2; If so, it means that all the numbers in the array Num have been included in the calculation, and the sorting process for the group to be processed is completed, resulting in the group after deduplication and missing parts; proceed to step c16. If not, then repeat steps c11~c12. c13: Make x=Num[j]+1, y=Num[j+1]; c14: Put x into array Miss; c15: Make x = x + 1; Determine the magnitudes of x and y; If x=y, it indicates that the missing sequence number at this position has been found, steps c11 to c15 are executed to continue searching for other missing sequence numbers in the array Num; Otherwise, if x<y, it indicates that there are still missing sequence numbers, steps c14 to c15 are executed in a loop; c16: Execute steps c3 to c15 in a loop until all initial groups have participated in the calculation; Save all the post-duplicate-checking and gap-filling groups in the order of the initial groups; Save the sequence numbers in the array RE and array Miss corresponding to each group behind the corresponding post-duplicate-checking and gap-filling group respectively for display to the user; The rule elements in the advanced rules include: rule name, document number prefix, department name, and configurable rule elements; The rule name is a user-defined name, which is used to establish the relationship between the rule and the task when constructing a retrieval task; The document number prefix is the content of the leading field of the user-defined document number; The department name is the name of the uploading department of the document number to be retrieved; The rule elements include: annual rule, monthly rule, sequence number rule, and licensing unit code rule; users are allowed to arrange these rule elements in a custom order, and each rule element includes no less than 1 configuration item; For the annual rule, monthly rule and sequence number rule, the arrangement order set by the user is the retrieval order of the document numbers; In step S2, if the user configures the advanced rule, the method for forming the to-be-processed retrieval rule is as follows: d1: Acquire all rule elements input by the user; d2: Determine the composition of all rule elements input by the user; If only the licensing unit code rule element exists, perform retrieval in the database based on the licensing unit code rule element, and mark the retrieval result as: initial retrieval result; If there are elements other than the licensing unit code rule element, execute step d3; d3: Acquire and save the rule elements associated with the document numbers other than the licensing unit code rule respectively; d4: Generate document number retrieval conditions in sequence according to the order defined by the user on the advanced rule input screen; Assume that the user defines N document number retrieval conditions, which are respectively: ELE1 to ELE N ; d5: Initialize a position tag POS for each piece of data; Set the POS position to the last character of the document number prefix in the string of each document number data; d6: Retrieve each document number from the database one by one, denoted as: document number to be retrieved; d7: Obtain the document number prefix input by the user, and determine whether the document number to be retrieved starts with the document number prefix; If the document number to be retrieved does not begin with a document number prefix, processing of this data entry will be stopped. If the document number to be retrieved starts with a document number prefix, then proceed to step d8; d8: Sets the POS pointer to the last character of the document number prefix of the document number to be retrieved; Continue searching for the document number, sequentially executing the document number search criteria ELE1~ELE1. N Each time a search is performed, if the document number to be searched meets the search criteria, POS will be set to the start position of the next search. When the document number to be retrieved completely satisfies all the search criteria, the document number to be retrieved is retained; d9: Repeat steps d6 to d8 until all data in all databases are included in the calculation; d9: Retain all data that meets the search criteria, and record the final search results as: initial search results; In step S2, if the user has configured the general rules, the method for constructing the retrieval rules to be processed is as follows: e1: Get the content of the style data input by the user; Initialize a location label POS for each piece of data; set the initial position of the POS to the first character of the document number; e2: The symbol * in the style data represents a wildcard for the sequence number. Confirm the position of the wildcard *. e3: All characters before the first asterisk (*) are designated as the string for the first search; all characters after the last asterisk (*) are designated as the string for the second search. e4: Retrieve each document number from the database one by one, denoted as: document number to be retrieved; e5: For the document number to be retrieved, compare it with each character of the search string, starting from the first character; If the document number to be retrieved begins with the first search string, then POS is set to the position of the last character of the first search string in the document number to be retrieved, and step e6 is executed; Otherwise, stop processing this document number; proceed to step e9; e6: Confirm whether the last character after POS in the document number to be retrieved is a number; If so, proceed to step e7; If not, stop processing this document number; proceed to step e9; e7: Obtain the first group of consecutive numbers after POS from the document number to be processed, denoted as: serial number string; wherein the number of numbers in the serial number string is greater than or equal to 1; Set POS to point to the last character of the sequence number string; e8: Retrieves all characters following the POS number of the document to be retrieved, denoted as: the string to be confirmed; Compare the string to be confirmed with the string used for secondary retrieval; If the two are exactly equal, retain the document number to be retrieved; proceed to step e9; If the two are not equal, stop processing the document number for this clause; proceed to step e9; e9: Repeat steps e4 to e5 until all document numbers in the database are included in the calculation; Retain all data that meets the search criteria, and record all the retained document numbers as: the initial search results; In step d7, when generating document number search criteria based on the year rule, the method for executing the document number search criteria is as follows: f1: Get the value of the year entered by the user, denoted as: the value of the year to be searched; f2: Determines if a separator character exists before the year value; If it does not exist, proceed to step f3; If it exists, the character to be searched will be denoted as: the character to be searched; Search for the character to be searched within the characters following POS in the document number to be searched; The search was successful; POS points to the last character of the month separator being searched. Execute f3. If no results are found, processing of this data entry will cease. f3: Determines whether parentheses are set in the annual rules; If not set, proceed to step f6; If parentheses are set, search for the first set of parentheses appearing in the characters after POS of the document number to be searched; if they can be found, proceed to step f4; if they cannot be found, stop processing this data entry. f4: Get the character between the two parentheses and denote it as: the year to be compared; proceed to step f5; The search year value and the comparison year are matched and compared. Both are the same; set POS to the parentheses after the year and execute step f5. If the two are different, stop processing this data entry; f5: Retrieve the value of the year to be retrieved from the characters following POS in the document number to be retrieved; If the result is found, set POS to the last digit of the year value to be retrieved; complete the retrieval of this data according to the year rule. If no results are found, processing of this data entry will cease. In step d7, when document number search criteria are generated based on monthly rules, the execution method for these criteria is as follows: g1: Determines whether the user has selected a month; If a month is selected, proceed to step g2; Otherwise, if no month is set, then a date must be set, and step g5 will be executed; g2: Get the separator set before the month; If no delimiter is set, then a delimiter string must have been set before the month, proceed to step g3; If a separator is set, the separator will be denoted as: separator for the month to be retrieved; Search for the month separator in the characters following the POS of the document number to be searched; The search was successful; POS points to the last character of the month separator being searched. Execute g4. If no results are found, processing of this data entry will cease. g3: Get the delimiter string and denote it as: the delimiter string for the month to be searched; Search for the month-separating string within the characters following the POS of the document number to be searched; If the search is successful, set POS to the last character of the month separator to be searched; execute g4; If no results are found, processing of this data entry will cease. g4: Search by month; In the character set of the document number to be retrieved, confirm whether the character after POS is a number; If so, find all consecutive numbers and set POS to point to the last element of the number string; execute g5; If the character following POS is not a number, then processing of this data entry will stop. g5: Determines whether the user has selected a date; If no selection is made, the search based on this month's rules will be completed; If a date is selected, proceed to step g6; g6: Confirm whether a separator has been set before the date; If no delimiter is set, then a Chinese character string for delimiting must have been set before the date; proceed to step g7. If a separator is set before the date, the separator will be denoted as: date separator to be retrieved; Search for the date separator in the characters following the POS of the document number to be searched; If the result is found, then set POS to the last character of the date separator to be retrieved and proceed to step g8; If no results are found, processing of this data entry will cease. g7: Retrieves the Chinese character string used as a separator for the date set before it, and records the string as: the separator string for the date to be retrieved; Search for the date separator string within the characters following the POS of the document number to be searched; If the result is found, then set POS to the last character of the date separator string to be retrieved and execute step g8; If no results are found, processing of this data entry will cease. g8: Search by date; In the character set of the document number to be retrieved, confirm whether the character after POS is a number; If so, find all consecutive numbers and set POS to the last element of the number string; complete the retrieval based on this month's rules. If the character following POS is not a number, then processing of this data entry will stop. In step d7, when generating document number search conditions based on the sequence number rule, the execution method for the document number search conditions is as follows: h1: Initialize a split element by setting Sep to 0; h2: Determine if a squadron number exists; If it exists, proceed to step h3; If it does not exist, proceed to step h4; h3: Get the detachment number value input by the user, denoted as: detachment number to be searched; search for the detachment number to be searched in the characters after POS of the document number to be searched; If the branch number can be retrieved, then POS is set to the last digit of the branch number to be retrieved, Sep = Sep + 1, and step h4 is executed. If no results are found, processing of this data entry will cease. h4: Confirm whether a separator has been set before the serial number; If no delimiter is set, further confirm whether a delimiter string is set before the sequence number, and proceed to step h5; If a separator is set, the symbol is recorded as: the sequence number symbol to be searched; search for the sequence number symbol to be searched in the characters after POS of the document number to be searched; if it can be found, then set POS to the last position of the sequence number symbol to be searched, Sep = Sep + 1, and execute step h5; If no results are found, processing of this data entry will cease. h5: Confirm whether a separator string has been set before the serial number; If no delimiter string is set, further confirm whether parentheses are set before the sequence number, and proceed to step h6; If a delimiter string is set, then delimiter string is denoted as: the sequence number string to be searched; search for the sequence number string to be searched in the characters after POS of the document number to be searched; if it can be found, then set POS to the last character of the sequence number string to be searched, Sep = Sep + 1, and execute step h6; if it cannot be found, then stop processing this data. h6: Check if Sep is 0. If it is not 0, proceed to step h7. If Sep is 0, proceed to step h8; h7: Confirm whether the user has set the serial number in parentheses; If the user does not set the serial number in parentheses, proceed to step h12 to confirm whether there is a separator in the serial number; If the user selects a serial number in parentheses, proceed to step h8; h8: Search for parentheses in the characters following the POS of the document number to be searched; If parentheses can be found, record the first group of parentheses as: numbered parentheses; proceed to step h9; If the parentheses cannot be found, processing of this data entry will stop. h9: Confirm whether there is a separator in the serial number; If the user selects a sequence number containing a separator, then proceed to step h11; If the user does not select a sequence number containing a separator, proceed to step h10; h10: Get the serial number using the characters between the parentheses, and determine if it contains only numbers; If the parentheses contain only numbers, then POS is set to the last parenthesis of the sequence number parentheses to complete the retrieval of the document number based on the sequence number rule. Otherwise, stop processing this data entry; h11: Gets the character between two parentheses and determines whether the character contains only separators and numbers; If so, then point POS to the last set of parentheses containing the serial number to complete the serial number-based retrieval of the document number to be retrieved. If not, then stop processing this data entry; h12: Confirm whether there are separators in the serial numbers for which parentheses are not set; If the sequence number does not contain a separator, proceed to step h15; If a separator exists in the serial number, search for the separator in the characters after POS of the document number to be searched; if it can be found, record it as: serial number with separator; proceed to step h13; h13: Get the characters between POS and the sequence number separated by the separator, denoted as: the first sequence number; get the characters after the separator of the sequence number, denoted as: the second sequence number; Determine if both the preceding and following serial numbers are numbers; If not, then stop processing this data entry; If all the numbers are numbers, then proceed to step h14; h14: Retrieves the latter half of the sequence number; Starting from the position after the separator in the serial number, obtain the first group of consecutive numbers, denoted as: the serial number post-sequence number string; set POS to point to the last position of the serial number post-sequence number string to complete the serial number-based retrieval of the document number to be retrieved; h15: Confirm whether the first character after POS in the document number to be retrieved is a number; If so, retrieve the first group of consecutive numbers starting from the first position after POS, denoted as: the serial number string; point POS to the last position of the serial number string to complete the retrieval of the document number based on the serial number rule. If the first character after POS is not a number, then processing of this data entry will stop.
[0007] This application provides a document number retrieval method that offers users two types of customized retrieval rules: ordinary rules and advanced rules. Users can choose the appropriate retrieval rules based on their specific needs. When a user knows the document number to be retrieved (including both official and public notice documents), they can use ordinary rules to search for the serial number based on the naming rules for such documents. If the user cannot accurately retrieve the target document number using ordinary rules, they can configure the retrieval rules in detail using advanced rules. Simultaneously, based on the user-defined retrieval rules, the system performs supplementary searches based on the reporting departments of the documents included in the user's input, compensating for any non-duplication considerations made by the user when customizing the retrieval rules. Finally, the initial retrieval results and supplementary retrieval results configured by the user are provided to the user as the retrieval task execution result. Subsequent searches for document numbers by the user will be based on the data in the retrieval task execution result. In this method, only the initial search is based on all data. Subsequent searches by the user are limited to a small range based on the search task's execution results, eliminating the need for each search to be based on massive amounts of data. This effectively improves user search efficiency and reduces system load. Even if multiple users simultaneously use the database for searches, it will not impact system performance. Furthermore, this application constructs a search task for each search rule, allowing users to configure task start times. Users can initiate search tasks during off-peak hours as needed, completing searches based on all data, further reducing the impact of user search behavior. This method does not require improvements to system hardware performance and can reduce the probability of user search behavior affecting system performance at a relatively low cost. Attached Figure Description
[0008] Figure 1 Existing examples of documents with dual public disclosure; Figure 2 This is a flowchart of the document number retrieval method in this application; Figure 3 Flowchart for specifying display rules for users; Figure 4 Flowchart for plagiarism detection and correction; Figure 5 Example of editing a screen for general rules; Figure 6 Example of an advanced rule editing screen; Figure 7 Example of a monthly rules editing screen; Figure 8 Example of an annual rules editing screen; Figure 9 Example of editing the serial number rules; Figure 10 Example of a screen for editing licensed entity code rules; Figure 11 Example of a task list screen; Figure 12 Example of a task editing screen; Figure 13 Here is an example of the query results; Figure 14 Example of a screen displaying a missing document number. Detailed Implementation
[0009] like Figure 2 As shown, this application includes a document number retrieval method, which includes the following steps.
[0010] S1: Construct a module for customizing user search rules; The rule customization module allows users to customize search rules according to their actual needs; Search rules include: advanced rules and general rules; like Figure 5 As shown, the ordinary rules allow users to search using the style data of the document naming with double publication, and the style data allows users to search according to the naming rules of the document number with double publication, where the serial number part of the document number is based on wildcard placeholders; like Figure 6 As shown, advanced rules allow users to configure any part of the dual-document number in detail.
[0011] Because the reporting department of the user ID uploaded when uploading document numbers is verifiable, users must enter the reporting department of the double-published documents when customizing general and advanced rules before searching. The reporting department defines the most basic scope of data retrieval.
[0012] The naming rules for double-publicized document numbers involved in this method are: document number prefix + year + number + serial number + number. Details such as whether there are square brackets or parentheses before and after the year can be configured by the user in the year rules of advanced search.
[0013] This method provides users with the option to edit custom search rules. Users input search keywords in the editing screen, specifying the corresponding items in the double-document number. Then, based on the keywords entered by the user, the background generates search code. The specific search code is implemented based on existing technology. In this embodiment, after reading the user-set rules, the system matches the user-set keywords and keyword positions to generate regular expressions, and performs the search based on these regular expressions. This method guides users to set search rules in the expected order through the editing screen, reducing the difficulty of generating search rules in the background, improving search efficiency, and making the search results more in line with user expectations. (Refer to...) Figures 5-9 All of them are marked in red with "Elements are ordered according to selection order" to remind users to pay attention to the order in which they make their selections.
[0014] S2: Obtain user-defined search rules, denoted as: search rules to be processed.
[0015] For each search rule to be processed, a search task is constructed. The search task is started according to the user-specified task start time. The search task is executed to search the database, and the document numbers that match the search rules are retained and recorded as: the initial search results. The search task is implemented based on the task and starts and executes according to the user-specified task start time.
[0016] In this embodiment, webpage content is built using HTML5, user interaction events are handled using JavaScript, requests are received and responses are generated using Java, data interfaces are provided, database-related time processing is handled, and business logic is processed. Specific details are implemented based on existing technologies. In this embodiment, scheduled retrieval tasks can be executed using taskScheduler.schedule. Figure 11 This is an example of a task list screen, opened using the "Add Task" button in the upper right corner. Figure 12 The task editing screen shown allows users to select either an advanced rule or a regular rule previously created by the rule name, and then select the execution time of the task by querying the start time.
[0017] User-defined search rules include: advanced rules and ordinary rules.
[0018] In step S2, such as Figure 5 The image shown is an example of a standard rule editing screen. If the user has configured standard rules, the method for constructing the search rules to be processed is as follows: e1: Get the content of the style data input by the user; Initialize a location label POS for each data entry; set the initial position of the POS to the first character of the document number; e2: The symbol * in the style data represents a wildcard for the sequence number. Confirm the position of the wildcard *. e3: All characters before the first asterisk (*) are designated as the string for the first search; all characters after the last asterisk (*) are designated as the string for the second search. e4: Retrieve each document number from the database one by one, denoted as: document number to be retrieved; e5: For the document number to be retrieved, compare it with each character of the search string, starting from the first character; If the document number to be retrieved begins with a search string, then POS is set to the position of the last character of the search string in the document number to be retrieved, and step e6 is executed; Otherwise, stop processing this document number; proceed to step e9; e6: Confirm whether the last character after POS in the document number to be retrieved is a number; If so, proceed to step e7; If not, stop processing this document number; proceed to step e9; e7: Obtain the first group of consecutive numbers after POS in the document number to be processed, denoted as: serial number string; where the number of numbers in the serial number string is greater than or equal to 1; Set POS to point to the last character of the sequence number string; e8: Retrieves all characters following the POS number of the document to be retrieved, denoted as: the string to be confirmed; Compare the string to be confirmed with the string used in the secondary search; If the two are exactly equal, retain the document number to be retrieved; proceed to step e9; If the two are not equal, stop processing the document number for this clause; proceed to step e9; e9: Repeat steps e4 to e5 until all document numbers in the database are included in the calculation; Retain all data that meets the search criteria, and record all the retained document numbers as: the initial search results.
[0019] For user-defined general rules, the system will strictly follow the style data configured by the user, including the characters before and after the wildcard asterisk (*), to achieve the retrieval.
[0020] Assuming the user-configured style data is: Fenglin Penalty Decision No.
[2025] *, then the initial search results might be: Fenglin Penalty Decision No. 1 of 2025, Fenglin Penalty Decision No. 11 of 2025, and Fenglin Penalty Decision No. 110 of 2025.
[0021] The Fenglin Penalty Decision No. 1-10 of 2025, Fenglin Penalty Decision No. 110 of 2025, or Fenglin Penalty Decision No. 110 of 2025 will all be judged as style data that does not conform to the user's configuration.
[0022] If the user-configured style data is: Langwei Huanzi 2025 No. **, then the initial search results may be: Langwei Environmental Protection Bureau Notice No. 2 of 2025, Langwei Environmental Protection Bureau Notice No. 14 of 2025, and Langwei Environmental Protection Bureau Notice No. 142 of 2025.
[0023] If the user has configured advanced rules, the details of the user's configuration need to be carefully examined and confirmed.
[0024] The rule elements in advanced rules include: rule name, document number prefix, department name, and rule elements that can be configured. The rule name is a user-defined name used to establish the relationship between rules and tasks when constructing retrieval tasks; The document number prefix is a user-defined field at the beginning of the document number. For example, for document number: Fenglin Fajuezi
[2025] No. 24, the user can use "Fenglin Fajuezi" (the part before the year) as the document number prefix, or "Fenglin", "Fenglin Fajuezi [", or "Fenglin Fajuezi
[2025] " as the document number prefix. When the system searches, it will use the document number prefix as the starting field for searching the document number.
[0025] The department name is the name of the department that uploaded the document with the document number to be retrieved; Specifically, such as Figure 6 As shown, in the advanced rule editing screen, users can add rule elements as needed via the "Add" button (1). Each rule element can be selected from the dropdown list (2). The specific rule elements that can be added are set according to the actual situation.
[0026] The rule elements in this embodiment include: annual rules, monthly rules, sequence number rules, and license unit code rules; users are allowed to select at least one rule element according to their needs; users are allowed to arrange these rule elements in a custom order, and each rule element includes more than or equal to one configuration item; for annual rules, monthly rules, and sequence number rules, the arrangement order set by the user is the data retrieval order.
[0027] like Figure 10 As shown, the rules for licensing entity codes involve inputting the licensing entity code. The public notice documents for administrative license types involve the administrative agency that approved the administrative license; this approving agency has a corresponding licensing entity code in the system. The specific licensing entity code for each uploading department can be found in the system.
[0028] In this method, for the rule elements associated with document numbers—year rule, month rule, and sequence number rule—the order specified by the user is the order of the content following the prefix of the target document number. Therefore, the document numbers must be retrieved strictly according to the order specified by the user. The specific process of generating a retrieval method based on advanced rules is as follows.
[0029] In step S2, if the user has configured advanced rules, the method for constructing the search rules to be processed is as follows: d1: Retrieves all rule elements input by the user; d2: Determine the composition of all rule elements input by the user; If only the licensee code rule element exists, then a search is performed in the database based on the licensee code rule element, and the search result is recorded as: the initial search result; If there are elements other than the license unit code rule elements, proceed to step d3; d3: Save the rule elements associated with document numbers other than the licensing unit code rule separately; d4: Generate document number search criteria sequentially according to the order defined by the user in the advanced rule input screen; Suppose the user defines N document number search criteria, namely: ELE1~ELE N ; d5: Initialize a location tag POS for each data entry; Set the POS position to the last character of the document number prefix in the string of each document number data; d6: Retrieve each document number from the database one by one, denoted as: document number to be retrieved; d7: Obtain the document number prefix entered by the user and determine whether the document number to be searched starts with the document number prefix; If the document number to be retrieved does not begin with a document number prefix, stop processing for this data entry. If the document number to be retrieved starts with a document number prefix, then proceed to step d8; d8: Sets the POS pointer to the last character of the document number prefix of the document number to be retrieved; Continue searching for the document number, sequentially executing the document number search criteria ELE1~ELE1. N Each time a search is performed, if the document number to be searched meets the search criteria, POS will be set to the start position of the next search. When the document number to be retrieved completely satisfies all the search criteria, the document number to be retrieved is retained; d9: Repeat steps d6 to d8 until all data in all databases are included in the calculation; d9: Retain all data that meets the search criteria, and the final search results will be called: initial search results.
[0030] This method requires searching massive amounts of data. To improve search efficiency, the user-input rule elements are used to construct search tasks, which are then executed separately for each piece of data. The search stops immediately upon finding data that does not conform to the search rules. For complex conditions composed of multiple rule elements, most data is confirmed to be non-compliant before all conditions are executed. In the editing screen, the order of user input determines the execution order of search keywords, allowing for convenient generation of search formulas in the background. During the search, document number strings are placed in an array and searched sequentially from beginning to end. A position label (POS) is set for each document number, indicating the completion position of each search and specifying the starting position for the next search element. This highly efficient approach to searching each piece of data improves the overall search efficiency of the database.
[0031] like Figure 8 As shown, when editing the annual rules, you need to enter the specific annual value in the "Annual Value Type" input box. The year in the document number may or may not be enclosed in parentheses, and may be preceded by a special symbol - for example, Fenglin Fajuezi
[2025] No. 10, Fenglin Fajuezi 2025 No. 10, Fenglin Fajuezi-202510; the system will set the rule content that users can configure according to the actual situation to ensure that it can make judgments for different situations; after the user configures the rules, the system will generate different search methods according to the situation configured by the user. Specifically, in step d7, when the system background generates document number search conditions based on the annual rules, the execution method of the document number search conditions is as follows.
[0032] f1: Get the value of the year entered by the user, denoted as: the value of the year to be searched; f2: Determines if a separator character exists before the year value; If it does not exist, proceed to step f3; If it exists, the character to be searched will be denoted as: the character to be searched; Search for the character to be searched within the characters following POS in the document number to be searched; The search was successful; POS points to the last character of the month separator being searched. Execute f3. If no results are found, processing of this data entry will cease. f3: Determines whether parentheses are set in the annual rules; If not set, proceed to step f6; If parentheses are set, search for the first set of parentheses appearing in the characters after POS of the document number to be searched; if they can be found, proceed to step f4; if they cannot be found, stop processing this data entry. f4: Obtain the characters between the two parentheses, which are recorded as: the year to be compared; Match and compare the value of the year to be retrieved with the year to be compared; If the two are the same, point POS to the parenthesis after the year; execute step f5; If the two are different, stop processing this piece of data; f5: Retrieve the value of the year to be retrieved from the characters following POS in the document number to be retrieved; If the retrieval is successful, point POS to the last digit of the value of the year to be retrieved; complete the retrieval of this piece of data regarding the annual rule; If the retrieval fails, stop processing this piece of data.
[0033] Regarding the monthly rule, since some document numbers are issued once a month, the relevant document numbers will contain the month, for example: Fenglin Fa Jue Zi [2025-01] No. 1, Fenglin Fa Jue Zi 2025 No. F01. As Figure 7 shown, it is an example of the monthly rule editing screen. In this embodiment, the user is supported to edit the retrieval content of the month and date in the document number, which is performed on the monthly rule editing screen.
[0034] The user can edit the month and date in the monthly rule screen. The specific details of the date and month retrieval configuration are summarized from historical data; they can also be set according to the request made by the user. The preset editing logic in this embodiment is: at least one of the month and the date is selected as yes, and both can be selected as yes at the same time. When both the month and the date are selected as yes, a separation character will definitely be set before the month and before the date, and the separation character can be "-" or "No. / No.F"; but one of "-" and "No. / No.F" must be set. Specifically, in step d7, when generating the document number retrieval condition based on the monthly rule, the execution method of the document number retrieval condition is as follows.
[0035] g1: Determine whether the user has selected the month; If the month is selected, execute step g2; Otherwise, if the month is not set, the date must be set, and step g5 is executed; g2: Obtain the separation symbol set before the month; If no separation symbol is set, a separation string must be set before the month, and step g3 is executed; If the separation symbol is set, the symbol is recorded as: the month separation symbol to be retrieved; Retrieve the month separation symbol to be retrieved from the characters following POS in the document number to be retrieved; If the retrieval is successful, POS points to the last bit of the month separator to be retrieved; execute g4; If the retrieval fails, the processing of this piece of data is stopped; g3: Obtain the split string, and record the split string as: the month split string to be retrieved; Retrieve the month split string to be retrieved from the characters following POS in the document number to be retrieved; If the retrieval is successful, POS points to the last bit of the month separator to be retrieved; execute g4; If the retrieval fails, the processing of this piece of data is stopped; g4: Perform retrieval for the month; Among the characters included in the document number to be retrieved, confirm whether the character immediately following POS is a digit; If yes, find all consecutive digits, make POS point to the last bit of the digit string; execute g5; If the character immediately following POS is not a digit, the processing of this piece of data is stopped; g5: Determine whether the user has selected a date; If not selected, the retrieval based on the current monthly rule is completed; If a date is selected, execute step g6; g6: Confirm whether the separator "-" is set before the date; If no separator is set, the Chinese character string for separation "第" or "第F" must be set before the date, execute step g7; If a separator is set before the date, record the symbol as: the date separator to be retrieved; Retrieve the date separator to be retrieved from the characters following POS in the document number to be retrieved; If the retrieval is successful, make POS point to the last bit of the date separator to be retrieved, execute step g7; If the retrieval fails, the processing of this piece of data is stopped; g7: Obtain the Chinese character string for separation set before the date, and record the string as: the date split string to be retrieved; Retrieve the date split string to be retrieved from the characters following POS in the document number to be retrieved; If the retrieval is successful, make POS point to the last bit of the date split string to be retrieved, execute step g8; If the retrieval fails, the processing of this piece of data is stopped; g8: Perform retrieval for the date; Among the characters included in the document number to be retrieved, confirm whether the character immediately following POS is a digit; If yes, find all consecutive digits, and point POS to the last digit of the digit string; complete the retrieval based on the current monthly rule; If the character immediately after POS is not a digit, the processing of this piece of data is stopped.
[0036] As Figure 9 shown, when entering the serial number rule editing, the possible separating elements existing before the serial number include: "detachment serial number", "-", "Di / DiF" and braces {}, and one of these four elements is definitely set as valid, of course, several of these four separating elements may also appear at the same time. On the basis that one separating element must exist, a separator "-" may exist in the serial number. Specifically, in step d7, when generating the document number retrieval condition based on the serial number rule, the execution method for the document number retrieval condition is as follows.
[0037] h1: Initialize a separating element flag Sep to 0; the Sep flag is used to count how many of the four separating elements have appeared; h2: Determine whether the detachment serial number exists; If it exists, execute step h3; If it does not exist, execute step h4; h3: Obtain the value of the detachment serial number input by the user, which is recorded as: the to-be-retrieved detachment serial number; retrieve the to-be-retrieved detachment serial number from the characters after POS in the to-be-retrieved document number; If the detachment serial number can be retrieved, point POS to the last digit of the to-be-retrieved detachment serial number, set Sep=Sep+1, and execute step h4; If it cannot be retrieved, the processing of this piece of data is stopped; h4: Confirm whether the separator "-" is set before the serial number; If no separator is set, further confirm whether the separating string "Di / DiF" is set before the serial number, and execute step h5; If the separator is set, record the symbol as: the to-be-retrieved serial number symbol; retrieve the to-be-retrieved serial number symbol from the characters after POS in the to-be-retrieved document number; if it can be retrieved, point POS to the last digit of the to-be-retrieved serial number symbol, set Sep=Sep+1, and execute step h5; If it cannot be retrieved, the processing of this piece of data is stopped; h5: Confirm whether the separating string "Di" or "DiF" is set before the serial number; If no separating string is set, further confirm whether braces are set before the serial number, and execute step h6; If a delimiter string is set, then delimiter string is denoted as: the sequence number string to be searched; search for the sequence number string to be searched in the characters after POS of the document number to be searched; if it can be found, then set POS to the last character of the sequence number string to be searched, Sep = Sep + 1, and execute step h6; if it cannot be found, then stop processing this data. h6: Check if Sep is 0. If it is not 0, proceed to step h7. If Sep is 0, it means that none of the preceding splitting elements exist, then parentheses must exist, and step h8 should be executed; h7: Confirm whether the user has set the serial number in parentheses; If the user does not set the serial number in parentheses, proceed to step h12 to confirm whether the serial number contains the separator "-". If the user selects a serial number in parentheses, proceed to step h8; h8: Search for parentheses in the characters following the POS of the document number to be searched; If parentheses can be found, record the first group of parentheses as: numbered parentheses; proceed to step h9; If the parentheses cannot be found, processing of this data entry will stop. h9: Confirm whether there is a separator in the serial number; If the user selects a sequence number containing a separator, then proceed to step h11; If the user does not select a sequence number containing a separator, proceed to step h10; h10: Get the serial number using the characters between the parentheses, and determine if it contains only numbers; If the parentheses contain only numbers, then POS is set to the last parenthesis of the sequence number parentheses to complete the retrieval of the document number based on the sequence number rule. Otherwise, stop processing this data entry; h11: Gets the character between two parentheses and determines whether the character contains only separators and numbers; If so, then point POS to the last set of parentheses containing the serial number to complete the serial number-based retrieval of the document number to be retrieved. If not, then stop processing this data entry; h12: Confirm whether the sequence number without parentheses contains the separator "-"; If the sequence number does not contain the separator "-", proceed to step h15; If the serial number contains a separator “-”, then search for the separator in the characters after POS of the document number to be searched; if it can be found, record it as: serial number with separator; proceed to step h13; h13: Get the characters between POS and the sequence number separated by the separator, denoted as: the first sequence number; get the characters after the separator of the sequence number, denoted as: the second sequence number; Determine if both the preceding and following serial numbers are numbers; If not, then stop processing this data entry; If all the numbers are numbers, then proceed to step h14; h14: Retrieves the latter half of the sequence number; Starting from the position after the separator in the serial number, obtain the first group of consecutive numbers, denoted as: the serial number post-sequence number string; set POS to point to the last position of the serial number post-sequence number string to complete the serial number-based retrieval of the document number to be retrieved; h15: Confirm whether the first character after POS in the document number to be retrieved is a number; If so, retrieve the first group of consecutive numbers starting from the first position after POS, denoted as: the serial number string; point POS to the last position of the serial number string to complete the retrieval of the document number based on the serial number rule. If the first character after POS is not a number, then processing of this data entry will stop.
[0038] S3: Save the initial search results after processing them according to the display rules specified by the user.
[0039] exist Figure 9 The serial number editing screen shows a setting option: "Does the serial number have continuity?" Users can choose whether to display search results consecutively by setting this option. If the user selects "Yes," the system will first identify duplicate and missing document numbers in the search results, remove duplicates and fill in the gaps, and then display the duplicate and missing document numbers separately. Other search results will be displayed in sequential order according to their document numbers. The purpose of this "Does the serial number have continuity?" setting is to provide a logical output of the user's search results, ensuring that users can find their target document numbers more efficiently and facilitating reporting to relevant departments for error correction. Figure 9 This is the selection screen for whether the serial numbers are consecutive in the advanced editing section. For regular editing, the system also provides a screen where users can set whether the serial numbers are consecutive. Regardless of whether it's an advanced or regular rule, if the user selects "No" for "Whether the serial numbers are consecutive," the search results will be displayed directly in the order they were retrieved. If the user selects "Yes" for "Whether the serial numbers are consecutive," it means the user has specified a display rule.
[0040] In step S3, the initial search results are processed according to the display rules specified by the user, such as... Figure 3As shown, the specific steps include:
[0041] b1: Determine if the user has selected to display search results sequentially by serial number; if the user has selected sequential display, the system needs to search for duplicate and missing data in the background based on the serial number. If necessary, proceed to step a3; If not required, proceed to step a2; b2: Save the initial search results directly without sorting them; b3: Group and sort the search results, extract all duplicate document numbers and save them separately, find all missing document numbers and save the missing document numbers separately; b4: Save the sorted initial search results, duplicate document numbers, and missing document numbers separately, and provide them to the user as part of the search results. For example... Figure 14 Example of a screen displaying a missing document number.
[0042] The method for checking and filling in duplicates in step b3 is as follows: Figure 4 As shown, the specific steps include: c1: Find the last digit of each document number, and denote it as: the base number; All characters preceding the pivot number are designated as sorting characters. c2: Group all document numbers by character according to the sorting order, denoted as: initial grouping; Sort all groups according to the sorting character to obtain the initial groups after sorting between groups; The sorting in this method uses characters including Chinese characters, numbers, symbols, and English letters, and employs existing sorting algorithms to implement the sorting process. The specific order can be based on Unicode code point order, or it can be specified as needed using a complex sorting method, such as: numbers > English letters > symbols > Chinese characters. Numbers are sorted lexicographically, English letters are sorted alphabetically, symbols are sorted according to Unicode, and Chinese characters are sorted by pinyin.
[0043] c3: Select any initial group, denoted as: the group to be processed; Sort all document numbers in the group to be processed according to their sequence number to obtain the initial sorted group to be processed; The number of document numbers included in the group to be processed is denoted as N1; c4: Retrieve the minimum sequence number start and the maximum sequence number end from the document numbers corresponding to the sorted unprocessed group; c5: Initialize i=0, initialize empty arrays Num, RE and Miss; c6: Place the serial numbers in the document numbers into the array Num in ascending order; c7: Compares the difference between two adjacent document numbers in the array Num; temp1 = Num[i] – Num[i+1]; If temp1 is 0, it means that the sequence number of the i-th document number is the same as the sequence number of the (i+1)-th document number, then proceed to step c8; Otherwise, proceed to step c9; c8: Take the index from Num[i+1] and put it into array RE, and shift the indexes after Num[i+1] forward by one position in sequence; Repeat steps c7 to c8; c9: Set i=i+1; Determine if i is equal to N1; If so, it means that all document numbers in the array Num are included in the calculation to obtain the deduplication group; then, step c10 is executed on the deduplication group to handle missing data. If they are not equal, then repeat steps c7 to c9. c10: Initialize j = 0; Retrieve the number of document numbers included in the array Num, denoted as N2; c11: Compares the sequence numbers of two adjacent document numbers in the array Num; Make temp2 = (Num[j] + 1) - Num[j + 1]; Check if temp2 is 0; If so, it means that the two adjacent serial numbers are arranged in order and there is no missing value in between, then proceed to step c12; Otherwise, it means that there is no missing value in the middle of the two adjacent serial numbers, and step c13 is executed; c12: Set j = j + 1; Determine if j equals N2; If so, it means that all the numbers in the array Num have been included in the calculation, and the sorting process for the group to be processed is completed, resulting in the group after deduplication and missing parts; proceed to step c16. If not, then repeat steps c11~c12. c13: Make x=Num[j]+1, y=Num[j+1]; c14: Put x into array Miss; c15: Make x = x + 1; Determine the magnitudes of x and y; If x=y, it means that the missing index has been found. Then execute steps c11~c15 to continue searching for other missing indexes in the array Num. Otherwise, if x<y, it indicates that there are still missing sequence numbers, and steps c14 to c15 are executed in a loop; c16: Execute steps c3 to c15 in a loop until all initial groups participate in the calculation; Save all groups after duplicate checking and missing supplement in the order of the initial groups; The sequence numbers in the array RE and the array Miss corresponding to each group are respectively stored behind the corresponding group after duplicate checking and missing supplement and displayed to the user.
[0044] S4: Acquire the reporting department of the double-publicity documents included in the to-be-processed search rule, search the subordinate departments of the reporting department in the system, and record the reporting department and the subordinate departments together as: supplementary search department.
[0045] For example Figure 13 herein, the XXX Natural Resources and Planning Bureau on the left is the reporting department, and the XX Branch of the XXX Natural Resources and Planning Bureau is the subordinate department.
[0046] S5: Perform a search in the database based on the supplementary search department, delete the content of the initial search result from the obtained search results, and record the remaining document number data as: supplementary search result. In this application, the supplementary search result is used to make up for the part that is not fully considered when the user customizes the search condition, so as to narrow the data range for the user's subsequent search as effectively as possible.
[0047] S6: Find all document numbers that do not contain any Chinese characters in the supplementary search result, and save them separately as other groups; record all document numbers containing Chinese characters as: to-be-processed document numbers. For example Figure 13 in the example shown, the document number of the administrative licensing decision displayed is a full-digit document number.
[0048] S7: For all to-be-processed document numbers, find the last digit of each to-be-processed document number, and record it as: reference sequence number; record all characters before the reference sequence number as: sorting character.
[0049] S8: Sort the to-be-processed document numbers according to the following method; a1: Group by upload department, and record as: supplementary group; a2: For the document numbers in each supplementary group, sort all to-be-processed document numbers according to the sorting characters; a3: For document numbers with the same sorting character, sort according to the reference sequence number; a4: For document numbers with the same reference sequence number and sorting character, sort according to the characters after the reference sequence number; a5: Sort completely identical duplicate document numbers randomly; S9: Save the sorted document numbers to be processed; S10: Provide the user with the initial search results and supplementary search results as the results of the search task execution; S11: When a user needs to further search for a document number, the search will be performed based on the results of the search task.
[0050] After using the technical solution of this application, the system can automatically process data according to the user's customized search. The data processed and summarized by the system is faster and more convenient to query or browse, reducing the time required for repeated searches by users. Moreover, this method supports the automatic sorting of missing or omitted document numbers from the search results, eliminating the need for users to sort them themselves, effectively reducing the user's search needs, and thus reducing the probability of the system being affected.
Claims
1. A document number retrieval method, characterized in that, It includes the following steps: S1: Construct a module for customizing user search rules; The rule customization module allows users to customize search rules according to their actual needs. The search rules include: advanced rules and ordinary rules; The general rules allow users to search using the style data of double-public document naming, and the style data allows users to search according to the naming rules of double-public document numbers, wherein the serial number part of the document number is based on wildcard placeholders; The advanced rules allow users to configure any part of the dual-document number in detail; When customizing the ordinary rules and the advanced rules, the department that submitted the double-publicity document must be entered; S2: Obtain user-defined search rules, denoted as: search rules to be processed; For each of the search rules to be processed, a search task is constructed, and the search task is started according to the task start time specified by the user; the search task is executed to search the database, and the document numbers that meet the search rules are retained and recorded as: the initial search results; It supports user-configurable task start times, allowing users to launch retrieval tasks during off-peak hours based on actual needs, completing searches based on all data; retrieval tasks are implemented based on tasks and start and execute according to the user-specified task start time; web page content is built based on HTML5, user interaction events are handled through JavaScript, and requests are received and data interfaces are provided through JAVA to handle business logic; scheduled retrieval tasks are executed based on taskScheduler.schedule; in the task editing screen, users can select advanced or ordinary rules previously created by the rule name, and then select the execution time of this task by querying the start time; S3: The initial search results are processed according to the display rules specified by the user and then saved; S4: Obtain the departments that report double-publicized documents included in the search rules to be processed, search the subordinate departments of the reporting departments in the system, and record the reporting departments and sub-departments together as: supplementary search departments; S5: Based on the supplementary retrieval department, a search is performed in the database. After deleting the content of the initial retrieval result from the obtained retrieval results, the remaining document number data is recorded as: supplementary retrieval result; The system performs supplementary searches based on the departments that submit the double-disclosure documents input by the user, making up for any shortcomings in the user's customized search rules; S6: In the supplementary search results, find all document numbers that do not contain any Chinese characters and save them separately as other groups; record all document numbers that contain Chinese characters as: document numbers to be processed; S7: For all document numbers to be processed, find the last digit of each document number and denote it as the base number; denote all characters before the base number as sorting characters; S8: Sort the document numbers to be processed according to the following method; a1: Grouped according to the uploading department, denoted as: Supplementary Group; a2: For each supplementary group of document numbers, sort all document numbers to be processed using the characters according to the sorting method described above; a3: For document numbers with the same sorting characters, sort them according to the base sequence number; a4: For document numbers where both the base sequence number and the sorting characters are the same, sort them according to the characters following the base sequence number; a5: Randomly sort duplicate document numbers that are exactly the same; S9: Save the sorted document numbers to be processed; S10: Provide the user with the initial search results and the supplementary search results as the results of the search task execution; S11: When a user needs to further search for a document number, the search is performed based on the results of the search task.
2. The document number retrieval method according to claim 1, characterized in that: In step S3, the initial search results are processed according to the display rules specified by the user, specifically including the following steps: b1: Determine if the user has selected to display search results sequentially after sorting by serial number; If you choose to sort by serial number consecutively, then proceed to step a3; If you choose not to sort by serial number and then proceed to step a2; b2: Save the initial search results directly without sorting them; b3: Group and sort the search results, extract all duplicate document numbers and save them separately, find all missing document numbers and save them separately; b4: Save the sorted initial search results, duplicate document numbers, and missing document numbers separately, and provide them to the user as search results.
3. The document number retrieval method according to claim 2, characterized in that: Step b3 specifically includes the following steps: c1: Find the last digit of each document number, and denot it as: base number; All characters preceding the baseline number are designated as sorting characters. c2: Group all document numbers according to the sorting order using characters, denoted as: initial grouping; Sort all groups according to the sorting character to obtain the initial group after inter-group sorting; c3: Randomly select one of the initial groups, denoted as: the group to be processed; Sort all document numbers in the group to be processed according to their sequence number to obtain the initial sorted group to be processed; Obtain the number of document numbers included in the group to be processed, denoted as N1; c4: Retrieve the minimum sequence number start and the maximum sequence number end from the document numbers corresponding to the sorted unprocessed group; c5: Initialize i=0, initialize empty arrays Num, RE and Miss; c6: Place the serial numbers in the document numbers into the array Num in ascending order; c7: Compares the difference between two adjacent document numbers in the array Num; temp1 = Num[i] – Num[i+1]; If temp1 is 0, it means that the sequence number of the i-th document number is the same as the sequence number of the (i+1)-th document number, then proceed to step c8; Otherwise, proceed to step c9; c8: Take the index from Num[i+1] and put it into array RE, and shift the indexes after Num[i+1] forward by one position in sequence; Repeat steps c7 to c8; c9: Set i=i+1; Determine if i is equal to N1; If so, it means that all document numbers in the array Num are included in the calculation to obtain the deduplication group; and step c10 is performed on the deduplication group to process missing data. If not equal, repeatedly perform steps c7 to c9; c10: Initialize j = 0; Re-acquire the number of document serial numbers included in the array Num, and record it as N2; c11: Compare two adjacent document serial numbers in the array Num; Set temp2=(Num[j]+1)-Num[j+1]; Determine whether temp2 is 0; If yes, it indicates that the two adjacent serial numbers are arranged in sequence with no missing values in between, then perform step c12; Otherwise, it indicates that there are missing values between the two adjacent serial numbers, perform step c13; c12: Set j=j+1; Determine whether j is equal to N2; If yes, it indicates that all serial numbers in the array Num have participated in the calculation, then the current sorting processing for the group to be processed ends, and a post-duplicate-checking and missing-complementing group is obtained; perform step c16; If not, repeatedly perform steps c11 to c12; c13: Set x=Num[j]+1, y=Num[j+1]; c14: Put x into the array Miss; c15: Set x=x+1; Determine the magnitude relationship between x and y; If x=y, it indicates that the missing serial number at this position has been completely found, perform steps c11 to c15 to continue searching for other missing serial numbers in the array Num; Otherwise, if x<y, it indicates that there are still missing serial numbers, then repeatedly perform steps c14 to c15; c16: Repeatedly perform steps c3 to c15 until all initial groups have participated in the calculation; Save all the post-duplicate-checking and missing-complementing groups in the order of the initial groups; Save the serial numbers in the array RE and the array Miss corresponding to each group behind the corresponding post-duplicate-checking and missing-complementing group respectively for display to the user.
4. The document number retrieval method according to claim 1, characterized in that: The rule elements in the advanced rules include: rule name, document number prefix, department name, and configurable rule elements; The rule name is a user-defined name, which is used to establish the relationship between the rule and the task when constructing a retrieval task; The document number prefix is the content of the leading field of the user-defined document number; The department name is the name of the uploading department of the document number to be retrieved; The rule elements include: a year rule, a month rule, a serial number rule, and a licensing unit code rule; the user is allowed to arrange these rule elements in a custom order, and each rule element includes no less than 1 configuration item; For the year rule, the month rule and the serial number rule, the arrangement order set by the user is the retrieval order of the document numbers.
5. The document number retrieval method according to claim 4, characterized in that: In step S2, if the user configures the advanced rule, the method for forming the to-be-processed retrieval rule is as follows: d1: Acquire all rule elements input by the user; d2: Determine the composition of all rule elements input by the user; If only the licensing unit code rule element exists, perform retrieval in the database based on the licensing unit code rule element, and record the retrieval result as: initial retrieval result; If elements other than the licensing unit code rule element exist, perform step d3; d3: Acquire and save the rule elements associated with the document number other than the licensing unit code rule respectively; d4: Generate document number retrieval conditions in sequence according to the order defined by the user on the advanced rule input screen; Suppose the user defines N document number search criteria, namely: ELE1~ELE N ; d5: Initialize a location tag POS for each data entry; Set the POS position to the last character of the document number prefix in the string of each document number data; d6: Retrieve each document number from the database one by one, denoted as: document number to be retrieved; d7: Obtain the document number prefix input by the user, and determine whether the document number to be retrieved starts with the document number prefix; If the document number to be retrieved does not begin with a document number prefix, processing of this data entry will be stopped. If the document number to be retrieved starts with a document number prefix, then proceed to step d8; d8: Sets the POS pointer to the last character of the document number prefix of the document number to be retrieved; Continue searching for the document number by sequentially executing the document number search criteria ELE1~ELE1. N Each time a search is performed, if the document number to be searched meets the search criteria, POS will be set to the start position of the next search. When the document number to be retrieved completely satisfies all the search criteria, the document number to be retrieved is retained; d9: Repeat steps d6 to d8 until all data in all databases are included in the calculation; d9: Retain all data that meets the search criteria, and the final search results will be called: initial search results.
6. The document number retrieval method according to claim 1, characterized in that: In step S2, if the user has configured the general rules, the method for constructing the retrieval rules to be processed is as follows: e1: Get the content of the style data input by the user; Initialize a location label POS for each piece of data; set the initial position of the POS to the first character of the document number; e2: The symbol * in the style data represents a wildcard for the sequence number. Confirm the position of the wildcard *. e3: All characters before the first asterisk (*) are designated as the string for the first search; all characters after the last asterisk (*) are designated as the string for the second search. e4: Retrieve each document number from the database one by one, denoted as: document number to be retrieved; e5: For the document number to be retrieved, compare it with each character of the string used for a single retrieval, starting from the first character; If the document number to be retrieved begins with the first retrieval string, then POS is set to the position of the last character of the first retrieval string in the document number to be retrieved, and step e6 is executed; Otherwise, stop processing this document number; proceed to step e9; e6: Confirm whether the last character after POS in the document number to be retrieved is a number; If so, proceed to step e7; If not, stop processing this document number; proceed to step e9; e7: Obtain the first group of consecutive numbers after POS from the document number to be processed, denoted as: serial number string; wherein the number of numbers in the serial number string is greater than or equal to 1; Set POS to point to the last character of the sequence number string; e8: Retrieves all characters following the POS number of the document to be retrieved, denoted as: the string to be confirmed; Compare the string to be confirmed with the string used for secondary retrieval; If the two are exactly equal, retain the document number to be retrieved; proceed to step e9; If the two are not equal, stop processing the document number for this clause; proceed to step e9; e9: Repeat steps e4 to e5 until all document numbers in the database are included in the calculation; Retain all data that meets the search criteria, and record all the retained document numbers as: the initial search results.
7. The document number retrieval method according to claim 5, characterized in that: In step d7, when generating document number search criteria based on the year rule, the method for executing the document number search criteria is as follows: f1: Get the value of the year entered by the user, denoted as: the value of the year to be searched; f2: Determines if a separator character exists before the year value; If it does not exist, proceed to step f3; If it exists, the character to be searched will be denoted as: the character to be searched; Search for the character to be searched within the characters following POS in the document number to be searched; The search was successful; POS points to the last character of the month separator being searched. Execute f3. If no results are found, processing of this data entry will cease. f3: Determines whether parentheses are set in the annual rules; If not set, proceed to step f6; If parentheses are set, search for the first set of parentheses appearing in the characters after POS of the document number to be searched; if they can be found, proceed to step f4; if they cannot be found, stop processing this data entry. f4: Get the character between the two parentheses and denote it as: the year to be compared; proceed to step f5; The search year value and the comparison year are matched and compared. Both are the same; set POS to the parentheses after the year and execute step f5. If the two are different, stop processing this data entry; f5: Retrieve the value of the year to be retrieved from the characters following POS in the document number to be retrieved; If the result can be found, set POS to the last digit of the year value to be retrieved; Complete the search for annual rules for this data entry; If no results are found, processing of this data entry will cease.
8. The document number retrieval method according to claim 5, characterized in that: In step d7, when document number search criteria are generated based on monthly rules, the execution method for these criteria is as follows: g1: Determines whether the user has selected a month; If a month is selected, proceed to step g2; Otherwise, if no month is set, then a date must be set, and step g5 will be executed; g2: Get the separator set before the month; If no delimiter is set, then a delimiter string must have been set before the month, proceed to step g3; If a separator is set, the separator will be denoted as: separator for the month to be retrieved; Search for the month separator in the characters following the POS of the document number to be searched; The search was successful; POS points to the last character of the month separator being searched. Execute g4. If no results are found, processing of this data entry will cease. g3: Get the delimiter string and denote it as: the delimiter string for the month to be searched; Search for the month-separating string within the characters following the POS of the document number to be searched; If the search is successful, set POS to the last character of the month separator to be searched; execute g4; If no results are found, processing of this data entry will cease. g4: Search by month; In the character set of the document number to be retrieved, confirm whether the character after POS is a number; If so, find all consecutive numbers and set POS to point to the last element of the number string; execute g5; If the character following POS is not a number, then processing of this data entry will stop. g5: Determines whether the user has selected a date; If no selection is made, the search based on this month's rules will be completed; If a date is selected, proceed to step g6; g6: Confirm whether a separator has been set before the date; If no delimiter is set, then a Chinese character string for delimiting must have been set before the date. Proceed to step g7. If a separator is set before the date, the separator will be denoted as: date separator to be retrieved; Search for the date separator in the characters following the POS of the document number to be searched; If the result is found, then set POS to the last character of the date separator to be retrieved and proceed to step g8; If no results are found, processing of this data entry will cease. g7: Retrieves the Chinese character string used as a separator for the date set before it, and records the string as: the separator string for the date to be retrieved; Search for the date separator string within the characters following the POS of the document number to be searched; If the result is found, then set POS to the last character of the date separator string to be retrieved and execute step g8; If no results are found, processing of this data entry will cease. g8: Search by date; In the character set of the document number to be retrieved, confirm whether the character after POS is a number; If so, find all consecutive numbers and set POS to the last element of the number string; complete the retrieval based on this month's rules. If the character following POS is not a number, then processing of this data entry will stop.
9. The document number retrieval method according to claim 5, characterized in that: In step d7, when generating document number search conditions based on the sequence number rule, the execution method for the document number search conditions is as follows: h1: Initialize a split element by setting Sep to 0; h2: Determine if a squadron number exists; If it exists, proceed to step h3; If it does not exist, proceed to step h4; h3: Get the detachment number value input by the user, denoted as: detachment number to be searched; search for the detachment number to be searched in the characters after POS of the document number to be searched; If the branch number can be retrieved, then POS is set to the last digit of the branch number to be retrieved, Sep = Sep + 1, and step h4 is executed. If no results are found, processing of this data entry will cease. h4: Confirm whether a separator has been set before the serial number; If no delimiter is set, further confirm whether a delimiter string is set before the sequence number, and then proceed to step h5; If a separator is set, the symbol is recorded as: the sequence number symbol to be searched; search for the sequence number symbol to be searched in the characters after POS of the document number to be searched; if it can be found, then set POS to the last position of the sequence number symbol to be searched, Sep = Sep + 1, and execute step h5; If no results are found, processing of this data entry will cease. h5: Confirm whether a separator string has been set before the serial number; If no delimiter string is set, further confirm whether parentheses are set before the sequence number, and proceed to step h6; If a delimiter string is set, then delimiter string is denoted as: the sequence number string to be searched; search for the sequence number string to be searched in the characters after POS of the document number to be searched; if it can be found, then set POS to the last character of the sequence number string to be searched, Sep = Sep + 1, and execute step h6; if it cannot be found, then stop processing this data. h6: Check if Sep is 0. If it is not 0, proceed to step h7. If Sep is 0, proceed to step h8; h7: Confirm whether the user has set the serial number in parentheses; If the user does not set the serial number in parentheses, proceed to step h12 to confirm whether there is a separator in the serial number; If the user selects a serial number in parentheses, proceed to step h8; h8: Search for parentheses in the characters following the POS of the document number to be searched; If parentheses can be found, record the first group of parentheses as: numbered parentheses; proceed to step h9; If the parentheses cannot be found, processing of this data entry will stop. h9: Confirm whether there is a separator in the serial number; If the user selects a sequence number containing a separator, then proceed to step h11; If the user does not select a sequence number containing a separator, proceed to step h10; h10: Get the serial number using the characters between the parentheses, and determine if it contains only numbers; If the parentheses contain only numbers, then POS is set to the last parenthesis of the sequence number parentheses to complete the retrieval of the document number based on the sequence number rule. Otherwise, stop processing this data entry; h11: Gets the character between two parentheses and determines whether the character contains only separators and numbers; If so, then point POS to the last set of parentheses containing the serial number to complete the serial number-based retrieval of the document number to be retrieved. If not, then stop processing this data entry; h12: Confirm whether there are separators in the serial numbers for which parentheses are not set; If the sequence number does not contain a separator, proceed to step h15; If a separator exists in the serial number, search for the separator in the characters after POS of the document number to be searched; if it can be found, record it as: serial number with separator; proceed to step h13; h13: Get the characters between POS and the sequence number separated by the separator, denoted as: the first sequence number; get the characters after the separator of the sequence number, denoted as: the second sequence number; Determine if both the preceding and following serial numbers are numbers; If not, then stop processing this data entry; If all the numbers are numbers, then proceed to step h14; h14: Retrieves the latter half of the sequence number; Starting from the position after the separator in the serial number, obtain the first group of consecutive numbers, denoted as: the serial number post-sequence number string; set POS to point to the last position of the serial number post-sequence number string to complete the serial number-based retrieval of the document number to be retrieved; h15: Confirm whether the first character after POS in the document number to be retrieved is a number; If so, then retrieve the first group of consecutive numbers starting from the first digit after POS, denoted as: the sequence number string; Point POS to the last character of the serial number string to complete the serial number-based retrieval of the document number to be retrieved; If the first character after POS is not a number, then processing of this data entry will stop.
Citation Information
Patent Citations
Characteristic character string matching method based on dispersion, cross and in completeness
CN101025750A
Method, system and device for intelligently checking leakage of administrative document number data
CN116561349A
