Knowledge data scheduling method and device, equipment, medium and program product

By generating version identifiers for documents and performing semantic parsing, multi-type knowledge data is generated and stored, solving the problems of inaccurate knowledge scheduling and insufficient version management in existing technologies. This achieves efficient, accurate, and universal document format processing for the knowledge base, improving its applicability and consistency.

CN123178635APending Publication Date: 2026-11-27CHINA UNITED NETWORK COMM GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611191990.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-06
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

When building a knowledge system, existing technologies generate knowledge content that is stored independently, making it impossible to effectively distinguish between different versions of documents. This results in poor accuracy in knowledge scheduling, a lack of collaborative generation mechanisms for multiple types of knowledge, strong dependence on input data, lack of process control, insufficient version management, and significant limitations in application scenarios.

Method used

By automatically generating version identifiers for received documents and parsing the document content into semantic units and knowledge elements, various types of knowledge data are generated. The document identifier, version identifier, and knowledge data are then associated and stored in the knowledge database, achieving strict version management and process control, and supporting the parsing and unified storage of multiple document formats.

Benefits of technology

It significantly improves the accuracy of knowledge scheduling, solves the scheduling deviation caused by chaotic knowledge data, realizes the collaborative generation of multiple types of knowledge and the processing of common document formats, and ensures the version consistency and applicability of the knowledge base.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123178635A_ABST
    Figure CN123178635A_ABST
Patent Text Reader

Abstract

The application provides a knowledge data scheduling method and device, equipment, medium and program product, relates to the technical field of electronic, and is used for improving the accuracy of knowledge scheduling. The specific technical scheme is: generating a version identifier for a first document, generating knowledge data based on document content, and storing the document identifier, version identifier and knowledge data in a knowledge database; the knowledge database stores at least one knowledge data set, each knowledge data set corresponds to a document, each knowledge database includes knowledge data associated with each version identifier of a document, and the knowledge data associated with different version identifiers of a document comes from different versions of the document; when receiving a task request of a client device, target knowledge data associated with a target version identifier matching demand information of the task request is obtained from the knowledge database, and the target knowledge data is sent to the client device. The application is applied to the storage and scheduling scene of multiple types of knowledge data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electronic technology, and in particular to a knowledge data scheduling method, apparatus, device, medium, and program product. Background Technology

[0002] In the fields of knowledge engineering and artificial intelligence, building a high-quality, multi-type knowledge system is the foundation for supporting large-scale model training and intelligent applications.

[0003] Currently, existing methods for building knowledge systems typically involve: first, acquiring input data to be processed, such as user query logs, pre-built knowledge graphs, real-time event data streams, or image files; then, directly importing the input data into a pre-built neural network model; and finally, through end-to-end reasoning of the model, directly generating and outputting a single type of knowledge content and storing it, such as related knowledge entries, completed relational knowledge, or security knowledge in a specific domain.

[0004] However, existing methods store the knowledge content independently after it is generated. When the source document is updated or revised, the knowledge corresponding to different versions of the document becomes mixed up, resulting in poor accuracy of knowledge scheduling. Summary of the Invention

[0005] This application provides a knowledge data scheduling method, apparatus, device, medium, and program product to improve the accuracy of knowledge scheduling.

[0006] In a first aspect, embodiments of this application provide a knowledge data scheduling method, the method comprising: upon receiving a first document, generating a first version identifier corresponding to the first document based on the acquisition timestamp of the first document; obtaining at least one semantic unit and at least one knowledge element based on the document content of the first document; generating at least one knowledge data based on the at least one semantic unit and at least one knowledge element, the at least one knowledge data including at least one of the following: structured knowledge data, question-answer pair knowledge data, rich text knowledge data; associating and storing the document identifier, the first version identifier, and the knowledge data of the first document in a knowledge database; the knowledge database storing at least one knowledge dataset, each knowledge dataset corresponding to one document, each knowledge database including knowledge data associated with each version identifier of a document, and knowledge data associated with different version identifiers of a document coming from different versions of the document; upon receiving a task request from a client device, obtaining target knowledge data associated with a target version identifier that matches the requirement information of the task request from the knowledge database, and sending the target knowledge data to the client device.

[0007] The technical solution provided in this application brings at least the following beneficial effects: By automatically generating version identifiers for received documents and parsing the document content into semantic units and knowledge elements to generate various types of knowledge data, the document identifier, version identifier, and knowledge data are associated and stored in the knowledge database, enabling the knowledge data corresponding to different versions of documents to be managed separately. Thus, when a task request is received from a client device, the knowledge data associated with the target version identifier can be accurately matched from the knowledge database based on the requirement information in the request and fed back, effectively avoiding scheduling deviations caused by chaotic knowledge data, thereby significantly improving the accuracy of knowledge scheduling.

[0008] One possible implementation is that each knowledge dataset includes at least one knowledge data entry, each knowledge data entry is associated with a document joint identifier and at least one knowledge data, and each knowledge data entry corresponds to a version status, which includes an unavailable status or an available status, and the document joint identifier is composed of a document identifier and a version identifier.

[0009] Another possible implementation, whereby the document identifier, first version identifier, and knowledge data of the first document are associated and stored in the knowledge database, includes: if at least one knowledge data entry already exists in the first knowledge dataset corresponding to the first document in the knowledge database, then based on the document identifier, first version identifier, and knowledge data of the first document, a first knowledge data entry is constructed in the first knowledge dataset, the version status of the first knowledge data entry is set to an available state, and the version status corresponding to at least one knowledge data entry is updated to an unavailable state; the first knowledge data entry includes the first joint identifier of the associated first document and the knowledge data; or, if the knowledge dataset corresponding to the first document does not exist in the knowledge database, then a new knowledge dataset is created, and a second knowledge data entry is constructed in the new knowledge dataset, the version status of the second knowledge data entry is set to an available state; the second knowledge data entry includes the first joint identifier of the associated first document and the knowledge data; wherein, the first joint identifier is composed of the document identifier and the first version identifier of the first document.

[0010] Another possible implementation involves obtaining target knowledge data associated with a target version identifier that matches the requirement information of the task request from a knowledge database, including: determining first knowledge data that matches the requirement information of the task request; determining a target knowledge dataset containing the first knowledge data; and identifying the knowledge data in the target knowledge data entries in the target knowledge dataset whose version status is available as the target knowledge data.

[0011] Another possible implementation is that, after obtaining the target knowledge data associated with the target version identifier that matches the requirement information of the task request from the knowledge database, the method further includes: upon receiving a re-examination request from the client device, if there are at least two knowledge data entries in the target knowledge dataset, the version status of the other knowledge data entries besides the target knowledge data entry is updated to the available status, and the knowledge data in the other knowledge data entries is sent to the client device.

[0012] Secondly, embodiments of this application provide a knowledge data scheduling apparatus, including: a generation module, a storage module, and an acquisition module. The generation module is used to generate a first version identifier corresponding to the first document based on the acquisition timestamp of the first document upon receiving the first document. The generation module is also used to obtain at least one semantic unit and at least one knowledge element based on the document content of the first document. The generation module is further used to generate at least one knowledge data based on the at least one semantic unit and at least one knowledge element, the at least one knowledge data including at least one of the following: structured knowledge data, question-answer pair knowledge data, and rich text knowledge data. The storage module is used to associate and store the document identifier, first version identifier, and knowledge data of the first document in a knowledge database; the knowledge database stores at least one knowledge dataset, each knowledge dataset corresponding to one document, and each knowledge database includes knowledge data associated with each version identifier of a document; knowledge data associated with different version identifiers of a document comes from different versions of the document. The acquisition module is used to, upon receiving a task request from a client device, obtain target knowledge data associated with a target version identifier that matches the requirement information of the task request from the knowledge database, and send the target knowledge data to the client device.

[0013] One possible implementation is that each knowledge dataset includes at least one knowledge data entry, each knowledge data entry is associated with a document joint identifier and at least one knowledge data, and each knowledge data entry corresponds to a version status, which includes an unavailable status or an available status, and the document joint identifier is composed of a document identifier and a version identifier.

[0014] Another possible implementation, the aforementioned storage module is specifically used for: if at least one knowledge data entry already exists in the first knowledge dataset corresponding to the first document in the knowledge database, then based on the document identifier, first version identifier, and knowledge data of the first document, constructing a first knowledge data entry in the first knowledge dataset, setting the version status of the first knowledge data entry to an available state, and updating the version status corresponding to at least one knowledge data entry to an unavailable state; the first knowledge data entry includes the first joint identifier of the first document stored in association and the knowledge data; or, if the knowledge dataset corresponding to the first document does not exist in the knowledge database, then creating a new knowledge dataset, constructing a second knowledge data entry in the new knowledge dataset, and setting the version status of the second knowledge data entry to an available state; the second knowledge data entry includes the first joint identifier of the first document stored in association and the knowledge data; wherein, the first joint identifier is composed of the document identifier and the first version identifier of the first document.

[0015] Another possible implementation is that the acquisition module described above is specifically used to: determine the first knowledge data that matches the requirement information of the task request; determine the target knowledge dataset containing the first knowledge data; and determine the knowledge data in the target knowledge data entries in the target knowledge dataset whose version status is available as the target knowledge data.

[0016] In another possible implementation, the above apparatus further includes an execution module. This execution module, after obtaining target knowledge data associated with a target version identifier that matches the task request's requirement information from the knowledge database, upon receiving a re-examination request from the client device, updates the version status of all knowledge data entries other than the target knowledge data entry to an available state if at least two knowledge data entries exist in the target knowledge data dataset, and sends the knowledge data from the other knowledge data entries to the client device.

[0017] Thirdly, this application provides an electronic device comprising: a processor and a memory; the memory stores a program or instructions executable on the processor, wherein the program or instructions, when executed by the processor, implement the method of the first aspect described above.

[0018] Fourthly, this application provides a readable storage medium on which a program or instructions are stored, which, when executed by a computer, implement the method of the first aspect described above.

[0019] Fifthly, this application provides a computer program product stored in a storage medium, which, when executed by a computer, implements the method described in the first aspect.

[0020] In a sixth aspect, embodiments of this application provide a chip including a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the method described in the first aspect.

[0021] The beneficial effects of the second to sixth aspects mentioned above are described in the corresponding description of the first aspect and will not be repeated here. Attached Figure Description

[0022] Figure 1 A schematic diagram of the network architecture for an application of a knowledge data scheduling method provided in this application embodiment;

[0023] Figure 2 A flowchart illustrating a knowledge data scheduling method provided in an embodiment of this application;

[0024] Figure 3 A schematic diagram illustrating the document processing process provided in this application embodiment;

[0025] Figure 4 A schematic diagram illustrating the execution process of extracting knowledge elements provided in an embodiment of this application;

[0026] Figure 5 A schematic diagram illustrating the execution process of generating knowledge data provided in an embodiment of this application;

[0027] Figure 6 A flowchart illustrating another knowledge data scheduling method provided in an embodiment of this application;

[0028] Figure 7 A flowchart illustrating yet another knowledge data scheduling method provided in an embodiment of this application;

[0029] Figure 8 A flowchart illustrating yet another knowledge data scheduling method provided in an embodiment of this application;

[0030] Figure 9 A schematic diagram of the structure of a knowledge data scheduling device provided in an embodiment of this application;

[0031] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0032] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0033] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0034] The terms "at least one," "at least one of," etc., used in the specification and claims of this application refer to any one, any two, or a combination of two or more of the included items. For example, at least one of a, b, and c can mean: "a," "b," "c," "a and b," "a and c," "b and c," and "a, b, and c," where a, b, and c can be single or multiple. Similarly, "at least two" refers to two or more items, and its meaning is similar to that of "at least one."

[0035] In the description of this application, unless otherwise stated, "a plurality of" means two or more.

[0036] The knowledge data scheduling method, apparatus, device, medium, and program product provided in this application embodiment can be applied to scenarios of storing and scheduling various types of knowledge data.

[0037] In existing technologies, the construction of various types of knowledge systems typically employs manual data collection and editing. This method relies heavily on domain experts reading original documents, manually extracting key information, and then structuring and organizing it according to predefined knowledge templates before finally inputting it into the knowledge base system. While this approach played a crucial role in early knowledge base construction, it struggles to meet the high demands for efficiency and consistency in knowledge processing in today's big data era.

[0038] Existing technologies share the following common drawbacks:

[0039] 1. The deficiency of limited knowledge types

[0040] Most existing technologies focus on generating single types of knowledge, such as recommendation knowledge, question-answering knowledge, and security knowledge, lacking mechanisms for the collaborative generation of multiple types of knowledge. This singularity necessitates the use of multiple technical solutions to handle different types of knowledge during the knowledge base construction process, increasing system complexity and integration difficulty.

[0041] 2. Input data dependency defect

[0042] Most existing technologies rely on specific input data formats, such as knowledge graphs, image data, and event data streams, and have limited capabilities in processing common document formats. This dependence limits the applicability of the technologies and cannot meet the processing needs of multi-source heterogeneous documents in enterprise knowledge base construction.

[0043] 3. Deficiencies in process control

[0044] Existing technologies generally lack rigorous process control mechanisms, and the knowledge generation process often adopts an end-to-end model, lacking quality control and anomaly handling in intermediate stages. This deficiency makes it difficult to guarantee the consistency and reliability of knowledge generation.

[0045] 4. Inadequacies in version control

[0046] Most existing technologies adopt an overwrite update model, lacking an effective version management mechanism, resulting in insufficient traceability and consistency guarantees for knowledge updates. When knowledge content changes, it is difficult to ensure the synchronous update of related knowledge, which can easily lead to data inconsistency issues.

[0047] 5. Limitations and defects in application scenarios

[0048] Existing technologies are often designed for specific application scenarios, such as cybersecurity, tax Q&A, and device monitoring, and lack versatility. This limitation forces enterprises to adopt different technical solutions for different scenarios, increasing the complexity of technology selection and system integration.

[0049] To address the aforementioned shortcomings of existing technologies, this invention proposes the following innovative solutions:

[0050] 1. A multi-type knowledge serial integrated generation mechanism

[0051] By adopting a unified docling parsing model and a strict three-stage processing flow, the serialized automatic generation of structured knowledge, question-answer pair knowledge, and multimedia knowledge is achieved, solving the problem of the single type of knowledge in existing technologies.

[0052] 2. General document adaptation and parsing mechanism

[0053] A universal document parsing adaptation layer is designed to support semantic structured extraction of various file formats, including Portable Document Format (PDF), Office Open XML Document (DOCX), and Plain Text File (TXT), thus solving the problem of excessive dependence on input data in existing technologies.

[0054] 3. Strict serial dependency pipeline control mechanism

[0055] By constructing a layered software architecture, strict serial dependencies are maintained between processing modules. Each module can only be executed after the previous module has been successfully executed, thus solving the problem of lack of process control in existing technologies.

[0056] 4. Versioned end-to-end binding mechanism

[0057] Introducing versionId throughout the entire processing chain enables versioned management and associated updates of knowledge data, solving the problem of insufficient version management in existing technologies.

[0058] 5. General Knowledge Base Construction Guided Design

[0059] The design is geared towards general knowledge base construction scenarios, not limited to specific application areas, thus solving the problem of limitations in the application scenarios of existing technologies.

[0060] To address the aforementioned technical problems, embodiments of this application provide a knowledge data scheduling method, apparatus, device, medium, and program product. By automatically generating version identifiers for received documents and parsing the document content into semantic units and knowledge elements to generate various types of knowledge data, the document identifier, version identifier, and knowledge data are associated and stored in a knowledge database. This allows for the differentiated management of knowledge data corresponding to different version documents. Thus, when a task request is received from a client device, the knowledge data associated with the target version identifier can be accurately matched from the knowledge database based on the request's requirements, effectively avoiding scheduling deviations caused by chaotic knowledge data and significantly improving the accuracy of knowledge scheduling.

[0061] The knowledge data scheduling method, apparatus, device, medium, and program product provided in the embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0062] Figure 1 This illustration shows a network architecture for a knowledge data scheduling method provided in an embodiment of this application. For example... Figure 1 As shown, the network architecture includes a knowledge data scheduling device 101 and a terminal device 102. The knowledge data scheduling device 101 and the terminal device 102 are interconnected.

[0063] In some embodiments, the knowledge data scheduling device 101 may be a server, a computer, or a processor or processing unit within a server or computer. The server may be a single server or a server cluster consisting of multiple servers. It should be noted that the embodiments of this application do not limit the specific device form of the knowledge data scheduling device 101. Figure 1 The knowledge data scheduling device 101 is shown as a single server as an example.

[0064] In some embodiments, the terminal device may be a mobile phone, tablet computer, laptop computer, handheld computer, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, personal computer (PC), ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc., and the embodiments of this application do not specifically limit it. Figure 1 The example shown is a mobile phone, with terminal device 102 as an example.

[0065] In some embodiments, terminal device 102 sends a first document to knowledge data scheduling device 101. Upon receiving the first document, knowledge data scheduling device 101 generates a first version identifier corresponding to the first document based on the document's acquisition timestamp; knowledge data scheduling device 101 obtains at least one semantic unit and at least one knowledge element based on the document content of the first document; knowledge data scheduling device 101 generates at least one knowledge data based on the at least one semantic unit and at least one knowledge element, the at least one knowledge data including at least one of structured knowledge data, question-answer pair knowledge data, and rich text knowledge data; knowledge data scheduling device 101 stores the document identifier, first version identifier, and knowledge data association of the first document in a knowledge database. Subsequently, terminal device 102 sends a task request carrying requirement information to knowledge data scheduling device 101. Upon receiving the task request from terminal device 102, knowledge data scheduling device 101 retrieves target knowledge data associated with a target version identifier that matches the requirement information in the task request from the knowledge database, and sends the target knowledge data to terminal device 102.

[0066] It should be noted that the network architecture described in the embodiments of this application is for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and does not constitute a limitation on the technical solutions provided in the embodiments of this application. As network architectures evolve, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.

[0067] See Figure 2 This is a flowchart illustrating a knowledge data scheduling method provided in an embodiment of this application. Figure 2As shown, the knowledge data scheduling method provided in this application embodiment can be implemented by the above-mentioned knowledge data scheduling device, specifically including the following steps 201 to 205.

[0068] Step 201: Upon receiving the first document, the knowledge data scheduling device generates a first version identifier corresponding to the first document based on the acquisition timestamp of the first document.

[0069] In some embodiments, the knowledge data scheduling device described above is a computer device or system that executes the knowledge data scheduling method of this application. It can be an entity with data processing capabilities, such as a server, cloud platform, or terminal device, used to implement functions such as document version management, knowledge extraction, knowledge storage, and knowledge scheduling.

[0070] In some embodiments, the first document mentioned above is any source document to be processed received by the knowledge data scheduling device, serving as input for knowledge extraction and version management. The document can be in various formats, including but not limited to PDF, DOCX, TXT, PPT, and images, covering various content formats such as text, tables, and images.

[0071] In some embodiments, the timestamp refers to the moment when the knowledge data scheduling device receives the first document, accurate to the second or millisecond level. Obtaining the timestamp uniquely identifies the order in which documents are received, providing a temporal basis for generating subsequent version identifiers. Timestamps have an inherent temporal sequence attribute, reflecting the update order of different versions of the document.

[0072] In some embodiments, the aforementioned first version identifier is a unique identifier generated by the knowledge data scheduling device based on the acquisition timestamp of the first document, used to uniquely identify the version of the document received at the current moment. The first version identifier can be represented as a string, a number, or other identifiable form, and it has uniqueness and order. Uniqueness ensures that different versions of the same document received at different times can be distinguished, and order ensures that the sequence between versions is traceable.

[0073] In some embodiments, the knowledge data scheduling device first receives an externally input document. Upon successfully receiving the first document, the device records the current system time as the document's acquisition timestamp. Subsequently, the device uses this acquisition timestamp as the basis for generating a first version identifier that uniquely corresponds to the timestamp. This version identifier carries all information about the document's reception time, ensuring that the same document, when received at different times, can obtain different, sortable version identifiers.

[0074] In some embodiments, after a user uploads a document through the front-end interface, the knowledge data scheduling device can first receive the file stream and generate a docId. The docId is generated using a Universally Unique Identifier (UUID) algorithm to ensure global uniqueness.

[0075]

[0076] Within the overall structure of the UUID, each field has a fixed number of bits and definition, with clear division of labor and collectively ensuring the uniqueness of the identifier: time_low is the lower 32 bits of the timestamp, time_mid is the middle 16 bits of the timestamp, time_hi_and_version is composed of the higher 12 bits of the timestamp and a 4-bit version number, where Version 4 is fixed at 0100; clock_seq_hi_and_res is composed of the higher 8 bits of the clock sequence and 2 variant bits, following the RFC 4122 variant specification and fixed in 10xx format; node is a 48-bit node identifier, which can be generated based on the device MAC address or a random number to circumvent hardware dependency restrictions.

[0077] In some embodiments, Version 4 UUIDs have a standardized generation process, consisting of five core steps: generating a 122-bit random number, constructing a complete 128-bit UUID raw data, configuring the Version 4 version bit, setting the RFC 4122 specification variant bit, and finally formatting it into a standard UUID string according to fixed rules. To quantify uniqueness and explain the principle of no repetition, a collision probability calculation formula is introduced. The uniqueness guarantee formula is as follows:

[0078]

[0079] In some embodiments, the knowledge data scheduling device can be configured with a dedicated formatting function to automatically convert 128-bit raw UUID data to a standard string. This is achieved by segmenting, converting, and concatenating the raw data into segments to generate a UUID identifier with a fixed format. The formatting function includes:

[0080]

[0081]

[0082]

[0083]

[0084]

[0085]

[0086]

[0087] In some embodiments, the above-mentioned UUID algorithm has been fully applied to the generation of core data identifiers in the system, covering all business scenarios: UUID_V4() is used to generate docId as a unique identifier for a document, unitId as a unique identifier for a semantic unit, and elementId as a unique identifier for a knowledge element; versionId is generated by concatenating timestamps with UUID_V4() as a unique identifier for a data version, taking into account both version time sequence and global uniqueness.

[0088] In some embodiments, the knowledge data scheduling device can read the file header byte stream for magic number identification and simultaneously verify the file extension. If the magic number and extension do not match, an exception handling process is initiated and an error code is returned. The identification rules include:

[0089] - DOC files: Magic number is D0 CF 11 E0, determined by reading the first 4 bytes of the file; - DOCX files: Magic number is 50 4B, i.e., starting with "PK", identified using ZIP compression structure; - PDF files: Magic number is 25 50 44 46 (i.e., "%PDF"); - TXT files: No fixed header but are plain text streams, identified by the file extension.

[0090] In some embodiments, the knowledge data scheduling device can sample and detect text fragments, determine the UTF-8 or GBK encoding type by statistically analyzing the proportion of illegal bytes, and uniformly convert them to UTF-8 encoding.

[0091] In some embodiments, the algorithm uses the UTF-8 encoding standard as the core criterion for judgment. UTF-8 encoding is divided into four types of byte formats with strict binary rules: single-byte characters are 0xxxxxxx (value range 0x00-0x7F), double-byte characters are 110xxxxx 10xxxxxx (first byte 0xC0-0xDF, subsequent bytes 0x80-0xBF), three-byte characters are 1110xxxx10xxxxxx 10xxxxxx (first byte 0xE0-0xEF, subsequent bytes are all 0x80-0xBF), and four-byte characters are 11110xxx10xxxxxx 10xxxxxx 10xxxxxx (first byte 0xF0-0xF7, subsequent bytes are all 0x80-0xBF). All bytes that do not conform to this rule are judged as illegal UTF-8 bytes.

[0092] In some embodiments, the encoding recognition algorithm employs a layered execution logic. The first step is data sampling. To balance detection efficiency and accuracy, the system defaults to sampling a maximum of 8192 bytes of data. For files exceeding this size, sampling is performed at 256-byte intervals. Small files are sampled in full to avoid excessive time consumption during full-scale detection. The second step is to perform UTF-8 validity testing. This involves traversing the sampled byte data and using a dedicated verification function to determine whether each byte segment conforms to the UTF-8 encoding sequence specification, counting the total number of illegal bytes. The third step determines the encoding type based on the proportion of illegal bytes. A threshold of 30% is set. The determination is made by comparing the ratio of illegal bytes to the total number of sampled bytes. If the ratio is greater than 30%, the encoding is determined to be GBK; otherwise, it is UTF-8. The determination formula is as follows:

[0093]

[0094]

[0095] In some embodiments, to further improve detection accuracy, the fourth step of the algorithm introduces the chardet tool library for secondary precise verification, obtaining the encoding type and confidence level detected by the tool, assisting in correcting the rule judgment results, and avoiding errors from single-rule detection. After completing the encoding judgment, the fifth step performs unified encoding conversion. If the detected file encoding is not UTF-8, it attempts to decode the file data into the corresponding original encoding, and then re-encodes it into UTF-8 format to achieve unified encoding across platforms.

[0096] In some embodiments, the algorithm is equipped with a comprehensive UTF-8 sequence validity judgment function, which can accurately verify the legality of various UTF-8 character formats such as single-byte and double-byte sequences, avoiding recognition errors such as incomplete byte sequences and disordered formats. The time complexity of each stage of the overall algorithm is O(n) (where n is the length of the file sampling data), and the overall complexity is O(n), making the detection and conversion efficient and adaptable to various file processing scenarios.

[0097] In some embodiments, the system establishes a comprehensive error handling mechanism. For abnormal scenarios such as encoding detection failure and encoding conversion failure, it configures fallback processing strategies such as default encoding fallback, multiple encoding alternatives for retry, and abnormal character replacement. This effectively avoids file parsing failures caused by encoding anomalies and ensures the stability of system file reading and parsing. This step ensures that subsequent parsing modules will not encounter garbled characters.

[0098] In some embodiments, this application defines a unified parsing interface: IDocParser, with different file formats implementing corresponding parsing classes, including:

[0099] - DocParser2003: An HWPFDocument parser based on Apache POI that extracts paragraph, table, header and footer information from DOC files.

[0100] - DocParser2007: An XWPFDocument parser based on Apache POI that parses DOCX files and supports handling inline and run elements;

[0101] - PdfParser: Parses PDF files based on the PDFBox library, extracting text content, font information, and coordinate positions;

[0102] - TxtParser: Splits text according to paragraph rules, with each line as a basic text unit. The system dynamically obtains an instance of the parser class through the factory pattern DocParserFactory.getParser(fileType), where the fileType parameter is the document type identified in the previous steps.

[0103] In some embodiments, the knowledge data scheduling device can uniformly encapsulate the parsed content into a StandardDocObject object. The system generates a versionId (timestamp + UUID) when the document is first uploaded and uses it throughout the entire processing chain to ensure full traceability. This solves the problem of inconsistent processing of documents with different formats, forming a unified structured input model. Figure 3 This is a schematic diagram illustrating the document processing process provided in an embodiment of this application.

[0104] Step 202: The knowledge data scheduling device obtains at least one semantic unit and at least one knowledge element based on the document content of the first document.

[0105] In some embodiments, the document content of the first document is all the original information carried by the first document, including but not limited to text, table data, image content, layout structure, heading levels, paragraph relationships, etc.

[0106] In some embodiments, the semantic units mentioned above are basic semantic units obtained after semantic-level parsing of the document content. A semantic unit can be understood as the smallest segment in a document that has an independent semantic expression, such as a complete sentence, the core idea of ​​a paragraph, a row in a table, a title and its subordinate content, etc. The document content of a document can be divided into one or more semantic units.

[0107] In some embodiments, the aforementioned knowledge elements are core knowledge elements further refined and extracted from semantic units, and are the smallest information particles constituting knowledge data. Knowledge elements may include, but are not limited to: entities (such as person names, place names, organization names, product names), attributes (such as price, date, specifications), relationships (such as affiliation, inclusion, causation), events (such as time of occurrence, location, participants), and values ​​(such as amount, quantity, percentage), etc.

[0108] In some embodiments, after acquiring the first document, the knowledge data scheduling device first performs a complete reading and parsing of the document content. For documents of different formats, corresponding parsing strategies are employed to extract all text content, table data, and layout structure from the document, forming structured document content data. Then, the knowledge data scheduling device performs semantic parsing on the extracted document content, analyzing and segmenting the document content at the semantic level based on natural language understanding technology, breaking down the document content into several semantic units.

[0109] In some embodiments, based on the obtained semantic units, the device further performs a knowledge element extraction operation on each semantic unit. This extraction operation uses information extraction techniques such as named entity recognition, relation extraction, and attribute extraction to identify and extract structured knowledge elements from the natural language text of the semantic units, including entities, attributes, relations, events, and values.

[0110] In some embodiments, the knowledge data scheduling device may segment the data according to the following rules:

[0111] First-level heading → First-level semantic unit

[0112] Second-level headings and their subordinate paragraphs → Second-level semantic units. Tables are split into independent semantic units by row, generating SemanticUnit objects. The unitId is generated using UUID to ensure global uniqueness.

[0113] In some embodiments, the knowledge data scheduling device can perform semantic analysis on each SemanticUnit based on the doling parsing framework, including the following four key technical steps:

[0114] (1) Named Entity Recognition (NER)

[0115] A BERT-based Chinese named entity recognition model is used, defining the following entity types: - PERSON: Person entity - ORG: Organization entity - LOC: Location entity - TIME: Time entity - PRODUCT: Product name entity - TECH: Technical term entity. Model output format: List <entity>Each Entity contains the following attributes: entityText, entityType, startPosition, endPosition, and confidenceScore.

[0116] (2) Relation Extraction

[0117] Based on a pre-trained relation classification model, the following relation types are identified: - HAS_PROPERTY: Subject-Predicate Relationship - PART_OF: Containment Relationship - CAUSE_EFFECT: Causal Relationship - SEQUENCE: Sequential Relationship - COMPARISON: Comparison Relationship

[0118] (3) Attribute Extraction

[0119] Based on the characteristics of technical documents, the following attribute information is extracted: - Step number (stepNumber) - Condition description (condition) - Parameter value (parameterValue) - Applicable scope (applicableScope)

[0120] (4) Keyword extraction (TF-IDF or Embedding weight): Keyword extraction is performed using the TF-IDF algorithm combined with Embedding weight.

[0121] In some embodiments, the core of the keyword extraction algorithm consists of three formulas: term frequency (TF), inverse document frequency (IDF), and TF-IDF combined weight. TF is used to count the proportion of a single word appearing in a document, and IDF measures the global importance of a word. The two are multiplied to obtain the final TF-IDF weight value. The core formula is as follows:

[0122] 1. Term Frequency (TF): , represents the proportion of the frequency of word t in document d to the total number of words in the document;

[0123] 2. Inverse Document Frequency (IDF): , represents the scarcity of word t in the entire document set D. The higher the scarcity, the higher the weight.

[0124] 3. TF-IDF value: By combining local word frequency and global scarcity, the core weight of words is quantified.

[0125] In some embodiments, the keyword extraction algorithm described above consists of seven main steps, forming a complete keyword extraction closed loop. First, the original document text is segmented into Chinese using the jieba tool to extract basic word units. Second, the segmentation results are iterated to complete global word frequency statistics. Then, the TF value of each word is calculated based on the statistical results, and the corresponding IDF value is calculated by combining it with the full document dataset. These values ​​are then multiplied pairwise to obtain the basic TF-IDF weights. To address the issue of traditional TF-IDF ignoring semantic association, the algorithm introduces Embedding word vector optimization. Word vectors of words and documents are obtained through a pre-trained model, and their cosine similarity is calculated to obtain semantic relevance. Then, the basic weights and semantic weights are fused using a weight adjustment parameter α (within the range of 0 ≤ α ≤ 1) to generate the final comprehensive weight. Finally, all words are sorted in descending order based on the comprehensive weight, and the Top 20 core keywords are selected as document feature words.

[0126] In some embodiments, the complete code implementation includes all stages such as word segmentation, word frequency statistics, weight calculation, semantic fusion, and keyword screening. At the same time, multiple optimization strategies are used to improve the extraction accuracy, mainly including stop word filtering, word length filtering of 2-10 characters, noun / verb / adjective part-of-speech filtering, and low-frequency invalid word filtering, to eliminate interfering words and focus on core semantic words.

[0127] In some embodiments, the efficiency of each stage of the algorithm is clearly controllable in terms of time complexity: the complexity of the word segmentation stage is O(n) (n is the document length), the complexity of TF calculation is O(m) (m is the total number of words), the complexity of IDF calculation is O(k×m) (k is the number of documents), the embedding query is constant O(1), the keyword sorting complexity is O(m log m), and the overall comprehensive time complexity is O(k×m + m log m), which can adapt to the efficient processing scenario of batch documents. All extraction results generate KnowledgeElement objects.

[0128] In some embodiments, all SemanticUnits and KnowledgeElements are stored in the database using versionId as the partition key to achieve version isolation. The database table design is as follows:

[0129] - The semantic_unit table has a primary key of (unitId, versionId) and is partitioned by versionId;

[0130] - The knowledge_element table has a primary key of (elementId, versionId) and is partitioned by versionId;

[0131] - Index design: Create secondary indexes on docId and unitId to speed up queries.

[0132] In this way, an intermediate expression layer can be established between text and semantic elements, improving the accuracy and controllability of subsequent generation. Figure 4 This is a schematic diagram illustrating the execution process of extracting knowledge elements as provided in an embodiment of this application.

[0133] Step 203: The knowledge data scheduling device generates at least one knowledge data based on at least one semantic unit and at least one knowledge element.

[0134] In some embodiments, the above-mentioned at least one knowledge data includes at least one of the following: structured knowledge data, question-answer pair knowledge data, and rich text knowledge data.

[0135] In some embodiments, the aforementioned knowledge data is standardized knowledge content with a clear structure and semantics generated by the knowledge data scheduling device based on semantic units and knowledge elements.

[0136] In some embodiments, the structured knowledge data mentioned above is knowledge data obtained after being standardized and organized according to a predefined data model and organizational structure. Its characteristics are that it has unified field definitions and relational constraints, which facilitates precise machine querying, logical reasoning and automated processing.

[0137] In some embodiments, the question-and-answer pair knowledge data described above is knowledge data in the form of "question-answer" pairs automatically generated based on document content. The question is a natural language question posed regarding factual information in the document, and the answer is the accurate response to that question. The characteristics of question-and-answer pair knowledge data are that it is presented in natural language, semantically complete, and intuitively expressed, making it suitable for supporting semantic retrieval, large-scale model-driven learning, and reading comprehension tasks.

[0138] In some embodiments, the aforementioned rich text knowledge data is knowledge data obtained by further enriching the format and associated content on the basis of plain text, and may include, but is not limited to: text formatting information (such as bold, red highlighting, font size hierarchy), images, tables, hyperlinks, formulas, multimedia associated content, etc. Rich text knowledge data is characterized by its rich presentation formats and high readability, making it suitable for supporting knowledge display, report generation, and knowledge presentation tasks in human-computer interaction scenarios.

[0139] In some embodiments, after extracting semantic units and knowledge elements, the knowledge data scheduling device uses these semantic units and knowledge elements as input to generate at least one type of knowledge data.

[0140] In some embodiments, the knowledge data scheduling device can organize and populate knowledge elements according to a standardized data model based on a predefined knowledge structure template to generate structured knowledge data.

[0141] In some embodiments, the knowledge data scheduling device can automatically generate questions and their corresponding answers related to the document content based on factual statements in semantic units, using a large language model or rule engine, to form question-answer pair knowledge data.

[0142] In some embodiments, the knowledge data scheduling device can generate corresponding rich text knowledge data based on semantic units and knowledge elements, combined with the original format information and layout features in the document.

[0143] In some embodiments, the knowledge data scheduling device can generate any one or more of the three types of knowledge data mentioned above. The specific type generated can be determined according to downstream task requirements or system configuration. Although the three types of knowledge data differ in form, they all originate from the same semantic units and knowledge elements, and therefore essentially describe the same fact and have the same version identifier.

[0144] This application defines a generation service interface IKnowledgeGenerateService.generate(InputData, TemplateConfig), which calls the large language model service POST / api / generate via HTTP.

[0145] - Request URL: POST / api / generate

[0146] - Request format: JSON

[0147] - Request body: {model, prompt, temperature, max_tokens, ...}

[0148] - Response format: JSON {code, message, data}

[0149] In some embodiments, the knowledge data scheduling device can generate structured knowledge data, and the specific generation steps are as follows:

[0150] (1) Load matching templates from the template library

[0151] (2) Constructing a constraint-type Prompt

[0152] (3) Call the generation interface

[0153] (4) Perform JSON structure validation

[0154] (5) If a field is missing, trigger an automatic retry.

[0155] Output object:

[0156] StructuredKnowledge {

[0157] jsonContent;

[0158] docId;

[0159] versionId;

[0160] }

[0161] In some embodiments, the knowledge data scheduling device can generate question-answer pair knowledge data, and the specific generation rules are as follows:

[0162] Defined entities → Generate interpretable questions

[0163] Process-oriented relationships → Generate step-based problems

[0164] Attribute-based features → Generate comparative questions

[0165] Output:

[0166] QAItem {

[0167] question?

[0168] answer;

[0169] unitId;

[0170] versionId;

[0171] }

[0172] In some embodiments, the knowledge data scheduling device can generate rich text knowledge data, and the specific generation steps are as follows:

[0173] (1) Invoking the summary generation capability

[0174] (2) Generate HTML structure by combining the original Node order

[0175] (3) Embed heading level tags

[0176] (4) Output rich text string

[0177] Output:

[0178] RichTextKnowledge {

[0179] htmlContent;

[0180] versionId;

[0181] }

[0182] In this way, template constraints and low-temperature parameter control can be used to avoid structural instability caused by free generation. Figure 5 This is a schematic diagram illustrating the execution process of generating knowledge data provided in an embodiment of this application.

[0183] Step 204: The knowledge data scheduling device stores the document identifier, first version identifier, and knowledge data association of the first document into the knowledge database.

[0184] In some embodiments, the knowledge database stores at least one knowledge dataset, each knowledge dataset corresponds to a document, and each knowledge database includes knowledge data associated with each version identifier of a document, and knowledge data associated with different version identifiers of a document comes from different versions of the document.

[0185] In some embodiments, the document identifier is a unique identification code that distinguishes a document from documents of different origins and names.

[0186] In some embodiments, the knowledge database described above is a data storage system for storing the association between document identifiers, version identifiers and knowledge data, and includes a complete mapping relationship between documents and knowledge data.

[0187] In some embodiments, the aforementioned knowledge dataset is a collection of all knowledge data corresponding to the same document in a knowledge database. Each document uniquely corresponds to one knowledge dataset in the knowledge database, which contains the knowledge data associated with all version identifiers of that document. For example, if document A was uploaded in three versions, then the knowledge dataset corresponding to document A contains all the knowledge data associated with each of those three versions.

[0188] In some embodiments, each knowledge dataset includes at least one knowledge data entry, each knowledge data entry is associated with a document joint identifier and at least one knowledge data, and each knowledge data entry corresponds to a version status, which includes an unavailable status or an available status, and the document joint identifier is composed of a document identifier and a version identifier.

[0189] In some embodiments, the knowledge data entries mentioned above are the basic storage units organized at the document version level in the knowledge dataset. Each knowledge data entry uniquely corresponds to a document version and contains all the knowledge data under that version.

[0190] In some embodiments, the version status mentioned above is flag information used to indicate whether a knowledge data entry is currently available for external task requests. The version status includes at least two states: "available" and "unavailable". A knowledge data entry in the available state indicates that the knowledge data of that version is currently valid and can be hit and scheduled by a task request from a client device; a knowledge data entry in the unavailable state indicates that the knowledge data of that version has expired or been replaced and no longer responds to external scheduling requests.

[0191] In some embodiments, combined with Figure 2 ,like Figure 6 As shown, step 204 above can be implemented through step 204a or step 204b.

[0192] Step 204a: If at least one knowledge data entry already exists in the first knowledge dataset corresponding to the first document in the knowledge database, the knowledge data scheduling device constructs a first knowledge data entry in the first knowledge dataset based on the document identifier, the first version identifier, and the knowledge data of the first document, sets the version status of the first knowledge data entry to an available state, and updates the version status corresponding to at least one knowledge data entry to an unavailable state.

[0193] In some embodiments, the first knowledge data entry mentioned above includes a first joint identifier of a first document associated with storage and knowledge data.

[0194] In some embodiments, the first combined identifier consists of the document identifier of the first document and the first version identifier.

[0195] In some embodiments, the first knowledge dataset is a knowledge dataset in a knowledge database corresponding to the first document.

[0196] In some embodiments, before writing data into the knowledge database, the knowledge data scheduling device first queries the knowledge database to see if a first knowledge dataset corresponding to the first document exists, using the document identifier of the first document as an index. If the first knowledge dataset already exists, it means that the first document has been previously received and processed, and this is a new version of the document being added to the database. In this case, the knowledge data scheduling device does not create a new dataset in the knowledge database, but instead directly performs a version append operation on the existing first knowledge dataset.

[0197] In some embodiments, while writing a new entry, the device performs a version status update operation on each existing knowledge data entry in the first knowledge dataset. Specifically, it sets the version status of the first knowledge data entry to an available state, indicating that the knowledge data of that entry is the currently valid version; and updates the version status of all existing knowledge data entries in the first knowledge dataset to an unavailable state, indicating that these older versions of knowledge data will no longer respond to scheduling requests. Through these operations, each knowledge dataset has one and only one knowledge data entry with an available version status, meaning it always points to the latest version of the document's knowledge data.

[0198] Step 204b: If the knowledge dataset corresponding to the first document does not exist in the knowledge database, the knowledge data scheduling device creates a new knowledge dataset, constructs a second knowledge data entry in the new knowledge dataset, and sets the version status of the second knowledge data entry to the available state.

[0199] In some embodiments, the second knowledge data entry includes a first joint identifier of the associated first document and knowledge data.

[0200] In some embodiments, the second knowledge data entry is a knowledge data entry constructed by the knowledge data scheduling device in a newly created knowledge dataset, used to store the knowledge data of the first document. The difference between the second knowledge data entry and the first knowledge data entry is that the first knowledge data entry is added to an existing dataset, while the second knowledge data entry is constructed for the first time in a newly created dataset.

[0201] In some embodiments, the aforementioned new knowledge dataset is a dataset newly created by the knowledge data scheduling device in the knowledge database. When the first document is received by the knowledge data scheduling device for the first time, the knowledge dataset corresponding to the document does not exist in the knowledge database, so a new dataset needs to be created as a container for the knowledge data of all subsequent versions of the document.

[0202] In some embodiments, before writing data into the knowledge database, the knowledge data scheduling device may first use the document identifier of the first document as an index to query the knowledge database to see if a knowledge dataset corresponding to the first document exists. If the knowledge dataset corresponding to the first document does not exist in the knowledge database, it means that the first document has never been received by the knowledge data scheduling device before, and this is the first time the document has been added to the database. In this case, the device first creates a new knowledge dataset in the knowledge database. This dataset uses the document identifier of the first document as a unique identifier and is dedicated to storing knowledge data for all versions of the first document. Then, the knowledge data scheduling device can associate the document identifier of the first document with the first version identifier, i.e., the first combined identifier, with the generated knowledge data, and construct a new knowledge data entry, i.e., a second knowledge data entry, in the newly created knowledge dataset.

[0203] In some embodiments, after constructing a second knowledge data entry, the knowledge data scheduling device can set the version status of the second knowledge data entry to an available state, indicating that the knowledge data of the entry is the currently valid version.

[0204] In this way, multiple versions of knowledge data for the same document can be retained and marked with version status in the knowledge database, so that in the knowledge dataset corresponding to each document, there is only one version that is available and always points to the latest version of the knowledge data of that document, thus providing an effective version location basis that can be directly indexed for subsequent knowledge scheduling.

[0205] Step 205: Upon receiving a task request from a client device, the knowledge data scheduling device retrieves target knowledge data associated with the target version identifier that matches the requirement information of the task request from the knowledge database, and sends the target knowledge data to the client device.

[0206] In some embodiments, the aforementioned client device is an external device that sends task requests to the knowledge data scheduling device, and may be a user device (such as a computer, mobile phone, or tablet), an application server, a large model training platform, a knowledge retrieval system, or other downstream systems that need to access knowledge data.

[0207] In some embodiments, the task request is a call instruction sent by the client device to the knowledge data scheduling device to request specific knowledge data to support its downstream tasks. The task request carries requirement information to indicate the characteristics or conditions of the knowledge data required by the client device.

[0208] In some embodiments, the aforementioned requirement information refers to parameter information carried in the task request that describes the characteristics of the knowledge data required by the client device, and is used as query conditions for version matching and knowledge retrieval by the knowledge data scheduling device. The requirement information may include, but is not limited to: the type of required knowledge data, the subject area or keywords of the required knowledge data, the time range of the required knowledge data, and the document identifier or document name of the source document of the required knowledge data.

[0209] In some embodiments, the target version identifier is a version identifier determined by the knowledge data scheduling device after retrieving and matching it in the knowledge database based on the requirement information in the task request.

[0210] In some embodiments, the aforementioned target knowledge data is associated with a target version identifier and is knowledge content that meets the task requirements of the client device after matching requirement information from the knowledge database.

[0211] In some embodiments, the version identifier associated with the knowledge data is determined as the target version identifier.

[0212] In some embodiments, after determining the target version identifier, the knowledge data scheduling device can use the target version identifier as an index to locate all the knowledge data stored in the knowledge database associated with the target version identifier, and determine it as the target knowledge data.

[0213] In some embodiments, after determining the target knowledge data, the knowledge data scheduling device can send the determined target knowledge data to the client device, and the client device can use the target knowledge data in its own downstream tasks.

[0214] In some embodiments, combined with Figure 2 ,like Figure 7 As shown, step 205 above can be implemented through steps 205a to 205c.

[0215] Step 205a: Upon receiving a task request from a client device, the knowledge data scheduling device determines the first knowledge data that matches the requirement information of the task request.

[0216] In some embodiments, the first knowledge data mentioned above is knowledge data in a knowledge database that matches the demand information.

[0217] In some embodiments, the knowledge data scheduling device continuously listens for task requests from client devices. When a task request is received from a client device, the device first parses the task request and extracts the requirement information. Then, using the extracted requirement information as query conditions, it performs matching and retrieval in the knowledge database. It traverses the knowledge data entries in each knowledge dataset and compares and matches the parameters in the requirement information with fields such as document identifier, version identifier, knowledge data type, and knowledge data content in the knowledge data entries to locate the knowledge data that matches the requirement information conditions, i.e., the first knowledge data.

[0218] Step 205b: The knowledge data scheduling device determines the target knowledge dataset containing the first knowledge data.

[0219] In some embodiments, the target knowledge dataset is a knowledge dataset in a knowledge database that contains the first knowledge data, that is, the knowledge dataset to which the first knowledge data belongs.

[0220] In some embodiments, after determining the first knowledge data, the knowledge data scheduling device can use the first knowledge data as a query index to search for the knowledge dataset to which the first knowledge data belongs in the dataset index structure of the knowledge database. Since each knowledge dataset in the knowledge database uniquely corresponds to a document, and the knowledge data entries within each knowledge dataset are organized according to document version, the knowledge data scheduling device can determine the knowledge dataset where the first knowledge data is located through index positioning, and identify that knowledge dataset as the target knowledge dataset.

[0221] Step 205c: The knowledge data scheduling device determines the knowledge data in the target knowledge data entries whose version status is available in the target knowledge data set as the target knowledge data.

[0222] In some embodiments, a target knowledge data entry is a knowledge data entry in a target knowledge dataset whose version status is available. A knowledge dataset may contain multiple knowledge data entries corresponding to different versions, but in each knowledge dataset, there is one and only one knowledge data entry whose version status is available. The target knowledge data entry is the only entry in the dataset that is available, representing the knowledge data of the latest version of the document.

[0223] In some embodiments, after determining the target knowledge dataset, the knowledge data scheduling device can filter out knowledge data entries with an available version status from the knowledge data entries in the target knowledge dataset and identify them as target knowledge data entries. Then, the knowledge data scheduling device can read all the knowledge data stored in the target knowledge data entry and identify it as the final target knowledge data.

[0224] In this way, the demand information in the client task request can be filtered layer by layer to finally determine the only knowledge data entry in the target dataset that is in a usable state, thereby ensuring that the knowledge data sent to the client device is always the current valid version of the corresponding document, thus improving the accuracy and reliability of knowledge scheduling.

[0225] The knowledge data scheduling method provided in this application automatically generates version identifiers for received documents and parses the document content into semantic units and knowledge elements to generate various types of knowledge data. After that, the document identifier, version identifier, and knowledge data are associated and stored in the knowledge database, so that the knowledge data corresponding to different versions of documents can be managed separately. In this way, when a task request is received from a client device, the knowledge data associated with the target version identifier can be accurately matched from the knowledge database according to the requirement information in the request and fed back, effectively avoiding scheduling deviations caused by knowledge data chaos, thereby significantly improving the accuracy of knowledge scheduling.

[0226] In some embodiments, combined with Figure 2 ,like Figure 8 As shown, after step 205 above, the knowledge data scheduling method provided in this application embodiment may further include the following step 206.

[0227] Step 206: Upon receiving a re-examination request from the client device, if there are at least two knowledge data entries in the target knowledge dataset, the knowledge data scheduling device updates the version status of the other knowledge data entries (excluding the target knowledge data entry) to the available status and sends the knowledge data in the other knowledge data entries to the client device.

[0228] In some embodiments, the aforementioned re-examination request is a request instruction sent by the client device to the knowledge data scheduling device again after receiving the target knowledge data returned by the knowledge data scheduling device because the knowledge data does not meet its actual needs, and is used to trigger the knowledge data scheduling device to perform version rollback or version switching operations.

[0229] In some embodiments, other knowledge data entries are all knowledge data entries in the target knowledge dataset except for the target knowledge data entries that are currently available, that is, one or more historical version entries in the target knowledge dataset whose version status is unavailable, representing the historical version knowledge data of the document.

[0230] In some embodiments, when a re-examination request is received from a client device, the knowledge data scheduling device can determine the number of knowledge data entries in the target knowledge dataset. If there are at least two knowledge data entries in the target knowledge dataset, it indicates that the document has at least two versions, meeting the conditions for version switching. In this case, the knowledge data scheduling device can update the version status of the target knowledge data entry that is currently available to an unavailable state, and simultaneously update the version status of all other knowledge data entries in the target knowledge dataset that were originally unavailable to an available state. Then, the knowledge data scheduling device can read all the knowledge data stored in the other knowledge data entries and send it as the re-examination result to the client device, which then uses the historical version of the knowledge data in its downstream tasks.

[0231] Thus, in the scenario of re-examination, the knowledge data scheduling device can realize the version rollback mechanism by batch adjusting the version status of all knowledge data entries in the target knowledge dataset. This enables the client device to retrieve the historical version knowledge data of the same document when the current version of the knowledge data does not meet the requirements, thus ensuring the flexibility of knowledge scheduling.

[0232] This application provides a method and system for the integrated automatic generation of multiple types of knowledge data. The knowledge acquisition and editing system provided in this application uses the following methods and steps to process multiple types of knowledge:

[0233] Step 1: Document Upload and Format Adaptation

[0234] Users upload documents to be collected and edited. The system supports multiple document formats, such as PDF, DOCX, and TXT, to meet the input needs of different types of knowledge sources.

[0235] Step 2: Document Parsing and Knowledge Extraction

[0236] The uploaded documents are semantically parsed using the doling model framework to extract the original text content and form preliminary knowledge text data.

[0237] Step 3: Generating Structured Knowledge of Multiple Types

[0238] Based on the extracted text data, combined with preset system prompts and structured knowledge templates, the following knowledge types are generated sequentially through a large language model:

[0239] 1. Structured knowledge: Organized into standardized data according to a predefined knowledge structure template;

[0240] 2. Question-and-answer pairs: Automatically generates question-and-answer pairs related to the text content;

[0241] 3. Multimedia knowledge: Associate or generate rich text content that matches the text.

[0242] The knowledge acquisition and editing system provided in this application embodiment constructs a layered and scalable software architecture, dividing the unstructured document processing flow into six logical layers: document access layer, structure standardization layer, semantic modeling layer, knowledge generation control layer, version control layer, and display interface layer. Each layer is decoupled and collaborates through interface definitions, but maintains a strict serial dependency relationship in the execution flow; that is, subsequent modules can only be executed after the previous module has successfully executed and output a valid data object. The flow of the knowledge acquisition and editing system provided in this application embodiment is as follows: Figure 1 As shown.

[0243] The knowledge acquisition and editing system provided in this application includes the following four modules:

[0244] I. Document Access and Preprocessing Module: This module is responsible for document format recognition, encoding standardization, structure parsing, and standard object construction.

[0245] II. Semantic Modeling Module: This module is responsible for extracting semantic units and knowledge elements from structured document objects.

[0246] III. Knowledge Generation Control Module: This module is a serial control module, which contains three controlled generation sub-processes.

[0247] IV. Version Control Module: This module is used to control different versions of knowledge data.

[0248] In some embodiments, to address the issue of data update asynchrony, this application provides a version-level isolation mechanism, including:

[0249] 1. Generate a new versionId for each upload.

[0250] 2. All data objects are bound to versionId.

[0251] 3. Updates will not overwrite data from older versions.

[0252] 4. The display interface must pass in a versionId.

[0253] The interface for displaying the data is GET / knowledge / {docId}?versionId=xxx, and the database layer uses (docId, versionId) as a composite index. This ensures that knowledge data generated at different times is not mixed up.

[0254] Through the above technical solutions, the embodiments of this application realize the fully automated processing from original documents to multiple types of knowledge content, effectively reducing the cost of manual collection and editing, and improving the consistency and standardization of knowledge generation.

[0255] The knowledge data scheduling method of this application will be described below through specific embodiments.

[0256] Specific Implementation Examples (DOCX Scenario)

[0257] Step 1: The user uploads the DOCX file.

[0258] The system identifies the type and generates docId=DOC1001 and versionId=20250224_001.

[0259] Step 2: Use DocParser2007 to parse the document and generate 52 Node nodes.

[0260] Step 3: The semantic modeling module generates 48 SemanticUnits and extracts 130 KnowledgeElements.

[0261] Step 4: The structured knowledge generation module calls the LLM interface to generate JSON knowledge data.

[0262] Step 5: Generate 32 question-answer pairs.

[0263] Step 6: Generate rich text HTML.

[0264] Step 7: The front-end makes a GET request to / knowledge / DOC1001?versionId=20250224_001 to complete the display.

[0265] If the user modifies the document and re-uploads it, versionId=20250224_002 will be generated, and the entire process will be re-executed, while the old version remains in a read-only state.

[0266] It should be noted that the above-described method embodiments, or the various possible implementations of the method embodiments, can be executed individually, or, provided there is no conflict, they can be combined with each other. The specific implementation can be determined according to actual usage requirements, and this application embodiment does not impose any restrictions on this.

[0267] As can be seen, the above mainly describes the solutions provided by the embodiments of this application from a methodological perspective. To achieve the above functions, the embodiments of this application provide corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, in conjunction with the modules and algorithm steps of the various examples described in the embodiments disclosed herein, the embodiments of this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0268] This application embodiment can divide the knowledge data scheduling device into functional modules according to the above method example. For example, each function can be divided into its own functional modules, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. Optionally, the module division in this application embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.

[0269] In some embodiments, this application also provides a knowledge data scheduling apparatus. This knowledge data scheduling apparatus may include one or more functional modules for implementing the knowledge data scheduling method of the above method embodiments.

[0270] For example, Figure 9 This is a schematic diagram of the structure of a knowledge data scheduling device provided in an embodiment of this application. Figure 9 As shown, the knowledge data scheduling device 900 includes: a generation module 901, a storage module 902, and an acquisition module 903.

[0271] The aforementioned generation module 901 is used to generate a first version identifier corresponding to the first document based on the acquisition timestamp of the first document when the first document is received.

[0272] The aforementioned generation module 901 is also used to obtain at least one semantic unit and at least one knowledge element based on the document content of the first document.

[0273] The aforementioned generation module 901 is further configured to generate at least one knowledge data based on at least one semantic unit and at least one knowledge element, wherein the at least one knowledge data includes at least one of the following: structured knowledge data, question-answer pair knowledge data, and rich text knowledge data.

[0274] The aforementioned acquisition module 903 is used to store the document identifier, first version identifier, and knowledge data of the first document in a knowledge database. The knowledge database stores at least one knowledge dataset, each knowledge dataset corresponds to one document, and each knowledge database includes knowledge data associated with each version identifier of a document. The knowledge data associated with different version identifiers of a document comes from different versions of the document.

[0275] The aforementioned acquisition module is used to, upon receiving a task request from a client device, retrieve target knowledge data associated with a target version identifier that matches the requirement information of the task request from the knowledge database, and send the target knowledge data to the client device.

[0276] The knowledge data scheduling device provided in this application automatically generates version identifiers for received documents and parses the document content into semantic units and knowledge elements to generate various types of knowledge data. After that, the document identifier, version identifier, and knowledge data are associated and stored in the knowledge database, so that the knowledge data corresponding to different versions of documents can be managed separately. In this way, when a task request is received from a client device, the knowledge data associated with the target version identifier can be accurately matched from the knowledge database according to the requirement information in the request and fed back, effectively avoiding scheduling deviations caused by knowledge data chaos, thereby significantly improving the accuracy of knowledge scheduling.

[0277] In some embodiments, each knowledge dataset includes at least one knowledge data entry, each knowledge data entry is associated with a document joint identifier and at least one knowledge data, and each knowledge data entry corresponds to a version status, which includes an unavailable status or an available status, and the document joint identifier is composed of a document identifier and a version identifier.

[0278] In other embodiments, the acquisition module 903 is specifically configured to: if at least one knowledge data entry already exists in the first knowledge dataset corresponding to the first document in the knowledge database, then based on the document identifier, the first version identifier, and the knowledge data of the first document, construct a first knowledge data entry in the first knowledge dataset, set the version status of the first knowledge data entry to an available state, and update the version status corresponding to at least one knowledge data entry to an unavailable state; the first knowledge data entry includes a first joint identifier of the first document stored in association and knowledge data; or, if there is no knowledge dataset corresponding to the first document in the knowledge database, then create a new knowledge dataset, construct a second knowledge data entry in the new knowledge dataset, and set the version status of the second knowledge data entry to an available state; the second knowledge data entry includes a first joint identifier of the first document stored in association and knowledge data; wherein, the first joint identifier is composed of the document identifier and the first version identifier of the first document.

[0279] In some other embodiments, the acquisition module described above is specifically used to: determine first knowledge data that matches the requirement information of the task request; determine a target knowledge dataset containing the first knowledge data; and determine the knowledge data in the target knowledge data entries in the target knowledge dataset whose version status is available as the target knowledge data.

[0280] In some other embodiments, the above-described apparatus further includes an execution module. This execution module is configured to, after obtaining target knowledge data associated with a target version identifier that matches the requirement information of the task request from the knowledge database, and upon receiving a re-examination request from a client device, update the version status of all knowledge data entries other than the target knowledge data entry to an available state if at least two knowledge data entries exist in the target knowledge data dataset, and send the knowledge data from the other knowledge data entries to the client device.

[0281] It should be noted that the knowledge data scheduling device can implement all the processes implemented in the above method embodiments and achieve the same beneficial effects. To avoid repetition, it will not be described again here.

[0282] In the case where the functions of the integrated modules described above are implemented in hardware, this application provides a possible structural schematic diagram of the electronic device involved in the above embodiments. For example... Figure 10 As shown, the electronic device 90 includes: a processor 92, a communication interface 93, and a bus 94. Optionally, the electronic device 90 may also include a memory 91.

[0283] Processor 92 may implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 92 may be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 92 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.

[0284] Communication interface 93 is used to connect with other devices via a communication network. This communication network can be Ethernet, wireless access network, wireless local area network (WLAN), etc.

[0285] The memory 91 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto.

[0286] As one possible implementation, the memory 91 can exist independently of the processor 92. The memory 91 can be connected to the processor 92 via a bus 94 and is used to store instructions or program code. When the processor 92 calls and executes the instructions or program code stored in the memory 91, it can implement the knowledge data scheduling method provided in the embodiments of this application.

[0287] In another possible implementation, the memory 91 can also be integrated with the processor 92.

[0288] Bus 94 can be an Extended Industry Standard Architecture (EISA) bus, etc. Bus 94 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 10 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0289] Through the above description of the implementation methods, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the service calling device can be divided into different functional modules to complete all or part of the functions described above.

[0290] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above-described knowledge data scheduling method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0291] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.

[0292] This application also provides a readable storage medium storing a program or instructions. When executed by a computer, the program or instructions implement the knowledge data scheduling method provided in the above embodiments. It is understood that all or part of the processes in the above method embodiments can be executed by computer instructions instructing related hardware. The readable storage medium can be any of the foregoing embodiments or memory. The readable storage medium can also be an external storage device of the service invocation device, such as a pluggable hard drive, SmartMedia Card (SMC), Secure Digital (SD) card, flash card, etc., equipped on the service invocation device. Further, the readable storage medium can include both internal storage units of the service invocation device and external storage devices. The readable storage medium is used to store the computer program and other programs and data required by the service invocation device. The readable storage medium can also be used to temporarily store data that has been output or will be output.

[0293] This application also provides a computer program product, which is stored in a storage medium and implements the knowledge data scheduling method provided in the above embodiments when the computer program product is executed by a computer.

[0294] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one…" does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0295] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0296] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.< / entity>

Claims

1. A knowledge data scheduling method, characterized in that, include: Upon receiving the first document, a first version identifier corresponding to the first document is generated based on the acquisition timestamp of the first document; Based on the document content of the first document, at least one semantic unit and at least one knowledge element are obtained; Based on the at least one semantic unit and the at least one knowledge element, at least one knowledge data is generated, wherein the at least one knowledge data includes at least one of the following: structured knowledge data, question-answer pair knowledge data, and rich text knowledge data; The document identifier of the first document, the first version identifier, and the knowledge data are associated and stored in the knowledge database; The knowledge database stores at least one knowledge dataset, each knowledge dataset corresponds to a document, and each knowledge database includes knowledge data associated with each version identifier of a document. The knowledge data associated with different version identifiers of a document comes from different versions of the document. Upon receiving a task request from a client device, target knowledge data associated with a target version identifier that matches the requirement information of the task request is obtained from the knowledge database, and the target knowledge data is sent to the client device.

2. The knowledge data scheduling method according to claim 1, characterized in that, Each knowledge dataset includes at least one knowledge data entry, each knowledge data entry is associated with a document joint identifier and at least one knowledge data, and each knowledge data entry corresponds to a version status, the version status including an unavailable status or an available status, the document joint identifier is composed of a document identifier and a version identifier.

3. The knowledge data scheduling method according to claim 2, characterized in that, The step of associating and storing the document identifier of the first document, the first version identifier, and the knowledge data in the knowledge database includes: If at least one knowledge data entry already exists in the first knowledge dataset corresponding to the first document in the knowledge database, then based on the document identifier, the first version identifier, and the knowledge data of the first document, a first knowledge data entry is constructed in the first knowledge dataset, the version status of the first knowledge data entry is set to an available state, and the version status corresponding to the at least one knowledge data entry is updated to an unavailable state; the first knowledge data entry includes a first joint identifier of the first document stored in association and the knowledge data; or... If the knowledge dataset corresponding to the first document does not exist in the knowledge database, a new knowledge dataset is created, and a second knowledge data entry is constructed in the new knowledge dataset. The version status of the second knowledge data entry is set to an available state. The second knowledge data entry includes the first joint identifier of the first document stored in association and the knowledge data. The first joint identifier is composed of the document identifier of the first document and the first version identifier.

4. The knowledge data scheduling method according to claim 2 or 3, characterized in that, The step of retrieving target knowledge data associated with a target version identifier that matches the requirement information of the task request from the knowledge database includes: Determine the first knowledge data that matches the requirement information of the task request; Determine the target knowledge dataset containing the first knowledge data; The knowledge data in the target knowledge data entries whose version status is available in the target knowledge dataset are identified as the target knowledge data.

5. The knowledge data scheduling method according to claim 4, characterized in that, After obtaining target knowledge data associated with a target version identifier that matches the requirement information of the task request from the knowledge database, the method further includes: Upon receiving a re-examination request from the client device, if there are at least two knowledge data entries in the target knowledge dataset, the version status of the other knowledge data entries besides the target knowledge data entry will be updated to an available status, and the knowledge data in the other knowledge data entries will be sent to the client device.

6. A knowledge data scheduling device, characterized in that, include: The module consists of a generation module, a storage module, and an acquisition module. The generation module is used to generate a first version identifier corresponding to the first document based on the acquisition timestamp of the first document when the first document is received. The generation module is further configured to obtain at least one semantic unit and at least one knowledge element based on the document content of the first document; The generation module is further configured to generate at least one knowledge data based on the at least one semantic unit and the at least one knowledge element, wherein the at least one knowledge data includes at least one of the following: structured knowledge data, question-answer pair knowledge data, and rich text knowledge data; The storage module is used to associate and store the document identifier, the first version identifier, and the knowledge data of the first document in the knowledge database; The knowledge database stores at least one knowledge dataset, each knowledge dataset corresponds to a document, and each knowledge database includes knowledge data associated with each version identifier of a document. The knowledge data associated with different version identifiers of a document comes from different versions of the document. The acquisition module is configured to, upon receiving a task request from a client device, retrieve target knowledge data associated with a target version identifier that matches the requirement information of the task request from the knowledge database, and send the target knowledge data to the client device.

7. The knowledge data scheduling device according to claim 6, characterized in that, Each knowledge dataset includes at least one knowledge data entry, each knowledge data entry is associated with a document joint identifier and at least one knowledge data, and each knowledge data entry corresponds to a version status, the version status including an unavailable status or an available status, the document joint identifier is composed of a document identifier and a version identifier.

8. The knowledge data scheduling device according to claim 7, characterized in that, The storage module is specifically used for: If at least one knowledge data entry already exists in the first knowledge dataset corresponding to the first document in the knowledge database, then based on the document identifier of the first document, the first version identifier, and the knowledge data, a first knowledge data entry is constructed in the first knowledge dataset, the version status of the first knowledge data entry is set to an available state, and the version status corresponding to the at least one knowledge data entry is updated to an unavailable state; the first knowledge data entry includes the first joint identifier of the first document stored in association and the knowledge data. or, If the knowledge dataset corresponding to the first document does not exist in the knowledge database, a new knowledge dataset is created, and a second knowledge data entry is constructed in the new knowledge dataset. The version status of the second knowledge data entry is set to the available status. The second knowledge data entry includes the first joint identifier of the first document stored in association and the knowledge data; The first joint identifier is composed of the document identifier of the first document and the first version identifier.

9. The knowledge data scheduling device according to claim 7 or 8, characterized in that, The acquisition module is specifically used for: Determine the first knowledge data that matches the requirement information of the task request; Determine the target knowledge dataset containing the first knowledge data; The knowledge data in the target knowledge data entries whose version status is available in the target knowledge dataset are identified as the target knowledge data.

10. The knowledge data scheduling device according to claim 9, characterized in that, The device further includes: an execution module; The execution module is configured to, after obtaining target knowledge data associated with a target version identifier that matches the requirement information of the task request from the knowledge database, and upon receiving a re-examination request from the client device, update the version status of the other knowledge data entries besides the target knowledge data entry to an available status if there are at least two knowledge data entries in the target knowledge data dataset, and send the knowledge data in the other knowledge data entries to the client device.

11. An electronic device, characterized in that, It includes a processor and a memory, the memory storing programs or instructions that can run on the processor, the programs or instructions being executed by the processor to implement the knowledge data scheduling method as described in any one of claims 1-5.

12. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions, which, when executed by a computer, implement the knowledge data scheduling method as described in any one of claims 1-5.

13. A computer program product, characterized in that, The computer program product is stored in a storage medium, and when the computer program product is executed by a computer, it implements the knowledge data scheduling method as described in any one of claims 1-5.