A method and system for constructing a fuzzy retrieval test question ciphertext index
Patent Information
- Application Number
- CN202611450239.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-18
- Publication Date
- 2026-10-23
AI Technical Summary
[0004]为解决上述技术问题,提供一种可模糊检索试题密文索引构建方法及系统,本技术方案解决了上述背景技术中提出的现有试题密文检索方法通常依赖关键词索引或整体哈希特征进行匹配,缺少对试题字符级密态特征的细粒度构建,难以在不解密试题内容的情况下实现基于部分字符信息的模糊匹配,现有索引构建方式在处理字符特征映射过程中容易产生映射冲突,缺少针对不同冲突程度进行动态区分处理的机制,导致索引区分能力不足,影响检索准确性,此外,现有方法难以结合字符排列关系构建连续性密态索引,无法有效保持试题字符序列结构信息,使得密文环境下的模糊检索能力受到限制的问题
本方案提出的一种可模糊检索试题密文索引构建方法,通过对试题明文进行字符切分,按照字符排列位置生成试题字符序列,并基于检索密钥对各字符进行密态特征计算,从密态特征中提取基础特征段和区分特征段,将基础特征段映射生成基础映射值,实现对试题字符信息的密态化表征,避免直接暴露试题内容的情况下构建字符级检索特征,提高密文环境下试题索引构建的细粒度和匹配能力;
Smart Images

Figure CN122964144A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of test question encrypted index construction technology, specifically to a method and system for constructing a test question encrypted index with fuzzy retrieval capability. Background Technology
[0002] Against the backdrop of continuous development in test item information management and secure data storage technologies, test item data, as a crucial resource in educational examinations, question bank management, and online assessments, faces increasing demands for secure storage and efficient retrieval. With the continuous expansion of test item scale and the increasing centralization of test item data management, traditional retrieval methods based on plaintext storage or simple encryption are insufficient to balance data confidentiality and retrieval efficiency. This is especially true in scenarios where test item content cannot be directly exposed; achieving fast and accurate test item matching in encrypted environments has become a critical issue that needs to be addressed.
[0003] However, existing methods for retrieval of encrypted test questions typically rely on keyword indexes or overall hash features for matching, lacking fine-grained construction of character-level encrypted features. This makes it difficult to achieve fuzzy matching based on partial character information without decrypting the test content. Existing index construction methods are prone to mapping conflicts during character feature mapping, lacking a mechanism for dynamically distinguishing and handling different conflict levels, resulting in insufficient index discrimination capabilities and affecting retrieval accuracy. Furthermore, existing methods struggle to construct continuous encrypted indexes by incorporating character arrangement relationships, failing to effectively preserve the character sequence structure information of the test questions, thus limiting fuzzy retrieval capabilities in encrypted environments. Therefore, a method and system for constructing encrypted test question indexes capable of fuzzy retrieval are needed to address these issues. Summary of the Invention
[0004] To address the aforementioned technical problems, this paper provides a method and system for constructing a fuzzy searchable encrypted question index. This solution solves the problems mentioned in the background section, where existing encrypted question retrieval methods typically rely on keyword indexes or overall hash features for matching. These methods lack fine-grained construction of character-level encrypted features, making it difficult to achieve fuzzy matching based on partial character information without decrypting the question content. Furthermore, existing index construction methods are prone to mapping conflicts during character feature mapping, lacking a mechanism for dynamically distinguishing different conflict levels, resulting in insufficient index differentiation capabilities and affecting retrieval accuracy. Additionally, existing methods struggle to construct continuous encrypted indexes by combining character arrangement relationships, failing to effectively maintain the question character sequence structure information, thus limiting fuzzy search capabilities in encrypted environments.
[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows: A method for constructing a fuzzy-searchable encrypted index for test questions includes: Obtain the plaintext of the test questions, the retrieval key, and the encryption key; perform character segmentation on the plaintext of the test questions; and generate a sequence of test question characters according to the arrangement of the characters in the plaintext of the test questions. Based on the retrieval key, the secret state features of each character in the question character sequence are calculated, and basic feature segments and distinguishing feature segments are extracted from the secret state features. The basic feature segments are then mapped to the basic mapping values corresponding to each character. Repeated identification is performed on each basic mapping value to determine the mapping status of each basic mapping value; Based on the mapping state, construct basic index units for basic mapping values that do not repeat, determine the distinguishing length for basic mapping values that repeat, and combine the basic mapping values with the distinguishing features of the corresponding length to construct extended index units. Based on the character arrangement positions in the question character sequence, the basic index unit and the extended index unit are combined to generate a character-level dense index sequence, and then segmented and combined according to the continuity of character arrangement to form a sequence-level dense index; The plaintext of the test questions is encrypted using an encryption key to obtain the ciphertext of the test questions. The sequence-level encrypted index is then linked with the ciphertext of the test questions to form ciphertext index data that supports fuzzy retrieval of the encrypted state.
[0006] Furthermore, a fuzzy-searchable encrypted test question index construction system is proposed, which is used in the above-mentioned fuzzy-searchable encrypted test question index construction method, including: The character processing module is used to obtain the plaintext of the test questions, the retrieval key, and the encryption key, to segment the plaintext of the test questions into characters, and to generate a sequence of test question characters according to the character arrangement. The feature calculation module is used to perform secret-state feature calculation on each character in the question character sequence based on the retrieval key, extract basic feature segments and distinguishing feature segments, and generate basic mapping values corresponding to each character; The mapping analysis module is used to identify repetitions of each basic mapping value and determine the mapping status based on the number of repetitions and character position relationships corresponding to the basic mapping values. An index construction module is used to construct basic index units and extended index units according to the mapping state, and generate a character-level dense index sequence in combination with the character arrangement position; The association generation module is used to segment and combine the character-level dense index sequence to form a sequence-level dense index, and to establish an index association between the sequence-level dense index and the ciphertext of the test questions to generate test question ciphertext index data.
[0007] Compared with the prior art, the beneficial effects of the present invention are: This solution proposes a method for constructing a fuzzy searchable encrypted question index. By segmenting the plaintext of the question into characters, generating a sequence of question characters according to their arrangement, and calculating the encrypted features of each character based on the retrieval key, basic feature segments and distinguishing feature segments are extracted from the encrypted features. The basic feature segments are then mapped to generate basic mapping values, thereby achieving a encrypted representation of the question character information. This avoids directly exposing the question content and constructing character-level retrieval features, improving the fine-grainedness and matching ability of question index construction in an encrypted environment. This solution proposes a method for constructing a fuzzy searchable encrypted index for test questions. By identifying duplicates of each basic mapping value, determining the mapping state based on the number of duplicates and the character position relationship, constructing basic index units for basic mapping values that have not been duplicated, and determining the discrimination length for basic mapping values that have been duplicated and constructing extended index units in combination with discrimination features, this method achieves dynamic discrimination processing of mapping conflicts, reduces index confusion caused by duplicate basic mapping values, and improves the discrimination capability of the encrypted index. This scheme proposes a method for constructing a fuzzy searchable encrypted index for test questions. It generates a character-level encrypted index sequence by combining basic index units and extended index units based on the character arrangement position. Furthermore, it segments and combines index units according to the continuity of character arrangement to form a sequence-level encrypted index. This allows the index data to retain the positional relationship between test question characters, effectively expresses the structural information of the test question character sequence, and improves the adaptability of the encrypted index to the continuous character matching process. This solution proposes a method for constructing a fuzzy searchable encrypted question index. By encrypting the plaintext of the questions using an encryption key to generate encrypted question display text, and establishing a sequence-level encrypted index and the encrypted question display text association relationship based on the index position association data and the encrypted text identifier data, a fuzzy search index of questions is formed. This enables the retrieval process to complete question matching based on the encrypted index, improving the accuracy and usability of fuzzy search of questions under encrypted conditions. Attached Figure Description
[0008] Figure 1 This is a flowchart of a method for constructing a fuzzy-searchable encrypted index for test questions, as proposed in this invention. Figure 2 A flowchart for constructing character mapping in this invention; Figure 3 A flowchart for generating the index unit in this invention; Figure 4 This is a system framework diagram of a fuzzy retrieval test question encrypted index construction system proposed in this invention. Detailed Implementation
[0009] The following description is intended to disclose the invention and enable those skilled in the art to implement it. The preferred embodiments described below are merely examples, and other obvious variations will occur to those skilled in the art.
[0010] Reference Figure 1 - Figure 4 As shown in the figure, a method for constructing a fuzzy-searchable encrypted test question index according to an embodiment of the present invention includes: Obtain the plaintext of the test questions, the retrieval key, and the encryption key; perform character segmentation on the plaintext of the test questions; and generate a sequence of test question characters according to the arrangement of the characters in the plaintext of the test questions. Specifically, when constructing the encrypted question index, the plaintext of the questions to be processed, the retrieval key, and the encryption key are first obtained. The plaintext of the questions refers to the original question text data already stored in the question bank, which can be read from the question bank database, question files, or question management data tables. Its content serves as the basic input data for subsequent character segmentation, character encoding conversion, and encrypted feature calculation. The retrieval key is the encrypted calculation parameter used in the index construction process, which can be read from the key management data and serves as the key input in the HMAC-SM3 calculation process, generating the encrypted features corresponding to each character together with the character encoding value. The encryption key is the encryption parameter used in the encrypted question display process, which can be obtained from the encryption configuration data or key storage area, and participates in the generation of encrypted data blocks in the subsequent plaintext block encryption process. By obtaining the above data, the plaintext of the questions enters the character-level encrypted index construction process, the retrieval key participates in the character encrypted feature calculation, and the encryption key participates in the generation of the encrypted question display, providing input data for subsequently establishing the association between the sequence-level encrypted index and the encrypted question display.
[0011] Based on the retrieval key, the secret state features of each character in the question character sequence are calculated, and basic feature segments and distinguishing feature segments are extracted from the secret state features. The basic feature segments are then mapped to the basic mapping values corresponding to each character. Repeated identification is performed on each basic mapping value to determine the mapping status of each basic mapping value; Based on the mapping state, construct basic index units for basic mapping values that do not repeat, determine the distinguishing length for basic mapping values that repeat, and combine the basic mapping values with the distinguishing features of the corresponding length to construct extended index units. Based on the character arrangement positions in the question character sequence, the basic index unit and the extended index unit are combined to generate a character-level dense index sequence, and then segmented and combined according to the continuity of character arrangement to form a sequence-level dense index; The plaintext of the test questions is encrypted using an encryption key to obtain the ciphertext of the test questions. The sequence-level encrypted index is then linked with the ciphertext of the test questions to form ciphertext index data that supports fuzzy retrieval of the encrypted state.
[0012] Further, based on the retrieval key, cipher state feature calculation is performed on each character in the test question character sequence, a basic feature segment and a distinguishing feature segment are extracted from the cipher state features, and the basic feature segment is mapped to a basic mapping value corresponding to each character, which specifically includes: Characters of the plaintext test question are read character by character, and characters are extracted in the reading order to form an initial character set; According to the character type in the initial character set, the initial character set is screened to remove format characters that do not participate in retrieval and matching, so as to obtain a valid character set, and the original position serial number corresponding to each valid character is retained; According to the original position serial number corresponding to each character in the valid character set, a character position set is formed, and the characters in the character position set are arranged in sequence according to the position serial numbers to generate a test question character sequence; Each character in the test question character sequence is subjected to encoding conversion according to the Unicode encoding rule, the Unicode code point value corresponding to each character is determined, and the Unicode code point value is converted into byte data of a fixed length to obtain the character encoding value corresponding to each character; The character encoding value corresponding to each character is taken as message data, and HMAC-SM3 calculation is performed in combination with the retrieval key to generate a cipher state feature corresponding to each character; Specifically, when processing the plaintext test question, first the characters in the test question are read one by one according to the text storage order, each character read is taken as an independent processing object, and the reading order of the characters is synchronously recorded, so that the character arrangement relationship in the original test question text can be completely retained. Since test question data usually comes from question bank editing, manual entry or data import processes, in addition to the characters expressing the test question content, the original text may also contain characters only used for assisting text organization such as test question identifiers, line breaks, tabs, consecutive spaces and the like. Although the above characters exist in the original text, they do not express the test question content themselves and will not participate in subsequent character matching, so they need to be distinguished from valid content characters in the character parsing stage. For example, after obtaining the plaintext test question "What is the capital of China?", and reading according to the original arrangement order, an initial character set composed of "1", ".", "What", "is", "the", "capital", "of", "China", "?" is obtained.
[0013] After the initial character set is formed, type identification is performed on each character in the set, and it is determined whether the character belongs to a retrieval target character according to the encoding information corresponding to the character, the character category, and the functional relationship of the character in the test question text. Characters that mainly perform text format organization functions, such as question number identifiers, line breaks, tabs, and consecutive spaces, are determined as format characters that do not participate in retrieval matching; Chinese characters, numbers, letters that can represent the actual content of the test questions, and valid symbols in the question stem are retained as valid characters. This judgment process does not perform simple screening based on whether a character is a special symbol, but makes a distinction in combination with the usage of the character in the test question text, so that characters that only change the text structure without changing the semantics of the test question do not enter the subsequent ciphertext computation. For example, in "1. What is the capital of our country?", "1" and "." are used to indicate the question number and only serve to distinguish the order of the questions, so they are identified as format characters and removed, while "我", "国", "首", "都", "是", "哪", "里" and "?" are retained as valid characters to continue to participate in subsequent processing.
[0014] During the screening process, to ensure that the character deletion operation does not affect the arrangement relationship of the original content of the test question, the original position serial number corresponding to each valid character is saved synchronously. In the character reading stage, a position number is assigned to each character according to its occurrence order in the original test question text. After the screening of format characters is completed, only the position numbers corresponding to valid characters are retained, so that the valid characters can still establish an association with their actual positions in the original text. For example, in "1. What is the capital of our country?", the position of the character "1" is 1, the position of the character "." is 2, the position of the character "我" is 3, the position of the character "国" is 4, and the position of the character "首" is 5. By retaining the position serial numbers corresponding to the valid characters, the arrangement relationship of characters such as "我", "国", and "首" in the original test question can be known, and the character order will not change due to the removal of the question identifier. Based on the retained position serial numbers, the valid characters are rearranged according to their original positions, so that the characters after format screening are restored to the continuous character sequence of the test question content itself. During the sorting process, the content corresponding to the valid characters is read in the order of the position numbers from small to large, and the character content is combined with the position relationship to obtain the test question character sequence. For example, after removing "1.", the positions corresponding to the remaining valid characters correspond to "我", "国", "首", "都", "是", "哪", "里" and "?" in sequence, and after sorting according to the original positions, a test question character sequence "我国首都是哪里?" is formed. This character sequence retains the original semantic order of the test questions, and removes format interference characters that do not participate in retrieval matching, and serves as basic data for subsequent character encoding conversion and ciphertext feature computation.
[0015] After obtaining the test question character sequence, each character in the sequence is first subjected to encoding conversion, so as to convert the original character content into a data form that can participate in calculation. During processing, individual characters are read sequentially according to the arrangement order in the character sequence, and the Unicode code point value corresponding to the character is queried according to the Unicode encoding rule, so that different types of characters such as Chinese characters, letters, numbers and symbols are converted into unique corresponding numerical representations. For example, in the test question character sequence "What is the capital of our country?", the characters "我" (wǒ), "国" (guó), "首" (shǒu), etc. respectively correspond to different Unicode code point values, and through this conversion process, characters originally existing in the form of text can be converted into data recognizable by subsequent calculations.
[0016] Since there are differences in the numerical ranges of the Unicode code point values corresponding to different characters, the code point data corresponding to each character may have a problem of inconsistent data lengths when directly participating in ciphertext state calculation. Therefore, after obtaining the Unicode code point values, unified byte format conversion is performed on the code point values to keep the data structures corresponding to different characters consistent. In the conversion process, the data length of the conversion result is determined according to the fixed byte length adopted for character encoding processing, and the Unicode code point value is converted into binary byte data of the corresponding length; when the valid data bits obtained after converting the code point value are less than the fixed length, data bits of the corresponding length are supplemented at the front end or the back end of the data, so that the converted byte data reaches the unified length; when the conversion result already meets the fixed length requirement, the converted byte data remains unchanged. After this processing, each character in the test question character sequence forms a character encoding value with a consistent length.
[0017] For example, for the character "我", the Unicode code point value corresponding to the character is first obtained, then the code point value is converted into binary byte data according to the fixed byte length, so as to obtain the character encoding value corresponding to the character "我"; for the character "国", the same processing procedure is executed to obtain the character encoding value corresponding to the character "国". Although the Unicode code point values corresponding to the two characters are different, after unified byte conversion, both can form a data format with a consistent structure, thereby preventing different characters from affecting subsequent ciphertext state calculation due to encoding length differences.
[0018] After obtaining the character encoding values, the character encoding value corresponding to each character is used as independent message data, and is input into the HMAC-SM3 calculation process together with the retrieval key. During calculation, the retrieval key participates in the HMAC-SM3 operation as a key parameter, and the character encoding value is used as the message content to be processed, and the ciphertext state feature of the corresponding character is generated through hash calculation under the control of the key. That is to say, the character encoding value determines the character information participating in the calculation, and the retrieval key determines the ciphertext state conversion condition of the character information, and the two act together to form the ciphertext state feature data corresponding to the character.
[0019] For example, for the test question character sequence "What is the capital of China?", the character encoding value corresponding to the character "我" and the retrieval key jointly participate in one HMAC-SM3 calculation, and the ciphertext feature corresponding to the character "我" is output; the character encoding value corresponding to the character "国" is calculated using the same retrieval key, and the ciphertext feature corresponding to the character "国" is output. Since the character encoding values corresponding to different characters are different, the generated ciphertext features are different; when the character "我" appears again in the same test question character sequence, since the input character encoding value and the retrieval key remain consistent, the corresponding consistent ciphertext feature can be generated. Through the above processing, each character forms ciphertext feature data corresponding to its own content, which provides a data basis for subsequently dividing the basic feature segment and the distinguishing feature segment according to the data structure of the ciphertext feature, and further generating the basic mapping value.
[0020] Determine the basic area and the distinguishing area according to the preset segmentation ratio based on the ciphertext feature corresponding to each character, divide the data corresponding to the basic area into a basic feature segment, and divide the data corresponding to the distinguishing area into a distinguishing feature segment, so as to obtain the basic feature segment and the distinguishing feature segment corresponding to each character; Perform integer conversion according to the binary value conversion rule based on the binary data in the basic feature segment corresponding to each character, so as to obtain the basic feature value corresponding to each character; Determine the number of representable values corresponding to the basic feature segment according to the data bit length of the basic feature segment, and take the number of representable values as the mapping range length; Perform a modulo operation on the basic feature value corresponding to each character and the mapping range length respectively, so as to obtain the basic mapping value corresponding to each character.
[0021] It can be understood that after obtaining the ciphertext feature corresponding to each character, region division is performed on the feature data according to the data distribution characteristics in the ciphertext feature. Since the ciphertext feature is composed of continuously arranged binary data, the data bits at different positions play different roles in the subsequent index construction process, so it is necessary to take part of the data bits as the data source for basic mapping calculation and take the other part of the data bits as the data source for distinguishing in the case of duplicate conflict, so that the ciphertext feature corresponding to the character has both basic representation information and difference distinguishing information.
[0022] Before performing region division, a preset segmentation ratio is determined according to the data length of the ciphertext feature, the representation range of the base mapping value, and the differentiation requirement in the case of repeated mapping. This preset segmentation ratio is not a fixed setting, but is obtained by allocating the number of data bits required for the base region and the differentiation region after analyzing the overall data length of the ciphertext feature. For example, when the number of test question characters is small and the character repetition probability is low, more data bits need to be reserved to participate in base feature calculation to form a base feature value with high differentiation; when the number of test question characters is large and the possibility of different characters being mapped to the same base mapping value increases, more data bits need to be reserved as differentiation features to support subsequent conflicting character identification. Therefore, the data proportion of the base region and the differentiation region is determined according to the actual test question data scale and character repetition situation, and this proportion is used as the preset segmentation ratio adopted when segmenting the ciphertext feature.
[0023] The continuous binary data in the ciphertext feature is divided according to the preset segmentation ratio, the data bits located within the base region are extracted to form a base feature segment, and the data bits located within the differentiation region are extracted to form a differentiation feature segment. For example, the character "我" generates a corresponding ciphertext feature after HMAC-SM3 calculation. According to the preset segmentation ratio, the front part of the continuous binary data in the ciphertext feature is divided into the base feature segment, and the remaining part of the continuous binary data is divided into the differentiation feature segment; characters such as "国" and "首" are processed in the same manner to obtain corresponding base feature segments and differentiation feature segments respectively. By splitting the ciphertext feature into two data regions with different functions, the base feature segment can participate in the generation of the base mapping value, and the differentiation feature segment is reserved as an auxiliary differentiation basis for subsequent cases where the base mapping value is repeated.
[0024] Since the base feature segment still exists in binary form, it needs to be converted into a data form that can participate in numerical calculation. Each binary data bit in the base feature segment is read, the corresponding integer value is calculated according to the binary bit weight relationship, and the values corresponding to each data bit are accumulated to obtain the base feature value corresponding to the base feature segment. For example, the base feature segment corresponding to the character "我" is composed of continuous binary data, and each bit of data is calculated according to the bit weight corresponding to its position and then accumulated to obtain the base feature value of the character "我"; the base feature segment corresponding to the character "国" is converted in the same manner to obtain the base feature value of the character "国". By converting the binary-form base feature segment into an integer form, the base features corresponding to different characters can participate in subsequent mapping calculations in a unified data format.
[0025] After the base feature values are formed, the corresponding number of representable values is determined according to the number of data bits contained in the base feature segment, and this number is taken as the mapping range length. Since the number of binary data bits determines the number of different values that can be represented, when the base feature segment contains n bits of binary data, each bit has two values of 0 and 1, so 2ⁿ different values can be represented, and 2ⁿ is taken as the mapping range length corresponding to this base feature segment. For example, when the length of the base feature segment is 8 bits, the corresponding number of representable values should be 2 8 , that is, 256 types, so the mapping range length is determined to be 256; when the data bit length of the base feature segment changes, the corresponding mapping range length is re-determined according to the actual number of bits. By determining the mapping range according to the length of the base feature segment itself, the base feature values corresponding to different characters can be mapped according to their own data expression ranges.
[0026] After the mapping range length is determined, a modulo operation is performed on the base feature value corresponding to each character and the corresponding mapping range length respectively, so as to convert the base feature value into a base mapping value within a limited range. During calculation, the base feature value is taken as the dividend, and the mapping range length is taken as the divisor, and the remainder after dividing the base feature value by the mapping range length is calculated according to the integer division rule. The relationship among the base feature value, the mapping range length and the corresponding remainder satisfies: the base feature value is equal to the product of the mapping range length and the integer quotient plus the remainder, that is, by removing the integer multiple part of the base feature value that exceeds the mapping range, the remainder falling within the mapping range is retained as the base mapping value. For example, the base feature value corresponding to the character "我" is 356, and the mapping range length determined according to the data bit length of the base feature segment is 256, then a modulo 256 operation is performed on 356 to calculate the remainder of 356 divided by 256. Since 356=256×1+100, the remainder 100 is obtained, and 100 is taken as the base mapping value corresponding to the character "我". If the base feature value corresponding to the character "国" is 520, the remainder of 520 divided by 256 is calculated. Since 520=256×2+8, the base mapping value corresponding to the character "国" is obtained as 8. Through the above modulo operation processing, the base feature values that may originally exceed the representation range of the base feature segment are converted into data values between 0 and the mapping range length minus 1, while maintaining the difference relationship between the base features of different characters, which provides a unified data basis for subsequent statistics on whether the base mapping values corresponding to different characters are repeated, determining the mapping state and constructing the index unit.
[0027] Further, duplicate identification is performed on each base mapping value to determine the mapping state of each base mapping value, which specifically includes: Sequentially reading the base mapping values corresponding to the character arrangement positions to generate a base mapping value arrangement sequence; matching the character positions with the same base mapping value according to the numerical relationship in the base mapping value arrangement sequence, to generate a mapping value matching relationship; aggregating the character positions corresponding to the same base mapping value according to the mapping value matching relationship, to form a base mapping value set; counting the number of characters in each base mapping value set, to obtain the repetition number corresponding to each base mapping value; determining the repetition range corresponding to each base mapping value according to the repetition number corresponding to each base mapping value and the character position relationship; It can be understood that after obtaining the base mapping value corresponding to each character, the base mapping values are associated and sorted based on the original position serial number of the character in the test question character sequence. Since the base mapping value is obtained by performing modulo operation on the base feature value corresponding to each character, the base feature values of different characters may generate the same base mapping value due to the mapping range limitation. Therefore, it is necessary to analyze the repetition situation between the base mapping values in combination with the original position relationship of the characters, so as to determine the character distribution relationship corresponding to the same base mapping value.
[0028] When processing the base mapping values, the corresponding base mapping values are read according to the original position serial number corresponding to each valid character in the test question character sequence, and are arranged in the ascending order of the original position serial numbers, so that the original position serial numbers of the characters are associated with the corresponding base mapping values to form a base mapping value arrangement sequence. For example, after the test question plaintext "1. Where is the capital of our country?" is screened by format characters, the characters "我", "国", "首", "都", "是", "哪", "里", "?" retain their corresponding original position serial numbers 3, 4, 5, 6, 7, 8, 9, 10 respectively. If the base mapping values corresponding to each character are sequentially "35, 12, 48, 35, 66, 12, 90, 18", the corresponding base mapping value arrangement sequence is formed according to the original position serial numbers, wherein the original position serial numbers 3 and 6 correspond to the same base mapping value 35, and the original position serial numbers 4 and 8 correspond to the same base mapping value 12.
[0029] After the base mapping value arrangement sequence is formed, numerical matching is performed on the base mapping values in the arrangement sequence, and it is compared one by one whether the base mapping values corresponding to different original position serial numbers are consistent. When the base mapping values corresponding to two character positions are the same, a mapping value matching relationship is established between the original position serial numbers of the two characters, and the corresponding base mapping value is recorded. For example, if the base mapping value corresponding to the original position serial number 3 is 35, and the base mapping value corresponding to the original position serial number 6 is also 35, it is determined that there is a matching relationship corresponding to the base mapping value 35 between the original position serial number 3 and the original position serial number 6; if the base mapping values corresponding to other positions are different, no matching relationship is established.
[0030] Based on the generated mapping value matching relationships, the original position indices of characters with the same basic mapping value are aggregated, grouping multiple character positions corresponding to the same basic mapping value into the same basic mapping value set. During aggregation, the basic mapping value is used as the set identifier, and all original position indices that successfully match that basic mapping value are stored in the corresponding set, so that the distribution of the same basic mapping value in the test character sequence can be centrally represented. For example, if the basic mapping value 35 corresponds to the original position indices 3 and 6, then the set of positions corresponding to the basic mapping value 35 is {3, 6}; if the basic mapping value 12 corresponds to the original position indices 4 and 8, then the set of positions corresponding to the basic mapping value 12 is {4, 8}. By establishing a set of basic mapping values, the repeated mapping relationships scattered in the test character sequence can be uniformly managed.
[0031] After forming the sets of basic mapping values, the number of original position indices contained in each set is counted, and the number of position elements in the set is taken as the repetition count of the corresponding basic mapping value. For example, if the basic mapping value 35 corresponds to the set {3, 6}, which contains two original position indices, then the repetition count of the basic mapping value 35 is determined to be 2; if the basic mapping value 12 corresponds to the set {4, 8}, then the repetition count of the basic mapping value 12 is determined to be 2; if a basic mapping value corresponds to a set containing only one original position indice, then the repetition count of the basic mapping value is determined to be 1, indicating that the basic mapping value corresponds to only one character position and no repetition mapping relationship is formed.
[0032] After obtaining the number of repetitions for each basic mapping value, the corresponding repetition range is determined based on the distribution of the original position numbers in the same set of basic mapping values. This determination involves reading all the original position numbers contained in the same set of basic mapping values and determining the repetition range corresponding to that basic mapping value based on the coverage area between the position numbers. Specifically, the character region corresponding to the smallest and largest original position numbers in the set is taken as the repetition range of that basic mapping value. For example, if the basic mapping value 35 corresponds to original position numbers 3 and 6, then based on the distribution relationship between the two positions, its repetition range is determined to be the character region corresponding to original position numbers 3 to 6; if the basic mapping value corresponds to original position numbers 5, 6, and 7, then due to the continuous distribution of multiple repetitive positions, its repetition range is determined to be the character region corresponding to original position numbers 5 to 7. By combining the number of repetitions and the distribution of original positions to determine the repetition range, it is possible to further analyze the positional relationship between characters corresponding to the same basic mapping value and provide a basis for judging the mapping status.
[0033] Based on the repetition range corresponding to each basic mapping value, the number of characters, the distribution of character positions, and the positional interval relationship within the repetition range are extracted to generate repetition feature data; Based on the repetitive feature data, the character position intervals corresponding to each basic mapping value are extracted, and the character position intervals are compared with the preset interval range. The repetitive relationships that meet the preset interval range are determined as valid repetitive relationships. Based on the effective duplication relationship and the number of duplications, a unique mapping state is determined for the basic mapping values that have not formed an effective duplication relationship or have not generated a duplication relationship. For the basic mapping values that form valid repetition relationships, determine the conflict mapping state, and generate the mapping state corresponding to each basic mapping value based on the number of repetitions.
[0034] Specifically, after determining the repetition range corresponding to each basic mapping value, the distribution of characters within the repetition range is further analyzed. Since the same basic mapping value may only indicate that the values of the basic feature segments are consistent after modulo operation, and may not necessarily represent a valid repetition relationship between characters, it is necessary to combine the number of characters within the repetition range, the distribution of character positions, and the positional interval relationship to extract the repetition features corresponding to the basic mapping values.
[0035] When extracting duplicate feature data, the first step is to read the duplicate range corresponding to each basic mapping value and count the number of valid characters contained within that range. During the counting process, the number of valid characters within the range is determined based on the original position indices corresponding to the duplicate range, and the distribution of the original position indices for each character is recorded. Simultaneously, based on the arrangement relationship between the positions of characters in the same basic mapping value set, the interval distance between adjacent character positions is calculated, forming a positional interval relationship. For example, if the set of original position indices corresponding to a basic mapping value is {3, 6, 10}, then the number of duplicate characters corresponding to this basic mapping value is 3, the character position distribution is the original position indices 3, 6, and 10, and the intervals between adjacent positions are calculated to be 3 and 4, respectively. By combining the above information, the duplicate feature data corresponding to this basic mapping value is formed.
[0036] After obtaining the repetitive feature data, the positional interval information corresponding to each basic mapping value is further extracted, and the positional interval is used to determine whether there is a stable character arrangement relationship between different repetitive positions. During the determination process, the original position indices of multiple characters corresponding to the same basic mapping value are read, and the positional differences between adjacent characters are calculated according to their positional order to obtain the positional interval sequence corresponding to each basic mapping value. Since the length and character distribution of different test questions vary, the positional distance between characters corresponding to the same basic mapping value may differ. Therefore, a preset interval range needs to be set as the basis for determining valid repetition relationships. The preset interval range is not fixed but is determined based on the length of the test question character sequence, the number of valid characters, and the distribution of character repetition positions in historical test questions. To determine this range, the positional interval data corresponding to the same character in test question character sequences of different lengths are first statistically analyzed and sorted according to the positional interval values. The frequency of each positional interval is further analyzed to determine the concentrated area of positional intervals under normal character repetition conditions. The smallest continuous interval that can cover the main repetition position distribution is determined as the preset interval range. For example, in the analysis of a large amount of test question character data, it was found that the positional interval of repeated characters in shorter test questions is mainly concentrated between 2 and 10. Therefore, 2 to 10 can be determined as the preset interval range under the corresponding length range. For test questions with more characters and longer stems, the corresponding preset interval range can be re-determined based on the statistically obtained positional interval distribution.
[0037] After determining the preset interval range, the interval values in the position interval sequence corresponding to each basic mapping value are compared with the preset interval range. When the character position interval is within the preset interval range, it is considered that there is a stable positional relationship between the corresponding character positions, and the repetition relationship corresponding to the basic mapping value is determined as a valid repetition relationship. For example, if the original position numbers of the characters corresponding to a certain basic mapping value are 3 and 6, and the position interval between them is 3, if this position interval is within the preset interval range, then the repetition relationship corresponding to the basic mapping value is determined as a valid repetition relationship; when the character position interval exceeds the preset interval range, it is considered that the repetition relationship may be due to accidental similarity caused by the modulo operation of the basic mapping value, and is not treated as a valid repetition relationship. By filtering the position intervals, the accidental repetition caused by the compression mapping of basic mapping values can be reduced, and the accuracy of subsequent mapping state judgment can be improved.
[0038] After determining the valid repetition relationships, the basic mapping values are classified into states based on the number of repetitions corresponding to the basic mapping values. Basic mapping values without repetition relationships (i.e., those with a repetition count of 1) are directly identified as unique mapping states. Similarly, basic mapping values with the same basic mapping value but no valid repetition relationship between their corresponding character positions are also identified as unique mapping states. For example, if a basic mapping value appears in multiple character positions, but the positional intervals do not meet the valid repetition condition, then this repetition is considered merely an accidental occurrence during the basic mapping value compression process and is not treated as a conflict mapping.
[0039] For basic mapping values that form valid repetition relationships, they are identified as conflict mapping states, and the final mapping state is generated based on the corresponding repetition count. During the generation process, valid repetition relationships are used as the basis for judgment, and the repetition count is used as a parameter describing the degree of conflict, ensuring that the mapping state simultaneously reflects whether the basic mapping value has valid repetition and the scale of repetition. For example, if a basic mapping value corresponds to character positions {3, 6}, and the position interval satisfies the valid repetition condition, then the basic mapping value is determined to be in a conflict mapping state, and its repetition count is recorded as 2. If a basic mapping value corresponds to multiple character positions, and all satisfy the valid repetition condition, then the corresponding mapping state is recorded based on the actual repetition count. Through the above processing, each basic mapping value forms a corresponding mapping state, providing a state basis for the subsequent construction of basic index units and extended index units.
[0040] Furthermore, based on the mapping state, basic index units are constructed for basic mapping values that do not repeat, and the distinguishing length is determined according to the number of repetitions for basic mapping values that repeat. Extended index units are constructed by combining the basic mapping values with the distinguishing features of the corresponding length, specifically including: Based on the mapping status corresponding to each basic mapping value, the basic mapping values are classified to obtain a set of unique mapping values and a set of conflicting mapping values. Based on the unique set of mapping values, extract the basic feature values corresponding to each basic mapping value, and combine the basic mapping values with the corresponding basic feature values to generate basic index units; Based on the set of conflict mapping values, extract the valid repetition relationships and repetition counts corresponding to each conflict mapping value to generate conflict feature data; Based on the number of repetitions in the conflict feature data, determine the minimum binary length that satisfies the repetition number discrimination condition, and use this minimum binary length as the discrimination length corresponding to each conflict mapping value. Based on the positional relationships of characters in the valid repetition relationships, extract the positional distribution features between conflicting characters; Calculate the average position interval between adjacent character positions based on the distribution feature of character positions in the effective duplicate relationship, and determine the feature offset according to the correspondence between the average position interval and the length of the distinguishing feature segment; According to the data arrangement order of the distinguishing feature segments corresponding to each conflicting character, take the first position of the distinguishing feature segment as the reference position, perform position offset on the reference position according to the feature offset, and determine the feature intercept start position; Based on the distinguishing length corresponding to each conflicting mapping value, extract the distinguishing feature of the corresponding length from the distinguishing feature segment starting from the feature intercept start position, and generate a distinguishing feature set; Combine the conflicting mapping values, the corresponding basic feature values, the distinguishing lengths and the corresponding distinguishing features according to the distinguishing feature set, so as to generate an extended index unit; Specifically, index units are constructed in different ways for different mapping state differences corresponding to basic mapping values. For basic mapping values that do not form an effective duplicate relationship, such basic mapping values can directly reflect the basic features of the corresponding characters, so the corresponding basic feature values are read, and the basic mapping values and the basic feature values are associated and combined to generate a basic index unit. For example, if the basic mapping value corresponding to the character "I" is 35 and the basic feature value is 152, the basic mapping value 35 and the basic feature value 152 are combined to form the basic index unit corresponding to the character "I". By preserving the correspondence between the basic mapping values and the basic feature values, subsequent rapid positioning of the corresponding character features based on the index data is enabled.
[0041] For basic mapping values that form an effective duplicate relationship, since multiple characters produce the same basic mapping result after mapping, additional distinguishing information needs to be added. Therefore, the effective duplicate relationship and the duplicate quantity corresponding to the conflicting mapping values are read, and information such as the number of duplicate characters under the same basic mapping value and the character position relationship is organized to form conflicting feature data. For example, if a basic mapping value 35 corresponds to original character positions 3 and 6 at the same time, the two duplicate positions corresponding to the basic mapping value and the corresponding duplicate quantity 2 are recorded to form corresponding conflicting feature data, which provides a data basis for subsequent distinguishing length calculation.
[0042] During the length discrimination calculation, the minimum number of binary bits required to distinguish the current number of conflicting characters is determined based on the number of repetitions. Since the number of binary data bits determines the number of states that can be represented, it is progressively determined whether the number of states corresponding to different bit lengths meets the requirement for distinguishing repetitive characters. When the number of states that a certain bit length can represent is greater than or equal to the number of repetitions, that bit length is determined as the corresponding discrimination length. For example, when the number of repetitions is 2, 1 binary bit can represent two states, which meets the discrimination requirement, so the discrimination length is determined to be 1 bit; when the number of repetitions is 5, 2 binary bits can only represent 4 states, which cannot distinguish 5 characters, so the length is increased to 3 bits, and 3 bits are determined as the corresponding discrimination length. By determining the discrimination length based on the actual number of repetitions, the use of the same length data for all conflict mapping values is avoided, improving the efficiency of distinguishing information utilization.
[0043] To further extract the positional distribution features of conflicting characters within valid repetition relationships, the process involves reading the original position indices of characters corresponding to the same conflict mapping value within the question's character sequence. The positional intervals between adjacent characters are then calculated according to their positional order, and these intervals, along with the overall character distribution, are used as positional distribution features. For example, if the original positions of characters corresponding to a conflict mapping value are 3, 7, and 10, the calculated intervals between adjacent positions are 4 and 3, respectively. These positional relationships reflect the distribution of characters corresponding to the conflict mapping value within the question text.
[0044] Based on positional distribution characteristics, the average positional interval between adjacent character positions is calculated. During calculation, all adjacent positional intervals corresponding to the same conflict mapping value are summed and divided by the number of adjacent intervals to obtain the average positional interval. Subsequently, the feature offset is calculated based on the correspondence between the average positional interval and the length of the distinguishing feature segment, allowing the extraction position of the distinguishing feature to be adjusted according to the character distribution. For example, when multiple conflicting characters are far apart in the question character sequence, it indicates that the distribution of repeated characters is relatively dispersed, so the feature offset is increased; when the conflicting character positions are relatively concentrated, the feature offset is decreased to keep the extraction area within the distinguishing feature segment.
[0045] When performing feature extraction, the first position of the distinguishing feature segment corresponding to each conflicting character is used as the reference position, and the starting point for data reading is adjusted according to the calculated feature offset. Specifically, the first binary data of the distinguishing feature segment is used as the initial reference position, and this position is shifted backward by the number of data bits corresponding to the feature offset to obtain the feature extraction starting position. For example, if the first position of a distinguishing feature segment is the 1st bit, and the calculated feature offset is 3, then the 4th bit is determined as the feature extraction starting position.
[0046] Based on the determined feature truncation start position, data bits that meet the discrimination length requirement are continuously read from the corresponding discriminative feature segment to form a discriminative feature set. During the reading process, the start position determines the reading direction, and the discrimination length determines the number of bits to be read. For example, if a conflict mapping value corresponds to a discrimination length of 2 bits, and the feature truncation start position is the 4th bit, then the 4th and 5th bits of binary data are read as the corresponding discriminative features. By combining the character position relationship to adjust the extraction position and combining the repetition number to adjust the extraction length, different conflict mapping values can obtain discriminative information matching their own characteristics.
[0047] Finally, the conflict mapping value, the corresponding basic feature value, the discrimination length, and the discrimination feature are combined to form an extended index unit. For example, if a conflict mapping value is 35, the corresponding basic feature value is 152, the discrimination length is 2 bits, and the extracted discrimination feature is 01, then the above data are combined to form the corresponding extended index unit. This extended index unit retains both the basic mapping information and the conflict discrimination information, allowing different characters that produce the same result after the basic mapping to still be identified by the discrimination feature, providing index data for the subsequent generation of character-level dense index sequences.
[0048] The formula for calculating the feature offset is as follows: ;
[0049] In the formula, For feature offset, To distinguish the length of the characteristic segment, Average interval between character positions.
[0050] Understandably, this calculation relationship is used to determine the location for extracting distinguishing features based on the data length of the distinguishing feature segment and the distribution of repeated characters in the question character sequence. The distinguishing feature segment length represents the range of data that can participate in character difference recognition; the longer the segment, the richer the distinguishing data retained, thus supporting a larger feature offset range. The average interval between character positions represents the average distribution distance of characters with the same basic mapping value in the original character sequence, reflecting the degree of positional correlation between repeated mapped characters. When the positional interval between repeated characters is small, it indicates that the distribution of characters with the same basic mapping value in the question character sequence is relatively concentrated, requiring an expansion of the distinguishing feature extraction range to obtain more difference data; therefore, the calculated feature offset is relatively larger. When the average interval between character positions is large, it indicates that the distribution of repeated characters in the question character sequence is relatively dispersed; by increasing the value of the adjustment term, the offset is reduced, keeping the feature extraction location within a reasonable range and avoiding excessive offset that causes the distinguishing feature extraction location to deviate from the effective data area.
[0051] From the formula structure, by setting a floor function, continuous calculation results are converted into integer form, ensuring that the obtained feature offset represents the number of offsets in the distinguishing feature segment. This offset is then used to determine the starting position for subsequent distinguishing feature extraction. The adjustment term prevents ineffective calculation when the average interval between character positions is zero, and allows the feature offset to be adjusted inversely as the average interval between character positions changes. The length of the distinguishing feature segment serves as a calculation range constraint, ensuring that the feature offset is always limited by the actual data length of the distinguishing feature segment and does not exceed the extractable data area. For example, when the length of the distinguishing feature segment remains constant, a decrease in the average interval between repeated characters results in a larger calculated feature offset, causing the feature extraction position to be adjusted towards the end of the distinguishing feature segment to extract character difference information from more distinguishing data. Conversely, when the average interval between repeated characters increases, the feature offset decreases, causing the feature extraction position to be closer to the beginning of the distinguishing feature segment. Through this calculation method, the distinguishing feature extraction position can be dynamically adjusted based on the character repetition distribution, improving the ability of the extended index unit to distinguish repeated base mapping values.
[0052] Furthermore, based on the character arrangement positions in the question character sequence, the basic index units and extended index units are combined to generate a character-level dense index sequence, and then segmented and combined according to the continuity of character arrangement to form a sequence-level dense index, specifically including: Based on the character arrangement position in the character sequence of the test question, obtain the basic index unit and extended index unit corresponding to each character, establish the correspondence between character position and index unit, and generate index unit association data; Based on the character position number in the associated data of the index unit, sort the positions of each index unit to obtain a sequence of index units arranged in character order; Based on the character positions corresponding to each index unit in the index unit sequence, determine whether there is a positional gap between the character positions corresponding to adjacent index units, determine the positional continuity between adjacent index units, and generate continuous relationship data. Based on continuous relational data, index units that satisfy continuous positional relationships are aggregated to form multiple continuous index segments; Specifically, after the construction of the basic index unit and the extended index unit is completed, it is necessary to reorganize each index unit according to the original arrangement relationship of valid characters in the plain text of the test question, so that the index information corresponding to the characters maintains the positional association with the original test question content. During processing, the original position serial number corresponding to each valid character is read, the basic index unit or extended index unit corresponding to the character is synchronously acquired, and the original position serial number is associated with the corresponding index unit to form index unit association data. For example, after the plain text of the test question "1. Where is the capital of our country?" is filtered for format characters, the character "我" corresponds to the original position serial number 3, the character "国" corresponds to the original position serial number 4, and the character "首" corresponds to the original position serial number 5. If the character "我" corresponds to the basic index unit and the character "国" corresponds to the extended index unit, the association relationship between the original position serial number 3 and the basic index unit, and the association relationship between the original position serial number 4 and the extended index unit are respectively established. By retaining the original position serial numbers, the subsequent index combination process can still be carried out according to the real character arrangement relationship in the plain text of the test question.
[0053] After the index unit association data is formed, the original position serial numbers recorded therein are sorted. During the sorting process, the index units corresponding to different characters are rearranged in the order of the original position serial numbers from small to large, so that the arrangement order of the index units is consistent with the occurrence order of valid characters in the plain text of the test question. For example, if the original position serial numbers 5, 3, and 4 recorded in the index unit association data respectively correspond to different index units, the arrangement order of the index units corresponding to 3, 4, and 5 is adjusted according to the original position serial numbers, so as to form an index unit sequence arranged according to the original character arrangement relationship.
[0054] After the sorting is completed, the continuous relationship of the original positions between adjacent index units is judged. In the judging process, the original position serial numbers corresponding to two adjacent index units are read, and the difference between the two position serial numbers is calculated. When the original position serial numbers corresponding to adjacent index units are continuously incremented, it indicates that the characters corresponding to the two index units are arranged continuously in the original test question text, and this relationship is determined as a continuous position state; when there are missing positions between the original position serial numbers corresponding to the two index units, it is determined as a non-continuous position state. For example, the original position serial number 3 corresponds to index unit A, the original position serial number 4 corresponds to index unit B, and the difference between the two is 1, which is determined as a continuous relationship; if the original position serial number 4 corresponds to index unit B and the original position serial number 7 corresponds to index unit C, it indicates that there is a position interval between the two, and no continuous relationship is formed. By judging the continuous state of the original positions, subsequent index segmentation can be performed according to the character arrangement relationship of the test question.
[0055] After obtaining the continuous relationship data, the index units that satisfy the continuous positional relationship are aggregated. During the aggregation process, the index unit sequence is traversed according to its order, and adjacent consecutive index units are divided into the same continuous index segment. When an interval is detected in the original position number, the current continuous index segment is terminated, and the next continuous index segment is reconstructed. For example, if an index unit sequence corresponds to the original position numbers 3, 4, 5, 8, and 9, where 3 to 5 are consecutive and there is an interval between 5 and 8, then the index units corresponding to the original position numbers 3, 4, and 5 are combined to form one continuous index segment, and the index units corresponding to the original position numbers 8 and 9 are combined to form another continuous index segment.
[0056] Through the above processing, the character-level dense index units are formed into continuous index segments according to the original arrangement relationship in the test text, and the positional relationship between characters is preserved, providing a structural basis for the subsequent generation of sequence-level dense indexes with segment structure information.
[0057] Based on the arrangement of index units in each consecutive index segment, extract the number of index units, index unit type, and index unit connection relationship within the segment to generate index segment feature data; Based on the index segment feature data, segment identifier encoding is performed on each consecutive index segment to generate index segment identifier information; The index segment combination data with segment structure information is generated by combining the index segment identifier information with the index units in the corresponding consecutive index segments. Based on the character arrangement order, multiple index segments with segment structure information are sequentially associated to form a sequence-level dense index.
[0058] Understandably, after completing the partitioning of consecutive index segments, the index structure contained within each consecutive index segment is further organized. The number of index units within the segment, the type of index units, and the arrangement and connection relationships between index units are extracted to form index segment feature data describing the structure of the current consecutive index segment. During processing, the number of each index unit contained in the consecutive index segment is read, the type corresponding to each index unit is identified, and the connection relationships between adjacent index units formed according to their original position numbers are recorded.
[0059] The number of index units indicates the index range contained in the current continuous index segment, the index unit type distinguishes between basic index units and extended index units, and the connection relationship reflects whether the index units are arranged consecutively according to their original position numbers. For example, if a continuous index segment contains three index units corresponding to original position numbers 3, 4, and 5, where original position numbers 3 and 4 correspond to basic index units and original position number 5 corresponds to an extended index unit, then this continuous index segment is recorded as containing 3 index units. The type arrangement relationship of the basic index units, the basic index units, and the extended index units, as well as the positional connection relationship between adjacent index units, are also recorded to form the corresponding index segment feature data.
[0060] After obtaining the index segment feature data, segment identifier encoding is performed on each consecutive index segment. During the encoding process, the structural information in the index segment feature data is converted into corresponding identifier fields. First, a quantity identifier is generated based on the number of index units contained in the consecutive index segment. Then, a type identifier is generated based on the arrangement of basic index units and extended index units within the segment. At the same time, a connection identifier is generated based on the positional connection relationship between adjacent index units. The above identifier fields are combined to form the segment identifier information of the corresponding consecutive index segment.
[0061] For example, if a contiguous index segment contains 5 index units, including 4 basic index units and 1 extended index unit, and all index units are continuously connected, then the corresponding segment identification information is generated based on the number of index units, the arrangement of index unit types, and the connection relationship. When another contiguous index segment also contains 5 index units, but the arrangement of the basic index units and the extended index units is different, then different segment identification information is generated due to the differences in the index segment feature data.
[0062] After obtaining the index segment identifier information, the segment identifier information is associated and combined with the index units in the corresponding continuous index segments, so that each continuous index segment contains both a structure identifier and the corresponding index content. During the combination process, the segment identifier information is used as the header structure field of the current continuous index segment, and each index unit in the continuous index segment is sequentially associated with the segment identifier information according to the original position sequence of the index units, forming combined index segment data with segment structure information.
[0063] For example, if a consecutive index segment corresponds to segment identifier S1, which contains three index units corresponding to the original position numbers 3, 4, and 5, then S1 and these three index units are combined according to their original order to form the corresponding index segment combination data. This combination method ensures that each consecutive index segment retains its own structural information and the index content of its corresponding characters.
[0064] After multiple index segment combinations are formed, they are sequentially associated according to the original arrangement positions corresponding to the question character sequence. During the association process, the starting original position number corresponding to each consecutive index segment is read, and the multiple index segment combinations are arranged in ascending order of starting position to ensure that the different index segments maintain consistency with the arrangement relationship of the plaintext characters of the question. For example, if a question character sequence is segmented to form a first index segment corresponding to original position numbers 3 to 6, and a second index segment corresponding to original position numbers 9 to 12, then the first index segment combination data is arranged before the second index segment combination data according to the starting original position number order to form a complete sequence-level structure.
[0065] Through the above processing, the character-level encrypted index units are organized according to the original arrangement of the test question characters, and the continuous index segment division information is retained in the index structure, ultimately forming a sequence-level encrypted index. This sequence-level encrypted index contains the content of the index units, the structure information of the index segments, and the character arrangement relationship, providing a structured data foundation for subsequently establishing a connection with the encrypted text of the test question display.
[0066] Furthermore, the plaintext of the test questions is encrypted using an encryption key to obtain the ciphertext of the test questions. The sequence-level encrypted index is then linked to the ciphertext of the test questions to form the ciphertext index data, which specifically includes: The plaintext of the test questions is divided into blocks based on the encryption key to obtain multiple plaintext data blocks. Each plaintext data block is then encrypted to generate the corresponding ciphertext data block. Based on the order of plaintext data blocks in the plaintext of the test questions, multiple ciphertext data blocks are sequentially combined to generate the ciphertext of the test questions. Based on the ciphertext grouping information in the ciphertext displayed in the test questions, extract the ciphertext location identifiers corresponding to each ciphertext group and generate ciphertext identifier data; Based on the index segment identifier information in the sequence-level dense index, extract the index position range corresponding to each index segment and generate index position association data; Based on the positional correspondence between the index position associated data and the ciphertext identifier data, establish an association mapping between the sequence-level ciphertext index and the ciphertext of the test question display, and generate the ciphertext index association relationship; Based on the ciphertext index association relationship, the sequence-level ciphertext index is associated and stored with the ciphertext of the test question display to form a test question ciphertext index unit; Multiple encrypted question index units are aggregated to form encrypted question index data.
[0067] Specifically, after constructing the sequence-level encrypted index, it is necessary to establish a connection between the displayed ciphertext corresponding to the plaintext of the question and the sequence-level encrypted index. This allows the retrieval process to locate the corresponding question content based on the encrypted index without directly accessing the plaintext. During processing, the plaintext of the question is first divided into blocks using the encryption key. The complete question text is divided into multiple plaintext data blocks according to a set data block length, and each plaintext data block is encrypted to generate the corresponding ciphertext data block. The block length is determined according to the data processing requirements of the encryption algorithm, ensuring that each plaintext data block can participate in the encryption operation independently while maintaining the original arrangement relationship between the data blocks. For example, the plaintext question "What is the capital of our country?" is divided according to a fixed data block length, resulting in multiple consecutive plaintext data blocks, such as a block containing "What is the capital of our country?" and "What is it?". Subsequently, the above plaintext data blocks are encrypted using the encryption key to obtain the corresponding ciphertext data blocks. Since each plaintext data block is processed using the same encryption key, different data blocks form corresponding ciphertext representations, but the original test question characters cannot be directly obtained from the ciphertext content.
[0068] After obtaining multiple ciphertext data blocks, the ciphertext data blocks are recombined according to their original arrangement order in the plaintext question text. During the recombination process, the block number corresponding to each plaintext data block is read, and the corresponding ciphertext data blocks are arranged in ascending order of block number, ensuring that the encrypted data retains the overall arrangement relationship within the question text, thus forming the ciphertext of the question presentation. For example, if plaintext data block 1 corresponds to ciphertext data block A, and plaintext data block 2 corresponds to ciphertext data block B, then the complete ciphertext of the question presentation is formed by combining blocks A and B in that order.
[0069] After generating the encrypted question display, the encrypted grouping structure is parsed to extract the location identifier information corresponding to each encrypted group. During processing, based on the arrangement order of the encrypted data blocks, the corresponding group number and position range in the encrypted question display are recorded for each encrypted group, forming encrypted identifier data. For example, if the encrypted question display consists of 3 encrypted data blocks, the location identifiers corresponding to each of the 3 encrypted data blocks are recorded, enabling subsequent location of the corresponding encrypted area based on the index association relationship.
[0070] Simultaneously, based on the index segment identifier information in the sequence-level dense index, the character coverage range corresponding to each index segment is parsed to determine the original character position range associated with each index segment. Since the original character arrangement and index segment division relationships are preserved during the generation process of the sequence-level dense index, the start and end positions of the corresponding consecutive index segments can be read based on the index segment identifier information to form index position association data. For example, if the first index segment in a sequence-level dense index corresponds to original position numbers 3 to 6, and the second index segment corresponds to original position numbers 9 to 12, then the position range associated with the first index segment and the position range associated with the second index segment are recorded respectively to form index position association data.
[0071] After obtaining the index position association data and ciphertext identifier data, an association mapping is established based on the positional correspondence between the two. During the mapping process, the character position range covered by the index segment is matched with the position range of the corresponding ciphertext group according to the character arrangement relationship preserved during the plaintext question segmentation. When the character position corresponding to a certain index segment falls within the range of a certain plaintext data block, an association relationship is established between the index segment and the corresponding ciphertext data block, forming a ciphertext index association relationship. For example, if a consecutive index segment corresponds to character positions 3 to 8 in the plaintext question, and ciphertext group 2 corresponds to plaintext data block positions 3 to 8, then an association is established between the index segment and ciphertext group 2, enabling further location of the corresponding ciphertext data block when the index segment is retrieved subsequently.
[0072] After establishing the ciphertext index association, the sequence-level ciphertext index is associated and stored with the corresponding ciphertext of the test question display, forming a test question ciphertext index unit. During storage, the sequence-level ciphertext index is used as the retrieval field, and the test question display ciphertext is used as the corresponding content field. The association between the two is also preserved, ensuring that each test question forms an independent ciphertext index storage structure. For example, for a single test question in the question bank, the generated sequence-level ciphertext index, the test question display ciphertext, and the association between the two are stored together to form a test question ciphertext index unit; for multiple test questions, the same process is performed separately to obtain multiple corresponding test question ciphertext index units.
[0073] After multiple encrypted question index units are formed, they are aggregated and stored to form encrypted question index data. This encrypted question index data simultaneously stores the sequence-level encrypted state index and the displayed encrypted text corresponding to multiple questions. This eliminates the need to decrypt and analyze all the encrypted text during the retrieval process. Instead, candidate questions are matched first through the encrypted state index, and then the corresponding displayed encrypted text is obtained.
[0074] Furthermore, based on the encrypted question index data constructed above, a fuzzy retrieval process can be implemented. During retrieval, the user-inputted search characters or keywords are first obtained, and the same search key as in the index construction stage is used to perform character segmentation, character encoding conversion, and HMAC-SM3 encrypted feature calculation on the search content to obtain the encrypted features corresponding to the search characters. Subsequently, the corresponding basic feature segments and distinguishing feature segments are extracted from the encrypted features, and the basic retrieval mapping values are generated according to the same mapping rules.
[0075] Because the encrypted question index data stores the basic mapping values corresponding to each character and the extended index units generated for duplicate mappings, the retrieval process can first match the basic mapping values corresponding to the search characters with the basic index units in the index library. When the basic mapping value is unique, the corresponding character index is directly determined; when the basic mapping values are duplicated, the distinguishing features generated by the distinguishing feature segments are further used to match the distinguishing features in the extended index units, filtering the corresponding characters from the duplicate mapping results. For example, when a user enters "capital" for retrieval, the corresponding encrypted features and basic mapping values for "capital" and "capital" are first generated, and then matched with the sequence-level encrypted indexes in the encrypted question index data. When there are consecutive index segments corresponding to "capital" and "capital" in a question, the question is determined to be a matching candidate based on the continuity between the index segments, and the corresponding question is located and the encrypted text is displayed through the index association relationship, finally returning the corresponding encrypted text result.
[0076] When the user input is exactly the same as the original question characters, a precise match can be achieved through the basic mapping value and the extended index unit. When the user input contains some missing characters, changes in character order, or only contains question fragments, since the sequence-level dense index retains the character-level index relationship and continuous index segment structure, candidate questions can be determined by matching the index segments corresponding to some characters, thus realizing fuzzy retrieval based on the dense index.
[0077] Through the above method, the test questions are always stored in encrypted form. The retrieval process only matches the sequence-level encrypted index and does not need to directly expose the plaintext of the test questions. At the same time, the basic mapping value and extended index unit are used to solve the problem of repeated character mapping, so that the test question retrieval in encrypted state can take into account both retrieval accuracy and fuzzy matching ability.
[0078] Furthermore, a fuzzy-searchable encrypted test question index construction system is proposed, which is used for any of the above-mentioned fuzzy-searchable encrypted test question index construction methods, including: The character processing module is used to obtain the plaintext of the test questions, the retrieval key, and the encryption key, to segment the plaintext of the test questions into characters, and to generate a sequence of test question characters according to the character arrangement. The feature calculation module is used to perform secret-state feature calculation on each character in the question character sequence based on the retrieval key, extract basic feature segments and distinguishing feature segments, and generate basic mapping values corresponding to each character. The mapping analysis module is used to identify duplicates of each basic mapping value and determine the mapping status based on the number of duplicates and the character position relationship of the basic mapping value. The index building module is used to construct basic index units and extended index units according to the mapping state, and generate a character-level dense index sequence by combining the character arrangement position; The association generation module is used to segment and combine the character-level dense index sequence to form a sequence-level dense index, and then establish an index association between the sequence-level dense index and the ciphertext of the test questions to generate the ciphertext index data of the test questions.
[0079] Furthermore, the feature calculation module includes: The character encoding unit is used to encode the characters in the character sequence of the test questions according to the Unicode encoding rules and determine the character encoding value corresponding to each character. The secret state calculation unit is used to use the character encoding value as message data and combine it with the retrieval key to perform HMAC-SM3 calculation to generate the secret state feature corresponding to each character. The feature segmentation unit is used to determine the basic region and the distinguishing region based on the data length of the dense features, and to extract the basic feature segments and the distinguishing feature segments. The numerical conversion unit is used to convert the binary data in the basic feature segment into integers to generate the basic feature value corresponding to each character. The mapping generation unit is used to determine the mapping range length based on the data bit length of the basic feature segment, and to perform a modulo operation on the basic feature value to generate the basic mapping value.
[0080] Furthermore, the index building module includes: The state classification unit is used to classify the mapping states corresponding to the basic mapping values, and generate a set of unique mapping values and a set of conflicting mapping values. The basic generation unit is used to extract basic feature values from the unique mapping value set and combine the basic mapping values with the basic feature values to generate basic index units. The conflict analysis unit is used to extract valid duplicate relationships and the number of duplicates based on the conflict mapping value set, and to generate conflict feature data. The length determination unit is used to determine the distinguishing length based on the number of repetitions and to determine the feature offset in combination with the character position relationship; The extended generation unit is used to extract the corresponding length of the distinguishing feature from the distinguishing feature segment according to the feature offset, and combine the conflict mapping value, the basic feature value, the distinguishing length and the distinguishing feature to generate the extended index unit.
[0081] Furthermore, the association generation module includes: The position association unit is used to obtain the basic index unit and extended index unit corresponding to each character according to the character arrangement position, and generate index unit association data; The continuity judgment unit is used to determine the positional continuity between adjacent index units based on the character position sequence number in the associated data of the index unit, and to generate continuous relationship data. The segmentation and combination unit is used to aggregate index units that satisfy continuous positional relationships based on continuous relational data to form continuous index segments; The ciphertext association unit is used to establish a sequence-level ciphertext index and an association mapping between the ciphertext displayed in the ciphertext and the index position association data in the ciphertext of the test question display. The data generation unit is used to summarize multiple test question encrypted index units according to the encrypted index association relationship to form test question encrypted index data.
[0082] In summary, the advantages of this invention are as follows: by performing dense-state feature calculation on the question character sequence, extracting basic feature segments and distinguishing feature segments, and generating basic mapping values, a dense-state representation of the question character information is achieved; by repeatedly identifying the basic mapping values, basic index units and extended index units are dynamically constructed according to the mapping state, improving the feature discrimination capability in the index construction process; by combining the character arrangement position to generate a character-level dense-state index sequence, and forming a sequence-level dense-state index according to the character continuity, the structural information of the question characters is preserved; by establishing the association between the sequence-level dense-state index and the encrypted text of the question display, fuzzy retrieval based on the index is achieved in the encrypted environment, improving the accuracy and applicability of the encrypted question index construction.
[0083] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention. The scope of protection of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for constructing a fuzzy-searchable encrypted index for test questions, characterized in that, include: Obtain the plaintext of the test questions, the retrieval key, and the encryption key; perform character segmentation on the plaintext of the test questions; and generate a sequence of test question characters according to the arrangement of the characters in the plaintext of the test questions. Based on the retrieval key, the secret state features of each character in the question character sequence are calculated, and basic feature segments and distinguishing feature segments are extracted from the secret state features. The basic feature segments are then mapped to the basic mapping values corresponding to each character. Repeated identification is performed on each basic mapping value to determine the mapping status of each basic mapping value; Based on the mapping state, construct basic index units for basic mapping values that do not repeat, determine the distinguishing length for basic mapping values that repeat, and combine the basic mapping values with the distinguishing features of the corresponding length to construct extended index units. Based on the character arrangement positions in the question character sequence, the basic index unit and the extended index unit are combined to generate a character-level dense index sequence, and then segmented and combined according to the continuity of character arrangement to form a sequence-level dense index; The plaintext of the test questions is encrypted using an encryption key to obtain the ciphertext of the test questions. The sequence-level encrypted index is then linked with the ciphertext of the test questions to form ciphertext index data that supports fuzzy retrieval of the encrypted state.
2. The method for constructing a fuzzy-searchable encrypted index for test questions according to claim 1, characterized in that, The process of calculating the encrypted features of each character in the question character sequence based on the retrieval key, extracting basic feature segments and distinguishing feature segments from the encrypted features, and mapping the basic feature segments to the basic mapping values corresponding to each character specifically includes: The plaintext of the test questions is read character by character, and the characters are extracted in the order they are read to form an initial character set; Based on the character types in the initial character set, the initial character set is filtered to remove format characters that do not participate in the search and matching, resulting in a valid character set, while retaining the original position index corresponding to the valid characters; Based on the original position number corresponding to each character in the valid character set, a character position set is formed, and the characters in the character position set are arranged in order according to the position number to generate the test question character sequence; Each character in the character sequence of the test question is encoded according to the Unicode encoding rules to determine the Unicode code point value corresponding to each character, and the Unicode code point value is converted into fixed-length byte data to obtain the character encoding value corresponding to each character; The character encoding value corresponding to each character is used as message data, and HMAC-SM3 calculation is performed in combination with the retrieval key to generate the secret state feature corresponding to each character; Based on the dense state features corresponding to each character, the basic region and the distinguishing region are determined according to the preset segmentation ratio. The data corresponding to the basic region is divided into basic feature segments, and the data corresponding to the distinguishing region is divided into distinguishing feature segments, thus obtaining the basic feature segments and distinguishing feature segments corresponding to each character. Based on the binary data in the basic feature segment corresponding to each character, perform integer conversion according to the binary value conversion rules to obtain the basic feature value corresponding to each character; Based on the data bit length of the basic feature segment, determine the number of representable values corresponding to the basic feature segment, and use the number of representable values as the length of the mapping range; The basic feature value corresponding to each character is moduloed by the length of the mapping range to obtain the basic mapping value corresponding to each character.
3. The method for constructing a fuzzy-searchable encrypted index for test questions according to claim 1, characterized in that, The step of identifying duplicates of each basic mapping value and determining the mapping status of each basic mapping value specifically includes: Read the basic mapping values corresponding to the character arrangement positions sequentially to generate a sequence of basic mapping values; Based on the numerical relationships in the sequence of base mapping values, match the positions of characters with the same base mapping value to generate mapping value matching relationships; Based on the mapping value matching relationship, the character positions corresponding to the same basic mapping value are aggregated to form a basic mapping value set; The number of characters in each set of basic mapping values is counted to obtain the number of repetitions for each basic mapping value. Based on the number of repetitions corresponding to each basic mapping value and the character position relationship, determine the repetition range corresponding to each basic mapping value; Based on the repetition range corresponding to each basic mapping value, the number of characters, the distribution of character positions, and the positional interval relationship within the repetition range are extracted to generate repetition feature data; Based on the repetitive feature data, the character position intervals corresponding to each basic mapping value are extracted, and the character position intervals are compared with the preset interval range. The repetitive relationships that meet the preset interval range are determined as valid repetitive relationships. Based on the effective duplication relationship and the number of duplications, a unique mapping state is determined for the basic mapping values that have not formed an effective duplication relationship or have not generated a duplication relationship. For the basic mapping values that form valid repetition relationships, determine the conflict mapping state, and generate the mapping state corresponding to each basic mapping value based on the number of repetitions.
4. The method for constructing a fuzzy-searchable encrypted index for test questions according to claim 1, characterized in that, The process of constructing basic index units for non-repeating basic mapping values based on the mapping state, determining the distinguishing length for repeating basic mapping values according to the number of repetitions, and combining the basic mapping values with distinguishing features of the corresponding length to construct extended index units specifically includes: Based on the mapping status corresponding to each basic mapping value, the basic mapping values are classified to obtain a set of unique mapping values and a set of conflicting mapping values. Based on the unique set of mapping values, extract the basic feature values corresponding to each basic mapping value, and combine the basic mapping values with the corresponding basic feature values to generate basic index units; Based on the set of conflict mapping values, extract the valid repetition relationships and repetition counts corresponding to each conflict mapping value to generate conflict feature data; Based on the number of repetitions in the conflict feature data, determine the minimum binary length that satisfies the repetition number discrimination condition, and use this minimum binary length as the discrimination length corresponding to each conflict mapping value. Based on the positional relationships of characters in the valid repetition relationships, extract the positional distribution features between conflicting characters; Based on the character position distribution characteristics in the effective repetition relationship, the average position interval between adjacent character positions is calculated, and the feature offset is determined according to the correspondence between the average position interval and the length of the distinguishing feature segment. Based on the data arrangement order of the distinguishing feature segments corresponding to each conflicting character, the first position of the distinguishing feature segment is taken as the reference position, and the reference position is offset according to the feature offset to determine the starting position of feature extraction. Based on the distinguishing length corresponding to each conflict mapping value, distinguishing features of corresponding length are extracted from the distinguishing feature segments according to the feature truncation start position to generate a distinguishing feature set; Based on the set of distinguishing features, the conflict mapping value, the corresponding basic feature value, the distinguishing length, and the corresponding distinguishing feature are combined to generate an extended index unit; The formula for calculating the feature offset is as follows: In the formula, For feature offset, To distinguish the length of the characteristic segment, Average interval between character positions.
5. The method for constructing a fuzzy-searchable encrypted index for test questions according to claim 1, characterized in that, The method involves combining basic index units and extended index units based on the character arrangement positions in the question character sequence to generate a character-level dense index sequence, and then segmenting and combining them according to the continuity of character arrangement to form a sequence-level dense index, specifically including: Based on the character arrangement position in the character sequence of the test question, obtain the basic index unit and extended index unit corresponding to each character, establish the correspondence between character position and index unit, and generate index unit association data; Based on the character position number in the associated data of the index unit, sort the positions of each index unit to obtain a sequence of index units arranged in character order; Based on the character positions corresponding to each index unit in the index unit sequence, determine whether there is a positional gap between the character positions corresponding to adjacent index units, determine the positional continuity between adjacent index units, and generate continuous relationship data. Based on continuous relational data, index units that satisfy continuous positional relationships are aggregated to form multiple continuous index segments; Based on the arrangement of index units in each consecutive index segment, extract the number of index units, index unit type, and index unit connection relationship within the segment to generate index segment feature data; Based on the index segment feature data, segment identifier encoding is performed on each consecutive index segment to generate index segment identifier information; The index segment combination data with segment structure information is generated by combining the index segment identifier information with the index units in the corresponding consecutive index segments. Based on the character arrangement order, multiple index segments with segment structure information are sequentially associated to form a sequence-level dense index.
6. The method for constructing a fuzzy-searchable encrypted index for test questions according to claim 1, characterized in that, The process involves encrypting the plaintext of the test questions using an encryption key to obtain the ciphertext of the test questions, and then establishing an index association between the sequence-level encrypted index and the ciphertext of the test questions to form the ciphertext index data. Specifically, this includes: The plaintext of the test questions is divided into blocks based on the encryption key to obtain multiple plaintext data blocks. Each plaintext data block is then encrypted to generate the corresponding ciphertext data block. Based on the order of plaintext data blocks in the plaintext of the test questions, multiple ciphertext data blocks are sequentially combined to generate the ciphertext of the test questions. Based on the ciphertext grouping information in the ciphertext displayed in the test questions, extract the ciphertext location identifiers corresponding to each ciphertext group and generate ciphertext identifier data; Based on the index segment identifier information in the sequence-level dense index, extract the index position range corresponding to each index segment and generate index position association data; Based on the positional correspondence between the index position associated data and the ciphertext identifier data, establish an association mapping between the sequence-level ciphertext index and the ciphertext of the test question display, and generate the ciphertext index association relationship; Based on the ciphertext index association relationship, the sequence-level ciphertext index is associated and stored with the ciphertext of the test question display to form a test question ciphertext index unit; Multiple encrypted question index units are aggregated to form encrypted question index data.
7. A system for constructing a fuzzy-searchable encrypted test question index, used to implement the method for constructing a fuzzy-searchable encrypted test question index as described in any one of claims 1-6, characterized in that, include: The character processing module is used to obtain the plaintext of the test questions, the retrieval key, and the encryption key, to segment the plaintext of the test questions into characters, and to generate a sequence of test question characters according to the character arrangement. The feature calculation module is used to perform secret-state feature calculation on each character in the question character sequence based on the retrieval key, extract basic feature segments and distinguishing feature segments, and generate basic mapping values corresponding to each character; The mapping analysis module is used to identify repetitions of each basic mapping value and determine the mapping status based on the number of repetitions and character position relationships corresponding to the basic mapping values. An index construction module is used to construct basic index units and extended index units according to the mapping state, and generate a character-level dense index sequence in combination with the character arrangement position; The association generation module is used to segment and combine the character-level dense index sequence to form a sequence-level dense index, and to establish an index association between the sequence-level dense index and the ciphertext of the test questions to generate test question ciphertext index data.
8. A fuzzy-searchable encrypted test question index construction system according to claim 7, characterized in that, The feature calculation module includes: A character encoding unit is used to encode and convert the characters in the test question character sequence according to the Unicode encoding rules, and determine the character encoding value corresponding to each character. The secret state calculation unit is used to use the character encoding value as message data and combine it with the retrieval key to perform HMAC-SM3 calculation to generate the secret state feature corresponding to each character. The feature segmentation unit is used to determine the basic region and the distinguishing region based on the data length of the dense features, and to extract the basic feature segments and the distinguishing feature segments. A numerical conversion unit is used to perform integer conversion based on the binary data in the basic feature segment to generate the basic feature value corresponding to each character. A mapping generation unit is used to determine the mapping range length based on the data bit length of the basic feature segment, and to perform a modulo operation on the basic feature value to generate a basic mapping value.
9. A fuzzy-searchable encrypted test question index construction system according to claim 7, characterized in that, The index building module includes: A state classification unit is used to classify the mapping states corresponding to the basic mapping values, and generate a set of unique mapping values and a set of conflicting mapping values. A basic generation unit is used to extract basic feature values based on a unique mapping value set, and combine the basic mapping values with the basic feature values to generate a basic index unit. A conflict analysis unit is used to extract valid duplicate relationships and the number of duplicates based on a set of conflict mapping values, and to generate conflict feature data. A length determination unit is used to determine the distinguishing length based on the number of repetitions and to determine the feature offset in combination with the character position relationship; An extended generation unit is used to extract distinguishing features of corresponding length from distinguishing feature segments according to feature offset, and combine conflict mapping values, basic feature values, distinguishing lengths and distinguishing features to generate an extended index unit.
10. A fuzzy-searchable encrypted test question index construction system according to claim 7, characterized in that, The association generation module includes: A position association unit is used to obtain the basic index unit and extended index unit corresponding to each character according to the character arrangement position, and generate index unit association data; A continuity judgment unit is used to determine the positional continuity status between adjacent index units based on the character position sequence number in the associated data of the index unit, and to generate continuous relationship data. The segmentation and combination unit is used to aggregate index units that satisfy continuous positional relationships based on continuous relational data to form continuous index segments; The ciphertext association unit is used to establish an association mapping between the sequence-level ciphertext index and the ciphertext displayed in the test question ciphertext based on the ciphertext position identifier and index position association data in the ciphertext of the test question display. A data generation unit is used to summarize multiple test question encrypted index units according to the encrypted index association relationship to form test question encrypted index data.