Interaction method and device, electronic equipment, storage medium and program product
By establishing a virtual coordinate system in editable content for position mapping, the problem of difficult to determine the fine position of the insertion point is solved, the accurate display of functional controls is realized, and the user experience is improved.
Patent Information
- Application Number
- CN202411998160.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-18
AI Technical Summary
When inserting new content into editable content, it is difficult to accurately locate the fine position of the insertion point, resulting in inaccurate display of functional controls and reduce user experience.
By establishing a virtual coordinate system based on editable content, performing position mapping, determining the second reference position of the insertion point under the virtual coordinate system, thereby accurately determining the display position of the functional control.
It realizes the precise display position of functional controls, improving the convenience and experience of users inserting new content at the insertion point.
Smart Images

Figure CN119849452A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, in particular to the field of human-computer interaction, NLP (Natural Language Processing) and intelligent generation technology, and specifically to an interaction method, device, electronic device, storage medium and program product. Background Art
[0002] With the continuous progress and innovation of information technology, intelligent editing tools use artificial intelligence technology to create content. With its high efficiency, convenience and intelligence, it can significantly improve editing efficiency and editing quality, making editing work easy and accurate. However, there is still room for improvement in further improving its intelligence. Summary of the invention
[0003] The present disclosure provides an interaction method, device, electronic device, storage medium and program product.
[0004] According to one aspect of the present disclosure, an interaction method is provided, comprising: in response to an operation on editable content, determining a first reference position of an insertion point in the editable content; based on a position mapping relationship, position mapping the first reference position to obtain a second reference position of the insertion point in a virtual coordinate system, wherein the virtual coordinate system is established based on a content area of the editable content; based on the second reference position of the insertion point, determining a display position of a function control in the virtual coordinate system, wherein the function control is used to generate new content based on the editable content; and displaying the function control based on the display position.
[0005] According to another aspect of the present disclosure, an interaction device is provided, including: a first determination module, for determining a first reference position of an insertion point in the editable content in response to an operation on the editable content; a mapping module, for mapping the first reference position based on a position mapping relationship to obtain a second reference position of the insertion point in a virtual coordinate system, wherein the virtual coordinate system is established based on a content area of the editable content; a second determination module, for determining a display position of a function control in the virtual coordinate system based on the second reference position of the insertion point, wherein the function control is used to generate new content based on the editable content; and a display module, for displaying the function control based on the display position.
[0006] According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute a method as disclosed in the present disclosure.
[0007] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause a computer to execute the method of the present disclosure.
[0008] According to another aspect of the present disclosure, a computer program product is provided, comprising a computer program, and when the computer program is executed by a processor, the method of the present disclosure is implemented.
[0009] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0011] Figure 1 An exemplary system architecture to which the interactive method and device according to an embodiment of the present disclosure can be applied is schematically shown;
[0012] Figure 2 A flowchart of an interaction method according to an embodiment of the present disclosure is schematically shown;
[0013] Figure 3 A schematic diagram schematically shows a schematic diagram of establishing a virtual coordinate system based on a content area of editable content according to an embodiment of the present disclosure;
[0014] Figure 4 The effect diagram of the function control display according to the embodiment of the present disclosure is schematically shown;
[0015] Figure 5 A diagram schematically shows the effect of displaying a function control after updating a reference position according to an embodiment of the present disclosure;
[0016] Figure 6 A diagram schematically shows the effect of displaying a function control after updating the setting method between the function control and the insertion point according to an embodiment of the present disclosure;
[0017] Figure 7 A block diagram schematically shows an interaction device according to an embodiment of the present disclosure; and
[0018] Figure 8 A block diagram of an electronic device suitable for implementing an interaction method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0019] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0020] In some scenarios where new content needs to be inserted into editable content, for example, in digital live broadcast scenarios, when calling the function control to expand or supplement the content of the broadcast script in the input box, since only the character position of the insertion point in the input box can be determined, such as the character position of the cursor, the coordinate position of the insertion point cannot be determined, such as the precise position of the insertion point in the input box. Therefore, the display area of the function control determined based on the insertion point in the input box cannot be accurately located, which reduces the user experience.
[0021] An embodiment of the present disclosure provides an interaction method, including: in response to an operation on editable content, determining a first reference position of an insertion point in the editable content; based on a position mapping relationship, position mapping the first reference position to obtain a second reference position of the insertion point in a virtual coordinate system, wherein the virtual coordinate system is established based on a content area of the editable content; based on the second reference position of the insertion point, determining a display position of a function control in the virtual coordinate system, wherein the function control is used to generate new content based on the editable content; and based on the display position, displaying the function control.
[0022] According to an embodiment of the present disclosure, by performing coordinate transformation on the first reference position of the insertion point, a second reference position in a virtual coordinate system is obtained. Since the virtual coordinate system is established based on editable content, the display position of the function control can be accurately determined based on the coordinate position in the virtual coordinate system. This allows the user to conveniently insert new content at the insertion point through the function control, thereby improving the user experience.
[0023] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision, disclosure and application of user personal information involved comply with the provisions of relevant laws and regulations, take necessary confidentiality measures, and do not violate public order and good morals.
[0024] In the technical solution of the present disclosure, the user's authorization or consent is obtained before obtaining or collecting the user's personal information.
[0025] Figure 1 An exemplary system architecture to which the interaction method and device according to an embodiment of the present disclosure can be applied is schematically shown.
[0026] It should be noted that Figure 1The examples shown are only examples of system architectures to which the embodiments of the present disclosure can be applied, in order to help those skilled in the art understand the technical content of the present disclosure, but do not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios. For example, in another embodiment, the exemplary system architecture to which the interactive method and apparatus can be applied may include a terminal device, but the terminal device may implement the interactive method and apparatus provided by the embodiments of the present disclosure without interacting with the server.
[0027] like Figure 1 As shown, the system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.
[0028] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as knowledge reading applications, web browser applications, search applications, instant messaging tools, email clients and / or social platform software, etc. (only as examples).
[0029] The terminal devices 101 , 102 , and 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.
[0030] The server 105 may be a server that provides various services, such as a background management server (only an example) that provides support for the content browsed by the user using the terminal devices 101, 102, and 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to the user request) to the terminal device.
[0031] It should be noted that the interaction method provided in the embodiment of the present disclosure can generally be executed by the terminal device 101, 102, or 103. Accordingly, the interaction device provided in the embodiment of the present disclosure can also be set in the terminal device 101, 102, or 103.
[0032] Alternatively, the interactive method provided in the embodiment of the present disclosure may also be generally executed by the server 105. Accordingly, the interactive device provided in the embodiment of the present disclosure may generally be arranged in the server 105. The interactive method provided in the embodiment of the present disclosure may also be executed by a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105. Accordingly, the interactive device provided in the embodiment of the present disclosure may also be arranged in a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105.
[0033] For example, when a user operates on editable content, the terminal devices 101, 102, and 103 can obtain the user's insertion point in the editable content, and then send the insertion point to the server 105, which analyzes the insertion point; determines the first reference position of the inserted point; determines the second reference position of the inserted point in the virtual coordinate system based on the first reference position; and determines the display position of the function control in the virtual coordinate system based on the second reference position of the inserted point. Alternatively, a server or server cluster that can communicate with the terminal devices 101, 102, 103 and / or the server 105 analyzes the inserted point and finally determines the display position of the function control in the virtual coordinate system.
[0034] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0035] It should be noted that the sequence numbers of the operations in the following method are only used as representations of the operations for the purpose of description, and should not be regarded as representing the execution order of the operations. Unless explicitly stated, the method does not need to be executed completely in the order shown.
[0036] Figure 2 The flowchart of the interaction method according to the embodiment of the present disclosure is schematically shown.
[0037] like Figure 2 As shown, the method includes operations S210 to S240.
[0038] In operation S210, in response to an operation on editable content, a first reference position where an insertion point is located in the editable content is determined.
[0039] In operation S220, based on the position mapping relationship, the first reference position is position mapped to obtain a second reference position of the insertion point in a virtual coordinate system, where the virtual coordinate system is established based on the content area of the editable content.
[0040] In operation S230, based on the second reference position of the insertion point, a display position of the function control in the virtual coordinate system is determined, and the function control is used to realize generation of new content based on the editable content.
[0041] In operation S240, the function controls are displayed based on the display position.
[0042] Optionally, the embodiments of the present disclosure may be applicable to a scenario where the precise position of a selected element in the editable content cannot be directly determined.
[0043] The editable content is located in an interactive interface, which may be an interactive interface of an application running on a terminal device or an interactive interface of a web page accessed through a browser, and the present disclosure is not limited thereto.
[0044] The editable content can be text, tables, images or other types of data that can be edited. The user can form an insertion point in the editable content by clicking, hovering or touching the screen with the mouse cursor. The position of the mouse cursor or the user's touch screen is the first reference position in the editable content. The second reference position is a position mapping of the first reference position, and the position mapping is represented in the virtual coordinate system. For example, the second reference position can be represented by the coordinates (x, y).
[0045] A corner of the content area of the editable content can be used as the origin of the virtual coordinate system, such as the upper left corner of the content area, and each point in the content area can be mapped to a position in the virtual coordinate system. Each point in the content area corresponds to a unique position in the virtual coordinate system.
[0046] When the user clicks, hovers, or touches the screen on the editable content, the user can obtain which character the insertion point is located after, but cannot obtain the specific position coordinates of the insertion point in the entire editable content. By establishing a virtual coordinate system based on the content area of the editable content, each position of the editable content can be mapped to the virtual coordinate system, so that each position in the editable content corresponds one-to-one to the position in the virtual coordinate system. After determining the first reference position of the insertion point, the second reference position corresponding to the first reference position is determined in the virtual coordinate system through the position mapping relationship, and then the specific position coordinates of the insertion point are determined through the position coordinates of the second reference position. Display the function control according to the specific position coordinates of the insertion point.
[0047] After the second reference position is determined, the function control may be set near the second reference position, for example, at the upper right corner or the lower right corner of the second reference position, etc., which is not limited in the present disclosure.
[0048] Based on the editable content, the functional control can intelligently generate new content and insert the new content at the insertion point. The new content can be the content that expands and supplements the editable content.
[0049] In some embodiments, the function control can be used as an interface for calling the large model. By operating the function control, the large model can be called to process the editable text to generate new content at the insertion point.
[0050] According to an embodiment of the present disclosure, by performing coordinate transformation on the first reference position of the insertion point, a second reference position in a virtual coordinate system is obtained. Since the virtual coordinate system is established based on editable content, the display position of the function control can be accurately determined based on the coordinate position in the virtual coordinate system, thereby enabling the user to conveniently and quickly generate new content at the insertion point through the function control, thereby improving the user experience.
[0051] According to an embodiment of the present disclosure, before determining the first reference position of the insertion point in the editable content, it can include: determining the position of the editable content in the interactive interface, so that when it is determined that the editable content is in the input box of the interactive interface, the operation of determining the first reference position of the insertion point in the editable content is performed.
[0052] In the embodiments of the present disclosure, the interactive interface may include multiple interface elements, such as input boxes, historical interactive content, graphic elements, navigation bars, menu bars, etc. The multiple interface elements are respectively set at different positions of the interactive interface.
[0053] The input box is the editable content on the interactive interface for receiving user input. When the editable content is in the input box, it indicates that the user may need to edit the editable content, thereby performing an operation of determining the first reference position of the insertion point in the editable content, and then performing subsequent operations of mapping the first reference position based on the position mapping relationship to obtain the second reference position of the insertion point in the virtual coordinate system, and determining the display position of the function control in the virtual coordinate system based on the second reference position of the insertion point.
[0054] In some embodiments, the position or size of the input box can be adjusted, and the virtual coordinate system can be adjusted accordingly according to the changes in the input box, so that based on the position mapping relationship, accurate mapping of the second reference position to the first reference position can be achieved.
[0055] According to the embodiments of the present disclosure, by determining the position of the editable content, the floating position of the toolbar can be accurately determined, thereby making the toolbar automatically displayed near the insertion point, so as to quickly respond to the user's operation and improve the accuracy of the response.
[0056] Optionally, the editable content of the input box in the display interface cannot accurately locate the fine position of the insertion point in the editable content, and can only determine the position of the insertion point in the input box, such as the character position. Therefore, by establishing a position mapping relationship, the content position of the insertion point is mapped to the coordinate position in the virtual coordinate system, thereby improving the refinement of the positioning of the insertion point in the input box, thereby improving the refinement of the display position of the toolbar, and improving the standardization of the display interface and the intelligence of the interaction.
[0057] According to an embodiment of the present disclosure, after determining the first reference position of the insertion point in the editable content, the method may further include: determining target content from the editable content based on the first reference position of the insertion point. If the target content is determined to be a complete sentence, an operation of displaying a function control based on the display position is performed.
[0058] In an embodiment of the present disclosure, after determining the first reference position, a sentence before the first reference position may be used as the target content. The present disclosure is not limited thereto, and a sentence after the first reference position may also be used as the target content.
[0059] When the first reference position is located in a complete sentence, the insertion point breaks the complete sentence at the first reference position, and the sentence before the first reference position and the sentence after the first reference position are not complete sentences. At this time, the insertion point divides a complete sentence, resulting in semantic fragmentation. When the function control is called for intelligent editing, the effect of the generated new content is poor, and the inserted new content may destroy the integrity and grammatical structure of the sentence. In this case, the function control can be hidden to remind the user to move the insertion point to the correct position.
[0060] When a sentence before the insertion point or a sentence after the insertion point is a complete sentence, the insertion point position will not affect the semantics of the original sentence, so the function control can be displayed to generate new content at the insertion point.
[0061] According to an embodiment of the present disclosure, when it is determined that the target content is an incomplete sentence, the function control may not be displayed. When it is determined that the target content is a complete sentence, the operation of the function control is displayed based on the display position, thereby improving the generation effect of the new content.
[0062] According to an embodiment of the present disclosure, after determining the first reference position of the insertion point in the editable content, the method may further include: identifying a target element in the target content to obtain a recognition result. The target element includes the first element before the insertion point in the description order. When it is determined that the recognition result indicates that the target element is a predetermined type of character, the target content is determined to be a complete sentence.
[0063] In an embodiment of the present disclosure, the target element may be the first element obtained from the first reference position. The predetermined type of character may be a character used to indicate the end of a sentence. The predetermined character type may be a punctuation mark, such as a period, a question mark, an exclamation mark, etc.
[0064] In some embodiments, a regular expression can be used to match the target element to determine whether the target element is a predetermined character type. If the recognition result shows that the target element is a predetermined character type, for example, if a period or a question mark is identified as the target element, it can be determined that the target content is a complete sentence. The present disclosure is not limited to this. The target element can also be identified by other methods, as long as the character type identification of the target element can be achieved.
[0065] According to the implementation of the present disclosure, by identifying the character type of the first element before the insertion point in the target content, it is possible to quickly identify whether the target is a complete sentence, thereby quickly responding to user operations and determining whether to display a function control.
[0066] According to an embodiment of the present disclosure, after determining the first reference position of the insertion point in the editable content, the method may further include: performing semantic recognition on the target content to obtain a semantic recognition result. If it is determined that the semantic recognition result indicates that the target content is semantically complete, the target content is determined to be a complete sentence.
[0067] In some embodiments, the content before the insertion point or the content after the insertion point can be obtained as the target content, and the target content can be processed by part-of-speech tagging, syntactic analysis, semantic role tagging, etc. using NLP technology to extract the key information and semantic relationship of the text. According to the key information and semantic relationship of the text, the recognition result is obtained.
[0068] In some embodiments, the target content can also be directly input into a semantic recognition model through a pre-trained semantic recognition model to obtain a recognition result.
[0069] By performing semantic recognition on the target content, the ability to recognize complex sentences can be improved.
[0070] Figure 3 A schematic diagram of establishing a virtual coordinate system based on a content area of editable content according to an embodiment of the present disclosure is schematically shown.
[0071] like Figure 3As shown, a virtual coordinate system 320 can be established with the position of the upper left corner of the editable content 310 as the origin (0, 0) of the coordinates. By operating the editable content 310, such as clicking, etc., an insertion point 330 can be obtained, thereby determining that the first reference position of the insertion point 330 is between A and B, but the position of the insertion point 330 relative to the upper left corner of the editable content 310 cannot be determined. By establishing the virtual coordinate system 320, based on the mapping relationship, the first reference position of the insertion point 330 is mapped to the virtual coordinate system 320, and the second reference position of the insertion point 330 in the virtual coordinate system is obtained, for example (x 1 ,y 1 ), thereby determining the precise position of the insertion point 320 in the virtual coordinate system, and further determining the display position of the functional control.
[0072] According to an embodiment of the present disclosure, before performing position mapping on the first reference position, the interaction method may include: generating a position mapping relationship based on an editable area boundary and content attributes of the editable content, wherein the editable area boundary is determined based on the editable content.
[0073] In the embodiments of the present disclosure, the editable region boundary can be determined according to the position and range of the editable content. For example, for an input box, the region boundary of the editable content can be determined according to the position of the input box in the interactive page and the range of the input box.
[0074] The content attributes of the editable content may include attribute information such as the type, size, format, and layout of the editable content. According to the content attributes of the editable content, the actual arrangement and display method of the editable content in the editable area may be determined.
[0075] Based on the position mapping relationship generated by the editable area boundary and the content attributes of the editable content, each element in the editable text can be mapped to the virtual coordinate system in the same arrangement manner, so that the position of each element in the editable text is consistent with the position in the virtual coordinate system, ensuring the accuracy of the second reference position.
[0076] According to an embodiment of the present disclosure, generating a position mapping relationship based on the content attributes of the editable area boundary and the editable content may include: when the editable content includes text, generating a position mapping relationship based on the editable area boundary and the font attributes and paragraph attributes of the editable content.
[0077] In the embodiments of the present disclosure, font attributes may include font size, character spacing, and line spacing. Font size may directly affect the size of the text in the editable content. Character spacing and line spacing affect the spatial distribution within and between text lines.
[0078] Paragraph properties include alignment, paragraph spacing, and indentation. Paragraph properties determine the overall layout of a text paragraph. Alignment, such as left alignment, right alignment, and center alignment, affects the horizontal position of the text; indentation and paragraph spacing affect the vertical position of the text.
[0079] The mapping relationship generated based on the font attributes and paragraph attributes of the editable area boundaries and the editable content can accurately map each character or paragraph in the editable content to the corresponding position in the virtual coordinate system, ensuring that the virtual coordinate system can accurately reflect the layout of the text content.
[0080] According to an embodiment of the present disclosure, the display position of the function control in the virtual coordinate system is determined based on the second reference position of the insertion point, including: determining the reference position of the function control in the first direction based on the second reference position and the function control size of the function control; and determining the display position of the function control in the virtual coordinate system based on a preset spacing and a reference position from the insertion point in the second direction, wherein the first direction is perpendicular to the second direction.
[0081] In the embodiments of the present disclosure, the first direction may be a horizontal direction, that is, an X-axis direction in a virtual coordinate system; and the corresponding second direction may be a vertical direction, that is, a Y-axis direction in the virtual coordinate system.
[0082] The size of the function control includes the size of the function control in a first direction, such as width, and the size of the function control in a second direction, such as height. The size in the first direction and the size in the second direction determine the size of the space occupied by the function control in the virtual coordinate system.
[0083] The reference position may include a reference starting position and a reference ending position. The reference starting position may be the position of the second reference position, and the reference ending position may be a position determined according to the second reference position and the size of the function control in the first direction.
[0084] The preset spacing is the spacing distance between the function control and the insertion point in the second direction. When the second direction is the vertical direction, the preset spacing can be the spacing extending upward from the insertion point, and the function control is set above the insertion point. The preset spacing can also be the spacing extending downward from the insertion point, and the function control is set below the insertion point. The preset spacing can be set according to the design requirements of the interactive interface and the user experience. This ensures that the function control does not block the insertion point and facilitates the user to perform editing operations.
[0085] In some embodiments, the reference position of the function control can be determined in the virtual coordinate system based on the second reference position and the size of the function control. Then, the position of the function control is adjusted in the second direction according to the preset spacing, so that the function control and the insertion point maintain an appropriate interval in the second direction. Finally, the final display position of the function control in the virtual coordinate system is obtained.
[0086] According to the embodiments of the present disclosure, by determining the reference position based on the second reference position of the insertion point and the size of the function control, and combining the preset spacing, the display position of the function control can be determined in the virtual coordinate system. In this way, the function control can be closely associated with the insertion point, thereby facilitating the user to perform efficient editing operations.
[0087] Figure 4 The effect diagram of the function control display according to the embodiment of the present disclosure is schematically shown.
[0088] like Figure 4 As shown, in response to the operation in the editable content 410, the first reference position of the insertion point 420 in the editable content 410 is determined. Based on the position mapping relationship, the first reference position of the insertion point 420 is mapped to obtain the second reference sub-position of the insertion point 420 in the virtual coordinate system. According to the second reference sub-position and the functional size of the functional control in the first direction (such as the x-axis direction), the reference position 430 is obtained. The reference position 430 includes a reference starting position and a reference end position. The second reference position mapped by the first reference position of the insertion point 420 can be the reference starting position, and the second reference position after mapping by the first reference position determined by the insertion point position plus the size of the functional control in the x-axis direction can be the reference end position. According to the reference position 430 combined with the preset spacing of the insertion point in the second direction (such as the y-axis direction), the position of the functional control 440 can be determined. In this way, the functional control can be closely associated with the insertion point, so as to facilitate the user to perform efficient editing operations.
[0089] According to an embodiment of the present disclosure, determining the display position of the function control in the virtual coordinate system based on the preset spacing in the second direction from the reference position and the reference position may include: when it is determined that the reference position exceeds the boundary of the editing area of the editable content in the first direction, adjusting the reference position to obtain the adjusted reference position; determining the display position of the function control in the virtual coordinate system based on the preset spacing in the second direction from the insertion point and the adjusted reference position.
[0090] In the embodiments of the present disclosure, the reference position in the first direction exceeds the editing area boundary of the editable content, which may be that the reference position exceeds the editing area boundary in the X-axis direction, for example, the reference starting position may exceed the left boundary, or the reference end position may exceed the right boundary. Based on the display position determined by the current reference position, after the function control is displayed, the function control may exceed the boundary of the edited content, which may affect the user's operation of the function control.
[0091] The reference position can be adjusted by moving the reference position away from the left boundary when the reference starting point exceeds the left boundary to obtain the adjusted reference position. When the reference end point exceeds the right boundary, the reference position can be moved away from the right boundary to obtain the adjusted reference position.
[0092] According to an embodiment of the present disclosure, by adjusting the reference position when the reference position exceeds the editing area boundary of the editable content in the first direction, the flexibility of the display of the function controls can be ensured, thereby ensuring a reasonable layout of the function controls and a good user experience.
[0093] Figure 5 The effect diagram of the function control display after the reference position is updated according to an embodiment of the present disclosure is schematically shown.
[0094] like Figure 5 As shown, in response to the operation in the editable content 510, the first reference position of the insertion point 520 in the editable content 510 is determined. Based on the mapping relationship, the first reference position of the insertion point 520 is mapped to obtain the second reference sub-position of the insertion point 520 in the virtual coordinate system. According to the second reference sub-position and the functional size of the functional control in the first direction (such as the x-axis direction), the reference position 530 is determined. Since the reference position 530 exceeds the editing area boundary of the editable content in the first direction, the reference position 530 is moved away from the editing on the right side to obtain the adjusted reference position 540. According to the adjusted reference position 540 combined with the preset spacing of the insertion point in the second direction (such as the y-axis direction), the position of the function control 550 is determined. In this way, the display position of the function control in the virtual coordinate system can be flexibly determined, thereby ensuring the smooth progress of the editing operation.
[0095] According to an embodiment of the present disclosure, determining the display position of the function control in the virtual coordinate system based on a preset distance and a reference position from the insertion point in the second direction also includes: when it is determined that the function control satisfies a predetermined condition, updating a setting method between the function control and the insertion point, so as to perform an operation of determining the display position of the function control in the virtual coordinate system based on the second reference position of the insertion point according to the updated setting method, and the setting method is used to characterize the relative position relationship between the function control and the insertion point in the second direction.
[0096] In some embodiments, the predetermined condition may be a condition for determining whether the function control exceeds the border of the editing area in the second direction. When the function control exceeds the border of the editing area in the second direction, it is determined that the function control meets the predetermined condition.
[0097] In some embodiments, when performing an operation to determine the display position of a function control in a virtual coordinate system based on a preset spacing in the second direction from the insertion point and a reference position, the preset spacing in the second direction can be set to a spacing extending upward from the insertion point. At this time, the setting method between the function control and the insertion point is that the function control is located above the insertion point. Under this setting method, when the insertion point is close to the upper boundary of the editing area boundary, for example, the insertion point is located in the first row, the function control will exceed the upper boundary of the editing area boundary, affecting the user's operation of the function control. For this purpose, the setting method between the function control and the insertion point can be updated, for example, the preset spacing in the second direction from the insertion point is set to a spacing extending downward from the insertion point, so that the function control is located below the insertion point, thereby preventing the function control from exceeding the upper boundary of the editing area boundary.
[0098] According to an embodiment of the present disclosure, by updating the setting method between the function control and the insertion point when it is determined that the function control meets a predetermined condition, the setting method of the function control can be adaptively adjusted when the function control exceeds the boundary of the editing area in the second direction, thereby improving the integrity and adaptability of the displayed function control.
[0099] According to an embodiment of the present disclosure, when it is determined that the conditional spacing between the second reference position of the insertion point and the editing area boundary of the editable content in the second direction is smaller than the function control size of the function control in the second direction, it is determined that the function control meets the predetermined condition.
[0100] In some embodiments, when the functional component and the insertion point are arranged in such a way that the functional component is located above the insertion point, the conditional spacing may be the spacing between the second reference position and the upper boundary of the editing area boundary. At this time, the ordinate of the second reference position may be characterized as the conditional spacing, and when the ordinate of the second reference position is smaller than the functional component size of the functional component in the second direction, it indicates that the functional component may exceed the upper boundary of the editing area boundary, and it may be determined that the functional component meets the predetermined condition.
[0101] In some embodiments, when the functional component and the insertion point are arranged in such a way that the functional component is located below the insertion point, the conditional spacing may be the spacing between the second reference position and the lower boundary of the editing area boundary. At this time, the difference between the ordinate of the lower boundary of the editing area boundary and the ordinate of the second reference position may be characterized as the second conditional spacing. When the difference between the ordinate of the lower boundary of the editing area boundary and the ordinate of the second reference position is smaller than the functional component size of the functional component in the second direction, it indicates that the functional component may exceed the lower boundary of the editing area boundary, and it is determined that the functional component satisfies the second predetermined condition.
[0102] Figure 6 The effect diagram of the function control display after the setting mode between the function control and the insertion point is updated according to an embodiment of the present disclosure is schematically shown.
[0103] like Figure 6 As shown, when it is determined that the second conditional spacing between the second reference position of the insertion point and the editable area boundary of the editable content in the second direction is smaller than the function control size of the function control in the second direction, for example, when the insertion point 620 is in the first line of the editable content 610, if the function control 630 is still set below the insertion point 620, it will cause the function control to exceed the editing area boundary. By updating the setting method between the function control 630 and the insertion point 620, the function control 630 is located below the insertion point 620, so that the function control can adaptively adjust the setting method, thereby improving the integrity and adaptability of the displayed function control.
[0104] According to an embodiment of the present disclosure, after displaying the function control based on the display position, the method further includes: generating new content based on the previous content and the following content of the insertion point in response to a content addition instruction. The previous content and the following content are determined from the editable content based on the first reference position of the insertion point, and the content addition instruction is generated by operating the function control.
[0105] In the embodiments of the present disclosure, the preceding content may be all the content before the insertion point, and the succeeding content may be all the content after the insertion point. The present disclosure is not limited thereto, and the preceding content may also be the content between the beginning of the paragraph where the insertion point is located and the insertion point, and the succeeding content may be the content between the end of the paragraph where the insertion point is located and the insertion point. The preceding content and the succeeding content provide contextual relationship information of the insertion point.
[0106] In some embodiments, a filling template can be pre-set, and when a user generates a content addition instruction by operating a function control, a target template can be selected for filling based on the preceding and succeeding content. The present disclosure is not limited thereto, and a generation model can also be trained to process preceding and succeeding content using the generation model and generate new content.
[0107] In some embodiments, after obtaining the new content, the new content can be directly inserted at the insertion point. The present disclosure is not limited thereto, and an editing window can also be generated in response to an operation on the function control, and the user can preview the new content through the editing window, and the user can choose to insert the new content into the insertion point, or further edit the new content.
[0108] According to the embodiments of the present disclosure, through the contextual relationship information provided by the preceding content and the succeeding content, when generating new content, the new content can be made consistent with the editable content in style or logic, thereby improving the editing effect.
[0109] According to an embodiment of the present disclosure, in response to a content adding instruction, generating the added content based on the preceding content and the succeeding content of the insertion point may include: generating content prompt information based on the preceding content and the succeeding content, and inputting the content prompt information into the large model to obtain the added content.
[0110] In an embodiment of the present disclosure, the prompt information may include key information, context, style, etc. of the previous content and the following content, which is used to guide the big model to understand the background and requirements of the editable content, and help the big model understand the overall context and style, so as to generate new content that meets expectations.
[0111] A large model may refer to a deep learning model with large-scale model parameters. A large model usually contains hundreds of millions, tens of billions, hundreds of billions, trillions, or even more than ten trillion model parameters. A large model may be a large language model, a large visual model, or a multimodal large model. The large model involved in the embodiments of the present disclosure may be a general large model, or may be an expert large model obtained after fine-tuning (Fine Tune) based on demand, and the embodiments of the present disclosure do not limit this. The large model can be used to process information of any modality such as images, text, video, audio, etc.
[0112] The content prompt information is provided as input to the big model, which can generate new content that meets the requirements based on the input content prompt information and its internal language knowledge and processing capabilities.
[0113] According to the embodiments of the present disclosure, by combining the context information of the preceding and succeeding content and the language processing capability of the large model, intelligent and accurate text editing of the insertion point can be achieved, which not only improves the editing efficiency but also ensures the accuracy and quality of the editing results.
[0114] According to an embodiment of the present disclosure, at least one of the following is further included: wrapping the newly added content; changing the font of the newly added content to a font different from that of the editable content; and changing the color of the newly added content to a color different from that of the editable content.
[0115] In some embodiments, when the newly added content is long or contains multiple paragraphs, the newly added content can be wrapped to make the structure of the newly added content clearer and facilitate users to quickly locate and understand key information.
[0116] In some embodiments, when the newly added content is short or is in the middle of some long paragraphs, the newly added content can be changed to a different font or displayed in a different color, so that the newly added content can be highlighted, making it easier for users to quickly identify the edited new content and improving the readability and attractiveness of the new content.
[0117] The above-mentioned methods are only illustrative, and the present disclosure is not limited thereto. A variety of methods may also be combined to display new content in editable content, etc.
[0118] Figure 7 A block diagram of an interaction device according to an embodiment of the present disclosure is schematically shown.
[0119] like Figure 7 As shown, the interaction device includes a first determination module 710 , a mapping module 720 , a second determination module 730 and a display module 740 .
[0120] The first determining module 710 is configured to determine a first reference position of an insertion point in the editable content in response to an operation on the editable content.
[0121] The mapping module 720 is used to perform position mapping on the first reference position based on the position mapping relationship to obtain a second reference position of the insertion point in a virtual coordinate system, wherein the virtual coordinate system is established based on the content area of the editable content.
[0122] The second determination module 730 is used to determine the display position of the function control in the virtual coordinate system based on the second reference position of the insertion point, wherein the function control is used to realize the generation of new content based on the editable content.
[0123] The display module 740 is used to display the function controls based on the display position.
[0124] According to an embodiment of the present disclosure, the interaction device further includes a third determination module and an execution module.
[0125] The third determining module is used to determine the target content from the editable content based on the first reference position of the insertion point.
[0126] The execution module is used to execute the operation of displaying the function control based on the display position when determining that the target content is a complete sentence.
[0127] According to an embodiment of the present disclosure, the interaction device further includes an identification module and a fourth determination module.
[0128] The recognition module is used to recognize the target element in the target content and obtain a recognition result, wherein the target element includes the first element before the insertion point in the description order.
[0129] The fourth determination module is used to determine that the target content is a complete sentence when it is determined that the recognition result indicates that the target element is a predetermined type of character.
[0130] The second recognition module is used to perform semantic recognition on the target content to obtain a semantic recognition result.
[0131] The fifth determination module is used to determine that the target content is a complete sentence when it is determined that the semantic recognition result indicates that the target content is semantically complete.
[0132] According to an embodiment of the present disclosure, the interaction device further includes a first generating module.
[0133] The first generating module is used to generate a position mapping relationship based on the editable area boundary and the content attribute of the editable content, wherein the editable area boundary is determined based on the editable content.
[0134] According to an embodiment of the present disclosure, the first generating module includes a mapping relationship generating submodule.
[0135] The mapping relationship generating submodule is used to generate a position mapping relationship based on the editable area boundary and the font attributes and paragraph attributes of the editable content when the editable content includes text.
[0136] According to an embodiment of the present disclosure, the interaction device further includes a sixth determination module.
[0137] The sixth determination module is used to determine the position of the editable content in the interactive interface, so as to determine the first reference position of the insertion point in the editable content when it is determined that the editable content is in the input box of the interactive interface.
[0138] According to an embodiment of the present disclosure, the second determination module 730 includes a reference position determination submodule and a display position determination submodule.
[0139] The reference position determination submodule is used to determine the reference position of the functional control in the first direction based on the second reference position and the functional control size of the functional control.
[0140] The display position determination submodule is used to determine the display position of the functional control in the virtual coordinate system based on a preset distance and a reference position from the insertion point in the second direction, wherein the first direction and the second direction are perpendicular.
[0141] According to an embodiment of the present disclosure, the display position determining submodule includes a reference position determining unit and a display position determining unit.
[0142] The reference position determining unit is used to adjust the reference position to obtain an adjusted reference position when it is determined that the reference position exceeds the editing area boundary of the editable content in the first direction.
[0143] The display position determining unit is used to determine the display position of the function control in the virtual coordinate system based on a preset distance from the insertion point in the second direction and the adjusted reference position.
[0144] According to an embodiment of the present disclosure, the interaction device further includes an updating module.
[0145] An update module updates a setting method between the function control and the insertion point when it is determined that the function control meets a predetermined condition, so as to perform an operation of determining a display position of the function control in a virtual coordinate system based on a second reference position of the insertion point according to the updated setting method, wherein the setting method is used to characterize a relative position relationship between the function control and the insertion point in a second direction.
[0146] According to an embodiment of the present disclosure, the update module further includes a condition determination submodule.
[0147] The condition determination submodule determines that the function control meets the predetermined condition when it is determined that the distance between the second reference position of the insertion point and the editable area boundary of the editable content in the second direction is smaller than the function control size of the function control in the second direction.
[0148] According to an embodiment of the present disclosure, the interaction device further includes a second generating module.
[0149] The second generation module is used to generate new content in response to a content addition instruction based on the previous content and the following content of the insertion point, wherein the previous content and the following content are determined from the editable content based on the first reference position of the insertion point, and the content addition instruction is generated by operating the function control.
[0150] According to an embodiment of the present disclosure, the second generating module includes a first generating submodule and a second generating submodule.
[0151] The first generating submodule is used to generate content prompt information based on the preceding content and the succeeding content.
[0152] The second generation submodule is used to input the content prompt information into the large model to obtain the newly added content.
[0153] According to an embodiment of the present disclosure, the interaction device further includes at least one of the following modules:
[0154] The first processing module is used to wrap the newly added content.
[0155] The second processing module is used to change the font of the newly added content to a font different from that of the editable content.
[0156] The third processing module is used to change the color of the newly added content to a color different from that of the editable content.
[0157] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0158] According to an embodiment of the present disclosure, an electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute a method as in the embodiment of the present disclosure.
[0159] According to an embodiment of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause a computer to execute a method as described in an embodiment of the present disclosure.
[0160] According to an embodiment of the present disclosure, a computer program product includes a computer program, and when the computer program is executed by a processor, the method according to the embodiment of the present disclosure is implemented.
[0161] According to an embodiment of the present disclosure, any multiple modules among the first determination module 710, the mapping module 720, the second determination module 730 and the display module 740 may be combined into one module for implementation, or any one of the modules may be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules may be combined with at least part of the functions of other modules and implemented in one module.
[0162] According to an embodiment of the present disclosure, at least one of the first determination module 710, the mapping module 720, the second determination module 730 and the display module 740 may be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or may be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or by any one of the three implementation methods of software, hardware and firmware or by a proper combination of any of them. Alternatively, at least one of the first determination module 710, the mapping module 720, the second determination module and the display module may be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function may be executed.
[0163] Figure 8 A schematic block diagram of an example electronic device 900 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0164] like Figure 8 As shown, the device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 to a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0165] A number of components in the device 800 are connected to an input / output (I / O) interface 805, including: an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0166] The computing unit 801 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 801 performs the various methods and processes described above, such as the interactive method. For example, in some embodiments, the interactive method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded into the RAM 803 and executed by the computing unit 801, one or more steps of the interactive method described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform the interactive method in any other appropriate manner (e.g., by means of firmware).
[0167] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0168] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0169] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. 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, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, 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 foregoing.
[0170] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0171] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0172] A computer system may include a client and a server. The client and the server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises through computer programs running on respective computers and having a client-server relationship to each other. The server may be a cloud server, a server in a distributed system, or a server combined with a blockchain.
[0173] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0174] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. An interactive method, comprising: In response to an operation on the editable content, determining a first reference position of an insertion point in the editable content; Based on the position mapping relationship, position mapping is performed on the first reference position to obtain a second reference position of the insertion point in a virtual coordinate system, wherein the virtual coordinate system is established based on the content area of the editable content; Based on the second reference position of the insertion point, determining a display position of a function control in the virtual coordinate system, wherein the function control is used to realize generating new content based on the editable content; Based on the display position, the function control is displayed.
2. The method according to claim 1, further comprising: Determining target content from the editable content based on a first reference position of the insertion point; as well as In the case where it is determined that the target content is a complete sentence, the operation of displaying the function control based on the display position is performed.
3. The method according to claim 2, further comprising: Identifying a target element in the target content to obtain an identification result, wherein the target element includes the first element before the insertion point in a description order; and In a case where it is determined that the recognition result represents that the target element is a character of a predetermined type, the target content is determined to be a complete sentence.
4. The method according to claim 2, further comprising: Performing semantic recognition on the target content to obtain a semantic recognition result; as well as In the case where it is determined that the semantic recognition result indicates that the target content is semantically complete, the target content is determined to be a complete sentence.
5. The method according to any one of claims 1 to 4, further comprising: The position mapping relationship is generated based on an editable area boundary and a content attribute of the editable content, wherein the editable area boundary is determined based on the editable content.
6. The method according to claim 5, wherein: The generating the position mapping relationship based on the editable area boundary and the content attribute of the editable content includes: In the case where the editable content includes text, the position mapping relationship is generated based on the editable area boundary and the font attributes and paragraph attributes of the editable content.
7. The method according to any one of claims 1 to 6, further comprising: The position of the editable content in the interactive interface is determined, so that when it is determined that the editable content is in an input box of the interactive interface, the operation of determining a first reference position of an insertion point in the editable content is performed.
8. The method according to any one of claims 1 to 7, wherein determining the display position of the functional control in the virtual coordinate system based on the second reference position of the insertion point comprises: determining a reference position of the functional control in the first direction based on the second reference position and a functional control size of the functional control; as well as The display position of the function control in the virtual coordinate system is determined based on a preset distance from the insertion point in the second direction and the reference position, wherein the first direction is perpendicular to the second direction.
9. The method according to claim 8, wherein: The determining the display position of the function control in the virtual coordinate system based on the preset distance from the reference position in the second direction and the reference position includes: When it is determined that the reference position exceeds the boundary of the editing area of the editable content in the first direction, adjusting the reference position to obtain an adjusted reference position; Based on the preset distance from the insertion point in the second direction and the adjusted reference position, a display position of the function control in the virtual coordinate system is determined.
10. The method according to any one of claims 1 to 9, further comprising: When it is determined that the function control satisfies a predetermined condition, the setting mode between the function control and the insertion point is updated so that the operation of determining the display position of the function control in the virtual coordinate system based on the second reference position of the insertion point is performed according to the updated setting mode, wherein the setting mode is used to characterize the relative position relationship between the function control and the insertion point in the second direction.
11. The method according to claim 10, further comprising: When it is determined that the conditional spacing between the second reference position of the insertion point and the editable area boundary of the editable content in the second direction is smaller than the function control size of the function control in the second direction, it is determined that the function control meets the predetermined condition.
12. The method according to any one of claims 1 to 11, further comprising: In response to a content adding instruction, new content is generated based on the preceding content and the succeeding content of the insertion point, wherein the preceding content and the succeeding content are determined from the editable content based on a first reference position of the insertion point, and the content adding instruction is generated by operating the function control.
13. The method according to claim 12, wherein: The step of generating the new content based on the preceding content and the following content of the insertion point in response to the content adding instruction includes: Generate content prompt information based on the preceding content and the succeeding content; and The content prompt information is input into the large model to obtain the newly added content.
14. The method according to claim 12 or 13, further comprising at least one of the following: Wrap the newly added content; Changing the font of the newly added content to a font different from that of the editable content; The color of the newly added content is changed to a color different from that of the editable content.
15. An interactive device, comprising: A first determining module, configured to determine a first reference position of an insertion point in the editable content in response to an operation on the editable content; A mapping module, configured to perform position mapping on the first reference position based on a position mapping relationship to obtain a second reference position of the insertion point in a virtual coordinate system, wherein the virtual coordinate system is established based on a content area of the editable content; A second determining module, configured to determine a display position of a function control in the virtual coordinate system based on a second reference position of the insertion point, wherein the function control is configured to realize generation of new content based on the editable content; The display module is used to display the function control based on the display position.
16. The apparatus according to claim 15, further comprising: A third determining module, configured to determine target content from the editable content based on the first reference position of the insertion point; as well as An execution module is used to execute the operation of displaying the function control based on the display position when it is determined that the target content is a complete sentence.
17. The apparatus according to claim 16, further comprising: A first recognition module is configured to recognize a target element in the target content to obtain a recognition result, wherein the target element includes the first element before the insertion point in a description order; and The fourth determination module is used to determine that the target content is a complete sentence when it is determined that the recognition result indicates that the target element is a predetermined type of character.
18. The apparatus according to claim 16, further comprising: A second recognition module is used to perform semantic recognition on the target content to obtain a semantic recognition result; as well as The fifth determination module is used to determine that the target content is a complete sentence when it is determined that the semantic recognition result indicates that the target content is semantically complete.
19. The device according to any one of claims 15 to 18, further comprising: The first generating module is used to generate the position mapping relationship based on an editable area boundary and a content attribute of the editable content, wherein the editable area boundary is determined based on the editable content.
20. The device according to claim 19, wherein The first generation module comprises: The mapping relationship generating submodule is used to generate the position mapping relationship based on the editable area boundary and the font attributes and paragraph attributes of the editable content when the editable content includes text.
21. The device according to any one of claims 15 to 20, further comprising: The sixth determination module is used to determine the position of the editable content in the interactive interface, so as to perform the operation of determining the first reference position of the insertion point in the editable content when it is determined that the editable content is in the input box of the interactive interface.
22. The device according to any one of claims 15 to 21, wherein the second determining module comprises: a reference position determining submodule, configured to determine a reference position of the functional control in a first direction based on the second reference position and a functional control size of the functional control; as well as The display position determination submodule is used to determine the display position of the function control in the virtual coordinate system based on a preset distance from the insertion point in the second direction and the reference position, wherein the first direction is perpendicular to the second direction.
23. The device according to claim 22, wherein: The display position determination submodule includes: A reference position determining unit, configured to adjust the reference position to obtain an adjusted reference position when it is determined that the reference position exceeds a boundary of an editing area of the editable content in a first direction; The display position determining unit is used to determine the display position of the function control in the virtual coordinate system based on a preset distance from the insertion point in the second direction and the adjusted reference position.
24. The apparatus according to any one of claims 15 to 23, further comprising: An updating module is used to update the setting mode between the function control and the insertion point when it is determined that the function control meets a predetermined condition, so as to perform the operation of determining the display position of the function control in the virtual coordinate system based on the second reference position of the insertion point according to the updated setting mode, wherein the setting mode is used to characterize the relative position relationship between the function control and the insertion point in a second direction.
25. The apparatus according to claim 24, further comprising: The condition determination submodule is used to determine that the function control meets the predetermined condition when it is determined that the distance between the second reference position of the insertion point and the editable area boundary of the editable content in the second direction is smaller than the function control size of the function control in the second direction.
26. The apparatus according to any one of claims 15 to 25, further comprising: The second generation module is used to generate new content in response to a content addition instruction based on the previous content and the following content of the insertion point, wherein the previous content and the following content are determined from the editable content based on the first reference position of the insertion point, and the content addition instruction is generated by operating the function control.
27. The device according to claim 26, wherein: The second generation module comprises: A first generating submodule is used to generate content prompt information based on the preceding content and the succeeding content; and The second generation submodule is used to input the content prompt information into the large model to obtain the newly added content.
28. The device according to claim 26 or 27, further comprising at least one of the following: A first processing module, used for wrapping the newly added content; A second processing module, configured to change the font of the newly added content to a font different from that of the editable content; The third processing module is used to change the color of the newly added content to a color different from that of the editable content.
29. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 14.
30. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 14.
31. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 14.