Integrated development environment help document jumping method, system, medium and product

CN122816686APending Publication Date: 2026-09-25KYLIN CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610909946.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-23
Publication Date
2026-09-25

AI Technical Summary

Technical Problem

现有的一些IDE提供了简单的文档提示功能(如鼠标悬停提示),但通常内容简略,且无法提供结构化、完整的文档内容

Benefits of technology

1、针对C/C++语言复杂性(如模板、重载函数、命名空间)导致的文档查询精度不足的问题。现有方法无法区分语义不同的同名标识符,导致开发者需要从大量结果中人工筛选,效率低下。本发明能够实现从代码标识符到其对应文档的精准、无歧义跳转。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122816686A_ABST
    Figure CN122816686A_ABST
Patent Text Reader

Abstract

The application discloses a help document jump method and system of an integrated development environment, a medium and a product. The method comprises the following steps: in the plug-in interface of the integrated development environment, a language server is used to capture the deep semantic of the code context at the cursor to obtain a semantic query object; an environment arbitration result of the development environment is obtained; the semantic query object is used to query a rule library to extract a candidate rule set, the extracted candidate rule set is filtered and optimized according to the environment arbitration result of the development environment, a help document URL is generated based on the safe coding of the template parameter and the URL after the filtering and optimization, and the help document URL is delivered to an embedded document viewer of the integrated development environment for display and output. The application aims to realize accurate and unambiguous URL jump from a code identifier to the corresponding document, deeply integrate the development environment, realize version perception and context perception ability in linkage with project configuration, and ensure the accuracy of the document.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of document retrieval technology in the software development process, specifically to a method, system, medium, and product for navigating to help documentation in an integrated development environment. Background Technology

[0002] In the software development process of programming languages ​​such as C / C++, developers often need to consult various help documents such as standard libraries (such as STL), third-party libraries (such as Boost, Qt) or specific identifiers in their own libraries. Some existing IDEs provide simple documentation prompts (such as mouse hover tips), but the content is usually brief and cannot provide structured and complete documentation. Although some IDEs support configuring external documentation, the process of jumping around is cumbersome and the experience is not consistent. Traditional documentation consultation methods have many inconveniences: (1) Contextual detachment: Developers need to switch from the IDE environment to a browser or local documentation reader to manually search for the target identifier. This process interrupts the continuity of coding and reduces development efficiency. (2) Low search accuracy: Manual search may yield a large number of irrelevant results, especially for common names (such as open, init), requiring extra time to filter the correct documentation. (3) Difficulty in locating: Even if the correct documentation page is found, for overloaded functions, template classes or members under namespaces, it is necessary to manually scroll the page to find the accurate explanation. (4) Documentation and code version mismatch: Developers may not be able to quickly identify the library version used by the current code, thus consulting the wrong version of the documentation, leading to misunderstandings. Therefore, how to seamlessly integrate into the development environment and achieve accurate, fast, and richly documented navigation has become a key technical problem that urgently needs to be solved. Summary of the Invention

[0003] The technical problem to be solved by this invention is to provide a method, system, medium, and product for redirecting help documentation in an integrated development environment (IDE). This invention aims to generate correct documentation links for different libraries and versions within the IDE, achieving accurate and unambiguous URL redirection from code identifiers to their corresponding documentation. It also aims to deeply integrate the IDE, enabling version awareness and context awareness linked to project configuration, thus ensuring the accuracy of the documentation.

[0004] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows: A method for redirecting to help documentation in an integrated development environment (IDE) includes the following steps: After a user command to query help documentation is triggered in the plugin interface of the IDE, a language server is used to perform deep semantic capture of the code context at the cursor position to obtain a semantic query object; an environment arbitration is performed between the declared version of the development environment in the project's build file and the actual version used in the project to obtain the environment arbitration result of the development environment; a candidate rule set is extracted from the query rule base using the semantic query object; the extracted candidate rule set is filtered and optimized using the environment arbitration result of the development environment; a help documentation URL is generated based on the secure encoding of template parameters and URL synthesis according to the filtered and optimized rules; and the help documentation URL is delivered to the embedded document viewer of the IDE for display output.

[0005] Optionally, the step of using a language server to perform deep semantic capture of the code context at the cursor position to obtain a semantic query object includes: S101, submit the code context at the cursor position to the language server and retrieve the JSON data returned by the language server; S102, using the semantic response standardization pipeline, performs standardization processing on JSON data, including: extracting the content fields of the JSON data, and stripping HTML or Markdown tags, code highlighting information, and temporary symbol names generated by the compiler from the content fields to obtain a cleaned string; decomposing the cleaned string using a symbol parser with built-in lexical rules and extracting the main template name and template parameter list; generating a structured semantic query object for the cleaned string, wherein the fields of the semantic query object include: fullyQualifiedName, used to uniquely identify the complete semantic path of the code symbol; primaryTemplate, used to store the base template name of the code symbol; templateArgs, used to store the specific parameter list of the template; symbolType, used to identify the type of the code symbol; namespaceChain, used to store the namespace hierarchy of the symbol; and sourceLocation, used to store the precise location information of the symbol in the source code. S103, determine whether the semantic query object points to an intermediate template specialization. The intermediate template specialization refers to a template specialization whose template parameter list contains nested template instances. The judgment condition for the semantic query object pointing to an intermediate template specialization is: check the templateArgs field of the template parameter list of the semantic query object. If any parameter itself contains a template structure, it is determined to be an intermediate template specialization. The template structure includes those containing angle brackets or those that can be resolved to template instances. If the judgment is true, query the complete declaration position of the intermediate template specialization through the language server, recursively trace its parent template chain, substitute the actual parameters of the child template into the parent template to generate a complete specialization path, and update the fullyQualifiedName field of the complete specialization path of the semantic query object to enhance the semantic integrity of the semantic query object.

[0006] Optionally, step S103, which involves performing static reasoning based on finite queries to enhance the specialization path of the semantic query object, includes: S201, Send a request to the language server to obtain the declaration location of the semantic query object; S202, extract the template declaration in the declaration position as the current template declaration, and extract the template parameters of the current template declaration; S203, determine whether the current template declaration has a parent template. If a parent template exists, substitute the template parameters of the current template declaration into the parent template of the current template declaration, and update the complete specialization path fullyQualifiedName of the semantic query object: first, establish a mapping relationship from the formal parameters of the parent template to the actual parameters of the child template; then, instantiate the parent template according to this mapping, generate the specialization instance string of the parent template; finally, integrate the instance of the parent template with the current complete specialization path and update it to the form "parent template specialization::current specialization path"; after the update is completed, use the parent template as the new current template declaration and jump to step S204; otherwise, jump to step S205; S204, determine whether the recursion depth of the current template declaration is equal to the preset maximum depth. If it is equal to the preset maximum depth, jump to step S205; otherwise, take the parent template of the current template declaration as the new current template declaration and jump to step S203. S205 outputs the updated semantic query object.

[0007] Optionally, the environmental arbitration of the declared version of the project in the build file and the actual version used in the development environment to obtain the environmental arbitration result of the development environment includes: determining whether the actual version used in the project is an API-compatible subset of the declared version based on pre-set or online updatable compatibility rules; if the determination is true, the actual version used in the project is taken as the environmental arbitration result of the development environment and marked as an exact match; if the determination is false, the following compatibility degradation strategy is executed: finding the compatible version that is closest in functionality to the declared version and available, if it exists, taking that version as the environmental arbitration result and marking it as an approximate match, and generating an interactive report containing detailed conflict comparisons for developers to refer to; if no compatible version is available, taking the declared version as the environmental arbitration result and marking it as a high-risk approximate match, and issuing a prominent warning in the report; the generated interactive report contains multiple remediation options for developers to choose from, including: upgrading the actual version to the declared version, downgrading the declared version to the actual version, selecting the most recent compatible version for approximate matching, and manual processing options.

[0008] Optionally, the step of extracting candidate rule sets from the semantic query object query rule base includes: extracting a core feature set from the semantic query object, wherein the core feature set includes: namespace features extracted from the namespaceChain field, primary template name features extracted from the primaryTemplate field, template parameter features extracted from the templateArgs field, symbol type features extracted from the symbolType field, and base class features and member features obtained by querying the language server through the sourceLocation field; comparing the extracted core feature set with the matching conditions of each rule in the rule base, calculating the matching score of each rule in the rule base; and recalling all rules with matching scores exceeding a preset threshold to form a candidate rule set.

[0009] Optionally, the step of using the environmental arbitration results of the development environment to filter and optimize the extracted candidate rule set includes: S301, Extract the version document information of each candidate rule in the candidate rule set, including the version number and a list of supported versions. S302, compare the version document information with the environment arbitration results of the development environment to determine the version compatibility of the candidate rules as fully compatible, partially compatible, approximately matching, incompatible or unknown, and assign corresponding scores according to the version compatibility table to obtain the adaptation score. S303: The code context at the cursor position is used to obtain the weight of the fitness score using the trained weight prediction model. The weight of the fitness score of the candidate rule is multiplied by the fitness score, and then summed with the matching score of the candidate rule to obtain the comprehensive score of the candidate rule. The candidate rule with the highest comprehensive score is selected as the filtered and optimized rule.

[0010] Optionally, the step of generating the help document URL based on the template parameters through secure encoding and URL synthesis according to the optimized filtering rules includes: S401, extract URL templates from the filtered and optimized rules, and identify variable placeholders within them; S402, extract the corresponding template parameters from the semantic query object and the environmental arbitration result based on the variable placeholders; S403 URL-encodes the symbols in the template parameters and then reassembles them into a parameter string in their original order; S404 converts the complete specialized path into the anchor format expected by the embedded document viewer; S405, fill the parameter string into the corresponding placeholder in the URL template to obtain the help document URL; S406 validates the format of the help document URL. The validation items include whether it is correct, whether the encoding conforms to the RFC specification, and whether the length exceeds the limit. If the validation passes, the help document URL is output; otherwise, the process ends and exits, or the specified help document URL is loaded.

[0011] The present invention also provides a help documentation navigation system for an integrated development environment, comprising a microprocessor and a memory interconnected thereto, wherein the microprocessor is programmed or configured to execute the help documentation navigation method of the integrated development environment.

[0012] The present invention also provides a computer-readable storage medium storing a computer program or instructions that are programmed or configured to execute, via a processor, a help document navigation method of the integrated development environment.

[0013] The present invention also provides a computer program product, including a computer program or instructions that are programmed or configured to execute, via a processor, a help document navigation method for the integrated development environment.

[0014] Compared with the prior art, the present invention can mainly achieve the following beneficial effects: 1. This invention addresses the issue of insufficient document search accuracy caused by the complexity of C / C++ languages ​​(such as templates, overloaded functions, and namespaces). Existing methods cannot distinguish between semantically different identifiers with the same name, forcing developers to manually sift through a large number of results, which is inefficient. This invention enables precise and unambiguous navigation from code identifiers to their corresponding documents.

[0015] 2. Addressing the document navigation compatibility issue caused by the fragmentation of the C / C++ development ecosystem (multiple document sources, multiple library versions). Existing solutions are rigid and simplistic, unable to flexibly adapt to the organization of various document sources such as cppreference, Boost, and Qt, nor can they match the specific library versions used in a project. This invention extracts candidate rule sets by utilizing a semantic query object query rule base, filters and optimizes the extracted candidate rule sets using the environment arbitration results of the development environment, and generates help document URLs based on the filtered and optimized rules through secure encoding of template parameters and URL synthesis. It provides a flexibly configurable and intelligently matching rule system that can generate correct document links for different libraries (such as STL, Boost, and Qt) and versions, ensuring the universality and adaptability of the method and solving the problem of inconsistent document sources caused by the fragmentation of the C / C++ development ecosystem.

[0016] 3. Addressing version and platform mismatch issues caused by the disconnect between the documentation query function and the project compilation environment. Existing technologies operate as isolated functions, unable to perceive project dependency versions and compilation platforms, and the provided documentation may be inconsistent with the APIs used in the actual code. This invention utilizes a language server to perform deep semantic capture of the code context at the cursor position to obtain semantic query objects; it performs environment arbitration between the declared version of the development environment in the project's build file and the actual version used in the project to obtain the environment arbitration result of the development environment. This enables deep integration of the development environment, achieving version awareness and context awareness capabilities linked to project configuration, ensuring the accuracy of the documentation. By automatically parsing version information from the project build file and prioritizing the selection of matching documentation rules, this mechanism effectively prevents the risk of version mismatch and greatly improves the reliability of the tool. Attached Figure Description

[0017] Figure 1 This is a schematic diagram of the basic process of the method in an embodiment of the present invention. Detailed Implementation

[0018] The overall concept of this invention is to construct a pluggable C / C++ help documentation navigation system with "precise parsing - intelligent matching - seamless display" as its core process. This system is deeply integrated into modern IDEs, performing semantic analysis by calling the underlying language server. A configurable rule engine intelligently maps the analysis results to corresponding document resources, ultimately presenting them seamlessly within the IDE, thus achieving one-click precise navigation from code to documentation. To enable those skilled in the art to better understand the technical solution of this invention, the following example, using a user's documentation query when processing complex C++ template code in VSCode, will be used in conjunction with the accompanying drawings of the embodiments of this invention to provide a further detailed explanation of the technical solution.

[0019] like Figure 1 As shown, the help document navigation method of the integrated development environment in this embodiment includes the following steps: After triggering a user command to query the help document in the plugin interface of the integrated development environment, the language server performs deep semantic capture on the code context at the cursor to obtain a semantic query object; environmental arbitration is performed on the declared version of the development environment in the project's build file and the actual version used in the project to obtain the environment arbitration result of the development environment; the semantic query object is used to query the rule base to extract a candidate rule set; the environment arbitration result of the development environment is used to filter and optimize the extracted candidate rule set; the help document URL is generated based on the secure encoding of the template parameters and URL synthesis according to the filtered and optimized rules; and the help document URL is delivered to the embedded document viewer of the integrated development environment for display output.

[0020] In this embodiment, the step of using a language server to perform deep semantic capture of the code context at the cursor position to obtain a semantic query object includes: S101, submit the code context at the cursor position to the language server and retrieve the JSON data returned by the language server; S102, the standardization process of JSON data is performed using the semantic response standardization pipeline, including: extracting the content fields of the JSON data, and stripping HTML or Markdown tags, code highlighting information, and temporary symbol names generated by the compiler from the content fields to obtain a cleaned string; decomposing the cleaned string using a symbol parser with built-in lexical rules to extract the main template name and template parameter list; generating a structured semantic query object for the cleaned string, wherein the fields of the semantic query object include: fullyQualifiedName, used to uniquely identify the complete semantic path of the code symbol; primaryTemplate, used to store the base template name of the code symbol; templateArgs, used to store the specific parameter list of the template; symbolType, used to identify the type of the code symbol; namespaceChain, used to store the namespace hierarchy of the symbol; and sourceLocation, used to store the precise location information of the symbol in the source code. The above fields are described in detail below: The fully qualified path (fullyQualifiedName) is used to uniquely identify the complete semantic path of a code symbol. It serves as the core input for URL generation, ensuring that the user can accurately jump to the most specific document page for that symbol (such as a template-specific version of the document). It also acts as the carrier for path updates during static inference. The primary template name, primaryTemplate, is used to store the basic template name of code symbols. As a key feature for rule matching, it quickly locates the general document rules of the template and is also the starting point for template inference. When it is necessary to trace back to the parent template, this template is the starting point. The template parameter list `templateArgs` stores the specific parameter list of the template. It serves as a key input for URL synthesis, is securely encoded and appended to the URL, and also serves as a fine-grained basis for rule matching. It is used to distinguish specialized versions with different parameter combinations to ensure that the correct template instance document is redirected. The symbol type (symbolType) is used to identify the type of code symbol (such as class, function, variable, namespace, template specialization, etc.). It acts as a filter for rule base selection, quickly excluding rules that are not applicable to the symbol type and improving matching efficiency. The namespace chain is used to store the hierarchical structure of the namespaces in which the symbols reside. It serves as the main source for extracting core features, distinguishing symbols with the same name from different libraries (such as boost::variant and std::variant), and also as the basis for generating URL paths, constructing the hierarchical access path of the document. Source location is used to store the precise location information of symbols in the source code (file URI, line number, column number). It serves as a query credential for static reasoning, is used to initiate precise declaration location queries to the language server, and facilitates debugging and logging, as well as tracing the source of queries and locating problems. S103, determine whether the semantic query object points to an intermediate template specialization. The intermediate template specialization refers to a template specialization whose template parameter list contains nested template instances. The judgment condition for the semantic query object pointing to an intermediate template specialization is: check the templateArgs field of the template parameter list of the semantic query object. If any parameter itself contains a template structure, it is determined to be an intermediate template specialization. The template structure includes those containing angle brackets or those that can be resolved to template instances. If the judgment is true, query the complete declaration position of the intermediate template specialization through the language server, and recursively trace its parent template chain. Substitute the actual parameters of the child template into the parent template to generate a complete specialization path. Update the fullyQualifiedName field of the complete specialization path of the semantic query object to enhance the semantic integrity of the semantic query object, thereby completing the "incomplete template name" into a "complete specialization path" and preventing jumps to the wrong document.

[0021] In this embodiment, step S103, which involves performing static reasoning based on finite queries to enhance the specialization path of the semantic query object, includes: S201, Send a request to the language server to obtain the declaration location of the semantic query object; S202, extract the template declaration in the declaration position as the current template declaration, and extract the template parameters of the current template declaration; S203, determine if a parent template exists in the current template declaration. If a parent template exists, substitute the template parameters of the current template declaration into the parent template of the current template declaration, and update the fully qualified name of the semantic query object: First, establish a mapping relationship from the formal parameters of the parent template to the actual parameters of the child template. Then, instantiate the parent template according to this mapping, and generate the specialized instance string of the parent template (e.g., Base). <int>Finally, the instance of the parent template is integrated with the current complete specialization path and updated to the form "parent template specialization::current specialization path" (e.g., Base). <int>::Derived <int>(etc.); after the update is complete, declare the parent template as the new current template and proceed to step S204; otherwise, proceed to step S205; S204, determine whether the recursion depth of the current template declaration is equal to the preset maximum depth. If it is equal to the preset maximum depth, jump to step S205; otherwise, take the parent template of the current template declaration as the new current template declaration and jump to step S203. S205 outputs the updated semantic query object.

[0022] Developers using multiple versions of the Boost library in large C++ projects often encounter issues when dealing with boost::variant variables. <std::string, std::vector <int>When specializing the `::apply_visitor` template, it's necessary to consult the accurate API documentation. For example, both Boost 1.72 and Boost 1.78 might exist in the project environment. To achieve automatic and accurate detection of the development environment, this embodiment describes environmental arbitration between the declared version of the development environment in the project's build file and the actual version used by the project to obtain the environmental arbitration result for the development environment. This includes: based on pre-set or online updatable compatibility rules, determining whether the actual version used by the project is an API-compatible subset of the declared version; if the determination is true, the actual version used by the project is taken as the environmental arbitration result for the development environment and marked as an exact match; if the determination is false, the following compatibility degradation strategy is executed: finding the most functionally similar and usable compatible version to the declared version, if it exists, taking that version as the environmental arbitration result and marking it as an approximate match, while generating an interactive report containing detailed conflict comparisons for developers' reference; if no compatible version is available, taking the declared version as the environmental arbitration result and marking it as a high-risk approximate match, while prominently warning in the report; the generated interactive report contains multiple remediation options for developers to choose from, including: upgrading the actual version to the declared version, downgrading the declared version to the actual version, selecting the most recent compatible version for approximate matching, and manual processing options.

[0023] In this embodiment, the step of extracting candidate rule sets from the semantic query object query rule base includes: extracting a core feature set from the semantic query object, wherein the core feature set includes: namespace features extracted from the namespaceChain field, primary template name features extracted from the primaryTemplate field, template parameter features extracted from the templateArgs field, symbol type features extracted from the symbolType field, and base class features and member features obtained by querying the language server through the sourceLocation field; comparing the extracted core feature set with the matching conditions of each rule in the rule base, calculating the matching degree score of each rule in the rule base; and recalling all rules with matching degree scores exceeding a preset threshold to form a candidate rule set.

[0024] The matching score of each rule in the rule base can be quantified based on the matching results between the core feature set and each rule in the rule base. As an optional implementation, in this embodiment, when calculating the matching score of each rule in the rule base, a set of preset attributes is associated with each rule in the candidate rule set, and each attribute is assigned a basic weight, as shown in Table 1.

[0025] Table 1: Attributes and Basic Weight Configuration of Rules in the Candidate Rule Set

[0026] Based on this, the matching score of each rule in the rule base is calculated as follows: (1) Namespace matching score: The matching degree of the namespace chain is calculated using Jaccard similarity. (2) Main template name matching score: 1.0 for exact match, 0 otherwise. (3) Template parameter quantity matching score: Calculated according to the ratio of quantity difference. (4) Template parameter type matching score: The parameter type of each position is compared one by one, and scores are given according to exact match, category match, wildcard match or no match, and the average value is taken. (5) Symbol type matching score: 1.0 for symbol type in the rule applicable list, 0 otherwise. (6) Structural attribute bonus: 0.05 is added if the current symbol contains a nested template and the rule supports it; 0.05 is added if the current symbol is a template specialization and the rule supports it. (7) Quality attribute score: The document integrity score is dynamically evaluated according to the document source quality; the historical success rate score is mapped to 0~0.15 according to the historical query success rate. The matching scores of each attribute are multiplied by their weights and then weighted and summed to obtain the basic score. In addition, bonus points are added: if the current rule contains nested templates and supports nested templates, add 0.05; if it matches a specific specialization pattern of the rule, add 0.05; if the rule has a document integrity score, add score × 0.1; if the rule has a historical success rate score, add score × 0.15. The final score cannot exceed 1.0. Finally, the rules are sorted from highest to lowest score, and the top K rules with the highest scores are retained (default is 5), while rules with scores below a preset threshold (default is 0.3) are filtered out, forming a high-scoring candidate rule set.

[0027] In this embodiment, the process of filtering and optimizing the extracted candidate rule set using the environment arbitration results of the development environment includes: S301, Extract the version document information of each candidate rule in the candidate rule set, including the version number and a list of supported versions. S302, compare the version document information with the environment arbitration results of the development environment to determine the version compatibility of the candidate rules as fully compatible, partially compatible, approximately matching, incompatible or unknown, and assign corresponding scores according to the version compatibility table to obtain the adaptation score. S303: The code context at the cursor position is used to obtain the weights of the fitness score using a trained weight prediction model. The weights of the candidate rule's fitness score are multiplied by the fitness score, and then summed with the candidate rule's matching score to obtain the comprehensive score of the candidate rule. The candidate rule with the highest comprehensive score is selected as the filtered and optimized rule. If the candidate rule with the highest comprehensive score is empty, a robust guarantee mechanism can be adopted. When there is no compatible rule, a multi-level degradation mechanism can be initiated: find the latest version, use the highest-scoring rule and mark it as high-risk, or trigger general document processing.

[0028] In step S103, when obtaining the weights for the fit score using the trained weight prediction model based on the code context at the cursor, a machine learning-based rule weight adaptive method is adopted. By analyzing successful cases of historical document jumps, the system automatically optimizes the weight configuration of each attribute during the rule matching process. This allows the system to dynamically adjust the matching strategy for different types of code symbols (such as ordinary classes, template specializations, nested templates, etc.) and different development environment versions, thereby improving the accuracy of document jumps. Detailed steps include: Step 1: Collecting historical jump data: Recording the complete context of each document jump during daily use, including: the semantic query object triggered by the jump (including symbol type, main template name, template parameters, namespace, etc.), the environment arbitration result (actual version, declared version), the candidate rule list and its matching degree on each attribute, the finally selected rule, and subsequent user behavior (such as dwell time, whether to continue browsing, whether to close, etc.). This data constitutes the training samples for the machine learning model. Step 2: Labeling the success rate of samples: Labeling the success rate of each jump based on user behavior. If a user stays on the document page for more than 30 seconds and scrolls or copies a code snippet, it is marked as a "successful redirect"; if the user closes the page within 10 seconds or immediately triggers a new query, it is marked as a "failed redirect". Successful and failed samples together constitute the training dataset. Step 3: Train the scenario classification model: Divide historical data into different scenario categories according to the characteristics of the semantic query object (such as symbol type, whether there are nested templates, the number of template parameters, etc.). For each scenario category, train a weight optimization model. The model input is the matching degree of the rule on each attribute, and the output is the predicted redirect success rate. By analyzing the model parameters, it can be determined which attributes contribute most to the redirect success in that scenario. Step 4: Generate scenario-adaptive weights: Based on the trained model, generate a set of optimized attribute weight configurations for each scenario. For example, for the "nested template" scenario, the model may find that the weight of "template parameter type matching degree" should be increased to 0.40, and the weight of "namespace matching degree" should be reduced to 0.10; for the "normal class" scenario, the weight of "symbol type matching degree" is more important. These scenario adaptation weights are stored in the rule base for subsequent matching. Step 5: Dynamic Matching and Weight Loading: When a new document query is initiated, the system first identifies the scenario category of the current query (e.g., whether it is a nested template, whether it is a symbol from a specific library, etc.), and then loads the optimized weight configuration corresponding to that scenario from the rule base for the adaptation score of this rule matching. Step 6: Continuous Iterative Optimization: The model is retrained periodically with newly accumulated data to update the weight configuration of each scenario, enabling the system's matching strategy to adapt to changes in the library document structure and the evolution of user behavior patterns, achieving a self-optimization closed loop.

[0029] In this embodiment, the step of generating the help document URL based on the security encoding of template parameters and URL synthesis according to the optimized rules includes: S401 extracts URL templates from the filtered and optimized rules, and identifies variable placeholders, such as version number `{version}`, namespace `{namespace}`, main template name `{template}`, full specialization path `{fqn}`, template parameters `{args}`, etc. S402, extract the corresponding template parameters from the semantic query object and the environment arbitration result based on the variable placeholders. For example, the namespace is extracted from `namespaceChain`, the primary template name is extracted from `primaryTemplate`, the template parameters are extracted from `templateArgs`, the complete specialization path is extracted from `fullyQualifiedName`, and the version number is extracted from the environment arbitration result. S403 URL-encodes the symbols in the template parameters and then reassembles them into a parameter string in their original order. URL encoding is a well-known encoding method used to achieve URL compatibility. For example, it encodes angle brackets `<` and `>` as `%3C` and `%3E`, encodes commas as `%2C` or replaces them with hyphens, replaces scope delimiters `::` with underscores or forward slashes, and performs recursive encoding on nested templates. S404 converts the complete specialized path into the anchor format expected by the embedded document viewer; for example, it replaces `::` with a period or underscore, removes or encodes angle brackets, adds the anchor prefix `#`, and generates an in-page positioning identifier. S405: Fill the parameter string into the corresponding placeholder in the URL template to obtain the help document URL; for example, if it is an approximate match, add the `?approximate=true` flag. Fill in the version number, namespace, main template name, template parameters, full specialization path, etc. in order to obtain the help document URL; S406 validates the format of the help document URL. The validation items include whether it is correct, whether the encoding conforms to the RFC specification, and whether the length exceeds the limit. If the validation passes, the help document URL is output; otherwise, the process ends and exits, or the specified help document URL is loaded.

[0030] In summary, the help documentation navigation method of the integrated development environment in this embodiment solves the problems of inaccurate and inefficient documentation queries in C / C++ development by implementing a set of deep code semantic analysis and intelligent rule matching methods. It mainly achieves the following effects: (1) Improves the accuracy and relevance of documentation queries. This embodiment, by parsing the complete context information of code identifiers (such as template parameters and namespaces), can accurately distinguish symbols with the same name but different meanings, thereby directly guiding users to the most relevant specific document paragraphs and reducing the time required to filter irrelevant information. (2) Enhances the adaptability to diverse document sources. Through a configurable rule engine, this embodiment can adapt to documents of different organizational forms (such as the C++ standard library, Boost, Qt, etc.) and supports multiple local and remote document sources, solving the problem that a single navigation strategy cannot cope with the diversity of the C++ ecosystem. (3) Ensures consistency between documentation and the code environment. By integrating project configuration information (such as dependency library versions), this embodiment can prioritize selecting documents that match the actual library version used in the current project, avoiding the problem of inconsistent document content and API behavior caused by version mismatch.

[0031] Furthermore, this embodiment also provides a help documentation navigation system for an integrated development environment (IDE), including a microprocessor and a memory interconnected, wherein the microprocessor is programmed or configured to execute the help documentation navigation method of the IDE. This embodiment also provides a computer-readable storage medium storing a computer program or instructions programmed or configured to execute the help documentation navigation method of the IDE via a processor. This embodiment also provides a computer program product including a computer program or instructions programmed or configured to execute the help documentation navigation method of the IDE via a processor.

[0032] Those skilled in the art will understand that the technical solutions provided by this invention may take the form of a method, system, or computer program product. Therefore, this invention may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this invention may take the form of a computer program product embodied on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, produce an implementation of the flowchart... Figure 1 One or more processes and / or boxes Figure 1 The computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The functions specified in one or more boxes. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable apparatus for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0033] The above description is merely a preferred embodiment of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should also be considered within the scope of protection of the present invention.< / int> < / int> < / int> < / int>

Claims

1. A method for navigating to help documentation in an integrated development environment, characterized in that, The steps include: after triggering a user command to query the help documentation in the plugin interface of the integrated development environment, the language server is used to perform deep semantic capture of the code context at the cursor to obtain the semantic query object; The system performs environment arbitration between the declared version of the development environment in the project's build file and the actual version used in the project to obtain the environment arbitration result of the development environment; it uses semantic query objects to query the rule base to extract candidate rule sets, uses the environment arbitration result of the development environment to filter and optimize the extracted candidate rule sets, and generates help document URLs based on the security encoding of template parameters and URL synthesis according to the filtered and optimized rules. The help document URLs are then delivered to the embedded document viewer of the integrated development environment for display output.

2. The method for jumping to help documentation in an integrated development environment according to claim 1, characterized in that, The method of using a language server to perform deep semantic capture of the code context at the cursor position to obtain semantic query objects includes: S101, submit the code context at the cursor position to the language server and retrieve the JSON data returned by the language server; S102, using the semantic response standardization pipeline, performs standardization processing on JSON data, including: extracting the content fields of the JSON data, and stripping HTML or Markdown tags, code highlighting information, and temporary symbol names generated by the compiler from the content fields to obtain a cleaned string; decomposing the cleaned string using a symbol parser with built-in lexical rules and extracting the main template name and template parameter list; generating a structured semantic query object for the cleaned string, wherein the fields of the semantic query object include: fullyQualifiedName, used to uniquely identify the complete semantic path of the code symbol; primaryTemplate, used to store the base template name of the code symbol; templateArgs, used to store the specific parameter list of the template; symbolType, used to identify the type of the code symbol; namespaceChain, used to store the namespace hierarchy of the symbol; and sourceLocation, used to store the precise location information of the symbol in the source code. S103, determine whether the semantic query object points to an intermediate template specialization. The intermediate template specialization refers to a template specialization whose template parameter list contains nested template instances. The judgment condition for the semantic query object pointing to an intermediate template specialization is: check the templateArgs field of the template parameter list of the semantic query object. If any parameter itself contains a template structure, it is determined to be an intermediate template specialization. The template structure includes those containing angle brackets or those that can be resolved to template instances. If the judgment is true, query the complete declaration position of the intermediate template specialization through the language server, recursively trace its parent template chain, substitute the actual parameters of the child template into the parent template to generate a complete specialization path, and update the fullyQualifiedName field of the complete specialization path of the semantic query object to enhance the semantic integrity of the semantic query object.

3. The method for jumping to help documentation in an integrated development environment according to claim 2, characterized in that, Step S103, which involves performing static reasoning based on finite queries to enhance the specialization path of the semantic query object, includes: S201, Send a request to the language server to obtain the declaration location of the semantic query object; S202, extract the template declaration in the declaration position as the current template declaration, and extract the template parameters of the current template declaration; S203, determine whether the current template declaration has a parent template. If a parent template exists, substitute the template parameters of the current template declaration into the parent template of the current template declaration, and update the complete specialization path fullyQualifiedName of the semantic query object: first, establish a mapping relationship from the formal parameters of the parent template to the actual parameters of the child template; then, instantiate the parent template according to this mapping, generate the specialization instance string of the parent template; finally, integrate the instance of the parent template with the current complete specialization path and update it to the form "parent template specialization::current specialization path"; after the update is completed, use the parent template as the new current template declaration and jump to step S204; otherwise, jump to step S205; S204, determine whether the recursion depth of the current template declaration is equal to the preset maximum depth. If it is equal to the preset maximum depth, jump to step S205; otherwise, take the parent template of the current template declaration as the new current template declaration and jump to step S203. S205 outputs the updated semantic query object.

4. The method for jumping to help documentation in an integrated development environment according to claim 1, characterized in that, The process of obtaining an environment arbitration result for the development environment by comparing the declared version of the project in the build file with the actual version used in the project includes: determining whether the actual version used in the project is an API-compatible subset of the declared version based on pre-defined or online-updateable compatibility rules; if the determination is true, the actual version used in the project is taken as the environment arbitration result for the development environment and marked as an exact match; if the determination is false, the following compatibility degradation strategy is executed: finding the most functionally similar and usable compatible version, if it exists, taking that version as the environment arbitration result and marking it as an approximate match, while generating an interactive report containing detailed conflict comparisons for developers to refer to; if no compatible version is available, taking the declared version as the environment arbitration result and marking it as a high-risk approximate match, while prominently warning in the report; the generated interactive report contains multiple remediation options for developers to choose from, including: upgrading the actual version to the declared version, downgrading the declared version to the actual version, selecting the most recent compatible version for approximate matching, and manual processing options.

5. The method for jumping to help documentation in an integrated development environment according to claim 1, characterized in that, The step of extracting candidate rule sets from the semantic query object query rule base includes: extracting a core feature set from the semantic query object, wherein the core feature set includes: namespace features extracted from the namespaceChain field, primary template name features extracted from the primaryTemplate field, template parameter features extracted from the templateArgs field, symbol type features extracted from the symbolType field, and base class features and member features obtained by querying the language server through the sourceLocation field; comparing the extracted core feature set with the matching conditions of each rule in the rule base, calculating the matching degree score of each rule in the rule base; and recalling all rules with matching degree scores exceeding a preset threshold to form a candidate rule set.

6. The method for jumping to help documentation in an integrated development environment according to claim 5, characterized in that, The step of using the environmental arbitration results of the development environment to filter and optimize the extracted candidate rule set includes: S301, Extract the version document information of each candidate rule in the candidate rule set, including the version number and a list of supported versions. S302, compare the version document information with the environment arbitration results of the development environment to determine the version compatibility of the candidate rules as fully compatible, partially compatible, approximately matching, incompatible or unknown, and assign corresponding scores according to the version compatibility table to obtain the fit score. S303: The code context at the cursor position is used to obtain the weight of the fitness score using the trained weight prediction model. The weight of the fitness score of the candidate rule is multiplied by the fitness score, and then summed with the matching score of the candidate rule to obtain the comprehensive score of the candidate rule. The candidate rule with the highest comprehensive score is selected as the filtered and optimized rule.

7. The method for jumping to help documentation in an integrated development environment according to claim 1, characterized in that, The process of generating the help document URL based on the template parameters through secure encoding and URL synthesis according to the optimized rules includes: S401, extract URL templates from the filtered and optimized rules, and identify variable placeholders within them; S402, extract the corresponding template parameters from the semantic query object and the environmental arbitration result based on the variable placeholders; S403 URL-encodes the symbols in the template parameters and then reassembles them into a parameter string in their original order; S404 converts the complete specialized path into the anchor format expected by the embedded document viewer; S405, fill the parameter string into the corresponding placeholder in the URL template to obtain the help document URL; S406 validates the format of the help document URL. The validation items include whether it is correct, whether the encoding conforms to the RFC specification, and whether the length exceeds the limit. If the validation passes, the help document URL is output; otherwise, the process ends and exits, or the specified help document URL is loaded.

8. A help documentation navigation system for an integrated development environment, comprising a microprocessor and a memory interconnected, characterized in that, The microprocessor is programmed or configured to execute the help documentation navigation method of the integrated development environment according to any one of claims 1 to 7.

9. A computer-readable storage medium storing a computer program or instructions, characterized in that, The computer program or instructions are programmed or configured to execute, via a processor, the help documentation jump method of the integrated development environment as described in any one of claims 1 to 7.

10. A computer program product, comprising a computer program or instructions, characterized in that, The computer program or instructions are programmed or configured to execute, via a processor, the help documentation jump method of the integrated development environment as described in any one of claims 1 to 7.