Design document detection method and device, equipment, storage medium and program product

By using deep learning models to automatically analyze the business logic of current and historical design documents, the problem of low efficiency in design document review has been solved, and efficient and accurate logical conflict detection has been achieved, thus ensuring software quality.

CN121833031APending Publication Date: 2026-04-10INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-15
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

In existing technologies, the review of design documents is inefficient, making it difficult to detect conflicts between the current design documents and the project's historical logic, which leads to a lack of assurance in software quality.

Method used

By using a pre-trained deep learning model, potential logical conflicts can be identified by automatically recognizing project information, retrieving historical design documents, and comparing the current business logic with that of historical documents.

Benefits of technology

It enables fully automated review of design documents, improving efficiency and accurately identifying deep-seated business logic conflicts to ensure software quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121833031A_ABST
    Figure CN121833031A_ABST
Patent Text Reader

Abstract

The invention provides a design document detection method and device, equipment, a storage medium and a program product, and relates to the field of artificial intelligence, and the method comprises the steps: obtaining first item information of a target item to which a to-be-detected design document belongs, the to-be-detected design document being used for indicating the current business logic of the target item; based on the first project information, a historical design document of the target project is retrieved, and the historical design document is used for indicating historical business logic of the target project; inputting the to-be-detected design document and the historical design document into a pre-trained first deep learning model, judging whether the current business logic and the historical business logic have conflicts or not by the first deep learning model based on the to-be-detected design document and the historical design document, and outputting first detection information when the conflicts exist, the first detection information is used for indicating that the current service logic conflicts with the historical service logic. According to the method, the easily ignored and deep business logic conflicts in the design document can be efficiently and accurately identified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence, and in particular to a design document detection method, apparatus, device, storage medium, and program product. Background Technology

[0002] Design documents are a crucial output of the software development process. They define in detail the technical solutions for the software system, including requirements, architecture, modules, interfaces, data models, and business processes. Design documents not only provide developers with a blueprint and basis for coding but also serve as the foundation for testers to write test cases and evaluate test coverage. Therefore, reviewing design documents to ensure their accuracy is a vital step in guaranteeing the quality of subsequent development and testing and reducing the risk of software defects.

[0003] Currently, the review of design documents mainly relies on manual methods. Specifically, this involves participants such as developers, architects, or test engineers who, through individual reading or meeting reviews, check the content of the design documents one by one based on their personal experience and team agreements.

[0004] However, this manual review method has significant technical problems: First, it is inefficient and struggles to handle the frequent review needs of large projects with massive amounts of documents or rapid iteration scenarios. Second, manual review struggles to comprehensively and accurately identify whether the project's business logic described in the current design document conflicts with business logic established in previous versions of the project. Since historical project logic may be scattered across multiple documents, and logical conflicts are often hidden and complex, manual review is highly susceptible to failing to identify such deep-seated contradictions due to fatigue, oversight, or cognitive limitations. This can lead to developers potentially coding based on logically conflicting and flawed designs, and testers writing test cases based on erroneous logic, ultimately compromising software quality and introducing potential operational risks. Summary of the Invention

[0005] This application provides a design document inspection method, apparatus, equipment, storage medium, and program product to solve the technical problem that the existing technology of manually reviewing design documents is inefficient and makes it difficult to discover whether the business logic of the project described in the current design document conflicts with the historical business logic of the project.

[0006] Firstly, this application provides a design document detection method, the method comprising:

[0007] Obtain the first project information of the target project to which the design document to be inspected belongs, wherein the design document to be inspected is used to indicate the current business logic of the target project;

[0008] Based on the first project information, retrieve the historical design documents of the target project, which are used to indicate the historical business logic of the target project;

[0009] The design document to be detected and the historical design document are input into a pre-trained first deep learning model. The first deep learning model determines whether there is a conflict between the current business logic and the historical business logic based on the design document to be detected and the historical design document. If there is a conflict, it outputs first detection information, which is used to indicate that there is a conflict between the current business logic and the historical business logic.

[0010] Secondly, this application provides a design document inspection device, the device comprising:

[0011] The acquisition module is used to acquire the first project information of the target project to which the design document to be inspected belongs, wherein the design document to be inspected is used to indicate the current business logic of the target project;

[0012] The retrieval module is configured to retrieve, based on the first project information, the historical design documents of the target project, wherein the historical design documents are used to indicate the historical business logic of the target project;

[0013] The detection module is used to input the design document to be detected and the historical design document into a pre-trained first deep learning model. The first deep learning model determines whether there is a conflict between the current business logic and the historical business logic based on the design document to be detected and the historical design document. If there is a conflict, it outputs first detection information, which is used to indicate that there is a conflict between the current business logic and the historical business logic.

[0014] Thirdly, this application provides an electronic device, including: a processor, and a memory communicatively connected to the processor;

[0015] The memory stores computer-executed instructions;

[0016] The processor executes computer execution instructions stored in the memory to implement the method as described in the first aspect.

[0017] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method described in the first aspect.

[0018] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the method described in the first aspect.

[0019] The design document inspection method, apparatus, equipment, storage medium, and program products provided in this application have the following technical effects:

[0020] 1. This method automatically identifies project information and retrieves historical design documents accordingly, replacing the tedious process of manually searching through a large number of historical documents. Furthermore, this method automatically analyzes the current design document to be detected and the historical design documents together using a pre-trained deep learning model, achieving full automation of business logic conflict detection and improving the efficiency of design document review.

[0021] 2. The pre-trained deep learning model has strong semantic understanding and logical reasoning capabilities, and can deeply understand the business logic described in the document. By comparing and analyzing the current design document to be tested with the historical document as a benchmark, the model can accurately identify deep-seated business logic conflicts that are easily overlooked in manual review. Attached Figure Description

[0022] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0023] Figure 1 Schematic flowchart of the design document detection method provided in this application embodiment Figure 1 ;

[0024] Figure 2 Schematic flowchart of the design document detection method provided in this application embodiment Figure 2 ;

[0025] Figure 3 A flowchart illustrating the method for extracting target named entities provided in this application embodiment. Figure 1 ;

[0026] Figure 4 A flowchart illustrating the method for extracting target named entities provided in this application embodiment. Figure 2 ;

[0027] Figure 5 A schematic diagram of the design document detection device provided in this application embodiment;

[0028] Figure 6 This is a schematic diagram of the electronic device structure provided in an embodiment of this application.

[0029] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0030] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0031] It should be noted that the design document detection method, apparatus, equipment, storage medium and program product provided in this application can be used in the field of artificial intelligence, or in any field other than artificial intelligence. The application field of the design document detection method, apparatus, equipment, storage medium and program product in this application is not limited.

[0032] To address the technical problem that existing technologies rely on manual review of design documents, which is inefficient and makes it difficult to identify whether the business logic described in the current design document conflicts with the project's historical business logic, the inventors of this application have considered that the powerful reasoning capabilities of deep learning models can be utilized to compare the current design document with historical design documents and analyze whether the business logic described in the current design document conflicts with historical business logic.

[0033] Therefore, the technical concept of this application is as follows:

[0034] Obtain project information for the project to which the design document to be inspected belongs, and retrieve historical design documents for that project based on the project information. Input the design document to be inspected and the historical design documents into a pre-trained deep learning model. The model analyzes whether there is any conflict between the business logic of the project described in the design document to be inspected and the business logic of the project described in the historical design documents. If a conflict exists, the model outputs detection information indicating the conflict.

[0035] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0036] Example 1

[0037] Figure 1 Schematic flowchart of the design document detection method provided in this application embodiment Figure 1 This method can be applied to servers, such as... Figure 1 As shown, the method includes:

[0038] S101. Obtain the first project information of the target project to which the design document to be inspected belongs. The design document to be inspected is used to indicate the current business logic of the target project.

[0039] In this step, the server can receive the design document to be inspected uploaded by the user through a file upload interface. This document can be in formats such as PDF or DOCX. After obtaining the design document, the server can first call the corresponding document parsing library to convert the document content into plain text format for subsequent processing.

[0040] Furthermore, in the stage of obtaining the first project information, for example, the server can obtain the first project information in the following ways:

[0041] Method 1: Read the attribute metadata of the design document to be tested. Specifically, before uploading the design document to be tested, the user can fill in the first item information into the "Title", "Subject", or "Custom Attribute" fields of the design document to be tested. The server can extract these pre-filled attribute metadata as the first item information. For example, the value of the "Subject" field can be read as "Project XX" from the attribute panel of the DOCX document.

[0042] Method 2: Parsing filenames with fixed formats. Specifically, the filenames of design documents can follow a fixed format, for example, the filename structure can be "Project Number-Project Name-Version Number-Document Type.docx". Therefore, the server can extract the "Project Number" and "Project Name" as the first project information from the filename through string splitting and regular expression matching.

[0043] Method 3: By parsing upload request parameters. Specifically, the client can be configured to require users to manually select or enter the project to which the document belongs when uploading the design document to be tested. This project information is then submitted to the server along with the document as a parameter in the API request, allowing the server to obtain the initial project information.

[0044] S102. Based on the first project information, retrieve the historical design documents of the target project. The historical design documents are used to indicate the historical business logic of the target project.

[0045] In this step, after the server obtains the first project information, it can use the first project information as a query condition to call the retrieval interface of the document management service or knowledge base system. The purpose is to obtain all historical design documents related to the target project that are earlier than the current document to be detected.

[0046] Furthermore, after processing the query request, the document management service or knowledge base system returns a list of documents containing all design document versions from the target project's history. The server can obtain the complete content of these historical documents through the download interface provided by the document management service or knowledge base system, and load the downloaded content into the server's memory or temporary storage for subsequent analysis and processing.

[0047] S103. Input the design document to be detected and the historical design document into the pre-trained first deep learning model. The first deep learning model determines whether there is a conflict between the current business logic and the historical business logic based on the design document to be detected and the historical design document. If there is a conflict, it outputs the first detection information, which is used to indicate that there is a conflict between the current business logic and the historical business logic.

[0048] In this step, the server can deploy or remotely access a pre-trained large-scale language model as the first deep learning model. In specific implementation, the server can concatenate the full text of the design document to be detected parsed in S101 with the full text of all relevant historical design documents obtained in S102, forming a merged concatenated text. Simultaneously, the server can obtain prompts for performing the detection task; these prompts enable the first deep learning model to understand the task and requirements of conflict detection. Further, the server inputs the concatenated text and the aforementioned prompts into the first deep learning model, thereby allowing the prompts to guide the first deep learning model in detection analysis. For example, the prompts could be:

[0049] "You are a software architect, carefully analyzing the following two documents: a 'current design document' and a 'historical design document set.' Your task is to conduct an in-depth comparison to identify any business logic conflicts or disruptive changes in the current design document compared to the historical design document set. Pay particular attention to the following aspects:"

[0050] 1. Interface compatibility: Will changes to the API in the current design document (such as adding or deleting parameters, or changing types) cause clients that rely on the old version of the interface to fail?

[0051] 2. Data model consistency: Will modifications to database tables and fields in the current design document invalidate historical data or require complex migration?

[0052] 3. Business process logic: Does the new business process described in the current design document contradict the business rules established in the historical design documents?

[0053] 4. Architectural constraint violation: Does the current architectural design in the design document violate major technical constraints (such as specified technology stacks or communication protocols) defined in the historical design documents?

[0054] Provide your assessment. If a conflict exists, please specify the point of conflict, the affected components, and the severity of the conflict.

[0055] Guided by prompt words, the first deep learning model performs conflict detection based on its understanding of the document. Upon detecting a conflict, it generates a natural language report as initial detection information. This report can record the conflict detection result (e.g., "Conflict exists") and may include a detailed description of the conflict, location references, and potential impact analysis. Finally, after receiving the initial detection information output by the first deep learning model, the server can format it into a standard data format such as JSON or XML and return it to the client via an API response, completing the detection task.

[0056] The design document detection method provided in this embodiment has the following technical effects:

[0057] 1. This method automatically identifies project information and retrieves historical design documents accordingly, replacing the tedious process of manually searching through a large number of historical documents. Furthermore, this method automatically analyzes the current design document to be detected and the historical design documents together using a pre-trained deep learning model, achieving full automation of business logic conflict detection and improving the efficiency of design document review.

[0058] 2. The pre-trained deep learning model has strong semantic understanding and logical reasoning capabilities, and can deeply understand the business logic described in the document. By comparing and analyzing the current design document to be tested with the historical document as a benchmark, the model can accurately identify deep-seated business logic conflicts that are easily overlooked in manual review.

[0059] Example 2

[0060] Figure 2 Schematic flowchart of the design document detection method provided in this application embodiment Figure 2 ,like Figure 2 As shown, the method includes:

[0061] S201. Obtain the first project information of the target project to which the design document to be inspected belongs;

[0062] Optionally, in this step, the first project information of the target project to which the design document to be inspected belongs can be obtained, including:

[0063] Extract the target named entities related to the target project from the design document to be tested, and determine the first project information based on the target named entities.

[0064] Specifically, after the server receives the design document to be tested uploaded by the user, it can first call the corresponding document parsing library to convert the content of the design document to plain text format, and retain basic information such as the chapter structure of the design document text during the conversion process.

[0065] Next, the server preprocesses the plain text converted from the design document to be detected. This may include operations such as text cleaning (removing irrelevant special characters) and word segmentation (splitting sentences into word sequences), which serve as the basis for subsequent entity recognition.

[0066] In the named entity recognition and extraction stage, the server can input preprocessed text into a pre-trained named entity recognition model. The model performs sequence labeling on the text and identifies named entities belonging to the "item" category. It should be noted that these named entity types can be predefined in practical applications, for example:

[0067] Project name: such as "New Generation XX Platform", "XX Management System V2.0";

[0068] Project number: e.g., "PJ-2024-001";

[0069] System module names: such as "User Authentication Center" or "Early Warning Module";

[0070] The named entity recognition model identifies and outputs all identified candidate named entities and their positions in the text. Next, the server determines the target named entity from the candidate named entities that is most likely to represent the project to which the design document belongs. Specifically, the server can use heuristic rules for decision-making, such as: selecting project-related named entities that appear most frequently throughout the document; assigning higher weight to entities appearing in key sections such as the document title, abstract, and introduction, and selecting the named entity with the highest weight; and setting the confidence level of "project number" to be higher than that of "project name". The server applies these rules to select one or more entities from the candidate named entities as the target named entity.

[0071] During the first project information construction phase, the server can combine the determined target named entities (e.g., project number "PJ-2024-001" and project name "New Generation XX Platform") to form a structured "first project information" and store the first project information in memory in the form of key-value pairs.

[0072] The above solution utilizes named entity recognition technology, enabling the server to automatically extract key project identification information from the design document to be inspected, thereby reducing reliance on manual operations and automating the project information acquisition process.

[0073] Figure 3A flowchart illustrating the method for extracting target named entities provided in this application embodiment. Figure 1 ,like Figure 3 As shown, the method includes:

[0074] S301. Extract multiple candidate named entities from the design document to be inspected;

[0075] The step of extracting candidate named entities can be referred to in the foregoing embodiments, and will not be repeated here.

[0076] S302. Obtain the storage location information of the design document to be inspected, and determine the second project information of the project corresponding to the storage location information;

[0077] In this step, the server can obtain the storage location information of the design document to be tested by querying the server file system. For example, a storage location information can be: / data / design_docs / core business group / XX project / V2.1 / detailed design specification.docx.

[0078] Furthermore, the server internally pre-configures or loads path-project mapping rules from configuration management. These rules define how to parse project information from storage location information. For example, a rule can specify that the third-level directory (XX project) of the storage location information (storage path) represents the project name. The server applies the path-project mapping rules to parse the storage location information, extracting the project identifier from the path (such as "XX project" and its mapped standard number "PJ-TOP-001") to construct structured "second project information." It should be noted that since the project information in the design document to be tested may be incorrect due to oversight, and since in actual applications, design documents for different projects usually have fixed storage areas, the project information parsed from the storage location information is usually error-free. Therefore, the second project information can be considered as project information with high confidence.

[0079] S303. Determine the similarity between each candidate named entity and the second item information, and determine the candidate named entity with the highest similarity as the target named entity.

[0080] The server inputs the text of each candidate named entity and the core text from the second item information into a text embedding model, which converts the text into vectors in a high-dimensional space. The server then calculates the cosine similarity between each candidate entity vector and the second item information vector. The cosine similarity value ranges from -1 to 1, with higher values ​​indicating greater semantic similarity. The server compares the similarity scores calculated for all candidate named entities and the second item information, and selects the candidate named entity with the highest similarity score as the final target named entity.

[0081] In complex real-world environments, a design document may mention the names of multiple projects or modules. Relying solely on named entity recognition may not be sufficient to accurately determine which document truly belongs to which project. Figure 3 The method shown introduces a high-confidence information source—storage location information (in practical applications, design documents of different projects usually follow strict storage management specifications)—as an "anchor point." It uses objective similarity calculation to select the most relevant entity from multiple candidate entities, effectively solving the problem of misjudgment caused by the existence of multiple project or module names in the document, and improving the accuracy of project information identification.

[0082] Figure 4 A flowchart illustrating the method for extracting target named entities provided in this application embodiment. Figure 2 ,like Figure 4 As shown, the method includes:

[0083] S401. Determine the title area and body text area in the design document to be tested;

[0084] In this step, the server can call the document parsing library to extract text and identify the inherent structural elements of the document. Specifically, the server can identify paragraphs with "heading" style (such as Heading 1) in the document, or make heuristic judgments based on format features such as font size and bolding, to define the topmost heading (usually the first level heading) and its attached information (such as subheadings) as the "heading area".

[0085] Furthermore, the server can define all text content (including subheadings and their subordinate paragraphs) after the title and before the end of the document as the "body text area".

[0086] S402. Extract the first named entity from the text in the title area, and extract the second named entity from the text in the body area;

[0087] In this step, the server can isolate the title text and body text regions defined in S401 as two independent text inputs, and perform named entity recognition (NER) on each separately: The server inputs the title text into a pre-trained NER model, which identifies and outputs the most representative project-related entity in that region as the first named entity. Similarly, the body text is input into the same NER model, which identifies and outputs the project-related entities appearing in the body text as the second named entity. The NER model may identify multiple entities; in this case, the first entity appearing in each region or the entity with the highest confidence level is usually selected as the representative.

[0088] S403. Determine whether the items indicated by the first named entity and the items indicated by the second named entity are consistent.

[0089] In this step, the server performs a consistency comparison on the text content of the first named entity and the second named entity. Specifically, it can use exact matching to directly compare whether the strings of the two entities are completely identical, or it can use semantic fuzzy matching to calculate the semantic vector similarity of the text of the two entities (such as generating vectors and calculating cosine similarity). If the similarity exceeds a preset threshold (such as 0.9), it is determined to be consistent.

[0090] If not, then execute S404;

[0091] If so, then execute S406;

[0092] S404. The pre-trained second deep learning model determines the confidence of the first named entity and the second named entity based on the text in the title region and the first named entity, and the text in the body region and the second named entity, respectively.

[0093] In this step, the server generates two sets of input data, which are then provided to a second deep learning model for analysis. This second deep learning model can be specifically designed to evaluate contextual confidence. The input data is as follows:

[0094] Input 1: Full text of the title area + first named entity;

[0095] Input 2: Full text of the main body + second named entity;

[0096] It should be noted that the second deep learning model is trained to judge the "reliability" or "clarity of reference" of a named entity in its context. It analyzes the semantic relevance of the named entity to the surrounding text, the context in which the named entity appears (e.g., the title is usually more authoritative, but entities appearing in specific sections of the text may also be critical), and the normative nature of the expression, and outputs a confidence score (e.g., a value between 0 and 1) for each entity.

[0097] S405. The named entity corresponding to the highest confidence level is determined as the target named entity.

[0098] The server compares the confidence scores of the first and second named entities obtained from the second deep learning model, and selects the named entity with the higher confidence score as the final target named entity. For example, if the entity appearing in the body text has a very clear reference in the context (confidence 0.95), while the entity in the title may be a generic term (confidence 0.60), then the entity in the body text is selected.

[0099] S406. Determine the first named entity as the target named entity.

[0100] When S403 determines that the items indicated by the two entities are consistent, the server uses the header area entity, which usually has higher authority, and directly identifies the first named entity as the target named entity.

[0101] Figure 4 The method described above improves the accuracy and reliability of identifying the project to which the design document belongs when the title and body of the document do not match (e.g., a document titled "Project A" with extensive descriptions of "sub-modules of Project B" in the body). This is achieved by introducing a second deep learning model to evaluate the confidence of named entities in their context and selecting the named entities with high confidence as target named entities (used to determine the project to which the design document belongs).

[0102] S202. Based on the first project information, retrieve the historical design documents of the target project. The historical design documents are used to indicate the historical business logic of the target project.

[0103] The specific implementation process of this step can be found in Embodiment 1, and will not be elaborated here.

[0104] S203. Based on the information from the first project, determine the business importance level of the target project;

[0105] In this step, the server can send a query request to the project management system or configuration management database based on the first project information (such as the project ID) obtained in S201. After processing the query request, the project management system or configuration management database returns the predefined attributes of the target project to the server. The server determines the business importance level of the target project based on the obtained predefined attributes. For example, the server can determine the target project as a limited business importance level such as "high", "medium", or "low" based on predefined attributes such as the "business impact scope" (such as the bank-wide core system or the department-level auxiliary system), "risk level", or "strategic priority", which will serve as the basis for decision-making in subsequent steps.

[0106] S204. Among multiple candidate prompt words, determine the target prompt word that matches the business importance level. The target prompt word is used to instruct the first deep learning model to perform a conflict detection operation that matches the business importance level.

[0107] In this step, the server can store a preset "prompt word mapping table." This table maps different levels of business importance to different conflict detection prompt word templates. For example:

[0108] For a "high" importance level, the target cue word for mapping can require a "deep, comprehensive conflict analysis" of the large model, including checking all interface compatibility, data model consistency, business process logic, and architectural constraints.

[0109] For "low" importance levels, the target prompt for mapping can only require "basic conflict checks," such as focusing only on disruptive changes to the interface.

[0110] Specifically, the server can retrieve and determine the corresponding target prompt word template from the mapping table based on the business importance level determined in S203.

[0111] S205. Input the design document to be detected, historical design documents, and target prompt words into the first deep learning model;

[0112] In this step, the server calls the pre-trained first deep learning model service (e.g., a large language model) and takes the full text of the historical design document obtained in S202, the full text of the design document to be detected, and the target prompt words determined in S204 as input to the first deep learning model. The first deep learning model performs conflict detection analysis of a corresponding level of detail according to the instructions of the target prompt words, and finally outputs a conflict detection report based on the detection results.

[0113] Steps S203-S205 involve performing conflict detection operations based on the business importance level of the target project. This allows for the most rigorous and comprehensive logical conflict detection on high-value, high-impact core business-related design documents. Simultaneously, simpler and faster detection operations can be used for business-related design documents with relatively lower importance. This differentiated approach ensures that core business design documents are thoroughly reviewed while avoiding unnecessary conflict detection on non-critical business documents, thus reducing computational resource consumption.

[0114] S206. Based on the information of the first project, obtain the latest historical code commit records of the target project;

[0115] In this step, the server can use the initial project information (such as the project ID or repository name) to connect to the version control system via an API call. The server can then query the version control system for all code commit records of the target project within the most recent iteration cycle on a specific branch (such as the main branch or development branch), i.e., the latest historical code commit records. The version control system returns these code commit records to the server, which may include the commit hash, author, time, comments, and corresponding code differences.

[0116] S207. Based on historical code commit records, generate code change instruction information for the target project. The code change instruction information is used to indicate the current code changes in the target project.

[0117] In this step, the server can input the acquired historical code commit records into a code analysis engine or another deep learning model specifically designed to understand code. The engine or model analyzes the code differences, identifies key change points, and summarizes them into a structured "code change instruction information". This information can specifically list the added, modified, or deleted features, interfaces, data structures, and core logic in this iteration, presenting the code change content in a way that is closer to natural language and design document descriptions.

[0118] S208. Input the code change instruction information and the design document to be detected into the pre-trained third deep learning model. The third deep learning model judges the completeness of the code change content described in the design document to be detected based on the code change instruction information and the design document to be detected, and outputs the second detection information, which is used to indicate the completeness.

[0119] In this step, the server can invoke a pre-trained third deep learning model (which can be another large language model, either the same as or different from the first deep learning model). Then, the server takes the code change instruction information generated in S207 and the full text of the design document to be tested as input. The third deep learning model compares the code change instruction information with the design document to analyze whether the design document completely covers all the change points listed in the code change instruction information. In practical applications, for example, the following detection can be performed:

[0120] 1. Are the new features fully described in the requirements section of the document?

[0121] 2. Are interface changes updated synchronously in the API design section?

[0122] 3. Are the data structure adjustments reflected in the data model section?

[0123] 4. Are the architectural changes marked on the system design diagram?

[0124] After the detection is completed, the third deep learning model outputs the second detection information, which can indicate the completeness of the description of the code changes in the design document to be detected. For example, it can list the changes that have been covered in the design document to be detected and the omissions that have not been described in the design document to be detected.

[0125] Steps S206-S208 utilize deep learning models to automatically analyze code change indication information and the design document under test. This allows for the rapid and accurate discovery of code changes that were not reflected in the design document due to developer oversight. Consequently, it ensures that the design document under test can synchronously reflect the latest implementation status of the software, providing an accurate basis for subsequent testing, review, and maintenance.

[0126] The server can also automatically extract the structured writing specifications of project design documents and use a deep learning model to detect whether the current design document to be checked conforms to these specifications. The check content may include core elements such as the completeness of required chapters, consistency of terminology, and format compliance, and generate a standardization report to locate the violations.

[0127] Figure 5 This is a schematic diagram of the design document detection device provided in the embodiments of this application, such as... Figure 5 As shown, the device 50 includes:

[0128] The acquisition module 501 is used to acquire the first project information of the target project to which the design document to be inspected belongs. The design document to be inspected is used to indicate the current business logic of the target project.

[0129] The retrieval module 502 is used to retrieve the historical design documents of the target project based on the first project information. The historical design documents are used to indicate the historical business logic of the target project.

[0130] The detection module 503 is used to input the design document to be detected and the historical design document into a pre-trained first deep learning model. The first deep learning model determines whether there is a conflict between the current business logic and the historical business logic based on the design document to be detected and the historical design document. If there is a conflict, it outputs first detection information, which is used to indicate that there is a conflict between the current business logic and the historical business logic.

[0131] Figure 6 This is a schematic diagram of the electronic device structure provided in the embodiments of this application, such as... Figure 6 As shown, the device 60 includes at least one processor 601 and a memory 602. Optionally, the device 60 also includes a communication component 603. The processor 601, memory 602, and communication component 603 are connected via a bus 604.

[0132] In a specific implementation, at least one processor 601 executes computer execution instructions stored in memory 602, causing at least one processor 601 to perform the above-described method.

[0133] The specific implementation process of processor 601 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0134] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.

[0135] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0136] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this application.

[0137] It should be further noted that although the steps in the flowchart are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowchart may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.

[0138] It should be understood that the above-described device embodiments are merely illustrative, and the device of this application can also be implemented in other ways. For example, the division of units / modules in the above embodiments is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple units, modules, or components may be combined, or integrated into another system, or some features may be ignored or not executed.

[0139] Furthermore, unless otherwise specified, the functional units / modules in the various embodiments of this application can be integrated into one unit / module, or each unit / module can exist physically separately, or two or more units / modules can be integrated together. The integrated units / modules described above can be implemented in hardware or as software program modules.

[0140] When integrated units / modules are implemented in hardware, the hardware can be digital circuits, analog circuits, etc. The physical implementation of the hardware structure includes, but is not limited to, transistors, memristors, etc. Unless otherwise specified, the processor can be any suitable hardware processor, such as a CPU, GPU, FPGA, DSP, and ASIC, etc. Unless otherwise specified, the storage unit can be any suitable magnetic or magneto-optical storage medium, such as Resistive Random Access Memory (RRAM), Dynamic Random Access Memory (DRAM), Static Random Access Memory (SRAM), Enhanced Dynamic Random Access Memory (EDRAM), High-Bandwidth Memory (HBM), Hybrid Memory Cube (HMC), etc.

[0141] If the integrated unit / module is implemented as a software program module and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.

[0142] In the above embodiments, the descriptions of each embodiment have their own emphasis. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments. The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification.

[0143] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.

[0144] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.

Claims

1. A design document detection method, characterized in that, The method includes: Obtain the first project information of the target project to which the design document to be inspected belongs, wherein the design document to be inspected is used to indicate the current business logic of the target project; Based on the first project information, retrieve the historical design documents of the target project, which are used to indicate the historical business logic of the target project; The design document to be detected and the historical design document are input into a pre-trained first deep learning model. The first deep learning model determines whether there is a conflict between the current business logic and the historical business logic based on the design document to be detected and the historical design document. If there is a conflict, it outputs first detection information, which is used to indicate that there is a conflict between the current business logic and the historical business logic.

2. The method according to claim 1, characterized in that, The step of obtaining the first project information of the target project to which the design document to be inspected belongs includes: Extract the target named entities related to the target project from the design document to be detected, and determine the first project information based on the target named entities.

3. The method according to claim 2, characterized in that, The step of extracting target named entities related to the target project from the design document to be detected includes: Extract multiple candidate named entities from the design document to be detected; Obtain the storage location information of the design document to be detected, and determine the second project information of the project corresponding to the storage location information; Determine the similarity between each candidate named entity and the second item information, and determine the candidate named entity corresponding to the highest similarity as the target named entity.

4. The method according to claim 2, characterized in that, The step of extracting target named entities related to the target project from the design document to be detected includes: Determine the title area and body text area in the design document to be tested; Extract a first named entity from the text in the title area, and extract a second named entity from the text in the body area; Determine whether the items indicated by the first named entity and the items indicated by the second named entity are consistent; If not, the pre-trained second deep learning model determines the confidence levels of the first named entity and the second named entity based on the text in the title region and the first named entity, and the text in the body region and the second named entity, respectively. The named entity corresponding to the highest confidence level is determined as the target named entity.

5. The method according to claim 1, characterized in that, The step of inputting the design document to be detected and the historical design document into a pre-trained first deep learning model includes: Based on the information from the first project, determine the business importance level of the target project; Among multiple candidate prompt words, a target prompt word that matches the business importance level is determined. The target prompt word is used to instruct the first deep learning model to perform a conflict detection operation that matches the business importance level. The design document to be detected, the historical design document, and the target prompt word are input into the first deep learning model.

6. The method according to any one of claims 1-5, characterized in that, After obtaining the first project information of the target project to which the design document to be inspected belongs, the method further includes: Based on the information of the first project, obtain the latest historical code commit records of the target project; Based on the historical code commit records, code change instruction information for the target project is generated, and the code change instruction information is used to indicate the current code changes to the target project. The code change indication information and the design document to be detected are input into a pre-trained third deep learning model. The third deep learning model determines the completeness of the design document's description of the code change based on the code change indication information and the design document to be detected, and outputs second detection information, which is used to indicate the completeness.

7. A design document detection device, characterized in that, The device includes: The acquisition module is used to acquire the first project information of the target project to which the design document to be inspected belongs, wherein the design document to be inspected is used to indicate the current business logic of the target project; The retrieval module is configured to retrieve, based on the first project information, the historical design documents of the target project, wherein the historical design documents are used to indicate the historical business logic of the target project; The detection module is used to input the design document to be detected and the historical design document into a pre-trained first deep learning model. The first deep learning model determines whether there is a conflict between the current business logic and the historical business logic based on the design document to be detected and the historical design document. If there is a conflict, it outputs first detection information, which indicates that there is a conflict between the current business logic and the historical business logic.

8. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1 to 6.

10. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method as described in any one of claims 1 to 6.