Text box information processing method and device, electronic equipment and storage medium

文档序号:7094 发布日期:2021-09-17 浏览:79次 中文

1. A text box information processing method is characterized by comprising the following steps:

detecting a first position where a current cursor in a text box is located and a second position where a preset key character in the text box is located;

when the content between the first position and the second position is the content to be matched according with the condition, matching the content to be matched to obtain a matching result;

displaying a matching result list comprising the matching result;

and responding to an account selection instruction, and inserting the matching result selected by the account in the matching result list into the text box as an integral text block.

2. The method of claim 1, further comprising, prior to inserting the matching result selected by the account in the matching result list as an integral text block into the text box:

deleting the content to be matched or the matching result which is inserted between the first position and the second position.

3. The method according to claim 1, wherein when the content between the first location and the second location is a content to be matched that meets a condition, matching the content to be matched to obtain a matching result comprises:

and when the content between the first position and the second position is the content to be matched, which does not contain blank characters, matching the content to be matched to obtain a matching result.

4. The method according to any one of claims 1 to 3, wherein the inserting the matching result selected by the account in the matching result list as an integral text block into the text box in response to the instruction for selecting the account comprises:

responding to a selection instruction of the account, and determining a matching result selected from the matching result list;

combining the selected matching result with preset additional information according to a preset combination rule to generate a matching item;

inserting the matching item into the text box as a whole text box.

5. The method of claim 4, wherein generating the match comprises:

setting the additional information in the matching item to be invisible when being displayed in the text box.

6. The method of claim 4, wherein after inserting the matching item into the text box as a whole text box, the method comprises:

modifying text attribute data of the matching item and/or adding a preset animation effect to the matching item to obtain a preset display style of the matching item;

and displaying the matching items in the text box according to a preset style.

7. A text box information processing apparatus characterized by comprising:

the detection module is used for detecting a first position where a current cursor in a text box is located and a second position where a preset key character in the text box is located;

the matching module is used for matching the content to be matched when the content between the first position and the second position is the content to be matched which meets the condition, so as to obtain a matching result;

the matching result display module is used for displaying a matching result list comprising the matching result;

and the inserting module is used for responding to a selection instruction of an account and inserting the matching result selected by the account in the matching result list into the text box as an integral text block.

8. An electronic device, comprising:

at least one processor;

a memory for storing the processor-executable instructions;

wherein the processor is configured to execute the instructions to implement the text box information processing method according to any one of claims 1 to 6.

9. A computer-readable storage medium, wherein instructions in the computer-readable storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the text box information processing method according to any one of claims 1 to 6.

10. A computer program product comprising a computer program, characterized in that the computer program realizes the text box information processing method of any one of claims 1 to 6 when executed by a processor.

Background

Currently, in some web-based social applications, a user may interact with other users or participate in a certain topic, such as @ a certain person or # topic, by entering the key characters "@" or "#" or the like in a text box.

In the related art, after a user inputs a key character, a keyword is generally manually input to be associated with an object needing interaction. As in some conventional approaches, a user enters information in a text box, as does "@ user1 see the video? "the backend server usually presents the associated interaction object directly with the keyword (such as user nickname) entered by the user after the keyword, and the interaction object presented in the text box is" user1 ". In the prior art, the information display and interaction mode in the text box is too single, so that the interaction requirement of a user cannot be met.

Disclosure of Invention

The present disclosure provides a method and an apparatus for processing text box information, an electronic device, and a storage medium, which provide a new text box interaction mode, enrich user experience, and at least solve the technical problem that the information display and interaction mode in a text box is too single. The technical scheme of the disclosure is as follows:

according to a first aspect of the embodiments of the present disclosure, there is provided a text box information processing method, including:

detecting a first position where a current cursor in a text box is located and a second position where a preset key character in the text box is located;

when the content between the first position and the second position is the content to be matched according with the condition, matching the content to be matched to obtain a matching result;

displaying a matching result list comprising the matching result;

and responding to an account selection instruction, and inserting the matching result selected by the account in the matching result list into the text box as an integral text block.

In some optional embodiments, the content to be matched includes a target object indicated by the preset key character;

the matching results in the matching result list include: based on the content obtained by matching the target object.

In some optional embodiments, before inserting the matching result selected by the account in the matching result list as an integral text block into the text box, the method further includes:

and deleting the content to be matched.

In some optional embodiments, when the content between the first location and the second location is a content to be matched that meets a condition, matching the content to be matched to obtain a matching result, including:

and when the content between the first position and the second position is the content to be matched, which does not contain blank characters, matching the content to be matched to obtain a matching result.

In some optional embodiments, the presenting the matching result list including the matching result includes:

determining a position area for displaying a matching result list;

adding a document object model in the position area;

and displaying a matching result list comprising the matching result based on the document object model.

In some optional embodiments, the inserting, in response to the instruction for selecting the account, the matching result selected by the account in the matching result list as an integral text block into the text box includes:

responding to a selection instruction of the account, and determining a matching result selected from the matching result list;

combining the matching result with preset additional information according to a preset combination rule to generate a matching item;

inserting the matching item into the text box as a whole text box.

In some optional embodiments, the generating the matching item includes:

setting the additional information in the matching item to be invisible when being displayed in the text box.

In some optional embodiments, after the inserting the matching item into the text box as an integral text box, the method further includes:

modifying text attribute data of the matching item and/or adding a preset animation effect to the matching item to obtain a preset display style of the matching item;

and displaying the matching items in the text box according to a preset style.

In some optional embodiments, after the responding to the account selection instruction and inserting the matching result selected by the account in the matching result list as an integral text block into the text box, the method further includes:

traversing the text content in the matching item to obtain the analysis content corresponding to each node in the text content;

and determining a splicing sequence according to the preset combination rule, and splicing the analysis contents according to the splicing sequence to obtain target analysis contents.

According to a second aspect of the embodiments of the present disclosure, there is provided a text box information processing apparatus including:

the detection module is used for detecting a first position where a current cursor in a text box is located and a second position where a preset key character in the text box is located;

the matching module is used for matching the content to be matched when the content between the first position and the second position is the content to be matched which meets the condition, so as to obtain a matching result;

the matching result display module is used for displaying a matching result list comprising the matching result;

and the inserting module is used for responding to a selection instruction of an account and inserting the matching result selected by the account in the matching result list into the text box as an integral text block.

In some optional embodiments, the content to be matched includes a target object indicated by the preset key character;

the matching results in the matching result list include: based on the content obtained by matching the target object.

In some optional embodiments, the apparatus further comprises:

and the deleting module is used for deleting the content to be matched or the matching result inserted between the first position and the second position.

In some optional embodiments, when the content between the first location and the second location is a content to be matched that meets a condition, matching the content to be matched to obtain a matching result, including:

and when the content between the first position and the second position is the content to be matched, which does not contain blank characters, matching the content to be matched to obtain a matching result.

In some optional embodiments, the presenting the matching result list including the matching result includes:

determining a position area for displaying a matching result list;

adding a document object model in the position area;

and displaying a matching result list comprising the matching result based on the document object model.

In some optional embodiments, the inserting, in response to the instruction for selecting the account, the matching result selected by the account in the matching result list as an integral text block into the text box includes:

responding to a selection instruction of the account, and determining a matching result selected from the matching result list;

combining the selected matching result with preset additional information according to a preset combination rule to generate a matching item;

inserting the matching item into the text box as a whole text box.

In some optional embodiments, the generating the matching item includes:

setting the additional information in the matching item to be invisible when displayed in the text box

In some optional embodiments, the apparatus further comprises:

the modification module is used for modifying the text attribute data of the matching item and/or adding a preset animation effect to the matching item to obtain a preset display style of the matching item;

and the matching item display module is used for displaying the matching items in the text box according to a preset style.

In some optional embodiments, the apparatus further comprises:

the traversal module is used for traversing the text content in the matching item to obtain the analysis content corresponding to each node in the text content;

and the splicing module is used for determining a splicing sequence according to the preset combination rule and splicing the analysis contents according to the splicing sequence to obtain target analysis contents.

In a third aspect of the embodiments of the present disclosure, there is also provided an electronic device, including:

at least one processor;

a memory for storing the processor-executable instructions;

wherein the processor is configured to execute the instructions to implement any of the methods of the present disclosure.

In a fourth aspect of the embodiments of the present disclosure, there is also provided a computer-readable storage medium, wherein instructions of the computer-readable storage medium, when executed by a processor of an electronic device, enable the electronic device to perform any one of the methods of the present disclosure.

In another aspect of the embodiments of the present disclosure, there is also provided a computer program product comprising a computer program which, when executed by a processor, implements any one of the methods of the present disclosure.

The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:

in the scheme of the embodiment of the disclosure, the content between the cursor position in the text box and the preset key character can be detected and obtained, and if the content is the content to be matched which meets the condition, the content to be matched is matched to obtain the matching result. The matching result can be displayed in a page in the form of a matching result list for the user to select. The matching result selected by the user in the matching result list may then be inserted into the text box as an integral text block. According to the scheme of the embodiment of the disclosure, the matching result list obtained by the server aiming at the content to be matched is provided for the user, the matching result selected by the user is inserted into the text box as the whole text block, the content input by the user can be dynamically matched and displayed for the user to select, the interaction mode is enriched, and the user interaction experience is improved.

It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.

Drawings

The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.

Fig. 1 is a diagram illustrating an application environment of a text box information processing method according to an exemplary embodiment.

Fig. 2 is a flowchart illustrating a text box information processing method according to an exemplary embodiment.

Fig. 3 is a flowchart illustrating a text box information processing method according to an exemplary embodiment.

Fig. 4 is a flowchart illustrating a text block insertion process in a text box information processing method according to an exemplary embodiment.

Fig. 5 is a flowchart illustrating a text box information processing method according to an exemplary embodiment.

Fig. 6 is a flowchart illustrating a text box information processing method according to an exemplary embodiment.

Fig. 7 is a block diagram illustrating a text box information processing apparatus according to an exemplary embodiment.

Fig. 8 is a block diagram illustrating a text box information processing apparatus according to an exemplary embodiment.

Fig. 9 is a block diagram illustrating a text box information processing apparatus according to an exemplary embodiment.

Fig. 10 is a block diagram illustrating a text box information processing apparatus according to an exemplary embodiment.

Fig. 11 is an internal block diagram of an electronic device shown in accordance with an example embodiment.

Detailed Description

In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.

It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims. The terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, the presence of additional identical or equivalent elements in a process, method, article, or apparatus that comprises the recited elements is not excluded. For example, if the terms first, second, etc. are used to denote names, they do not denote any particular order.

The text box information processing method provided by the disclosure can be applied to the application environment shown in fig. 1. Among other things, the terminal 110 may often need to interact with other objects in a web page of a website or a page of an APP application, reminding a certain person or participating in a certain topic by, for example, # the certain person or # the topic. For example, a text box for posting or replying to information is usually provided in an APP, and the user can use the @ symbol + user name in the text box to remind someone, and can also input some content behind the user name to remind someone who is @ to view the input content. As "@ user1 did not see the video? ". Now including the user's name "user 1" and the content "did not see this video" presented to the user 1? "is generally the original text content that the user manually entered. In the scheme of this embodiment, the server may separately extract the content between the current cursor position and the preset key character, then perform dynamic matching, display the obtained matching result to the user, and the user may select the matching result to insert into the text box, thereby increasing a diversified interaction manner. And the matching result selected by the user is inserted into the text box as an integral text block. Therefore, if the inserted matching result is to be deleted, the matching result can be deleted as a whole, so that the operation complexity caused by deleting the information content input by the user one by one is avoided, the user deleting operation is simplified, and the user interaction experience is improved. The technical scheme provided by the disclosure can be applied to the terminal 110, and can dynamically match user input content, provide a diversified interaction mode, and improve interaction experience. The terminal 110 described in the embodiments of the present disclosure may include, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, wearable devices, vehicle-mounted devices, medical devices, and the like. The terminal 110 may be a mobile terminal, such as a smart phone, or a relatively fixed terminal, such as a self-service terminal, or a detachable terminal device. Of course, in the embodiment of the present disclosure, it is not excluded that the terminal (including the electronic device described below) may also be a device including a server, a server cluster, a distributed subsystem, a cloud processing platform, a server including a block chain node, and a combination thereof, and is not limited to a device implemented on a user side.

The following describes a scheme of the embodiment of the present disclosure in an implementation scenario in which a user inputs information in a text box in an application page. Some embodiments provided by the present disclosure may be implemented by a variety of text box information processing languages, components, and the like. Such as may be realized by the Vue component. Vue a Web application framework of open source JavaScript. Some embodiments of the present disclosure use the Vue component as a case for one example illustration.

Fig. 2 is a flowchart illustrating a text box information processing method according to an exemplary embodiment, which may be used in the terminal 110, as shown in fig. 2, and may include the following steps.

In step S202, a first position where a current cursor is located in a text box and a second position where a preset key character is located in the text box are detected.

In step S204, when the content between the first location and the second location is a content to be matched that meets the condition, the content to be matched is matched to obtain a matching result.

In this embodiment, an input event of a user may be monitored, content between a position (a first position) where a current cursor is located in a text box and a position (a second position) of a preset key character may be extracted, and then it may be determined whether the content may be further matched as content to be matched, and a matching result is obtained. For example, a component of the terminal may provide an element as an input box, and set a contentedit table (an attribute of a node element in a web page, and set the attribute as true, so that a user can edit the corresponding node element) of the element as true. Then, the input event of the user is monitored. The content input by the user is obtained by obtaining lnnertext (text content, which represents one dom and its background rendered text content) of the element set the contentedit table to true. Getselect (a method provided by the browser to obtain the position of the cursor in the current text range) of the browser can then be used by the component to obtain the position of the current cursor, and the content entered by the user before the cursor can be extracted and recorded as tomachedtext (matching text). The position of the last preset key character, e.g. the @ symbol, of the tomachedtext may then be extracted, and the content following the last @ symbol of the tomachedtext may then be extracted as chunk.

The preset key characters may generally include "@", "#", etc. characters used to link to a designated object. The preset key characters may include a key character of a specified type or a key character at a specified position. In a specific example, an input event may be employed to capture the position where the user is currently located as the first position. When the input event is triggered, the first position where the current cursor is located may be detected, for example, the current content is "@ user 001", at this time, after the cursor of the user is "001", at this time, the content between the preset key character "@" and the second position where the current cursor is located may be extracted as "user 001".

When there are multiple key characters, the preset key character may refer to a key character at a specified position, such as the first or last key character in the text box content.

In step S206, a matching result list including the matching result is presented.

After the content to be matched is obtained, the content to be matched can be matched, and a corresponding matching result is obtained. The executing party performing the matching may be the terminal 110 or the component of the terminal, or may be a server in other embodiments. For example, the terminal may obtain the content to be matched, transmit the content to be matched to the server, and the server performs matching to obtain a matching result and then returns the matching result to the terminal.

The matching result can have a corresponding matching processing mode according to the information contained in the content to be matched. Generally, according to the first position where the current cursor is located, the content to be matched may include a target object indicated by the preset key character, such as a user name following an "@" character, and the matching result in the corresponding matching result list includes: based on the content obtained by matching the target object. Therefore, more choices of inserting information can be provided for the user, the information content inserted by the text box is enriched, and the user interaction experience is improved. In other embodiments, interactive content for interacting with the target object may also be included, such as "@ user001 did not see the movie? Is "in" see movie? ". Therefore, the matching result may include a matching result obtained by matching the target object, or may include a matching result obtained by matching the interactive content. Specifically, the matched matching result can be processed by presetting a corresponding algorithm, such as matching to "user 001" according to "user 001", or further matching to "user 002" associated with "user 001", according to "see movie? "match with attribute information such as geographical location of a certain user" go XX movie theaters together "and so on. Of course, the matching result of "go XX movie theaters together" can be obtained according to the matching of "user 001", the behavior data in the preset period, the attribute information of the geographic position, and the like.

In the embodiment, one or more matching results can be obtained, and the matching results can be displayed on the terminal in a matching result list form for the user to check and select.

In step S208, in response to an account selection instruction, the matching result selected by the account in the matching result list is inserted into the text box as an integral text block.

The account generally refers to a user operating on a text box. The account may select one or more matching outcomes from the matching outcomes list. After the account selects the matching result, the selected matching content is innovatively inserted into the text box as an integral text block, and the integral text block is inserted as an integral inseparable body when inserted into the text box, and if the integral text block is deleted, the integral text block can only be deleted as a whole. Therefore, the user does not need to delete the content input before the current cursor word by word, the user can delete the content quickly, the deleting efficiency is improved, and the interactive experience of the user text box is improved.

According to the scheme of the embodiment of the disclosure, the matching result list obtained by the server aiming at the content to be matched is provided for the user, the matching result selected by the user is inserted into the text box as the whole text block, the content input by the user can be dynamically matched and displayed for the user to select, the interaction mode is enriched, and the user interaction experience is improved.

Of course, in some embodiments of the present disclosure, the content to be matched may include a target object indicated by the preset key character and interactive content interacted with the target object; the matching results in the matching result list may include: and matching the target object and the interactive content to obtain a matching result. In this way, the content to be matched may include not only the target object indicated by the preset key character, but also interactive content that interacts with the target object. Correspondingly, the terminal or the server side can match according to any one or combination of the target object and the interactive content. Therefore, the content to be matched can also comprise a plurality of information contents such as the target object, the interactive content and the like, so that the matching content of more contents can be matched more flexibly, the matching content which better meets the account requirement can be matched according to the target object and the interactive content, the matched content is richer and more accurate, and the user text box interface interaction experience is improved.

In other embodiments of the present disclosure, the matching result selected by the user is inserted before the text box, and the content to be matched already exists in the text box or the matching result which is inserted before the content to be matched already exists in the text box. At this time, the content to be matched or the matching result already inserted between the first position and the second position may be deleted, and then the latest selected matching result may be inserted into the text box. Fig. 3 is a flowchart illustrating a text box information processing method according to an exemplary embodiment. As shown in fig. 3, before inserting the matching content selected by the account in the matching result list into the text box as an integral text block, the method further includes:

s302: deleting the content to be matched or the matching result which is inserted between the first position and the second position.

According to the embodiment of the disclosure, the content to be matched, which is input in the text box before, can be deleted, and the matching content selected by the user can be reinserted. And deleting the previously input content to be matched, and displaying the matching content selected by the user from the matching result list, so that the displayed information content of the text box can be simplified, and the interactive experience of the text box interface can be improved. And the matching result inserted into the text box is inserted as an integral body which is inseparable, so that if the matching result inserted before is deleted, the integral body can be deleted. Therefore, the user does not need to delete the currently input content word by word, the user can delete the content quickly, and the deleting efficiency is improved.

In other embodiments of the method of the present disclosure, whether the content between the first location and the second location is the content to be matched that meets the condition may be determined according to the blank character. In other embodiments of the method provided by the present disclosure, when the content between the first location and the second location is a content to be matched that meets a condition, matching the content to be matched to obtain a matching result, may include:

and when the content between the first position and the second position is the content to be matched, which does not contain blank characters, matching the content to be matched to obtain a matching result.

The content between the first position and the second position may include various information contents, and the present embodiment may determine whether the user inputs the content continuously or not based on the blank characters. If not continuous, matching may not be required. In a specific implementation, whether the content between the first location and the second location has blank characters can be matched by this "/\ s/" rule. According to the embodiment, whether the content between the first position and the second position is the content to be matched is determined according to the blank characters, so that the operation habit of inputting information by a user text box is better met, different information objects can be distinguished more quickly, and the processing efficiency of the terminal or the server for matching the content to be matched is improved.

In another embodiment of the method provided by the present disclosure, the presenting a matching result list including the matching result includes:

determining a position area for displaying a matching result list;

adding a document object model in the position area;

and displaying a matching result list comprising the matching result based on the document object model.

The location area where the matching result list is presented may be specified in advance. Typically, the location area where the matching result list is presented is usually near the text box, such as below the text box. After the position area for displaying the matching result list is determined, a DOM can be added to the position area, and the user displays the matching result list. And the DOM structure is adopted for displaying, so that subsequent text control is facilitated. The DOM is an abbreviation of Document Object Model (Document Object Model), a platform and language independent Application Program Interface (API) that can dynamically access programs and scripts to update their content, structure, and style of documents.

Fig. 4 is a flowchart illustrating a text block insertion process in a text box information processing method according to an exemplary embodiment. As shown in fig. 4, the inserting the matching result selected by the account in the matching result list as an integral text block into the text box in response to the instruction for selecting the account includes:

s402: responding to a selection instruction of the account, and determining a matching result selected from the matching result list;

s404: combining the selected matching result with preset additional information according to a preset combination rule to generate a matching item;

s406: inserting the matching item into the text box as a whole text box.

The matching result directly matched by the content to be matched between the first position and the second position is usually the information content of a plain text, and the carried information content is less. The embodiment may combine the matching result with other information to generate a matching item containing more information content. Specifically, the matching result selected by the user in the matching result list may be combined with preset additional information according to a preset combination rule to generate a matching item, and the matching item may be inserted into the text box as an integral text box. The preset additional information may be selected according to information to be recorded, for example, the preset additional information may include information content such as identification information of the user, user level information, a friend relationship between the user and a target object indicated by a preset key character, and the like.

In a specific implementation example, a component (caller) of the terminal may record some additional information, such as userID (user identifier) and the like, by setting an attribute (a call method in html, and a custom attribute may be added) of the DOM. And these additions may be set to not appear on the page. If the caller does not use this slot, the default style and structure of the component may be used. After the DOM to be inserted is generated, the component may set the contentdigital of the DOM (the attribute of the node element in the web page, and the user can edit the corresponding node element by setting the attribute to true) to false, so that the content in the DOM node is not editable, and when deleted, the DOM node is deleted as a whole. The final component may call apendchild (a calling method in html) of the rich text box to insert this DOM into the input content.

The matching result inserted into the text box in the scheme of the embodiment can not be the information content of a plain text any more, more additional information can be recorded, more data information can be stored, the additional information can be obtained by analyzing the inserted matching result subsequently, and the accuracy and the efficiency of the later-stage text box information processing of a developer are facilitated.

In still other embodiments of the method provided by the present disclosure, the generating the match may include: setting the additional information in the matching item to be invisible when being displayed in the text box. As described above, the text box containing the additional matching result can be not displayed when the user normally uses the text box (in a non-development mode), so that the original interactive interface is reserved, information interference is reduced, and more data information can be stored without affecting UI display.

Fig. 5 is a flowchart illustrating a text box information processing method according to an exemplary embodiment. In other embodiments of the method, as shown in fig. 5, after inserting the matching item into the text box as an integral text box, the method further comprises:

502: modifying text attribute data of the matching item and/or adding a preset animation effect to the matching item to obtain a preset display style of the matching item;

s504: and displaying the matching items in the text box according to a preset style.

The preset style specifically may include highlighting, font bolding, font changing, and the like. The specific implementation can be realized by modifying the text attribute data of the matching items, such as modifying the ground color, the text font color, the font style and the like. And setting animation effects such as dynamic scaling, periodic gradient of color/transparency and the like for the matching items. Therefore, the display mode of the inserted matching item is changed by modifying the text attribute data of the matching item or increasing the animation effect, the preset display mode of the matching item is obviously different from the default or current display mode in the text box, the user can more obviously recognize the matching item inserted in the text box, the information display content and the display mode of the text box are enriched, and the user interface interaction experience is improved. Meanwhile, when the matched content inserted before deletion is deleted, the information content to be deleted can be noticed more, so that the text box interaction mode is enriched, and the user interaction experience is improved.

Fig. 6 is a flowchart illustrating a text box information processing method according to an exemplary embodiment. In other embodiments of the method, as shown in fig. 6, after the responding to the instruction for selecting the account and inserting the matching result selected by the account in the matching result list into the text box as an integral text block, the method further includes:

s602: traversing the text content in the matching item to obtain the analysis content corresponding to each node in the text content;

s604: and determining a splicing sequence according to the preset combination rule, and splicing the analysis contents according to the splicing sequence to obtain target analysis contents.

The rich text may be parsed before rendering the presentation before submitting the matching items to the background. The rich text is the above mentioned matching item containing the additional information. In some embodiments, each node may be traversed and parsed for all child node hierarchies of rich text. In rich text, when entering a line break, the rich text may wrap the current line with a div (a text segmentation label) label. For the special node inserted by the calling party, the calling party can acquire the content according to the actual requirement of the calling party during analysis. For example, the DOM above has the data-user-id of the DOM set, and additional information recorded by the DOM can be obtained through getattribute ('data-user-id') when parsing. Finally, all the analyzed contents are spliced together in sequence, and the finally analyzed target analyzed contents can be obtained. The developer can obtain the additional information recorded in the matching item, and the additional resource expense for obtaining the additional information is saved.

It is understood that the embodiments of the method described above are described in a progressive manner, and the same/similar parts of the embodiments are referred to each other, and each embodiment focuses on differences from the other embodiments. Reference may be made to the description of other method embodiments for relevant points.

It should be understood that, although the steps in the flowcharts referred to in the figures are shown in sequence as indicated by the arrows, the steps are not necessarily performed in sequence as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in the figures may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least some of the steps or stages of other steps.

Based on the description of the above-mentioned text box information processing method in a page, the present disclosure also provides a text box information processing apparatus in a page. The apparatus may include systems (including distributed systems), software (applications), modules, components, servers, clients, etc. that use the methods described in embodiments of the present specification in conjunction with any necessary apparatus to implement the hardware. Based on the same innovative concept, the embodiments of the present disclosure provide an apparatus in one or more embodiments as described in the following embodiments. Since the implementation scheme of the apparatus for solving the problem is similar to that of the method, the specific implementation of the apparatus in the embodiment of the present specification may refer to the implementation of the foregoing method, and repeated details are not repeated. As used hereinafter, the term "unit" or "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.

Fig. 7 is a block diagram illustrating a text box information processing apparatus according to an exemplary embodiment. The apparatus may be the terminal 110, a server, or a module, a component, a device, a unit, etc. integrated in the terminal 110.

Referring specifically to fig. 7, the apparatus 100 may include:

the detecting module 702 may be configured to detect a first position where a current cursor in a text box is located and a second position where a preset key character in the text box is located;

a matching module 704, configured to match the content to be matched when the content between the first location and the second location is the content to be matched that meets the condition, so as to obtain a matching result;

a matching result capacity display module 706, configured to display a matching result list including the matching result;

the inserting module 708 may be configured to insert, in response to an account selection instruction, a matching result selected by the account in the matching result list into the text box as an integral text block.

In other embodiments of the apparatus, the content to be matched includes a target object indicated by the preset key character;

the matching results in the matching result list include: based on the content obtained by matching the target object.

An exemplary embodiment is shown in fig. 8, and fig. 8 is a block diagram of a text box information processing apparatus according to an exemplary embodiment. Referring to fig. 7, the apparatus may further include:

the deleting module 802 may be configured to delete the content to be matched or the matching result that has been inserted between the first location and the second location.

Based on the description of the foregoing method embodiments, in other embodiments of the apparatus, when the content between the first location and the second location is a content to be matched that meets a condition, matching the content to be matched to obtain a matching result includes:

and when the content between the first position and the second position is the content to be matched, which does not contain blank characters, matching the content to be matched to obtain a matching result.

Based on the foregoing description of method embodiments, in further embodiments of the apparatus, the presenting the matching result list including the matching result includes:

determining a position area for displaying a matching result list;

adding a document object model in the position area;

and displaying a matching result list comprising the matching result based on the document object model.

Based on the foregoing description of the method embodiments, in other embodiments of the apparatus, the inserting, in response to an instruction to select an account, a matching result selected by the account from the matching result list into the text box as an integral text block includes:

responding to a selection instruction of the account, and determining a matching result selected from the matching result list;

combining the selected matching result with preset additional information according to a preset combination rule to generate a matching item;

inserting the matching item into the text box as a whole text box.

In further embodiments of the apparatus, based on the description of the foregoing method embodiments, the generating the matching term includes:

setting the additional information in the matching item to be invisible when being displayed in the text box.

An exemplary embodiment is shown in fig. 9, and fig. 9 is a block diagram of a text box information processing apparatus according to an exemplary embodiment. Referring to fig. 9, the apparatus may further include:

a modifying module 902, configured to modify text attribute data of the matching item and/or add a preset animation effect to the matching item, so as to obtain a preset display style of the matching item;

a matching item displaying module 904, configured to display the matching item in the text box according to a preset style.

An exemplary embodiment is shown in fig. 10, and fig. 10 is a block diagram of a text box information processing apparatus according to an exemplary embodiment. Referring to fig. 10, the apparatus may further include:

the traversal module 1002 may be configured to traverse the text content in the matching item to obtain an analysis content corresponding to each node in the text content;

the splicing module 1004 may be configured to determine a splicing order according to the preset combination rule, and splice the analysis contents according to the splicing order to obtain the target analysis content.

With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.

In an exemplary embodiment, there is also provided a computer program product including a computer program that realizes the in-page text box information processing method described in any one of the present specification when executed by a processor.

Fig. 11 is a block diagram illustrating a text box information processing apparatus Z00 according to an exemplary embodiment. The device Z00 may be an electronic device for a video or image style migration process. For example, device Z00 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a gaming console, a tablet device, a medical device, a fitness device, a personal digital assistant, a smart wearable device, a vehicle mounted device, and so forth.

Referring to fig. 10, device Z00 may include one or more of the following components: a processing component Z02, a memory Z04, a power component Z06, a multimedia component Z08, an audio component Z10, an interface for input/output (I/O) Z12, a sensor component Z14 and a communication component Z16.

The processing component Z02 generally controls the overall operation of the device Z00, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component Z02 may include one or more processors Z20 to execute instructions to perform all or part of the steps of the method described above. Further, the processing component Z02 may include one or more modules that facilitate interaction between the processing component Z02 and other components. For example, the processing component Z02 may include a multimedia module to facilitate interaction between the multimedia component Z08 and the processing component Z02.

The memory Z04 is configured to store various types of data to support operations at device Z00. Examples of such data include instructions for any application or method operating on device Z00, contact data, phonebook data, messages, pictures, videos, etc. The memory Z04 may be implemented by any type or combination of volatile or non-volatile storage devices, such as static random access memory (12RAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.

The power supply component Z06 provides power to the various components of the device Z00. The power component Z06 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device Z00.

The multimedia component Z08 comprises a screen between the device Z00 and the object providing an output interface. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from an object. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component Z08 includes a front facing camera and/or a rear facing camera. When device Z00 is in an operating mode, such as a capture mode or a video mode, the front-facing camera and/or the rear-facing camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

The audio component Z10 is configured to output and/or input an audio signal. For example, the audio component Z10 includes a Microphone (MIC) configured to receive external audio signals when the device Z00 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may further be stored in the memory Z04 or transmitted via the communication component Z16. In some embodiments, the audio component Z10 also includes a speaker for outputting audio signals.

The I/O interface Z12 provides an interface between the processing component Z02 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.

The sensor assembly Z14 includes one or more sensors for providing status assessment of various aspects to the device Z00. For example, sensor assembly Z14 may detect the open/closed state of device Z00, the relative positioning of the components, such as the display and keypad of device Z00, sensor assembly Z14 may also detect a change in the position of one component of device Z00 or device Z00, the presence or absence of an object in contact with device Z00, the orientation or acceleration/deceleration of device Z00, and a change in the temperature of device Z00. The sensor assembly Z14 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly Z14 may also include a light sensor, such as a CMO12 or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly Z14 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

The communication component Z16 is configured to facilitate wired or wireless communication between device Z00 and other devices. Device Z00 may access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G, or 5G), or a combination thereof. In an exemplary embodiment, the communication component Z16 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component Z16 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

In an exemplary embodiment, the device Z00 may be implemented by one or more application specific integrated circuits (a12IC), a digital signal processor (D12P), a digital signal processing device (D12PD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a controller, a microcontroller, a microprocessor or other electronic components for performing the above-described methods.

It should be noted that the device Z00 may be an exemplary description of an electronic device, such as a mobile phone. In some end products it may not be necessary to include all of the above components or all of the functional units under a component.

In an exemplary embodiment, there is also provided a computer readable storage medium, such as the memory Z04, comprising instructions executable by the processor Z20 of the device Z00 to perform the above method. The storage medium may be a computer-readable storage medium, which may be, for example, a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, a graphene data storage device, or the like.

It should be noted that, the descriptions of the above-mentioned apparatuses, devices, computer programs, etc. according to the method embodiments may also include other embodiments, and specific implementations may refer to the descriptions of the related method embodiments. Meanwhile, the new embodiment formed by the mutual combination of the features of the methods, the devices, the equipment and the server embodiments still belongs to the implementation range covered by the present disclosure, and the details are not repeated herein.

For convenience of description, the above devices are described as being divided into various modules by functions, and are described separately. Of course, when implementing one or more of the present description, the functions of each module may be implemented in one or more software and/or hardware, or a module implementing the same function may be implemented by a combination of multiple sub-modules or sub-units, etc. The above-described embodiments of the apparatus are merely illustrative, and for example, a module or a unit may be divided into only one logical function, and may be implemented in other ways, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted or not executed. In addition, the coupling, communication connection, etc. between the devices or units shown or described may be realized by direct and/or indirect coupling/connection, and may be realized by some standard or customized interfaces, protocols, etc., in an electrical, mechanical or other form.

Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof.

完整详细技术资料下载
上一篇:石墨接头机器人自动装卡簧、装栓机
下一篇:一种电子福利发放方法、装置、存储介质及设备

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类