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

The multimodal large model extracts key function call features from the function call feature map, which solves the problem that the function call features cannot be effectively utilized in the existing technology, and realizes more efficient automated problem handling and optimization services.

CN120257218AActive Publication Date: 2025-07-04ALIBABA CLOUD COMPUTING CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The prior art cannot effectively utilize the information in the function call feature map, especially the inability to extract key function call features, resulting in inefficiency in automated problem handling and optimization services.

Method used

The multimodal large model is used to extract key function call features from the function call feature map. By obtaining the function call feature map and inputting the multimodal large model, the prompt word template is used to obtain key function call features, including the CPU time ratio of the target call flow and other information.

Benefits of technology

It realizes the extraction of more function call details from the function call feature map, reduces the cost of feature extraction, does not require manual debugging prompt words and dedicated training data, and improves the efficiency of automated problem handling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120257218A_ABST
    Figure CN120257218A_ABST
Patent Text Reader

Abstract

The invention provides a key function call feature acquisition method, a knowledge retrieval method, equipment and a medium, and relates to the technical field of operating systems, the method comprises the following steps: acquiring a function call feature map; inputting the cue word template and the function call feature graph into a multi-modal large model to obtain key function call features output by the multi-modal large model; wherein the key function call characteristics comprise a target call stream in the multiple call streams, a total CPU time proportion of the last call function in the target call stream, a CPU time proportion of the logic of the last call function, and a CPU time proportion of calling a next function by the last call function; the target call stream is the call stream with the maximum proportion of the total CPU time of the last call function in the multiple call streams. In the embodiment, the key function call features are extracted from the function call feature map by using the multi-modal large model, so that more function call detail information is obtained from the function call feature map.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of operating systems, and in particular, to a method for obtaining key function call features, a knowledge retrieval method, a device, and a medium. Background Art

[0002] When the service department encounters and processes customer problems, whether in the process of problem-solving communication or in the documents recording the problems, screenshots related to service problems often appear, such as abnormal log screenshots, function call feature diagrams, metric change diagrams, and function flame diagrams, etc., to assist in problem analysis. After the problem is solved, it is necessary to perform automated analysis of the problem, review the problem, and optimize the service, etc. Among them, the function call feature diagram contains information strongly related to the problem, and it is necessary to extract information through image recognition technology for subsequent automated problem-solving processes, such as knowledge base precipitation, knowledge base matching, and problem search, etc.

[0003] In the related art, the image recognition technology can only simply extract the text information in the function call feature diagram, that is, only the function name can be extracted, and other information cannot be known, and the function call feature diagram is not effectively utilized. Summary of the Invention

[0004] Embodiments of this application provide a method for obtaining key function call features, a knowledge retrieval method, a device, and a medium, which extract key function call features from the function call feature diagram to realize the effective utilization of the function call feature diagram.

[0005] In a first aspect, embodiments of this application provide a method for obtaining key function call features, including: obtaining a function call feature diagram; the function call feature diagram includes multiple call flows; inputting the prompt word template and the function call feature diagram into a multi-modal large model to obtain the key function call features output by the multi-modal large model; the prompt word template is obtained in advance by using the multi-modal large model based on the initial prompt word; wherein, the key function call features include the target call flow among the multiple call flows, the total CPU time occupancy ratio of the last call function in the target call flow, the CPU time occupancy ratio of the self-logic of the last call function, and the CPU time occupancy ratio of the last call function calling the next function; the target call flow is the call flow with the largest total CPU time occupancy ratio of the last call function among the multiple call flows.

[0006] In a second aspect, embodiments of this application provide a knowledge retrieval method, including: in response to a retrieval request for the knowledge base, determining the retrieval intention; according to the retrieval intention, performing a retrieval in the knowledge base to obtain a retrieval result, and the retrieval result includes key function call features; the key function call features are obtained according to the method of any one of the above and stored in the knowledge base.

[0007] In a third aspect, an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory. When the processor executes the computer program, the method according to any one of the above is implemented.

[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, the method according to any one of the above is implemented.

[0009] In a fifth aspect, 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 according to any one of the above is implemented.

[0010] Compared with the prior art, the present application has the following advantages: The present application provides a method, a device, and a medium for obtaining key function call features and knowledge retrieval, which obtain a function call feature map. The function call feature map includes multiple call flows. The prompt word template and the function call feature map are input into a multi-modal large model to obtain the key function call features output by the multi-modal large model. The prompt word template is obtained in advance by using the multi-modal large model based on the initial prompt word. Among them, the key function call features include the target call flow in the multiple call flows, the proportion of the total CPU time of the last call function in the target call flow, the proportion of the CPU time of the own logic of the last call function, and the proportion of the CPU time of the last call function calling the next function. The target call flow is the call flow with the largest proportion of the total CPU time of the last call function among the multiple call flows. In this embodiment, the multi-modal large model is used to extract key function call features from the function call feature map, and the proportion of the CPU time of the last call function in the call flow can be obtained from the key function call features, so that more function call detail information can be obtained from the function call feature map. Moreover, the multi-modal large model is used to obtain the prompt word template based on the initial prompt word, which does not require complex and cumbersome manual debugging of the prompt word. Obtaining key function call features based on the prompt word template does not require collecting a large amount of dedicated training data, nor does it require training a dedicated model, which reduces the cost of feature extraction.

[0011] The above description is only an overview of the technical solution of the present application. In order to be able to understand the technical means of the present application more clearly, it can be implemented according to the content of the specification. And in order to make the above and other purposes, features, and advantages of the present application more obvious and understandable, the following specific embodiments of the present application are specifically given. Description of the Drawings

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

[0013] Figure 1 Schematic diagram of a function call feature map provided for an embodiment of the present application.

[0014] Figure 2 Schematic diagram of the generation process of a prompt template provided for an embodiment of the present application.

[0015] Figure 3 Schematic diagram of a method for obtaining key function call features provided for an embodiment of the present application.

[0016] Figure 4 Flowchart of a method for obtaining key function call features provided for an embodiment of the present application.

[0017] Figure 5 Flowchart of a knowledge retrieval method provided for an embodiment of the present application.

[0018] Figure 6 Block diagram of a device for obtaining key function call features provided for an embodiment of the present application.

[0019] Figure 7 Block diagram of a knowledge retrieval device provided for an embodiment of the present application.

[0020] Figure 8 Block diagram of an electronic device for implementing the embodiments of the present application. Detailed implementation manners

[0021] In the following, only some exemplary embodiments are briefly described. As those skilled in the art can recognize, the described embodiments can be modified in various different ways without departing from the concept or scope of the present application. Therefore, the drawings and the description are considered to be exemplary in nature and not restrictive.

[0022] To facilitate understanding of the technical solutions of the embodiments of the present application, the related technologies of the embodiments of the present application are described below. The following related technologies can be arbitrarily combined with the technical solutions of the embodiments of the present application as optional solutions, and they all fall within the protection scope of the embodiments of the present application.

[0023] 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 for analysis, stored data, displayed data, etc.) involved in this application are all information and data that have been authorized by the user or fully authorized by all parties. Moreover, the collection, use, and processing of relevant data need to comply with the relevant laws, regulations, and standards of the relevant countries and regions, and corresponding operation entrances are provided for users to choose to authorize or reject.

[0024] In the technical solution of this application, a multi-modal large model refers to a machine learning model that can simultaneously process and understand multiple types of data. For example, data in different modalities such as images, texts, and audios. By combining information from multiple modalities, the multi-modal large model provides richer and more comprehensive understanding and reasoning capabilities, and is applicable to many complex tasks. A modality refers to 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: such as temperature, humidity, and other data. Characteristics of the multi-modal large model: a. Information fusion: It can combine data from different modalities and extract comprehensive information. This information fusion can enhance the performance of the model and handle complex tasks in the real world. b. Powerful learning ability: Usually, these models have a large number of parameters (for example, hundreds of millions of parameters), giving them powerful learning and generalization abilities. c. Pre-training and transfer learning: Multi-modal large models often use a large amount of multi-modal data for pre-training and can then be fine-tuned or transferred for specific tasks. The technical solution of this application mainly utilizes the ability of the multi-modal large model to extract comprehensive information based on text and images to extract key function call features.

[0025] Figure 1 It is a schematic diagram of the function call feature map provided by an embodiment of this application. As Figure 1 shown, the function call feature map shows the call relationships between functions and the CPU time percentage of the calling functions during a program execution process. Each box represents the function call during the program running and the proportion of CPU time it occupies during its running, that is, the CPU time percentage. The CPU time percentage of a function = the CPU time occupied by this function / the total CPU time during the measurement period × 100%. The arrow pointing to the next box means that this function calls another function during its running. The box includes the name of this function and the CPU time percentage of the calling function. "Total" refers to the total CPU time percentage of this function, "Call" refers to the CPU time percentage of calling the next function, and "Self" refers to the CPU time percentage of the logic of this function itself (except for calling the next function).

[0026] Among them, in the first box from top to bottom, "ha_innobase, index_resd, mysqld_jemalloc" represent function names. The current box includes three functions. "ha_innobase" is the main function. "Total: 51.44%" represents the proportion of the total CPU time of the functions in the current box. "Call: 50.96%" represents the proportion of the CPU time for the functions in the current box to call the next function. "Self: 0.48%" represents the proportion of the CPU time for the self-logic of the functions in the current box (excluding calling the next function). "(2)" means that in this analysis process, the self-execution part of the functions in this box was sampled 2 times. That is to say, during the sampling process of the performance analysis tool, the function was captured 2 times while executing its self-logic (excluding the time for calling other functions). 50.48% next to the downward arrow of the first box from top to bottom represents the proportion of the CPU time for the function to call the next box. Due to measurement issues, there is a slight error compared to "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 elaborated here.

[0027] The key function call characteristics in the function call characteristic graph refer to the call flow (target call flow) with the largest proportion of the total CPU time of the last called function, and the CPU time proportion of each part of the last function.

[0028] In Figure 1 the shown function call characteristic graph, the last called function with the largest proportion of the total CPU time is ut_delay, with a total CPU time proportion of 33.17%, a CPU time proportion for the calling function of 0.96%, and a CPU time proportion for the main self-logic of 32.21%. The target call flow (represented by the main function in each box) is: ut_delay <- PolicyMutex <- lock_table <- row_search_mvcc <- ha_innodb.

[0029] Among them, the "last" in the last called function with the largest proportion of the total CPU time refers to Figure 1 the function in the last box in the call flow shown in Figure 1 . During the actual call process, this function may still call other functions, but the CPU time proportion is relatively small (such as

[0030] shown as "Call: 0.96%"), so no new box is added to represent it. {"total":"33.17","call":"0.96","self":"32.21"}; ["ut_delay","PolicyMutex_enter","lock_table","row_search_mvcc","ha_innodb_index_read"].

[0031] Extract key function call features from the function call feature graph. From the key function call features, the CPU time ratio of the last called function in the call flow can be obtained, so as to obtain more function call detail information from the function call feature graph.

[0032] Figure 2 It is a schematic diagram of the generation process of the prompt word template provided by an embodiment of the present application. In this embodiment, by giving the initial prompt word and the finally specified output result, the prompt word is continuously optimized to determine the final standard prompt word, that is, the prompt word template. The specific process is as follows: First, use the initial prompt word as the prompt word and the function call feature graph sample (such as Figure 2 the "picture" shown) to input into the multimodal large model to obtain the output result. 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.

[0033] Then, input the expected result, the output result, and the judgment prompt word 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, use the initial prompt word as the standard prompt word. Among them, the expected result is the pre-configured expected key function call feature: For example, {"total":"33.17","call":"0.96","self":"32.21"}; ["ut_delay","PolicyMutex_enter", "lock_table","row_search_mvcc","ha_innodb_index_read" If the result does not meet the expectation, input the initial prompt word, the function call feature graph sample, the output result, the expected result, and the prompt word for optimizing the initial prompt word (such as Figure 2 the "prompt word for optimizing the prompt word" shown) into the multimodal large model to obtain the optimized prompt word output by the multimodal large model (such as Figure 2 the "new prompt word" shown). Use the optimized prompt word to update the prompt word, and then use the multimodal large model to judge whether it meets the expectation again until the judgment result is in line with the expectation to obtain the target optimized prompt word, and use the target optimized prompt word as the prompt word template.

[0034] For example, the prompt template is as follows: The picture consists of boxes with text, and the boxes contain the function name and the call ratio description. The format of the call ratio description is <total: 2%|call: 1%\nself: 1%>, which respectively represent the total ratio of this box function (total), the ratio of calling the next function (call), and the ratio within the function itself (self). \nrepresents the line break character. The boxes are connected in sequence by one-way arrows, and there may be multiple branches. First, identify the box pointed to by the last arrow, extract the call ratio, and put it into a dictionary structure (remove the percentage sign), such as {"total": "2", "call": "1", "self": "1"}. If there are multiple boxes at the end arrow, only focus on the one with the largest ratio of calling the next function. Then, in the order of the arrow pointing, extract the first line of text in the box and put it into a list structure in reverse order, such as ["a", "b", "c"]. Finally, return a dictionary structure and a list structure, separated by a semicolon, such as {"total": "2", "call": "1", "self": "1"}; ["a", "b", "c"].

[0035] In this embodiment, by using the multi-modal large model to optimize the initial prompt, the prompt template is obtained, and there is no need for complex and cumbersome manual debugging of the prompt, saving labor costs.

[0036] Figure 3 It is a schematic diagram of the method for obtaining key function call characteristics provided by an embodiment of the present application. The specific process is as follows: (1) Select pictures from the batch of pictures in sequence to determine whether the unknown picture is the target picture, that is, the picture containing function call characteristics.

[0037] (2) Input the unknown picture and the recognition prompt into the multi-modal large model. For example, the recognition prompt is as follows: Determine whether the picture is composed of boxes with text, and the boxes contain the function name and the call ratio description. The format of the call ratio description is <total: 2%|call: 1%\nself: 1%>, and the boxes are connected in sequence by one-way arrows. If so, return {"livetrace": "yes"}, otherwise return {"livetrace": "no"}.

[0038] (3) If it is identified as the target picture by the multi-modal large model, input the target picture and the standard prompt (i.e., the prompt template) into the multi-modal large model.

[0039] (4) The multi-modal large model identifies the key function call characteristics from the target picture, that is, the output result.

[0040] In this embodiment, first, a function call feature map is obtained by using recognition prompt words and a multimodal large model, and then key function call features are obtained from the function call feature map based on the prompt word template. The predefined key function call features can be directly extracted, rather than extracting messy text through image recognition, and the expected results can be obtained without complex text processing later. Moreover, there is no need to collect a large amount of dedicated training data, nor to train a dedicated model, which reduces the cost of feature extraction.

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

[0042] Such as Figure 4 shown in the flowchart of the method for obtaining key function call features according to an embodiment of the present application, including: Step S401, obtain a function call feature map; the function call feature map includes multiple call flows.

[0043] Among them, the function call feature map is a picture containing function call features. The function call feature map includes multiple call flows, and the call flow represents the call relationship between functions. The call flow includes multiple nodes, and each node includes the name of the current function, the CPU time ratio of the current function's own logic, the CPU time ratio of the called function, and the total CPU time ratio.

[0044] Step S402, input the prompt word template and the function call feature map 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 by using the multimodal large model based on the initial prompt words.

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

[0046] Specifically, the initial prompt can be set according to specific needs. Based on the initial prompt, use a multimodal large model to determine whether the output result meets the expectations. If it does not meet the expectations, optimize the initial prompt to obtain a prompt template. Use the prompt template to prompt the multimodal large model to extract key function call features from the function call feature map. The format of the key function call features is predefined. Using the prompt template, key function call features that meet the format requirements can be directly obtained, rather than extracting messy text through image recognition, and complex text processing is not required later.

[0047] The key function call feature acquisition method provided by the embodiments of the present application includes: obtaining a function call feature map; the function call feature map includes multiple call flows; inputting the prompt template and the function call feature map into a multimodal large model to obtain the key function call features output by the multimodal large model; the prompt template is obtained in advance based on the initial prompt using the multimodal large model; wherein, the key function call features include the target call flow among the multiple call flows, the proportion of the total CPU time of the last call function in the target call flow, the proportion of the CPU time of the self-logic of the last call function, and the proportion of the CPU time of the last call function calling the next function; the target call flow is the call flow with the largest proportion of the total CPU time of the last call function among the multiple call flows. In this embodiment, use a multimodal large model to extract key function call features from the function call feature map. From the key function call features, the proportion of the CPU time of the last call function in the call flow can be obtained, so as to obtain more function call detail information from the function call feature map. Moreover, use the multimodal large model to obtain the prompt template based on the initial prompt, without the need for complex and cumbersome manual debugging of the prompt; obtain key function call features based on the prompt template, without the need to collect a large amount of dedicated training data, nor to train a dedicated model, reducing the cost of feature extraction.

[0048] The following introduces the specific implementation processes of the above steps through multiple implementation methods: In one implementation method, the prompt template is obtained through the following steps: input the initial prompt and the function call feature map sample into the multimodal large model to obtain the first output result. The initial prompt is used to prompt the multimodal large model to extract the initial key function call features corresponding to the function call feature map sample; input the pre-configured expected key function call features, the first output result, and the judgment prompt into the multimodal large model to obtain the judgment result output by the multimodal large model; the judgment prompt is used to prompt the multimodal large model to judge whether the first output result meets the format of the expected key function call features; if the judgment result is that the first output result meets the expectations, use the initial prompt as the prompt template.

[0049] In practical applications, the prompt is optimized in advance by using a multimodal large model to determine whether the first output result meets the expectations, and a prompt template is obtained. Among them, the expected key function call features can be configured according to specific needs and can be key function call features in different formats. Among them, meeting the expectations can mean that the first output result is in the same format as the expected key function call features, thus avoiding subsequent complex text processing.

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

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

[0052] In one implementation, the method further includes: if the judgment result is that the first output result does not meet the expectations, then based on the multimodal large model, the initial prompt is optimized to obtain an optimized prompt; according to the optimized prompt, a prompt template is obtained.

[0053] If the first output result does not meet the expectations, that is, the first output result is not in the same format as the expected key function call features, then the initial prompt is optimized by using the multimodal large model, and based on the optimized prompt, it is further judged whether the output result of the multimodal large model meets the expectations until the output result meets the expectations, and the final prompt template is obtained.

[0054] In one implementation, optimizing the initial prompt based on the multimodal large model to obtain an optimized prompt includes: inputting the initial prompt, the function call feature map sample, the first output result, the expected key function call features, and the prompt for optimizing the initial prompt into the multimodal large model to obtain the optimized prompt output by the multimodal large model.

[0055] In practical applications, using the prompt for optimizing the initial prompt to prompt the multimodal large model to optimize the initial prompt does not require manual and complicated debugging of the prompt.

[0056] For example, the prompt for optimizing the initial prompt is: The function call feature map is as follows***, the initial prompt is as follows***, the current output result is as follows***, and the expected output result is as follows***. Please optimize the initial prompt according to the function call feature map and the expected result, and try to extract the information of the expected result from the function call feature map as much as possible, and directly output the optimized prompt.

[0057] In one implementation, a prompt template is obtained according to the optimization prompt, including: inputting the optimization prompt 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 the expectation until the judgment result output by the multimodal large model meets the expectation, obtaining the target optimization prompt, and using the target optimization prompt as the prompt template.

[0058] In practical applications, a second output result is obtained using the optimization prompt, and the multimodal large model is used to determine again whether the second output result meets the expectation. After multiple optimizations until an output result that meets the expectation is obtained, the final prompt template is obtained. Then, when extracting key function call features from other function call feature maps again, the prompt template and other function call feature maps are input into the multimodal large model to extract key function call features, so as to directly obtain key function call features that meet the format requirements of the expected key function call features.

[0059] In one implementation, obtaining a function call feature map includes: inputting the recognition prompt and multiple pictures to be recognized into the multimodal large model, where the recognition prompt is used to prompt the multimodal large model to recognize the function call feature map from the multiple pictures to be recognized; obtaining the function call feature map according to the recognition result of the multimodal large model.

[0060] Among them, the recognition prompt can be set according to specific needs.

[0061] For example, the recognition prompt is as follows: Determine whether the picture is composed of boxes with text, where the box contains the function name and the call ratio description, and the format of the call ratio description is <total: 2%|call: 1%\nself: 1%>, and the boxes are connected in sequence by one-way arrows. If so, return {"livetrace": "yes"}, otherwise return {"livetrace": "no"}.

[0062] In this example, using the recognition prompt and the multimodal large model to recognize the function call feature map does not require training a new model, the recognition result is accurate, and the recognition cost is relatively low.

[0063] In one implementation, the method further includes: determining the abnormal position of the function call based on the key function call feature; adjusting multiple call flows according to the abnormal position.

[0064] Among them, since the critical function call feature includes the call stream with the largest total CPU time ratio of the last call function in multiple call streams, and the total CPU time ratio of the last call function, 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, that is to say, the critical function call feature includes the detailed information of the CPU time ratio during the function call process of the program. Therefore, the performance bottleneck of the program, that is, the abnormal location, can be quickly diagnosed, and then the call stream in the program can be optimized accordingly.

[0065] The 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. Among them, the server can be a server cluster or a single server, and can be a server deployed in the cloud or a local server.

[0066] Such as Figure 5 shown in the flowchart of the knowledge retrieval method according to an embodiment of the present application, including: Step S501, in response to a retrieval request for the knowledge base, determine the retrieval intention.

[0067] Specifically, parse the retrieval request to obtain a parsing result, and the retrieval intention, that is, the specific content to be retrieved, can be determined according to the parsing result.

[0068] Step S502, according to the retrieval intention, perform a retrieval in the knowledge base to obtain a retrieval result, and the retrieval result includes critical function call features.

[0069] According to the retrieval intention, determine the retrieval scope and retrieval target, and perform a retrieval in the knowledge base according to the retrieval scope and retrieval target to obtain a retrieval result, and the critical function call features are included in the retrieval result.

[0070] Among them, the critical function call feature includes the target call stream in multiple call streams in the function call feature graph, the total CPU time ratio of the last call function in the target call stream, 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 stream is the call stream with the largest total CPU time ratio of the last call function in multiple call streams.

[0071] Since the critical function call feature includes the detailed information of the CPU time ratio during the function call process of the program, therefore, the performance bottleneck of the program, that is, the abnormal location, can be quickly diagnosed according to the retrieved critical function call feature, and then the call stream in the program can be optimized accordingly.

[0072] Among them, the key function call features are obtained by the method in the foregoing embodiment and stored in the knowledge base.

[0073] The knowledge retrieval method in this embodiment can retrieve the key function call features in the knowledge base, so as to quickly diagnose the performance bottleneck of the program and optimize the program accordingly.

[0074] Corresponding to the application scenario and method of the method provided in the embodiment of the present application, the embodiment of the present application further provides a key function call feature acquisition device. As Figure 6 shown in the structural block diagram of the key function call feature acquisition device according to an embodiment of the present application, the device includes: An image acquisition module 601, configured to acquire a function call feature map; the function call feature map includes a plurality of call flows; A feature extraction module 602, configured to input the prompt word template and the function call feature map into a multi-modal large model to obtain the key function call features output by the multi-modal large model; the prompt word template is obtained in advance by using the multi-modal large model based on the initial prompt word; Among them, the key function call features include the target call flow among the plurality of call flows, the total CPU time occupancy ratio of the last call function in the target call flow, the CPU time occupancy ratio of the own logic of the last call function, and the CPU time occupancy ratio of the last call function calling the next function; the target call flow is the call flow with the largest total CPU time occupancy ratio of the last call function among the plurality of call flows.

[0075] The key function call feature acquisition device provided by the embodiment of the present application acquires a function call feature map; the function call feature map includes multiple call flows; inputs the prompt template and the function call feature map into a multi-modal large model to obtain the key function call features output by the multi-modal large model; the prompt template is pre-optimized based on the initial prompt using the multi-modal large model; wherein, the key function call features include the target call flow among the multiple call flows, the proportion of the total CPU time of the last call function in the target call flow, the proportion of the CPU time of the self-logic of the last call function, and the proportion of the CPU time of the last call function calling the next function; the target call flow is the call flow with the largest proportion of the total CPU time of the last call function among the multiple call flows. In this embodiment, the multi-modal large model is used to extract key function call features from the function call feature map, and the proportion of the CPU time of the last call function in the call flow can be obtained from the key function call features, so that more function call detail information can be obtained from the function call feature map. Moreover, the multi-modal large model is used to obtain the prompt template based on the initial prompt, without the need for complex and cumbersome manual debugging of the prompt; obtaining the key function call features based on the prompt template does not require collecting a large amount of dedicated training data, nor does it require training a dedicated model, reducing the cost of feature extraction.

[0076] In one implementation, the prompt template is obtained in the following way: input the initial prompt and the function call feature map sample into the multi-modal large model to obtain the first output result, and the initial prompt is used to prompt the multi-modal large model to extract the initial key function call features corresponding to the function call feature map sample; input the pre-configured expected key function call features, the first output result, and the judgment prompt into the multi-modal large model to obtain the judgment result output by the multi-modal large model; the judgment prompt is used to prompt the multi-modal large model to judge whether the first output result conforms to the format of the expected key function call features; if the judgment result is that the first output result conforms to the expectation, then use the initial prompt as the prompt template.

[0077] In one implementation, the device is further configured to: if the judgment result is that the first output result does not conform to the expectation, optimize the initial prompt based on the multi-modal large model to obtain an optimized prompt; and obtain the prompt template according to the optimized prompt.

[0078] In one implementation, when the device optimizes the initial prompt based on the multi-modal large model to obtain an optimized prompt, it is configured to: input the initial prompt, the function call feature map sample, the first output result, the expected key function call features, and the prompt for optimizing the initial prompt into the multi-modal large model to obtain the optimized prompt output by the multi-modal large model.

[0079] In one implementation, when the device obtains a prompt template according to an optimization prompt, it is used to: input the optimization prompt and the function call feature map samples into a multi-modal large model to obtain a second output result; use the multi-modal large model to determine whether the second output result meets the expectations until the judgment result output by the multi-modal large model meets the expectations, obtain the target optimization prompt, and use the target optimization prompt as the prompt template.

[0080] In one implementation, the image acquisition module 601 is used to: input the recognition prompt and multiple pictures to be recognized into a multi-modal large model, and the recognition prompt is used to prompt the multi-modal large model to recognize the function call feature map from the multiple pictures to be recognized; obtain the function call feature map according to the recognition result of the multi-modal large model.

[0081] In one implementation, the device is further used to: determine the abnormal position of the function call based on the key function call feature; adjust multiple call flows according to the abnormal position.

[0082] The functions of the modules in the embodiments of the present application can refer to the corresponding descriptions in the above methods and have corresponding beneficial effects, which will not be elaborated here.

[0083] Corresponding to the application scenario and method of the method provided in the embodiments of the present application, the embodiments of the present application further provide a knowledge retrieval device. As Figure 7 shown in the structural block diagram of the knowledge retrieval device according to an embodiment of the present application, the device includes: An intention determination module 701, configured to determine a retrieval intention in response to a retrieval request for a knowledge base.

[0084] A knowledge retrieval module 702, configured to retrieve in the knowledge base according to the retrieval intention to obtain a retrieval result, where the retrieval result includes key function call features.

[0085] The functions of the modules in the embodiments of the present application can refer to the corresponding descriptions in the above methods and have corresponding beneficial effects, which will not be elaborated here.

[0086] The knowledge retrieval device in this embodiment can retrieve key function call features in the knowledge base, so as to quickly diagnose the performance bottleneck of the program and optimize the program targeted.

[0087] Figure 8 It is a block diagram of an electronic device used to implement the embodiments of the present application. As Figure 8 shown, the electronic device includes: a memory 810 and a processor 820, and a computer program that can run on the processor 820 is stored in the memory 810. When the processor 820 executes the computer program, the method in the above embodiments is implemented. The number of the memory 810 and the processor 820 can be one or more.

[0088] The electronic device further includes: A communication interface 830, configured to communicate with external devices and perform data interaction and transmission.

[0089] If the memory 810, the processor 820, and the communication interface 830 are implemented independently, the memory 810, the processor 820, and the communication interface 830 can be interconnected through a bus and complete communication with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience of representation, Figure 8 only a thick line is used to represent it in the figure, but it does not mean that there is only one bus or one type of bus.

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

[0091] An embodiment of the present application provides a computer-readable storage medium, which stores a computer program, and when the program is executed by a processor, the method provided in the embodiment of the present application is implemented.

[0092] 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, the method provided in the embodiment of the present application is implemented.

[0093] An embodiment of the present application further provides a chip, which includes a processor, configured to call and run instructions stored in a memory, so that a communication device installed with the chip executes the method provided in the embodiment of the present application.

[0094] An embodiment of the present application further 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 configured to execute code in the memory, and when the code is executed, the processor is configured to execute the method provided in the embodiment of the application.

[0095] It should be understood that the above-mentioned processor 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 may be a microprocessor or any conventional processor, etc. It is worth noting that the processor may be a processor that supports the Advanced RISC Machines (ARM) architecture.

[0096] Furthermore, optionally, the above-mentioned memory may include a read-only memory and a random access memory. The memory may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may include a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically EPROM (EEPROM), or a flash memory. The volatile memory may include a Random Access Memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available. For example, Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), Sync link DRAM (SLDRAM), and Direct Rambus RAM (DR RAM).

[0097] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The 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 can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium.

[0098] In the description of this specification, the descriptions with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples", etc. mean that the specific features, structures, materials, or characteristics described in connection 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 can be combined in a suitable manner in any one or more embodiments or examples. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.

[0099] In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" can explicitly or implicitly include at least one of the features. In the description of the present application, "a plurality of" means two or more unless otherwise specifically defined.

[0100] Any process or method described in the flowchart or otherwise described herein can be understood to represent a module, segment, or portion of code including one or more executable instructions for implementing a specific logical function or process. And the scope of the preferred embodiments of the present application includes additional implementations, where the functions can be executed in a substantially simultaneous manner or in a reverse order according to the involved functions, rather than in the order shown or discussed.

[0101] 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 a logical function, and can be specifically implemented 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 systems that can fetch and execute instructions from the instruction execution system, apparatus, or device), or in combination with these instruction execution systems, apparatuses, or devices.

[0102] It should be understood that each part of the present application can be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. All or part of the steps of the method in the above embodiments can be completed by instructing relevant hardware through a program, and the program 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 embodiments.

[0103] In addition, in each embodiment of the present application, each functional unit can be integrated into a processing module, or each unit can exist physically alone, or two or more units can be integrated into one module. The above integrated module can be implemented in the form of hardware or in the form of a software functional module. When the above integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. The storage medium can be a read-only memory, a magnetic disk, an optical disc, or the like.

[0104] As mentioned above, the above are only exemplary embodiments of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope recorded in the present application can easily think of various changes or substitutions, and these should all be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A method for obtaining key function call features, characterized in that, Including: Obtain a function call feature map; The function call feature map includes multiple call flows; Input the prompt template and the function call feature map into the multimodal large model to obtain the key function call features output by the multimodal large model; The prompt template is pre-obtained based on the initial prompt using the multimodal large model; Among them, the key function call features include the target call flow in the multiple call flows, the proportion of the total CPU time of the last call function in the target call flow, the proportion of the CPU time of the own logic of the last call function, and the proportion of the CPU time of the last call function calling the next function; the target call flow is the call flow with the largest proportion of the total CPU time of the last call function among the multiple call flows.

2. The method according to claim 1, characterized in that, The prompt template is obtained through the following method: Input the initial prompt and the function call feature map sample into the multimodal large model to obtain a first output result. The initial prompt is used to prompt the multimodal large model to extract the initial key function call features corresponding to the function call feature map sample; Input the pre-configured expected key function call features, the first output result, and the judgment prompt into the multimodal large model to obtain the judgment result output by the multimodal large model; the judgment prompt 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 features; If the judgment result is that the first output result conforms to the expectation, then use the initial prompt as the prompt template.

3. The method according to claim 2, wherein The method further includes: If the judgment result is that the first output result does not conform to the expectation, then optimize the initial prompt based on the multimodal large model to obtain an optimized prompt; Obtain the prompt template according to the optimized prompt.

4. The method according to claim 3, characterized in that The optimizing the initial prompt based on the multimodal large model to obtain an optimized prompt includes: Input the initial prompt, the function call feature map sample, the first output result, the expected key function call features, and the prompt for optimizing the initial prompt into the multimodal large model to obtain the optimized prompt output by the multimodal large model.

5. The method according to claim 3, wherein The obtaining the prompt template according to the optimized prompt includes: Input the optimized prompt and the function call feature map sample into the multimodal large model to obtain a second output result; Use the multimodal large model to judge whether the second output result conforms to the expectation until the judgment result output by the multimodal large model conforms to the expectation, obtain the target optimized prompt, and use the target optimized prompt as the prompt template.

6. The method according to any one of claims 1-5, characterized in that The obtaining the function call feature map includes: Input the recognition prompt and multiple pictures to be recognized into the multimodal large model. The recognition prompt is used to prompt the multimodal large model to recognize the function call feature map from the multiple pictures to be recognized; Obtain the function call feature map according to the recognition result of the multimodal large model.

7. The method according to any one of claims 1-5, characterized in that, The method further includes: Determine the abnormal position of the function call based on the key function call features; Adjust the multiple call flows according to the abnormal position.

8. A knowledge retrieval method, characterized in that, The method includes: Respond to a retrieval request for the knowledge base to determine the retrieval intent; Retrieve in the knowledge base according to the retrieval intent to obtain a retrieval result, where the retrieval result includes key function call features; The key function call features are obtained and stored in the knowledge base according to the method described in any one of claims 1-7.

9. An electronic device, characterized in that, The electronic device includes a memory, a processor, and a computer program stored on the memory. When the processor executes the computer program, the method described in any one of claims 1-8 is implemented.

10. A computer-readable storage medium, characterized in that, A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in any one of claims 1-8 is implemented.

11. A computer program product, characterized in that, The computer program product includes a computer program, and when the computer program is executed by a processor, the method described in any one of claims 1-8 is implemented.

Citation Information

Patent Citations

  • Method and device for locating function performance problem

    CN106909431A

  • Application calling analysis method and electronic equipment

    CN113934475A

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

    CN119538250A

  • Function calling method, related method, device, equipment and storage medium

    CN119577109A

  • Static call graph construction system and method based on large language model enhancement

    CN120011199A