Key function call feature acquisition method, knowledge retrieval method, device and medium

By extracting key function call features from the function call feature graph through a large multimodal model, the problem of insufficient information utilization in the existing technology is solved, the detailed information of function calls is efficiently obtained, and the cost of feature extraction is reduced.

CN120257218BActive Publication Date: 2025-09-09ALIBABA CLOUD COMPUTING CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510742099.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-05
Publication Date
2025-09-09
Estimated Expiration
2045-06-05

AI Technical Summary

Technical Problem

In the existing technology, the information of the function call feature graph has not been effectively utilized. Only the function name can be extracted, and more detailed function call information cannot be obtained.

Method used

A multimodal large model is used to extract key function call features from the function call feature graph. The prompt word template and the function call feature graph are input into the multimodal large model to obtain information such as the CPU time ratio of the target call flow, avoiding the need for manual debugging and dedicated training data.

Benefits of technology

It is possible to obtain more function call detail information from the function call feature graph, reduce the feature extraction cost, and improve the efficiency of automated problem processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120257218B_ABST
    Figure CN120257218B_ABST
Patent Text Reader

Abstract

The present application provides a method for obtaining key function call features, a knowledge retrieval method, a device, and a medium, which relate to the field of operating system technology. The method includes: obtaining a function call feature graph; inputting a prompt word template and a function call feature graph into a multimodal large model to obtain key function call features output by the multimodal large model; wherein the key function call features include a target call flow in multiple call flows, the total CPU time proportion of the last call function in the target call flow, the CPU time proportion of the last call function's own logic, and the CPU time proportion of the last call function calling the next function; the target call flow is the call flow with the largest total CPU time proportion of the last call function in the multiple call flows. In this embodiment, the multimodal large model is used to extract key function call features from the function call feature graph, so that more function call detail information can be obtained from the function call feature graph.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of operating system technology, and in particular to a method for acquiring key function call features, a knowledge retrieval method, a device, and a medium. Background Art

[0002] When the service department encounters and handles customer issues, screenshots related to the service issues often appear, whether in the problem handling communication process or in the documents recording the problem, such as exception log screenshots, function call feature graphs, indicator change graphs, and function flame graphs, to assist in problem analysis. When the problem is solved, it is necessary to automatically analyze the problem, review the problem, and optimize the service. Among them, the function call feature graph contains information that is strongly related to the problem. Image recognition technology is needed to extract information for subsequent automated problem handling processes, such as knowledge base sedimentation, knowledge base matching, and problem search.

[0003] In related technologies, image recognition technology can only simply extract text information from the function call feature map, that is, it can only extract the function name, and other information cannot be obtained, so the function call feature map is not effectively utilized. Summary of the Invention

[0004] The embodiments of the present application provide a key function call feature acquisition method, knowledge retrieval method, device and medium to extract key function call features from a function call feature graph to achieve effective utilization of the function call feature graph.

[0005] In a first aspect, an embodiment of the present application provides a method for obtaining key function call features, including: obtaining a function call feature graph; the function call feature graph includes multiple call flows; inputting a prompt word template and a function call feature graph into a multimodal large model to obtain key function call features output by the multimodal large model; the prompt word template is obtained in advance using the multimodal large model based on the initial prompt word; wherein, the key function call features include the target call flow in multiple call flows, the total CPU time proportion of the last call function in the target call flow, the CPU time proportion of the last call function's own logic, and the CPU time proportion of the last call function calling the next function; the target call flow is the call flow with the largest total CPU time proportion of the last call function in multiple call flows.

[0006] In the second aspect, an embodiment of the present application provides a knowledge retrieval method, including: determining the retrieval intent in response to a retrieval request for a knowledge base; searching the knowledge base based on the retrieval intent to obtain retrieval results, which include key function call features; the key function call features are obtained and stored in the knowledge base according to any of the above methods.

[0007] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory, wherein the processor implements any of the above methods when executing the computer program.

[0008] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, any of the above methods is implemented.

[0009] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements any of the above methods.

[0010] Compared with the prior art, this application has the following advantages:

[0011] The present application provides a method for obtaining key function call features, a knowledge retrieval method, a device, and a medium, which obtain a function call feature graph; the function call feature graph includes multiple call flows; a prompt word template and a function call feature graph are input into a multimodal large model to obtain key function call features output by the multimodal large model; the prompt word template is pre-obtained using the multimodal large model based on the initial prompt word; wherein the key function call features include a target call flow in multiple call flows, the total CPU time percentage of the last call function in the target call flow, the CPU time percentage of the last call function's own logic, and the CPU time percentage of the last call function calling the next function; the target call flow is the call flow with the largest total CPU time percentage of the last call function in the multiple call flows. In this embodiment, the multimodal large model is used to extract key function call features from the function call feature graph, and the CPU time percentage of the last call function in the call flow can be obtained from the key function call features, so that more function call details can be obtained from the function call feature graph. Moreover, by using a large multimodal model to obtain a prompt word template based on the initial prompt word, there is no need for complex and tedious manual debugging of the prompt word; by obtaining key function call features based on the prompt word template, there is no need to collect a large amount of dedicated training data or train a dedicated model, which reduces the cost of feature extraction.

[0012] The above description is only an overview of the technical solution of this application. In order to more clearly understand the technical means of this application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of this application more obvious and easy to understand, the specific implementation methods of this application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the multiple drawings represent the same or similar components or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings only depict some embodiments according to the present application and should not be regarded as limiting the scope of the present application.

[0014] Figure 1 A schematic diagram of a function call feature graph provided in accordance with an embodiment of the present application.

[0015] Figure 2 A schematic diagram of a process for generating a prompt word template according to an embodiment of the present application.

[0016] Figure 3 A schematic diagram of a method for acquiring key function call features provided in one embodiment of the present application.

[0017] Figure 4 This is a flowchart of a method for acquiring key function call features according to an embodiment of the present application.

[0018] Figure 5 This is a flowchart of a knowledge retrieval method according to an embodiment of the present application.

[0019] Figure 6 This is a structural block diagram of a key function call feature acquisition device according to an embodiment of the present application.

[0020] Figure 7 This is a structural block diagram of a knowledge retrieval device according to an embodiment of the present application.

[0021] Figure 8 A block diagram of an electronic device used to implement an embodiment of the present application. DETAILED DESCRIPTION

[0022] Hereinafter, only certain exemplary embodiments are briefly described. As will be appreciated by those skilled in the art, the described embodiments may be modified in various ways without departing from the spirit or scope of the present application. Therefore, the drawings and description are to be regarded as illustrative in nature and not restrictive.

[0023] To facilitate understanding of the technical solutions of the embodiments of the present application, the following describes the related technologies of the embodiments of the present application. The following related technologies can be combined with the technical solutions of the embodiments of the present application as optional solutions, and all of them fall within the scope of protection of the embodiments of the present application.

[0024] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0025] In the technical solution of this application, a multimodal large model refers to a machine learning model that can simultaneously process and understand multiple types of data, such as images, text, audio, and other modalities. By combining information from multiple modalities, multimodal large models provide richer and more comprehensive understanding and reasoning capabilities, making them applicable to many complex tasks. Modality refers to the different forms or types of data. Common modalities include: a. Text: written language, conversations, articles, etc. b. Images: static graphics, video frames, etc. c. Audio: speech, music, ambient sound, etc. d. Sensor data: data such as temperature and humidity. Features of multimodal large models: a. Information fusion: The ability to combine data from different modalities to extract comprehensive information. This information fusion enhances model performance and enables it to handle complex real-world tasks. b. Powerful learning capabilities: These models typically have a large parameter size (e.g., hundreds of millions of parameters), which enables them to have strong learning and generalization capabilities. c. Pre-training and transfer learning: Multimodal large models are often pre-trained using large amounts of multimodal data, and can then be fine-tuned or transfer-learned for specific tasks. The technical solution of this application mainly utilizes the ability of a large multimodal model to extract comprehensive information based on text and images to extract key function call features.

[0026] Figure 1 This is a schematic diagram of a function call feature graph provided in one embodiment of the present application. Figure 1 As shown, the function call profile graph shows the call history of each function during program execution and the CPU time contribution of each function. Each box represents a function call and the proportion of CPU time it occupied during execution, i.e., the CPU time contribution. The CPU time contribution of a function = CPU time occupied by that function / total CPU time during the measurement period × 100%. An arrow pointing to the next box indicates that the function called another function during execution. The box contains the function name and the CPU time contribution of the calling function. "Total" refers to the total CPU time contribution of the function, "Call" refers to the CPU time contribution of the calling function, and "Self" refers to the CPU time contribution of the function's own logic (excluding calls to the next function).

[0027] Among them, in the first box from top to bottom, "ha_innobase, index_resd, mysqld_jemalloc" represent the function names. The current box includes three functions, "ha_innobase" is the main function, "Total: 51.44%" represents the total CPU time of the function in the current box, "Call: 50.96%" represents the CPU time of the function in the current box calling the next function, "Self: 0.48%" represents the CPU time of the function logic in the current box (excluding calling the next function), and "(2)" means that during this analysis process, the execution part of the function in this box was sampled twice. That is, during the sampling process of the performance analysis tool, there were two times when this function was captured executing its own logic (excluding the time of calling other functions). The 50.48% next to the downward arrow in the first box from top to bottom represents the CPU time of the function calling the next box. Due to measurement problems, there is a slight error compared with the "Call: 50.96%" in the box. Similarly, the meanings of the values ​​in other boxes are similar to those in the first box and will not be repeated here.

[0028] The key function call features in the function call feature graph refer to the call flow (target call flow) in which the last function call accounts for the largest proportion of the total CPU time, as well as the CPU time proportion of each part of the last function.

[0029] exist Figure 1 In the function call feature diagram shown, the last called function with the largest total CPU time share is ut_delay, accounting for 33.17% of the total CPU time, 0.96% of the called function's CPU time, and 32.21% of the main logic's CPU time. The target call flow (represented by the main function in each box) is: ut_delay <- PolicyMutex <- lock_table <- row_search_mvcc <- ha_innodb.

[0030] Among them, the "last" in the last calling function with the largest total CPU time percentage refers to Figure 1 The function in the last box in the call flow shown in , in the actual call process, this function may also call other functions, but the CPU time is relatively small (such as Figure 1 As shown in the figure, “Adjustment: 0.96%”), therefore, no new box is added to indicate this.

[0031] The key function call characteristics are described in a custom format as follows:

[0032] {"total":"33.17","call":"0.96","self":"32.21"};["ut_delay","PolicyMutex_enter","lock_table","row_search_mvcc","ha_innodb_index_read"].

[0033] Key function call features are extracted from the function call feature graph. From the key function call features, the CPU time proportion of the last called function in the call flow can be obtained, so that more function call details can be obtained from the function call feature graph.

[0034] Figure 2 This is a schematic diagram of the generation process of the prompt word template provided in one embodiment of the present application. In this embodiment, by providing an initial prompt word and the final specified output result, the prompt word is continuously optimized to determine the final standard prompt word, i.e., the prompt word template. The specific process is as follows:

[0035] First, the initial prompt word is used as the prompt word and the function calls the feature map sample (such as Figure 2 The “picture” shown) is input into the multimodal large model to obtain the output result, and the initial prompt word is used to prompt the multimodal large model to extract the initial key function call features corresponding to the function call feature graph sample.

[0036] Then, the expected result, output result, and judgment prompt word are input into the multimodal large model to obtain the judgment result output by the multimodal large model; the judgment prompt word is used to prompt the multimodal large model to judge whether the output result meets the expectation; if the result meets the expectation, the initial prompt word is used as the standard prompt word. Among them, the expected result is the pre-configured expected key function call feature:

[0037] For example, {"total":"33.17","call":"0.96","self":"32.21"};["ut_delay","PolicyMutex_enter",

[0038] "lock_table","row_search_mvcc","ha_innodb_index_read"]

[0039] If the result does not meet expectations, the initial prompt word, function call feature map sample, output result, expected result and the prompt word that optimizes the initial prompt word (such as Figure 2 The optimized prompt words shown in the figure are input into the multimodal large model to obtain the optimized prompt words output by the multimodal large model (such as Figure 2The optimized prompt word is used to update the prompt word, and the multimodal large model is used again to determine whether it meets expectations. The target optimized prompt word is obtained and used as the prompt word template.

[0040] For example, the prompt word template is as follows:

[0041] The image consists of boxes with text inside. The boxes contain the function name and call percentage description. The call percentage description format is <total:2%|call:1%\nself:1%>, which respectively represent the total percentage of the function in this box (total), the percentage of calling the next function (call), and the percentage within the function itself (self). \n represents a line break. The boxes are connected in sequence by one-way arrows, and there may be multiple forks. Please first identify the box pointed by the last arrow, extract the call percentage, and put it into a dictionary structure (remove the percentage sign), such as {"total": "2","call":"1","self":"1"}. If there are multiple boxes with the last arrow, only focus on the one with the largest proportion of calling the next function, and then extract the first line of text in the box in the order pointed by the arrows, and put them into a list structure in reverse order, such as ["a","b","c"], and finally return a dictionary structure and a list structure separated by semicolons, such as {"total":"2","call":"1","self":"1"};["a","b","c"].

[0042] In this embodiment, the prompt word template is obtained by optimizing the initial prompt word using a large multimodal model, which eliminates the need for complex and tedious manual debugging of the prompt word, thus saving labor costs.

[0043] Figure 3 This is a schematic diagram of a method for acquiring key function call features provided in one embodiment of the present application. The specific process is as follows:

[0044] (1) Select images from a batch of images in order to determine whether the unknown image is the target image, which is the image containing the function call feature.

[0045] (2) Input the unknown image and recognition prompt words into the multimodal large model. For example, the recognition prompt words are as follows: Identify whether the image consists of boxes with text, and the boxes contain function names and call ratio descriptions. The call ratio description format is <total: 2%|call: 1%\nfrom: 1%>. The boxes are connected in sequence by one-way arrows. If yes, return {"livetrace":"yes"}, otherwise return {"livetrace":"no"}.

[0046] (3) If the target image is identified by the multimodal large model, the target image and the standard prompt word (i.e., the prompt word template) are input into the multimodal large model.

[0047] (4) The multimodal large model identifies key function call features from the target image, which is the output result.

[0048] In this embodiment, a function call feature graph is first generated by recognizing cue words and a large multimodal model. Then, key function call features are extracted from the function call feature graph based on the cue word template. This allows direct extraction of predefined key function call features, rather than extracting cluttered text through image recognition. This eliminates the need for subsequent complex text processing to achieve the desired results. Furthermore, there's no need to collect large amounts of specialized training data or train a dedicated model, reducing the cost of feature extraction.

[0049] An embodiment of the present application provides a method for acquiring key function call features. The method in this embodiment can be applied to servers, terminal devices, platforms, devices, etc. with computing and processing capabilities, wherein the server can be a server cluster or a single server, a server deployed in the cloud, or a local server.

[0050] like Figure 4 The flowchart of the key function call feature acquisition method according to an embodiment of the present application is shown, including:

[0051] Step S401, obtaining a function call feature graph; the function call feature graph includes multiple call flows.

[0052] The function call feature graph is an image containing function call features. It includes multiple call flows, which represent the call relationships between functions. A call flow consists of multiple nodes, each of which includes the function name, the CPU time percentage of the function's logic, the CPU time percentage of the calling function, and the total CPU time percentage.

[0053] In step S402, the prompt word template and the function call feature graph are input into the multimodal large model to obtain the key function call features output by the multimodal large model; the prompt word template is obtained in advance using the multimodal large model based on the initial prompt word.

[0054] Among them, the key function call features include the target call flow among multiple call flows, the total CPU time ratio of the last call function in the target call flow, the CPU time ratio of the last call function's own logic, and the CPU time ratio of the last call function calling the next function; the target call flow is the call flow with the largest total CPU time ratio of the last call function among multiple call flows.

[0055] Specifically, the initial prompt words can be set according to specific needs, and based on the initial prompt words, the multimodal large model is used to determine whether the output result meets expectations. If it does not meet expectations, the initial prompt words are optimized to obtain a prompt word template. The prompt word template is used to prompt the multimodal large model to extract key function call features from the function call feature graph, and the format of the key function call features is pre-defined. The key function call features that meet the format requirements can be directly obtained using the prompt word template, instead of extracting messy text through image recognition, and no complex text processing is required later.

[0056] The key function call feature acquisition method provided in the embodiment of the present application obtains a function call feature graph; the function call feature graph includes multiple call flows; the prompt word template and the function call feature graph are input into the multimodal large model to obtain the key function call features output by the multimodal large model; the prompt word template is obtained in advance using the multimodal large model based on the initial prompt word; wherein, the key function call features include the target call flow in the multiple call flows, the total CPU time proportion of the last call function in the target call flow, the CPU time proportion of the last call function's own logic, and the CPU time proportion of the last call function calling the next function; the target call flow is the call flow with the largest total CPU time proportion of the last call function in the multiple call flows. In this embodiment, the multimodal large model is used to extract key function call features from the function call feature graph, and the CPU time proportion of the last call function in the call flow can be obtained from the key function call features, so that more function call details can be obtained from the function call feature graph. Moreover, by using a large multimodal model to obtain a prompt word template based on the initial prompt word, there is no need for complex and tedious manual debugging of the prompt word; by obtaining key function call features based on the prompt word template, there is no need to collect a large amount of dedicated training data or train a dedicated model, which reduces the cost of feature extraction.

[0057] The following describes the specific implementation process of each of the above steps through various implementation methods:

[0058] In one implementation, the prompt word template is obtained in the following manner: an initial prompt word and a function call feature graph sample are input into the multimodal large model to obtain a first output result, and the initial prompt word is used to prompt the multimodal large model to extract the initial key function call feature corresponding to the function call feature graph sample; a pre-configured expected key function call feature, a first output result and a judgment prompt word are input into the multimodal large model to obtain a judgment result output by the multimodal large model; the judgment prompt word is used to prompt the multimodal large model to judge whether the first output result conforms to the format of the expected key function call feature; if the judgment result is that the first output result conforms to expectations, the initial prompt word is used as the prompt word template.

[0059] In practical applications, a large multimodal model is used to pre-optimize the prompt word by determining whether the first output result meets expectations, thereby generating a prompt word template. The expected key function call feature can be configured according to specific needs and can be a key function call feature in different formats. Meeting expectations means that the first output result is consistent with the expected key function call feature format, thus avoiding subsequent complex text processing.

[0060] For example, the judgment prompt word is: The expected key function call features that need to be extracted from the image are as follows***, and the output result is as follows***. Please judge whether the output result meets expectations.

[0061] In this embodiment, the prompt word template is obtained by judging the initial prompt word using a large multimodal model, and there is no need for manual and complicated debugging of the prompt word.

[0062] In one implementation, the method further includes: if the judgment result is that the first output result does not meet expectations, optimizing the initial prompt words based on the multimodal large model to obtain optimized prompt words; and obtaining a prompt word template based on the optimized prompt words.

[0063] If the first output result does not meet expectations, that is, the first output result is inconsistent with the expected key function call feature format, the initial prompt word is optimized using the multimodal large model, and based on the optimized prompt word, it is further judged whether the output result of the multimodal large model meets expectations, until the output result meets expectations and the final prompt word template is obtained.

[0064] In one implementation, the initial prompt word is optimized based on the multimodal large model to obtain the optimized prompt word, including: inputting the initial prompt word, the function call feature graph sample, the first output result, the expected key function call feature and the prompt word of the optimized initial prompt word into the multimodal large model to obtain the optimized prompt word output by the multimodal large model.

[0065] In practical applications, the prompt words that optimize the initial prompt words are used to prompt the multimodal large model to optimize the initial prompt words, without the need for manual and complex debugging of the prompt words.

[0066] For example, the prompt word for optimizing the initial prompt word is: The function call feature graph is as follows***, the initial prompt word is as follows***, the current output result is as follows***, and the expected output result is as follows***. Please optimize the initial prompt word based on the function call feature graph and the expected result, extract the expected result information from the function call feature graph as much as possible, and directly output the optimized prompt word.

[0067] In one implementation, a prompt word template is obtained based on the optimization prompt word, including: inputting the optimization prompt word and the function call feature map sample into the multimodal large model to obtain a second output result; using the multimodal large model to determine whether the second output result meets expectations, until the judgment result output by the multimodal large model is that it meets expectations, obtaining a target optimization prompt word, and using the target optimization prompt word as the prompt word template.

[0068] In actual applications, the second output result is obtained by optimizing the prompt words, and the multimodal large model is used to judge whether the second output result meets expectations again. After multiple optimizations, until the expected output result is obtained, the final prompt word template is obtained. Then, when extracting key function call features from other function call feature graphs again, the prompt word template and other function call feature graphs are input into the multimodal large model to extract key function call features, thereby directly obtaining key function call features that meet the format requirements of expected key function call features.

[0069] In one implementation, obtaining a function call feature graph includes: inputting a recognition prompt word and multiple images to be recognized into a multimodal large model, wherein the recognition prompt word is used to prompt the multimodal large model to recognize the function call feature graph from the multiple images to be recognized; and obtaining the function call feature graph based on the recognition result of the multimodal large model.

[0070] The recognition prompt words can be set according to specific needs.

[0071] For example, the recognition prompt word is as follows: Determine whether the image consists of boxes with text, where the boxes contain the function name and call ratio description. The call ratio description format is <total: 2%|call: 1%\nfrom: 1%>, and the boxes are connected in sequence by one-way arrows. If so, return {"livetrace":"yes"}; otherwise, return {"livetrace":"no"}.

[0072] In this example, the recognition prompt words and the multimodal large model recognition function call feature map are used. There is no need to train a new model, the recognition results are accurate, and the recognition cost is low.

[0073] In one implementation, the method further includes: determining an abnormal location of the function call based on key function call characteristics; and adjusting multiple call flows according to the abnormal location.

[0074] Among them, since the key function call characteristics include the call flow in which the last call function among multiple call flows has the largest proportion of the total CPU time, as well as the total CPU time proportion of the last call function, the CPU time proportion of the last call function's own logic, and the CPU time proportion of the last call function calling the next function, that is to say, the key function call characteristics include detailed information about the CPU time proportion of the program during the function call process. Therefore, the performance bottleneck of the program, that is, the abnormal location, can be quickly diagnosed, so as to optimize the call flow in the program in a targeted manner.

[0075] An embodiment of the present application provides a knowledge retrieval method. The method in this embodiment can be applied to servers, terminal devices, platforms, devices, etc. with computing and processing capabilities, wherein the server can be a server cluster or a single server, a server deployed in the cloud, or a local server.

[0076] like Figure 5 FIG. 1 is a flow chart of a knowledge retrieval method according to an embodiment of the present application, including:

[0077] Step S501: In response to a search request for a knowledge base, determine a search intent.

[0078] Specifically, the search request is parsed to obtain a parsing result, and the search intent, that is, the specific content to be retrieved, can be determined based on the parsing result.

[0079] Step S502: Search the knowledge base according to the search intent to obtain search results, which include key function call features.

[0080] According to the search intention, the search scope and search target are determined, and the search is performed in the knowledge base according to the search scope and search target to obtain the search results, which include key function call features.

[0081] Among them, the key function call features include the target call flow among the multiple call flows in the function call feature graph, the total CPU time proportion of the last call function in the target call flow, the CPU time proportion of the last call function's own logic, and the CPU time proportion of the last call function calling the next function; the target call flow is the call flow with the largest total CPU time proportion of the last call function among the multiple call flows.

[0082] Since the key function call features include detailed information about the proportion of CPU time used by the program during the function call process, the performance bottlenecks of the program, that is, the abnormal locations, can be quickly diagnosed based on the retrieved key function call features, so as to optimize the call flow in the program in a targeted manner.

[0083] Among them, the key function call features are obtained through the method in the aforementioned embodiment and stored in the knowledge base.

[0084] The knowledge retrieval method in this embodiment can retrieve key function call features in the knowledge base, thereby quickly diagnosing the performance bottleneck of the program and optimizing the program in a targeted manner.

[0085] Corresponding to the application scenario and method of the method provided in the embodiment of the present application, the embodiment of the present application also provides a key function call feature acquisition device. Figure 6 The figure shows a structural block diagram of a key function call feature acquisition device according to an embodiment of the present application, which includes:

[0086] Image acquisition module 601, used to acquire a function call feature graph; the function call feature graph includes multiple call flows;

[0087] Feature extraction module 602 is used to input the prompt word template and function call feature graph into the multimodal large model to obtain key function call features output by the multimodal large model; the prompt word template is pre-derived based on the initial prompt word using the multimodal large model;

[0088] Among them, the key function call features include the target call flow among multiple call flows, the total CPU time ratio of the last call function in the target call flow, the CPU time ratio of the last call function's own logic, and the CPU time ratio of the last call function calling the next function; the target call flow is the call flow with the largest total CPU time ratio of the last call function among multiple call flows.

[0089] The key function call feature acquisition device provided in the embodiment of the present application obtains a function call feature graph; the function call feature graph includes multiple call flows; the prompt word template and the function call feature graph are input into the multimodal large model to obtain the key function call features output by the multimodal large model; the prompt word template is pre-optimized based on the initial prompt word using the multimodal large model; wherein the key function call features include the target call flow in the multiple call flows, the total CPU time proportion of the last call function in the target call flow, the CPU time proportion of the last call function's own logic, and the CPU time proportion of the last call function calling the next function; the target call flow is the call flow with the largest total CPU time proportion of the last call function in the multiple call flows. In this embodiment, the multimodal large model is used to extract key function call features from the function call feature graph, and the CPU time proportion of the last call function in the call flow can be obtained from the key function call features, so that more function call details can be obtained from the function call feature graph. Moreover, by using a large multimodal model to obtain a prompt word template based on the initial prompt word, there is no need for complex and tedious manual debugging of the prompt word; by obtaining key function call features based on the prompt word template, there is no need to collect a large amount of dedicated training data or train a dedicated model, which reduces the cost of feature extraction.

[0090] In one implementation, the prompt word template is obtained in the following manner: an initial prompt word and a function call feature graph sample are input into the multimodal large model to obtain a first output result, and the initial prompt word is used to prompt the multimodal large model to extract the initial key function call feature corresponding to the function call feature graph sample; a pre-configured expected key function call feature, a first output result and a judgment prompt word are input into the multimodal large model to obtain a judgment result output by the multimodal large model; the judgment prompt word is used to prompt the multimodal large model to judge whether the first output result conforms to the format of the expected key function call feature; if the judgment result is that the first output result conforms to expectations, the initial prompt word is used as the prompt word template.

[0091] In one implementation, the device is further configured to: if the judgment result is that the first output result does not meet expectations, optimize the initial prompt word based on the multimodal large model to obtain an optimized prompt word; and obtain a prompt word template based on the optimized prompt word.

[0092] In one implementation, when the device optimizes the initial prompt word based on the multimodal large model to obtain the optimized prompt word, it is used to: input the initial prompt word, the function call feature graph sample, the first output result, the expected key function call feature and the prompt word of the optimized initial prompt word into the multimodal large model to obtain the optimized prompt word output by the multimodal large model.

[0093] In one implementation, when the device obtains a prompt word template based on the optimization prompt word, it is used to: input the optimization prompt word and the function call feature map sample into the multimodal large model to obtain a second output result; use the multimodal large model to determine whether the second output result meets expectations, until the judgment result output by the multimodal large model is that it meets expectations, obtain the target optimization prompt word, and use the target optimization prompt word as the prompt word template.

[0094] In one implementation, the image acquisition module 601 is used to: input a recognition prompt word and multiple pictures to be recognized into a multimodal large model, where the recognition prompt word is used to prompt the multimodal large model to recognize a function call feature graph from the multiple pictures to be recognized; and obtain a function call feature graph based on the recognition results of the multimodal large model.

[0095] In one implementation, the device is further configured to: determine an abnormal location of a function call based on key function call characteristics; and adjust multiple call flows according to the abnormal location.

[0096] The functions of each module in the embodiment of the present application can be referred to the corresponding description in the above method, and have corresponding beneficial effects, which will not be repeated here.

[0097] Corresponding to the application scenario and method of the method provided in the embodiment of the present application, the embodiment of the present application also provides a knowledge retrieval device. Figure 7 FIG2 is a block diagram of a knowledge retrieval device according to an embodiment of the present invention, which includes:

[0098] The intention determination module 701 is used to determine the search intention in response to a search request for a knowledge base.

[0099] The knowledge retrieval module 702 is used to search the knowledge base according to the search intent and obtain the search results, which include key function call features.

[0100] The functions of each module in the embodiment of the present application can be referred to the corresponding description in the above method, and have corresponding beneficial effects, which will not be repeated here.

[0101] The knowledge retrieval device in this embodiment can retrieve key function call features in the knowledge base, thereby quickly diagnosing the performance bottleneck of the program and optimizing the program in a targeted manner.

[0102] Figure 8 FIG. 1 is a block diagram of an electronic device for implementing an embodiment of the present application. Figure 8As shown, the electronic device includes: a memory 810 and a processor 820. The memory 810 stores a computer program that can be run on the processor 820. When the processor 820 executes the computer program, the method in the above embodiment is implemented. The number of the memory 810 and the processor 820 can be one or more.

[0103] The electronic device also includes:

[0104] The communication interface 830 is used to communicate with external devices and perform data exchange transmission.

[0105] If the memory 810, processor 820, and communication interface 830 are implemented independently, the memory 810, processor 820, and communication interface 830 can be connected to each other via a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.

[0106] Optionally, in a specific implementation, if the memory 810, the processor 820 and the communication interface 830 are integrated on a chip, the memory 810, the processor 820 and the communication interface 830 can communicate with each other through an internal interface.

[0107] An embodiment of the present application provides a computer-readable storage medium storing a computer program, which implements the method provided in the embodiment of the present application when the program is executed by a processor.

[0108] An embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the method provided in the embodiment of the present application is implemented.

[0109] An embodiment of the present application also provides a chip, which includes a processor for calling and executing instructions stored in the memory from the memory, so that a communication device equipped with the chip executes the method provided in the embodiment of the present application.

[0110] An embodiment of the present application also provides a chip, including: an input interface, an output interface, a processor and a memory. The input interface, the output interface, the processor and the memory are connected through an internal connection path. The processor is used to execute the code in the memory. When the code is executed, the processor is used to execute the method provided in the embodiment of the application.

[0111] It should be understood that the processor described above may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor. It is worth noting that the processor may be a processor that supports the Advanced RISC Machines (ARM) architecture.

[0112] Furthermore, optionally, the aforementioned memory may include read-only memory and random access memory. The memory may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. Non-volatile memory may include read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may include random access memory (RAM), which serves as an external cache memory. By way of example and not limitation, many forms of RAM are available. For example, static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM) and direct memory bus random access memory (DR RAM).

[0113] In the above embodiments, all or part of the embodiments may be implemented using software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments may be implemented in the form of a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions according to the present application are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another.

[0114] In the description of this specification, the reference terms "one embodiment," "some embodiments," "example," "specific example," or "some examples" mean that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. Moreover, the specific features, structures, materials, or characteristics described may be combined in any appropriate manner in any one or more embodiments or examples. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification, as well as features of different embodiments or examples, unless they are mutually inconsistent.

[0115] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features being referred to. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. Throughout the description of this application, "plurality" means two or more, unless otherwise specifically defined.

[0116] Any process or method described in the flowchart or otherwise described herein can be understood to represent a module, segment or portion of code comprising one or more executable instructions for implementing the steps of a specific logical function or process. The scope of the preferred embodiments of the present application includes other implementations in which the functions may be performed in a different order than shown or discussed, including performing the functions substantially simultaneously or in reverse order depending on the functions involved.

[0117] The logic and / or steps described in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, apparatus or device (such as a computer-based system, a system including a processor, or other system that can fetch instructions from and execute instructions on an instruction execution system, apparatus or device), or used in conjunction with such instruction execution systems, apparatuses or devices.

[0118] It should be understood that various parts of the present application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. All or part of the steps of the above embodiment method can be completed by instructing the relevant hardware through a program, which can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiment.

[0119] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing module, or each unit may exist physically separately, or two or more units may be integrated into a single module. The aforementioned integrated modules may be implemented in the form of hardware or in the form of software functional modules. If the aforementioned integrated modules are implemented in the form of software functional modules and sold or used as independent products, they may also be stored in a computer-readable storage medium. The storage medium may be a read-only memory, a magnetic disk, or an optical disk, etc.

[0120] The above is merely an exemplary embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily conceive of various modifications or substitutions within the technical scope described in this application, and such modifications or substitutions should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A method for obtaining key function call features, characterized in that: include: Get the function call feature graph; The function call feature graph includes multiple call flows; Inputting the prompt word template and the function call feature graph into a multimodal large model to obtain key function call features output by the multimodal large model; The prompt word template is obtained in advance based on the initial prompt word using the multimodal large model; The key function call features include the target call flow among the multiple call flows, the total CPU time ratio of the last call function in the target call flow, the CPU time ratio of the logic of the last call function itself, and the CPU time ratio of the last call function calling the next function; the target call flow is the call flow with the largest total CPU time ratio of the last call function among the multiple call flows; the last call function is the function in the last box in the call flow in the function call feature graph; The prompt word template is obtained in the following way: Inputting the initial prompt word and the function call feature graph sample into the multimodal large model to obtain a first output result, wherein the initial prompt word is used to prompt the multimodal large model to extract the initial key function call feature corresponding to the function call feature graph sample; Inputting a preconfigured expected key function call feature, the first output result, and a judgment prompt word into the multimodal large model to obtain a judgment result output by the multimodal large model; the judgment prompt word is used to prompt the multimodal large model to determine whether the first output result conforms to the format of the expected key function call feature; If the judgment result is that the first output result meets expectations, the initial prompt word is used as the prompt word template.

2. The method according to claim 1, characterized in that The method further comprises: If the judgment result is that the first output result does not meet expectations, optimizing the initial prompt word based on the multimodal large model to obtain an optimized prompt word; The prompt word template is obtained according to the optimized prompt word.

3. The method according to claim 2, characterized in that The step of optimizing the initial prompt words based on the multimodal large model to obtain optimized prompt words includes: The initial prompt word, the function call feature graph sample, the first output result, the expected key function call feature and the prompt word that optimizes the initial prompt word are input into the multimodal large model to obtain the optimized prompt word output by the multimodal large model.

4. The method according to claim 2, characterized in that The step of obtaining the prompt word template according to the optimized prompt word includes: Inputting the optimization prompt word and the function call feature graph sample into the multimodal large model to obtain a second output result; The multimodal large model is used to determine whether the second output result meets expectations, until the determination result output by the multimodal large model is in accordance with expectations, a target optimization prompt word is obtained, and the target optimization prompt word is used as the prompt word template.

5. The method according to any one of claims 1 to 4, characterized in that The obtaining of the function call characteristic graph includes: Inputting a recognition prompt word and a plurality of pictures to be recognized into a multimodal large model, wherein the recognition prompt word is used to prompt the multimodal large model to recognize the function call feature graph from the plurality of pictures to be recognized; The function call feature graph is obtained according to the recognition result of the multimodal large model.

6. The method according to any one of claims 1 to 4, characterized in that The method further comprises: Based on the key function call characteristics, determining the abnormal location of the function call; The multiple call flows are adjusted according to the abnormal location.

7. A knowledge retrieval method, characterized in that: The method comprises: In response to a search request for a knowledge base, determining a search intent; Searching the knowledge base according to the search intent to obtain search results, wherein the search results include key function call features; The key function call features are acquired according to the method according to any one of claims 1-6 and stored in the knowledge base.

8. An electronic device, characterized in that: The electronic device includes a memory, a processor, and a computer program stored in the memory, and the processor implements the method according to any one of claims 1 to 7 when executing the computer program.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Method and device for locating function performance problem

    CN106909431A

  • Malicious code gene information recessive association mining method based on meta learning

    CN119538250A