Data processing method, electronic device, storage medium and computer program product
By using a customized streaming data encapsulation format and streaming interface transmission protocol in data processing, the page interface data segments are streamed and received, which solves the problems of high resource consumption and low processing efficiency in the prior art, and realizes efficient data processing and transmission.
Patent Information
- Application Number
- CN202411633937.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-02-25
AI Technical Summary
In the prior art, the data processing method has problems such as large resource consumption and low processing efficiency, especially when the amount of data is large, resulting in idle and waste of system resources.
By obtaining the page interface data segment to be transmitted, using a custom streaming data encapsulation format, and using the streaming interface transmission protocol to stream and receive the data, real-time data processing is achieved.
It improves the efficiency of data transmission and processing, reduces latency, saves system resources, and improves overall processing efficiency and reliability.
Smart Images

Figure CN119520426A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data transmission, and in particular to a data processing method, electronic device, storage medium and computer program product. Background Art
[0002] Web applications have evolved from traditional display applications to applications centered on client-side instant rendering and user experience. The performance optimization of Web applications is one of the most important factors affecting the user experience. When Web applications in related technologies transmit and process data, they usually need to wait for all data to arrive before processing, which will lead to idleness and waste of system resources, especially when the amount of data is large. Therefore, how to reasonably allocate and utilize resources, reduce delays, and improve overall processing efficiency has become an urgent problem to be solved.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] The embodiments of the present application provide a data processing method, an electronic device, a storage medium, and a computer program product to at least solve the technical problems of large resource consumption and low processing efficiency in the data processing method provided in the related art.
[0005] According to one aspect of the embodiments of the present application, a data processing method is provided, including: obtaining a page interface data segment to be transmitted, wherein the page interface data segment adopts a customized streaming data encapsulation format; and streaming the page interface data segment using a streaming interface transmission protocol.
[0006] According to one aspect of the embodiments of the present application, a data processing method is also provided, including: streaming receiving page interface data segments through a streaming interface transmission protocol, wherein the page interface data segments adopt a customized streaming data encapsulation format; and performing real-time data processing on the received page interface data segments.
[0007] According to one aspect of the embodiments of the present application, a data processing method is also provided, including: streaming receiving video live data segments through a streaming interface transmission protocol, wherein the video live data segments adopt a customized streaming data encapsulation format; performing real-time video data decoding on the received video live data segments to obtain decoded data; and performing real-time rendering and playback on the decoded data.
[0008] According to one aspect of the embodiments of the present application, a data processing method is also provided, including: obtaining a data processing request through a first application programming interface, wherein the data processing request is used to request streaming transmission of a page interface data segment through a streaming interface transmission protocol, and the page interface data segment adopts a custom streaming data encapsulation format; returning a data processing response through a second application programming interface, wherein the response data carried in the data processing response includes: the page interface data segment.
[0009] According to one aspect of the embodiments of the present application, a data processing method is also provided, including: obtaining a currently input data processing conversation request, wherein the data processing conversation request is used to request streaming transmission of a page interface data segment through a streaming interface transmission protocol, and the page interface data segment adopts a customized streaming data encapsulation format; in response to the data processing conversation request, returning a data processing conversation reply, wherein the information carried in the data processing conversation reply includes: target data content, the target data content is obtained by performing real-time data processing on the page interface data segment; and displaying the target data content in a graphical user interface.
[0010] According to one aspect of the embodiments of the present application, a data processing system is also provided, including: a sending device and a receiving device; the sending device is used to obtain a page interface data segment to be transmitted, and to stream the page interface data segment using a streaming interface transmission protocol, wherein the page interface data segment uses a custom streaming data encapsulation format; the receiving device is used to stream the page interface data segment through the streaming interface transmission protocol, and to perform real-time data processing on the received page interface data segment.
[0011] According to one aspect of the embodiments of the present application, an electronic device is also provided, including: a memory storing an executable program; and a processor for running the program, wherein the method of each embodiment of the present application is executed when the program is running.
[0012] According to one aspect of the embodiments of the present application, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the methods in the various embodiments of the present application.
[0013] According to another aspect of the embodiments of the present application, a computer program product is also provided, including a computer program, and when the computer program is executed by a processor, the method in each embodiment of the present application is implemented.
[0014] According to another aspect of an embodiment of the present application, a computer program product is also provided, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method in each embodiment of the present application is implemented.
[0015] According to another aspect of the embodiments of the present application, a computer program is also provided, and when the computer program is executed by a processor, the methods in the various embodiments of the present application are implemented.
[0016] In an embodiment of the present application, by obtaining the page interface data segment to be transmitted, the page interface data segment adopts a customized streaming data encapsulation format, and then the streaming interface transmission protocol is used to stream the page interface data segment, thereby realizing the streaming transmission of data, thereby improving the efficiency of data transmission and processing. The use of the streaming data encapsulation format can better organize and manage data, making data transmission more efficient and flexible. At the same time, the use of the streaming interface transmission protocol can ensure the security and stability of data, improve the performance of the overall system, and then the efficiency and reliability of page interface data transmission processing. Therefore, the data processing method in the embodiment of the present application allows different data to be continuously processed while being generated or received, rather than waiting for all data to be collected before processing, so that system resources can be managed and utilized more effectively, and delays can be reduced, thereby achieving the technical effect of saving system resources and improving processing efficiency, thereby solving the technical problems of large resource consumption and low processing efficiency in the data processing method provided in the related art.
[0017] It is easy to notice that the above general description and the following detailed description are only for the purpose of exemplifying and explaining the present application, and do not constitute a limitation of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0019] Figure 1 is a hardware structure block diagram of a computer terminal (or mobile device) for implementing a data processing method according to an embodiment of the present application;
[0020] Figure 2 is a schematic diagram of an application scenario of a data processing method according to an embodiment of the present application;
[0021] Figure 3 is a flow chart of a data processing method according to an embodiment of the present application;
[0022] Figure 4is a schematic diagram of a data processing method according to an embodiment of the present application;
[0023] Figure 5 is a schematic diagram of another data processing method according to an embodiment of the present application;
[0024] Figure 6 is a flow chart of another data processing method according to an embodiment of the present application;
[0025] Figure 7 is a flow chart of another data processing method according to an embodiment of the present application;
[0026] Figure 8 is a flow chart of another data processing method according to an embodiment of the present application;
[0027] Fig. 9 is a flow chart of another data processing method according to an embodiment of the present application;
[0028] Fig.10 is a structural block diagram of a data processing device according to an embodiment of the present application;
[0029] Fig.11 is a structural block diagram of another data processing device according to an embodiment of the present application;
[0030] Fig.12 is a structural block diagram of another data processing device according to an embodiment of the present application;
[0031] Fig.13 is a structural block diagram of another data processing device according to an embodiment of the present application;
[0032] Fig.14 is a structural block diagram of another data processing device according to an embodiment of the present application;
[0033] Fig.15 It is a structural block diagram of a computer terminal according to an embodiment of the present application. DETAILED DESCRIPTION
[0034] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0035] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0036] First, some nouns or terms that appear in the description of the embodiments of the present application are subject to the following explanations:
[0037] Streaming interface: refers to the transmission of data one by one in a time-sequential manner rather than in a packaged manner.
[0038] Server-Side Rendering (SSR) is a page rendering method that sends dynamically generated Hypertext Markup Language (HTML) to the client. This method can improve search engine optimization, and the HTML generated by the server can be directly crawled by search engines.
[0039] Client-Side Rendering (CSR) is a rendering method for web applications, which means that the main content of the web page is generated in the user's browser. In this process, the browser first loads an initial HTML file, which usually contains some basic HTML structure and JavaScript code. Subsequently, JavaScript is executed on the client (i.e. the user's browser), dynamically obtaining data from the server, which is usually requested through the Application Programming Interface (API), and based on this data, the Document Object Model (DOM) is built inside the browser, and finally the complete web page content is presented to the user.
[0040] Related technologies In Web development, the following strategies can be used to optimize data transmission and page loading performance:
[0041] Split multi-interface solution: In Web applications, a large and complex interface request is split into multiple small interface requests, and each interface is responsible for obtaining and processing a specific type of data, such as pictures, text, video, etc. The technical defects of the split multi-interface solution are: 1) Timing maintenance between multiple interfaces: It is necessary to ensure that the data of different interfaces arrive in the correct order, which may become complicated in practice due to factors such as network conditions and server response time. 2) State synchronization: The front end needs to process multiple interface responses to ensure the correctness and consistency of the page status and avoid data conflicts or display errors. 3) Log association: During debugging, it is necessary to associate and find problems in the logs of multiple interfaces, which increases the difficulty of troubleshooting. 4) Waste of server resources: Since each small interface requires independent processing logic and resources, the overall server load and resource consumption will increase.
[0042] BigPipe technology or SSR+streaming solution: BigPipe is a page rendering technology that can divide the page into multiple independent "pipes", each of which can be loaded and rendered independently. SSR+streaming is based on server-side rendering and sends data in a streaming manner, so that the front-end can render while receiving. The technical flaws of this solution are: 1) Complexity: BigPipe requires an in-depth understanding of the page structure and reasonably splits it into multiple independent pipelines, which increases the complexity of front-end and back-end development. 2) Applicability: These solutions focus more on page rendering strategies, and cannot perform detailed control over the details and efficiency of data transmission (such as clear marking of data segmentation, format, and length), so they may not be flexible enough in some specific scenarios.
[0043] Standard streaming interface solutions such as WebSocket / Server-Sent Events (SSE) / HTTP Chunked Transfer: WebSocket is a protocol that supports full-duplex communication, allowing a persistent connection to be established between the client and the server for real-time data transmission. SSE is a one-way communication standard that allows the server to push data to the client, mainly used for real-time data updates. HTTP Chunked Transfer is an HTTP transmission encoding method that allows data to be split into multiple parts and processed while being transmitted. Standard streaming interface solutions are generally limited by factors such as usage scenarios and device resource costs, and have poor flexibility in data format and segmented processing, which affects the efficiency of data reception and processing.
[0044] In summary, the data processing methods in the related art have problems with the flexibility, efficiency and resource optimization of data transmission, especially when processing complex and multi-segment data, they cannot provide a more efficient and convenient data transmission and processing experience. There is currently no effective solution to the above problems.
[0045] According to an embodiment of the present application, a method embodiment of data processing is also provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0046] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 FIG. 1 shows a hardware structure block diagram of a computer terminal (or mobile device) for implementing a data processing method. Figure 1 As shown, the computer terminal 10 (or mobile device) may include one or more (shown as 102a, 102b, ..., 102n in the figure) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor (Microcontroller Unit, MCU) or a programmable logic device (Field Programmable Gate Array, FPGA)), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a Universal Serial Bus (Universal Serial Bus, USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0047] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10 (or mobile device). As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0048] The memory 104 can be used to store software programs and modules of application software, such as program instructions / data storage devices corresponding to the data processing method in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, realizing the above-mentioned data processing method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0049] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0050] The display may be, for example, a touch screen liquid crystal display (LCD), which may enable a user to interact with a user interface of the computer terminal 10 (or mobile device).
[0051] Figure 1 The hardware structure block diagram shown can be used not only as an exemplary block diagram of the above-mentioned computer terminal 10 (or mobile device), but also as an exemplary block diagram of the above-mentioned server. In an optional embodiment, Figure 2 The block diagram shows the use of the above Figure 1The computer terminal 10 (or mobile device) shown in FIG. 1 is an embodiment of a receiving end. Figure 2 As shown, the computer terminal 10 (or mobile device) can be connected to one or more servers, such as a security server, a resource server, a game server, etc., via a data network connection or electronic connection. In an optional embodiment, the above-mentioned computer terminal 10 (or mobile device) can be any mobile computing device. The data network connection can be a local area network connection, a wide area network connection, an Internet connection, or other types of data network connections. The computer terminal 10 (or mobile device) can be executed to connect to a network service performed by a server (e.g., a security server) or a group of servers 20. A network server is a network-based user service, such as a social network, cloud resources, email, online payment or other online applications.
[0052] Under the above operating environment, this application provides Figure 3 The data processing method shown. Figure 3 is a flow chart of a data processing method according to an embodiment of the present application, such as Figure 3 As shown, the method comprises the following steps:
[0053] Step S31, obtaining a page interface data segment to be transmitted, wherein the page interface data segment adopts a self-defined streaming data encapsulation format;
[0054] Step S32: Using a streaming interface transmission protocol to stream the page interface data segment.
[0055] The page interface data segment can be a data set transmitted from the server to the client in a Web application and used to render various parts of the page. The page interface data segment can contain different types of resources and information, such as HTML, CSS, JavaScript code, pictures, videos, audio files, and various service data.
[0056] The content design of the page interface data segment can be determined according to the scenario requirements. For example, the Web search application scenario focuses on providing efficient, accurate, and rich search services while ensuring the smoothness and security of the user experience; shopping pages focus more on the timely update of product information and promotional activities; social media platforms need to process user dynamics and interactive data in real time; online video platforms need to optimize video streaming and the display of additional content. The streaming interface transmission protocol can effectively improve data transmission efficiency and optimize user experience based on the characteristics of each scenario.
[0057] In the Web search application scenario with artificial intelligence technology as the core, the core content covered by the page interface data segment includes but is not limited to: header navigation bar data, online and offline resources of Search Generated Snippets (SGS), first-screen and non-first-screen search component (SC) data, additional data of immersive pages, server-side rendering products of operating SC, etc.
[0058] Exemplarily, in the process of obtaining the page interface data segment to be transmitted, the back-end system on the server side collects the required page data from various data sources, including but not limited to databases, file systems, third-party services, etc. The page data can be processed according to a preset method, such as filtering, sorting, aggregation, etc. Furthermore, the acquired data is packaged using a custom streaming data encapsulation format to obtain the page interface data segment to be transmitted. The above process can transmit and process complex page data in real time and efficiently, thereby significantly improving the page loading speed and user experience quality, while also reducing the consumption of system resources.
[0059] The customized streaming data encapsulation format can optimize the data transmission and processing process through data segmentation, customized identification and format diversification, and provide strong performance guarantee for large-scale, high-concurrency Web applications. The customized streaming data encapsulation format includes but is not limited to: segment header identification, data segment content, etc., where the segment header identification can contain information such as the length, type or name of the data segment, so that the receiving end can predict the scale and purpose of the page interface data segment, thereby adjusting the receiving and processing strategy. The data segment content can adopt different formats according to the type of data segment, such as key-value string format (JSON), text format (TEXT), HTML fragment, etc. The selection of content format needs to consider the efficiency of data transmission and the processing convenience of the receiving end. Compared with general streaming transmission protocols (such as HTTP Chunked Transfer, WebSocket or SSE), the customized streaming data encapsulation format is more flexible and can more accurately match the needs of specific applications, such as the complex data structure and processing priority of Web search applications.
[0060] When the streaming interface transmission protocol is used to stream the page interface data segments, the streaming interface transmission protocol allows the sender to start transmission immediately when each page interface data segment is ready, and the receiver can process while receiving, instead of waiting for all data to be collected before processing, thereby more effectively managing and utilizing system resources, reducing delays, and improving processing efficiency. During the streaming transmission process, an error detection and processing mechanism can be set so that errors can be handled in a timely manner or fall back to the traditional data transmission method when data transmission errors occur. For example, the client needs to check the integrity and correctness of the page interface data segment. If an error occurs in the parsing, it needs to request retransmission of the page interface data segment.
[0061] Based on the above steps S31 to S32, by obtaining the page interface data segment to be transmitted, the page interface data segment adopts a customized streaming data encapsulation format, and then adopts a streaming interface transmission protocol to stream the page interface data segment, thereby realizing the streaming transmission of data, thereby improving the efficiency of data transmission and processing. The use of a streaming data encapsulation format can better organize and manage data, making data transmission more efficient and flexible. At the same time, the use of a streaming interface transmission protocol can ensure the security and stability of data, improve the performance of the entire system, and then the efficiency and reliability of page interface data transmission processing. Therefore, the data processing method in the embodiment of the present application allows different data to be continuously processed while being generated or received, rather than waiting for all data to be collected before processing, so that system resources can be more effectively managed and utilized, and delays can be reduced, thereby achieving the technical effect of saving system resources and improving processing efficiency, thereby solving the technical problem that the data processing method provided in the related art has large resource consumption and low processing efficiency.
[0062] The data processing method in the embodiment of the present application is further introduced below.
[0063] In an optional embodiment, multiple data fields are provided in the streaming data encapsulation format, wherein the multiple data fields include at least: a first data field, a second data field and a third data field, the first data field is used to determine the data content length of the page interface data segment, the second data field is used to determine the name of the page interface data segment, and the third data field is used to determine the specific data content contained in the page interface data segment.
[0064] In the streaming data encapsulation format, the design of multiple data fields can make data transmission more efficient and orderly, especially when processing complex and diverse page interface data segments. The setting of multiple data fields ensures that the receiving end can accurately parse and process each page interface data segment.
[0065] The first data field is used to determine the data content length of the page interface data segment. The first data field is usually located at the beginning of the page interface data segment. Its function is to inform the receiving end of the specific length of the page interface data segment to be received. The data content length can be an integer, represented by a specific number of bytes, such as 8 bits or longer to represent the data content length. The presence of the first data field enables the receiving end to determine when a page interface data segment ends, so that parsing and processing can be started immediately without waiting for the entire data stream to be received.
[0066] The second data field is used to determine the name of the page interface data segment. The data segment name field follows the data content length field and is used to identify the type or name of the page interface data segment. The second data field can be a string, usually occupying 8 bits to represent the name of the page interface data segment. The existence of the second data field enables the receiving end to adjust the processing strategy according to the name of the data segment, for example, immediately parse and display the head navigation bar data, or delay the processing of the search component data that is not on the first screen.
[0067] The third data field is used to determine the specific data content contained in the page interface data segment. This field contains the actual data content, and its format depends on the type of data segment. For example, the first screen SC data can be sent in the form of a TEXT string, while other data segments (such as the suffix resource file of the search result) can be sent in JSON format. The length of the specific data content field has been declared in the first data field, and the name has been declared in the second data field. The receiving end can accurately intercept and process the data based on the length information.
[0068] In addition, the streaming data encapsulation format may also include other fields for carrying additional metadata or control information, such as the format information of the data segment, encoding method, compression status, etc. The existence of these fields makes the streaming interface transmission protocol more flexible and able to adapt to different data types and transmission requirements.
[0069] In practical applications, the design of the encapsulation format of streaming data needs to take into account data transmission efficiency, processing convenience, and error recovery capabilities. For example, data fields can use compact binary encoding to reduce the transmission burden, while ensuring that the boundaries of data fields are clear so that the receiving end can accurately identify and parse each data segment. In addition, streaming data transmission may also include error detection codes or checksums to help the receiving end detect errors in data transmission and request retransmission. Through multiple data fields, the streaming interface transmission protocol can achieve efficient and orderly data transmission, significantly improving the performance and user experience of Web applications.
[0070] Based on the above optional embodiments, by setting a first data field for determining the length of the data content, a second data field for determining the name of the data segment, and a third data field containing the specific data content in the streaming data encapsulation format, efficient segmented transmission and instant processing of data are achieved, which significantly improves the Web page loading speed and user experience, while reducing the processing delay of the server and the client.
[0071] In an optional embodiment, the multiple data fields further include: a fourth data field, wherein the fourth data field is a currently idle spare field.
[0072] In the streaming data encapsulation format, by setting currently idle spare fields, space is reserved for metadata or control information that may need to be added in the future, further enhancing the scalability and flexibility of the data transmission protocol, allowing the transmission system to quickly adapt to new requirements or functions without having to make major modifications to the entire data transmission format, thereby improving the versatility and long-term maintainability of the transmission solution.
[0073] In an optional embodiment, the multiple data fields further include: a fourth data field, wherein the fourth data field is used to determine the data format of the page interface data segment.
[0074] The fourth data field can be used to determine the data format. If the fourth data field is a free field, the data format is determined according to the name of the page interface data segment in the second data field. In the streaming data encapsulation format, the fourth data field is used to determine the data format of the page interface data segment, thereby clearly specifying how each segment of data should be parsed and processed during the transmission process, enhancing the adaptability and processing efficiency of the streaming transmission protocol, and ensuring that the client can accurately adopt a better processing strategy for data in different formats, thereby further accelerating page loading and improving user experience.
[0075] In an optional embodiment, the first data field, the second data field, and the fourth data field all contain a fixed number of bits, and the third data field contains a variable number of bits.
[0076] In the streaming data encapsulation format, by setting the first data field, the second data field and the fourth data field to contain a fixed number of bits, and the third data field to contain a variable number of bits, the efficiency and flexibility of data transmission can be ensured. Specifically, the fixed-length field provides the ability to quickly locate and parse, allowing the receiving end to quickly determine the length, name and format of the data segment, while the variable-length third data field allows the data content to be dynamically adjusted according to actual needs, which not only supports the real-time processing of data, but also adapts to data transmission of different sizes, thereby achieving precise control and efficient use of data in streaming transmission.
[0077] For example, bits 1-8 of the page interface data segment represent the length of the data in this segment, bits 9-16 represent the name of this segment, bits 17-24 are currently idle spare fields, and bits 25-N represent the specific data content of this segment.
[0078] In an optional embodiment, the data format includes at least one of the following: a key-value pair string type, a text string type.
[0079] Specifically, a data format including at least a key-value string type and a text string type is adopted, so that the streaming data transmission scheme can flexibly adapt to different data processing requirements. The key-value string type is suitable for the transmission of structured data, which is convenient for the client to parse and quickly access specific data items. It is particularly suitable for fast positioning and processing of data that needs to be displayed or processed immediately, such as the server-side rendering product of the first screen SC. The text string type is suitable for the transmission of data that directly displays content such as unstructured or HTML, which can avoid unnecessary JSON parsing process and be directly used for page rendering to improve performance.
[0080] By supporting a variety of data formats, it can ensure the efficiency and pertinence of data transmission, so that each piece of data can be transmitted in the format that best suits its usage scenario. At the same time, it reduces data processing delays and provides users with a faster and smoother web page loading experience.
[0081] In an optional embodiment, in step S32, using the streaming interface transmission protocol to stream the page interface data segment includes:
[0082] Step S321, obtaining the data priority and / or response time corresponding to the page interface data segment, wherein the data priority is used to determine the transmission order and transmission timing of the page interface data segment, and the response time is used to determine the time taken to obtain the page interface data segment;
[0083] Step S322: Stream the page interface data segment through a streaming interface transmission protocol according to data priority and / or response duration.
[0084] Specifically, data priority is used to determine the transmission order and timing of page interface data segments, that is, high-priority data will be transmitted and processed first, such as first-screen content, key signals, etc., to ensure that users can see the main content of the page as soon as possible and improve user experience. In the data generation stage, a data priority can be assigned to the page interface data segment based on its importance and urgency.
[0085] The response time is used to evaluate the time it takes to obtain each piece of data. Real-time feedback on the response time can be used to adjust the transmission strategy and avoid the accumulation of data processing delays. This is crucial for dynamically adjusting data transmission strategies, optimizing system resource allocation, and troubleshooting.
[0086] Streaming the page interface data segments through the streaming interface transmission protocol according to data priority and / or response time can reduce latency, avoid multi-task accumulation, etc. Dynamically adjust resource allocation, such as CPU and network resources, according to response time and data priority to ensure that resources are used efficiently, especially when processing high-priority data.
[0087] In an optional embodiment, the data processing method in the embodiment of the present application further includes:
[0088] Obtaining a time interval through a streaming interface corresponding to a streaming interface transmission protocol, wherein the time interval is determined by the time consumption of a lower layer dependent service corresponding to the page interface data segment, or the time interval data is determined by a preset delay;
[0089] The selected tasks other than the tasks corresponding to the page interface data segment are scheduled within the time interval.
[0090] Specifically, each page interface data segment has its own specific underlying dependent services, such as database queries, third-party API calls, etc. The time consumption of these services directly determines the generation time of the page interface data segment. In streaming transmission, after a segment of data is sent, the system will determine the sending time of the next segment of data based on the time consumption prediction or actual time consumption of the underlying service. This time interval is the natural waiting time between page interface data segments. For example, the first screen content relies on fast-responding local resources, while subsequent content needs to be obtained from a remote server, which takes longer. Therefore, the transmission time interval between the first screen content and subsequent content will be determined based on the actual remote service time consumption.
[0091] In addition to relying on the actual time consumption, the system can also preset a certain time interval based on service requirements. The preset delay can be used to achieve a better user experience or resource allocation. For example, a short delay can be arranged between data segments to avoid excessive resource consumption, or to allow the system time to process other tasks and achieve balanced scheduling of multiple tasks.
[0092] After determining the time interval, selected tasks other than the tasks corresponding to the page interface data segment can be scheduled within the time interval. During the waiting time for data segment transmission, other non-critical tasks can be scheduled, such as background data synchronization, cache update, etc., to make full use of idle time and avoid idle resources. In addition, time intervals are used to process some non-page data tasks that affect user experience, such as preloading of user personalized recommendations, which does not affect the page loading speed and can provide a more personalized experience when users need it. By distributing processing tasks, the system can better cope with sudden traffic and resource bottlenecks, and enhance its adaptability to complex network environments.
[0093] Based on the above optional embodiment, by acquiring time intervals through a streaming interface corresponding to a streaming interface transmission protocol and scheduling other tasks within these intervals, resource usage can be optimized and user experience can be improved.
[0094] In an optional embodiment, the streaming interface transmission protocol is a byte stream interface transmission protocol.
[0095] Specifically, the streaming interface transmission protocol is concretized as a byte stream interface transmission protocol, that is, data can be divided into a series of byte streams for transmission, rather than the traditional whole block data or file transmission method. The byte stream interface transmission protocol has significant advantages in processing large amounts of complex data.
[0096] Since the data is divided into byte streams, the receiving end can instantly receive part of the data and start processing without waiting for all the data to arrive, which provides strong support for scenarios with high real-time requirements, such as the rapid display of search engine results. Byte stream transmission allows the system to dynamically allocate processing power according to the resource requirements of the current task. For example, during data stream transmission, the first screen content can be processed and displayed first, while subsequent data is processed in the background, effectively avoiding idle waste of resources. In byte stream transmission, data errors can be quickly located and processed because errors are usually limited to a single or a few bytes, rather than an entire data block, thereby improving the fault tolerance of the system and ensuring the stability of the service and the integrity of user data.
[0097] Based on the above optional embodiments, the use of the byte stream interface transmission protocol can ensure the fast and efficient transmission of the page interface data segments, thereby optimizing the display speed of search results and user experience. The flexibility and scalability of the byte stream interface transmission protocol also provide technical guarantees for the continuous optimization and functional enhancement of the system.
[0098] The following uses a Web search application scenario as an example to illustrate the data processing method in the embodiment of the present application.
[0099] Figure 4 is a schematic diagram of a data processing method according to an embodiment of the present application, such as Figure 4As shown, the page interface data segments to be transmitted are streamed through the byte stream interface transmission protocol to optimize data processing and improve user experience. The following is a summary and description of each data segment and its function:
[0100] Head public resource data (JSON format): This segment contains real-time data, which has a short dependency time and quick service response. Given its versatility and quick acquisition, this segment of data can be sent first to ensure that users can immediately obtain basic public resource files and data required for subsequent processes in AI search. By completing the transmission of Head data at an early stage, user device resources can be reasonably utilized without affecting the reception and processing of subsequent data segments, achieving dual optimization of performance and experience.
[0101] Operation SC image deep prefetching (JSON format): As the second piece of data, its main function is to prefetch the relevant image resources of the operation SC on the page in advance. Through the deep prefetching mechanism, it ensures that these images can be quickly loaded by the UNET layer, reducing the waiting time for future display.
[0102] Operation SC server rendering product (TEXT string): The third segment of data is used to quickly display the real-time content of the operation SC. It does not rely on the complex processing of the search aggregation (Agg) link, so the interface response time is significantly shortened. The use of streaming transmission allows this part of the data to be delivered independently and preferentially, thereby achieving early rendering and display of page content and improving the immediacy of user browsing.
[0103] First screen SC / SGS image deep pre-fetching (JSON format): The fourth data segment also uses deep pre-fetching technology to pre-fetch the first screen SC and SGS image resources. By preparing these visual elements in advance, the system can ensure that the first screen content is displayed quickly when the page is loaded, avoiding user waiting and enhancing the smoothness of visual presentation.
[0104] Agg result public JSON data (JSON format): The fifth section of data focuses on providing relevant information such as the status of the Agg result, signal judgment, and the public data required for the mutually exclusive logic of the processing link. The transmission of this part of data ensures that the client can reasonably arrange the subsequent page content loading and display based on the received signal and status, avoiding unnecessary data conflicts or repeated loading.
[0105] Offline SGS server-side rendering product (TEXT string): The sixth segment of data is the rendering product of offline SGS. Its transmission is based on the judgment of SGS signals, providing users with data support in offline or low-network environments, ensuring stable display of page content, and providing users with basic search results display even in poor signal conditions.
[0106] First screen SC server-side rendering product (TEXT string): The seventh segment of data carries the final rendering product of the first screen SC, which is sent in the form of a TEXT string, which is convenient for the client to use directly, avoiding additional data format conversion and further optimizing the page loading speed.
[0107] Non-first-screen SC rendering and related resource file data (JSON format): The eighth section of data covers the rendering data of non-first-screen SC and the suffix resource files of the first-screen SC. These data are usually loaded when the user starts to scroll the page or request additional information. Transmission in JSON format ensures the structure and ease of processing of data, facilitates on-demand slicing and rendering by the client, reduces resource waste, and improves the loading efficiency and performance of the overall page.
[0108] There are obvious time intervals between several data segments, that is, dark areas, for example, between the Head segment and the Operation SC segment, between the Operation SC and the First Screen SC, or between the First Screen SC segment and the Non-First Screen SC segment. Some of these time intervals are determined by the time taken by the underlying service of each data segment, and some are artificially delayed. Using time intervals to perform idle operations can effectively avoid multi-task accumulation processing.
[0109] The above-mentioned streaming strategy can effectively solve the delay and resource optimization problems faced in traditional data loading, realize timely and efficient data processing, improve the performance experience of AI search in search applications, and ensure that users can obtain smooth and instant information display during the search process.
[0110] Figure 5 is a schematic diagram of another data processing method according to an embodiment of the present application, such as Figure 5 As shown, the method comprises the following steps:
[0111] Step S51, obtaining a page interface data segment to be transmitted, wherein the page interface data segment adopts a self-defined streaming data encapsulation format;
[0112] Step S52, obtaining the data priority and / or response time corresponding to the page interface data segment, wherein the data priority is used to determine the transmission order and transmission timing of the page interface data segment, and the response time is used to determine the time taken to obtain the page interface data segment;
[0113] Step S53, streaming the page interface data segment through a streaming interface transmission protocol according to data priority and / or response duration;
[0114] Step S54, receiving the page interface data segment in a streaming manner through a streaming interface transmission protocol;
[0115] Step S55, performing real-time data processing on the received page interface data segment.
[0116] Based on the above optional embodiments, a streaming interface transmission protocol is used to transmit and process complex interface data of the page, so as to allow different data to be processed continuously while being generated or received, rather than waiting for all data to be collected before processing. This can more effectively manage and utilize system resources, reduce delays, and improve processing efficiency.
[0117] Compared with the solution of splitting multiple interfaces, the data processing method in the embodiment of the present application adopts streaming interface transmission, and the data that originally needs to be transmitted through multiple independent interfaces is transmitted through a single streaming interface in an orderly and segmented form, which not only simplifies the work of interface maintenance and reduces the complexity of the system, but also effectively saves server resources and improves the overall operating efficiency and cost-effectiveness. For BigPipe or SSR+ streaming transmission schemes, the embodiment of the present application focuses more on the optimization of the interface and API level. BigPipe and SSR+ streaming transmission pay more attention to the efficient loading and rendering strategies of the front-end pages, while the application embodiment goes deep into the underlying protocol of data transmission, and realizes the real-time processing and efficient transmission of data through the byte stream interface transmission protocol, ensuring that key information can be quickly presented to the user and improving the user experience. Compared with standard streaming interface schemes such as WebSocket, SSE (Server-Sent Events) and HTTP Chunked Transfer, each segment of data is allowed to customize the name and format, and the data length is clearly marked, which not only improves the efficiency of data processing, but also makes the data transmission and receiving process more reasonable and efficient, and better adapts to the specific needs of search application AI search.
[0118] The embodiment of the present application adopts the byte stream interface transmission protocol to stream the page data in segments, which greatly improves the timeliness and efficiency of data processing. By subdividing multiple independent page interface data segments, it is possible to start processing at the same time as the data segment is generated or received, without waiting for all data to arrive completely, thereby realizing the instant rendering of different types of modules or scene data. In addition, each segment of data can not only define its data type on demand, such as JSON, TEXT, etc., but also has an independent name and a clear length mark, which avoids unnecessary data parsing and processing, and significantly improves the pertinence and efficiency of data processing. The data segmentation mechanism in the embodiment of the present application also allows the transmission order to be dynamically adjusted according to priority, optimizes the allocation of system resources, ensures the rapid processing of key data, and provides a more reasonable execution time for non-critical tasks. By setting the scalability of the protocol, it can flexibly adapt to the dynamic changes of interface data, and enhance processing capabilities and optimize performance by adding, deleting and modifying data segments. Finally, the independent generation, transmission and processing characteristics of each data segment effectively avoid mutual interference between data and ensure the purity and accuracy of data processing.
[0119] Figure 6 is a flow chart of another data processing method according to an embodiment of the present application, such as Figure 6 As shown, the method comprises the following steps:
[0120] Step S61, receiving the page interface data segment in a streaming manner through a streaming interface transmission protocol, wherein the page interface data segment adopts a self-defined streaming data encapsulation format;
[0121] Step S62: Perform real-time data processing on the received page interface data segment.
[0122] Based on the above steps S61 to S62, the page interface data segment is streamed and received by the streaming interface transmission protocol, which can realize real-time transmission and processing of data, reduce the delay of data transmission, and improve the real-time and accuracy of data. At the same time, the use of a customized streaming data encapsulation format can better manage and process data, and improve the efficiency and reliability of data processing. Therefore, the data processing method in the embodiment of the present application allows different data to be continuously processed while being generated or received, rather than waiting for all data to be collected before processing, so that system resources can be managed and utilized more effectively, and delays can be reduced, thereby achieving the technical effect of saving system resources and improving processing efficiency, and then solving the technical problem that the data processing method provided in the related art has large resource consumption and low processing efficiency.
[0123] Figure 7 is a flow chart of another data processing method according to an embodiment of the present application, such as Figure 7 As shown, the method comprises the following steps:
[0124] Step S71, streaming receiving the live video data segment through a streaming interface transmission protocol, wherein the live video data segment adopts a custom streaming data encapsulation format;
[0125] Step S72, decoding the received live video data segment in real time to obtain decoded data;
[0126] Step S73, rendering and playing the decoded data in real time.
[0127] Based on the above steps S71 to S73, the live video data segment is streamed and received through the streaming interface transmission protocol, and the live video data segment adopts a customized streaming data encapsulation format, and then the received live video data segment is decoded in real time to obtain the decoded data, and finally the decoded data is rendered and played in real time, thereby realizing the streaming transmission and real-time decoding and playback of the live video data, and efficient live video transmission and viewing experience can be achieved. Streaming transmission can ensure the real-time and continuity of video data, while real-time decoding and rendering can allow users to watch live content in real time, improving user experience. Therefore, the data processing method in the embodiment of the present application allows different data to be continuously processed while being generated or received, rather than waiting for all data to be collected before processing, so that system resources can be managed and utilized more effectively, and delays can be reduced, thereby achieving the technical effect of saving system resources and improving processing efficiency, and thus solving the technical problems of large resource consumption and low processing efficiency in the data processing method provided in the related technology.
[0128] Figure 8 is a flow chart of another data processing method according to an embodiment of the present application, such as Figure 8 As shown, the method comprises the following steps:
[0129] Step S81, obtaining a data processing request through a first application programming interface, wherein the data processing request is used to request streaming transmission of a page interface data segment through a streaming interface transmission protocol, and the page interface data segment adopts a custom streaming data encapsulation format;
[0130] Step S82, returning a data processing response through the second application programming interface, wherein the response data carried in the data processing response includes: a page interface data segment.
[0131] Based on the above steps S81 to S82, a data processing request is obtained through the first application programming interface, and the data processing request is used to request streaming transmission of the page interface data segment through the streaming interface transmission protocol. The page interface data segment adopts a customized streaming data encapsulation format, and then returns a data processing response through the second application programming interface. The response data carried in the data processing response includes: the page interface data segment, thereby realizing the streaming transmission of data, thereby improving the efficiency of data transmission and processing. The use of the streaming data encapsulation format can better organize and manage data, making data transmission more efficient and flexible. At the same time, the use of the streaming interface transmission protocol can ensure the security and stability of data, improve the overall performance of the system, and then the efficiency and reliability of page interface data transmission processing. Therefore, the data processing method in the embodiment of the present application allows different data to be continuously processed while being generated or received, rather than waiting for all data to be collected before processing, so that system resources can be managed and utilized more effectively, and delays can be reduced, thereby achieving the technical effect of saving system resources and improving processing efficiency, thereby solving the technical problems of large resource consumption and low processing efficiency in the data processing method provided in the related art.
[0132] The first application programming interface and the second application programming interface may be the same application programming interface or different application programming interfaces. In an optional embodiment, the interface parameters in the first application programming interface and the second application programming interface may include but are not limited to: interface global identifier, interface signature key, interface timestamp, interface request identifier, system call credential identifier, etc. The first application programming interface may use GET or POST as the interface request method to obtain the data processing request. The second application programming interface may use JSON format to feedback the data processing response.
[0133] Fig. 9 is a flow chart of another data processing method according to an embodiment of the present application, such as Fig. 9 As shown, the method comprises the following steps:
[0134] Step S91, obtaining a currently input data processing session request, wherein the data processing session request is used to request streaming transmission of a page interface data segment through a streaming interface transmission protocol, and the page interface data segment adopts a self-defined streaming data encapsulation format;
[0135] Step S92, in response to the data processing dialogue request, returning a data processing dialogue reply, wherein the information carried in the data processing dialogue reply includes: target data content, the target data content is obtained by performing real-time data processing on the page interface data segment;
[0136] Step S93: display the target data content in the graphical user interface.
[0137] Based on the above steps S91 to S93, by obtaining the currently input data processing dialogue request, the data processing dialogue request is used to request streaming transmission of the page interface data segment through the streaming interface transmission protocol, and the page interface data segment adopts a customized streaming data encapsulation format, and then responds to the data processing dialogue request, and returns a data processing dialogue reply. The information carried in the data processing dialogue reply includes: target data content, the target data content is obtained by real-time data processing of the page interface data segment, and finally the target data content is displayed in the graphical user interface, thereby realizing the streaming transmission of data, thereby improving the efficiency of data transmission and processing. The use of a streaming data encapsulation format can better organize and manage data, making data transmission more efficient and flexible. At the same time, the use of a streaming interface transmission protocol can ensure the security and stability of data, improve the overall performance of the system, and thus the efficiency and reliability of page interface data transmission and processing. Therefore, the data processing method in the embodiment of the present application allows different data to be processed continuously while being generated or received, rather than waiting for all data to be collected before processing, thereby more effectively managing and utilizing system resources and reducing delays, thereby achieving the technical effect of saving system resources and improving processing efficiency, and further solving the technical problems of high resource consumption and low processing efficiency in the data processing method provided in the related technology.
[0138] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0139] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0140] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD), including several instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0141] According to an embodiment of the present application, a data processing device for implementing the above data processing method is also provided. Fig.10 is a structural block diagram of a data processing device according to an embodiment of the present application, such as Fig.10 As shown, the device comprises:
[0142] The acquisition module 1001 is used to acquire the page interface data segment to be transmitted, wherein the page interface data segment adopts a self-defined stream data encapsulation format;
[0143] The transmission module 1002 is used to perform streaming transmission on the page interface data segment using a streaming interface transmission protocol.
[0144] Optionally, multiple data fields are set in the streaming data encapsulation format, wherein the multiple data fields include at least: a first data field, a second data field and a third data field, the first data field is used to determine the data content length of the page interface data segment, the second data field is used to determine the name of the page interface data segment, and the third data field is used to determine the specific data content contained in the page interface data segment.
[0145] Optionally, the multiple data fields further include: a fourth data field, wherein the fourth data field is a currently idle spare field.
[0146] Optionally, the multiple data fields further include: a fourth data field, wherein the fourth data field is used to determine the data format of the page interface data segment.
[0147] Optionally, the first data field, the second data field and the fourth data field each contain a fixed number of bits, and the third data field contains a variable number of bits.
[0148] Optionally, the data format includes at least one of the following: a key-value pair string type, a text string type.
[0149] Optionally, the transmission module 1002 is also used to: obtain the data priority and / or response time corresponding to the page interface data segment, wherein the data priority is used to determine the transmission order and transmission timing of the page interface data segment, and the response time is used to determine the time required to obtain the page interface data segment; according to the data priority and / or response time, the page interface data segment is streamed through the streaming interface transmission protocol.
[0150] Optionally, the acquisition module 1001 is also used to obtain a time interval through a streaming interface corresponding to a streaming interface transmission protocol, wherein the time interval is determined by the time consumption of a lower-layer dependent service corresponding to the page interface data segment, or the time interval data is determined by a preset delay; the data processing device also includes: a scheduling module 1003, used to schedule selected tasks other than tasks corresponding to the page interface data segment within the time interval.
[0151] Optionally, the streaming interface transmission protocol is a byte stream interface transmission protocol.
[0152] It should be noted that the acquisition module 1001 and the transmission module 1002 correspond to steps S31 to S32 in the embodiment, and the examples and application scenarios implemented by the two modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above embodiment. It should be noted that the above modules or units can be hardware components or software components stored in a memory and processed by one or more processors, and the above modules can also be run in a computer terminal provided in the embodiment as part of the device.
[0153] Fig.11 is a structural block diagram of another data processing device according to an embodiment of the present application, such as Fig.11 As shown, the device comprises:
[0154] The receiving module 1101 is used to stream the page interface data segment through the streaming interface transmission protocol, wherein the page interface data segment adopts a self-defined streaming data encapsulation format;
[0155] The processing module 1102 is used to perform real-time data processing on the received page interface data segment.
[0156] It should be noted that the receiving module 1101 and the processing module 1102 correspond to steps S61 to S62 in the embodiment, and the examples and application scenarios implemented by the two modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above embodiment. It should be noted that the above modules or units can be hardware components or software components stored in a memory and processed by one or more processors, and the above modules can also be run in a computer terminal provided in the embodiment as part of the device.
[0157] Fig.12 is a structural block diagram of another data processing device according to an embodiment of the present application, such as Fig.12 As shown, the device comprises:
[0158] The receiving module 1201 is used to stream the live video data segment through a streaming interface transmission protocol, wherein the live video data segment adopts a custom streaming data encapsulation format;
[0159] The decoding module 1202 is used to decode the received live video data segment in real time to obtain decoded data;
[0160] The processing module 1203 is used to render and play the decoded data in real time.
[0161] It should be noted that the receiving module 1201, the decoding module 1202 and the processing module 1203 correspond to steps S71 to S73 in the embodiment, and the three modules and the corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in the above embodiment. It should be noted that the above modules or units can be hardware components or software components stored in a memory and processed by one or more processors, and the above modules can also be run in a computer terminal provided in the embodiment as part of the device.
[0162] Fig.13 is a structural block diagram of another data processing device according to an embodiment of the present application, such as Fig.13 As shown, the device comprises:
[0163] An acquisition module 1301 is used to acquire a data processing request through a first application programming interface, wherein the data processing request is used to request streaming transmission of a page interface data segment through a streaming interface transmission protocol, and the page interface data segment adopts a custom streaming data encapsulation format;
[0164] The return module 1302 is used to return a data processing response through the second application programming interface, wherein the response data carried in the data processing response includes: a page interface data segment.
[0165] It should be noted that the acquisition module 1301 and the return module 1302 correspond to steps S81 to S82 in the embodiment, and the examples and application scenarios implemented by the two modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above embodiment. It should be noted that the above modules or units can be hardware components or software components stored in a memory and processed by one or more processors, and the above modules can also be run in a computer terminal provided in the embodiment as part of the device.
[0166] Fig.14is a structural block diagram of another data processing device according to an embodiment of the present application, such as Fig.14 As shown, the device comprises:
[0167] The acquisition module 1401 is used to acquire the currently input data processing session request, wherein the data processing session request is used to request streaming transmission of the page interface data segment through the streaming interface transmission protocol, and the page interface data segment adopts a self-defined streaming data encapsulation format;
[0168] The return module 1402 is used to respond to the data processing dialogue request and return a data processing dialogue reply, wherein the information carried in the data processing dialogue reply includes: target data content, which is obtained by performing real-time data processing on the page interface data segment;
[0169] The display module 1403 is used to display the target data content in the graphical user interface.
[0170] It should be noted that the acquisition module 1401, the return module 1402 and the display module 1403 correspond to steps S91 to S93 in the embodiment, and the three modules and the corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in the above embodiment. It should be noted that the above modules or units can be hardware components or software components stored in a memory and processed by one or more processors, and the above modules can also be run in a computer terminal provided in the embodiment as part of the device.
[0171] An embodiment of the present application can provide a data processing system, including: a sending device and a receiving device; the sending device is used to obtain a page interface data segment to be transmitted, and to stream the page interface data segment using a streaming interface transmission protocol, wherein the page interface data segment uses a customized streaming data encapsulation format; the receiving device is used to stream the page interface data segment through the streaming interface transmission protocol, and to perform real-time data processing on the received page interface data segment.
[0172] The embodiment of the present application may provide a computer terminal, which may be any computer terminal device in a computer terminal group. Optionally, in this embodiment, the computer terminal may also be replaced by a terminal device such as a mobile terminal.
[0173] Optionally, in this embodiment, the computer terminal may be located in at least one network device among a plurality of network devices of the computer network.
[0174] In this embodiment, the above-mentioned computer terminal can execute the program code of the following steps in the data processing method: obtaining the page interface data segment to be transmitted, wherein the page interface data segment adopts a customized streaming data encapsulation format; and streamingly transmitting the page interface data segment using a streaming interface transmission protocol.
[0175] Optionally, Fig.15 is a structural block diagram of a computer terminal according to an embodiment of the present application. Fig.15 As shown, the computer terminal may include: one or more (only one is shown in the figure) processors 152, a memory 154, a storage controller, and a peripheral interface, wherein the peripheral interface is connected to a radio frequency module, an audio module, and a display.
[0176] Among them, the memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the data processing method and device in the embodiment of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned data processing method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0177] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: obtain the page interface data segment to be transmitted, wherein the page interface data segment adopts a customized streaming data encapsulation format; and stream the page interface data segment using a streaming interface transmission protocol.
[0178] Optionally, multiple data fields are set in the streaming data encapsulation format, wherein the multiple data fields include at least: a first data field, a second data field and a third data field, the first data field is used to determine the data content length of the page interface data segment, the second data field is used to determine the name of the page interface data segment, and the third data field is used to determine the specific data content contained in the page interface data segment.
[0179] Optionally, the multiple data fields further include: a fourth data field, wherein the fourth data field is a currently idle spare field.
[0180] Optionally, the multiple data fields further include: a fourth data field, wherein the fourth data field is used to determine the data format of the page interface data segment.
[0181] Optionally, the first data field, the second data field and the fourth data field each contain a fixed number of bits, and the third data field contains a variable number of bits.
[0182] Optionally, the data format includes at least one of the following: a key-value pair string type, a text string type.
[0183] Optionally, the processor may also execute the program code of the following steps: obtaining the data priority and / or response time corresponding to the page interface data segment, wherein the data priority is used to determine the transmission order and transmission timing of the page interface data segment, and the response time is used to determine the time taken to obtain the page interface data segment; and streaming the page interface data segment through a streaming interface transmission protocol according to the data priority and / or response time.
[0184] Optionally, the processor may also execute the program code of the following steps: obtaining a time interval through a streaming interface corresponding to a streaming interface transmission protocol, wherein the time interval is determined by the time consumption of a lower-layer dependent service corresponding to a page interface data segment, or the time interval data is determined by a preset delay; and scheduling selected tasks other than tasks corresponding to the page interface data segment within the time interval.
[0185] Optionally, the streaming interface transmission protocol is a byte stream interface transmission protocol.
[0186] Optionally, the processor may also execute the following program code: streaming receiving the page interface data segment through a streaming interface transmission protocol, wherein the page interface data segment adopts a customized streaming data encapsulation format; and performing real-time data processing on the received page interface data segment.
[0187] Optionally, the processor may also execute the program code of the following steps: streaming the live video data segments through a streaming interface transmission protocol, wherein the live video data segments adopt a custom streaming data encapsulation format; performing instant video data decoding on the received live video data segments to obtain decoded data; and performing real-time rendering and playback on the decoded data.
[0188] Optionally, the processor may also execute the program code of the following steps: obtaining a data processing request through a first application programming interface, wherein the data processing request is used to request streaming transmission of a page interface data segment through a streaming interface transmission protocol, and the page interface data segment adopts a custom streaming data encapsulation format; returning a data processing response through a second application programming interface, wherein the response data carried in the data processing response includes: a page interface data segment.
[0189] Optionally, the processor may also execute the following program code: obtaining a currently input data processing conversation request, wherein the data processing conversation request is used to request streaming transmission of a page interface data segment through a streaming interface transmission protocol, and the page interface data segment adopts a custom streaming data encapsulation format; in response to the data processing conversation request, returning a data processing conversation reply, wherein the information carried in the data processing conversation reply includes: target data content, the target data content is obtained by real-time data processing of the page interface data segment; and displaying the target data content in a graphical user interface.
[0190] By adopting the embodiment of the present application, by obtaining the page interface data segment to be transmitted, the page interface data segment adopts a customized streaming data encapsulation format, and then adopts the streaming interface transmission protocol to stream the page interface data segment, thereby realizing the streaming transmission of data, thereby improving the efficiency of data transmission and processing. The use of the streaming data encapsulation format can better organize and manage data, making data transmission more efficient and flexible. At the same time, the use of the streaming interface transmission protocol can ensure the security and stability of data, improve the performance of the overall system, and then the efficiency and reliability of page interface data transmission processing. Therefore, the data processing method in the embodiment of the present application allows different data to be continuously processed while being generated or received, rather than waiting for all data to be collected before processing, so that system resources can be more effectively managed and utilized, and delays can be reduced, thereby achieving the technical effect of saving system resources and improving processing efficiency, thereby solving the technical problem that the data processing method provided in the related art has large resource consumption and low processing efficiency.
[0191] It can be understood by those skilled in the art that Fig.15 The structure shown is for illustration only, and the computer terminal may also be a terminal device such as a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, and a mobile Internet device (Mobile Internet Devices, MID). Fig.15 It does not limit the structure of the above electronic device. For example, the computer terminal may also include Fig.15 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Fig.15 Different configurations are shown.
[0192] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0193] The embodiment of the present application also provides a computer-readable storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the data processing method provided by the above embodiment.
[0194] Optionally, in this embodiment, the above storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.
[0195] Optionally, in this embodiment, the storage medium is configured to store program code for executing the following steps: obtaining a page interface data segment to be transmitted, wherein the page interface data segment adopts a custom streaming data encapsulation format; and streaming the page interface data segment using a streaming interface transmission protocol.
[0196] Optionally, multiple data fields are set in the streaming data encapsulation format, wherein the multiple data fields include at least: a first data field, a second data field and a third data field, the first data field is used to determine the data content length of the page interface data segment, the second data field is used to determine the name of the page interface data segment, and the third data field is used to determine the specific data content contained in the page interface data segment.
[0197] Optionally, the multiple data fields further include: a fourth data field, wherein the fourth data field is a currently idle spare field.
[0198] Optionally, the multiple data fields further include: a fourth data field, wherein the fourth data field is used to determine the data format of the page interface data segment.
[0199] Optionally, the first data field, the second data field and the fourth data field each contain a fixed number of bits, and the third data field contains a variable number of bits.
[0200] Optionally, the data format includes at least one of the following: a key-value pair string type, a text string type.
[0201] Optionally, the computer-readable storage medium is also configured to store program code for performing the following steps: obtaining data priority and / or response time corresponding to the page interface data segment, wherein the data priority is used to determine the transmission order and transmission timing of the page interface data segment, and the response time is used to determine the time required to obtain the page interface data segment; and streaming the page interface data segment through a streaming interface transmission protocol according to the data priority and / or response time.
[0202] Optionally, the computer-readable storage medium is also configured to store program code for performing the following steps: obtaining a time interval through a streaming interface corresponding to a streaming interface transmission protocol, wherein the time interval is determined by the time consumption of a lower-layer dependent service corresponding to a page interface data segment, or the time interval data is determined by a preset delay; and scheduling selected tasks other than tasks corresponding to the page interface data segment within the time interval.
[0203] Optionally, the streaming interface transmission protocol is a byte stream interface transmission protocol.
[0204] Optionally, the computer-readable storage medium is also configured to store program code for executing the following steps: streaming receiving the page interface data segments through a streaming interface transmission protocol, wherein the page interface data segments adopt a customized streaming data encapsulation format; and performing real-time data processing on the received page interface data segments.
[0205] Optionally, the computer-readable storage medium is also configured to store program codes for executing the following steps: streaming the live video data segments through a streaming interface transmission protocol, wherein the live video data segments use a custom streaming data encapsulation format; performing instant video data decoding on the received live video data segments to obtain decoded data; and performing real-time rendering and playback on the decoded data.
[0206] Optionally, the computer-readable storage medium is also configured to store program code for performing the following steps: obtaining a data processing request through a first application programming interface, wherein the data processing request is used to request streaming transmission of a page interface data segment through a streaming interface transmission protocol, and the page interface data segment adopts a custom streaming data encapsulation format; returning a data processing response through a second application programming interface, wherein the response data carried in the data processing response includes: the page interface data segment.
[0207] Optionally, the computer-readable storage medium is also configured to store program code for executing the following steps: obtaining a currently input data processing conversation request, wherein the data processing conversation request is used to request streaming transmission of a page interface data segment via a streaming interface transmission protocol, and the page interface data segment adopts a custom streaming data encapsulation format; in response to the data processing conversation request, returning a data processing conversation reply, wherein the information carried in the data processing conversation reply includes: target data content, the target data content is obtained by performing real-time data processing on the page interface data segment; and displaying the target data content in a graphical user interface.
[0208] The embodiment of the present application further provides a computer program product. Optionally, in this embodiment, the computer program product may include a computer program, and the computer program implements the method provided in the embodiment when executed by a processor.
[0209] The embodiments of the present application also provide a computer program product. Optionally, the computer program product may include a non-volatile computer-readable storage medium, which may be used to store a computer program, and when the computer program is executed by a processor, the method provided in the embodiments is implemented.
[0210] The embodiment of the present application further provides a computer program. Optionally, in this embodiment, when the computer program is executed by a processor, the method provided in the above embodiment is implemented.
[0211] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0212] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0213] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0214] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0215] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0216] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.
[0217] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A data processing method, characterized in that: include: Acquire a page interface data segment to be transmitted, wherein the page interface data segment adopts a self-defined streaming data encapsulation format; The page interface data segment is streamed using a streaming interface transmission protocol.
2. The data processing method according to claim 1, characterized in that: A plurality of data fields are provided in the streaming data encapsulation format, wherein the plurality of data fields include at least: a first data field, a second data field and a third data field, wherein the first data field is used to determine the data content length of the page interface data segment, the second data field is used to determine the name of the page interface data segment, and the third data field is used to determine the specific data content contained in the page interface data segment.
3. The data processing method according to claim 2, characterized in that: The multiple data fields further include: a fourth data field, wherein the fourth data field is a currently idle spare field.
4. The data processing method according to claim 2, characterized in that: The multiple data fields further include: a fourth data field, wherein the fourth data field is used to determine the data format of the page interface data segment.
5. The data processing method according to claim 4, characterized in that: The first data field, the second data field and the fourth data field each contain a fixed number of bits, and the third data field contains a variable number of bits.
6. The data processing method according to claim 4, characterized in that: The data format includes at least one of the following: a key-value pair string type, a text string type.
7. The data processing method according to claim 1, characterized in that: The step of using the streaming interface transmission protocol to stream the page interface data segment includes: Obtaining data priority and / or response duration corresponding to the page interface data segment, wherein the data priority is used to determine the transmission order and transmission timing of the page interface data segment, and the response duration is used to determine the duration experienced in obtaining the page interface data segment; The page interface data segment is streamed via the streaming interface transmission protocol according to the data priority and / or the response duration.
8. The data processing method according to claim 1, characterized in that: The data processing method further includes: Acquire a time interval through a streaming interface corresponding to the streaming interface transmission protocol, wherein the time interval is determined by the time consumption of a lower layer dependent service corresponding to the page interface data segment, or the time interval data is determined by a preset delay; The selected tasks other than the tasks corresponding to the page interface data segment are scheduled within the time interval.
9. The data processing method according to claim 1, characterized in that: The streaming interface transmission protocol is a byte stream interface transmission protocol.
10. A data processing method, characterized in that: include: Streaming the page interface data segment through a streaming interface transmission protocol, wherein the page interface data segment adopts a self-defined streaming data encapsulation format; Perform real-time data processing on the received page interface data segment.
11. A data processing method, characterized in that: include: Streaming the live video data segment through a streaming interface transmission protocol, wherein the live video data segment adopts a custom streaming data encapsulation format; Performing instant video data decoding on the received live video data segment to obtain decoded data; The decoded data is rendered and played in real time.
12. A data processing method, characterized in that: include: Obtaining a data processing request through a first application programming interface, wherein the data processing request is used to request streaming transmission of a page interface data segment through a streaming interface transmission protocol, and the page interface data segment adopts a custom streaming data encapsulation format; A data processing response is returned through the second application programming interface, wherein the response data carried in the data processing response includes: the page interface data segment.
13. A data processing method, characterized in that: include: Acquire a currently input data processing session request, wherein the data processing session request is used to request streaming transmission of a page interface data segment through a streaming interface transmission protocol, and the page interface data segment adopts a self-defined streaming data encapsulation format; In response to the data processing dialogue request, a data processing dialogue reply is returned, wherein the information carried in the data processing dialogue reply includes: target data content, the target data content is obtained by performing real-time data processing on the page interface data segment; The target data content is displayed in a graphical user interface.
14. A data processing system, characterized in that: include: Transmitter device and receiver device; The sending end device is used to obtain the page interface data segment to be transmitted, and to stream the page interface data segment using a streaming interface transmission protocol, wherein the page interface data segment uses a custom streaming data encapsulation format; The receiving end device is used to stream-receive the page interface data segments through the streaming interface transmission protocol, and to perform real-time data processing on the received page interface data segments.
15. An electronic device, characterized in that: include: A memory storing an executable program; A processor, used to run the program, wherein the program executes the data processing method described in any one of claims 1 to 13 when running.
16. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored executable program, wherein when the executable program is executed, the device where the computer-readable storage medium is located is controlled to execute the data processing method according to any one of claims 1 to 13.
17. A computer program product, characterized in that The invention comprises a computer program, which implements the data processing method according to any one of claims 1 to 13 when being executed by a processor.