Information display method and device, medium, electronic equipment and storage medium

By displaying the first prompt information including the target text recommendation code and the target natural language text on the code editing page, the problem of low code editing efficiency during the code development process is solved, and the effect of quickly understanding the recommended code and improving development efficiency is achieved.

CN120233993APending Publication Date: 2025-07-01BEIJING ZITIAO NETWORK TECH CO LTD
0 Cites 0 Cited by

Patent Information

Application Number
CN202510429614.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-07
Publication Date
2025-07-01

Smart Images

  • Figure CN120233993A_ABST
    Figure CN120233993A_ABST
Patent Text Reader

Abstract

The invention discloses an information display method and device, a medium, electronic equipment and a storage medium, and relates to the technical field of computers, the method comprises the steps that a code editing page is displayed, and the code editing page is used for editing a code file; in response to a code editing operation for the code file, first prompt information is displayed, the first prompt information comprises a recommendation code of a target text in the code file and a target natural language text corresponding to the recommendation code, the recommendation code is generated through an intelligent agent, and the target natural language text corresponds to the recommendation code. The target natural language text is used for representing the abstract of the recommendation code generated by the intelligent agent. The target natural language text is used for representing the abstract of the recommended code generated by the intelligent agent, so that the user can quickly understand the recommended code through the target natural language text to reduce the time cost for accepting or refusing the recommended code, and the development efficiency of the code file is further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technologies, and in particular, to an information display method, apparatus, medium, electronic device, and storage medium. Background Art

[0002] Code is a source file written by developers in a language supported by development tools. It is a clear rule system in which a group of characters, symbols, or signal code elements represent information in a discrete form. Code is an important basis for implementing business. In the code development scenario, developers need to manually edit the code, and the code editing efficiency in the entire code development process is relatively low.

[0003] Therefore, in the related art, in order to simplify the code development process, intelligent code has gradually been adopted to assist developers in code development. However, in this process, developers still need to spend a long time understanding the recommended intelligent code, which affects the development efficiency. Summary of the Invention

[0004] This Summary of the Invention section is provided to introduce concepts in a brief form that will be described in detail in the subsequent Detailed Description section. This Summary of the Invention section is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to be used to limit the scope of the claimed technical solution.

[0005] In a first aspect, the present disclosure provides an information display method, including: Displaying a code editing page, where the code editing page is used to edit a code file; In response to a code editing operation on the code file, displaying a first prompt message, where the first prompt message includes recommended code for target text in the code file and target natural language text corresponding to the recommended code, the recommended code is generated by an intelligent agent, and the target natural language text is used to represent a summary of the intelligent agent generating the recommended code.

[0006] In a second aspect, the present disclosure provides an information display apparatus, including: A first display module for displaying a code editing page, where the code editing page is used to edit a code file; A second display module for, in response to a code editing operation on the code file, displaying a first prompt message, where the first prompt message includes recommended code for target text in the code file and target natural language text corresponding to the recommended code, the recommended code is generated by an intelligent agent, and the target natural language text is used to represent a summary of the intelligent agent generating the recommended code.

[0007] In a third aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, and when the computer program is executed by a processing device, the steps of the method described in the first aspect are implemented.

[0008] In a fourth aspect, the present disclosure provides an electronic device, including: a storage device having a computer program stored thereon; a processing device configured to execute the computer program in the storage device to implement the steps of the method described in the first aspect.

[0009] In a fifth aspect, the present disclosure provides a computer program product including a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.

[0010] Through the above technical solutions, since the target natural language text is used to represent the summary of the recommended code generated by the intelligent agent, the user can quickly understand the recommended code through the target natural language text, thereby reducing the time cost of accepting or rejecting the recommended code, and further improving the development efficiency of the code file.

[0011] Other features and advantages of the present disclosure will be described in detail in the subsequent specific implementation section. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] In combination with the drawings and with reference to the following specific implementation, the above and other features, advantages and aspects of the embodiments of the present disclosure will become more obvious. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic and the original components and elements are not necessarily drawn to scale. In the drawings: Figure 1 is a flowchart of an information display method shown according to an embodiment of the present disclosure; Figure 2 is a schematic diagram of a code editing page in a continuation scenario shown according to an embodiment of the present disclosure; Figure 3 is a schematic diagram of a line indication identifier shown according to an embodiment of the present disclosure; Figure 4 is a schematic diagram of a code editing page shown according to an embodiment of the present disclosure; Figure 5 is a schematic diagram of a code editing page shown according to an embodiment of the present disclosure; Figure 6 is a schematic diagram of a code editing page shown according to an embodiment of the present disclosure; Figure 7 is a schematic diagram of a code editing page shown according to an embodiment of the present disclosure; Figure 8 is a schematic diagram of a code editing page shown according to an embodiment of the present disclosure; Figure 9 is a schematic diagram of a code editing page shown according to an embodiment of the present disclosure; Figure 10 is a schematic diagram of a code editing page shown according to an embodiment of the present disclosure; Figure 11 is a block diagram of an information display device shown according to an embodiment of the present disclosure; Figure 12 is a schematic structural diagram of an electronic device shown according to an embodiment of the present disclosure. Detailed implementation manners

[0013] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. On the contrary, these embodiments are provided to more thoroughly and completely understand the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not used to limit the protection scope of the present disclosure.

[0014] It should be understood that the steps recited in the method embodiments of the present disclosure can be executed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this regard.

[0015] As used herein, the term "including" and its variants are open-ended, that is, "including but not limited to". The term "based on" is "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0016] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence relationship of the functions performed by these devices, modules or units.

[0017] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive. Those skilled in the art should understand that, unless otherwise clearly specified in the context, it should be understood as "one or more".

[0018] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only for illustrative purposes and are not used to limit the scope of these messages or information.

[0019] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, usage scopes, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to users and the authorization of users should be obtained through appropriate means in accordance with relevant laws and regulations.

[0020] For example, when responding to an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested by the user will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, an application program, a server, or a storage medium that performs the operations of the technical solutions of the present disclosure according to the prompt message.

[0021] As an optional but non-limiting implementation manner, the manner of sending a prompt message to the user in response to receiving an active request from the user may be, for example, in the form of a pop-up window, and the prompt message may be presented in text in the pop-up window. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0022] It is understandable that the above process of notifying and obtaining user authorization is only illustrative and does not limit the implementation manner of the present disclosure. Other manners that meet relevant laws and regulations can also be applied to the implementation manner of the present disclosure.

[0023] At the same time, it is understandable that the data involved in the technical solution (including but not limited to the data itself, the acquisition or use of the data) should comply with the requirements of corresponding laws, regulations and related provisions.

[0024] Figure 1 is a flowchart of an information display method shown according to an embodiment of the present disclosure. The information display method can be applied to an electronic device, and the information display method can be executed by an information display device, where the information display device can be implemented by software and / or hardware, and the software and / or hardware can be configured in the electronic device. Refer to Figure 1 , the information display method may include step 110 and step 120.

[0025] In step 110, a code editing page is displayed, where the code editing page is used to edit a code file; In step 120, in response to a code editing operation on the code file, a first prompt message is displayed, where the first prompt message includes recommended codes of target text in the code file and the target natural language text corresponding to the recommended codes, the recommended codes are generated by an agent, and the target natural language text is used to represent the summary of the recommended codes generated by the agent.

[0026] Among them, the code editing page can be the page provided by a code editor, and the code editor is used to support a user in developing code to obtain a developed code file.

[0027] Among them, the target text can be the code that needs to be modified in the code file predicted by the intelligent agent (i.e., the original code in the code file), or the target text can be the code that needs to be continued in the code file predicted by the intelligent agent (i.e., the original code in the code file), or the target text can be the annotation text input by the user in the code file.

[0028] It can be understood that code and annotation text are different. Code will be executed by a compiler or interpreter to implement the logic represented by the code, while annotation text is the text content in the code file used to explain the function of the code or provide additional information and will not be executed by the compiler or interpreter. The main purpose of annotations is to improve the readability and maintainability of the code.

[0029] Among them, the recommended code can be generated by the intelligent agent based on the context of the code file, and the intelligent agent can be a product accessing a machine learning model. As an example, the machine learning model can be a large language model or other neural network models, and the present disclosure does not limit this.

[0030] Among them, the summary of the recommended code can describe the reason for providing the recommended code and the coding logic for the intelligent agent to construct the recommended code, etc. It is worth noting that code is the basis for implementing the functions provided by the business. When the function is more complex, the corresponding code is more complex, and it is more difficult for users to understand pure code. Therefore, by using natural language to describe the reason for automatically providing the recommended code for the user and the logical process of the intelligent agent constructing the recommended code, developers can understand the reason for code modification and quickly understand the coding logic of the recommended code.

[0031] Among them, the first prompt message is displayed on the code editing page, and the display method of the first prompt message can refer to the following related embodiments, which are not elaborated in this embodiment. The display method includes display styles, display positions, etc.

[0032] Regarding the explanation and description of code editing operations, reference can be made to the following related embodiments, which are not elaborated in this embodiment.

[0033] Through the above method, since the target natural language text is used to represent the summary of the recommended code generated by the intelligent agent, users can quickly understand the recommended code through the target natural language text, so as to reduce the time cost of accepting or rejecting the recommended code, and further improve the development efficiency of the code file.

[0034] In some embodiments, the display of recommended code and target text can be enhanced on the code editing page to improve readability. As an example, the enhanced display can be achieved by bolding the recommended code and target text. It can be understood that other enhanced display methods are also applicable to this embodiment.

[0035] In some embodiments, the code editing operation can be an operation where a user inputs code into a code file, and the code input by the user can serve as the target text. As an example, after detecting that the user has input code, the agent can predict the continuation code for the input code (i.e., the target text) for the user, and this continuation code serves as the recommended code for the target text. Hereinafter, the code editing scenario corresponding to this type of embodiment is referred to as the continuation scenario.

[0036] In some embodiments, in the continuation scenario, the recommended code can be embedded and displayed in the code file in a preset style. Further, the preset style is different from the display style of the target text to facilitate the user's distinction between the recommended code and the original code in the code file. As an example, the preset style can be a gray font style.

[0037] In some embodiments, in the continuation scenario, the recommended code is embedded and displayed in the code file. Further, the target natural language text corresponding to the recommended code can be displayed side by side with the target text. It should be noted that in the rewrite scenario, the code line where the target text is located is the position of the visual focus. The visual focus helps the user concentrate their attention on a specific area or target in the code editing page.

[0038] Taking the continuation scenario as an example, Figure 2 is a schematic diagram of the code editing page in the continuation scenario shown according to an embodiment of the present disclosure. In this Figure 2 example, the user has input input code 201 (i.e., the target text) into the code file. Subsequently, the agent has generated recommended code 202 and target natural language text 203. The recommended code 202 is embedded and displayed within the line of the code file, and the input code 201 is displayed side by side with the target natural language text 203.

[0039] In addition, in the code development scenario, the positions of each original code in the code file can be identified by line numbers of the code lines. However, the recommended code in the continuation scenario can include multiple lines of code, and the user may not necessarily accept the agent's recommendation. Therefore, in order to distinguish the target text from the recommended code, when embedding and displaying the recommended code in the code file, there is no need to configure line numbers representing the positions for the recommended code.

[0040] In some embodiments, the code editing operation may be an operation where a user modifies the code in a code file. For example, an operation of modifying the name of a certain parameter. As an example, when the agent detects that the user modifies the code in the code file, the agent may predict the code associated with the modified code for the user. It can be understood that the associated code is the code that needs to be modified in the code file, and this associated code serves as the target text. Hereinafter, the code editing scenario corresponding to this type of embodiment is referred to as the rewriting scenario.

[0041] In some embodiments, in the rewriting scenario, the target natural language text corresponding to the recommended code may be displayed side by side with the first line of code of the target text.

[0042] In some embodiments, in the rewriting scenario, the recommended code may be displayed in a pop-up window on the code editing page.

[0043] In some embodiments, the first prompt message further includes a line indication identifier, and the line indication identifier is used to identify the position of the target text in the code file. In this case, the above information display method may further include: displaying the status information of the line indication identifier, and the status information is used to characterize the current status of the recommended code.

[0044] Among them, the line indication identifier may identify the position of the first line of code of the target text in the code file. As an example, the line indication identifier may be displayed at the line number of the code line where the first line of code of the target text is located.

[0045] Among them, the status information may include any one of a generated state, a recommended state, an accepted state, and a jump state. When the agent generates the recommended code, the status information may be in the generated state; before the recommended code is successfully applied in the code file and the recommended code has been displayed on the code editing page, the status information may be in the recommended state; after the recommended code is successfully applied in the code file, the status information may be in the accepted state; the explanations regarding the application of the recommended code and the jump state in the code file and the like can be referred to the following related embodiments, and this embodiment will not be elaborated here.

[0046] In the above manner, by displaying the status information of the line indication identifier, the current status of the recommended code is provided to the user.

[0047] In some embodiments, after the operation of triggering the application of the recommended code in the code file, the line indication identifier is further used to identify the position of the recommended code in the code file.

[0048] Among them, the position of the recommended code in the code file may be characterized by the line number of the code line. Therefore, the line indication identifier can be used to identify the range of the line numbers of the code lines associated with the recommended code in the code file after the recommended code is applied, so as to achieve the identification of the position of the recommended code in the code file.

[0049] Figure 3 It is a schematic diagram of a line indication identifier shown according to an embodiment of the present disclosure. Refer to Figure 3 , the target box 301 indicates the position of the recommended code in the code file through the line indication identifier.

[0050] As can be seen from the above, the recommended code can include multiple lines. Before triggering the operation of applying the recommended code in the code file, the line indication identifier can only indicate the position of the target text in the code file. Therefore, after triggering the operation of applying the recommended code in the code file, the user cannot obtain the scope involved in the modified code this time.

[0051] Therefore, through the above method, after triggering the operation of applying the recommended code in the code file, the line indication identifier can be used to indicate the position of the recommended code in the code file for the user. In addition, in this embodiment, the operation of triggering the application of the recommended code in the code file can refer to the following related embodiments, which will not be elaborated here.

[0052] In some embodiments, in the rewriting scenario, the target text is the original code in the code file, and the target text is a single-line code. The recommended code includes replacement segments corresponding to multiple code segments to be replaced in the target text, and the recommended code is displayed below the target text.

[0053] Figure 4 It is a schematic diagram of a code editing page shown according to an embodiment of the present disclosure. Refer to Figure 4 , the recommended code 401 includes replacement segments corresponding to multiple code segments to be replaced in the target text. The recommended code 401 also includes operators between multiple code segments to be replaced in the target text. The recommended code is displayed below the target text, and the recommended code can be displayed in the same pop-up window.

[0054] In some embodiments, an association mark between the recommended code and the target text is also displayed on the code editing page to facilitate the user to compare the recommended code and the target text. Continuing to refer to Figure 4 , the association mark 402 between the recommended code and the target text can be displayed.

[0055] In some embodiments, the target text is the original code in a code file, and multiple code snippets to be replaced in the target text are located on different code lines. The recommended code is the replacement code for the target text. The step of displaying the first prompt message in response to a code editing operation on the code file can be implemented in the following manner: In response to a code editing operation on the code file, determine the width occupied by the target text on the code editing page; when the width is less than or equal to a preset width, display the recommended code to the right of the target text, where the recommended code can be fully displayed to the right of the target text; when the width is greater than the preset width, display the recommended code below the target text.

[0056] Among them, the code editing operation in this embodiment can be an operation for a user to modify the code in the code file. The explanation and description of this operation can refer to the above related embodiments, and this embodiment will not be elaborated here.

[0057] Among them, the preset width can be determined according to the width of the code visible area in the code editing page, and the code visible area is the area for displaying the code. As an example, the preset width can be 70% of the width of the code visible area.

[0058] To improve the modification efficiency, the code file can be modified by a method of completing the modification of multiple lines of code in one operation. At the same time, in the rewriting scenario, there may be multiple lines of code to be modified in the target text. Correspondingly, the recommended code includes multiple lines. On this basis, the recommended code is prone to occlusion, resulting in users ignoring the occluded content.

[0059] Therefore, by the above method, detect the width occupied by the target text on the code editing page. If the width occupied by the target text on the code editing page is small (that is, less than or equal to the preset width), it means that the probability of the recommended code being occluded when the target text and the recommended code are displayed side by side is very small, that is, the recommended code can be displayed to the right of the target text so that the recommended code can be fully displayed to the right of the target text; if the width occupied by the target text on the code editing page is large (that is, greater than the preset width), it means that the probability of the recommended code being occluded when displayed to the right of the target text is relatively large, so the recommended code is selected to be displayed below the target text.

[0060] In some embodiments, in the rewriting scenario, when the recommended code is displayed to the right of the target text, the first line of the recommended code is aligned with the first line of the target text. Figure 5 is a schematic diagram of a code editing page shown according to an embodiment of the present disclosure. Refer to Figure 5, the first prompt message includes a recommended code 502, an acceptance control 503, and a target natural language text 504. The recommended code 502 is displayed to the right of the target text 501, and the recommended code 502 can be fully displayed to the right of the target text 501. The acceptance control 503 and the target natural language text 504 are displayed side by side on the right side of the previous line code of the target text 501, and the first line code of the recommended code 502 is aligned with the first line code of the target text 501.

[0061] Among them, the acceptance control is a control used to apply the recommended code in the code file. The user can trigger an operation on the acceptance control through an electronic device to achieve the purpose of applying the recommended code in the code file. As an example, the user can click on the acceptance control through an electronic device to achieve the purpose of applying the recommended code in the code file.

[0062] In some embodiments, in the rewriting scenario, when the recommended code is displayed below the target text, the recommended code is left-aligned with the target text. Figure 6 is a schematic diagram of a code editing page shown according to an embodiment of the present disclosure. Refer to Figure 6 , the first prompt message includes a recommended code 602, an acceptance control, and a target natural language text. The recommended code 602 is displayed below the target text 601, and the acceptance control and the target natural language text are displayed on the right side of the previous line code of the acceptance target text 601, and the recommended code 602 is left-aligned with the acceptance target text 601. Among them, the explanation and description of the acceptance control in this embodiment can refer to the above related embodiments, and will not be elaborated here.

[0063] In some embodiments, the acceptance control can be displayed side by side with the target natural language text on the code line where the target text is located. Taking the continuation writing scenario as an example, continue to refer to Figure 2 , the acceptance control 204 can be displayed side by side with the target natural language text 203 on the code line where the target text is located.

[0064] In some embodiments, when the recommended code is displayed below the target text, the above information display method may further include: determining that the recommended code is not fully displayed in the code editing page; displaying a first control, where the first control is used to adjust the content displayed on the code editing page.

[0065] Among them, the first control can be a scroll bar, and the user can drag the scroll bar through an electronic device to adjust the content displayed on the code editing page.

[0066] In this way, the user can be reminded to adjust the content displayed on the code editing page through the first control to view the complete recommended code.

[0067] In some embodiments, when the user applies the corresponding recommended code to a certain original code in the code file, at this time, the visual focus is located at the position where the original code is located. In addition, if there are other original codes in the code file that need to be modified. In this case, a second control and a second prompt message are displayed on the code line where the visual focus of the code editing page is located.

[0068] Next, the code editing operation can be a trigger operation for the second control, and it can be understood that this trigger operation is understood as an operation for adjusting the next code to be modified in the code file. And the second prompt message is used to indicate the target jump position, and the target jump position is used to describe the position of the target text in the code file. Hereinafter, the code editing scenario corresponding to this embodiment is referred to as a multi-point modification scenario.

[0069] In this case, the step of displaying the first prompt message in response to the code editing operation on the code file may include: in response to the trigger operation for the second control, jumping the visual focus to the target jump position; and displaying the first prompt message according to the target jump position.

[0070] Among them, the trigger operation of the second control can be triggered by clicking the second control. After the trigger operation of the second control is executed, the status information of the line indication identifier corresponding to the original code where the current visual focus is located is in a jump state.

[0071] Among them, the second prompt message can be text information, and the second prompt message can be displayed on the second control. Figure 7 is a schematic diagram of a code editing page shown according to an embodiment of the present disclosure. Refer to Figure 7 , and a second prompt message 701 is displayed on the second control.

[0072] Among them, the display position of the recommended code in the first prompt message can be determined according to the width occupied by the target text corresponding to the target jump position in the code editing page. For the method of determining the display position of the recommended code according to the width, reference can be made to the above related embodiments, and this embodiment will not be elaborated here.

[0073] Among them, the display positions of the acceptance control and the target natural language text in the first prompt message can be referred to the above related embodiments, and this embodiment will not be elaborated here.

[0074] Among them, the explanation and description of the first prompt message can be referred to the above related embodiments, and this embodiment will not be elaborated here.

[0075] Through the above method, the target jump position can be provided for the user, so that the user can perceive the position where the jump occurs.

[0076] In some embodiments, the above information display method may further include the following steps: determining the relative position between the original code of the line where the second control is located and the target text; and determining to display the second prompt message according to the relative position.

[0077] As an example, the relative position may characterize whether the original code of the line where the second control is located and the target text belong to the same function, or whether they belong to the same file, etc.

[0078] Further, determine whether to display the second prompt message according to whether the original code of the line where the second control is located and the target text belong to the same function, or whether they belong to the same file. For example, in the case of belonging to the same function, since the codes involved in different lines in the same function are related or can be displayed on the code editing page simultaneously, the user can perceive the jump position, and thus the second prompt message may not be displayed. On the contrary, in the case of not belonging to the same function, it is difficult for the user to perceive the jump position, and thus the second prompt message may be displayed.

[0079] In some embodiments, in a multi-point modification scenario, the above display method may further include the following steps: determining that the first line code of the recommended code is not displayed on the code editing page; and enhancing the display of the line indication identifier corresponding to the target text, where the line indication identifier is used to identify the position of the target text in the code file, and the enhanced line indication identifier is further used to prompt the user to adjust the content displayed on the code editing page.

[0080] As an example, the way of enhancing the display may be to add a downward arrow to the line indication identifier.

[0081] As can be seen from the above content, the line indication identifier is used to identify the position of the target text in the code file. Therefore, in a multi-point modification scenario, if it is determined that the recommended code is displayed below the target text, there is a situation where the first line code of the recommended code is not displayed on the code editing page.

[0082] Therefore, the line indication identifier corresponding to the target text can be enhanced to prompt the user to view the relative recommended code.

[0083] In some embodiments, the step of displaying the first prompt message in response to a code editing operation on a code file may include: responding to a preset editing operation on the code file to display a third control; triggering an agent to generate recommended code for the target text corresponding to the preset editing operation in response to a triggering operation on the third control; and displaying the first prompt message.

[0084] In this embodiment, the preset editing operation may be an operation for a user to add annotation text, or an operation for defining a function, or an operation for defining an object, etc., which are operations with complex intentions. It can be understood that in the code editing scenario corresponding to the preset editing operation, the user hopes to edit a long piece of code. In order to reduce the user's waiting time and avoid triggering the code editing operation in a multiple-point modification scenario multiple times, a third control may be provided for the user to support the intelligent agent to generate recommended code with a larger amount of code.

[0085] In this embodiment, the triggering operation for the third control may be a click operation on the third control.

[0086] In this embodiment, a third prompt message may be displayed on the third control, and the third prompt message may indicate the purpose of triggering the third control.

[0087] Taking the preset editing operation being an operation for a user to add annotation text as an example. Figure 8 is a schematic diagram of a code editing page shown according to an embodiment of the present disclosure. Refer to Figure 8 , the user adds annotation text 801 (i.e., the target text) in the code file. After that, a third control 802 is displayed on the code line where the annotation text 801 is located, and a third prompt message is displayed on the third control 802.

[0088] In this embodiment, the display style of the target natural language text may refer to the above-mentioned related embodiments, and this embodiment will not be elaborated here.

[0089] In this embodiment, for the recommended code in the first prompt message, the first prompt message may be displayed in the following manner: the recommended code is displayed character by character in the code editing page. Since in this embodiment, the intelligent agent may generate a large amount of code, in order to increase the interest of the interaction, the recommended code may be displayed character by character.

[0090] In this embodiment, during the process of the intelligent agent generating the recommended code, the electronic device may further display a fourth prompt message, and the fourth prompt message is used to represent that the intelligent agent is generating the recommended code. Among them, after triggering the triggering operation for the third control, the intelligent agent starts to generate the recommended code, and then the fourth prompt message may be displayed, and the fourth prompt message may be displayed on the right side of the target text. Refer to Figure 9 , by displaying the fourth prompt message 901, to prompt the user that the intelligent agent is thinking about how to generate the recommended code.

[0091] In this embodiment, the information display method may further include: during the process of the agent generating the recommended code, displaying a fourth control; in response to a trigger operation on the fourth control, ending the process of the agent generating the recommended code. As an example, it can be understood that after the user triggers a trigger operation on the third control, it indicates that the agent starts to generate the recommended code, and then enters the process of the agent generating the recommended code. Therefore, in response to the trigger operation on the third control, the third control can be switched and displayed as the fourth control, and the display position of the fourth control can refer to the display position of the third control. For example, continuing to refer to Figure 9 when the code line where the target text targeted by the preset editing operation is located displays the fourth control 902.

[0092] As an example, the trigger operation on the fourth control may be a click operation on the fourth control.

[0093] In some embodiments, the above information display method further includes: in response to a selection operation on the original code in the code file, displaying a fifth control; in response to a trigger operation on the fifth control, displaying the code reference corresponding to the original code in the dialogue input box of the agent.

[0094] In this embodiment, the fifth control may be displayed after the first line of the selected original code.

[0095] In this embodiment, the trigger operation on the fifth control may be a click operation on the fifth control.

[0096] In the above manner, it supports quickly inputting the code reference corresponding to the original code in the dialogue input box of the agent.

[0097] In some embodiments, the first target control is used to trigger a first target operation, and corresponding prompt information is displayed on the first target control. The prompt information displayed on the first target control is used to indicate the shortcut key for triggering the first target operation and the purpose semantic information for triggering the first target control.

[0098] Among them, the shortcut key may be a key on the keyboard or a combination of multiple keys. The efficiency of triggering the first target operation through the shortcut key is higher than that of triggering the first target operation through the first target control.

[0099] Among them, the prompt information displayed on the first target control may be text information.

[0100] Among them, the first target control is, for example, an acceptance control for applying the recommended code in the code file, a rejection control for rejecting the application of the recommended code in the code file, the second control, the third control, the fourth control, the fifth control, and so on.

[0101] Continuing to refer to Figure 9, a prompt message is displayed on the fourth control 902. Among them, the "ESC (Escape)" key in the prompt message is a shortcut key for triggering the operation corresponding to the fourth control, and the semantics of "to stop" in the prompt message is used to indicate that the purpose of triggering the fourth control 902 is to end the process of the agent generating the recommended code.

[0102] In some embodiments, the above information display method may further include: in response to a hovering operation on the first target control, displaying a fifth prompt message, where the fifth prompt message is used to indicate the shortcut key for triggering the corresponding second target operation through the second target control.

[0103] Among them, the fifth prompt message may be a text message.

[0104] Among them, the explanation and description of the first target control may refer to the above related embodiments, and will not be elaborated herein.

[0105] Among them, the second target control may be different from the first target control.

[0106] Among them, when the second target operation is similar to the first target operation, the efficiency of triggering the second target operation through the shortcut key is higher than that of triggering the second target operation by clicking the second target control.

[0107] Among them, the fifth prompt message may be superimposed and displayed on the code editing page in the form of a pop-up window. Taking the first target control as the control for applying the recommended code in the code file as an example. Refer to Figure 10 , the user triggers a hovering operation on the first target control through the electronic device, and the fifth prompt message is displayed in the pop-up window 1001. Among them, the combination key of Ctrl (control), shift (keyboard conversion key) and Enter (enter key) may be the shortcut key for triggering the agent to generate the recommended code; the TAB (Tabulator) key may be the shortcut key for triggering the jump to the target jump position or the shortcut key for applying the recommended code in the code file; the ESC key is the shortcut key for triggering the rejection of applying the recommended code in the code file.

[0108] In some embodiments, the above information display method further includes the following steps: in response to a cancel display operation on the line indication identifier, canceling the display of the line indication identifier.

[0109] Among them, the cancel display operation may be an operation to reject applying the recommended code in the code file, and this operation may be implemented by clicking the control for rejecting applying the recommended code in the code file, or may be implemented by a shortcut key, or by moving the visual focus.

[0110] It is understandable that the line indication identifier is for facilitating a user to view the position where the code in the code file is modified, and in the case where the user refuses to modify, the corresponding line indication identifier can be cancelled.

[0111] Figure 11 is a block diagram of an information display device shown according to an embodiment of the present disclosure. Referring to Figure 11 , the information display device 1100 includes: A first display module 1101, configured to display a code editing page, wherein the code editing page is used to edit a code file; A second display module 1102, configured to display a first prompt message in response to a code editing operation on the code file, wherein the first prompt message includes recommended codes of target text in the code file and target natural language texts corresponding to the recommended codes, the recommended codes are generated by an agent, and the target natural language texts are used to represent an abstract of the agent generating the recommended codes.

[0112] Optionally, the information display device 1100 further includes: A third display module, configured to display status information of a line indication identifier, wherein the line indication identifier is used to identify the position of the target text in the code file, and the status information is used to represent the current status of the recommended code.

[0113] Optionally, the target text is the original code in the code file, and the target text is a single-line code. The recommended code includes replacement segments corresponding to multiple code segments to be replaced in the target text, and the recommended code is displayed below the target text.

[0114] Optionally, the target text is the original code in the code file, and multiple code segments to be replaced in the target text are located in different code lines. The recommended code is the replacement code of the target text. The second display module 1102 includes: A first response sub-module, configured to determine the width occupied by the target text in the code editing page in response to a code editing operation on the code file; A first display sub-module, configured to display the recommended code to the right of the target text when the width is less than or equal to a preset width, wherein the recommended code can be completely displayed to the right of the target text; A second display sub-module, configured to display the recommended code below the target text when the width is greater than the preset width.

[0115] Optionally, when the recommended code is displayed to the right of the target text, the first line code of the recommended code is aligned with the first line code of the target text; when the recommended code is displayed below the target text, the recommended code is left-aligned with the target text.

[0116] Optionally, when the recommended code is displayed below the target text, the information display device further includes 1100: The first determination sub-module is configured to determine that not all of the recommended code is displayed in the code editing page; The third display sub-module is configured to display a first control, where the first control is used to adjust the content displayed in the code editing page.

[0117] Optionally, a second control and a second prompt message are displayed on the code line where the visual focus of the code editing page is located. The second prompt message is used to indicate a target jump position, and the target jump position is used to describe the position of the target text in the code file. The second display module 1102 includes: The second response sub-module is configured to, in response to a trigger operation on the second control, jump the visual focus to the target jump position; The fourth display sub-module is configured to display a first prompt message according to the target jump position.

[0118] Optionally, the information display device 1100 further includes: The first determination module is configured to determine the relative position between the original code of the code line where the second control is located and the target text; The second determination module is configured to determine to display the second prompt message according to the relative position.

[0119] Optionally, the information display device 1100 further includes: The third determination module is configured to determine that the first line code of the recommended code is not displayed in the code editing page; The fourth determination module is configured to enhance the display of the line indication identifier corresponding to the target text, where the line indication identifier is used to identify the position of the target text in the code file, and the enhanced line indication identifier is further used to prompt the user to adjust the content displayed in the code editing page.

[0120] Optionally, the second display module 1102 includes: The third response sub-module is configured to display a third control in response to a preset editing operation on the code file; A fourth response sub-module, configured to respond to a triggering operation on the third control, and trigger the agent to generate a recommended code for the target text corresponding to the preset editing operation; A fifth display sub-module, configured to display a first prompt message.

[0121] Optionally, the fifth display sub-module is further configured to display the recommended code character by character in the code editing page.

[0122] Optionally, the information display device 1100 further includes: A fourth display module, configured to display a fourth prompt message during the process of the agent generating the recommended code, where the fourth prompt message is used to indicate that the agent is generating the recommended code Optionally, the information display device 1100 further includes: A fifth display module, configured to display a fourth control during the process of the agent generating the recommended code; An end module, configured to respond to a triggering operation on the fourth control, and end the process of the agent generating the recommended code.

[0123] Optionally, the information display device 1100 further includes: A sixth display module, configured to display a fifth control in response to a selection operation on the original code in the code file; A seventh display module, configured to display a code reference corresponding to the original code in the dialogue input box of the agent in response to a triggering operation on the fifth control.

[0124] Optionally, the first target control is used to trigger a first target operation, and the information display device 1100 further includes: An eighth display module, configured to display a fifth prompt message in response to a hovering operation on the first target control, where the fifth prompt message is used to indicate a shortcut key for triggering a corresponding second target operation through a second target control.

[0125] Optionally, the information display device 1100 further includes: A cancellation module, configured to cancel the display of the line indication identifier in response to a cancellation display operation on the line indication identifier.

[0126] Wherein, the implementation manners of the various modules in the above information display device 1100 may refer to the above method embodiments, and details are not described herein again.

[0127] An embodiment of the present disclosure further provides a computer-readable medium, on which a computer program is stored, and when the computer program is executed by a processing device, the steps of the above information display method are implemented.

[0128] An embodiment of the present disclosure also provides a computer program product, including a computer program which, when executed by a processor, implements the steps of the above information display method.

[0129] An embodiment of the present disclosure also provides an electronic device, including: a storage device storing a computer program thereon; a processing device configured to execute the computer program in the storage device to implement the steps of the above information display method.

[0130] Reference is made below to Figure 12 , which shows a schematic structural diagram of an electronic device 1200 suitable for implementing the embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Tablet Computers), PMPs (Portable Multimedia Players), in-vehicle terminals (such as in-vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The electronic device shown is merely an example and should not impose any limitation on the functions and usage scope of the embodiments of the present disclosure.

[0131] As Figure 6 shown, the electronic device 600 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 601, which may perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 1201, the ROM 1202, and the RAM 1203 are connected to each other through a bus 1204. An input / output (I / O) interface 1205 is also connected to the bus 1204.

[0132] Generally, the following devices may be connected to the I / O interface 1205: an input device 1206 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 1207 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1208 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1209. The communication device 1209 may allow the electronic device 1200 to communicate with other devices wirelessly or wiredly to exchange data. Although Figure 12 the electronic device 1200 with various devices is shown, it should be understood that it is not required to implement or include all the shown devices. More or fewer devices may be alternatively implemented or included.

[0133] In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowchart can be implemented as computer software programs. For example, an embodiment of the present disclosure includes a computer program product that includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes program code for performing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 1209, or installed from the storage device 1208, or installed from the ROM 1202. When the computer program is executed by the processing device 1201, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.

[0134] It should be noted that the above-mentioned computer-readable medium in the present disclosure can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program, and the program can be used by or in combination with an instruction execution system, apparatus, or device. In the present disclosure, the computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, in which computer-readable program code is carried. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium can also be any computer-readable medium other than the computer-readable storage medium, and the computer-readable signal medium can send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted by any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0135] In some embodiments, the electronic device can communicate using any currently known or future-developed network protocol such as HTTP (HyperText Transfer Protocol), and can be interconnected with digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include local area networks ("LAN"), wide area networks ("WAN"), the Internet (e.g., the Internet), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any currently known or future-developed networks.

[0136] The above computer-readable medium can be included in the above electronic device; or it can exist separately without being assembled into the electronic device.

[0137] The above computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to: display a code editing page, where the code editing page is used to edit a code file; in response to a code editing operation on the code file, display a first prompt message, where the first prompt message includes recommended codes for target text in the code file and the target natural language text corresponding to the recommended codes, the recommended codes are generated by an agent, and the target natural language text is used to represent a summary of the agent generating the recommended codes.

[0138] Computer program code for performing the operations of the present disclosure can be written in one or more programming languages or combinations thereof. The above programming languages include, but are not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., by using an Internet service provider to connect through the Internet).

[0139] 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 the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a portion of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that, in some alternative implementations, the functions noted in the blocks may occur in a different order than noted in the drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, or they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or by a combination of dedicated hardware and computer instructions.

[0140] The modules described in the embodiments of the present disclosure can be implemented in software or in hardware. In some cases, the name of the module does not constitute a limitation on the module itself.

[0141] The functions described above herein can be performed, at least in part, by one or more hardware logic components. By way of example, and not limitation, the types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system on a chip (SOCs), complex programmable logic devices (CPLDs), and the like.

[0142] In the context of the present disclosure, a machine-readable medium may be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, 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), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0143] The above description is only a preferred embodiment of the present disclosure and an explanation of the applied technical principles. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosure concept. For example, the technical solutions formed by mutually replacing the above features with the technical features (but not limited to) having similar functions disclosed in the present disclosure.

[0144] In addition, although the operations are depicted in a particular order, this should not be construed as requiring that the operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although a number of specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features described in the context of separate embodiments may also be implemented in combination in a single embodiment. Conversely, the various features described in the context of a single embodiment may also be implemented separately or in any suitable sub-combination in multiple embodiments.

[0145] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. On the contrary, the specific features and acts described above are merely example forms for implementing the claims. Regarding the apparatus in the above embodiments, the specific manner in which each module performs operations has been described in detail in the embodiments related to the method, and will not be elaborated here.

Claims

1. An information display method, characterized in that: include: Displaying a code editing page, wherein the code editing page is used to edit a code file; In response to a code editing operation on the code file, a first prompt information is displayed, wherein the first prompt information includes a recommended code for a target text in the code file and a target natural language text corresponding to the recommended code, the recommended code is generated by an intelligent agent, and the target natural language text is used to represent a summary of the recommended code generated by the intelligent agent.

2. The method according to claim 1, characterized in that The method further comprises: Display status information of a line indicator, wherein the line indicator is used to identify the position of the target text in the code file, and the status information is used to represent the current status of the recommended code.

3. The method according to claim 1, characterized in that The target text is the original code in the code file, and the target text is a single line of code. The recommended code includes replacement fragments corresponding to multiple code fragments that need to be replaced in the target text, and the recommended code is displayed below the target text.

4. The method according to claim 1, characterized in that: The target text is the original code in the code file, and the multiple code snippets to be replaced in the target text are located in different code lines, the recommended code is the replacement code of the target text, and the first prompt information is displayed in response to the code editing operation on the code file, including: In response to a code editing operation on the code file, determining a width occupied by a target text on the code editing page; When the width is less than or equal to the preset width, displaying the recommendation code on the right side of the target text, wherein the recommendation code can be completely displayed on the right side of the target text; When the width is greater than the preset width, the recommendation code is displayed below the target text.

5. The method according to claim 4, characterized in that When the recommendation code is displayed on the right side of the target text, the first line of the recommendation code is aligned with the first line of the target text; When the recommendation code is displayed below the target text, the recommendation code is left-aligned with the target text.

6. The method according to claim 4, characterized in that In the case where the recommendation code is displayed below the target text, the method further includes: Determining that the recommended code is not all displayed in the code editing page; A first control is displayed, wherein the first control is used to adjust the content displayed on the code editing page.

7. The method according to claim 1, characterized in that The code line where the visual focus of the code editing page is located displays a second control and second prompt information, the second prompt information is used to indicate a target jump position, and the target jump position is used to describe the position of the target text in the code file. In response to the code editing operation on the code file, the first prompt information is displayed, including: In response to a trigger operation on the second control, jumping the visual focus to the target jump position; According to the target jump position, a first prompt message is displayed.

8. The method according to claim 7, characterized in that The method further comprises: Determine the relative position between the original code of the code line where the second control is located and the target text; Determine, according to the relative position, to display the second prompt information.

9. The method according to claim 7, characterized in that: The method further comprises: Determining that the first line of code of the recommended code is not displayed in the code editing page; The line indicator corresponding to the target text is enhanced and displayed, wherein the line indicator is used to identify the position of the target text in the code file, and the enhanced line indicator is also used to prompt the user to adjust the content displayed on the code editing page.

10. The method according to claim 1, characterized in that The displaying of first prompt information in response to the code editing operation on the code file includes: In response to a preset editing operation on the code file, displaying a third control; In response to a trigger operation on the third control, triggering the agent to generate a recommendation code for the target text corresponding to the preset editing operation; Display the first prompt message.

11. The method according to claim 10, characterized in that The displaying of the first prompt information includes: The recommended code is displayed character by character in the code editing page.

12. The method according to claim 11, characterized in that The method further comprises: During the process of the intelligent agent generating the recommendation code, fourth prompt information is displayed, wherein the fourth prompt information is used to indicate that the intelligent agent is generating the recommendation code.

13. The method according to claim 10, characterized in that The method further comprises: During the process of the agent generating the recommendation code, displaying a fourth control; In response to the triggering operation on the fourth control, the process of the intelligent agent generating the recommendation code is ended.

14. The method according to claim 1, characterized in that The method further comprises: In response to a selection operation on the original code in the code file, displaying a fifth control; In response to a trigger operation on the fifth control, a code reference corresponding to the original code is displayed in the dialog input box of the agent.

15. The method according to claim 1, characterized in that The first target control is used to trigger a first target operation, and the method further includes: In response to the hover operation on the first target control, fifth prompt information is displayed, wherein the fifth prompt information is used to indicate a shortcut key for triggering a corresponding second target operation through the second target control.

16. The method according to claim 2, characterized in that The method further comprises: In response to a cancel display operation on the row indication mark, the row indication mark is canceled from display.

17. An information display device, characterized in that: include: A first display module, used to display a code editing page, wherein the code editing page is used to edit a code file; A second display module is used to display a first prompt information in response to a code editing operation on the code file, wherein the first prompt information includes a recommended code for a target text in the code file and a target natural language text corresponding to the recommended code, the recommended code is generated by an intelligent agent, and the target natural language text is used to represent a summary of the recommended code generated by the intelligent agent.

18. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processing device, the steps of the method according to any one of claims 1 to 16 are implemented.

19. An electronic device, characterized in that: include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 16.

20. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 16 are implemented.