Data processing method and device, electronic equipment and storage medium
By marking and parsing the target search results in JSON data and processing complex output data in segments, the problem of low rendering efficiency in existing technologies is solved, achieving fast rendering and efficient display.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING XIAOMI MOBILE SOFTWARE CO LTD
- Filing Date
- 2024-12-09
- Publication Date
- 2026-06-09
Smart Images

Figure CN122173716A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to a data processing method, apparatus, electronic device, and storage medium. Background Technology
[0002] JavaScript Object Notation (JSON) is a lightweight and widely used data exchange format. For large volumes of JSON data output, an interface supporting streaming data is typically provided. This interface receives the output data and then renders it. In related technologies, rendering is either performed immediately upon receiving each data item, or all output data is received and processed uniformly before rendering. However, the former can only handle simple text output data and cannot handle complex output data, while the latter may require waiting tens of seconds or even longer for a processing result, resulting in low efficiency and severely impacting the user experience. Summary of the Invention
[0003] To overcome the problems existing in related technologies, this disclosure provides a data processing method, apparatus, electronic device, and storage medium.
[0004] According to a first aspect of the present disclosure, a data processing method is provided, the method comprising:
[0005] Obtain the target search result associated with the search request. The target search result is generated by tagging multiple content information in the initial search result based on a first rule. The data type of the target search result is streaming data.
[0006] Based on the second rule, the target search result is parsed to obtain multiple pieces of content information, wherein the second rule is associated with the first rule;
[0007] For each piece of content information obtained, the associated information to be displayed is shown.
[0008] In one exemplary embodiment, obtaining the target search result associated with the search request includes:
[0009] The preset intelligent dialogue interface is invoked to obtain the target search result based on the search request and the first rule.
[0010] In an exemplary embodiment, obtaining the target search result based on the search request and the first rule includes:
[0011] Based on the search request, the initial search results are obtained, and the initial search results include multiple pieces of the content information;
[0012] The target search result is obtained by marking each piece of content information in the initial search result with a preset symbol, wherein the preset symbol includes a start symbol and an end symbol.
[0013] In one exemplary embodiment, different preset symbols are associated with different content information.
[0014] In one exemplary embodiment, the step of parsing the target search result based on the second rule to obtain multiple pieces of content information includes:
[0015] Listen for the start and end symbols in the target search results;
[0016] Each piece of content information is determined based on the start and end symbols.
[0017] In one exemplary embodiment, the information to be displayed associated with the content information includes:
[0018] Based on the type of the content information, select the display method corresponding to the type of the content information to display the information to be displayed.
[0019] In one exemplary embodiment, the information to be displayed associated with the content information includes:
[0020] If the content information is a network address, obtain the information to be displayed from the network address;
[0021] The information to be displayed is shown based on the preset style information.
[0022] In one exemplary embodiment, the information to be displayed associated with the content information includes:
[0023] If the content information is text information, it is displayed in a typewriter effect based on preset style information.
[0024] According to a second aspect of the present disclosure, a data processing apparatus is provided, the apparatus comprising:
[0025] The acquisition module is configured to acquire the target search results associated with the search request. The target search results are generated by marking multiple content information in the initial search results based on a first rule. The data type of the target search results is streaming data.
[0026] The processing module is configured to parse the target search result based on a second rule to obtain multiple pieces of content information, wherein the second rule is associated with the first rule;
[0027] The display module is configured to display the information to be displayed associated with the content information each time the content information is obtained.
[0028] According to a third aspect of the present disclosure, an electronic device is provided, comprising:
[0029] processor;
[0030] Memory used to store processor-executable instructions;
[0031] The processor is configured to perform the method described in the first aspect of the embodiments of this disclosure.
[0032] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, wherein when instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the method described in the first aspect of the present disclosure.
[0033] According to a fifth aspect of the present disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the method as described in any one of the first aspects of the present disclosure.
[0034] The method described above has the following advantages: it can process complex target search results and obtain multiple content information sequentially by parsing the target search results through the second rule, thereby achieving the effect of segmented processing of target search results, improving data processing speed and efficiency, and thus enabling faster display of target search results and enhancing the user experience.
[0035] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0036] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0037] Figure 1 This is a schematic diagram illustrating output data processing according to an exemplary embodiment;
[0038] Figure 2 This is a flowchart illustrating a data processing method according to an exemplary embodiment;
[0039] Figure 3This is a schematic diagram illustrating data processing according to an exemplary embodiment;
[0040] Figure 4 This is a flowchart illustrating a data processing method according to an exemplary embodiment;
[0041] Figure 5 This is a flowchart illustrating a data processing method according to an exemplary embodiment;
[0042] Figure 6 This is a schematic diagram illustrating a data processing method according to an exemplary embodiment;
[0043] Figure 7 This is a block diagram illustrating a data processing apparatus according to an exemplary embodiment;
[0044] Figure 8 This is a block diagram illustrating an electronic device according to an exemplary embodiment. Detailed Implementation
[0045] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0046] In AIGC (Artificial Intelligence Generated Content) scenarios, such as the ChatGPT (Chat Generative Pre-trained Transformer) chatbot model, there is usually an interface that supports streaming data types, i.e., a Stream type interface. The server receives the output data through this interface and then sends the output data to the client (frontend), where the client renders and processes the output data.
[0047] In related technologies, Figure 1 This is a schematic diagram illustrating output data processing according to an exemplary embodiment, such as... Figure 1 As shown, when the server receives output data and sends it to the client, and the client then renders the output data, there are two possible methods:
[0048] The first approach involves the server sending one piece of output data to the client each time it receives it, and the client then directly renders and processes that output data. In this method, the data doesn't require complex parsing and can be directly output or rendered. Therefore, this approach is only suitable for handling simple text output data in simple scenarios and cannot handle complex output data. For example, in a simple text dialogue using OpenAI, if a user asks "Who are you?", GPT outputs "I am anAI" in multiple segments, which are returned to the client. Figure 1 As shown in Figure a.
[0049] The second approach involves server-side blocking and unified processing of output data. This means the server waits until all output data has been received and processed before sending it to the client, where it is then rendered. In this method, the client may have to wait tens of seconds for the processing result, which is inefficient, especially with large amounts of streaming data, where the wait time can be even longer, severely impacting the user experience. For example, in a simple text dialogue using OpenAI, if a user asks "Who are you?" and GPT outputs "I am an AI", the server blocks output data, processes it uniformly, and then sends it to the client, which then renders it. Figure 1 As shown in Figure b.
[0050] In exemplary embodiments of this disclosure, to overcome the limitations of output data processing methods in related technologies, a data processing method is provided, comprising: obtaining a target search result associated with a search request, wherein the target search result is generated by tagging multiple content information in the initial search result based on a first rule, and the data type of the target search result is streaming data; parsing the target search result based on a second rule to obtain multiple content information, wherein the second rule is associated with the first rule; and displaying the information to be displayed associated with each obtained content information. This method can handle complex target search results and, by parsing the target search result sequentially using the second rule to obtain multiple content information, achieves the effect of segmented processing of the target search result, thereby improving data processing speed and efficiency, and ultimately enabling faster display of the target search result, thus enhancing the user experience.
[0051] The data processing method provided in this disclosure is applied to electronic devices, including smartphones, tablets, personal computers, smart wearable devices, smart IoT devices, smart vehicle systems, etc. This data processing method is suitable for various intelligent search scenarios, such as intelligent search in app stores and online intelligent question answering.
[0052] In an exemplary embodiment of this disclosure, a data processing method is provided. Figure 2 This is a flowchart illustrating a data processing method according to an exemplary embodiment, such as... Figure 2As shown, the data processing method includes the following steps:
[0053] Step S201: Obtain the target search result associated with the search request. The target search result is generated by marking multiple content information in the initial search result based on the first rule. The data type of the target search result is streaming data.
[0054] A search request is a search request corresponding to any keyword. Search results are associated with the search request. Different application scenarios correspond to different search requests and search results. For example, in an app store's intelligent search scenario, the search request is any keyword used to represent an application name, and the search results are information on all applications corresponding to that keyword. Similarly, in an online education intelligent question-and-answer application scenario, the search request is any keyword used to represent a course name or activity name, and the search results are information on all courses or activities corresponding to that keyword. Search results include multiple pieces of content information. The number of bytes in each piece of content information is determined based on the actual situation. Different pieces of content information describe the search result from different aspects. For example, when the search result is for application information, the content information includes: the application name, a brief description of the application, the application download link, the application's download count, and the application's rating. Similarly, when the search result is for course information, the content information includes: the course name, a brief description of the course, a link to participate in the course, and the course's rating.
[0055] The initial search result is a search result generated based on the search request without any processing. The target search result is a search result generated after processing the initial search result according to a first rule. Processing the initial search result according to the first rule involves marking multiple pieces of information in the initial search result. Each piece of information can be marked individually, or multiple pieces of information can be marked together, such as marking content information of the same type. The marking method can be any method, such as adding special symbols or indicating which bytes constitute a piece of information. The data type of the target search result is streaming data, i.e., a continuously occurring data sequence, so the target search result can be processed simultaneously with its acquisition. This embodiment does not limit the data complexity of the target search result.
[0056] Step S202: Based on the second rule, the target search result is parsed to obtain multiple content information, and the second rule is associated with the first rule.
[0057] The second rule is related to the first rule. The first rule is used to mark multiple pieces of content information in the initial search results to obtain the target search results. The second rule is used to parse the marked multiple pieces of content information in the target search results to extract the initial multiple pieces of content information. To ensure that the correct content information is parsed, the parsing method used in the second rule is the same as the marking method used in the first rule. For example, if the first rule marks by adding special symbols, the second rule parses by recognizing the special symbols; or if the first rule marks by indicating which bytes constitute a piece of content information, the second rule parses by recognizing which bytes constitute a piece of content information. Since the data type of the target search results is streaming data, the multiple marked pieces of content information in the target search results are obtained sequentially, and the multiple pieces of content information obtained through parsing are also obtained sequentially, achieving the effect of segmented processing of the target search results.
[0058] Step S203: For each piece of content information obtained, display the information to be displayed associated with that content information.
[0059] The type of content information is determined based on the actual search results in the specific application scenario. Different types of content information are associated with different information to be displayed. For example, for text-type content information, the associated information to be displayed is the content information itself; for other types of content information, the associated information to be displayed is related display information. Since multiple pieces of content information are parsed sequentially, each piece of content information is displayed directly with its associated information, without waiting for all content information to be parsed.
[0060] In one example, Figure 3 This is a schematic diagram illustrating data processing according to an exemplary embodiment, such as... Figure 3 As shown, the target search results include content information 1 and content information 2, which are marked separately. When the server receives the marked content information 1, it parses the marked content information 1 to obtain content information 1, and then the client displays the information 1 to be displayed associated with content information 1. When the server receives the marked content information 2, it parses the marked content information 2 to obtain content information 2, and then the client displays the information 2 to be displayed associated with content information 2.
[0061] In the exemplary embodiments of this disclosure, the target search result is streaming data generated by tagging multiple content information in the initial search result based on a first rule. After obtaining the target search result associated with the search request, the target search result is parsed based on a second rule to obtain multiple content information. For each piece of content information obtained, the associated information to be displayed is shown. This method can handle complex target search results and obtains multiple content information sequentially by parsing the target search result using the second rule, achieving the effect of segmented processing of the target search result. This improves data processing speed and efficiency, thereby enabling faster display of the target search result and enhancing the user experience.
[0062] In an exemplary embodiment of this disclosure, a data processing method is provided. Figure 4 This is a flowchart illustrating a data processing method according to an exemplary embodiment, such as... Figure 4 As shown, the data processing method includes the following steps:
[0063] Step S401: Call the preset intelligent dialogue interface, obtain the target search result based on the search request and the first rule. The target search result is generated by marking multiple content information in the initial search result based on the first rule. The data type of the target search result is streaming data.
[0064] A preset intelligent dialogue interface can be used, such as any AIGC interface or the ChatGPT interface. Input the search request and the first rule into the preset intelligent dialogue interface to output the target search results.
[0065] Step S402: Based on the second rule, the target search result is parsed to obtain multiple content information, and the second rule is associated with the first rule.
[0066] For a detailed implementation of step S402, please refer to step S202, which will not be repeated here.
[0067] Step S403: For each piece of content information obtained, select the display method corresponding to the type of content information to display the information to be displayed.
[0068] Different types of content information require different display methods. When a piece of content information is obtained, the display method corresponding to the type of content information is selected to display the information to be displayed. Optionally, to improve display efficiency, each piece of content information can be processed in parallel.
[0069] In some implementations, if the content information is a network address, the information to be displayed is obtained from the network address; based on preset style information, the information to be displayed is then displayed. For example, when the target search result is information about an application, and the content information is a network address, the application's name, download link, download count, and rating are obtained from that network address, and used as the information to be displayed, which is then displayed on the search results page according to a preset display style. The preset style information includes the style of the displayed content, such as bold text, and also includes the display style of the displayed content, such as its display position.
[0070] In some implementations, if the content information is text, it is displayed in a typewriter effect based on preset style information. If the content information is text, preset style information for that content information is obtained, such as whether the text is unbold or bold. Since the target search result is streaming data, each byte in the text information is obtained sequentially, and each byte is processed sequentially using the preset style information. Therefore, each processed byte can be displayed sequentially on the search results page, i.e., the content information is displayed in a typewriter effect.
[0071] In an exemplary embodiment of this disclosure, a data processing method is provided. Figure 5 This is a flowchart illustrating a data processing method according to an exemplary embodiment, such as... Figure 5 As shown, the data processing method includes the following steps:
[0072] Step S501: Call the preset intelligent dialogue interface to obtain the initial search results based on the search request. The initial search results include multiple content information.
[0073] Inputting a search request into a preset intelligent dialogue interface yields initial search results, which include multiple pieces of information. In one example, when the target search result is information about an application, the initial search results include three pieces of information: the web address "www.abshghp", the description name "FJOHDIB", and the description content "You can enjoy the shooter game!". The complete initial search result would then be "www.abshghp FJOHDIBYou can enjoy the shooter game!".
[0074] Step S502: Each piece of content information in the initial search results is marked with a preset symbol to obtain the target search result. The preset symbols include a start symbol and an end symbol.
[0075] The start symbol identifies the first byte of the content information, and the end symbol identifies the last byte. The default symbol can be any symbol; for example, if the default symbol is square brackets "[]" or curly braces "{}", then the start symbol is a left parenthesis and the end symbol is a right parenthesis. Inputting a default command instructs the default intelligent dialogue interface to use the default symbol to mark each piece of content information in the initial search results. In one example, using the above initial search results as an example, when the default symbol is square brackets "[]", the target search result obtained is "[www.abshghp][FJOHDIB][You can enjoy the shooter game! ]".
[0076] In some implementations, the last content information in the initial search result is not marked.
[0077] Since the penultimate content item has an end symbol, the last content item will not be interfered with by other content items. Therefore, not marking the last content item in the initial search results ensures that the last content item is displayed quickly.
[0078] In some implementations, different preset symbols are associated with different content information.
[0079] In one example, taking the initial search result mentioned above as an example, the default symbol for the network address is square brackets "[]", the default symbol for the description name is curly braces "{}", and when the description content is not marked, the target search result obtained is "[www.abshghp]{FJOHDIB}You can enjoy the shooter game!".
[0080] Different content information is associated with different preset symbols, which can avoid errors in the parsed content information.
[0081] Step S503: Listen for the start and end symbols in the target search results.
[0082] When the server receives the target search results through the preset intelligent dialogue interface, it listens for the start and end symbols in the target search results.
[0083] Step S504: Determine each piece of content information based on the start and end symbols.
[0084] When the start symbol is detected, the bytes following it are considered content information. When the end symbol is detected, the reception of this content information is complete, and the bytes between the start and end symbols are treated as content information. In an example, using the target search result "[www.abshghp]{FJOHDIB}You can enjoy the shooter game!", when "[" is detected, it indicates the next received content will be a network address; when "]" is detected, it indicates the network address has been received, and a complete content information is obtained. When "{" is detected, it indicates the next received content will be a description name; when "}" is detected, it indicates the description name has been received, and a complete content information is obtained.
[0085] Step S505: For each piece of content information obtained, display the information to be displayed associated with that content information.
[0086] For a detailed implementation of step S505, please refer to step S203 or step S403, which will not be repeated here.
[0087] In one example embodiment, Figure 6 This is a schematic diagram illustrating a data processing method according to an exemplary embodiment, such as... Figure 6As shown, the target search result is "[www.abshghp]{FJOHDIB}You can enjoy the shootergame!". The GPT output message is as shown in the figure. Each byte is output sequentially. When "[" is detected, it indicates that the next received content will be a network address. When "]" is detected, it indicates that the network address has been received, and the complete network address "www.abshghp" is obtained. The information to be displayed is retrieved from this network address, including the application's name, icon, rating, download count, and download link. After obtaining the information to be displayed, it is displayed in the application card shown in the figure based on preset style information. When "{" is detected, it indicates that the next received content will be a description name. When "}" is detected, it indicates that the description name has been received, and the complete description name "FJOHDIB" is obtained. It is then bolded and displayed in the application card shown in the figure based on preset style information. Finally, the received description content does not require processing and is displayed verbatim. Therefore, for each byte received, one byte is displayed in the application card shown in the figure based on preset style information. It's important to note that after parsing each piece of content information, the subsequent processing of each piece of content information is performed in parallel, enabling faster display of the target search results. Therefore, during a search, the search results can be received and displayed on the client simultaneously, improving search efficiency and avoiding long waiting times for users.
[0088] In an exemplary embodiment of this disclosure, a data processing apparatus is provided. Figure 7 This is a block diagram illustrating a data processing apparatus according to an exemplary embodiment, such as... Figure 7 As shown, the data processing device includes:
[0089] The acquisition module 701 is configured to acquire the target search results associated with the search request. The target search results are generated by marking multiple content information in the initial search results based on a first rule. The data type of the target search results is streaming data.
[0090] Processing module 702 is configured to parse the target search results based on the second rule to obtain multiple content information, wherein the second rule is associated with the first rule;
[0091] The display module 703 is configured to display the information to be displayed associated with the content information each time a piece of content information is obtained.
[0092] In one exemplary embodiment, the acquisition module 701 is further configured to:
[0093] The system invokes a pre-defined intelligent dialogue interface to obtain the target search results based on the search request and the first rule.
[0094] In one exemplary embodiment, the acquisition module 701 is further configured to:
[0095] Based on the search request, obtain the initial search results, which include multiple pieces of content information;
[0096] The target search result is obtained by marking each piece of content information in the initial search result with preset symbols, including a start symbol and an end symbol.
[0097] In one exemplary embodiment, different preset symbols are associated with different content information.
[0098] In one exemplary embodiment, the processing module 702 is further configured to:
[0099] Listen for the start and end symbols in the target search results;
[0100] Each piece of content information is determined based on the start and end symbols.
[0101] In one exemplary embodiment, the display module 703 is further configured to:
[0102] Based on the type of content information, select the display method corresponding to the type of content information to display the information to be displayed.
[0103] In one exemplary embodiment, the display module 703 is further configured to:
[0104] If the content information is a network address, obtain the information to be displayed from the network address;
[0105] Display the information to be displayed based on the preset style information.
[0106] In one exemplary embodiment, the display module 703 is further configured to:
[0107] If the content information is text, it will be displayed with a typewriter effect based on the preset style information.
[0108] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0109] Figure 8 This is a block diagram illustrating an electronic device 800 according to an exemplary embodiment.
[0110] Reference Figure 8The electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power supply component 806, a multimedia component 808, an audio component 810, an input / output (I / O) interface 812, a sensor component 814, and a communication component 816.
[0111] Processing component 802 typically controls the overall operation of electronic device 800, such as operations associated with display, telephone calls, data communication, camera operation, and recording operations. Processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the methods described above. Furthermore, processing component 802 may include one or more modules to facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802.
[0112] Memory 804 is configured to store various types of data to support the operation of electronic device 800. Examples of this data include instructions for any application or method operating on electronic device 800, contact data, phonebook data, messages, pictures, videos, etc. Memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0113] Power supply component 806 provides power to various components of electronic device 800. Power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 800.
[0114] Multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 808 includes a front-facing camera and / or a rear-facing camera. When the electronic device 800 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0115] Audio component 810 is configured to output and / or input audio signals. For example, audio component 810 includes a microphone (MIC) configured to receive external audio signals when electronic device 800 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 804 or transmitted via communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
[0116] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0117] Sensor assembly 814 includes one or more sensors for providing state assessments of various aspects of electronic device 800. For example, sensor assembly 814 can detect the on / off state of electronic device 800, the relative positioning of components such as the display and keypad of electronic device 800, changes in position of electronic device 800 or a component of electronic device 800, the presence or absence of user contact with electronic device 800, orientation or acceleration / deceleration of electronic device 800, and temperature changes of electronic device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 814 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.
[0118] Communication component 816 is configured to facilitate wired or wireless communication between electronic device 800 and other devices. Electronic device 800 can access wireless networks based on communication standards, such as WiFi, 2G, or 3G, or combinations thereof. In one exemplary embodiment, communication component 816 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 816 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0119] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.
[0120] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, which can be executed by a processor 820 of an electronic device 800 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0121] A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to perform a data processing method, including any of the methods described above.
[0122] A computer program product includes a computer program that, when executed by a processor, implements a data processing method, the data processing method including any of the methods described above.
[0123] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
[0124] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A data processing method, characterized in that, The method includes: Obtain the target search result associated with the search request. The target search result is generated by marking multiple content information in the initial search result based on a first rule. The data type of the target search result is streaming data. Based on the second rule, the target search result is parsed to obtain multiple pieces of content information, wherein the second rule is associated with the first rule; For each piece of content information obtained, the associated information to be displayed is shown.
2. The method according to claim 1, characterized in that, The process of obtaining the target search results associated with the search request includes: The preset intelligent dialogue interface is invoked to obtain the target search result based on the search request and the first rule.
3. The method according to claim 2, characterized in that, Obtaining the target search result based on the search request and the first rule includes: Based on the search request, the initial search results are obtained, and the initial search results include multiple pieces of the content information; The target search result is obtained by marking each piece of content information in the initial search result with a preset symbol, wherein the preset symbol includes a start symbol and an end symbol.
4. The method according to claim 3, characterized in that, Different preset symbols are associated with different content information.
5. The method according to claim 3, characterized in that, The second rule is used to parse the target search result to obtain multiple pieces of content information, including: Listen for the start and end symbols in the target search results; Each piece of content information is determined based on the start and end symbols.
6. The method according to claim 1, characterized in that, The information to be displayed associated with the content information includes: Based on the type of the content information, select the display method corresponding to the type of the content information to display the information to be displayed.
7. The method according to claim 6, characterized in that, The information to be displayed associated with the content information includes: If the content information is a network address, obtain the information to be displayed from the network address; The information to be displayed is shown based on the preset style information.
8. The method according to claim 6, characterized in that, The information to be displayed associated with the content information includes: If the content information is text information, it is displayed in a typewriter effect based on preset style information.
9. A data processing apparatus, characterized in that, The device includes: The acquisition module is configured to acquire the target search results associated with the search request. The target search results are generated by marking multiple content information in the initial search results based on a first rule. The data type of the target search results is streaming data. The processing module is configured to parse the target search result based on a second rule to obtain multiple pieces of content information, wherein the second rule is associated with the first rule; The display module is configured to display the information to be displayed associated with the content information each time the content information is obtained.
10. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to perform the method as described in any one of claims 1-8.
11. A non-transitory computer-readable storage medium, characterized in that, When the instructions in the storage medium are executed by the processor of the electronic device, the electronic device is able to perform the method as described in 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 as described in any one of claims 1-8.