Information processing method, information processing device, electronic equipment and computer readable storage medium

By introducing custom extended syntax and parser in Markdown, parsing and rendering complex content generated by big models, it solves the problem that Markdown is difficult to support elements such as picture albums and videos, and improves the user's reading experience.

CN120234455APending Publication Date: 2025-07-01BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202510386718.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-28
Publication Date
2025-07-01

AI Technical Summary

Technical Problem

Markdown syntax is difficult to support elements such as picture albums and videos when rendering complex content generated by big models, resulting in poor user reading experience.

Method used

Provides an information processing method, which parses the custom extended syntax in the large model reply content into basic element blocks and custom element blocks through a parser, and renders them based on the size and relative positions of these element blocks to generate rich visual effects.

Benefits of technology

It implements inserting custom views and components in Markdown, improving the user's reading experience and supporting more features and complex styles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120234455A_ABST
    Figure CN120234455A_ABST
Patent Text Reader

Abstract

The invention relates to an information processing method, an information processing device, electronic equipment and a computer readable storage medium. The method comprises the steps that in response to input information of a user, reply information corresponding to the input information is obtained, and the reply information comprises information in a specified grammar form; based on a grammar rule corresponding to the specified grammar form, the reply information is analyzed into a plurality of content blocks, and the content blocks comprise basic element blocks and self-defined element blocks; rendering the basic element blocks and the custom element blocks based on the sizes of the custom element blocks and the relative positions between the custom element blocks and the adjacent basic element blocks; and displaying the rendered reply information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technologies, and particularly to an information processing method, an information processing apparatus, an electronic device, a computer-readable storage medium, and a computer program product. Background Art

[0002] With the implementation of artificial intelligence (AI) scenarios and the increasing diversification and complexity of the output formats of large models, higher requirements are imposed on the rendering on the business side. As a lightweight markup language, Markdown allows writing documents in a plain text format that is easy to read and write, and then converting them into effective HyperText Markup Language (HTML) or eXtensible HyperText Markup Language (XHTML) documents. Markdown only supports basic syntax types and does not support inserting elements such as picture sets and videos into text. To better present the complex content generated by large models, the business side of Markdown needs to be continuously upgraded and innovated to support more features and complex style layouts. Only in this way can it be ensured that the output of large models can be perfectly presented in Markdown, providing users with a better reading and usage experience. Summary of the Invention

[0003] According to some embodiments of the present disclosure, there is provided an information processing method, including: in response to input information of a user, obtaining reply information corresponding to the input information, the reply information including information in a specified syntax form; based on syntax rules corresponding to the specified syntax form, parsing the reply information into a plurality of content blocks, the plurality of content blocks including basic element blocks and custom element blocks; rendering the basic element blocks and the custom element blocks based on the size of the custom element blocks and the relative positions between the custom element blocks and adjacent basic element blocks; and displaying the rendered reply information in a message body.

[0004] According to some other embodiments of the present disclosure, there is provided an information processing apparatus, including: an obtaining module configured to obtain reply information corresponding to input information of a user in response to the input information, the reply information including information in a specified syntax form; a parsing module configured to parse the reply information into a plurality of content blocks based on syntax rules corresponding to the specified syntax form, the plurality of content blocks including basic element blocks and custom element blocks; a rendering module configured to render the basic element blocks and the custom element blocks based on the size of the custom element blocks and the relative positions between the custom element blocks and adjacent basic element blocks; and a display module configured to display the rendered reply information in a message body.

[0005] According to some embodiments of the present disclosure, there is provided an electronic device, including: a memory; and a processor coupled to the memory, the processor being configured to execute the method of any one of the embodiments described in the present disclosure based on instructions stored in the memory.

[0006] According to some embodiments of the present disclosure, there is provided a computer-readable storage medium having a computer program stored thereon, and when the program is executed by a processor, it executes the method of any one of the embodiments described in the present disclosure.

[0007] Other features, aspects, and advantages of the present disclosure will become apparent from the following detailed description of the exemplary embodiments of the present disclosure with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] Embodiments of the present disclosure will be described below with reference to the accompanying drawings. It should be understood that the drawings in the following description only relate to some embodiments of the present disclosure and do not constitute a limitation to the present disclosure. In the drawings:

[0009] Figure 1 A flowchart of an information processing method according to some embodiments of the present disclosure is shown;

[0010] Figure 2A A schematic diagram of an interface for displaying reply information in the related art is shown;

[0011] Figure 2B A schematic diagram of an interface for displaying reply information according to some embodiments of the present disclosure is shown;

[0012] Figure 3 A schematic diagram of rendering reply information to generate a view according to some embodiments of the present disclosure is shown;

[0013] Figure 4A and Figure 4B A schematic diagram of rendering reply information according to some embodiments of the present disclosure is shown;

[0014] Figures 5A to 5D A schematic diagram of rendering reply information according to some other embodiments of the present disclosure is shown;

[0015] Figure 6 A schematic block diagram of an information processing apparatus according to some embodiments of the present disclosure is shown;

[0016] Figure 7 A block diagram of an electronic device according to some embodiments of the present disclosure is shown;

[0017] Figure 8 A block diagram of an electronic device according to some other embodiments of the present disclosure is shown.

[0018] It should be understood that, for the convenience of description, the dimensions of the various parts shown in the drawings are not necessarily drawn in actual proportional relationships. The same or similar reference numerals are used in the various drawings to represent the same or similar components. Therefore, once an item is defined in one drawing, it may not be further discussed in subsequent drawings. Detailed implementation mode

[0019] The following will clearly and completely describe the technical solutions in the embodiments of the present disclosure with reference to the drawings in the embodiments of the present disclosure. It should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein.

[0020] It should be understood that the various steps recorded in the method implementation mode of the present disclosure can be executed in different orders and / or executed in parallel. In addition, the method implementation mode may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this regard. Unless otherwise specifically stated, the relative arrangements, numerical expressions, and numerical values of the components and steps set forth in these embodiments should be construed as merely exemplary and not limiting the scope of the present disclosure.

[0021] The term "comprising" and its variants used in the present disclosure mean open terms that include at least the subsequent elements / features, but do not exclude other elements / features, that is, "including but not limited to". The term "based on" means "at least partially based on".

[0022] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules, or units, and are not used to limit the order of the functions executed by these devices, modules, or units or their interdependent relationships. Unless otherwise specified, the concepts such as "first" and "second" are not intended to imply that the objects so described must be in a given order in terms of time, space, ranking, or any other way.

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

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

[0025] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present disclosure are all information and data authorized by the user or fully authorized by all parties. Moreover, the collection, use, and processing of the relevant data need to comply with the relevant laws, regulations, and standards of the relevant countries and regions, and corresponding operation entrances are provided for the user to choose to authorize or reject.

[0026] The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings. However, the present disclosure is not limited to these specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. In addition, in one or more embodiments, specific features, structures, or characteristics can be combined in any suitable manner that will be apparent to those of ordinary skill in the art from the present disclosure.

[0027] It should be understood that the present disclosure also places no restrictions on how to obtain the image to be applied / processed. In some embodiments of the present disclosure, it can be obtained from a storage device, such as an internal memory or an external storage device. In other embodiments of the present disclosure, the photography component can be mobilized to take a picture. It should be noted that the obtained image can be a single captured image or a frame image in the captured video, and is not particularly limited thereto.

[0028] In the context of the present disclosure, an image can refer to any one of a variety of images, such as a color image, a grayscale image, etc. It should be pointed out that in the context of this specification, the type of the image is not specifically limited. In addition, the image can be any appropriate image, such as an original image obtained by a camera device, or an image that has been subjected to specific processing on the original image, such as preliminary filtering, anti-aliasing, color adjustment, contrast adjustment, normalization, etc. It should be pointed out that the preprocessing operation can also include other types of preprocessing operations known in the art, which will not be described in detail here.

[0029] In the related art, the output format of large models has gradually evolved from a single text form to a complex rich text form, which poses higher requirements for the rendering of Markdown syntax on the business side. Generally, the Markdown scenario supports elements in plain text format and can also support basic elements such as simple graphics, tables, or formulas. However, in rendering, it can only process single elements separately and obtain the rendered views (View) or components (Widget) separately in sequence. When the large model outputs data in various forms such as pictures, videos, and audios, the Markdown parsing library will be difficult to support, and it will be difficult to render a view effect that meets the user's reading experience. For this reason, the present disclosure provides an information processing method, aiming to define a set of unified extended Markdown syntax in the large model reply content, to insert custom views and components in the rich text content, generate rich visual effects, and improve the user's usage experience.

[0030] Specifically, Figure 1 FIG. shows a flowchart of an information processing method according to some embodiments of the present disclosure.

[0031] As Figure 1 shown, in step S101, in response to the user's input information, obtain the reply information corresponding to the input information, and the reply information includes information in a specified syntax form; in step S102, based on the syntax rules corresponding to the specified syntax form, parse the reply information into multiple content blocks, and the multiple content blocks include basic element blocks and custom element blocks; in step S103, based on the size of the custom element block and the relative position between the custom element block and the adjacent basic element block, render the basic element block and the custom element block; and in step S104, display the rendered reply information in a message body.

[0032] The information processing method of this embodiment can be executed on the client side or partially on the server side.

[0033] Generally, the information processing method in the present disclosure can be applied to the interaction interface between a user and an intelligent agent, and particularly to the response information generated by the intelligent agent based on the user's input information. The response information is in the form of rich text, that is, in addition to text, it also includes a rich variety of multimedia resources and / or business cards customized by the business side, etc. Multimedia resources include, but are not limited to, static pictures, dynamic images, short videos, slides, virtual reality / augmented reality content, social media content, animated films, interactive elements, etc. Business cards include, but are not limited to, customized or automatically generated card categories such as weather cards, financial cards, mind map cards, etc. A content block is mainly used to describe the clustering of "blocky" code statements obtained after parsing the response information, and is associated with the nodes of a syntax tree based on specific syntax rules. Usually, one node represents a syntax element, rather than referring to a syntax block with a specified syntax form as commonly defined. Additionally, in the Markdown scenario, the basic elements mainly include text and / or simple pictures, tables, or formulas, etc., and the custom elements include the aforementioned various multimedia resources or business cards, etc. The response information is rendered and mapped into corresponding views and / or components, and can be displayed in the form of a message body in the interaction interface.

[0034] The interface for displaying the response information in the present disclosure can specifically refer to Figure 2A and Figure 2B . Among them, Figure 2A shows a schematic diagram of the interface for displaying the response information in the related art. As mentioned above, since the basic Markdown syntax is difficult to support complex mixed text and graphics layout, when the user asks a question to the intelligent agent in the interaction interface, the input information 1 is "Are there any scenic spots recommended in Tianshui, Gansu, besides food?", and the response information 2 of the intelligent agent includes at least two paragraphs of text and an image that matches the text, and the arrangement order of the image is between the two paragraphs of text. At this time, the rendering result of the response information 2 includes at least three message bodies, where the message body 21 contains the first paragraph of the two paragraphs of text, and the message body 22 contains the image, that is, the views obtained by rendering elements of different types are respectively located in two message bodies, which splits the coherence of the response information in terms of content for the user.

[0035] Correspondingly, Figure 2B shows a schematic diagram of the interface for displaying the response information according to some embodiments of the present disclosure. Similar to Figure 2A , the user asks the intelligent agent the input information 1, and the response information 2 of the intelligent agent is completely presented to the user in the message body 23. In other words, the views obtained by rendering elements of different types are mixed in the same message body, strengthening the association between the text and the graphics, and providing the user with a continuous and smooth reading experience in the interaction interface.

[0036] In some embodiments, the specified syntax form mainly includes custom extension syntax provided based on the Markdown language. By modifying the underlying code of Markdown, it supports extending the syntax of custom tags so that it can parse custom elements into corresponding nodes of the syntax tree, where the custom tags include those corresponding to block-level nodes <data-block>and corresponding to the inline nodes <data-inline>. In a non-limiting embodiment, the custom extension syntax mainly extends a custom syntax block based on the Hypertext Markup Language block HtmlBlock <data-black>, which includes attribute information for describing custom elements (such as type and data), records the layout position and display size of the custom element within a specified container (such as FrameLayout, LinearLayout, etc.) in the format of key-value data, and then maps the Markdown syntax of the custom element into a custom view to implement a comprehensive and efficient mixed layout strategy. This custom extended syntax can flexibly mix and insert business-side custom views in the text view of the Markdown scenario, thereby helping developers to more precisely control the layout and content display in the interface and meet the requirements of various complex business scenarios.

[0037] Next, refer to Figure 3 , which shows a schematic diagram of rendering response information to generate a view according to some embodiments of the present disclosure. In some embodiments, the AI model of the agent is trained so that the response information 2 of the large model for the input information 1 is in the Markdown syntax format including custom extended syntax, enabling it to directly enter the parser and be parsed into multiple content blocks 3 related to the element type, and further rendering the corresponding view based on this. Among them, parsing the response information into multiple content blocks includes: determining multiple nodes in the response information 2 based on the extended syntax rules; determining the nodes with this node representation from the multiple nodes based on the node representation corresponding to the custom element block in the syntax rules as the nodes of the custom element block; and parsing the nodes of the custom element block into the custom element block. In a non-limiting embodiment, the node representation corresponding to the custom element block mainly includes tags in the Markdown syntax <data-block>Or <data-inline>, such as the "<" character included in the statement that can recognize the reply message, and then determine whether the current code statement involves the label of the custom extended syntax based on the recognized character, so as to judge whether the node belongs to the node of the custom element block. Figure 3 Several nodes after parsing the reply message 2 are shown in Figure 3 . Among them, the node 31 has the label of the custom extended syntax as the node representation, then the node is parsed into the custom element block 32; correspondingly, the node without such a node representation is parsed into the basic element block 33.

[0038] Further, in some embodiments, based on the size of the custom element block and the relative position between the custom element block and the adjacent basic element block, rendering the basic element block and the custom element block includes: rendering each node in the multiple nodes in sequence according to the arrangement order of the multiple nodes in the reply message. Continuing to refer to Figure 3 , as Figure 3 shown by the right arrow direction, generally, the agent will output in the form of a streaming reply in the interaction interface, that is, the multiple nodes parsed in the foregoing steps have a certain order in the syntax tree, and this order is also associated with the streaming output order of the multiple content blocks 3. Correspondingly, when rendering the content blocks of each node into views, views or components will also be generated in sequence according to the streaming output order. In a non-limiting embodiment, the custom element block 32 is rendered to obtain the custom view 34, and the form of the custom element included therein is an image; the basic element block 31 is rendered to obtain the basic view 35, and the basic element included therein is text, and the basic view 35 is a text view. Among them, according to the streaming output order, the display order of the custom view 34 in the interaction interface is before the basic view 35.

[0039] In some embodiments, displaying the rendered reply message in a message body mainly includes: arranging the views obtained by rendering the custom element block and the basic element block respectively in the foregoing steps in a certain order, and displaying the arrangement result in a specified area in the interface (such as in the message body of the agent's reply). Next, please refer to Figures 4A to 5D , which respectively show schematic diagrams of rendering reply messages according to some embodiments of the present disclosure. It can be understood that Figures 4A to 5D the dashed boxes in Figures 4A to 5D are only used to represent the boundaries of the corresponding content boxes, and do not represent that the content boxes have visible borders. These content boxes are usually rendered in the borderless state shown by the top text view in Figure 4B . Additionally or alternatively, the border attributes of these content boxes when displayed can be personalized by each content block in the Markdown statement to achieve rich visual effects.

[0040] In some embodiments, rendering the basic element block and the custom element block based on the size of the custom element block and the relative position between the custom element block and the adjacent basic element blocks includes: determining the multimedia resource associated with the custom element block based on the type information and data information contained in the custom element block; and determining the size of the custom view obtained by rendering the custom element block based on the type information, data information, and rendering layout rules. Specifically, the roles of the type information (type), data information (data), and layout rules in determining the size mainly include: determining the original size of the multimedia resource based on at least one of the source information and size information contained in the data information; determining the boundary constraint conditions of the custom view based on the type information and layout rules; and determining the size of the custom view based on the original size and the boundary constraint conditions.

[0041] Specifically, the type information contained in the custom element block is mainly used to describe the category of the custom element, such as whether it is a multimedia resource, whether it is a customized business card, etc.; the data information includes but is not limited to the source information, size information, layout information, and / or arrangement relationship information of the custom element, etc. The source information is, for example, the source file address defined by the Uniform Resource Locator (URL), the size information is, for example, the width defined by Width and the height defined by Height, and the layout information is, for example, the positional relationship between the custom element block and the overall layout of the message body where it is located.

[0042] In a non-limiting embodiment, when the custom element is a mind map, the label corresponding to the block-level node of the custom element block can be recognized according to the extended syntax, which contains statements such as "<data-block type="mind-map" value=…>", where the value data can include the text of each level of the mind map, the color of the connection lines, the spacing of the joints, and other content or parameter settings. In another non-limiting embodiment, when the custom element is a group of images (such as a grid or a list of multiple images), the label corresponding to the inline node of the custom element block can be recognized according to the extended syntax, which contains statements such as "<data-inline type="image-group" value=…>", where the value data can include parameters such as the source of each image, the arrangement method of the image group, and the scaling ratio of the thumbnail.

[0043] In some embodiments, specifically, reference can be made to Figure 5A , which shows a schematic diagram of rendering reply information when the custom element is an image. After rendering the custom element block, an image view 52 can be obtained, in which size information is identified from the custom element block according to the extended syntax, such as the width w and height h of the image view 52; or the source information (such as the aforementioned URL) included in the custom element block can be identified, so as to obtain the storage location of the image source file. Based on at least one of such size information and source information, the original size of the image in the image view 52 can be determined. Additionally, layout rules can also be identified from the custom element block, such as the distance d from the top boundary of the image view 52 to the top of the message body 5, and / or the spacing between the two side boundaries of the image view 52 and the two sides of the message body 5, etc.

[0044] In some embodiments, due to the rich types of custom elements, there may be different boundary constraint conditions when rendering into custom views. Specifically, reference can be made to Figure 4A , in the custom view 42-1 within the message body 2, the image is aligned with the left sides of the upper and lower text views. Since the aspect ratio of the image is not necessarily the same as that of the custom view 42-1, this inconsistency is reflected in the distance (m shown in FIG. 4) between the boundary of the image and the boundary of the custom view 42-1. These boundary constraint conditions include but are not limited to the layout position of the custom view within the message body (such as the top, bottom, center, sides, etc. within the message body), the spacing between the boundary of the custom view and the boundaries of the message body, the spacing between the boundary of the custom view and the boundaries of adjacent basic views, the spacing between the boundary of the custom view and the boundary of the view content, etc. These relatively fixed spacing parameters further limit the display size of the custom view. Thus, based on the original size of the obtained custom element and the boundary constraint conditions, when the image view 52 is displayed in the message body 5, the scaling ratio of the image element it contains compared to the original size can be obtained, etc., and then the size of the image view 52 can be determined.

[0045] In some embodiments, based on the size of the custom element block and the relative position between the custom element block and adjacent basic element blocks, rendering the basic element block and the custom element block includes: determining the arrangement relationship between the custom element block and adjacent basic element blocks based on the data information included in the custom element block; determining the relative position between the rendered custom element block and adjacent basic element blocks based on the arrangement relationship; and rendering the basic element block and the custom element block to obtain a basic view and a custom view respectively.

[0046] Specifically, the data information included in the custom element block includes arrangement relationship information for describing the arrangement relationship between the custom element block and its adjacent basic element blocks, etc. Return to reference Figure 2B , when rendering the rendered custom element block and the adjacent basic element block in the message body 23, if the arrangement relationship associated with the custom view is defined in the data information of the custom element block regarding the image, it can be determined that the rendering result presents a vertical continuous arrangement of text, image, and text. That is, the image arrangement relationship is located between two paragraphs of text. Among them, the image depicts the overall scene of Maijishan Grottoes on the edge of the cliff, and the second paragraph of text specifically describes the relevant content of "the grottoes are built against the mountain". Their adjacent arrangement relationship enables the text and image to be compared during reading, facilitating user understanding and enhancing the user's reading experience.

[0047] In some embodiments, when the arrangement relationship between the custom element block and the basic element block is an embedded arrangement, rendering the basic element block and the custom element block includes: sequentially rendering the custom element block and the adjacent basic element block based on the order of the custom element block and the adjacent basic element block in multiple content blocks, to obtain a custom view and the adjacent basic view, where the custom view is embedded between the adjacent basic views, and the custom view does not overlap with the adjacent basic views.

[0048] Specifically, please refer to Figure 4A , which shows a reply message rendering method according to some embodiments of the present disclosure. When the reply message sequentially includes a first basic element block (text), a custom element block (image), and a second basic element block, after rendering, the first basic view 41, the custom view 42-1, and the second basic view 43 are sequentially displayed in the message body 4 according to the streaming output order. When the arrangement relationship defined in the data information of the custom element block is an embedded arrangement, the custom view 42-1 is arranged in an embedded form between the adjacent basic views 41 and 43. For the custom view 42-1, its display position in the message body 4 can be determined according to the end position of the first basic view 41. For example, after moving down the spacing set by the layout information from the end position of the first basic view 41, the start position of the custom view 42-1 is obtained. Similarly, the display position of the second basic view 43 can be determined based on the end position of the custom view 42-1. After moving down the spacing set by the layout information from the end position of the custom view 42-1, the start position of the second basic view 43 is obtained. It can be understood that to clearly present the content of the reply message, the custom view 42-1 is adjacent to the basic views 41 and 43 without overlapping. Among them, based on the layout information included in the data information of the custom element block, the distance between the custom view and the adjacent views is determined, thereby adjusting the visual effect of the mixed layout and enhancing the user's reading experience.

[0049] Additionally, in response to the basic element blocks adjacent to the custom element block including a first basic element block located before the custom element block and a second basic element block located after the custom element block, the first basic element block and the second basic element block are respectively rendered to obtain a first basic view and a second basic view that are operationally independent of each other.

[0050] Continuing to refer to Figure 4A , the first and second basic element blocks are respectively rendered to obtain a first basic view 41 and a second basic view 43. For the first and second basic element blocks, the Markdown statements with extended syntax included therein are parsed into two independent nodes. After the basic element blocks of the two nodes are rendered, the two generated basic views are operationally independent of each other. In a non-limiting embodiment, when the basic elements in the first and second basic element blocks are both in text form, due to the independence of the first basic view 41 and the second basic view 43, the user needs to operate on the text in the two basic views separately. For example, when a copy operation needs to be performed on the text, since the text in the two basic views cannot be selected as a whole across the custom view 42-1, the required content of the two segments of text needs to be selected separately, and then a copy operation is performed separately once.

[0051] In some embodiments, based on the size of the custom element block and the relative positions between the custom element block and the adjacent basic element blocks, rendering the basic element block and the custom element block includes: in response to the custom element block having a dynamic size, rendering different sizes of the custom element block respectively; and in response to a change in the size of the custom element block, re-determining the display position of the rendered second basic element block.

[0052] Please refer to Figure 4B , which shows another display effect associated with the reply information rendered in Figure 4A . The custom view defined according to the size information in the custom element block has a dynamic size, Figure 4A the custom view 42-1 in Figure 4B The user's interactive operations include clicking on the thumbnail in the custom view 42-1, clicking on the "View Full Image" button (not shown) on the page, etc., which causes the height of the custom view to be converted from h1 to h2. When rendering the custom element block, it is rendered according to the two size information of the height parameters h1 and h2, respectively, to obtain two custom views 42-1 and 42-2. Based on the size change, the display position of the basic element block adjacent to the custom element block in the interface needs to be moved down accordingly. Specifically, when the second basic view 43 is adjacent to the custom view 42-1, the distance between the starting position (top border) of the second basic view 43 and the top of the message body 4 is d1; and when the size of the custom element block changes, the second basic view 43 is adjacent to the custom view 42-2, and the distance between the starting position of the second basic view 43 and the top of the message body is d2. Since the height parameter h1 <h2,第二基本视图43的显示位置符合d1<d2。基于此,回复信息中的自定义元素块可以具有更为丰富灵活的显示形式,为用户提供了有交互性的趣味阅读体验。

[0053] Alternatively, in some embodiments, when the arrangement relationship between the custom element block and the basic element block is an overlay arrangement, rendering the basic element block and the custom element block includes: determining a blank area in the adjacent basic element blocks after rendering based on the size of the custom element block and the relative position between the custom element block and the adjacent basic element blocks; and rendering the custom element block and the adjacent basic element blocks to obtain a custom view and an adjacent basic view, wherein the custom view is overlaid on top of the blank area.

[0054] Specifically, please refer to Figures 5A to 5C , which shows the reply information rendering method according to some other embodiments of the present disclosure. Figure 5A As shown, based on the data information and type information contained in the custom element block, it is determined that the multimedia resource form in the custom view 52 is an image, whose width is w, height is h, and distance from the top of the message body 5 is d. Figure 5B In response to the object type to be rendered in the basic element block being text, a blank area 53 is determined in the basic view 51 adjacent to the custom view 52, ​​with a width of w', a height of h', and a distance of d' from the top of the message body 5. Further, as Figure 5C As shown, the custom view 52 is overlaid on the blank area 53 and displayed mixedly with the basic view 51 in the message body 5. In a non-limiting embodiment, the overlay arrangement scenario can be applied to the native Android operating system.

[0055] In some embodiments, the method for determining the blank area includes: determining the boundary relationship between the custom view and the text in the adjacent basic view based on the data information included in the custom element block; determining the position of the blank area in the adjacent basic view based on the boundary relationship; determining the size of the blank area based on the size of the custom element block; and determining the rendered blank area based on the position and size of the blank area.

[0056] Continuing to refer to Figure 5B , in a non-limiting embodiment, the data information in the custom element block includes size information and layout information, where the size information determines the size of the custom view 52 (such as width w, height h), and the layout information determines the layout requirements of the custom view 52 within the message body 5 (such as distance d). Based on this data information, the boundary relationship between the custom view 52 and the text in the basic view 51 can be determined. As Figure 5B shown, this boundary relationship includes positioning the custom view 52 in the middle of the basic view 51, such as at the paragraph spacing between two paragraphs of text in the basic view 51. Further, based on the size in the custom element block, the size of the blank area 53 (such as width w', height h') can be determined, and based on the foregoing boundary relationship, the position of the blank area 53 (such as distance d') can be determined. It can be understood that since the display effect of the custom view 52 should not overlap with the text in the basic view 51, the size of the blank area 53 should at least satisfy w'≥w, h'≥h, d'≤d. Additionally or alternatively, based on the data information in the custom element block, the spacing between the boundary of the custom view 52 and the surrounding text after rendering can be personalized, thereby adjusting the visual effect of the message body.

[0057] Additionally, in the scenario of overlay arrangement, the adjacent basic element blocks of the custom element block are rendered as a whole to obtain a basic view. As Figure 5B shown, although the image in the custom view 52 is similar to being "inserted" between two paragraphs of text in the display effect, these two paragraphs of text belong to the same basic view 51. In other words, the blank area 53 does not affect the continuity of the two paragraphs of text above and below. That is, the basic view 51 can be operated as a whole. For example, if the user wants to perform a copy operation on the text, since the custom view 52 belongs to "floating above the text", the required content of the two paragraphs of text can be selected once and then copied once.

[0058] It can be understood that since the position and size of the blank area 53 directly affect the overall layout of the basic view 51, to avoid repeated rendering from affecting the display efficiency and visual effect, the custom view 52 in the scenario of overlay arrangement only has a static size. In a non-limiting embodiment, as Figure 5D shown, if it is desired to achieve a similar effect to Figure 4B For the display change from the thumbnail to the full image, a click-through event can be set at the custom view 52, such as entering the full-screen image viewer 54. The image viewer 54 is displayed above the original interactive interface, and in order to highlight the visual effect of the full-screen image, a dark mask layer can be covered between the original interactive interface and the image viewer 54. Among them, the layout method of the message body 5 already displayed in the interactive interface remains unchanged, that is, the jump operation will not affect the size, position, and display effect of the basic view 51 and the custom view 52.

[0059] Additionally or alternatively, according to the streaming output order, in response to the content block rendered later having issues such as security and privacy, all the rendering results of the current node are removed. Return reference Figure 3 During the process of rendering each view from the content block 3, since the display of the reply message follows the streaming output order, before a custom element block or a basic element block is fully rendered successfully, it may be gradually displayed on the interactive interface part by part according to the content. Taking the basic element block 33 in text form as an example, during the rendering process of this node, punctuation marks or paragraph symbols may be used as display segments. When the text output earlier is displayed, it is impossible to predict whether the text output later involves issues such as security and privacy. Therefore, in response to the text output later involving issues such as security and privacy, the previously rendered text output earlier of the current node is removed, and preset content such as "Search content cannot be displayed due to security and privacy issues" or an image with a similar meaning is displayed on the interactive interface.

[0060] Additionally or alternatively, the Markdown layout ability for the content generated by the large model supports pluggability on the business side and can sink this ability into the Markdown toolkit used by the business side for the business side to access conveniently. Return reference Figure 2A and Figure 2B , whether the reply information 2 of the large model performs the layout effect as Figure 2B can be independently selected by the business side, that is, the rendering effect can be affected by whether the Markdown syntax form of the reply information 2 contains custom extended syntax. In a non-limiting embodiment, if the business side selects to include custom extended syntax, the layout display result can be obtained in the manner described in any of the foregoing embodiments; correspondingly, if the business side selects not to include extended syntax, that is, only includes the basic syntax of Markdown, the Figure 2A display effect will be shown, but the installation package on the business side can have a relatively friendly volume.

[0061] For further reference, please Figure 6 , which shows a schematic block diagram of an information processing apparatus according to some embodiments of the present disclosure. Specifically, the information processing method in any of the foregoing embodiments can be implemented by the information processing apparatus 6. The information processing apparatus 6 includes a processor and a memory (not shown), where the processor may refer to various implementations of digital circuit systems, analog circuit systems, or mixed-signal (a combination of analog and digital) circuit systems that perform functions in a computing system. The processing circuit may include, for example, circuits such as integrated circuits (ICs), application-specific integrated circuits (ASICs), parts or circuits of individual processor cores, entire processor cores, individual processors, programmable hardware devices such as field-programmable gate arrays (FPGAs), and / or systems including multiple processors. Additionally, the memory of the information processing apparatus 6 may store information generated by the processor and programs and data for the operation of the processor. The memory may be volatile memory and / or non-volatile memory. For example, the memory may include, but is not limited to, random access memory (RAM), dynamic random access memory (DRAM), static random access memory (SRAM), read-only memory (ROM), and flash memory. Generally, the processor may be configured to execute instructions stored in the memory to implement the information processing method for specifying a syntactic form in the present disclosure.

[0062] Specifically, as Figure 6 shown, in some embodiments, the information processing apparatus 6 of the present disclosure may include an acquisition module 61, a parsing module 62, a rendering module 63, and a display module 64. Among them, the acquisition module 61 is configured to obtain reply information corresponding to the input information in response to the user's input information, and the reply information includes information in a specified syntactic form; the parsing module 62 is configured to parse the reply information into a plurality of content blocks based on the syntactic rules corresponding to the specified syntactic form, and the plurality of content blocks include basic element blocks and custom element blocks; the rendering module 63 is configured to render the basic element blocks and the custom element blocks based on the size of the custom element blocks and the relative positions between the custom element blocks and the adjacent basic element blocks; and the display module 64 is configured to display the rendered reply information in a message body.

[0063] The present disclosure also provides an electronic device for information processing, which may include a processor and a processor coupled to a memory, and the processor is configured to execute the information processing method according to any of the foregoing embodiments of the present disclosure based on instructions stored in the memory.

[0064] Specifically, referring to Figure 7 , which shows a block diagram of an electronic device according to some embodiments of the present disclosure. The memory 71 is used to store one or more computer-readable instructions. The memory 71 may include any combination of various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory, including but not limited to random access memory (RAM), dynamic random access memory (DRAM), static random access memory (SRAM), read-only memory (ROM), flash memory. The memory 71 may store, for example, an operating system, application programs, a boot loader, a database, and other programs, and may also store various application programs and various data, etc.

[0065] The processor 72 is used to run the computer-readable instructions to implement the song screening method described in any of the foregoing embodiments or the method described in any of the foregoing embodiments. For the specific implementation of each step of the method, reference may be made to the foregoing embodiments, and the repeated parts will not be elaborated herein.

[0066] The processor 72 may be configured to execute Figures 1 to 5D each step in. The processor 72 may be embodied as various processing devices, such as a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The central processing unit (CPU) may be of the X86 or ARM architecture, etc.

[0067] The processor 72 and the memory 71 may communicate with each other directly or indirectly. For example, the processor 72 and the memory 71 may communicate through a network. The network may include a wireless network, a wired network, and / or any combination of a wireless network and a wired network. The processor 72 and the memory 71 may also communicate with each other through a system bus, and the present disclosure does not limit this.

[0068] It should be noted that Figure 7 the components of the electronic device 7 shown are exemplary and not restrictive. According to actual application needs, the electronic device 7 may also have other components. The processor 72 may control other components in the electronic device 7 to perform desired functions.

[0069] The electronic device 7 may be implemented in a software, firmware, and / or hardware manner and may be integrated in a device installed with relevant application programs.

[0070] Figure 8 A block diagram of an electronic device according to some other embodiments of the present disclosure is shown.

[0071] Figure 8 The electronic device 8 shown can be a computer system with a dedicated hardware structure, and when relevant application programs are installed, it can perform corresponding functions.

[0072] The electronic device includes, but is not limited to, mobile terminals such as smartphones, laptops, personal digital assistants (PDAs), tablet personal computers (Tablet PCs), portable multimedia players (PMPs), in-vehicle terminals (such as in-vehicle navigation terminals), wearable devices, etc., and fixed terminals such as digital TVs, desktop computers, etc.

[0073] As Figure 8 shown, the central processing unit (CPU) 81 executes various processes according to the programs stored in the read-only memory (ROM) 82 or the programs loaded from the storage section 88 into the random access memory (RAM) 83. In the RAM 83, data required when the CPU 81 executes various processes, etc., is stored as needed. The central processing unit is merely exemplary, and it can also be other types of processors, such as the various processors described above. The ROM 82, RAM 83, and storage section 88 can be various forms of computer-readable storage media. It should be noted that although Figure 8 the ROM 82, RAM 83, and storage section 88 are shown separately, one or more of them can be combined or located in the same or different memories or storage modules.

[0074] The CPU 81, ROM 82, and RAM 83 are connected to each other via the bus 84. The input / output interface 85 is also connected to the bus 84.

[0075] The following components are connected to the input / output interface 85: an input section 86, such as a touch screen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; an output section 87, including a display, such as a cathode ray tube (CRT), liquid crystal display (LCD), speaker, vibrator, etc.; a storage section 88, including a hard disk, magnetic tape, etc.; and a communication section 89, including a network interface card such as a LAN card, modem, etc. The communication section 89 allows communication processing to be performed via a network such as the Internet. It is easy to understand that although Figure 8 parts in the electronic device 8 are shown to communicate via the bus 84, they can also communicate via a network or other means, where the network can include a wireless network, a wired network, and / or any combination of a wireless network and a wired network.

[0076] As needed, the drive 810 is also connected to the input / output interface 85. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. is installed on the drive 810 as needed, so that a computer program read therefrom is installed in the storage section 88 as needed.

[0077] In the case where the above-described series of processes are implemented by software, a program constituting the software can be installed from a network such as the Internet or a storage medium such as the removable medium 811.

[0078] According to an embodiment of the present disclosure, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product that, when run on a computer, causes the computer to implement the method described in any of the foregoing embodiments. The computer program product includes computer instructions carried on a computer-readable medium, including program code for performing the method shown in the flowchart. In such an embodiment, the computer instructions can be downloaded and installed from a network through the communication section 89, or installed from the storage section 88, or installed from the ROM 82. When the computer program is executed by the CPU 81, the method of the embodiments of the present disclosure is executed.

[0079] It should be noted that, in the context of the present disclosure, a computer-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device.

[0080] A computer-readable medium can be a computer-readable storage medium, a computer-readable signal medium, or any combination of the two.

[0081] Computer-readable storage media include, but are not limited to: electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or components, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device. Computer instructions are stored on the computer-readable storage medium, and when executed by a processor, implement the method described in any of the foregoing embodiments.

[0082] A computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which computer-readable program code is carried. Such a propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. The computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, and the computer-readable signal medium may send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.

[0083] The foregoing computer-readable medium may be included in the aforementioned electronic device; or may exist separately without being assembled into the electronic device.

[0084] In some embodiments, a computer program is also provided, including: instructions that, when executed by a processor, cause the processor to execute the method described in any of the foregoing embodiments. For example, the instructions may be embodied as computer program code.

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

[0086] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a portion of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that, in some alternative implementations, the functions noted in the blocks may occur in a different order than that noted in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, or they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.

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

[0088] Although some specific embodiments of the present disclosure have been described in detail by way of example, those skilled in the art should understand that the above examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Those skilled in the art should understand that the above embodiments can be modified without departing from the scope and spirit of the present disclosure. The scope of the present disclosure is defined by the appended claims.

Claims

1. An information processing method, comprising: In response to user input information, obtaining reply information corresponding to the input information, the reply information including information in a specified grammatical form; Parsing the reply information into a plurality of content blocks based on a grammatical rule corresponding to the specified grammatical form, wherein the plurality of content blocks include a basic element block and a custom element block; Rendering the basic element block and the custom element block based on the size of the custom element block and the relative position between the custom element block and an adjacent basic element block; as well as The rendered reply information is displayed in a message body.

2. The information processing method according to claim 1, wherein: Parsing the reply information into a plurality of content blocks based on a grammatical rule corresponding to the specified grammatical form includes: Based on the grammatical rule, determining a plurality of nodes in the reply information; Based on the node representation corresponding to the custom element block in the grammatical rule, determining a node having the node representation from the plurality of nodes as a node of the custom element block; and The nodes of the custom element block are parsed into the custom element block.

3. The information processing method according to claim 2, wherein: Based on the size of the custom element block and the relative position between the custom element block and an adjacent basic element block, rendering the basic element block and the custom element block includes: Each of the multiple nodes is rendered in sequence according to the arrangement order of the multiple nodes in the reply information.

4. The information processing method according to claim 1, wherein: Based on the size of the custom element block and the relative position between the custom element block and an adjacent basic element block, rendering the basic element block and the custom element block includes: Determining multimedia resources associated with the custom element block based on the type information and data information included in the custom element block; and Based on the type information, the data information, and the rendering layout rule, a size of a custom view obtained by rendering the custom element block is determined.

5. The information processing method according to claim 4, wherein: Determining the size of the custom view obtained by rendering the custom element block based on the type information, the data information, and a layout rule corresponding to the rendering includes: Determine the original size of the multimedia resource based on at least one of the source information and the size information included in the data information; Determining a boundary constraint condition of the custom view based on the type information and the layout rule; and A size of the custom view is determined based on the original size and the boundary constraints.

6. The information processing method according to claim 1, wherein: Based on the size of the custom element block and the relative position between the custom element block and an adjacent basic element block, rendering the basic element block and the custom element block includes: Based on the data information included in the custom element block, determining an arrangement relationship between the custom element block and adjacent basic element blocks; Based on the arrangement relationship, determining the relative position between the rendered custom element block and the adjacent basic element block; and The basic element block and the custom element block are rendered to obtain a basic view and a custom view respectively.

7. The information processing method according to claim 6, wherein: The arrangement relationship includes an embedded arrangement, and based on the size of the custom element block and the relative position between the custom element block and an adjacent basic element block, rendering the basic element block and the custom element block includes: Based on the order of the custom element block and the adjacent basic element block in the multiple content blocks, the custom element block and the adjacent basic element block are sequentially rendered to obtain the custom view and the adjacent basic view, The custom view is embedded between the adjacent basic views, and the custom view does not overlap with the adjacent basic views.

8. The information processing method according to claim 7, wherein: Based on the size of the custom element block and the relative position between the custom element block and an adjacent basic element block, rendering the basic element block and the custom element block includes: In response to the basic element blocks adjacent to the custom element block including a first basic element block located before the custom element block and a second basic element block located after the custom element block, the first basic element block and the second basic element block are rendered separately to obtain a first basic view and a second basic view that are operationally independent of each other.

9. The information processing method according to claim 8, wherein: Based on the size of the custom element block and the relative position between the custom element block and an adjacent basic element block, rendering the basic element block and the custom element block includes: In response to the custom element block having a dynamic size, rendering different sizes of the custom element block respectively; and In response to a change in the size of the custom element block, a display position of the rendered second basic element block is re-determined.

10. The information processing method according to claim 6, wherein: The arrangement relationship includes an overlay arrangement, and based on the size of the custom element block and the relative position between the custom element block and an adjacent basic element block, rendering the basic element block and the custom element block includes: Determine a blank area in the rendered adjacent basic element blocks based on the size of the custom element block and the relative position between the custom element block and the adjacent basic element blocks; and The custom element block and the adjacent basic element block are rendered to obtain a custom view and an adjacent basic view, wherein the custom view is covered above the blank area.

11. The information processing method according to claim 10, wherein: Based on the size of the custom element block and the relative position between the custom element block and the adjacent basic element block, determining the blank area in the rendered adjacent basic element block includes: Determining a boundary relationship between the custom view and text in the adjacent basic view based on data information included in the custom element block; Based on the boundary relationship, determining the position of the blank area in the adjacent basic view; Determining the size of the blank area based on the size of the custom element block; and The blank area after rendering is determined based on the position and size of the blank area.

12. The information processing method according to claim 10 or 11, wherein: Based on the size of the custom element block and the relative position between the custom element block and an adjacent basic element block, rendering the basic element block and the custom element block includes: The adjacent basic element blocks are rendered as a whole to obtain a basic view.

13. An information processing device, comprising: an acquisition module, configured to acquire reply information corresponding to the input information in response to the user's input information, wherein the reply information includes information in a specified grammatical form; A parsing module, configured to parse the reply information into a plurality of content blocks based on a grammatical rule corresponding to the specified grammatical form, wherein the plurality of content blocks include a basic element block and a custom element block; A rendering module, configured to render the basic element block and the custom element block based on the size of the custom element block and the relative position between the custom element block and an adjacent basic element block; as well as The display module is configured to display the rendered reply information in a message body.

14. An electronic device comprising: Memory; as well as A processor coupled to the memory, wherein the processor is configured to execute the shuffling method according to any one of claims 1 to 12 based on instructions stored in the memory.

15. A computer-readable storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the shuffling method according to any one of claims 1 to 12 is performed. 16 . A computer program product, comprising computer executable instructions, which, when executed by a processor, enable the processor to implement the shuffling method according to claim 1 .

Citation Information

Cited By

  • Data rendering method, related device and computer program product

    CN120874812A

  • Information processing method and device, electronic equipment, storage medium and program product

    CN121008861A

  • Markdown-based message extension method and device for front-end and back-end communication

    CN121278203A