Data processing method and electronic equipment
By recognizing user intent and using a knowledge base and processing model to generate code files, the problem of low efficiency in the repair and optimization of electronic device functions in existing technologies is solved, achieving fast and accurate code generation and improved device stability.
Patent Information
- Application Number
- CN202511072137.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-31
- Publication Date
- 2025-11-07
AI Technical Summary
Existing technologies struggle to accurately identify user intent during the repair and optimization of electronic device functions, resulting in inefficient code writing, poor flexibility, and difficulty in quickly responding to complex or personalized functional requirements.
By identifying user intent, the target code file is generated using the target knowledge base and processing model to optimize the functional services of the target component, including locating abnormal issues based on the knowledge graph and generating repair code.
It improves the accuracy and efficiency of code generation, enables rapid response to user needs, enhances the reliability and stability of equipment, and simplifies user operation processes.
Smart Images

Figure CN120909574A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of artificial intelligence, and more particularly, to a data processing method and an electronic device. BACKGROUND
[0002] In the use of an electronic device, it is possible to repair or optimize the function of a target component in the electronic device, which involves understanding of user intent and code writing. The efficiency of user intent understanding and code writing has a great influence on the accuracy and timeliness of the function repair / optimization of the electronic device. SUMMARY
[0003] The first aspect of the present disclosure provides a data processing method, comprising: identifying a user intent represented by target input data for a target component of an electronic device; processing the user intent into target prompt word data based on a target knowledge base and inputting the target prompt word data into a target processing model; and generating, by using the target processing model, a target code file matched with the user intent, the target code file being capable of being used to optimize target code data of the target component to optimize a function service provided by the target component.
[0004] According to an embodiment of the present disclosure, the method further comprises at least one of the following: in response to a target trigger event, performing, by using the target code file, an optimization operation on the target code data of the target component to optimize a target function service of the target component; and in a case where a target abnormal event occurs in a running process of the electronic device, locating, based on knowledge graph data associated with key data in the target abnormal event, problematic target code data to generate, based on the target code data, a target code file for repairing an abnormal problem.
[0005] According to an embodiment of the present disclosure, identifying the user intent represented by the target input data for the target component of the electronic device comprises at least one of the following: in a case where the target component is a target application on the electronic device, taking operation data of a target user on the target application and / or first interaction data between the target user and a first intelligent agent as the target input data for the target application, and identifying, by using the first intelligent agent, a first user intent represented by the target input data, the first user intent comprising at least one of the following: an intent to repair an abnormal problem, an intent to optimize an application interface of the target application, an intent to optimize a function service of the target application, or an intent to optimize a configuration variable of the target application; and in a case where the target component is a target hardware on the electronic device, taking second interaction data between a target user and a second intelligent agent as the target input data for the target component, and identifying, by using the second intelligent agent, a second user intent of the target user, the second user intent comprising at least one of the following: an intent to repair an abnormal problem, an intent to optimize a configuration variable of the target hardware, or an intent to optimize a function service of the target hardware.
[0006] According to an embodiment of the present disclosure, the user intent is processed into the target prompt word data based on the target knowledge base, including at least one of the following: determining the target knowledge base to be referred based on the content attribute of the user intent, to process the user intent into the target prompt word data with a target field format based on the target reference data in the target knowledge base; or, obtaining preset prompt word template information, and processing the user intent into the target prompt word data with the target field format based on the target knowledge base and the prompt word template information; generating target guide data based on the target knowledge base, and processing the user intent into the target prompt word data based on the selection operation of the target user on the target guide data; obtaining configuration information of the electronic device and / or user portrait information of the target user, and processing the user intent into the target prompt word data based on the configuration information and / or the user portrait information and the target knowledge base.
[0007] According to an embodiment of the present disclosure, the target code file matched with the user intent is generated by using the target processing model, including: obtaining an optimization suggestion generated by the target processing model for the target prompt word data; obtaining a code generation template generated by the target processing model referring to the target knowledge graph data; processing the optimization suggestion into an initial code file by using the code generation template; and reviewing and / or testing the initial code file, and outputting the initial code file as the target code file in the case that the initial code file passes the review and / or test.
[0008] According to an embodiment of the present disclosure, in response to a target trigger event, the optimization operation on the target code data of the target component is performed by using the target code file, including at least one of the following: in response to monitoring that the target abnormal interface occurs in the running process of the electronic device, performing the changing and / or replacing operation on the target code data of the target component based on the target code file by using the first intelligent agent or the second intelligent agent or the third intelligent agent; in response to monitoring that the target abnormal event occurs in the running process of the electronic device, calling the target repair tool to change and / or replace the target code data of the target component based on the target code file, or directly executing the automatic repair code in the target code file to repair the target component; in response to obtaining the optimization suggestion and / or the functional requirement for the target component, controlling the target interactive component of the electronic device to perform the changing and / or replacing operation on the target code data of the target component based on the target code file.
[0009] According to an embodiment of the present disclosure, the target code data with a problem is located based on the knowledge graph data associated with the key data in the target abnormal event, including: obtaining target log data corresponding to the target abnormal event based on the knowledge graph data; analyzing the matching result between at least one of the calling control logic, the data dependency relationship, the event timing corresponding to the key data in the target log data and the target function description of the target component, to locate the target code data with a problem based on the matching result.
[0010] According to an embodiment of the present disclosure, generating, by using the target processing model, a target code file matching the user intention comprises: constructing a target knowledge graph based on a target optimization scheme associated with the target prompt word data, the target knowledge graph at least comprising a mapping relationship between the user intention and corresponding knowledge; obtaining target knowledge data from the target knowledge graph based on a target code generation template; and generating the target code file based on the target knowledge data according to at least one of a method call relationship, a data dependency relationship or an event time sequence relationship in the target code generation template.
[0011] According to an embodiment of the present disclosure, the method further comprises: monitoring log data of the electronic device during running; and in a case where an abnormal event is predicted based on the log data and the target knowledge graph, outputting target prompt information, the target prompt information being capable of being used to generate automatic repair code for repairing an abnormal problem corresponding to the abnormal event.
[0012] A second aspect of the present disclosure provides an electronic device comprising at least one processor and at least one agent capable of running on the at least one processor, the at least one agent being capable of invoking at least one processing model deployed in the electronic device to perform the following operations: identifying a user intention represented by target input data for a target component of the electronic device; processing the user intention into target prompt word data based on a target knowledge base and inputting the target prompt word data into a target processing model; and generating, by using the target processing model, a target code file matching the user intention, the target code file being capable of being used to optimize target code data of the target component to optimize a functional service capable of being provided by the target component. BRIEF DESCRIPTION OF DRAWINGS
[0013] The above and other objects, features and advantages of the present disclosure will become more apparent from the following description of embodiments of the present disclosure taken in conjunction with the accompanying drawings, in which:
[0014] Figure 1 A flowchart of a data processing method according to an embodiment of the present disclosure is schematically shown;
[0015] Figure 2 A schematic diagram of a data processing method according to an embodiment of the present disclosure is schematically shown;
[0016] Figure 3 A schematic diagram of identifying a user intention represented by target input data for a target component of an electronic device according to an embodiment of the present disclosure is schematically shown;
[0017] Figure 4 A schematic diagram of processing a user intention into target prompt word data based on a target knowledge base according to an embodiment of the present disclosure is schematically shown;
[0018] Figure 5A schematic diagram illustrating a principle of generating a target code file matching a user intent by using a target processing model according to an embodiment of the present disclosure is shown;
[0019] Figure 6 A schematic diagram illustrating a principle of performing an optimization operation on target code data of a target component by using a target code file in response to a target trigger event according to an embodiment of the present disclosure is shown;
[0020] Figure 7 A flowchart illustrating a process of locating problematic target code data based on knowledge graph data associated with key data in a target abnormal event according to an embodiment of the present disclosure is shown;
[0021] Figure 8 A flowchart illustrating a process of generating a target code file matching a user intent by using a target processing model according to an embodiment of the present disclosure is shown;
[0022] Figure 9 A schematic diagram illustrating a principle of controlling a target processing model to perform step-by-step reasoning according to an embodiment of the present disclosure is shown;
[0023] Figure 10 A flowchart illustrating a process of a pre-warning prompt operation according to an embodiment of the present disclosure is shown;
[0024] Figure 11 A block diagram of an electronic device that can be used to implement a method of embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0025] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It is to be understood, however, that the description is merely exemplary of the present disclosure, and is not intended to limit the scope of the present disclosure. In the following detailed description of embodiments of the present disclosure, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure. However, it would be apparent to one skilled in the art that the present disclosure can be practiced without these specific details. In other instances, well-known structures and functions have not been described in detail in order to avoid obscuring aspects of the present disclosure.
[0026] The terms used herein are merely used to describe specific embodiments, and are not intended to limit the present disclosure. The terms "include" and "have" and the like used herein indicate the presence of the described features, steps, operations, and / or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
[0027] All terms used herein, including technical and scientific terms, have the same meanings as those generally understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having meanings consistent with the context of the present specification, and should not be interpreted in an idealized or excessively formal manner.
[0028] In the case of using expressions similar to "at least one of A, B, and C, etc.", it is generally intended to include any of the combinations of one of A, B, and C, etc. (for example, system having only A, system having only B, system having only C, system having both A and B, system having both A and C, system having both B and C, and / or system having all of A, B, and C, etc.).
[0029] In the technical solutions of the present disclosure, the user information (including but not limited to user personal information, user image information, user equipment information, such as location information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved are all information and data authorized by the user or authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of related data comply with relevant laws, regulations and standards, take necessary security measures, do not violate public order and good customs, and provide corresponding operation portal for user to choose authorization or refusal.
[0030] The present disclosure provides a data processing method and an electronic device. Before introducing the technical solutions provided by the present disclosure, the related technologies involved in the present disclosure are described.
[0031] In the use process of the electronic device, there may be a situation that part of the components is abnormal or the user wants to optimize the function of the component.
[0032] For the input data proposed by the user for the abnormality or optimization of the components of the electronic device, a simple rule matching method is usually used. These rules are usually pre-fixed and lack flexibility and adaptability. Once the user's input expression changes slightly or the input data contains some ambiguous and implicit information, the user's real intention cannot be accurately identified, resulting in deviation of the function optimization direction from the user's expectation.
[0033] In the process of developing and optimizing electronic devices based on user intent, the primary reliance is on professional programmers manually writing code or generating code from simple templates. For example, when upgrading the functionality of a component of an electronic device, programmers need to write code line by line in a specific programming language based on requirements analysis and design documents, and then debug and test it. This coding efficiency is low, the development cycle is long, and it's difficult to meet the requirements of rapid development for complex electronic device functions and frequent feature updates. Template-based code generation, on the other hand, uses predefined, generic functional module templates to generate code based on user needs and parameters through simple replacement and fill operations. This template-based code generation method lacks flexibility and struggles to adapt to the diverse and personalized needs of electronic device functions. When encountering complex business logic or specific feature optimization requirements, the generated code may require extensive manual modification and adjustment.
[0034] Figure 1 A flowchart illustrating a data processing method according to an embodiment of the present disclosure is shown schematically.
[0035] Figure 2 A schematic diagram illustrating the principle of a data processing method according to an embodiment of the present disclosure is shown.
[0036] like Figure 1 , Figure 2 As shown, the device control method of this embodiment includes operations S110 to S130.
[0037] In operation S110, the user intent represented by the target input data for the target component of the electronic device is identified.
[0038] In some embodiments, user input data targeting a specific component of an electronic device can be collected through various input devices. These input devices may include, for example, a keyboard, mouse, touchscreen, or voice recognition device. The target input data may be operation data or instruction data targeting the target component. For example, this could be operation data from a user adjusting application parameters in the application settings interface, or a user-input instruction such as "increase camera brightness for nighttime shooting."
[0039] In some embodiments, the target component may include software components and hardware components. Software components may include, for example, applications, drivers, or operating systems, while hardware components may include cameras, microphones, displays, heat dissipation modules, communication modules, keyboards and mice, processors, etc. Furthermore, it may involve updating the firmware code of the hardware components, such as updating or repairing the firmware code of the T-CON or Scalar in the display.
[0040] In some embodiments, the target input data can include input of a user raised abnormal problem, user interface (UI) adjustment, function optimization, personalized adaptation, etc. for a software application, and can also include input of a user raised abnormal problem, function optimization, etc. for a hardware component. The target input data is a representation or operation of the user based on his own use experience, and is a direct description of the problem phenomenon or function optimization. For example, the target input data can be a failure encountered by the user when using application A (such as the picture cannot be displayed, the sound cannot be output, the current interface is stuck, etc.), the user's idea and requirement for the interface improvement of application B (such as hoping to simplify the operation button, change the theme color), the user's improvement on the function of application C (such as hoping to optimize the rendering algorithm of the video editing software to improve the rendering speed of the video), the user's finding that the photos taken by the camera of the mobile phone are locally blurred, and the user's finding that the display screen appears to be blooming.
[0041] In some embodiments, the target input data can be recognized and analyzed by natural language processing (such as by using an intent recognition model) to obtain the user intent represented by the target input data. The user intent refers to the user's demand expression, which can be analyzed, parsed and key information extracted from the target input data by a large model to understand the user's meaning representation (i.e. the meaning the user really wants to express). The user intent can include, for example, the goal the user wants to achieve, the problem to be solved or the information to be obtained. The user intent can be a direct intent determined by the target input data, for example, an instruction data directly input by the user; or an implicit intent inferred in combination with context and background knowledge, for example, obtained based on analysis of the user's operation behavior data.
[0042] In operation S120, the user intent is processed into target prompt word data based on the target knowledge base and input to the target processing model.
[0043] In some embodiments, the target knowledge base can include professional knowledge, technical documents, common problem solving solutions, etc. related to the target component. For example, for a camera component, the corresponding knowledge base can include optical principles, image processing algorithms, parameter setting suggestions under different shooting scenes, etc. For example, the target knowledge base can include a pre-constructed knowledge graph database, a vector database (VecDB), a code repository (CodeRepo), and can also include some technical forums, abnormal problem solving case libraries, etc.
[0044] In some embodiments, relevant information and rules can be extracted from the target knowledge base according to the identified user intent to obtain target prompts (Prompt) corresponding to the user intent. These prompts can be keywords, phrases or structured data used to guide the target processing model to generate appropriate code. For example, in the case of the user intent is to optimize the brightness of night shooting of the camera, the prompt data can include keywords such as “night shooting”, “brightness improvement”, “image noise reduction”, etc.
[0045] In some embodiments, the target prompt can be obtained by processing the user intent according to a preset prompt format or template. For example, according to different business scenarios and user demand types, multiple corresponding prompt formats are preset, the target prompt format corresponding to the current user intent is selected, and the target prompt format is filled with keywords extracted from the user intent to obtain the target prompt. For example, in the electronic product troubleshooting scenario, the preset prompt format can be designed as “Problem description: [user's detailed description of the fault phenomenon]; Device information: [device model, system version, etc.]; Operation history: [recent operations such as software updates, hardware replacements, etc.]; Expected results: [user's desired state such as normal use of the device]”.
[0046] The prompt data can also be generated by introducing some guide data recommendations for standardizing the input of the prompt. The guide data may, for example, be effective prompts and related data collected from past user consultation records, problem solving cases, data arranged according to the experience of experts in the relevant field, and relevant information in external resources. For example, when processing application failure problems, the guide data can include user's commonly used description words and questioning methods, technical personnel's given targeted prompts, commonly used prompts and thinking logic when processing application failure problems, and relevant information in technical forums. The guide data can be used as a direct reference for generating prompts or for standardizing the input format of the prompts. For example, the target prompt corresponding to the current user intent can be constructed by matching the guide data related to the current user intent and based on the content, logic, and format of the guide data.
[0047] The user intent can be further optimized to obtain prompt word data in combination with the configuration and user information of the electronic device. For example, if the user question positioning is unclear, the question or demand for the target component can be more accurately positioned based on the device information or user historical context or operation data of the user. The configuration information of the electronic device can include hardware information and software information. The hardware information can include processor model, memory size, storage capacity, battery health, camera parameters, etc. The software information can include operating system version, installed application list and version number, system update history, etc. The user information can include user basic information (age, gender, occupation, etc.), historical behavior information (device usage frequency, usage time, operation path, usage preference, etc.), question feedback history information, etc.
[0048] In some embodiments, the target processing model is used to generate a target code file matching the user intent based on the target prompt word. The target processing model can be a locally deployed AI model or a cloud model. The target processing model can be a model that can be called or included by an artificial intelligence agent (AI Agent) for diagnosis and repair, or a large model for diagnosis and repair or code generation.
[0049] In operation S130, a target code file matching the user intent is generated using the target processing model. The target code file can be used to optimize the target code data of the target component to optimize the functional services that the target component can provide.
[0050] In some embodiments, the target prompt word data is input into the target processing model, and the target processing model generates a target code file matching the user intent based on the input prompt word data and the knowledge learned by itself. The target code file can be an optimization algorithm or a parameter adjustment script for the target component. For example, a code for adjusting the brightness gain parameter in the camera image processing algorithm.
[0051] For example, the target code file can be used to repair existing abnormal problems or to-be-optimized problems of the target component, and the target code file contains the repaired code logic. For example, when the target application or hardware firmware fails (such as crash, function failure, data error, etc.), the target code file can be used to repair the existing abnormal problems or to optimize the to-be-optimized problems. For example, the target code file can be directly used to replace the source code in the application or hardware firmware to achieve the purpose of repair or optimization.
[0052] In some embodiments, the target code file can be obtained by modifying the original code segment of the target application or the original firmware code of the hardware, or can be regenerated. The modification or replacement of the code segment of the target application or the firmware code of the hardware can solve the abnormal problems considered by the user or implement the user's demand. For example, the code segment of the target application can include the code for optimizing the camera imaging quality in the camera application, or the change of the signal strength threshold value or the trigger condition for switching the network connection in the network connection application, or the code for repairing the abnormal network connection; the firmware code of the hardware can include the change of the configuration variable of the hardware to improve the functional parameters of the hardware, such as the CPU power range or the maximum power supply of the battery, and the like.
[0053] For example, the target code file can be an initially generated code file, or a code file after code review and unit test.
[0054] In some embodiments, in the process of generating the target code file by the target model, the generation of the target code file can also be performed according to the pre-designed code template, the modification suggestion, or further in combination with the configuration information of the electronic device, the use environment data and other factors.
[0055] The data processing method provided by the present disclosure can effectively improve the development efficiency, quickly respond to the user's demand for optimizing the function of the target component, and generate the relevant code file in time by identifying the user's intention and generating the code by using the target processing model. The target prompt word generated based on the target knowledge base contains professional knowledge and practical data, which can guide the code generation process of the target processing model to improve the accuracy of the code generation of the target model, reduce the errors and vulnerabilities in the code generation process, and improve the repair efficiency for abnormal problems or the optimization efficiency for problems to be optimized.
[0056] In some embodiments, in the process of generating the target code file by the target model, the generation of the target code file can also be performed according to the pre-designed code template, the modification suggestion, or further in combination with the configuration information of the electronic device, the use environment data and other factors. Figure 1 Based on the data processing method shown in the figure, the data processing method of the present embodiment can include at least one of the following steps S210-S220.
[0057] In operation S210, in response to a target trigger event, the optimization operation of the target code data of the target component is performed by using the target code file to optimize the target function service of the target component.
[0058] In some embodiments, the target event triggered by different types of input data can be different. For example, in the case of input data related to abnormal problems, the target event can be directly performing an optimization operation on the target code segment after generating the target code file. In the case of input data related to optimization requirements, the optimization operation can be performed after communicating with the user and obtaining user authorization. The type of input data can be determined by input channels, semantic understanding, etc. For example, if the input data is an error log file from the system, the data type is abnormal problems, and if the input data is from the "feedback and suggestion" window, the data type is optimization requirements.
[0059] In some embodiments, the optimization operation can include code update, replacement, hardware configuration parameter reconfiguration, firmware reflash, firmware recovery, parameter tuning, etc. The target function service can include, for example, camera imaging, screen display, mouse and / or keyboard sensitivity, touch panel anti-mis touch function, wireless network connection function, etc.
[0060] For example, the agent can interact with the corresponding target component to optimize the target function service of the target component. In the case of hardware problems of the electronic device, the agent can interact with the BIOS of the electronic device to update the variables of the hardware. For example, the agent sends specific instructions or data to the BIOS to update the variables related to the read / write speed of the hard disk interface, thereby optimizing the read / write performance of the hard disk and solving the problem of slow read / write speed.
[0061] In the case of software problems, the agent can interact with the corresponding application to change the code corresponding to the configuration parameters of the application, or change the code corresponding to the running parameters of the hardware relied on by the application, to solve the problem of the software. For example, a picture editing software crashes when opening a picture in a specific format. The agent interacts with the picture editing software to find the code part corresponding to the configuration parameters related to processing the picture format, and modifies these codes based on the agent (such as adjusting the algorithm parameters of picture decoding), thereby solving the problem of software crash. For example, a large 3D game may have a problem of screen freezing during running. In addition to the code problem of the game itself, it may also be caused by unreasonable running parameters of the graphics card. The agent can interact with the graphics card to adjust the code related to the running parameters of the graphics card in the graphics card driver, thereby solving the problem of game screen freezing.
[0062] In some embodiments, the target component can be repaired by invoking or downloading a relevant repair tool based on a program instruction set to optimize the target function service of the target component. The program instruction set is a collection of instructions that a computer program can recognize and execute, which specifies how computer hardware and software work together to complete a specific task. The repair tool can be an antivirus software, a system maintenance tool, a driver repair tool, etc.
[0063] For example, when the target component is infected with a virus, the program instruction set triggers the running of the antivirus software. The antivirus software scans the target component and uses the virus detection algorithm built-in the antivirus software to identify and remove the virus, thereby repairing the infected target component.
[0064] For example, if there is no appropriate repair tool on the electronic device, the program instruction set can guide the device to download the corresponding repair tool from a remote server. For example, when a hardware driver of the device has a problem (such as display abnormality caused by failure of the display card driver), the program instruction set connects to the server of the device manufacturer through the network and downloads the latest driver repair tool. After downloading, the tool repairs the display card driver (such as updating the driver version, repairing the error code in the driver, etc.) using the target code file (repair logic code contained in the driver repair tool), solving the problem of display abnormality.
[0065] In some embodiments, the agent can also directly execute the repair with the target code file to optimize the target function service of the target component. For example, if application A frequently crashes, the agent can inject the generated repair code (i.e. the target code file) into the application program to replace the original error function code. Or, if the application program supports dynamic loading of code, the agent can directly load the repair code, so that the application program uses the correct logic during running, thereby solving the crash problem and achieving the repair of the target component.
[0066] In operation S220, when the target abnormal event occurs during the running of the electronic device is monitored, the target code data causing the problem is located based on the knowledge graph data associated with the key data in the target abnormal event, so as to generate the target code file for repairing the abnormal problem based on the target code data.
[0067] In some embodiments, during the running of the electronic device, the system continuously monitors various running indicators and state information, and can detect preset abnormal events through a series of monitoring rules and threshold values. The target abnormal event may, for example, include an abnormal pop-up prompt, a system error, a blue screen, a system high-temperature alarm, an abnormal sound collection or output, a system or application update anomaly, a network connection anomaly, a hardware compatibility anomaly, a camera anomaly, and the like.
[0068] In the case of detecting a target abnormal event, key data in the event is extracted. The key data may, for example, include information related to the time, location, device state, and cause of the abnormality. For example, the key data may include an error code, an error reason keyword, a pop-up window content, an abnormality log, abnormal sensor data, abnormal operation data, and the like.
[0069] By correlating and analyzing the extracted key data with the data in the knowledge graph, the target code causing the problem is located through reasoning and matching. The knowledge graph is a knowledge base that structurally represents entities and relationships between entities. In this embodiment, the knowledge graph can be used to represent the relationships between functions, components, and codes. In the case of a malfunctioning function, the malfunctioning function node can be traced back along the associated component and code path to directly locate the problem code and generate a self-repairing code at the code level. For example, when the photographing function malfunctions, the photographing function node is found in the knowledge graph, and then the components (such as a camera, an image processing algorithm, and the like) connected to the node are investigated. If the problem is a blurred photograph, the focus control code in the camera component is located. If the problem is a distorted photo color, the color correction code in the image processing algorithm component is located.
[0070] In some embodiments, the target processing model can be used to identify logical problems (such as errors in execution flow, condition judgment, loop control, and the like) in the target code data, parameter problems (such as incorrect parameter values, parameter type mismatches, or missing parameters), and context relationship problems (such as errors in the dependency relationship between different parts of the code, scope relationship, and the like), and automatically repair the problem points using the code generation capability of the target processing model. For example, when the target processing model detects a logical error in the target code data, the corresponding repair code can be directly generated, and the repair code can be used to replace the incorrect part of the target code data to obtain a target code file for repairing the abnormal problem.
[0071] In some embodiments, the target processing model can also generate code by referring to a code case library or an open source code database. For example, after determining the cause of the problem in the target code data, the target processing model can select a suitable code example from the code case library or the open source code database as a reference, modify the reference code according to the characteristics and context of the current code problem (such as the variable type and scope requirements of the current code), and generate a target code file for repairing the abnormal problem
[0072] The embodiments of the present disclosure can adjust the code data of the target component in a timely manner according to the actual use and environmental changes of the device, so as to optimize the target function service by performing the optimization operation in response to the target trigger event. After monitoring the abnormal event, the knowledge graph is used to quickly locate the problem code data and generate a repair code file, so as to timely solve the problems occurring in the device running process and improve the reliability and stability of the device.
[0073] Figure 3 An illustrative diagram of identifying a user intent represented by target input data for a target component of an electronic device according to an embodiment of the present disclosure is shown.
[0074] As shown in Figure 3 As shown in the data processing method shown in Figure 1 The data processing method of the present embodiment can further include at least one of operation S310 to operation S320. It should be noted that other implementation details of the data processing method of the present embodiment can be found in the embodiment part of the data processing method shown in Figure 1 The data processing method of the present embodiment can further include at least one of operation S310 to operation S320. It should be noted that other implementation details of the data processing method of the present embodiment can be found in the embodiment part of the data processing method shown in
[0075] In operation S310, in the case that the target component is a target application on the electronic device, the operation data of the target user acting on the target application and / or the first interaction data between the target user and the first intelligent agent are taken as the target input data for the target application, and the first user intent represented by the target input data is identified by the first intelligent agent, the first user intent including at least one of the following: an intent to repair an abnormal problem, an intent to optimize the application interface of the target application, an intent to optimize the function service of the target application, or an intent to optimize the configuration variable of the target application.
[0076] In some embodiments, the target application can be a game application, a social application, a multimedia playback application, a computer manager application, etc. The target input data is obtained by collecting the operation data of the target user acting on the target application and / or the first interaction data between the target user and the first intelligent agent.
[0077] In some embodiments, the operation data can be data generated by the user when adjusting the function configuration options of the application, which can include, for example, option information, user operation time, setting values before and after operation, device information of the operation, and the like. The function configuration options of different applications can be the same or different, and the function configuration options can reflect the user's personalized preferences and usage habits for the application functions.
[0078] In some embodiments, the operation data can also be operation data of the user feeding back problems during use of the application. The user can feed back problems to the application developer or the relevant service provider in various ways, such as, for example, submitting a problem description through a feedback portal in the application, filling out an online questionnaire, sending an email, commenting in an application store, and the like. The operation data of the feedback problems can include the process and related information of the user feeding back the problems. For example, when the user submits a problem through a feedback portal in the application, the operation data can include the time of the user submitting the feedback, the channel of the feedback, the specific content of the feedback problem, the application version number, device information, and the like.
[0079] In some embodiments, the first intelligent agent has multiple capabilities such as user interaction, problem analysis, data processing, and the like, and can understand natural language input of the user. The first interaction data can be data generated by the target user and the first intelligent agent during the interaction process, which can include, for example, text data input by the user, voice information, operation records of clicking options or buttons provided by the intelligent agent, and the like. Exemplarily, the first intelligent agent can be an AI diagnosis and repair intelligent agent or a housekeeper intelligent agent running in an electronic device, which is provided with an interface such as a dialogue box for interacting with the user. The user can tell the intelligent agent about abnormal problems or related needs or optimization suggestions for the target application through the dialogue box, and the intelligent agent analyzes and processes the received first interaction data to extract valuable information to form the target input data. The target data can more accurately and clearly reflect the situation and needs of the user.
[0080] In some embodiments, the user intent can be identified by using an intent recognition model in the first intelligent agent. For example, upon receiving the target input data, the first intelligent agent directly determines the user intent by using a built-in intent recognition model. The user intent can also be identified by the intelligent agent calling an intent recognition model. In this case, the intent recognition model does not exist directly in the intelligent agent, but exists as an independent external resource or service. When the first intelligent agent needs to identify the user intent, it can send the target input data to the intent recognition model through a network or other communication means, and request the model to analyze and identify. After the external model processes the information, the identification result (i.e., the user intent) is returned to the first intelligent agent.
[0081] In some embodiments, the user intention can be an intention to fix an abnormal problem, an intention to optimize an application interface, an intention to optimize an application function service, or an intention to optimize a configuration variable of an application.
[0082] In operation S320, in a case where the target component is a target hardware on the electronic device, the second interaction data between the target user and the second agent is taken as target input data for the target component, and a second user intention of the target user is identified by the second agent, the second user intention including at least one of an intention to fix an abnormal problem, an intention to optimize a configuration variable of the target hardware, and an intention to optimize a function service of the target hardware.
[0083] In some embodiments, the target hardware can be a processor of the electronic device, such as a CPU / GPU / NPU, or can be a camera, a keyboard / mouse, a screen, a touchpad, a microphone, a speaker, a heat dissipation module, etc.
[0084] In some embodiments, the second agent has multiple capabilities such as user interaction, problem analysis, and data processing, and can understand natural language input of the user. The second interaction data can be data generated in an interaction process between the target user and the second agent, and can include, for example, text data, voice information, and operation records of clicking options or buttons provided by the agent. The second agent is provided with an interface, such as a dialog box, for interacting with the user. The target user can tell the second agent about an abnormal problem of the target hardware or related requirements or optimization suggestions through the dialog box. The second agent analyzes and processes the received second interaction data, extracts valuable information, and forms target input data. The second agent can be a special agent designed for hardware management, or can be the same agent as the first agent, such as the AI diagnosis and repair agent or the housekeeper agent mentioned above.
[0085] In some embodiments, the second agent can identify the user intention through a built-in intention recognition model, or can identify the user intention by calling an intention recognition model. The specific process is similar to that of the first agent in operation S310, and will not be repeated here.
[0086] In some embodiments, the second user intention can be an intention to fix a hardware abnormality, an intention to change a hardware function configuration variable, or a suggestion to optimize a hardware startup speed. For example, the second user intention can be an intention to repair a hardware running in an unexpected state to restore its normal function, or an intention to adjust performance parameters PL1 / PL2 of a CPU.
[0087] The embodiments of the present disclosure can automatically identify the user intent through the operation data of the user and the interaction data between the user and the intelligent agent, quickly understand the problems and needs encountered by the user in the use process, and improve the efficiency of development and maintenance. In this process, the user does not need to have professional technical knowledge, and only needs to operate normally and interact with the intelligent agent. The intelligent agent can automatically identify the intent and perform corresponding processing, simplifies the processing flow, effectively improves the user experience, and reduces the waiting or self-exploration time of the user.
[0088] Figure 4 A schematic diagram illustrating the principle of processing the user intent into target prompt word data based on a target knowledge base according to an embodiment of the present disclosure is shown.
[0089] As shown in Figure 4 , on the basis of the data processing method shown in Figure 1 , the processing of the user intent into target prompt word data based on a target knowledge base of the present embodiment can further include at least one of operation S410 to operation S440. It should be noted that other implementation details of the data processing method of the present embodiment can be found in the embodiment part of the data processing method shown in Figure 1 , which will not be described here.
[0090] In operation S410, the target knowledge base to be referred to is determined based on the content attribute of the user intent, so as to process the user intent into target prompt word data with a target field format based on the target reference data in the target knowledge base.
[0091] In some embodiments, the collected user intent is analyzed to determine the content attribute corresponding to the user intent. For example, if the user intent is to repair hardware failure, the content attribute can include hardware type, failure type, etc. The user intent can be an intent for a software application, such as an intent to repair abnormal problems, an intent to optimize the application interface, an intent to optimize application function services, or an intent to optimize the configuration variables of the application; or it can be an intent for hardware, such as an intent to repair hardware abnormalities, an intent to change hardware function configuration variables, an intent to optimize hardware startup speed, etc.
[0092] In some embodiments, the target knowledge base corresponding to the disagreement graph type can be different, and the most relevant knowledge base can be selected as the target knowledge base from multiple knowledge bases according to the content attributes obtained by analysis. For example, for the hardware failure repair intention, the hardware knowledge base containing hardware failure solutions, common failure cases, etc. is selected. The content of these knowledge bases can be official channel published content, or community content formed by user spontaneous exchange, etc. For example, for repairing the abnormal problem of the target application, the related content of the forum, BBS, microblog or UP master related to the abnormal problem of the target application such as a certain game can be referred to as the target knowledge base. For the abnormal problem of the camera, the related content of the diagnostic library, forum, etc. related to the camera product or device model can be referred to as the target knowledge base.
[0093] In some embodiments, the target reference data related to the user intention can be extracted from the determined target knowledge base, and the data can be arranged and converted according to the preset target field format to form the target prompt word data with the target field format.
[0094] For example, the reference data can be the specific description or optimal description of the similar problem of the current user intention. For example, it can be the topic name with the most comments or the most forwarding and collection on the user forum, which can be used as a reference basis for constructing the AI reply content. The expression of the user intention can be optimized according to the keyword or sentence structure designed according to the topic name, so that the user intention becomes a prompt word with a target field. For example, the user intention is “software A always crashes, what to do”, and after searching in the target knowledge base (such as the related application forum), it is found that the topic name with high comments, forwarding and collection is “
Emergency Help
[0095] For example, the target reference data can also be the user feedback of similar problems in other AI tools, and the question or sentence structure with the highest user satisfaction for similar problems can be used as the target reference data. The user satisfaction can be reflected by the user's comments, likes, and re-questioning rate, etc. The original prompt word field format can be further optimized by the target reference data, and the user intention can be processed according to the optimized prompt word field format to obtain the target prompt word.
[0096] The embodiments of the present disclosure can more accurately extract information highly related to the user intent from the relevant knowledge base by determining the target knowledge base based on the user intent content attribute, avoid searching in a large amount of irrelevant data, and improve the accuracy of user intent processing and target prompt data generation.
[0097] In operation S420, preset prompt word template information is obtained, and the user intent is processed into target prompt word data with a target field format based on the target knowledge base and the prompt word template information.
[0098] In some embodiments, the prompt word template information can be prompt word templates provided by the target processing model itself. These prompt word templates cover common structures and expression ways of different types of user intents, and can include the language structure of the prompt word and the field data that needs to be included. For example, for a request type intent, the language structure of the template can be "please provide [request content], [related condition]", and the field data that needs to be included can be function name, component name, question / demand, etc.
[0099] In some embodiments, the user intent is searched and matched in the preset prompt word template library, the matched prompt word template information is combined with the target knowledge base, and target prompt word data with a target field format is obtained. For example, the target knowledge base can be used to individually adjust the matched prompt word template, and can also be used to fill in the fields in the matched prompt word template. For example, specific information can be obtained from the target knowledge base according to the fields in the prompt word template and filled into the corresponding fields of the template to generate target prompt word data with a target field format. For example, the user intent is "adjust the fan speed of the computer graphics card", and the matched prompt word template can be "change [hardware name] [function configuration variable] to [target value], hardware model [specific model]". Then, the current graphics card model, fan speed adjustable range, etc. can be queried from the target knowledge base according to the keywords in the prompt word template, and the information obtained from the target knowledge base is filled into the corresponding fields of the matched prompt word template to obtain the target prompt word data "change [graphics card] [fan speed] to fast, graphics card model [abc], fan speed adjustable range [30%-100%]".
[0100] The embodiments of the present disclosure generate target prompt word data according to preset prompt word templates. When processing a new user intent, only the template needs to be appropriately adjusted and expanded, without the need to redesign the entire processing flow, thereby enhancing the efficiency and accuracy of prompt word generation. The preset prompt word templates provide a clear framework for prompt word construction, making the format of the target prompt word data uniform, facilitating the realization of structured storage in the target model, helping the model to more clearly and quickly understand each component of the user intent, and thereby more accurately generating the corresponding answer or solution.
[0101] In operation S430, target guide data is generated based on the target knowledge base, and the user intent is processed into target prompt word data based on the selection operation of the target user on the target guide data.
[0102] In some embodiments, the target guide data is used to guide the user to input more content and provide more key information, so as to more accurately analyze the user intent. When the user initiates the interaction, a search can be performed in the target knowledge base according to the preliminary input (such as a keyword, a short question) of the user, to find similar questions and records. For example, the user inputs “I want to adjust the UI interface of application A”, and a search is performed in the knowledge base to find similar questions and records. The expression, sentence structure and key elements of the searched similar questions and records are analyzed, and based on the analysis results, the target guide data is generated. For example, it is found that many questions about UI interface adjustment contain content such as style, color, wallpaper, element arrangement, shortcut setting, etc., and the target guide data can be “Please describe the specific content you want to adjust and the expected effect”.
[0103] In some embodiments, the generated target guide data is displayed to the user, so that the user can select or further input information according to the guide data. The information further input by the user is analyzed and processed, key information is extracted, and the key information is processed according to predetermined rules and formats to generate target prompt word data.
[0104] The embodiments of the present disclosure guide the user to provide more key information through guide data, reduce the ambiguity and uncertainty of the user when expressing the intent, effectively improve the accuracy and richness of the user input information, help to more quickly understand the user intent, and improve the interaction efficiency.
[0105] In operation S440, configuration information of the electronic device and / or user portrait information of the target user is obtained, and the user intent is processed into target prompt word data based on the configuration information and / or the user portrait information and the target knowledge base.
[0106] In some embodiments, the user intent can be further optimized to obtain the prompt word data in combination with the configuration information of the electronic device and the user information. The configuration information of the electronic device may, for example, include software configuration (such as operating system, driver, network, power supply configuration, etc.) and hardware configuration (such as processor, memory, graphics card, input / output device configuration, etc.), and the user information may, for example, include basic information of the user (such as age, gender, occupation, etc.), behavior data of the user (such as historical feedback data, historical operation data, context data, etc.).
[0107] In some embodiments, configuration information and / or user profile information of the electronic device can be combined to retrieve relevant knowledge and solutions from a target knowledge base, and user intent can be processed into target prompts. On the one hand, when the user's problem is unclear, the accuracy of problem localization can be improved by further analyzing the configuration information of the electronic device and user information (such as historical operation data and contextual information). For example, if a user reports that an application cannot start normally, the device's processor model and memory size can be combined to determine whether the problem is caused by insufficient device performance or by a problem with the application itself. For example, if a user reports that an application cannot load data, the user's historical operation data (such as the user restarting the network) and contextual information (such as the user previously reporting network connection problems) can be combined to determine whether the application's inability to load data is due to a network problem. The configuration information and / or user profile information of the electronic device can serve as a further supplement to the user's input data, thereby more accurately locating the problem or need for the target component and clarifying the user's intent.
[0108] In some embodiments, target prompts can be generated by comprehensively analyzing electronic device configuration information, user profile information, and data from a target knowledge base. For example, for a young gaming enthusiast using a low-spec computer, whose intention is to improve computer game performance, target prompt data can be generated by combining computer hardware knowledge bases, game performance optimization knowledge bases, and information such as the user's age and gaming preferences. For instance, "Recommend a cost-effective graphics card upgrade solution for [young gaming enthusiast]'s [low-spec computer] to improve the performance of [frequently played game name]".
[0109] This embodiment of the disclosure combines electronic device configuration information and user profile information to accurately understand the true intent of user input, and generates prompt data based on the characteristics of different users and different devices, thereby enabling the generation of personalized prompt data and improving the targeting of subsequent processing.
[0110] Figure 5 The diagram illustrates the principle of generating a target code file that matches a user intent using a target processing model according to an embodiment of the present disclosure.
[0111] like Figure 5 As shown, in Figure 1 Based on the data processing method shown, this embodiment further includes operations S510 to S540 in generating a target code file matching the user's intent using a target processing model. It should be noted that other implementation details of the data processing method in this embodiment can be found in [link to relevant documentation]. Figure 1 The embodiments of the data processing method shown are not described in detail here.
[0112] At operation S510, an optimization suggestion generated by the target processing model for the target prompt word data is obtained.
[0113] In some embodiments, the target prompt word is input into the target processing model, the target prompt word data is analyzed by the target processing model, and an optimization suggestion related to the user intent is generated, which can include optimization of an algorithm, optimization of a data structure, optimization of code, optimization of logic, etc. For example, in the case where the user intent is to fix an abnormal problem, the target model can obtain a repair suggestion for the abnormal problem based on the target prompt word, such as a suggestion to modify the code structure of the code corresponding to the abnormal problem, replace the algorithm, etc.
[0114] At operation S520, a code generation template generated by the target processing model with reference to the target knowledge graph data is obtained.
[0115] In some embodiments, the target processing model can generate a code generation template by referring to the target knowledge graph data. For example, after the target processing model receives the target prompt word processed based on the user intent, it can query related entities and relationships in the target knowledge graph based on the target prompt word, and use the queried content for reasoning to generate a code generation template matching the user intent. For example, the code generation template can include a project structure framework, a class / function framework database operation framework, a business logic code snippet, a configuration code, etc., which can provide a framework and guidance for subsequent code generation or code optimization. The target knowledge graph data may, for example, include syntax rules, best practices, common patterns, etc., and the target code generation template can provide a framework and guidance for subsequent code generation.
[0116] At operation S530, the optimization suggestion is processed into an initial code file using the code generation template.
[0117] In some embodiments, the optimization suggestion can be specified in code form using the code generation template to form an initial code file. For example, by analyzing the optimization suggestion, extracting key information, and converting the key information into parameter values in code form, the determined parameter values are passed to the code template, and the parameter values are filled into the corresponding positions of the code generation template according to the code framework and placeholders in the code generation template to generate an initial code file.
[0118] At operation S540, the initial code file is reviewed and / or tested, and in the case where the initial code file passes the review and / or testing, it is output as a target code file.
[0119] In some embodiments, the initial code file can be subjected to code review, which refers to a process of evaluating code changes, usually before merging into the main branch, to improve code quality through code review. Through code review, potential problems in the code can be found and corrected, and the quality of the code can be improved. Code review can be manual review and / or automated tool review, for example, a team member discusses and reviews the initial code file, or an automated tool such as a static code analysis tool, a security scan, etc. reviews the code.
[0120] For example, the review process can include submitting the code change to the system after the initial code file is generated, automatically pre-checking the code based on an automated tool, obtaining the pre-checking result, and assigning the pre-checking result to a reviewer. The reviewer further checks the code and obtains a code review result. The code review result can be in the form of a report, which can include code style issues, potential errors, security vulnerabilities, etc.
[0121] In some embodiments, the initial code file can be subjected to unit testing, which refers to a correct test of the smallest testable unit (such as a function, method or class) in software to ensure that each unit can correctly perform the expected function independently of other units. The initial code file can be subjected to unit testing by writing test cases. For example, a consistent test case is written for each unit, the test case covers normal, boundary and abnormal cases, and the test case is run using a test framework to obtain the test result of the unit.
[0122] In some embodiments, the initial code file is further processed according to the results of the review and / or testing: in the case where the initial code file passes the review and / or testing, the initial code file is output as a target code file. In the case where the initial code file does not pass the review and / or testing, the generation of the code file is triggered again. The review results and / or test results can be referred to for suggestions to regenerate the code file, and the newly generated code file is subjected to review and / or testing. In the case where the review and / or testing pass, the newly generated code file is output as a target code file.
[0123] The embodiments of the present disclosure utilize a target processing model to realize automatic generation of code, reduce code writing time, guide the target processing model to generate code through knowledge graph data and prompt word data, and effectively improve the flexibility and accuracy of code automatic generation. The review and evaluation steps are introduced to timely find and correct errors in the code and improve the accuracy of the code.
[0124] Figure 6The diagram illustrates a principle of performing optimization operations on target code data of a target component using a target code file in response to a target triggering event, according to an embodiment of the present disclosure.
[0125] like Figure 6 As shown, in Figure 1 Based on the data processing method shown, this embodiment, in response to a target triggering event, further includes performing optimization operations on the target code data of the target component using the target code file, which may include at least one of operations S610 to S630. It should be noted that for other implementation details of the data processing method of this embodiment, please refer to... Figure 1 The embodiments of the data processing method shown are not described in detail here.
[0126] In operation S610, in response to the detection of a target abnormal interface during the operation of the electronic device, the first, second, or third intelligent agent performs modification and / or replacement operations on the target code data of the target component based on the target code file.
[0127] In some embodiments, when an electronic device triggers a specific abnormal interface during operation, an intelligent agent modifies or replaces the device's code based on a target code file generated from the identification results of the target abnormal interface to fix the problem. Different intelligent agents may play different roles; for example, depending on the type, severity, or technical field of the abnormal interface, a suitable intelligent agent can be selected to perform optimization operations on the target code data. For example, a first intelligent agent can be used to perform application optimization operations, a second intelligent agent can be used to perform hardware optimization operations, and a third intelligent agent, independent of the first and second intelligent agents, can perform modification and / or replacement operations on the target code data of the target component based on the target code file. Of course, the above three intelligent agents can also be sub-parts of an AI diagnostic and repair intelligent agent.
[0128] For example, the target abnormal interface can be an abnormal pop-up / system error window, a system / application frozen interface, or a system / application error interface. For example, an abnormal pop-up / system error window can be a prompt that actively appears after the system or application detects a problem, such as a system high temperature alarm, abnormal sound acquisition, abnormal output, abnormal system or application update, abnormal network connection, abnormal hardware compatibility, or abnormal camera, or the entire interface. A system frozen interface may be caused by hardware or driver problems, resulting in the operating system being unable to function properly, such as a blue screen or screen freeze. An application frozen interface may indicate that the current application is unresponsive, but other system functions are normal. A system / application error interface can be a prompt displayed within the system interface after the system or application detects a problem, but the user can still operate other functions.
[0129] In operation S620, in response to monitoring that the target abnormal event occurs in the running process of the electronic device, a target repair tool is called to change and / or replace the target code data of the target component based on the target code file, or the automatic repair code in the target code file is directly executed to repair the target component.
[0130] In some embodiments, the abnormal event can be an unexpected state or behavior of the device in the running process, which can include, for example, an abnormal pop-up prompt, a system error, a blue screen, a system high-temperature alarm, an abnormal sound collection or output, a system or application update exception, a network connection exception, a hardware compatibility exception, a camera exception, etc. After the abnormal event occurs, a related repair tool is called or downloaded to repair the target component, such as a virus killing tool or a driver repair tool to kill viruses or repair drivers.
[0131] In some embodiments, the target component can be repaired by calling or downloading a related repair tool, such as killing viruses by a virus killing tool or repairing drivers by a driver repair tool.
[0132] In some embodiments, the target component can be repaired by changing / replacing the target code data, such as writing repair code into a specified position of the target code file corresponding to the target component to achieve repair. The target component can also be repaired by executing the automatic repair code in the target code file. The automatic repair code can be a plugin in the file package, which is executed by an intelligent agent to repair. Alternatively, the target code file itself is an executable code, which can be executed to repair the problematic component by performing a specific repair operation. For example, the target code file can be a firmware update tool, which can repair the target component by re-flashing the firmware. The target code file can be a data recovery script, which can repair the target component by executing the file recovery.
[0133] In operation S630, in response to obtaining the optimization suggestion and / or the functional requirement for the target component, the target interactive component of the electronic device is controlled to perform a change and / or replacement operation on the target code data of the target component based on the target code file.
[0134] In some embodiments, the optimization suggestion and / or the functional requirement can be actively input by a user, automatically generated by a system, or pushed by a remote server. For example, a user submits a functional requirement "improve camera image quality" through a device interface; the system automatically generates an optimization suggestion "reduce voltage" after detecting that the CPU temperature is too high; a manufacturer updates and issues a functional requirement "add AI noise reduction function".
[0135] In some embodiments, the target interaction component can be the target component itself that has the problem, a component associated with the target component, or a system underlying control component. The target interaction component can perform a change and / or replacement operation on the target code data of the target component based on the target code file to control the target component of the electronic device. For example, when the target component is hardware, the target interaction component can be a system underlying control component (e.g., BIOS), which updates the variable of the hardware by interacting with the BIOS. When the target component is software, the target component can be an agent, and the configuration parameter of the application or the hardware operation parameter dependent on the application can be changed by the interaction between the agent and the corresponding application.
[0136] The embodiments of the present disclosure realize code repair and optimization in different scenarios by combining multiple trigger scenarios and multiple execution subjects, so as to improve the timeliness, flexibility and accuracy of code repair.
[0137] Figure 7 An illustrative flowchart of locating target code data having a problem based on knowledge graph data associated with key data in a target abnormal event is shown according to an embodiment of the present disclosure.
[0138] As shown in Figure 7 Based on the data processing method shown in Figure 1 The data processing method based on knowledge graph data associated with key data in a target abnormal event to locate target code data having a problem according to the present embodiment can further include operation S710 to operation S720. It should be noted that other implementation details of the data processing method according to the present embodiment can be found in the embodiment part of the data processing method shown in Figure 1
[0139] In operation S710, target log data corresponding to the target abnormal event is obtained based on the knowledge graph data.
[0140] In some embodiments, the knowledge graph data can include function description information, function annotation information, problem description information and log content information, etc.
[0141] Exemplarily, the function description information can be extracted from a relevant Product Requirement Document (PRD). The PRD document includes the functions, features, performance requirements, user interface design, business processes, and the like that the product should have. The function annotation information can be extracted from the code file. The code file can be a file written in a programming language to implement the functions of the product, including various function, class, method, and the like code structures. The function annotation information refers to the annotations added in the code to facilitate the understanding of the function, purpose, parameter meaning, and the like of the code by relevant technical personnel during the code writing process. The extracted function annotation information can assist in understanding the specific functions implemented by the code and the correspondence between the code and the product. The problem description information and the log content information can be extracted from the log file. The log file is a file in which the system automatically records various information during the running process, which can include operation records, error information, warning information, and the like. The problem description part is located in the log file, and the problem description and the detailed log content (which can include error code, timestamp, operation steps, and the like information) near the problem description are extracted.
[0142] In some embodiments, the entities and relationships in the knowledge graph can be defined according to the integrated data, and a suitable knowledge graph storage mode (such as a graph database) can be selected to store the extracted entities and relationships, so as to obtain a knowledge graph that can reflect the relationship between the function, the component, and the code. In order to facilitate the acquisition of information related to the problem (such as function description information, function annotation information, problem description information, log content information, and the like) based on the knowledge graph when the function has a problem.
[0143] In some embodiments, the knowledge graph data corresponding to the target abnormal event can be queried and obtained in the knowledge graph based on the related information of the target abnormal event (such as the abnormal event type, the error code, the event range, the related function, and the like). And the target log data is obtained based on the knowledge graph data.
[0144] Exemplarily, the target log data can be log data matching the time range of the target abnormal event. The knowledge graph data can be used as a supplement to the target log data to associate the log with the event related information. The knowledge graph data can also be used to assist in filtering and positioning the log data, such as, after filtering the log data according to the time range, further filtering according to the type and characteristics of the event to narrow the range of the log data, and obtaining the target log data.
[0145] In operation S720, the matching result between at least one of the call control logic, the data dependency relationship, and the event timing corresponding to the key data in the target log data and the target function description of the target component is analyzed, to locate the target code data with a problem based on the matching result.
[0146] In some embodiments, running information generated by the target component in the current running process can be acquired from the target log data, which can include, for example, calling control logic (i.e., method calling relationship, such as the calling sequence of functions / methods), data dependency relationship (such as the passing sequence of data between modules), event timing sequence (such as the timestamp of operation occurrence), etc., and the actual behavior in the target log data is compared with the function description to find out whether there are mismatched items, and the specific location in the code that causes the contradiction (i.e., target code data) is found according to the matching result. For example, the password length in the log is 6, and the function description requires the password length to be greater than or equal to 8, it is determined that the password length is a mismatched item, and the function related to password setting is located, and the function is determined as the target code data.
[0147] For example, analyzing the matching result between at least one of the calling control logic, the data dependency relationship, and the event timing corresponding to the key data in the target log data and the target function description of the target component can include: finding the calling relationship between each function, method or module in the log data by analyzing the log data, and forming a control flow graph according to the calling relationship. The passing path of data in the target component is found by analyzing the flow direction of the key data in the log data, the data dependency relationship between each function, method or module is determined according to the data flow direction, and a data flow graph is formed according to the data dependency relationship. The timestamps of each event occurrence are extracted from the log data, and the occurrence order of each event is arranged according to the timestamps to form a time flow graph. The control flow graph, the data flow graph and the time flow graph are matched with the function description information and the function annotation information in the knowledge graph data respectively, to check whether the code logic, data flow direction and event timing in the log data are consistent with the function in the knowledge graph data, find the location in the target log data that does not match the function description, and determine the code range that may have problems according to the mismatched reason. For example, the reason for the mismatch of the data dependency relationship is that the passing of a certain data is wrong, so the function and module responsible for data passing are located and taken as the target code data.
[0148] In some embodiments, matching the time flow graph with the function description information can include at least one of the following: comparing whether the time sequence of multiple event occurrences matches the function description information (e.g., whether event A occurs first and then event B occurs); comparing whether the time interval of event occurrence matches the function description information (e.g., whether the time interval of event A and event B is within the normal range); comparing whether the duration of each event matches the function description information (e.g., whether the duration of event A is within the normal range).
[0149] In some embodiments, matching the time flow graph with functional description information may include: processing the time flow graph based on reference sequence data to obtain target time flow data; comparing the target time flow data with the reference sequence data to determine the problem time point; and combining the log data corresponding to the problem time point to locate the target code data where the problem occurred. The time points in the target time flow data are aligned with the time points in the reference sequence data to eliminate interference from environmental fluctuations on timing judgment. For example, the time difference between each corresponding sub-object time point in the target event sequence data and the reference sequence data can be calculated. If the time difference exceeds a preset threshold, the time point is determined to be the problem time point. The reference sequence data may be the time flow data of the most recent successful operation of the target component obtained from knowledge graph data, or it may be the average time flow data calculated based on multiple historical time flow data of the target component.
[0150] For example, two sequence data can be aligned based on algorithms such as Dynamic Time Warping (DTW). For instance, the initial time series X=[x1,x2,...,x] corresponding to the time flow graph. n The reference time series is Y=[y1,y2,...,y]. m By calculating the minimum cumulative distance between X and Y using DTW, a regular path W=[w1,w2,...,w K ], where wk = (i k j k ), used to represent the i-th sequence of X. k The j-th point and the j-th sequence of y k Point alignment. The normalized path can reflect the matching of key feature points in two sequences. The points in the initial time series can be adjusted based on the normalized path to obtain the target time series, and the problematic time points in the sequence can be identified by comparing the two sequences.
[0151] Because the target component is affected by various factors such as system load, resource contention, and network latency during actual operation, the time points of each event in the log data may be different. By performing sequence alignment, the two sequences can be reasonably adjusted on the time axis to eliminate the interference of environmental fluctuations on the timing judgment, avoid misjudging time deviations as problems, and improve the accuracy of matching results.
[0152] This disclosure embodiment automatically discovers hidden causal relationships through semantic association of knowledge graphs, shortens problem location time and fault repair time, and enables rapid location and repair of problematic code.
[0153] Figure 8A flowchart of generating a target code file matching a user intent by using a target processing model according to an embodiment of the present disclosure is shown.
[0154] As shown in Figure 8 As shown in Figure 1 Based on the data processing method shown in Figure 1 As shown in the embodiment part of the data processing method, other implementation details of the data processing method of the present embodiment will not be described here.
[0155] In operation S810, a target knowledge graph is constructed based on a target optimization scheme associated with the target prompt word data, and the target knowledge graph at least includes a mapping relationship between the user intent and the corresponding knowledge.
[0156] In some embodiments, the most relevant target knowledge base can be selected from a plurality of preset knowledge bases according to the target prompt word data and the target optimization scheme associated with the target prompt word data, so as to obtain the relevant data required for constructing the knowledge graph from the target knowledge base. For example, if the user intent is to develop a simple Web application, a knowledge base containing Web development related knowledge is selected; if the user intent involves data analysis, a knowledge base in the field of data analysis is selected. The user intent is converted into a form suitable for querying in the target knowledge base, so as to query in the target knowledge base and obtain the knowledge data related to the user intent.
[0157] These knowledge data can include code snippets, algorithm descriptions, function definitions, class structures, design patterns, etc. The retrieved knowledge data is sorted and organized to construct a target knowledge graph corresponding to the user intent, and the target knowledge graph at least includes a mapping relationship between the user intent and the corresponding knowledge.
[0158] For example, the knowledge graph represents knowledge in a graphical manner, where nodes represent entities (such as classes, functions, variables, etc.), and edges represent relationships between entities (such as call relationships, inheritance relationships, inclusion relationships, etc.). In this way, the association and hierarchical structure between knowledge can be clearly displayed, facilitating subsequent reasoning and code generation. The target knowledge graph can be stored in a graph knowledge base for subsequent traversal and query of target knowledge from the knowledge graph, and the target knowledge graph stored in the graph knowledge base can support dynamic updating.
[0159] The target prompt word data is input into the target processing model, and the target processing model generates a target code file matching the user intent according to the input prompt word data and the knowledge learned by itself.
[0160] At operation S820, target knowledge data is obtained from the target knowledge graph based on the target code generation template.
[0161] In some embodiments, knowledge mapping can be performed in the target knowledge graph based on the user intent, the user demand can be mapped to a specific technical implementation in the knowledge graph, and based on the knowledge graph and the demand mapping result, a target code generation template can be selected or customized. The target code generation template is a code skeleton, which can include placeholders, logical relationships, etc.
[0162] In some embodiments, relevant knowledge can be extracted from the target knowledge graph according to the requirements of the target code generation template. For example, relevant data can be extracted from the knowledge graph by analyzing the placeholders and logical relationships in the code template. The target knowledge data can include entity attribute data, entity relationship data, rule data, metadata, etc.
[0163] At operation S830, a target code file is generated based on the target knowledge data according to at least one of the method call relationship, the data dependency relationship, or the event timing relationship in the target code generation template.
[0164] In some embodiments, the details of the target code generation template are filled based on the target knowledge data to generate executable code. During the code generation process, the code template can be filled according to the target knowledge data, and / or the code logic can be organized according to at least one of the method call relationship, the data dependency relationship, or the event timing relationship in the target code generation template to generate a target code file that can be directly run. For example, the method call relationship can be used to describe the call chain between classes / methods (such as A calling B), the data dependency relationship can be used to describe how variables are derived from knowledge data (such as the value of variable X depends on the attribute Z of entity Y), and the event timing relationship can be used to control the execution order of asynchronous time (such as verifying M first, then executing N).
[0165] In some embodiments, the target processing model can perform step-by-step reasoning based on the information in the target knowledge graph and its own reasoning ability to generate a target code file.
[0166] For example, the model first analyzes the nodes and edges in the knowledge graph, understands the relationships and roles between various entities. Then, according to the user's intention and the guidance of the knowledge graph, it gradually deduces the code logic and structure required to achieve the intention. During the reasoning process, the model may refer to code snippets, algorithm examples, etc. in the knowledge graph, and perform code combination, modification and optimization. After step-by-step reasoning and verification, the target processing model generates a complete target code file that matches the user's intention. The code file can contain multiple parts, such as function definitions, class implementations, main program logic, etc., and the specific format depends on the user's intention and the selected programming language. The generated code can also be optimized and formatted to improve code readability, maintainability and performance. For example, removing redundant code, optimizing algorithm implementation, and unifying code style.
[0167] In some embodiments, the process of step-by-step reasoning of the target processing model can include five stages: design pattern selection, architecture design, module determination, function implementation, and code generation.
[0168] Figure 9 The schematic diagram shows the principle of controlling the target processing model to perform step-by-step reasoning according to an embodiment of the present disclosure.
[0169] As Figure 9As shown, the target processing model searches for a design pattern that matches the user's intent in the knowledge graph. Based on the selected design pattern, the model looks for relevant architecture styles and principles in the knowledge graph. For example, if the layered architecture pattern is selected, the model understands the hierarchical division of the layered architecture, the functions of each layer, and the interaction methods based on the target knowledge base. Based on the architecture, the model begins to plan the components of the system (such as assigning the functions of the system to different components and the dependency relationships between components). For example, in a web application, the model may plan components such as the presentation layer, business logic layer, and data access layer. Based on the determined architecture, the model further refines each component into multiple modules (Module), which can be split into multiple small, manageable modules according to the principles of function correlation and independence. For example, the business logic layer can be divided into user management modules, order processing modules, etc. For each module, the model defines its input and output interfaces, and clearly defines the interaction between modules. Interface definition includes data types, parameter lists, return values, etc. to ensure compatibility and integrability between modules. For example, the user management module may provide interfaces such as adding users, deleting users, etc., each interface has clear parameter and return value requirements. Analyze the dependency relationship between modules to ensure that the design of the module meets the overall requirements of the architecture. For each specific function (Function) of the module, the model searches for appropriate algorithms and data structures in the knowledge graph, and based on the selected algorithms and data structures, constructs the code logic of the module, and according to certain programming specifications and styles, converts algorithm steps into specific code statements. For example, use control structures such as loops and conditional judgments to implement the algorithm flow. Integrate and assemble the function code implemented by each module to generate complete system code (Code), and ensure the coherence and consistency of the code by processing the interface calls and data transfers between modules. For example, integrate the user management module, order processing module, etc. into a project and correctly call the interfaces of each module.
[0170] For example, the model can apply some code optimization techniques to optimize and adjust the generated code, such as eliminating redundant code, optimizing loop structures, using appropriate data types, etc. At the same time, format the code according to uniform code style specifications to improve the performance, readability and maintainability of the code. Finally, the model outputs the optimized code as an executable code file.
[0171] In some embodiments, in the step-by-step reasoning process, the target content for constructing the target code file can be determined by the target processing model itself, for example, in the step of designing the pattern, the target architecture is selected by the target processing model according to the common pattern in the knowledge graph and the reference data of similar projects. The target processing model can also interact with the user to determine the target content for constructing the target code file based on the user's reply.
[0172] In some embodiments, the target processing model can also be controlled to interact with the user in the step-by-step reasoning stage to determine the content generated in the current reasoning stage based on the interaction information; and the target code file is obtained by the target model based on the content generated in each reasoning stage.
[0173] In some embodiments, the interaction information can be used for content confirmation, for example, the user is asked about the function, performance, scalability, personal preference, etc. through the interaction information, so as to realize the personalized customization of the content in the current reasoning stage based on the user's response. For example, in the architecture design stage, the interaction information can be "do you prefer to use a layered architecture or a microservice architecture to build this system?", and in the case that the user's reply is "layered architecture", the content generated in the current reasoning stage is determined as a layered architecture.
[0174] In the code generation process, the embodiments of the present disclosure introduce interaction information in the distributed reasoning stage of the code generation process, realize dynamic adjustment of the reasoning direction, adjust the reasoning path according to the real-time feedback of the user, effectively improve the flexibility of code generation, and meet the diversified needs of different users.
[0175] In some embodiments, the data processing method can further include a pre-warning prompt operation.
[0176] Figure 10 A flowchart of the pre-warning prompt operation according to an embodiment of the present disclosure is schematically shown.
[0177] As Figure 10 shown, on the basis of the data processing method shown in Figure 1 , the pre-warning prompt operation of the present embodiment can further include operation S1010~operation S1020. It should be noted that other implementation details of the data processing method of the present embodiment can be found in the embodiment part of the data processing method shown in Figure 1 , which will not be described here.
[0178] In operation S1010, log data in the running process of the electronic device is monitored.
[0179] In some embodiments, the log data is generated in the running process of the device and is used to record system status, operation behavior, error information, etc. The log data can include software logs and hardware logs, for example.
[0180] When operating S1020, if an abnormal event is predicted based on log data and target knowledge graph, target prompt information is output. The target prompt information can be used to generate automatic repair code to fix the abnormal problem corresponding to the abnormal event.
[0181] In some embodiments, during the execution of the electronic device's running code (such as software programs or firmware instructions), key behaviors are recorded through a logging system to obtain log data, which is equivalent to a direct record of code behavior. By monitoring the log data in real time, suspicious code segments (such as frequent calls to sensors to read data) can be identified based on the current code execution status. Combining this with the code-function-component relationship in a knowledge graph, the function to be implemented by the code segment is queried in the knowledge graph, thereby predicting potentially abnormal components in the electronic device and obtaining target prompt information. For example, the target prompt information could be component-abnormal problem-code segment, which can be used to generate automatic repair code to fix the abnormal problem corresponding to the abnormal event.
[0182] This disclosure embodiment achieves early identification and prediction of abnormal events by associating log data with knowledge graph results. By analyzing early signals (non-error signals) in the log data, it infers potential fault types and predicts possible abnormal events, thereby enabling early intervention in abnormal events and helping to maintain the stability of electronic equipment operation.
[0183] Based on the above data processing method, this disclosure also provides an electronic device. The following will be combined with... Figure 11 Provide a detailed description of the electronic device.
[0184] Figure 11 A block diagram of an electronic device that can be used to implement the methods of embodiments of the present disclosure is shown schematically.
[0185] like Figure 11 As shown, an electronic device 1100 according to an embodiment of the present disclosure includes a processor 1101, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1102 or a program loaded from a storage portion 1108 into a random access memory (RAM) 1103. The processor 1101 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)). The processor 1101 may also include onboard memory for caching purposes. The processor 1101 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0186] The processor 1101 can run at least one agent, which can execute the following operations by calling at least one processing model deployed in the electronic device: identifying a user intent represented by target input data for a target component of the electronic device; processing the user intent into target prompt word data based on a target knowledge base and inputting the target prompt word data into a target processing model; and generating, by using the target processing model, a target code file matching the user intent, the target code file being capable of being used to optimize target code data of the target component to optimize a functional service capable of being provided by the target component.
[0187] In the RAM 1103, various programs and data required for the operation of the electronic device 1100 are stored. The processor 1101, the ROM 1102, and the RAM 1103 are connected to each other via the bus 1104. The processor 1101 performs various operations of the method flow according to the embodiments of the present disclosure by executing the programs in the ROM 1102 and / or the RAM 1103. It should be noted that the programs can also be stored in one or more memories other than the ROM 1102 and the RAM 1103. The methods provided by the embodiments of the present disclosure can also be implemented by executing the programs stored in the one or more memories.
[0188] According to an embodiment of the present disclosure, the electronic device 1100 can further include an input / output (I / O) interface 1105, which is also connected to the bus 1104. The electronic device 1100 can further include one or more of the following components connected to the I / O interface 1105: an input part 1106 including a keyboard, a mouse, and the like; an output part 1107 including a cathode ray tube (CRT), a liquid crystal display (LCD), and the like, and a speaker, and the like; a storage part 1108 including a hard disk, and the like; and a communication part 1109 including a network interface card such as a LAN card, a modem, and the like. The communication part 1109 performs communication processing via a network such as the Internet. A drive 1110 is also connected to the I / O interface 1105 as necessary. A removable medium 1111 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, and the like is mounted on the drive 1110 as necessary, so that a computer program read therefrom is installed in the storage part 1108 as necessary. The present disclosure also provides a computer readable storage medium, which can be included in the device / apparatus / system described in the above embodiments; or can exist separately without being assembled into the device / apparatus / system. The above computer readable storage medium carries one or more programs, which, when executed, implement the method according to the embodiments of the present disclosure.
[0189] According to an embodiment of the present disclosure, the computer readable storage medium can be a nonvolatile computer readable storage medium, for example, can include, but is not limited to, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any appropriate combination thereof. In the present disclosure, the computer readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present disclosure, the computer readable storage medium can include one or more memories such as the ROM 1102 and / or the RAM 1103 described above and / or one or more memory other than the ROM 1102 and the RAM 1103.
[0190] Embodiments of the present disclosure also include a computer program product including a computer program containing program codes for executing the methods shown in the flowcharts. When the computer program product is run in a computer system, the program codes are used to make the computer system implement the device control method provided by the embodiments of the present disclosure.
[0191] The above-described functions defined in the system / apparatus / module / unit of the embodiments of the present disclosure are performed when the computer program is executed by the processor 1101. According to an embodiment of the present disclosure, the above-described system, apparatus, module, unit, etc. can be implemented by the computer program modules.
[0192] In one embodiment, the computer program can rely on a tangible storage medium such as an optical storage device, a magnetic storage device, etc. In another embodiment, the computer program can also be transmitted, distributed, and downloaded in the form of a signal on a network medium and be downloaded and installed through the communication part 1109 and / or installed from the detachable medium 1111. The program codes contained in the computer program can be transmitted by any appropriate network medium, including but not limited to wireless, wired, etc., or any appropriate combination thereof.
[0193] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1109 and / or installed from the detachable medium 1111. When the computer program is executed by the processor 1101, the above-described functions defined in the system of the embodiments of the present disclosure are performed. According to an embodiment of the present disclosure, the above-described system, apparatus, device, module, unit, etc. can be implemented by the computer program modules.
[0194] According to embodiments of this disclosure, program code for executing the computer programs provided in embodiments of this disclosure can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C", or similar programming languages. The program code can execute entirely on a user's computing device, partially on a user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0195] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0196] Those skilled in the art will understand that the features described in the various embodiments and / or claims of this disclosure can be combined or combined in various ways, even if such combinations or combinations are not explicitly described in this disclosure. In particular, the features described in the various embodiments and / or claims of this disclosure can be combined or combined in various ways without departing from the spirit and teachings of this disclosure. All such combinations and / or combinations fall within the scope of this disclosure.
[0197] The above describes embodiments of the present disclosure. However, these embodiments are merely for illustrative purposes, and are not intended to limit the scope of the present disclosure. Although each embodiment is described above separately, this does not mean that the measures in each embodiment cannot be used advantageously in combination. The scope of the present disclosure is defined by the appended claims and their equivalents. Those skilled in the art can make various substitutions and modifications without departing from the scope of the present disclosure, and these substitutions and modifications should all fall within the scope of the present disclosure.
Claims
1. A data processing method comprising: identifying a user intent represented by target input data for a target component of an electronic device; processing the user intent into target prompt data based on a target knowledge base and inputting the target prompt data into a target processing model; generating, by the target processing model, a target code file matching the user intent, the target code file being used to optimize target code data of the target component to optimize a functional service provided by the target component.
2. The method of claim 1, further comprising at least one of: in response to a target trigger event, performing, by the target code file, an optimization operation on the target code data of the target component to optimize a target functional service of the target component; in a case where a target abnormal event is monitored during a running process of the electronic device, locating problematic target code data based on knowledge graph data associated with key data in the target abnormal event to generate, based on the target code data, a target code file for repairing the abnormal problem.
3. The method of claim 1 or 2, wherein the identifying a user intent represented by target input data for a target component of an electronic device comprises at least one of: in a case where the target component is a target application on the electronic device, taking operation data of a target user on the target application and / or first interaction data between the target user and a first intelligent agent as target input data for the target application, and identifying, by the first intelligent agent, a first user intent represented by the target input data, the first user intent comprising at least one of an intent to repair an abnormal problem, an intent to optimize an application interface of the target application, an intent to optimize a functional service of the target application, or an intent to optimize a configuration variable of the target application; in a case where the target component is a target hardware on the electronic device, taking second interaction data between a target user and a second intelligent agent as target input data for the target component, and identifying, by the second intelligent agent, a second user intent of the target user, the second user intent comprising at least one of an intent to repair an abnormal problem, an intent to optimize a configuration variable of the target hardware, or an intent to optimize a functional service of the target hardware.
4. The method of claim 1 or 2, wherein, processing the user intent into target prompt data based on a target knowledge base comprises at least one of: determining a target knowledge base to be referred based on a content attribute of the user intent to process the user intent into target prompt data having a target field format based on target reference data in the target knowledge base; or obtaining preset prompt template information, and processing the user intent into target prompt data having a target field format based on the target knowledge base and the prompt template information; generating target guide data based on the target knowledge base, and processing the user intent into target prompt data based on a selection operation of a target user on the target guide data. obtaining configuration information of the electronic device and / or user portrait information of a target user, processing the user intent into target prompt word data based on the configuration information and / or the user portrait information and the target knowledge base.
5. The method of claim 1 or 2, wherein generating, by the target processing model, the target code file matching the user intent comprises: obtaining optimization suggestions generated by the target processing model for the target prompt word data; obtaining a code generation template generated by the target processing model with reference to target knowledge graph data; processing the optimization suggestions into an initial code file by using the code generation template; reviewing and / or testing the initial code file, and outputting the initial code file as the target code file if the initial code file passes the review and / or test.
6. The method of claim 2, wherein, performing, by the target code file, an optimization operation on target code data of the target component in response to a target trigger event, comprising at least one of: performing, by the first agent, the second agent, or the third agent, a change and / or replacement operation on the target code data of the target component based on the target code file in response to monitoring that the target abnormal interface occurs in the running process of the electronic device; calling a target repair tool to change and / or replace the target code data of the target component based on the target code file, or directly executing an automatic repair code in the target code file to repair the target component in response to monitoring that the target abnormal event occurs in the running process of the electronic device; controlling a target interactive component of the electronic device to perform a change and / or replacement operation on the target code data of the target component based on the target code file in response to obtaining optimization suggestions and / or functional requirements for the target component.
7. The method of claim 2, wherein, locating problematic target code data based on knowledge graph data associated with key data in the target abnormal event, comprising: obtaining target log data corresponding to the target abnormal event based on the knowledge graph data; analyzing a matching result between at least one of a call control logic, a data dependency relationship, and an event timing corresponding to the key data in the target log data and a target function description of the target component to locate the problematic target code data based on the matching result.
8. The method of claim 1, wherein, generating, by the target processing model, the target code file matching the user intent comprises: constructing a target knowledge graph based on a target optimization scheme associated with the target prompt word data, the target knowledge graph comprising at least a mapping relationship between the user intent and corresponding knowledge; obtaining target knowledge data from the target knowledge graph based on a target code generation template; generating the target code file based on the target knowledge data according to at least one of a method call relationship, a data dependency relationship, or an event timing relationship in the target code generation template.
9. The method of claim 1, further comprising: monitoring log data in a running process of the electronic device; and In a case where an abnormal event is predicted based on the log data and a target knowledge graph, target prompt information is output, and the target prompt information can be used to generate automatic repair code for repairing an abnormal problem corresponding to the abnormal event.
10. An electronic device comprising at least one processor and at least one agent capable of running on the at least one processor, the at least one agent being capable of invoking at least one processing model deployed in the electronic device to perform the following operations: identifying a user intent represented by target input data for a target component of the electronic device; processing the user intent into target prompt word data based on a target knowledge base and inputting the target prompt word data into a target processing model; generating a target code file matching the user intent using the target processing model, and the target code file can be used to optimize target code data of the target component to optimize the functional services that the target component can provide.