Data processing method and device, electronic equipment and storage medium
By configuring extended protocols and syntax parsing components, LLM generates and transmits various complex data structures, solving the problem of single response content in existing technologies and realizing rich data display and interactive capabilities.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-27
- Publication Date
- 2026-04-07
AI Technical Summary
In existing technologies, LLMs pre-trained on massive amounts of text data can only generate plain text information, resulting in insufficient response content and failing to meet diverse data needs.
By configuring extended protocols, LLM can generate and transmit various types of complex structured data, including formatted text data, partitioned data, and interactive data, which are then parsed and rendered on the client side using syntax parsing and UI processing components.
It enables LLM to generate rich media information in various forms, expands application scenarios, supports dynamic rendering of interactive data, and enriches the presentation of response content.
Smart Images

Figure CN121808136A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, specifically to the fields of data stream processing and artificial intelligence, and particularly to a data processing method, apparatus, electronic device and storage medium. Background Technology
[0002] With the development of artificial intelligence (AI) technology, more and more fields are using generative large language models (LLMs) to provide a wide variety of services.
[0003] In existing technologies, LLMs pre-trained on massive amounts of text data can possess the ability to understand, reason, and generate text. For example, an LLM can intelligently generate answers in the text format required by the user based on the user's request. Summary of the Invention
[0004] This disclosure provides a data processing method, apparatus, electronic device, and storage medium.
[0005] According to one aspect of this disclosure, a data processing method is provided, applied in a client, comprising:
[0006] A data request is sent to the server, which responds to the data request using a large language model based on a pre-configured extended protocol; the extended protocol supports the transmission of various types of complex structured data; the various types of complex structured data include formatted text data, partitioned data, or interactive data;
[0007] Based on a pre-configured extended protocol, the system receives response data returned by the server; the response data includes target complex structure data.
[0008] Based on pre-configured syntax parsing components and user interface processing components, the received response data is parsed, rendered, and displayed.
[0009] According to another aspect of this disclosure, a data processing apparatus is provided, applied in a client, comprising:
[0010] The sending module is used to send data requests to the server, so that the server can respond to the data requests using a large language model based on a pre-configured extended protocol; the extended protocol supports the transmission of various types of complex structured data; the various types of complex structured data include formatted text data, partitioned data, or interactive data;
[0011] A receiving module is used to receive response data returned by the server based on a pre-configured extended protocol; the response data includes target complex structure data;
[0012] The processing module is used to parse, render, and display the received response data based on a pre-configured syntax parsing component and user interface processing component.
[0013] According to another aspect of this disclosure, an electronic device is provided, comprising:
[0014] At least one processor; and
[0015] A memory communicatively connected to the at least one processor; wherein,
[0016] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the methods described above and any possible implementations.
[0017] According to another aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions for causing the computer to perform the methods described above and any possible implementation thereof.
[0018] According to another aspect of this disclosure, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the aspects and any possible implementations described above.
[0019] The technology disclosed herein can effectively enrich the content generated by LLM and effectively expand the application scenarios of LLM.
[0020] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0021] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:
[0022] Figure 1 This is a schematic diagram based on the first embodiment of the present disclosure;
[0023] Figure 2 This is a schematic diagram according to the second embodiment of the present disclosure;
[0024] Figure 3 This is a schematic diagram of the Markdown component provided in an embodiment of this disclosure;
[0025] Figure 4 This is a schematic diagram according to the third embodiment of the present disclosure;
[0026] Figure 5 This is a schematic diagram according to the fourth embodiment of the present disclosure;
[0027] Figure 6 This is a block diagram of an electronic device used to implement the methods of the embodiments of this disclosure. Detailed Implementation
[0028] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0029] Obviously, the described embodiments are only some, not all, of the embodiments disclosed herein. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without inventive effort are within the scope of protection of this disclosure.
[0030] It should be noted that the terminal devices involved in the embodiments of this disclosure may include, but are not limited to, smart devices such as mobile phones, personal digital assistants (PDAs), wireless handheld devices, and tablet computers; the display devices may include, but are not limited to, personal computers, televisions, and other devices with display functions.
[0031] Furthermore, the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0032] In existing technologies, LLM-generated information is typically plain text in Markdown format. Markdown is a lightweight markup language that allows text content to be written in an easy-to-read and easy-to-write plain text format. Therefore, in existing technologies, when an LLM-based server responds to a user's request, it can only respond with plain text response data, resulting in insufficiently rich response content.
[0033] Figure 1 This is a schematic diagram based on the first embodiment of the present disclosure; as shown Figure 1As shown, this embodiment provides a data processing method applied in a client, which may specifically include the following steps:
[0034] S101. Send a data request to the server so that the server can respond to the data request using the LLM based on a pre-configured extended protocol;
[0035] The extended protocol in this embodiment supports the transmission of various types of complex structured data; these types of complex structured data may include formatted text data, partitioned data, or interactive data.
[0036] For example, in this embodiment, formatted text data may include text data with formatting such as bold, highlight, italics, underline, or strikethrough. In this embodiment, the resource types of data in each block of data can be the same or different, and each block can display data of resource types such as text, audio, or video. In practical applications, tables can also be displayed using data in partitioned blocks.
[0037] The interactive data in this embodiment can include data that allows users to trigger preset events through preset user actions. For example, preset user actions can include clicking or sliding buttons. Preset events can include backtracking, interface navigation, opening, pausing, or closing video or audio, inputting data into input boxes, popping up overlays, etc., and will not be listed in detail here. In short, interactive data can include data of any format and form that can interact with users. Based on this, it can be considered that in this embodiment, by configuring the extension protocol, the server-side LLM can generate data with at least one complex structure, including formatted text, images, audio, and video, enabling the LLM to generate rich media information in various forms.
[0038] The complex structured data in this embodiment has a more complex structure compared to the plain text format data generated by traditional LLM following the markdown protocol.
[0039] S102. Based on a pre-configured extended protocol, receive response data returned by the server; the response data includes target complex structure data;
[0040] The target complex structure data can be any of the various types of complex structure data supported by the extended protocol.
[0041] In this embodiment, on the server side, the LLM can generate response data based on an extended protocol. Since the extended protocol in this embodiment supports the transmission of various types of complex data structures, when responding to data requests, the LLM in this embodiment can generate not only traditional text-formatted data but also complex-structured response data, and transmit the generated complex-structured response data to the client. Correspondingly, on the client side, based on a pre-configured extended protocol, it can receive the complex-structured response data generated by the server in response to data requests using the LLM. The pre-configured extended protocol on the client side and the pre-configured extended protocol on the server side are aligned.
[0042] In practical applications, if the data generated by LLM is in plain text format, the existing Markdown protocol is used for data transmission, and the existing technology is used for rendering and display on the client side. This will not be elaborated further in this embodiment.
[0043] S103. Based on the pre-configured syntax parsing component and user interface (UI) processing component, parse and render the received response data, and display it.
[0044] Since the response data returned by the server in this embodiment can be complex structured data, in order to accurately render and display the complex structured data, this embodiment needs to accurately render and display the received response data based on the pre-configured syntax parsing component and UI processing component.
[0045] In this embodiment, the syntax parsing component can be used to parse the syntax in the response data; the UI processing component can be used to render the parsed response data to achieve UI presentation.
[0046] The data processing method in this embodiment limits the server-side LLM's response to data requests through a pre-configured extended protocol, allowing the response data to include any type of complex structured data. On the client side, the response data from the server side can be received based on the pre-configured extended protocol, and the received response data can be rendered and displayed based on pre-configured syntax parsing components and user interface processing components. This effectively enriches the content generated by the LLM and also enables accurate and effective rendering and display of complex structured data generated by the server-side LLM on the client side.
[0047] The technical solution of this embodiment extends the complex structure data supported by the protocol, which can include interactive data. This enables AI generation on the server side to interactive, dynamically rendered UI display on the client side, effectively expanding the application scenarios of LLM.
[0048] Figure 2 This is a schematic diagram based on the second embodiment of the present disclosure; as shown Figure 2 As shown, the data processing method of this embodiment, in the above... Figure 1 Based on the technical solutions of the illustrated embodiments, the technical solutions of this disclosure will be described in further detail. For example... Figure 2 As shown, the data processing method in this embodiment may specifically include the following steps:
[0049] S201. Configure the extension protocol to align the client-side extension protocol with the server-side extension protocol.
[0050] Specifically, an extended protocol is configured on the client side, which supports the transmission of various types of complex structured data. The specific content of these various types of complex structured data can be found in the description of the above embodiments. In this embodiment, each type of complex structured data is identified using at least one of inline instructions, block-level instructions, and container instructions.
[0051] For example, inline instructions can be described starting with a colon, and can be represented in the following format:
[0052] `:name[content]{key=val}`, where `name` represents the name of the function implemented by this inline directive, which can identify the type of complex structured data. For example: `:ml-wikipedia[Foobar]`.
[0053] Block-level instructions can be described starting with two colons, and can be represented in the following format:
[0054] ::name[content]{key=val}, similarly, name represents the name of the function implemented by this block-level instruction, and can also identify the type of complex data structure. For example: ::ml-video[title]{file=filename.mp4}.
[0055] Container directives can begin and end with three colons, and their format is:::name[inline-content]{key=val}. Similarly, 'name' represents the name of the function implemented by the container directive, or it can identify a type of complex structured data. For example, :::ml-paragraph{line-clamp=2} where the content can be arbitrary:::.
[0056] The extended protocol configured in this embodiment can use the directive syntax of the Markdown protocol as the protocol baseline. That is, it adopts the directive syntax of the Markdown protocol and uses at least one instruction form among inline instructions, block-level instructions, and container instructions to describe various types of complex structured data.
[0057] In this embodiment, the extended protocol must be aligned on both the client and server sides to ensure that information such as instruction names, attributes, and data fields in the extended protocol is consistent, so as to ensure that the data can be transmitted correctly.
[0058] S202, a configuration-based extended protocol that configures the syntax parsing component and the UI processing component;
[0059] For example, in this embodiment, the syntax parsing component is configured based on the configured extension protocol. Specifically, it may include: configuring the syntax parsing component to parse various types of complex structured data based on the configured extension protocol.
[0060] Specifically, it can be considered as a configuration-based extension protocol that configures the syntax parsing component to perform syntax parsing on inline instructions, block-level instructions, and container instructions, thereby enabling the syntax parsing component to parse various types of complex structured data constructed by at least one of the inline instructions, block-level instructions, and container instructions.
[0061] Furthermore, in one embodiment of this disclosure, the UI processing component is configured based on the configured extension protocol. Specifically, this may include: configuring UI processing components corresponding to each type of complex structure data in multiple types of complex structure data based on the configured extension protocol, thereby obtaining multiple UI processing components, so that each UI processing component has the ability to render the corresponding type of complex structure data.
[0062] For example, inline instructions in this embodiment can be used to identify formatted text data or data identified by links. Block-level instructions can be used to identify data in partitioned blocks. Container instructions can be used to identify data that truncates text within a container. For example, the following container instruction can be used to identify data truncated from paragraph text: :::ml-paragraph{line-clamp=2}paragraph text:::.
[0063] For example, formatted text data can use preset symbols to identify corresponding preset formats. Preset formats include highlighting, bold highlighting, underlining, strikethrough, or italics. For instance, to highlight the text "Expired cosmetics are generally not recommended for use," it can be indicated as: **Expired cosmetics are generally not recommended for use**; to bold highlight the text "Expired cosmetics are generally not recommended for use," it can be indicated as: Bold highlight: ==**Expired cosmetics are generally not recommended for use**==. In practical applications, other symbols can also be used to identify other formats, which will not be listed here.
[0064] The block-level instructions in this embodiment can be used to identify data such as images, videos, or audio, thereby enabling extended protocols to transmit such data. Block-level instructions can also identify partitioned block structure data, such as partitioned block data with a left-right layout.
[0065] In this embodiment, the data supporting interaction may include information that supports preset events triggered by preset user operations, i.e., data that supports interactive operations. For example, operations that support interaction may include user clicks to trigger a search, user clicks or swipes to trigger interface navigation, user clicks to trigger video or audio to open, pause, or close, user clicks to trigger an input box to enter input mode, user clicks to pop up a floating interface, and so on.
[0066] For example, a back-search can use the inline command: ":ml-search[housing subsidy]", which links the text "housing subsidy" to a preset search engine. When a user clicks on "housing subsidy", the preset search engine is automatically triggered to search for "housing subsidy". Here, "ml-search" represents the name of the function implemented by this inline command, which can identify a type of complex data structure.
[0067] In this embodiment, when a user clicks on a target object, triggering the opening of a page linked to the target object and achieving interface jump, in order to enrich the display method, when the target object is text, the resource type icon of the linked page can also be displayed before or after the text to identify the resource type of the jump interface.
[0068] In one embodiment of this disclosure, when using inline instructions to identify link information, the following format can be used: ml-xxx[content identifier](link identifier){key1="value1", key2="value2"}, where ml-xxx represents the name of the function implemented by the inline instruction, or it can identify a type of complex structured data; the content identifier is the content to be displayed, and the link identifier can be a URL that has a link relationship with the content identifier. key1 and key2 are attributes of the content identifier, and value1 and value2 are the values of key1 and key2, respectively.
[0069] For example, the text link corresponding to the text "housing subsidy" can be identified as: [housing subsidy](https: / / m.xxx.com){type="icon" icon=text}.
[0070] The image / text link corresponding to the text "ABCD" can be identified as follows: [ABCD](https: / / m.yyy.com){type="img" src="image address"}.
[0071] The link to the agent class corresponding to the text "XYZ" can be identified as: [XYZ](https: / / m.zzz.com){type="agent" src="image address"}.
[0072] For example, complex structural data with a left-right layout can be represented as follows:
[0073] :::ml-brief
[0074] {width="m" height="n"}This is a long string of text:::
[0075] Here, ml-brief represents the name of the left-right structural layout and also identifies a type of complex structural data. It should be noted that this embodiment also supports setting the width and height of images within the complex structural data.
[0076] Additionally, it should be noted that the complex structure data in this embodiment may include only one instruction from any one of inline instructions, block-level instructions, and container instructions, or it may include a combination of at least two of inline instructions, block-level instructions, and container instructions, or a combination of two or more instructions from any one of these instructions.
[0077] For example, taking the identification of traceability information as an example, if only a single instruction is used to identify traceability information, it can be represented in the following way:
[0078] :ml-citation[xxxx]{title="zzzz"}
[0079] :ml-citation[yyyy]{title="wwww"}.
[0080] Alternatively, in practical applications, combined instructions can also be used to identify the source. For example, it can be represented in the following way:
[0081] :ml-citation[xxxx]{data="aaa"}
[0082] :ml-citation[yyy]{data="bbb"}.
[0083] For example, the following code snippet can be used to achieve this:
[0084] :::ml-data{name="aaa"}
[0085] json
[0086] {
[0087] title: 'xxxx'
[0088] }
[0089] ``` :::
[0091] :::ml-data{name="bbb"}
[0092] json
[0093] {
[0094] title: 'yyyy'
[0095] }
[0096] ``` :::
[0098] The above examples are only partial examples of complex structural information supported by the extended protocol of this embodiment. In practical applications, inline instructions, block-level instructions, and container instructions defined by the extended protocol of this embodiment can support the transmission of various complex structural information, which will not be listed in detail here.
[0099] The syntax parsing component in this embodiment can also be called a Markdown Software Development Kit (SDK) component, and it is set within the Markdown component on the client side. The UI processing component can also be set within the Markdown component.
[0100] Steps S201-S202 described above in this embodiment are preparatory work for this embodiment. They are performed before the data request and can fully ensure the correct implementation of subsequent complex data response and data display.
[0101] S203. Send a data request to the server so that the server can respond to the data request using the LLM based on a pre-configured extended protocol;
[0102] S204. Based on a pre-configured extended protocol, receive response data returned by the server; the response data includes target complex structure data;
[0103] In this embodiment, the target complex structure data is any one of the various types of complex structure data supported by the extended protocol.
[0104] S205. Use a control component to verify and split the received response data;
[0105] like Figure 3 The diagram illustrates a Markdown component. A control component can also be placed within the Markdown component, and can also be called a Markdown control component. That is, the Markdown component includes a control component, a Markdown SDK component, and multiple UI processing components. Each UI processing component handles the rendering of a specific type of complex structured data. In this embodiment, the control component serves as the entry point for the Markdown component, responsible for entry, control, and providing external interfaces for the entire Markdown component. Upon receiving response data, the control component first performs validation, which may include correctness validation and reasonableness validation. Correctness validation verifies the correctness of the response data. For example, based on preset rules, it verifies whether the response data is a response to the user's data request; if so, it is correct; otherwise, it is incorrect. Reasonableness validation verifies the reasonableness of the response data. Since the response data in this embodiment may include complex structured data, reasonableness validation can perform reasonableness checks on each part of the complex structured data. Furthermore, based on reasonableness validation, the response data can be reasonably split. By using this control component to validate and split the received response data, effective support is provided for subsequent syntax parsing and rendering, ensuring the accuracy of syntax parsing and rendering.
[0106] S206. Use a syntax parsing component to perform syntax parsing on the received response data; and match the corresponding target UI processing component based on the syntax parsing result;
[0107] In practice, a syntax parsing component can be used to parse at least one of the inline instructions, block instructions, and container instructions in the response data to parse the target complex structure data in the response data; and based on the parsing result, match the target UI processing component corresponding to the complex structure data, and attach the parsing result to the target UI processing component for rendering processing.
[0108] S207. Use the target UI processing component to render and display the parsed response data.
[0109] In practice, a target UI processing component can be used to generate corresponding HyperText Markup Language (HTML) fragments from the target complex structure data in the response data parsed by the syntax parsing component, and then display them on the screen.
[0110] In other words, after the control component within the Markdown component splits the response data, it can transmit the split units sequentially to the Markdown SDK component. The Markdown SDK component then performs syntax parsing on each unit, and based on the parsing results, uses the corresponding target UI processing component to render each unit, generating the corresponding HTML fragments, and displaying them on the screen.
[0111] In this embodiment, the response data returned by the server can be sent as a streaming data stream in the form of Server-SentEvents (SSE), and the data is returned to the client in segments, so that the client can receive and render the data at the same time.
[0112] Based on the steps described above, Markdown components can recognize inline directives, block-level directives, and container directives according to extension protocols. For example, the `getContent` function can be used within the management component to standardize the source text, i.e., to verify the accuracy and reasonableness of the response data, and may also perform format conversions to standardize the response data. For typing or streaming scenarios, the management component can also further split the response data to ensure that each small segment is rendered and displayed correctly.
[0113] When parsing the syntax of Markdown SDK components, it can accurately parse inline directives, block directives, and container directives, so as to accurately parse complex structured data constructed by at least one of the inline directives, block directives, and container directives.
[0114] For example, for inline directives, taking :ml-copy as an example, after the Markdown SDK component parses the directive node, it calls the copy component to process it, dynamically creating a span with a copy button, and passing the content / text attributes from the directive so that the corresponding UI processing components can render and display it.
[0115] For block-level instructions, taking ::ml-video as an example, the Markdown SDK component matches the corresponding target UI processing component, and dispatches click / show events to the control component during interactions such as playback, mute, and dragging, for upper-layer business to listen to.
[0116] For container directives, taking :::ml-data as an example, it belongs to the SDK's built-in container. It uses the built-in mdasttransformer to parse structured JSON data into the dataMap and remove the original data node, so that any inline or block directive can synchronously obtain structured data. This achieves a closed loop from parsing and secondary processing to UI component mounting, ultimately ensuring that all extended UIs are interactive once they are on screen.
[0117] In practical applications, the extended protocol can be customized based on user needs, supporting the transmission, rendering, and display of any structured data that the user wants, making it highly practical.
[0118] The extended protocol set in this embodiment is an extension based on the existing Markdown basic protocol. That is, the LLM in this embodiment, based on the existing Markdown basic protocol, can not only generate plain text data, but also generate and transmit complex data structures as described above, as well as subsequent rendering and display. This embodiment mainly uses the example of server-side LLM-generated response data being complex structured data to describe the technical solution of this disclosure. The architecture of this embodiment can also support server-side LLM-generated response data in plain text format, specifically using the Markdown basic protocol to transmit plain text data and render and display it on the client side, which will not be elaborated further here.
[0119] The data processing method in this embodiment, by setting an extension protocol, enables LLM to generate various types of complex data structures, which can effectively enrich the data forms generated by LLM and effectively enrich the application scenarios of LLM.
[0120] Furthermore, by employing a syntax parsing component based on extended protocol configuration, it can accurately and efficiently parse inline instructions, block-level instructions, and container instructions in response data, enabling accurate parsing and identification of response data with various complex structures; and by employing a UI processing component, it can accurately and efficiently render and display the parsed response data, achieving accurate and efficient processing of complex data from AI generation to UI display.
[0121] Moreover, the above-mentioned technical solution in this embodiment supports the generation and rendering of interactive data, and can realize the interactive dynamic rendering UI display from the server side to the client side, which can effectively expand the application scenarios of LLM.
[0122] Figure 4 This is a schematic diagram based on the third embodiment of this disclosure; as shown Figure 4 As shown, this embodiment provides a data processing device 400, applied in a client, including:
[0123] The sending module 401 is used to send a data request to the server, so that the server can respond to the data request using a large language model based on a pre-configured extended protocol; the extended protocol supports the transmission of various types of complex structured data; the various types of complex structured data include formatted text data, partitioned data, or interactive data;
[0124] The receiving module 402 is used to receive response data returned by the server based on a pre-configured extended protocol; the response data includes target complex structure data.
[0125] The processing module 403 is used to parse and render the received response data based on a pre-configured syntax parsing component and user interface processing component, and then display it.
[0126] The data processing device 400 in this embodiment achieves the same data processing principle and technical effect by using the above-mentioned modules as the related method embodiments described above. For details, please refer to the description of the related method embodiments described above, which will not be repeated here.
[0127] Figure 5 This is a schematic diagram based on the fourth embodiment of the present disclosure; as shown Figure 5 As shown, the data processing apparatus 500 of this embodiment, in the above-described... Figure 4 Based on the technical solutions of the illustrated embodiments, the technical solutions of this disclosure will be described in further detail. For example... Figure 5 As shown, the data processing apparatus 500 of this embodiment includes the above-described... Figure 4 The modules with the same name and function shown are: sending module 501, receiving module 502, and processing module 503.
[0128] like Figure 5 As shown, the data processing device 500 in this embodiment further includes: a configuration module 504, used for:
[0129] Configure the extended protocol so that the client's extended protocol is aligned with the server's extended protocol; the extended protocol supports the transmission of various types of complex structured data, and each type of complex structured data is identified by at least one of inline instructions, block-level instructions, and container instructions;
[0130] Configure the syntax parsing component and the user interface processing component based on the configured extension protocol.
[0131] Further optionally, in one embodiment of this disclosure, the configuration module 504 is configured to:
[0132] Based on the configured extension protocol, the syntax parsing component is configured to parse various types of complex structured data.
[0133] Further optionally, in one embodiment of this disclosure, the configuration module 504 is configured to:
[0134] Based on the configured extension protocol, user interface processing components corresponding to each type of complex structure data in various types of complex structure data are configured respectively, resulting in multiple user interface processing components, so that each user interface processing component has the ability to render the corresponding type of complex structure data.
[0135] Further optional, such as Figure 5 As shown, in one embodiment of this disclosure, the processing module 503 includes:
[0136] The parsing unit 5031 is used to perform syntax parsing on the received response data using the syntax parsing component; and to match the corresponding target user interface processing component based on the syntax parsing result.
[0137] The rendering unit 5032 is used to render and display the parsed response data using the target user interface processing component.
[0138] Further optionally, in one embodiment of this disclosure, the parsing unit 5031 is used for:
[0139] The syntax parsing component is used to parse the target complex structure data in the response data.
[0140] Further optionally, in one embodiment of this disclosure, the rendering unit 5032 is used for:
[0141] The target user interface processing component is used to render the target complex structure data in the parsed response data to generate corresponding hypertext markup language fragments, which are then displayed on the screen.
[0142] Further optional, such as Figure 5 As shown, in one embodiment of this disclosure, the processing module 503 further includes:
[0143] The verification unit 5033 is used to verify and split the received response data using the control component.
[0144] The data processing device 500 in this embodiment achieves the same data processing principle and technical effect by using the above-mentioned modules as the related method embodiments described above. For details, please refer to the description of the related method embodiments described above, which will not be repeated here.
[0145] The acquisition, storage, and application of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0146] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0147] Figure 6 A schematic block diagram of an example electronic device 600 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0148] like Figure 6 As shown, device 600 includes a computing unit 601, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 602 or a computer program loaded into random access memory (RAM) 603 from storage unit 608. RAM 603 may also store various programs and data required for the operation of device 600. The computing unit 601, ROM 602, and RAM 603 are interconnected via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.
[0149] Multiple components in device 600 are connected to I / O interface 605, including: input unit 606, such as keyboard, mouse, etc.; output unit 607, such as various types of monitors, speakers, etc.; storage unit 608, such as disk, optical disk, etc.; and communication unit 609, such as network card, modem, wireless transceiver, etc. Communication unit 609 allows device 600 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0150] The computing unit 601 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 601 performs the various methods and processes described above, such as the methods of this disclosure. For example, in some embodiments, the methods of this disclosure may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on device 600 via ROM 602 and / or communication unit 609. When the computer program is loaded into RAM 603 and executed by the computing unit 601, one or more steps of the methods of this disclosure described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the methods of this disclosure by any other suitable means (e.g., by means of firmware).
[0151] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0152] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0153] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0154] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0155] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0156] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.
[0157] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0158] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A data processing method, applied in a client, comprising: Send a data request to the server so that the server can respond to the data request using a large language model based on a pre-configured extended protocol; The extended protocol supports the transmission of various types of complex structured data; these types of complex structured data include formatted text data, partitioned data, or interactive data. Based on a pre-configured extended protocol, the system receives response data returned by the server; the response data includes target complex structure data. Based on pre-configured syntax parsing components and user interface processing components, the received response data is parsed, rendered, and displayed.
2. The method according to claim 1, wherein, Before sending a data request to the server, the method further includes: Configure the extended protocol so that the client's extended protocol is aligned with the server's extended protocol; the extended protocol supports the transmission of various types of complex structured data, and each type of complex structured data is identified by at least one of inline instructions, block-level instructions, and container instructions; Configure the syntax parsing component and the user interface processing component based on the configured extension protocol.
3. The method according to claim 2, wherein, Based on the configured extension protocol, the syntax parsing component is configured, including: Based on the configured extension protocol, the syntax parsing component is configured to parse various types of complex structured data.
4. The method according to claim 2, wherein, Based on the configured extended protocol, the user interface processing component is configured, including: Based on the configured extension protocol, user interface processing components corresponding to each type of complex structure data in various types of complex structure data are configured respectively, resulting in multiple user interface processing components, so that each user interface processing component has the ability to render the corresponding type of complex structure data.
5. The method according to claim 1, wherein, Based on pre-configured syntax parsing and user interface processing components, the received response data is parsed, rendered, and displayed, including: The received response data is parsed using the syntax parsing component; and the corresponding target user interface processing component is matched based on the syntax parsing result. The target user interface processing component is used to render and display the parsed response data.
6. The method according to claim 5, wherein, The syntax parsing component is used to perform syntax parsing on the received response data, including: The syntax parsing component is used to parse the target complex structure data in the response data.
7. The method according to claim 5, wherein, The target user interface processing component is used to render and display the parsed response data, including: The target user interface processing component is used to render the target complex structure data in the parsed response data to generate corresponding hypertext markup language fragments, which are then displayed on the screen.
8. The method according to any one of claims 1-7, wherein, Before parsing and rendering the received response data based on pre-configured syntax parsing and user interface processing components, and before displaying it, the process also includes: The received response data is verified and split using a control component.
9. A data processing apparatus, used in a client, comprising: The sending module is used to send data requests to the server, so that the server can respond to the data requests using a large language model based on a pre-configured extended protocol; The extended protocol supports the transmission of various types of complex structured data; these types of complex structured data include formatted text data, partitioned data, or interactive data. A receiving module is used to receive response data returned by the server based on a pre-configured extended protocol; the response data includes target complex structure data; The processing module is used to parse, render, and display the received response data based on a pre-configured syntax parsing component and user interface processing component.
10. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1-8.
11. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-8.
12. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method according to any one of claims 1-8.