An API automatic calling method for device after-sales support and a related device
By combining named entity recognition algorithms, the GPT-4o model, and the HNSW algorithm, the system automatically identifies user intent and calls the video conferencing device API, solving the problem of manual reliance in existing technologies and achieving efficient after-sales support.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- DTEN TECH CORP LTD HANGZHOU
- Filing Date
- 2026-01-27
- Publication Date
- 2026-06-05
AI Technical Summary
Existing after-sales support for video conferencing equipment relies on human customer service, which is inefficient and prone to errors. Intelligent customer service systems lack the knowledge data and APIs for handling problems with video conferencing equipment and cannot operate the equipment automatically.
The system employs named entity recognition algorithms and the GPT-4o model for intent recognition and operation plan analysis, and combines the hierarchical navigation small world graph (HNSW) algorithm for context retrieval to automatically determine and invoke the target API of the video conferencing device.
It achieves full automation from user input to API execution, reducing manual intervention, lowering labor costs, improving the efficiency of after-sales work order processing, and ensuring that problems are resolved quickly and accurately.
Smart Images

Figure CN122152552A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to an API automatic invocation method and related apparatus for after-sales support of equipment. Background Technology
[0002] With the widespread adoption of video conferencing equipment, enterprises are increasingly demanding higher efficiency and quality in their after-sales support. Currently, after-sales support for video conferencing equipment typically relies on human customer service representatives. Users submit text-based descriptions of their problems through a ticketing system, and customer service personnel must manually read the ticket content, understand the user's intent, and decide whether remote equipment operation for troubleshooting, configuration adjustments, or feature activation is necessary, or whether a chatbot can be used to allow users to ask questions and perform operations.
[0003] For example, a common approach in existing technologies is that after a user asks a question to a customer service robot, the robot often requires human intervention and manual operation. This method is not only inefficient and prone to errors, but also cannot automatically help users operate and solve problems. Although many companies in the industry have launched intelligent customer service systems, these systems typically lack the knowledge data for handling problems with video conferencing equipment, as well as the internal APIs of video conferencing equipment, making it impossible to operate the equipment. Summary of the Invention
[0004] The purpose of this invention is to overcome the shortcomings of the prior art. This invention provides an API automatic calling method and related device for equipment after-sales support, which realizes full automation from user input to API execution, reduces manual intervention, greatly reduces labor costs, and improves the efficiency of after-sales work order processing.
[0005] To address the aforementioned technical problems, this invention provides an automatic API invocation method for equipment after-sales support, the method comprising: The system acquires user input text and performs intent recognition on the input text based on a named entity recognition algorithm to obtain target intent information. The target intent information is retrieved by performing contextual retrieval based on the Hierarchical Navigation Small World Graph (HNSW) algorithm to obtain retrieval context information. Based on the target intent information and retrieval context information, the GPT-4o model is used to perform operation plan analysis to obtain the target operation plan; Based on the target operation plan, the target API of the video conferencing device is determined and the target API is invoked.
[0006] Optionally, the step of performing intent recognition on the input text based on the named entity recognition algorithm to obtain target intent information includes: The input text is analyzed for the number of intents based on the GPT-4o model to obtain intent count information; Based on the number of intents, the input text is analyzed using a named entity recognition algorithm to obtain intent category information, and the target intent information is determined based on the number of intents and the intent category information.
[0007] Optionally, the step of performing intent category analysis on the input text using a named entity recognition algorithm based on the intent count information to obtain intent category information includes: The input text is identified based on the named entity recognition algorithm to obtain key entity information. Based on the number of intents, the key entity information is used to perform intent category analysis to obtain intent category information.
[0008] Optionally, the step of performing contextual retrieval on the target intent information based on the hierarchical navigation small-world graph (HNSW) algorithm to obtain retrieval context information includes: Build a document vector database; The target intent information is vectorized based on the embedding model to obtain the target intent vector. The HNSW algorithm is used to perform contextual retrieval in the document vector database using the target intent vector to obtain retrieval context information.
[0009] Optionally, constructing the document vector database includes: Obtain historical work order documents and preprocess them to obtain preprocessed historical work order documents; The preprocessed historical work order documents are vectorized based on the text-embedding-ada-002 model to obtain vectorized historical work order documents. A document vector database is constructed based on the vectorized historical work order documents.
[0010] Optionally, the step of performing operation plan analysis using the GPT-4o model based on the target intent information and retrieval context information to obtain the target operation plan includes: Calling the GPT-4o model based on the OpenAI application programming interface; The target intent information and retrieval context information are input into the GPT-4o model for operation plan analysis to obtain the target operation plan.
[0011] Optionally, determining the target API of the video conferencing device based on the target operation plan and invoking the target API includes: The target operation plan is scored with confidence to obtain the target confidence level of the target operation plan, and it is determined whether the target confidence level is greater than or equal to a preset threshold. If the target confidence level is determined to be greater than or equal to a preset threshold, the target API of the video conferencing device is determined based on the target operation plan. The name information of the target API is determined, and the name information is mapped to the target function corresponding to the target API based on the reflection mechanism. The target API is then called using the target function based on the dynamic function scheduler.
[0012] In addition, the present invention also provides an API automatic invocation device for equipment after-sales support, the device comprising: Intent recognition module: used to acquire user input text and perform intent recognition on the input text based on named entity recognition algorithm to obtain target intent information; Context retrieval module: used to perform context retrieval on the target intent information based on the Hierarchical Navigation Small World Graph (HNSW) algorithm to obtain retrieval context information; Operation plan analysis module: used to perform operation plan analysis based on the target intent information and retrieval context information using the GPT-4o model to obtain the target operation plan; AIP Execution Module: Used to determine the target API of the video conferencing device based on the target operation plan, and to call the target API.
[0013] In addition, the present invention also provides an electronic device, the electronic device including a processor and a memory, the memory being used to store instructions, and the processor being used to call the instructions in the memory, so that the electronic device executes the above-described API automatic call method for device after-sales support.
[0014] In addition, the present invention provides a computer-readable storage medium that stores computer instructions that, when executed on an electronic device, cause the electronic device to perform the above-described API automatic invocation method for device after-sales support.
[0015] In this embodiment of the invention, the named entity recognition algorithm is used to perform intent recognition on the user's input text, which improves the accuracy and granularity of intent recognition. The HNSW algorithm is used to perform contextual retrieval of the target intent information to obtain retrieval context information. Based on the target intent information and retrieval context information, the GPT-4o model is used for operation plan analysis, improving the reliability of the operation plan analysis. Based on the target operation plan, the target API of the video conferencing device is determined and executed, achieving full automation from user input to API execution, reducing manual intervention, significantly lowering labor costs, improving after-sales work order processing efficiency, and making problem solving faster and more accurate. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a flowchart illustrating the API automatic invocation method for equipment after-sales support in an embodiment of the present invention. Figure 2 This is a flowchart illustrating an API automatic invocation method for equipment after-sales support according to another embodiment of the present invention. Figure 3 This is a schematic diagram of the structure of the API automatic call device for equipment after-sales support in an embodiment of the present invention; Figure 4 This is a schematic diagram of the structural composition of the electronic device in an embodiment of the present invention. Detailed Implementation
[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] Example 1 Please see Figure 1 , Figure 1 This is a flowchart illustrating an API automatic invocation method for device after-sales support according to an embodiment of the present invention. The method includes: S11: Obtain the user's input text, and perform intent recognition on the input text based on the named entity recognition algorithm to obtain target intent information; In the specific implementation of this invention, the input text is analyzed for the number of intents based on the GPT-4o model to obtain intent count information; the input text is analyzed for intent category based on the intent count information using a named entity recognition algorithm to obtain intent category information; and the target intent information is determined based on the intent count information and intent category information, making intent judgment more specific and accurate.
[0020] S12: Contextual retrieval of the target intent information is performed based on the Hierarchical Navigation Small World Graph (HNSW) algorithm to obtain retrieval context information; In the specific implementation of this invention, a document vector database is constructed; the target intent information is vectorized based on the embedding model to obtain the target intent vector; the target intent vector is used to perform contextual retrieval in the document vector database based on the Hierarchical Navigable Small World (HNSW) algorithm to obtain retrieval context information, which can find the required contextual retrieval information more quickly and accurately.
[0021] S13: Based on the target intent information and retrieval context information, the GPT-4o model is used to perform operation plan analysis to obtain the target operation plan; In the specific implementation of this invention, the GPT-4o model is called based on the OpenAI application programming interface; the target intent information and retrieval context information are input into the GPT-4o model for operation plan analysis to obtain the target operation plan, thus achieving a more reliable operation plan analysis.
[0022] S14: Determine the target API of the video conferencing device based on the target operation plan, and call the target API.
[0023] In the specific implementation of this invention, the target operation plan is scored with confidence to obtain the target confidence level of the target operation plan, and it is determined whether the target confidence level is greater than or equal to a preset threshold. If it is determined that the target confidence level is greater than or equal to the preset threshold, the target application programming interface (API) of the video conferencing device is determined based on the target operation plan. The name information of the target API is determined, and the name information is mapped to the target function corresponding to the target API based on the reflection mechanism. The target API is called using the target function based on the dynamic function scheduler, so that the result of intelligent analysis is implemented into real device control actions, and true automated operation is achieved.
[0024] In this embodiment of the invention, the named entity recognition algorithm is used to perform intent recognition on the user's input text, which improves the accuracy and granularity of intent recognition. The HNSW algorithm is used to perform contextual retrieval of the target intent information to obtain retrieval context information. Based on the target intent information and retrieval context information, the GPT-4o model is used for operation plan analysis, improving the reliability of the operation plan analysis. Based on the target operation plan, the target API of the video conferencing device is determined and executed, achieving full automation from user input to API execution, reducing manual intervention, significantly lowering labor costs, improving after-sales work order processing efficiency, and making problem solving faster and more accurate.
[0025] Example 2 Please see Figure 2 , Figure 2 This is a flowchart illustrating an automatic API invocation method for device after-sales support according to another embodiment of the present invention, the method comprising: S201: Obtain the user's input text, and perform intent count analysis on the input text based on the GPT-4o model to obtain intent count information; In the specific implementation of this invention, the user's input text is obtained. This input text is a text work order entered by the user on the after-sales platform of the video conferencing equipment, such as "Upgrade my device system to the latest version." The input text is then processed using the GPT-4o model to analyze the number of intents, obtaining intent count information. The GPT-4o model is a multimodal language model that uses an end-to-end neural network architecture to achieve unified processing of cross-modal information. It can accept any combination of text, audio, images, and video as input and generate corresponding outputs, enabling full-modal interaction. The input text is fed into the GPT-4o model using its classification capabilities. The GPT-4o model maps the input text to a preset intent count category, such as 0 intents, 1 intent, or multiple intents.
[0026] S202: Based on the number of intents information, the input text is analyzed for intent categories using a named entity recognition algorithm to obtain intent category information, and the target intent information is determined based on the number of intents information and the intent category information; In a specific implementation of the present invention, the step of performing intent category analysis on the input text using a named entity recognition algorithm based on the intent count information to obtain intent category information includes: performing key entity recognition on the input text based on the named entity recognition algorithm to obtain key entity information; and performing intent category analysis using the key entity information based on the intent count information to obtain intent category information.
[0027] Specifically, the input text is subjected to key entity recognition based on the named entity recognition algorithm to obtain key entity information. The named entity recognition algorithm is an algorithm that identifies key entities in the input text, such as device model, configuration parameters, API name, etc. The named entity recognition algorithm can use a corresponding neural network to perform named entity recognition.
[0028] Based on the number of intents, intent category analysis is performed using the key entity information to obtain intent category information. The key entity information is then mapped to a predefined intent category table based on the number of intents, determining the intent category corresponding to the number of intents, such as device management, configuration change, system upgrade, etc. Combining key entity category analysis with intent determination makes intent judgment more specific and accurate. The target intent information is then determined based on the number of intents and the intent category information; that is, the target intent information is composed of the number of intents and the intent category information.
[0029] S203: Construct a document vector database; In the specific implementation of this invention, the construction of the document vector database includes: obtaining historical work order documents and preprocessing the historical work order documents to obtain preprocessed historical work order documents; vectorizing the preprocessed historical work order documents based on the text-embedding-ada-002 model to obtain vectorized historical work order documents; and constructing a document vector database based on the vectorized historical work order documents.
[0030] Specifically, historical work order documents are obtained, which are previously entered work order documents. These historical work order documents are then preprocessed to obtain preprocessed historical work order documents. Preprocessing includes cleaning, word segmentation, stop word removal, and using regular expressions to extract structured fields such as device model, error code, and API name.
[0031] The preprocessed historical work order documents are vectorized using the text-embedding-ada-002 model, resulting in vectorized historical work order documents. This involves using OpenAI's text-embedding-ada-002 model for text embedding, converting the preprocessed historical work order documents into 1536-dimensional vectors. The text-embedding-ada-002 model is part of OpenAI's large-scale language model series. This embedding model converts text (such as words, phrases, or entire paragraphs) into numerical vectors, enabling computers to process and understand natural language. A document vector database is then constructed based on the vectorized historical work order documents, storing them in the corresponding database to form the document vector database.
[0032] S204: Vectorize the target intent information based on the embedding model to obtain the target intent vector; In the specific implementation of this invention, the target intent information is vectorized based on the embedding model to obtain the target intent vector. The embedding model is a model that maps high-dimensional, discrete or unstructured data to a continuous vector space. The intent text information in the target intent information is vectorized through the embedding model to obtain the target intent vector.
[0033] S205: Based on the HNSW algorithm, the target intent vector is used to perform contextual retrieval in the document vector database to obtain retrieval context information; In the specific implementation of this invention, the target intent vector is used to perform context retrieval in the document vector database based on the HNSW algorithm to obtain retrieval context information. The document fragment most similar to the target intent vector is retrieved from the document vector database using the HNSW algorithm as the context, which is the retrieval context information. The HNSW algorithm is a graph-based approximate nearest neighbor search method, mainly used to efficiently find the approximate nearest neighbor most similar to the query vector in large-scale vector data. It optimizes the high computational cost of exact nearest neighbor search from linear complexity to logarithmic level by constructing a hierarchical graph index, thus supporting real-time retrieval. Its core principle lies in the hierarchical graph structure and neighbor selection strategy. Its graph structure adopts a hierarchical small-world network, with the bottom layer representing local details of the data and the upper layer providing global navigation paths. This design allows the search process to quickly drill down from the top to the bottom, reducing the number of distance calculations. When constructing the graph, HNSW uses a probabilistic hierarchical strategy to determine the number of layers of nodes and connects nearest neighbors at each layer through greedy search. Simultaneously, a neighbor selection heuristic algorithm is introduced to avoid connection bias in clustered data, enhancing the connectivity of the graph. By combining document vectorization and retrieval techniques, real-time and relevant knowledge support is provided to the model. Specifically, by integrating OpenAI embedding model vectorization and the HNSW retrieval algorithm, real-time and relevant knowledge support is provided to the GPT-4o model, improving response accuracy.
[0034] S206: Based on the target intent information and retrieval context information, perform operation plan analysis using the GPT-4o model to obtain the target operation plan; In the specific implementation of this invention, the step of performing operation plan analysis using the GPT-4o model based on the target intent information and retrieval context information to obtain the target operation plan includes: calling the GPT-4o model based on the OpenAI application programming interface; inputting the target intent information and retrieval context information into the GPT-4o model to perform operation plan analysis to obtain the target operation plan.
[0035] Specifically, the GPT-4o model is called based on the OpenAI application programming interface. The parameters of the GPT-4o model can be set to include max_tokens=500 and temperature=0.7. The target intent information and retrieval context information are input into the GPT-4o model for action plan analysis to obtain the target action plan. This target action plan is a structured text format action plan, including the action type, API name, and parameter list. The GPT-4o model is used to generate the action plan. Prompt engineering guides the model to output structured text content. Prompt engineering is a technique that guides the model to create the required content through carefully designed prompts. The core challenge of prompt engineering lies in how to accurately construct these prompts so that the model can accurately capture the user's intent and needs, thereby outputting high-quality results.
[0036] S207: Determine the target API of the video conferencing device based on the target operation plan, and call the target API.
[0037] In a specific implementation of this invention, determining the target API of the video conferencing device based on the target operation plan and calling the target API includes: scoring the target operation plan with confidence to obtain the target confidence of the target operation plan, and determining whether the target confidence is greater than or equal to a preset threshold; if the target confidence is determined to be greater than or equal to the preset threshold, then determining the target API of the video conferencing device based on the target operation plan; determining the name information of the target API, mapping the name information to the target function corresponding to the target API based on a reflection mechanism, and calling the target API using the target function based on a dynamic function scheduler.
[0038] Specifically, the target operation plan is scored to obtain its target confidence level. Open AI is used to compare the semantic similarity between the generated target operation plan and the knowledge base. Field completeness is assessed to check if all required fields are present, resulting in a field completeness score. The semantic similarity and field completeness scores are weighted and summed to obtain the target confidence level. The target confidence level is then checked against a preset threshold (e.g., 0.8). If the target confidence level is below the preset threshold, the target operation plan is transferred to manual processing. Simultaneously, a parsing verification algorithm based on regular expressions and JSON schema can be used to verify the target operation plan and extract key fields. If the model outputs invalid JSON, a retry or manual transfer is initiated.
[0039] If the target confidence level is determined to be greater than or equal to a preset threshold, the target API of the video conferencing device is determined based on the target operation plan. The target operation plan contains the operation type and API name, so the required API can be quickly determined through the target operation plan.
[0040] The process involves determining the name of the target API and mapping it to the corresponding target function using reflection. First, the function's existence is verified, then its registration in the registry is checked. The actual parameters are compared with the expected number of parameters, and conversion is performed based on the registered type information. This process maps the API name to a specific function via reflection. A dynamic function scheduler then calls the target API using the target function. This scheduler adheres to RESTful specifications and supports OAuth 2.0 authentication, ensuring API call security. Compared to manual processing, the response time for this API call is reduced from an average of 2 hours to within 3 minutes, improving ticket processing efficiency by over 90%, reducing customer service manpower, and is expected to reduce after-sales support costs by over 40%. Users no longer need to wait for manual responses, resulting in faster and more accurate problem resolution.
[0041] In this embodiment of the invention, the named entity recognition algorithm is used to perform intent recognition on the user's input text, which improves the accuracy and granularity of intent recognition. The HNSW algorithm is used to perform contextual retrieval of the target intent information to obtain retrieval context information. Based on the target intent information and retrieval context information, the GPT-4o model is used for operation plan analysis, improving the reliability of the operation plan analysis. Based on the target operation plan, the target API of the video conferencing device is determined and executed, achieving full automation from user input to API execution, reducing manual intervention, significantly lowering labor costs, improving after-sales work order processing efficiency, and making problem solving faster and more accurate.
[0042] Example 3 Please see Figure 3 , Figure 3 This is a schematic diagram of the structural composition of an API automatic invocation device for equipment after-sales support according to an embodiment of the present invention. The device includes: Intent recognition module 31: used to acquire the user's input text and perform intent recognition on the input text based on the named entity recognition algorithm to obtain target intent information; In a specific implementation of the present invention, the step of performing intent recognition on the input text based on the named entity recognition algorithm to obtain target intent information includes: performing intent count analysis on the input text based on the GPT-4o model to obtain intent count information; performing intent category analysis on the input text based on the intent count information using the named entity recognition algorithm to obtain intent category information; and determining target intent information based on the intent count information and intent category information.
[0043] Specifically, the process involves acquiring the user's input text, which is a text work order entered by the user on the after-sales platform of the video conferencing equipment, such as "Upgrade my device system to the latest version." The input text is then processed using the GPT-4o model to analyze the number of intents, obtaining intent count information. The GPT-4o model is a multimodal language model that employs an end-to-end neural network architecture, enabling unified processing of cross-modal information. It can accept any combination of text, audio, images, and video as input and generate corresponding outputs, achieving full-modal interaction. The input text is fed into the GPT-4o model using its classification capabilities. The GPT-4o model maps the input text to a preset intent count category, such as 0 intents, 1 intent, or multiple intents.
[0044] Based on the number of intents, the input text is analyzed using a named entity recognition algorithm to obtain intent category information. The named entity recognition algorithm can identify entity information in the input text, determine the intent category based on the entity information and the number of intents, and determine the target intent information based on the number of intents and the intent category information. That is, the target intent information is composed of the number of intents and the intent category information.
[0045] Furthermore, the step of performing intent category analysis on the input text using a named entity recognition algorithm based on the intent count information to obtain intent category information includes: performing key entity recognition on the input text based on the named entity recognition algorithm to obtain key entity information; and performing intent category analysis using the key entity information based on the intent count information to obtain intent category information.
[0046] Specifically, the input text is subjected to key entity recognition based on the named entity recognition algorithm to obtain key entity information. The named entity recognition algorithm is an algorithm that identifies key entities in the input text, such as device model, configuration parameters, API name, etc. The named entity recognition algorithm can use a corresponding neural network to perform named entity recognition.
[0047] Based on the number of intents, the key entity information is used to perform intent category analysis to obtain intent category information. The key entity information is then mapped to a predefined intent category table according to the number of intents to determine the intent category corresponding to the number of intents, such as device management, configuration change, system upgrade, etc. Combining key entities for category analysis can make intent judgment more specific and accurate.
[0048] Context retrieval module 32: used to perform context retrieval on the target intent information based on the hierarchical navigation small-world graph HNSW algorithm to obtain retrieval context information; In the specific implementation of this invention, the step of performing contextual retrieval of the target intent information based on the hierarchical navigation small-world graph (HNSW) algorithm to obtain retrieval context information includes: constructing a document vector database; vectorizing the target intent information based on an embedding model to obtain a target intent vector; and using the target intent vector in the document vector database based on the HNSW algorithm to obtain retrieval context information.
[0049] Specifically, a document vector database is constructed by acquiring historical work order documents. The target intent information is then vectorized using an embedding model to obtain a target intent vector. An embedding model is a model that maps high-dimensional, discrete, or unstructured data to a continuous vector space. The embedding model is used to vectorize the intent text information within the target intent information to obtain the target intent vector.
[0050] The HNSW algorithm utilizes the target intent vector to perform contextual retrieval in a document vector database, obtaining retrieval context information. This is achieved by retrieving the document fragment most similar to the target intent vector from the document vector database using the HNSW algorithm as the context. The HNSW algorithm is a graph-based approximate nearest neighbor search method, primarily used to efficiently find the most similar approximate nearest neighbor to the query vector in large-scale vector data. It optimizes the high computational cost of exact nearest neighbor search from linear complexity to logarithmic level by constructing a hierarchical graph index, thus supporting real-time retrieval. Its core principle lies in the hierarchical graph structure and neighbor selection strategy. The graph structure employs a hierarchical small-world network, with the bottom layer representing local details of the data and the upper layer providing global navigation paths. This design allows the search process to quickly drill down from the top to the bottom, reducing the number of distance calculations. When constructing the graph, HNSW uses a probabilistic hierarchical strategy to determine the number of layers for nodes and connects nearest neighbors at each layer through greedy search. Simultaneously, a neighbor selection heuristic algorithm is introduced to avoid connection bias in clustered data, enhancing graph connectivity. Combined with document vectorization and retrieval techniques, it provides real-time and relevant knowledge support for the model. By combining OpenAI embedding model vectorization and HNSW retrieval algorithm, real-time and relevant knowledge support is provided for the GPT-4o model, improving response accuracy.
[0051] Furthermore, the construction of the document vector database includes: acquiring historical work order documents, preprocessing the historical work order documents to obtain preprocessed historical work order documents; vectorizing the preprocessed historical work order documents based on the text-embedding-ada-002 model to obtain vectorized historical work order documents; and constructing a document vector database based on the vectorized historical work order documents.
[0052] Specifically, historical work order documents are obtained, which are previously entered work order documents. These historical work order documents are then preprocessed to obtain preprocessed historical work order documents. Preprocessing includes cleaning, word segmentation, stop word removal, and using regular expressions to extract structured fields such as device model, error code, and API name.
[0053] The preprocessed historical work order documents are vectorized using the text-embedding-ada-002 model, resulting in vectorized historical work order documents. This involves using OpenAI's text-embedding-ada-002 model for text embedding, converting the preprocessed historical work order documents into 1536-dimensional vectors. The text-embedding-ada-002 model is part of OpenAI's large-scale language model series. This embedding model converts text (such as words, phrases, or entire paragraphs) into numerical vectors, enabling computers to process and understand natural language. A document vector database is then constructed based on the vectorized historical work order documents, storing them in the corresponding database to form the document vector database.
[0054] Operation plan analysis module 33: used to perform operation plan analysis based on the target intent information and retrieval context information using the GPT-4o model to obtain the target operation plan; In the specific implementation of this invention, the step of performing operation plan analysis using the GPT-4o model based on the target intent information and retrieval context information to obtain the target operation plan includes: calling the GPT-4o model based on the OpenAI application programming interface; inputting the target intent information and retrieval context information into the GPT-4o model to perform operation plan analysis to obtain the target operation plan.
[0055] Specifically, the GPT-4o model is called based on the OpenAI application programming interface. The parameters of the GPT-4o model can be set to include max_tokens=500 and temperature=0.7. The target intent information and retrieval context information are input into the GPT-4o model for action plan analysis to obtain the target action plan. This target action plan is a structured text format action plan, including the action type, API name, and parameter list. The GPT-4o model is used to generate the action plan. Prompt engineering guides the model to output structured text content. Prompt engineering is a technique that guides the model to create the required content through carefully designed prompts. The core challenge of prompt engineering lies in how to accurately construct these prompts so that the model can accurately capture the user's intent and needs, thereby outputting high-quality results.
[0056] AIP execution module 34: used to determine the target API of the video conferencing device based on the target operation plan, and to call the target API.
[0057] In a specific implementation of this invention, determining the target API of the video conferencing device based on the target operation plan and calling the target API includes: scoring the target operation plan with confidence to obtain the target confidence of the target operation plan, and determining whether the target confidence is greater than or equal to a preset threshold; if the target confidence is determined to be greater than or equal to the preset threshold, then determining the target API of the video conferencing device based on the target operation plan; determining the name information of the target API, mapping the name information to the target function corresponding to the target API based on a reflection mechanism, and calling the target API using the target function based on a dynamic function scheduler.
[0058] Specifically, the target operation plan is scored to obtain its target confidence level. Open AI is used to compare the semantic similarity between the generated target operation plan and the knowledge base. Field completeness is assessed to check if all required fields are present, resulting in a field completeness score. The semantic similarity and field completeness scores are weighted and summed to obtain the target confidence level. The target confidence level is then checked against a preset threshold (e.g., 0.8). If the target confidence level is below the preset threshold, the target operation plan is transferred to manual processing. Simultaneously, a parsing verification algorithm based on regular expressions and JSON schema can be used to verify the target operation plan and extract key fields. If the model outputs invalid JSON, a retry or manual transfer is initiated.
[0059] If the target confidence level is determined to be greater than or equal to a preset threshold, the target API of the video conferencing device is determined based on the target operation plan. The target operation plan contains the operation type and API name, so the required API can be quickly determined through the target operation plan.
[0060] The process involves determining the name of the target API and mapping it to the corresponding target function using reflection. First, the function's existence is verified, then its registration in the registry is checked. The actual parameters are compared with the expected number of parameters, and conversion is performed based on the registered type information. This process maps the API name to a specific function via reflection. A dynamic function scheduler then calls the target API using the target function. This scheduler adheres to RESTful specifications and supports OAuth 2.0 authentication, ensuring API call security. Compared to manual processing, the response time for this API call is reduced from an average of 2 hours to within 3 minutes, improving ticket processing efficiency by over 90%, reducing customer service manpower, and is expected to reduce after-sales support costs by over 40%. Users no longer need to wait for manual responses, resulting in faster and more accurate problem resolution.
[0061] In this embodiment of the invention, the named entity recognition algorithm is used to perform intent recognition on the user's input text, which improves the accuracy and granularity of intent recognition. The HNSW algorithm is used to perform contextual retrieval of the target intent information to obtain retrieval context information. Based on the target intent information and retrieval context information, the GPT-4o model is used for operation plan analysis, improving the reliability of the operation plan analysis. Based on the target operation plan, the target API of the video conferencing device is determined and executed, achieving full automation from user input to API execution, reducing manual intervention, significantly lowering labor costs, improving after-sales work order processing efficiency, and making problem solving faster and more accurate.
[0062] This invention provides a computer-readable storage medium storing a computer program. When executed by a processor, this program implements the API automatic invocation method for device after-sales support as described in any of the above embodiments. The computer-readable storage medium includes, but is not limited to, any type of disk (including floppy disks, hard disks, optical disks, CD-ROMs, and magneto-optical disks), ROM (Read-Only Memory), RAM (Random Access Memory), EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory, magnetic cards, or optical cards. In other words, the storage device includes any medium that stores or transmits information in a readable form by a device (e.g., a computer, a mobile phone), and can be a read-only memory, a disk, or an optical disk, etc.
[0063] Example 4 Please see Figure 4 , Figure 4 This is a schematic diagram of the structural composition of the electronic device in an embodiment of the present invention.
[0064] This invention also provides an electronic device, such as... Figure 4 As shown, the electronic device includes a memory 41, a processor 43, and a computer program 42 stored in the memory 41 and executable on the processor 43. Those skilled in the art will understand that... Figure 4The illustrated electronic device does not constitute a limitation on all devices and may include more or fewer components than illustrated, or combine certain components. Memory 41 can be used to store computer program 42 and various functional modules. Processor 43 runs the computer program 42 stored in memory 41, thereby performing various functional applications and data processing of the device. Memory can be internal memory or external memory, or both. Internal memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), flash memory, or random access memory. External memory may include hard disks, floppy disks, ZIP disks, USB flash drives, magnetic tapes, etc. Processor 43 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor, a single-chip microcomputer, or a processor 43, or any conventional processor, etc. The processors and memories disclosed in this invention include, but are not limited to, these types of processors and memories. The processors and memories disclosed in this invention are merely examples and not intended to be limiting.
[0065] As one embodiment, the electronic device includes: one or more processors 43, a memory 41, and one or more computer programs 42, wherein the one or more computer programs 42 are stored in the memory 41 and configured to be executed by the one or more processors 43, and the one or more computer programs 42 are configured to execute the API automatic invocation method for device after-sales support in any of the above embodiments. For specific implementation details, please refer to the above embodiments, which will not be repeated here.
[0066] In this embodiment of the invention, the named entity recognition algorithm is used to perform intent recognition on the user's input text, which improves the accuracy and granularity of intent recognition. The HNSW algorithm is used to perform contextual retrieval of the target intent information to obtain retrieval context information. Based on the target intent information and retrieval context information, the GPT-4o model is used for operation plan analysis, improving the reliability of the operation plan analysis. Based on the target operation plan, the target API of the video conferencing device is determined and executed, achieving full automation from user input to API execution, reducing manual intervention, significantly lowering labor costs, improving after-sales work order processing efficiency, and making problem solving faster and more accurate.
[0067] Furthermore, the above provides a detailed description of an API automatic invocation method and related apparatus for equipment after-sales support provided by the embodiments of the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for automatically invoking APIs for after-sales support of equipment, characterized in that, The method includes: The system acquires user input text and performs intent recognition on the input text based on a named entity recognition algorithm to obtain target intent information. The target intent information is retrieved by performing contextual retrieval based on the Hierarchical Navigation Small World Graph (HNSW) algorithm to obtain retrieval context information. Based on the target intent information and retrieval context information, the GPT-4o model is used to perform operation plan analysis to obtain the target operation plan; Based on the target operation plan, the target API of the video conferencing device is determined and the target API is invoked.
2. The API automatic invocation method for equipment after-sales support according to claim 1, characterized in that, The process of performing intent recognition on the input text based on the named entity recognition algorithm to obtain target intent information includes: The input text is analyzed for the number of intents based on the GPT-4o model to obtain intent count information; Based on the number of intents, the input text is analyzed using a named entity recognition algorithm to obtain intent category information, and the target intent information is determined based on the number of intents and the intent category information.
3. The API automatic invocation method for equipment after-sales support according to claim 2, characterized in that, The step of using a named entity recognition algorithm to analyze the input text based on the number of intents to obtain intent category information includes: The input text is identified based on the named entity recognition algorithm to obtain key entity information. Based on the number of intents, the key entity information is used to perform intent category analysis to obtain intent category information.
4. The API automatic invocation method for equipment after-sales support according to claim 1, characterized in that, The Hierarchical Navigation Small World Graph (HNSW) algorithm performs contextual retrieval on the target intent information to obtain retrieval contextual information, including: Build a document vector database; The target intent information is vectorized based on the embedding model to obtain the target intent vector. The HNSW algorithm is used to perform contextual retrieval in the document vector database using the target intent vector to obtain retrieval context information.
5. The API automatic invocation method for equipment after-sales support according to claim 4, characterized in that, The construction of the document vector database includes: Obtain historical work order documents and preprocess them to obtain preprocessed historical work order documents; The preprocessed historical work order documents are vectorized based on the text-embedding-ada-002 model to obtain vectorized historical work order documents. A document vector database is constructed based on the vectorized historical work order documents.
6. The API automatic invocation method for equipment after-sales support according to claim 1, characterized in that, The step of performing operation plan analysis using the GPT-4o model based on the target intent information and retrieval context information to obtain the target operation plan includes: Calling the GPT-4o model based on the OpenAI application programming interface; The target intent information and retrieval context information are input into the GPT-4o model for operation plan analysis to obtain the target operation plan.
7. The API automatic invocation method for equipment after-sales support according to claim 1, characterized in that, The step of determining the target API for the video conferencing device based on the target operation plan and invoking the target API includes: The target operation plan is scored with confidence to obtain the target confidence level of the target operation plan, and it is determined whether the target confidence level is greater than or equal to a preset threshold. If the target confidence level is determined to be greater than or equal to a preset threshold, the target API of the video conferencing device is determined based on the target operation plan. The name information of the target API is determined, and the name information is mapped to the target function corresponding to the target API based on the reflection mechanism. The target API is then called using the target function based on the dynamic function scheduler.
8. An API automatic invocation device for equipment after-sales support, characterized in that, The device includes: Intent recognition module: used to acquire user input text and perform intent recognition on the input text based on named entity recognition algorithm to obtain target intent information; Context retrieval module: used to perform context retrieval on the target intent information based on the Hierarchical Navigation Small World Graph (HNSW) algorithm to obtain retrieval context information; Operation plan analysis module: used to perform operation plan analysis based on the target intent information and retrieval context information using the GPT-4o model to obtain the target operation plan; AIP Execution Module: Used to determine the target API of the video conferencing device based on the target operation plan, and to call the target API.
9. An electronic device, the electronic device comprising a processor and a memory, characterized in that, The memory is used to store instructions, and the processor is used to call the instructions in the memory to cause the electronic device to execute the API automatic call method for device after-sales support as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed on an electronic device, cause the electronic device to perform the API auto-invocation method for device after-sales support as described in any one of claims 1 to 7.