CN115268890A - Information processing method and device and electronic equipment - Google Patents

Information processing method and device and electronic equipment Download PDF

Info

Publication number
CN115268890A
CN115268890A CN202210899877.3A CN202210899877A CN115268890A CN 115268890 A CN115268890 A CN 115268890A CN 202210899877 A CN202210899877 A CN 202210899877A CN 115268890 A CN115268890 A CN 115268890A
Authority
CN
China
Prior art keywords
code
input box
message
message input
target code
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210899877.3A
Other languages
Chinese (zh)
Inventor
蒋妍
王润琼
李勇
张超
张昂
蒋程
王重
齐鸿烨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Zitiao Network Technology Co Ltd
Original Assignee
Beijing Zitiao Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Zitiao Network Technology Co Ltd filed Critical Beijing Zitiao Network Technology Co Ltd
Priority to CN202210899877.3A priority Critical patent/CN115268890A/en
Publication of CN115268890A publication Critical patent/CN115268890A/en
Priority to PCT/CN2023/109520 priority patent/WO2024022432A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]
    • H04L51/043Real-time or near real-time messaging, e.g. instant messaging [IM] using or handling presence information

Abstract

The present disclosure provides an information processing method, an information processing apparatus, and an electronic device, wherein a specific embodiment of the method includes: responding to a message input box of an instant messaging client side for a user to carry out preset operation, and enabling the message input box to enter a code input mode; acquiring a target code segment input in the message input box; and displaying the target code segment in the message input box according to a preset code display style. According to the implementation method, the code segments input in the message input box are displayed in the display style corresponding to the codes, the display effect of the code segments is enriched, and the user experience is improved.

Description

Information processing method and device and electronic equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to an information processing method and apparatus, and an electronic device.
Background
With the continuous development of computer software technology, more and more people need to write code programs in work and study, and the demand of people for sharing codes is also increasing. At present, with the popularization of the on-line communication mode, people hope to share and discuss the code program with colleagues or classmates through the instant messaging tool. Generally, the user can directly take the code segment as common text information, edit the common text information through an input box of the instant messaging tool, and send the common text information to the conversation interface and the friend sharing. However, since the code segment has a unique style and is greatly different from the common text message, the effect of displaying the code segment as the common text message and the user experience are poor.
Disclosure of Invention
The disclosure provides an information processing method and device and an electronic device.
According to a first aspect, there is provided an information processing method, the method comprising:
responding to a message input box of an instant messaging client side for a user to carry out preset operation, and enabling the message input box to enter a code input mode;
acquiring a target code segment input in the message input box;
and displaying the target code segment in the message input box according to a preset code display style.
According to a second aspect, there is provided an information processing apparatus, the apparatus comprising:
the control module is used for responding to the preset operation of a user on a message input box of the instant messaging client and enabling the message input box to enter a code input mode;
the acquisition module is used for acquiring the target code segment input in the message input box;
and the display module is used for displaying the target code segment in the message input box according to a preset code display style.
According to a third aspect, there is provided a computer readable storage medium, storing a computer program which, when executed by a processor, implements the method of any of the first aspects above.
According to a fourth aspect, there is provided an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method of any of the first aspects when executing the program.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
according to the information processing method and device provided by the embodiment of the disclosure, the message input box of the instant messaging client is triggered to provide the editing area supporting the display function of the code segment by the preset operation of the message input box of the instant messaging client by the user, so that the code segment input in the message input box is displayed in the display style corresponding to the code, the display effect of the code segment is enriched, and the user 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
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments described in the present disclosure, and it is obvious for a person skilled in the art to obtain other drawings based on these drawings without inventive labor.
FIG. 1a is an interface schematic diagram of an instant messaging client shown in accordance with an exemplary embodiment of the present disclosure;
FIG. 1b is an interface schematic diagram of another instant messaging client shown in accordance with an exemplary embodiment of the present disclosure;
FIG. 1c is an interface schematic diagram of another instant messaging client shown in accordance with an exemplary embodiment of the present disclosure;
FIG. 1d is an interface schematic diagram of another instant messaging client shown in accordance with an exemplary embodiment of the present disclosure;
FIG. 1e is an interface schematic diagram of another instant messaging client shown in accordance with an exemplary embodiment of the present disclosure;
FIG. 1f is an interface schematic diagram of another instant messaging client shown in accordance with an exemplary embodiment of the present disclosure;
FIG. 1g is an interface schematic diagram of another instant messaging client shown in accordance with an exemplary embodiment of the present disclosure;
FIG. 2 is a flow chart illustrating a method of an instant messaging client in accordance with an exemplary embodiment of the present disclosure;
FIG. 3 is an apparatus block diagram of an instant messaging client shown in accordance with an exemplary embodiment of the present disclosure;
fig. 4 is a schematic block diagram of an electronic device provided by some embodiments of the present disclosure;
FIG. 5 is a schematic block diagram of another electronic device provided by some embodiments of the present disclosure;
fig. 6 is a schematic diagram of a storage medium provided by some embodiments of the present disclosure.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only a part of the embodiments of the present specification, and not all of the embodiments. All other embodiments obtained by a person skilled in the art based on the embodiments in the present specification without any inventive step should fall within the scope of protection of the present specification.
When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below do not represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the disclosure, as detailed in the appended claims.
The terminology used in the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used in this disclosure, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present disclosure. The word "if" as used herein may be interpreted as "at" \8230; "or" when 8230; \8230; "or" in response to a determination ", depending on the context.
With the continuous development of computer software technology, more and more people need to write code programs in work and study, and the demand of people for sharing codes is also increasing. At present, with the popularization of the on-line communication mode, people hope to share and discuss the code program with colleagues or classmates through the instant messaging tool.
In the related technology, a user can directly input the code segment as text information into an input box of the instant messaging tool for editing, and send the text information to a conversation interface and the friend for sharing. However, since the code segment has a unique style, which is greatly different from the common text information, the unique style of the code segment cannot be embodied by displaying the code segment according to the display style of the text information, which increases the reading barrier of the code segment for the user, and the display effect and the user experience of the code segment are poor.
According to the information processing method, the message input box of the instant messaging client is triggered to provide the editing area supporting the display function of the code segment through the preset operation of the message input box of the instant messaging client by the user, so that the code segment input in the message input box is displayed in the display mode corresponding to the code, the display effect of the code segment is enriched, and the user experience is improved.
The present disclosure will be described in detail below with reference to specific examples.
Fig. 1a is a schematic interface diagram of an instant messaging client according to an exemplary embodiment. As shown in fig. 1a, for example, a user needs to share a code segment to a friend through an instant messaging client. The user can open a conversation window with a friend in the instant messaging client, and then, preset the message input box 101 of the instant messaging client, so that the instant messaging client is triggered to provide an editing area of the code segment for the user.
In one implementation, the instant messaging client may be triggered to provide the user with an edit area of the code segment by directly clicking on the icon 103 corresponding to the code in the fixed toolbar 102 of the message input box 101. In another implementation manner, any character or character string may be further input in the message input box, the input character or character string is selected, a floating toolbar (not shown in the figure) is popped up, and an icon corresponding to a code in the floating toolbar is clicked, so that the instant messaging client is triggered to provide the user with an editing area of the code segment. In another implementation manner, a preset shortcut key may be clicked to trigger the instant messaging client to provide the user with an editing area of the code segment.
Specifically, after the preset operation of the user is detected, a content block supporting a code editing and displaying function can be created in the message input box, and an editing interface of the content block is used as an editing area of the code segment. For example, if an icon corresponding to the code is directly clicked or a preset shortcut key is clicked, a content block may be created at the cursor position. For another example, if the icon corresponding to the code is clicked after the character or the character string is selected, a content block may be created at the position of the selected character or character string, so that the selected character or character string is in the content block. The code segment can be edited in the created content block and displayed in a code display mode. For example, when the code segment is displayed, part of the keywords in the code segment may be highlighted, different types of keywords may be displayed in different colors, and the line number of the code segment may be displayed.
As shown in fig. 1b, a schematic interface diagram of the instant messaging client after the user performs the preset operation is shown. The instant messaging client provides the content block 104 of the code snippet to the user in a message entry box. At the top of the content block 104 there is an editing tool 105 for the code. For example, the editing tools may include a code language selection bar, a line feed switch button, a copy button, and the like shown in fig. 1b, and other common code editing tools and the like not shown in the drawings. As shown in fig. 1c, the user may input the code segment in the content block for editing, and the code segment in the content block may be displayed in a display manner specific to the code.
Alternatively, the content block may support display styles of multiple code languages, and as shown in fig. 1d, the user may select and switch the display style of the code language through the pull-down option 106 of the code language selection bar at the top of the editing area. Specifically, the code segment may be displayed in a display style specific to the corresponding code language in the content block (because some code keywords included in the code segment may have different corresponding keyword types in different code languages, and thus the highlighted keyword has different colors).
Further optionally, the content block also supports the functions of recognition of a code language and automatic switching of display styles. For example, the user may paste the written code segment directly into the content block, may input the code segment in the content block through a keyboard, may input the code segment first, and then select the code segment to click on an icon corresponding to the code. If the written code segment is directly pasted into the content block, or the code segment is input firstly, and then the code segment is selected to click the icon corresponding to the code, the code language of the pasted or selected code segment can be automatically identified, and the current display style is automatically switched to the display style corresponding to the code language. If the code segment is input in the content block through the keyboard, the current display style can be automatically switched to the display style corresponding to the code language selected by the user. If the user does not select the code language, the current display style can be switched to the display style corresponding to the default code language.
In addition, after a character or a character string is selected in the content block, the style may be updated for the selected character or character string. In one implementation, as shown in fig. 1e, a floating toolbar 107 for updating the style of the character or the character string may pop up, and the floating toolbar 107 includes a plurality of buttons for adjusting the style. For example, a button for adjusting font weight, a button for adjusting font tilt, a button for adding a strikethrough, a button for adding an underline, and the like may be included. The style may be updated for the selected character or string of characters using a button in the pop-up hover toolbar. In another implementation, the style of the selected character or character string may also be updated directly by using a button for adjusting the style in a fixed toolbar of the message input box.
Optionally, during the process of editing the target code segment in the content block, the user may also switch the current conversation window to another conversation window. As shown in fig. 1f, the user receives the instant messaging message of the friend lie four in the process of discussing the code segment with the friend zhang. The user can switch the conversation window to the conversation window of the friend lee four by clicking the head portrait of the friend lee four, and carries out conversation with the friend lee four. Then, the head portrait of the third friend Zhang is clicked, so that the conversation window is switched back to the conversation window of the third friend Zhang, and the code fragments discussed by the third friend Zhang can be continuously edited.
Optionally, during the process of editing the target code segment in the content block, the user may also perform shuffling between the code segment and the text content, that is, add text information through the message input box so as to annotate and explain the code. As shown in fig. 1g, the user may edit the target code section in the content block, and when the user clicks an area outside the content block or clicks a preset shortcut key, a cursor for indicating an input position may jump from the area of the content block to a text input area below the content block. The user may enter text content in a text entry area below the content block that explains the target code segment, which may be displayed in the message entry box along with the target code segment. The text input area shown in fig. 1g is located below the content block, and it is understood that the text input area may also be located at other positions outside the content block, for example, above the content block, or on the left side of the content block, or on the right side of the content block, and the like, and the embodiment is not limited in this respect.
It should be noted that, the above description is given by taking editing and displaying a code in an input box of a session message of an instant messaging client as an example. In fact, the present solution may also edit and display the code in the input box of the dynamic message of the instant messaging client or the input box of the comment message, and the specific process is similar to the above embodiment and is not described herein again.
According to the scheme provided by the embodiment, the message input box of the instant messaging client is triggered to provide the editing area supporting the display function of the code segment through the preset operation of the message input box of the instant messaging client by the user, so that the code segment input in the message input box is displayed in the display style corresponding to the code, the display effect of the code segment is enriched, and the user experience is improved.
Furthermore, the message input box of the instant messaging client has a code language identification function, so that the code language can be automatically identified according to the code segments input by the user, and the current display style is automatically switched to the display style corresponding to the code language. Therefore, conditions are provided for improving the editing efficiency of the code segments, and the user experience is further improved.
Furthermore, the user can update the style of the code in the message input box of the instant messaging client, so that the flexibility of code editing is improved, and the user experience is further improved.
Still further, in the process that the user edits the target code segment in the content block, the current conversation window can be switched to other conversation windows, then the current conversation window is switched back, and the target code segment can be continuously edited, so that the operation of the user is more convenient, and the user experience is further improved.
Still further, in the process that the user edits the target code segment in the content block, the code segment and the text content can be mixed, the code segment and the text content are simultaneously displayed in the message input box, and the user can input the target code segment and input the description content for the target code segment in the message input box. Therefore, the operation of the user is more convenient and flexible, and the user experience is further improved.
FIG. 2 is a flow chart illustrating an information processing method according to an example embodiment. The method can be applied to terminal equipment. In this embodiment, for convenience of understanding, the description is given by referring to a terminal device capable of installing an instant messaging application. Those skilled in the art will appreciate that the terminal device may include, but is not limited to, a mobile terminal device such as a smart phone, a smart wearable device, a tablet computer, and the like. The method may comprise the steps of:
as shown in fig. 2, in step 201, in response to a user performing a preset operation on a message input box of an instant messaging client, the message input box is caused to enter a code input mode.
In this embodiment, the instant messaging client may be a third-party application installed in the terminal device, and the user may perform a real-time conversation with the friend/group member through the instant messaging client, may also send a public dynamic message to share and discuss with the friend/group member, and may also comment on a dynamic message sent by himself or by others.
The message input box of the instant messaging client can be an input box of a session message, an input box of a dynamic message and an input box of a comment message. The input box of the conversation message can be an input box used for editing conversation content during real-time conversation. The input box of the dynamic message may be an input box for editing published contents when publishing the published dynamic message. The input box of the comment message can be an input box used for editing comment content when a dynamic message published by the user or others is commented.
In this embodiment, the preset operation performed by the user on the message input box of the instant messaging client may be directly clicking an icon corresponding to a code in a fixed toolbar corresponding to the message input box, pressing a preset shortcut key, inputting and selecting a character or a character string in the message input box, and then clicking an icon corresponding to a code in a popped up floating toolbar.
In step 202, the target code segment entered in the message entry box is retrieved. And in step 203, displaying the target code segment in the message input box according to a preset code display style.
In this embodiment, after the preset operation is detected, an independent content block to be edited may be created in the message input box, where the content block can support editing and displaying of the code segment, and the user may input the code segment in the content block. The code segment input in the content block of the message input box may be acquired as an object code segment, and the object code segment may be presented in the message input box in a preset code display style. Wherein the code keywords in the target code segment are highlighted (e.g., highlighted) and the code line numbers in the target code segment are presented.
Specifically, when the target code segment is presented, a plurality of code keywords in the target code segment may be obtained first, and for example, the plurality of code keywords in the target code segment may be identified by a preset plug-in (e.g., a code highlighting plug-in, etc.). It is to be understood that the default plug-in may be any plug-in known in the art and that may appear in the future that is capable of performing the above-described functions, and the present disclosure is not limited by the particular type of the default plug-in. Then, the code language corresponding to the target code segment is determined. In one implementation, the code language selected by the user from the pull-down options of the code language selection bar may be obtained as the code language corresponding to the target code segment.
In another implementation manner, since different code languages have some unique code keywords, the code language corresponding to the target code fragment may also be determined according to the code keywords included in the identified target code fragment. For example, the code keyword X is a keyword specific to the C + + language, and if the code keyword X is included in the target code fragment, it may be determined that the code language corresponding to the target code fragment is the C + + language. For another example, the code keyword Y is a keyword specific to C language and Java, and the code keyword Z is a keyword specific to JavaScript and Java, and if the code keyword Y and the code keyword Z are included in the target code segment, it may be determined that the code language corresponding to the target code segment is Java. It should be noted that the above example is merely assumed to illustrate the principle, and the code keywords X, Y, and Z are also merely keyword numbers assumed for the example, and are not actual keywords.
Since the keyword types corresponding to some code keywords may be different in different code languages, the color of the highlighted keyword is also different. Therefore, the keyword type corresponding to each code keyword included in the target code segment can be determined based on the code language corresponding to the target code segment. In the content block, each code keyword included in the target code segment may be rendered according to the keyword type corresponding to the code keyword, and the target code segment is presented. For example, the keyword type of the code keyword a in C language is m, the keyword type in Java is n, the color corresponding to the keyword type m is red, and the color corresponding to the keyword type n is green. Therefore, the target code segment is determined to include the code keyword a, and if the code language corresponding to the target code segment is C language, the keyword type of the code keyword a is determined to be m. And after rendering is carried out according to the color corresponding to the keyword type m, the code keyword A is displayed in red. And if the code language corresponding to the target code segment is Java, determining that the keyword type of the code keyword A is n. And after rendering is carried out according to the color corresponding to the keyword type n, the code keyword A is displayed in green.
Optionally, in the process of inputting or displaying the target code segment in the message input box, in response to a first switching operation performed by the user for the instant messaging client, a cursor for indicating an input position may be caused to jump to an input area outside the content block in the message input box. The first switching operation may be an operation of clicking an area outside the content block, or an operation of clicking a preset shortcut key, and it may be understood that the embodiment is not limited to a specific manner of the first switching operation. Specifically, editing of the code snippet may be performed while the cursor is located in the content block. The cursor may be moved to an area outside the content block in the message input box, and when the cursor is positioned in the area outside the content block in the message input box, editing of the text content may be performed in the message input box. And, the code segment and the text content may be simultaneously displayed in the message input box, for example, the code segment is located in the rectangular box corresponding to the content block, and the text content is located outside the rectangular box corresponding to the content block. Therefore, the mixed editing of the code blocks and the text information can be realized, and the code blocks and the text information can be simultaneously sent in one conversation message. In other embodiments, when the cursor is located in the region outside the content block in the message input box, the picture/video may also be input in the input box in a paste or drag manner, so that a mixture of code blocks and picture/video may be realized, i.e., an open code block and picture/video may be sent in one message. Of course, mixed editing in which the code blocks, the text and the pictures are any two or more of the videos can also be realized.
Further optionally, when the user performs a second switching operation with respect to the instant messaging client, the first session window may be switched to a second session window different from the first session window, and when the user performs a third switching operation with respect to the instant messaging client, the second session window is switched back to the first session window, and the user may still continue to display the target code segment in the message input box.
According to the information processing method, the message input box of the instant messaging client is triggered to provide the editing area supporting the display function of the code segment through the preset operation of the message input box of the instant messaging client by the user, so that the code segment input in the message input box is displayed in the display mode corresponding to the code, the display effect of the code segment is enriched, and the user experience is improved.
It should be noted that although in the above embodiments, the operations of the methods of the embodiments of the present disclosure are described in a particular order, this does not require or imply that these operations must be performed in this particular order, or that all of the illustrated operations must be performed, in order to achieve desirable results. Rather, the steps depicted in the flowcharts may change the order of execution. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions.
Corresponding to the information processing method embodiment, the disclosure also provides an embodiment of the information processing device.
As shown in fig. 3, fig. 3 is a block diagram of an information processing apparatus shown in the present disclosure according to an exemplary embodiment, the apparatus may include: a control module 301, an acquisition module 302 and a presentation module 303.
The control module 301 is configured to respond to a preset operation performed by a user on a message input box of the instant messaging client, and enable the message input box to enter a code input mode.
An obtaining module 302, configured to obtain the target code segment input in the message input box.
And a display module 303, configured to display the target code segment in the message input box according to a preset code display style.
In some embodiments, the control module 301 is configured to create a content block in the message input box described above.
Wherein the obtaining module 302 is configured to: the code segment input in the content block of the message input box is acquired as a target code segment.
In other embodiments, display module 303 may include: an acquisition submodule, a determination submodule and a display submodule (not shown in the figure).
The obtaining submodule is used for obtaining a plurality of code keywords in the target code segment.
And the determining submodule is used for determining the first code language corresponding to the target code fragment.
And the display submodule is used for displaying the target code segment in the content block based on the code keyword and the first code language.
In other embodiments, the acquisition submodule is configured to: and identifying the target code segment by using a preset plug-in to obtain a plurality of code keywords included by the target code segment.
In other embodiments, the determination submodule is configured to: a first code language is identified based on a plurality of code keywords.
In other embodiments, the presentation submodule is configured to: and determining a keyword type corresponding to each code keyword based on the first code language, and rendering and displaying the target code fragment based on the keyword type corresponding to the code keyword in the content block.
In other embodiments, the presentation module 303 presents the target code segment by: highlighting the code keywords in the target code segment and showing the code line number in the target code segment.
In other embodiments, the user performing the preset operation on the message input box of the instant messaging client includes any one of the following: triggering operation of a user on a code block sending control in a fixed toolbar of a message input box; and after the user triggers and displays the floating input box by selecting the input content in the message input box, triggering a code sending control in the floating input box.
In other embodiments, the apparatus may further comprise: a selection module, an operation module and an update module (not shown in the figure).
The selection module is used for determining the character or the character string selected by the user from the target code segment.
And the operation module is used for determining the operation of updating the style of the character or the character string performed by the user.
And the updating module is used for responding to the operation of updating the style and updating the style of the character or the character string.
In other embodiments, a formatting toolbar is displayed in the message entry box. The operation of updating the style of the character or the character string by the user comprises the following steps: and after the user selects the character or the character string, selecting the format control corresponding to the style from the format toolbar.
In some embodiments, the message input box of the instant messaging client comprises: an input box for a conversation message, or an input box for a dynamic message, or an input box for a comment message.
In other embodiments, the apparatus may further include: a first switching module, a text acquisition module and a text presentation module (not shown in the figure).
The first switching module is used for responding to a first switching operation performed by a user aiming at the instant messaging client in the process of inputting or displaying the target code segment in the message input box, and enabling a cursor for indicating an input position to jump to an input area outside a content block in the message input box.
And the text acquisition module is used for acquiring the content input in the input area, wherein the input content comprises one or more of texts, pictures and videos.
And the text display module is used for displaying the target code segment in the content block and simultaneously displaying the input content in the input area.
In other embodiments, the message input box is an input box of a first conversation window; the apparatus may further include: a second switching module and a third switching module (not shown in the figure).
And the second switching module is used for responding to a second switching operation performed by the user aiming at the instant messaging client in the process of inputting or displaying the target code segment in the message input box and switching the first conversation window to the second conversation window.
And the third switching module is used for responding to a third switching operation of the user for the instant messaging client, switching the second conversation window back to the first conversation window and continuously displaying the target code segment in the message input box.
For the device embodiment, since it basically corresponds to the method embodiment, reference may be made to the partial description of the method embodiment for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of the embodiments of the present disclosure. One of ordinary skill in the art can understand and implement it without inventive effort.
Fig. 4 is a schematic block diagram of an electronic device provided in some embodiments of the present disclosure. As shown in fig. 4, the electronic device 910 includes a processor 911 and a memory 912, which may be used to implement a client or a server. The memory 912 is used to non-transitory store computer-executable instructions (e.g., one or more computer program modules). The processor 911 is configured to execute the computer-executable instructions, and when the computer-executable instructions are executed by the processor 911, the computer-executable instructions may perform one or more steps of the information processing method described above, thereby implementing the information processing method described above. The memory 912 and the processor 911 may be interconnected by a bus system and/or other form of connection mechanism (not shown).
For example, the processor 911 may be a Central Processing Unit (CPU), a Graphics Processing Unit (GPU) or other form of processing unit having data processing capabilities and/or program execution capabilities. For example, the Central Processing Unit (CPU) may be an X86 or ARM architecture or the like. The processor 911 may be a general-purpose processor or a special-purpose processor that controls other components in the electronic device 910 to perform desired functions.
For example, memory 912 may include any combination of one or more computer program products that may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. Volatile memory can include, for example, random Access Memory (RAM), cache memory (cache), and/or the like. The non-volatile memory may include, for example, read Only Memory (ROM), hard disk, erasable Programmable Read Only Memory (EPROM), portable compact disk read only memory (CD-ROM), USB memory, flash memory, and the like. One or more computer program modules may be stored on the computer-readable storage medium and executed by processor 911 to implement various functions of electronic device 910. Various applications and various data, as well as various data used and/or generated by the applications, and the like, may also be stored in the computer-readable storage medium.
It should be noted that, in the embodiment of the present disclosure, reference may be made to the above description on the information processing method for specific functions and technical effects of the electronic device 910, and details are not described here again.
Fig. 5 is a schematic block diagram of another electronic device provided by some embodiments of the present disclosure. The electronic device 920 is, for example, suitable for implementing the information processing method provided by the embodiment of the present disclosure. The electronic device 920 may be a terminal device or the like, and may be used to implement a client or a server. The electronic device 920 may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., car navigation terminals), wearable electronic devices, and the like, and stationary terminals such as digital TVs, desktop computers, smart home devices, and the like. It should be noted that the electronic device 920 shown in fig. 5 is only an example, and does not bring any limitation to the functions and the scope of the application of the embodiments of the present disclosure.
As shown in fig. 5, electronic device 920 may include a processing device (e.g., central processing unit, graphics processor, etc.) 921 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM) 922 or a program loaded into a Random Access Memory (RAM) 923 from a storage device 928. In the RAM 923, various programs and data necessary for the operation of the electronic apparatus 920 are also stored. The processing device 921, the ROM922, and the RAM 923 are connected to each other via a bus 924. An input/output (I/O) interface 925 is also connected to bus 924.
Generally, the following devices may be connected to I/O interface 925: input devices 926 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 927 including, for example, a Liquid Crystal Display (LCD), speaker, vibrator, etc.; storage devices 928 including, for example, magnetic tape, hard disk, etc.; and a communication device 929. The communication device 929 may allow the electronic device 920 to communicate with other electronic devices wirelessly or by wire to exchange data. While fig. 5 illustrates an electronic device 920 having various means, it is to be understood that not all illustrated means are required to be implemented or provided, and that the electronic device 920 may alternatively be implemented or provided with more or less means.
For example, according to an embodiment of the present disclosure, the above-described information processing method may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program comprising program code for performing the above-described information processing method. In such an embodiment, the computer program may be downloaded and installed from a network via the communication device 929, or installed from the storage device 928, or installed from the ROM 922. When the computer program is executed by the processing device 921, the functions defined in the information processing method provided by the embodiment of the present disclosure can be implemented.
Fig. 6 is a schematic diagram of a storage medium according to some embodiments of the present disclosure. For example, as shown in fig. 6, storage medium 930 may be a non-transitory computer-readable storage medium for storing non-transitory computer-executable instructions 931. The information processing method described in the embodiments of the present disclosure may be implemented when the non-transitory computer-executable instructions 931 are executed by a processor, for example, one or more steps in the information processing method according to the above may be performed when the non-transitory computer-executable instructions 931 are executed by a processor.
For example, the storage medium 930 may be applied to the electronic device described above, and the storage medium 930 may include a memory in the electronic device, for example.
For example, the storage medium may include a memory card of a smart phone, a storage component of a tablet computer, a hard disk of a personal computer, a Random Access Memory (RAM), a Read Only Memory (ROM), an Erasable Programmable Read Only Memory (EPROM), a portable compact disc read only memory (CD-ROM), a flash memory, or any combination of the above, as well as other suitable storage media.
For example, the description of the storage medium 930 may refer to the description of the memory in the embodiment of the electronic device, and repeated descriptions are omitted. Specific functions and technical effects of the storage medium 930 may refer to the above description about the information processing method, which is not described herein again.
In the context of this disclosure, a computer-readable medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable medium may be a computer readable signal medium or a computer readable storage medium or any combination of the two. The computer-readable storage medium may be, for example, but is not limited to: an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
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. The scope of the present disclosure is limited only by the appended claims.

Claims (16)

1. An information processing method, the method comprising:
responding to a message input box of an instant messaging client side for a user to carry out preset operation, and enabling the message input box to enter a code input mode;
acquiring a target code segment input in the message input box;
and displaying the target code segment in the message input box according to a preset code display style.
2. The method of claim 1, wherein,
the causing the message input box to enter a code entry mode includes: creating a content block in the message input box;
the obtaining the target code segment input in the message input box comprises: and acquiring the code segment input in the content block of the message input box as a target code segment.
3. The method of claim 2, wherein the presenting the target code segment in the message input box according to a preset code display style comprises:
acquiring a plurality of code keywords in the target code segment;
determining a first code language corresponding to the target code fragment;
displaying the target code snippet in the content block based on the code keyword and the first code language.
4. The method of claim 3, wherein said obtaining a plurality of code keywords in the target code snippet comprises: and identifying the target code segment by using a preset plug-in to obtain a plurality of code keywords included by the target code segment.
5. The method of claim 3, wherein the determining the first code language to which the target code snippet corresponds comprises: identifying the first code language based on the plurality of code keywords.
6. The method of claim 3, wherein said presenting the target code snippet in the content block based on the code keyword and the first code language comprises:
determining a keyword type corresponding to each code keyword based on the first code language;
in the content block, rendering and displaying the target code segment based on the keyword type corresponding to the code keyword.
7. The method of any of claims 1-6, wherein the exposing the target code snippet comprises highlighting a code keyword in the target code snippet and exposing a code line number in the target code snippet.
8. The method of claim 1, wherein the user performs a preset operation on a message input box of the instant messaging client, and the preset operation comprises any one of the following steps:
triggering operation of a user on a code block sending control in a fixed toolbar of the message input box;
and after the user triggers and displays the floating input box by selecting the input content in the message input box, triggering a code sending control in the floating input box.
9. The method of claim 1, wherein the method further comprises:
determining characters or character strings selected by a user from the target code segment;
and updating the style of the character or the character string in response to the operation of updating the style of the character or the character string by the user.
10. The method of claim 9, wherein a formatting toolbar is displayed in the message entry box;
the operation of updating the style of the character or the character string by the user comprises the following steps: and after the user selects the character or the character string, selecting the format control corresponding to the style from the format toolbar.
11. The method of claim 1, wherein the message input box of the instant messenger client comprises: an input box for a conversation message, or an input box for a dynamic message, or an input box for a comment message.
12. The method of claim 2, wherein, in entering or presenting the target code snippet in the message entry box, the method further comprises:
in response to a first switching operation performed by a user for an instant messaging client, jumping a cursor for indicating an input position to an input area outside the content block in the message input box;
acquiring the content input in the input area; the input content comprises one or more of text, pictures and videos; and
presenting the input content in the input area while the target code segment is presented in the content block.
13. The method of claim 1, wherein the message input box is a message input box of a first conversation window; in the process of inputting or displaying the target code segment in the message input box, the method further comprises:
responding to a second switching operation of the user for the instant messaging client, and switching the first conversation window to a second conversation window;
and responding to a third switching operation of the user for the instant messaging client, switching the second conversation window back to the first conversation window, and continuing to display the target code segment in the message input box.
14. An information processing apparatus, the apparatus comprising:
the control module is used for responding to the preset operation of a user on a message input box of the instant messaging client and enabling the message input box to enter a code input mode;
the acquisition module is used for acquiring the target code segment input in the message input box;
and the display module is used for displaying the target code segment in the message input box according to a preset code display style.
15. A computer-readable storage medium, having stored thereon a computer program which, when executed in a computer, causes the computer to perform the method of any one of claims 1-13.
16. An electronic device comprising a memory having stored therein executable code and a processor that, when executing the executable code, implements the method of any of claims 1-13.
CN202210899877.3A 2022-07-28 2022-07-28 Information processing method and device and electronic equipment Pending CN115268890A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202210899877.3A CN115268890A (en) 2022-07-28 2022-07-28 Information processing method and device and electronic equipment
PCT/CN2023/109520 WO2024022432A1 (en) 2022-07-28 2023-07-27 Information processing methods and apparatus, and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210899877.3A CN115268890A (en) 2022-07-28 2022-07-28 Information processing method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN115268890A true CN115268890A (en) 2022-11-01

Family

ID=83772032

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210899877.3A Pending CN115268890A (en) 2022-07-28 2022-07-28 Information processing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN115268890A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024022432A1 (en) * 2022-07-28 2024-02-01 北京字跳网络技术有限公司 Information processing methods and apparatus, and electronic device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024022432A1 (en) * 2022-07-28 2024-02-01 北京字跳网络技术有限公司 Information processing methods and apparatus, and electronic device

Similar Documents

Publication Publication Date Title
CN110046021B (en) Page display method, device, system, equipment and storage medium
US20230013656A1 (en) Information interaction method, apparatus, device, storage medium and program product
JP2023547940A (en) Information display methods, devices, equipment and media
EP4050499A1 (en) Feedback method and apparatus based on online document comment, and device and storage medium
US20230300403A1 (en) Video processing method and apparatus, device, and storage medium
EP4124052A1 (en) Video production method and apparatus, and device and storage medium
CN109408752A (en) Online document methods of exhibiting, device and electronic equipment
CN113010698B (en) Multimedia interaction method, information interaction method, device, equipment and medium
CN110058854B (en) Method, terminal device and computer-readable medium for generating application
CN108449255B (en) Comment interaction method and equipment, client device and electronic equipment
JP2023539815A (en) Minutes interaction methods, devices, equipment and media
CN114185465A (en) Information processing method, information processing apparatus, storage medium, and electronic device
CN114363686B (en) Method, device, equipment and medium for publishing multimedia content
CN114528816B (en) Collaborative editing information display method and device, electronic equipment and readable medium
US20220050562A1 (en) Methods and apparatuses for generating a hosted application
CN115268890A (en) Information processing method and device and electronic equipment
CN113946253A (en) Rich media display method, medium, device and computing equipment
CN112492399B (en) Information display method and device and electronic equipment
CN109683726B (en) Character input method, character input device, electronic equipment and storage medium
CN115291759A (en) Information processing method and device and electronic equipment
CN111934985A (en) Media content sharing method, device and equipment and computer readable storage medium
EP4344191A1 (en) Method and apparatus for editing multimedia resource scene, device, and storage medium
CN109947528B (en) Information processing method and device
EP4343579A1 (en) Information replay method and apparatus, electronic device, computer storage medium, and product
WO2023279913A1 (en) Code display method and apparatus, device, computer readable storage medium, and product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination