Data processing method and device, electronic equipment, computer readable storage medium and computer program product

Through a unified data processing framework, data parsing and subpacketization operations are used to process RPC/HTTP and UDP protocol data, which solves the problem of multi-framework maintenance and achieves efficient and reliable data processing.

CN120676065APending Publication Date: 2025-09-19TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410314084.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-18
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

In the existing technology, when supporting linkage between servers of different protocol types, it is necessary to maintain multiple different types of data processing frameworks at the same time, which leads to high coding difficulty and maintenance costs, and UDP bare protocol data transmission cannot guarantee the sequentiality of data processing.

Method used

A data processing framework is adopted to process RPC/HTTP protocol data and UDP protocol data respectively through data parsing, subpackaging operation and different types of data processing methods to achieve unified and effective processing.

Benefits of technology

It simplifies the data processing process, reduces coding complexity and maintenance costs, and ensures the sequentiality and reliability of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120676065A_ABST
    Figure CN120676065A_ABST
Patent Text Reader

Abstract

The invention provides a data processing method and device, electronic equipment, a computer readable storage medium and a computer program product, and the method comprises the steps: carrying out the data analysis of to-be-processed data in response to a data processing request of a current service, and obtaining a data format; under the condition that the data format is a first type of data format, performing subpackage operation on the to-be-processed data to obtain a packet header and service data; performing service data processing on the service data based on the packet header and a first type of data processing mode for the data in the first type of data format to obtain a first service data result; under the condition that the data format is a second type of data format, performing business data processing on the to-be-processed data by adopting a second type of data processing mode of the data of the second type of data format to obtain a second business data result; and determining a business processing result based on the first business data result and the second business data result. By means of the method and device, unified and effective processing of data of different types of data formats can be achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet technology, and in particular to a data processing method, device, electronic device, computer-readable storage medium, and computer program product. Background Art

[0002] Typically, server systems have multiple protocol formats, such as HTTP servers, RPC servers, and UDP servers, and business servers need to process protocol data bypassed by upstream servers. However, due to the diversity of protocols supported by the upstream servers corresponding to the business servers, the business servers need to receive and process the corresponding business services through different types of data processing frameworks. When it comes to the linkage between servers supporting different protocol types, since the current architecture of the data processing framework that supports the RPC / HTTP protocol does not support the UDP bare protocol, the linkage between servers supporting different protocol types is at least cross-process, and it is necessary to maintain multiple different types of data processing frameworks at the same time. This poses a great challenge to the coding difficulty and maintenance cost during the development of the data processing framework. Summary of the Invention

[0003] The embodiments of the present application provide a data processing method, apparatus, electronic device, computer-readable storage medium, and computer program product, which can achieve unified and effective processing of data in different data formats.

[0004] The technical solution of the embodiment of the present application is implemented as follows:

[0005] An embodiment of the present application provides a data processing method, the method comprising: in response to a data processing request of a current business, performing data parsing on data to be processed to obtain a data format of the data to be processed; when the data format is a first-category data format, performing a subpackaging operation on the data to be processed to obtain a packet header of the data to be processed and business data of the data to be processed; based on the packet header and a first-category data processing method for data in the first-category data format under the current business, performing business data processing on the business data to obtain a first business data result; when the data format is a second-category data format, using a second-category data processing method for data in the second-category data format under the current business, performing business data processing on the data to be processed to obtain a second business data result; and determining a business processing result of the current business based on the first business data result and the second business data result.

[0006] An embodiment of the present application provides a data processing device, including: a data parsing module, used to perform data parsing on the data to be processed in response to a data processing request of the current business, and obtain the data format of the data to be processed; a subpackaging module, used to perform a subpackaging operation on the data to be processed when the data format is a first type of data format, and obtain a packet header of the data to be processed and the business data of the data to be processed; a first business data processing module, used to perform business data processing on the business data based on the packet header and a first type of data processing method for data of the first type of data format under the current business, and obtain a first business data result; a second business data processing module, used to perform business data processing on the data to be processed using a second type of data processing method for data of the second type of data format under the current business, and obtain a second business data result when the data format is a second type of data format; and a business processing result determination module, used to determine the business processing result of the current business based on the first business data result and the second business data result.

[0007] In some embodiments, the first type of data format includes a packet header and a packet body; the first business data processing module is also used to: deserialize the business data to obtain business object data corresponding to the business data; obtain the business identifier of the business object data from the packet header; based on the business identifier and a preset business processing code list, determine the first type of data processing method for the data in the first type of data format under the current business; use the first type of data processing method to perform business data processing on the business object data to determine the first business data result.

[0008] In some embodiments, the preset business processing code list stores business processing codes corresponding to multiple different business identifiers; the first business data processing module is also used to: query the target business processing code corresponding to the business identifier from the preset business processing code list; and determine the business processing mechanism corresponding to the target business processing code as the first type of data processing method.

[0009] In some embodiments, the second type of data format includes a service identifier and a package body; the second business data processing module is also used to: when the data format is the second type of data format, extract the service identifier of the data to be processed from the data to be processed; delete the service identifier from the data to be processed to obtain the second business data result.

[0010] In some embodiments, the business processing result determination module is also used to: determine the business processing method corresponding to the current business; call the business processing method, perform business logic processing on the first business data result and the second business data result, and obtain the business processing result of the current business.

[0011] In some embodiments, the device further includes a sending module, which is configured to: encode the service processing result to obtain encoded service data; and transmit the encoded service data to a terminal that sends the data processing request.

[0012] In some embodiments, the data in the first data format includes RPC / HTTP protocol data, and the data in the second data format includes UDP protocol data; the device also includes an application module, and the application module is used to: when the data to be processed is the RPC / HTTP protocol data, perform a subpackaging operation on the RPC / HTTP protocol data to obtain the packet header of the RPC / HTTP protocol data and the business data of the RPC / HTTP protocol data; based on the packet header and the first data processing method for the RPC / HTTP protocol data under the current business, perform business data processing on the business data to obtain a first business data result corresponding to the RPC / HTTP protocol data; when the data to be processed is the UDP protocol data, adopt the second data processing method for the UDP protocol data under the current business to perform business data processing on the UDP protocol data to obtain a second business data result corresponding to the UDP protocol data.

[0013] In some embodiments, the device also includes a selection module, which is used to: determine a second business data result set when the number of the second business data results meets a preset business logic processing condition; call the business processing method corresponding to the current business, perform business logic processing on the second business data result set, and obtain the business processing result set of the current business.

[0014] An embodiment of the present application provides an electronic device, comprising: a memory for storing computer-executable instructions; and a processor for implementing the data processing method provided in the embodiment of the present application when executing the computer-executable instructions stored in the memory.

[0015] An embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions for implementing the data processing method provided in the embodiment of the present application when executed by a processor.

[0016] An embodiment of the present application provides a computer program product, which includes computer-executable instructions, and the computer-executable instructions are stored in a computer-readable storage medium; wherein, when a processor of an electronic device reads the computer-executable instructions from the computer-readable storage medium and executes the computer-executable instructions, the data processing method provided in the embodiment of the present application is implemented.

[0017] The embodiments of the present application have the following beneficial effects:

[0018] First, in response to the data processing request of the current business, the data to be processed is parsed to obtain the data format of the data to be processed; then, according to the different data format types of the data to be processed, the data processing process of the data to be processed is divided into two parts. In the first part, the first business data result of the data in the first data format is obtained by subcontracting the data to be processed and the first type of data processing method; in the second part, the second business data result of the data in the second data format is obtained by the second type of data processing method under the current business; finally, based on the first business data result and the second business data result, the business processing result of the current business is determined. In this way, for data to be processed with different types of data formats, the two data processing methods in the same data processing framework can achieve unified and effective processing of the data to be processed with different types of data formats, and obtain accurate data processing results respectively. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 This is a schematic diagram of the structure of the data processing system architecture provided by the embodiment of the present application;

[0020] Figure 2 is a structural diagram of a data processing device provided in an embodiment of the present application;

[0021] Figure 3 This is an optional flowchart of the data processing method provided in the embodiment of the present application;

[0022] Figure 4 This is another optional flowchart of the data processing method provided in the embodiment of the present application;

[0023] Figure 5 This is a schematic diagram of an application of a data processing framework for game voice provided by an embodiment of the present application;

[0024] Figure 6 This is a schematic diagram of the data processing framework provided in the embodiment of the present application;

[0025] Figure 7 This is a schematic diagram of the modules included in the data processing framework provided in the embodiment of the present application;

[0026] Figure 8 This is a schematic diagram of the data processing flow of the data processing framework provided in an embodiment of the present application;

[0027] Figure 9 This is a schematic diagram comparing the structures of different types of protocol data provided in the embodiments of the present application;

[0028] Figure 10 This is a schematic diagram of the processing process of different types of protocol data provided by the embodiment of the present application;

[0029] Figure 11 This is a schematic diagram comparing the data processing framework provided in the embodiment of the present application with the traditional data processing architecture. DETAILED DESCRIPTION

[0030] In order to make the purpose, technical solutions and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limiting this application. All other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0031] In the following description, reference is made to “some embodiments”, which describes a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0032] If similar descriptions of "first / second" appear in the application documents, the following explanation is added. In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific order for the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0033] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program that has a predetermined function and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.

[0034] Unless otherwise defined, all technical and scientific terms used in the embodiments of the present application have the same meanings as those commonly understood by those skilled in the art. The terms used in the embodiments of the present application are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.

[0035] The relevant data collection and processing in the embodiments of this application should be strictly in accordance with the requirements of relevant national laws and regulations when applied in examples, and the informed consent or separate consent of the personal information subject should be obtained. Subsequent data use and processing should be carried out within the scope of authorization of laws and regulations and the personal information subject.

[0036] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.

[0037] 1) Raw media stream: media data after encoding.

[0038] 2) Remote Procedure Call (RPC): A computer communication protocol used to implement remote calls between different computers in a distributed system.

[0039] 3) Network Protocol Encoding and Decoding: The network protocol encoding module is responsible for packaging and serializing RPC content into binary format according to specific rules. The network protocol decoding module is responsible for deserializing and unpacking the received binary data and passing it to the upper-layer HTTP / RPC callback processing layer.

[0040] 4) Synchronous RPC interface: When making a remote procedure call, the caller (client) will wait for the server to complete the execution and return the result before continuing to execute subsequent code.

[0041] 5) Bypass: At a certain node in a process, data is forwarded one more time. The data usually refers to media data. The media data is forwarded to the business server, and the business server performs other actions such as reasoning on the media data.

[0042] 6) User Datagram Protocol (UDP): This is a connectionless, unreliable datagram transmission protocol. It only sends outgoing datagrams to the network and receives incoming datagrams from the network without establishing a connection with the remote UDP module.

[0043] 7) Hypertext Transfer Protocol (HTTP): It is a simple request-response protocol that specifies what messages a client may send to a server and what responses it may receive.

[0044] In related technologies, traditional media servers use the bare UDP protocol to send directly, and the server is responsible for receiving packets and storing media data. The sender generally does not count the success rate of the transmission, and the data received by the server cannot guarantee the order of data transmission. Although the probability of disorder is low, it does occur from time to time. If you want to ensure failure retry and sequential consistency, the design of the UDP server will be very complicated and difficult to reuse. Each time, it depends on the accessor to implement packet success detection, manual retry, and the design of the corresponding protocol. In addition, for traditional data processing architectures, it is generally necessary to maintain two different sets of data processing architectures at the same time, and set up different processes to connect to the RPC / HTTP protocol and the bare UDP protocol. At the same time, the interaction between the two types of protocols can only be achieved through cross-process communication, which greatly increases the complexity of coding and the maintenance cost is also very high.

[0045] In summary, the related art has the following technical problems:

[0046] 1. For data processing of different types of protocol data, it is necessary to maintain two different data processing architectures at the same time, which greatly increases the coding complexity and maintenance costs;

[0047] 2. For UDP bare protocol data, the sender does not count the success rate of sending, and the server cannot guarantee the order of data transmission and data processing, making it impossible to achieve effective data processing.

[0048] Based on at least one of the above technical issues in the related art, the embodiments of the present application only need to maintain a single data processing framework, i.e., a single set of code and a single process, while supporting different data processing scenarios for both HTTP / RPC and UDP bare protocols. Furthermore, through the design of a synchronous RPC data processing framework, the current caller (i.e., the sender) can detect whether data transmission is successful or failed, and directly retransmit the data if it fails. This not only effectively solves the problems of disorder and failure in media data flow, but also greatly reduces the development workload of service access providers, making the entire data processing process concise and clear, and improving maintainability.

[0049] The following describes exemplary applications of the data processing device (i.e., electronic device) provided in the embodiments of the present application. The device provided in the embodiments of the present application can be implemented as a laptop computer, tablet computer, desktop computer, set-top box, mobile device (e.g., mobile phone, portable music player, personal digital assistant, dedicated messaging device, portable gaming device), smart phone, smart speaker, smart watch, smart TV, vehicle-mounted terminal, and other types of user terminals capable of performing data processing or capable of performing data processing, and can also be implemented as a server. The following describes exemplary applications when the data processing device is implemented as a server.

[0050] See also Figure 1 , Figure 1 It is a structural diagram of the data processing system 100 architecture provided in an embodiment of the present application. In order to support a data processing application, the data processing application is run on the terminal 400. The terminal 400 is connected to the server 200 through the network 300. The network 300 can be a wide area network or a local area network, or a combination of the two.

[0051] The terminal 400 is used to send a data processing request for the current business to the server 200. The server 200 constitutes a data processing device in an embodiment of the present application. The server 200 is used to respond to the data processing request for the current business, perform data parsing on the data to be processed, and obtain the data format of the data to be processed; when the data format is a first type of data format, perform a packet operation on the data to be processed to obtain a packet header of the data to be processed and the business data of the data to be processed; based on the packet header and the first type of data processing method for the data in the first type of data format under the current business, perform business data processing on the business data to obtain a first business data result; when the data format is a second type of data format, use the second type of data processing method for the data in the second type of data format under the current business to perform business data processing on the data to obtain a second business data result; based on the first business data result and the second business data result, determine the business processing result of the current business. After obtaining the business processing result of the current business, the server 200 returns the business processing result to the terminal 400, so that the terminal 400 outputs the business processing result or the terminal 400 continues to perform the next business processing based on the business processing result.

[0052] In some embodiments, the server 200 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. The terminal 400 can be a smart phone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, car terminal, etc., but is not limited to this. The terminal and the server can be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiments of the present application.

[0053] See also Figure 2 , Figure 2 is a schematic structural diagram of an electronic device 40 provided in an embodiment of the present application, Figure 2The electronic device 40 shown may be a data processing device, which includes: at least one processor 410, a memory 450, at least one network interface 420, and a user interface 430. The various components in the data processing device are coupled together via a bus system 440. It is understood that the bus system 440 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 440 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, the bus system 440 is not shown in FIG. Figure 2 Various buses are labeled as bus system 440 .

[0054] The processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.

[0055] The user interface 430 includes one or more output devices 431 that enable presentation of media content, including one or more speakers and / or one or more visual display screens. The user interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.

[0056] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard drives, optical drives, etc. The memory 450 may optionally include one or more storage devices that are physically remote from the processor 410.

[0057] The memory 450 includes volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 450 described in the embodiments of the present application is intended to include any suitable type of memory.

[0058] In some embodiments, the memory 450 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplified below.

[0059] Operating system 451, including system programs for processing various basic system services and performing hardware-related tasks, such as the framework layer, core library layer, and driver layer, which are used to implement various basic services and process hardware-based tasks;

[0060] A network communication module 452 is used to reach other electronic devices via one or more (wired or wireless) network interfaces 420. Exemplary network interfaces 420 include Bluetooth, Wi-Fi, and Universal Serial Bus (USB);

[0061] a presentation module 453 for enabling presentation of information via one or more output devices 431 (e.g., a display screen, a speaker, etc.) associated with the user interface 430 (e.g., a user interface for operating peripheral devices and displaying content and information);

[0062] The input processing module 454 is configured to detect one or more user inputs or interactions from one of the one or more input devices 432 and to translate the detected inputs or interactions.

[0063] In some embodiments, the apparatus provided in the embodiments of the present application may be implemented in software. Figure 2 The data processing device 455 stored in the memory 450 is shown. This device can be software in the form of a program or plug-in, and includes the following software modules: a data parsing module 4551, a packetization module 4552, a first business data processing module 4553, a second business data processing module 4554, and a business processing result determination module 4555. These modules are logical and can be arbitrarily combined or further divided according to the functions they implement. The functions of each module will be described below.

[0064] In other embodiments, the apparatus provided in the embodiments of the present application may be implemented in hardware. As an example, the apparatus provided in the embodiments of the present application may be a processor in the form of a hardware decoding processor, which is programmed to execute the data processing method provided in the embodiments of the present application. For example, the processor in the form of a hardware decoding processor may be one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.

[0065] In some embodiments, the terminal or server can implement the data processing method provided by the embodiment of the present application by running various computer executable instructions or computer programs. For example, computer executable instructions can be commands, machine instructions or software instructions at the microprogram level. A computer program can be a native program or software module in an operating system; it can be a local (Native) application (Application, APP), that is, a program that needs to be installed in the operating system to run, or it can be a small program that can be embedded in any APP, that is, a program that only needs to be downloaded to a browser environment and can be run. In short, the above-mentioned computer executable instructions can be instructions in any form, and the above-mentioned computer program can be an application, module or plug-in in any form.

[0066] The data processing methods provided in each embodiment of the present application can be executed by an electronic device, wherein the electronic device can be a server or a terminal, that is, the data processing methods provided in each embodiment of the present application can be executed by a server, or by a terminal, or by interaction between a server and a terminal.

[0067] See also Figure 3 , Figure 3 This is an optional flow chart of the data processing method provided in the embodiment of the present application, which will be combined with Figure 3 The steps shown are described below, and the execution subject of the data processing method is a server as an example. The method includes the following steps S101 to S105:

[0068] Step S101 : In response to a data processing request of a current business, data to be processed is parsed to obtain a data format of the data to be processed.

[0069] In the embodiment of the present application, the current service refers to the service requested by the terminal received by the server. According to the actual needs of the terminal, the current service may be real-time voice, voice message, voice-to-text, civilized voice, simultaneous voice interpretation, voice broadcast and other services. The data processing request is a service request sent by the terminal to the server for the current service, for example, a voice-to-text request, a sensitive word detection request, etc. The data to be processed is the data that needs to be processed carried in the data processing request under the current service. The data to be processed may be media data (for example, video data, audio data, etc.), or may be instruction data, for example, function instructions, create room instructions, etc. According to the data format of the data to be processed, the data to be processed can also be divided into data in a first data format and data in a second data format. The data in the first data format corresponds to the first data format, and the data in the second data format corresponds to the second data format.

[0070] In response to the data processing request of the current business, the data to be processed of the current business corresponding to the data request is obtained, and the data to be processed is parsed. Through the data parsing step, the data format of the data to be processed can be determined, that is, whether the data format of the data to be processed is the first type of data format or the second type of data format.

[0071] Here, by determining the data format of the data to be processed, the data to be processed is divided into two categories, so that different data processing processes can be performed on the data to be processed according to the different data formats of the data to be processed.

[0072] Step S102: When the data format is the first type of data format, the data to be processed is sub-packetized to obtain a packet header of the data to be processed and business data of the data to be processed.

[0073] In the embodiment of the present application, the first type of data format includes a packet header and a packet body for the data to be processed. The packet header is responsible for recording some information parameters of the protocol request, such as the protocol type of the data to be processed, the packet length of the data to be processed, the encryption identifier, the encryption algorithm, etc. The packet body is responsible for storing the data content that needs to be processed by the current service, that is, the service data of the data to be processed, such as the voice data corresponding to the real-time voice service.

[0074] After determining that the data to be processed is data in the first data format, a subpacketization operation is performed on the data to be processed according to the structure of the first data format. Through the subpacketization operation, the packet header and the packet body of the data to be processed are distinguished, that is, the packet header of the data to be processed and the business data of the data to be processed are obtained.

[0075] Here, through the subpacketization operation, the packet header of the data to be processed and the business data corresponding to the actual current business are determined, so as to facilitate the subsequent effective data processing process of the data to be processed based on the packet header and the business data.

[0076] Step S103 : Based on the packet header and the first type of data processing method for the data in the first type of data format under the current service, the service data is processed to obtain a first service data result.

[0077] In an embodiment of the present application, the first type of data processing method is the corresponding data processing method when the data to be processed is data in the first type of data format. For example, when the data to be processed is data serialized by the terminal, the first type of data processing method can be a deserialization processing method on the server; the first type of data processing method can also be a different data processing method determined according to the content in the packet header, for example, according to the encryption algorithm and encryption identifier in the packet header, determining the decryption method for the business data.

[0078] After obtaining the packet header and business data of the data to be processed, determine the first type of data processing method under the current business based on the actual processing requirements corresponding to the data to be processed, and perform business data processing on the business data using the first type of data processing method. For example, decrypt the business data to obtain the decrypted business data, that is, obtain the first business data result corresponding to the data to be processed.

[0079] Here, the first type of data processing method is used to implement data preprocessing of the data to be processed, and obtain the first business data result, so as to facilitate the subsequent acquisition of the final data processing result of the current business based on the first business data result through the business logic processing process.

[0080] Step S104 , when the data format is the second type of data format, the second type of data processing method for the data in the second type of data format under the current business is adopted to perform business data processing on the data to be processed to obtain a second business data result.

[0081] In the embodiments of the present application, the second data format includes a service identifier and a packet body. Since the second data format does not include the packet header of the first data format, no subpacketization is required during data processing of the second data format. Furthermore, the second data processing method related to the packet header content differs from the first data processing method without the header. The second data processing method is the corresponding data processing method when the data to be processed is in the second data format.

[0082] After determining that the data to be processed is in the second data format, the service identifier of the data to be processed is extracted from the data to be processed, and the service identifier is deleted from the data to be processed to obtain a second business data result. Here, through the second data processing method, data preprocessing of the data to be processed is achieved to obtain the second business data result, which facilitates the subsequent business logic processing based on the second business data result to obtain the final data processing result for the current business.

[0083] Step S105 : determining a business processing result of the current business based on the first business data result and the second business data result.

[0084] In the embodiment of the present application, the first business data result is the business data processing result obtained by the first type of data processing method, and the second business data result is the business data processing result obtained by the second type of data processing method. The business processing result of the current business is the business consumption result obtained after the server actually consumes the first business data result and the second business data result for the business service request under the current business. For example, if the current business is a speech-to-text business, the server will perform speech-to-text business consumption on the first business data result and the second business data result to obtain the business processing result of the speech-to-text business.

[0085] Here, based on the first business data result and the second business data result, an effective business processing result of the current business can be obtained, thereby achieving unified and effective processing of data in different data formats.

[0086] In some embodiments, data in the first data format may include RPC / HTTP protocol data, and data in the second data format may include UDP protocol data. When the data to be processed is RPC / HTTP protocol data, the RPC / HTTP protocol data is subpacketized to obtain the packet header of the RPC / HTTP protocol data and the business data of the RPC / HTTP protocol data; based on the packet header and the first data processing method for the RPC / HTTP protocol data under the current business, the business data is processed to obtain the first business data result corresponding to the RPC / HTTP protocol data; when the data to be processed is UDP protocol data, the second data processing method for the UDP protocol data under the current business is adopted to process the UDP protocol data to obtain the second business data result corresponding to the UDP protocol data.

[0087] In other words, RPC / HTTP protocol data and UDP protocol data belong to two different data formats. RPC / HTTP protocol data consists of a packet header and service data, while UDP protocol data consists of a service identifier and a packet body. Different data processing methods are required for RPC / HTTP protocol data and UDP protocol data. RPC / HTTP protocol data corresponds to packet sub-processing and the first type of data processing method under the current service, while UDP protocol data corresponds to the second type of data processing method under the current service.

[0088] The data processing method provided by the embodiment of the present application, first, in response to the data processing request of the current business, performs data parsing on the data to be processed to obtain the data format of the data to be processed; then, according to the different data format types of the data to be processed, the data processing process of the data to be processed is divided into two parts, in the first part, through the subpackaging operation of the data to be processed and the first type of data processing method, the first business data result of the data in the first type of data format is obtained; in the second part, through the second type of data processing method under the current business, the second business data result of the data in the second type of data format is obtained; finally, based on the first business data result and the second business data result, the business processing result of the current business is determined. In this way, for data to be processed with different types of data formats, the two data processing methods in the same data processing framework can achieve unified and effective processing of the data to be processed with different types of data formats, and obtain accurate data processing results respectively.

[0089] The data processing method in the embodiment of the present application will be described below in conjunction with the interaction between the terminal and the server in the data processing system. It should be noted that the data processing method here is a data processing method implemented by the interaction between the terminal and the server, which is essentially the same as the data processing method executed by the server in the above embodiment. The only difference is that the embodiment of the present application also describes the actions performed by the terminal during the execution of the data processing method, and some steps can be executed by both the terminal and the server. Therefore, for the steps in this embodiment that are the same as those in the above embodiment but have different execution entities, this embodiment is only an illustrative description. During the implementation process, they can be executed by any execution entity, and the embodiment of the present application does not limit this.

[0090] Figure 4 This is another optional flow chart of the data processing method provided in the embodiment of the present application, such as Figure 4 As shown, the method includes the following steps S201 to S216:

[0091] Step S201: The terminal receives a data processing operation for the current service input by the user.

[0092] In an embodiment of the present application, the user can enter data processing operations in the client of the data processing application. In the data processing application, a data processing function can be provided. The user can enter the data processing operation of the current business on the data processing function page to trigger the data processing request of the current business.

[0093] In some embodiments, when a user enters a data processing operation for the current business, they may also enter data to be processed. When the terminal receives the data to be processed, a confirmation window for data processing will pop up on the data processing function page. After the terminal detects that the user has clicked the confirm data processing button, it will further process the data to be processed, thereby determining the business processing result of the data to be processed. Alternatively, in other embodiments, the user may directly enter the data to be processed on the data processing function page. Upon receiving the data to be processed, the terminal will directly trigger the data processing function, perform further data processing on the data to be processed, and determine the business processing result of the data to be processed.

[0094] Step S202: The terminal generates a data processing request for the current service in response to the data processing operation of the current service.

[0095] In an embodiment of the present application, the data input by the user can be encapsulated into a data processing request. For example, on the display interface of the data processing application, the data to be processed is displayed, and the user can select or sample data according to actual needs, and then the data to be processed input by the user is encapsulated into the data processing request.

[0096] Alternatively, in response to a service processing operation for the current service, the terminal obtains the original service data corresponding to the current service input by the user; then, it encodes the original service data to obtain the data to be processed; and finally, it encapsulates the data to be processed into a data processing request. Here, the original service data is the unencoded raw data entered by the terminal user. The encoding process can be implemented in any manner based on service requirements, such as adding a protocol header to the original service data according to the transmission protocol, serializing the original service data, etc.

[0097] Step S203: The terminal sends a data processing request for the current service to the server.

[0098] In step S204 , the server responds to the data processing request of the current business, performs data parsing on the data to be processed, and obtains the data format of the data to be processed.

[0099] In an embodiment of the present application, in response to a data processing request of the current business, if the data processing request encapsulates data to be processed, the data to be processed can be directly parsed. In addition, data parsing is performed on the data to be processed, and the data format of the data to be processed is determined through the data parsing process. The data format of the data to be processed includes a first type of data format and a second type of data format. Therefore, through the data parsing process, it can be determined whether the data to be processed is data in the first type of data format or data in the second type of data format. For example, data in the first type of data format can be RPC protocol data, HTTP protocol data, etc., and data in the second type of data format can be UDP protocol data, etc. There is no specific limitation on the data parsing method here.

[0100] Here, the data format of the data to be processed is determined through the data parsing process, so that before the data processing process is executed on the data to be processed, different data processing frameworks can be constructed according to the different data formats of the data to be processed, and the data to be processed can be sent to the corresponding data processing framework for the correct data processing process.

[0101] Step S205 : When the data format is the first type of data format, the server performs a packet sub-operation on the data to be processed to obtain a packet header of the data to be processed and business data of the data to be processed.

[0102] In an embodiment of the present application, the first type of data format includes a packet header and a packet body. After determining that the data format of the data to be processed is the first type of data format, the data to be processed is processed through the data processing framework corresponding to the first type of data format. First, it is necessary to perform a subpacket operation on the data to be processed, and divide the data to be processed into two parts: a packet header and a packet body, to obtain a packet header of the data to be processed and business data of the data to be processed. The packet header is used to describe information such as the data packet size of the data to be processed, the function of the business data, the protocol type, etc., and the business data is the data that actually needs to be processed for business. There is no specific limitation on the subpacket operation method here.

[0103] Here, the data to be processed is divided into two parts, a packet header and business data, through the packet sub-operation of the data to be processed, so as to facilitate the subsequent correct processing of the business data based on the content information contained in the packet header.

[0104] Step S206: The server deserializes the business data to obtain business object data corresponding to the business data.

[0105] In the embodiment of the present application, the deserialization process is the reverse process of the serialization process. The serialization process is the process of converting an object into a byte sequence that is easy to transmit, that is, the process of converting business object data into business data, and the deserialization process is the process of restoring the byte sequence into an object, that is, the process of restoring business data into business object data. The serialization format of the business data can be a binary format, a byte array, a json string, an xml string, etc. For example, when accessing the browser, the text, pictures, audio, video, etc. contained in the browser page can be transmitted in a binary format. After the business data is sent from the terminal to the server, it can be restored to business object data through deserialization processing, and then the subsequent data processing process can be carried out. There is no specific limitation on the deserialization processing method.

[0106] Step S207: The server obtains the service identifier of the service object data from the packet header.

[0107] In the embodiment of the present application, the packet header includes a service identifier for the business object data. After obtaining the packet header of the data to be processed, the service identifier for the business object data can be directly extracted from the packet header. The service identifier is a code in the packet header that describes the data processing method for the current service. The service identifier corresponds one-to-one with the data processing method. Here, by obtaining the service identifier of the business object data, it is convenient to subsequently determine the corresponding data processing method based on the service identifier, thereby achieving accurate data processing.

[0108] In step S208, the server determines a first-category data processing method for the data in the first-category data format under the current service based on the service identifier and a preset service processing code list.

[0109] In an embodiment of the present application, based on the business identifier and the preset business processing code list, determining the first type of data processing method for data in the first type of data format under the current business can be achieved in the following way: querying the target business processing code corresponding to the business identifier from the preset business processing code list; determining the business processing mechanism corresponding to the target business processing code as the first type of data processing method.

[0110] In other words, the preset business processing code list stores business processing codes corresponding to multiple different business identifiers, each corresponding to a data processing method. Based on the business identifier, the preset business processing code list can be searched to obtain the target business processing code corresponding to the business identifier. Different business identifiers correspond to different target business processing codes. This target business processing code represents a business processing mechanism for the business object data, namely, the first type of data processing method corresponding to the business object data.

[0111] Here, the first type of data processing method is determined based on the business identifier and the preset business processing code list, so as to facilitate the subsequent effective processing of business object data under the current business through the first type of data processing method.

[0112] Step S209: The server performs business data processing on the business object data using the first type of data processing method to determine a first business data result.

[0113] In the embodiments of the present application, the first type of data processing method is a data processing method for business object data determined based on the service identifier in the packet header. For example, the service identifier may be an encryption identifier and the encryption algorithm corresponding to the encryption identifier. In this case, the business data processing may be decryption processing of the business object data according to the decryption algorithm corresponding to the encryption algorithm, and the first business data result is the decrypted business object data. Here, through the business data processing process of the business object data, the obtained first business data result is made suitable for subsequent business logic processing, thereby obtaining an accurate business processing result.

[0114] Step S210: When the data format is the second type of data format, the server extracts the service identifier of the data to be processed from the data to be processed.

[0115] In step S211, the server deletes the service identifier from the data to be processed to obtain a second business data result.

[0116] In the embodiment of the present application, the second type of data format includes a service identifier and a packet body, and the data in the second type of data format does not include a packet header, so there is no need to perform a subpackaging operation, but instead the data to be processed is directly processed through the second type of data processing method. The second type of data format corresponds to a business processing mechanism for the data to be processed. After determining that the data to be processed is data in the second type of data format, in order to obtain the data content that needs to be processed for the current business, the service identifier in the data to be processed is extracted and processed from the data to be processed, and deleted to obtain the second business data result. For example, assuming that the first 4 bits of the data to be processed are placeholders, the first 4 placeholders are deleted to obtain the deleted data to be processed, that is, the second business data result.

[0117] In some embodiments, when the number of second business data results meets the preset business logic processing conditions, a second business data result set is determined; the business processing method corresponding to the current business is called, and the business logic processing is performed on the second business data result set to obtain a business processing result set for the current business. That is, when the second business data results are stored to a certain number or a certain length of time, and the preset business logic processing conditions are met, the second business data result set is transmitted to the business logic processing module, and the business logic processing is performed on the second business data result set through the business processing method corresponding to the current business in the business logic processing module to obtain a business processing result set for the current business. For example, when the processing logic of the business logic processing module is to perform speech-to-text business logic processing every ten seconds, the second business data result set of ten seconds is sent to the business logic processing module to complete the business logic processing process of the second business data result set.

[0118] Here, the second business data result is obtained through the second type of data processing method, so that the second business data result can be effectively processed based on the business processing method later.

[0119] Step S212: The server determines a service processing method corresponding to the current service.

[0120] In an embodiment of the present application, the business processing method is the actual business consumption method of the first business data result and the second business data result. The business processing method corresponds to the current business. For example, the business processing method can be sensitive word detection of voice data, voice data text conversion, civilized voice recognition, etc.

[0121] In step S213, the server calls the business processing method, performs business logic processing on the first business data result and the second business data result, and obtains the business processing result of the current business.

[0122] In an embodiment of the present application, the business processing method includes business processing logic for the first business data result and the second business data result. The business processing logic in the business processing method performs business logic processing on the first business data result and the second business data result to obtain the business processing result of the current business. For example, assuming that the first business data result and the second business data result are voice data, and the business processing logic in the business processing method is to convert the voice data into text data, then the business processing result is the text data corresponding to the current business.

[0123] Here, according to the actual business needs of the current business, the first business data result and the second business data result are subjected to corresponding business logic processing, so that unified and effective processing of the data to be processed can be achieved through the above-mentioned data processing framework, thereby improving the accuracy of the business processing results of the current business.

[0124] Step S214: The server encodes the service processing result of the current service to obtain encoded service data.

[0125] In an embodiment of the present application, in order to generate coded service data that is easy to transmit, it is necessary to encode the service processing result of the current service on the server, obtain the coded service data, and then return the coded service data to the terminal.

[0126] In step S215, the server sends the encoded service data to the terminal that sent the data processing request.

[0127] Step S216: The terminal decodes the encoded service data to obtain a service processing result of the current service, and generates a data processing request for the next target service in response to a service processing operation for the next target service of the current service.

[0128] In the embodiment of the present application, the decoding process is the reverse process of the encoding process. Through the decoding process, the received encoded business data is restored to the business processing result of the current business, thereby achieving the successful transmission of the business processing result of the current business from the server to the terminal. In addition, after obtaining the business processing result of the current business, if there is a next target business for the current business, a data processing request for the next target business is generated in response to the business processing operation for the next target business of the current business, and the next round of data processing is started. The data processing process for the next target business is consistent with the data processing process for the current business.

[0129] Here, a data processing request is generated at the terminal, the data processing process of the data to be processed is completed at the server, and the data processing result is returned to the terminal, so that the terminal can continue to request the next business service from the server when the current business processing is completed, thereby realizing the sequential delivery of the data to be processed corresponding to each business service, and the terminal can directly perceive whether the data to be processed is successfully transmitted, which is conducive to accurate statistics of the business service process.

[0130] In the embodiment of the present application, first, in response to the data processing request of the current business, the data to be processed is divided into data of the first data format and data of the second data format according to different types of data formats through the data parsing process; then, different data processing methods are determined according to the data of different types of data formats, and a data processing framework is formed in the embodiment of the present application. In this way, even if the data to be processed has different data formats, the same data processing framework can be used to achieve unified processing of the data to be processed. Compared with the data processing process using different data processing frameworks, the maintenance cost and development difficulty of the data processing framework are further reduced. In addition, after the server completes the response to the data processing request sent by the terminal and obtains the business processing result of the current business, the server will return the business processing result to the terminal so that the terminal can perceive whether the data to be processed is sent successfully. Moreover, when there is still a next target business after the current business ends, the terminal will immediately generate a data processing request for the next target business and send it to the server to request data processing of the data to be processed for the next target business. It can be seen that the terminal will execute subsequent business requests only after the current business is completed, so that the data to be processed under each business can be transmitted sequentially, while ensuring the sequentiality of the data processing process of each business.

[0131] Below, an exemplary application of the embodiment of the present application in a practical application scenario will be described.

[0132] The present application provides a data processing method, which relates to a data processing framework that can be applied to game voice, such as Figure 5 As shown in the figure, various algorithmic business functions will be implemented in the background for the player voice in the game, such as real-time voice, civilized voice, and underage recognition. The implementation of these functions requires this data processing framework. Figure 6 As shown, media servers that support different protocol types (for example, HTTP servers, RPC servers, UDP servers, etc.) bypass protocol data (for example, audio and video data, room instructions, function instructions, etc.) to the business server with the data processing framework, and the business server needs to consume the received media data through specific algorithms and perform reasoning-related work.

[0133] like Figure 7 As shown, Figure 7A schematic diagram shows the modules within the data processing framework. The framework includes a UDP transport layer, an RPC / HTTP application layer protocol implementation module, a network protocol encoding and decoding module, a binary content transparent transmission module, and an RPC / HTTP callback processing layer. The UDP transport layer is used to send and receive UDP protocol packets and transparently transmit data to the application layer. The RPC / HTTP application layer protocol implementation module simulates synchronous and asynchronous RPC and HTTP calls. For example, after an RPC request arrives, the request segment blocks and waits for a response. The server-side application layer protocol calls the corresponding callback function, which processes the request and returns the response data. After receiving the response data, the client-side application layer protocol wakes up from the blocked waiting state, simulating synchronous call behavior. The network protocol decoding module parses data transparently transmitted from the application layer protocol. For example, RPC protocol data transparently transmitted is first deserialized and then parsed for the packet header, packet body, call parameters, and other data. The binary content transparent transmission layer handles raw UDP protocol packets without headers or fixed formats and directly passes them to the corresponding upper-layer RPC / HTTP callback processing layer without parsing. The RPC / HTTP callback processing layer is used to implement the details of RPC / HTTP / UDP raw protocol data processing.

[0134] The data processing flow diagram of the data processing framework is as follows Figure 8 As shown, specifically, first, through the Socket network layer: use IO SOCKET to send and receive data packets, and obtain protocol data from the network buffer; then, through the media mode, perform data parsing on the protocol data to determine the protocol request type of the protocol data; if the protocol request type of the protocol data is an RPC / HTTP protocol request, then through the packet sub-layer, perform packet header and packet body parsing on the protocol data for the specific protocol; then, through the decoding layer, deserialize the serialized protocol data, obtain the corresponding field of the deserialized protocol data from the binary, assign the field to the corresponding variable of the structure, and associate the protocol request with the processing mapping of the upper layer (i.e., the application protocol (RPC / HTTP) processing layer); then, through the application protocol (RPC / HTTP) processing layer, actually consume the HTTP and RPC protocol requests, run the corresponding processing code, and obtain the RPC / HTTP request data. If the protocol data's request type is UDP, the raw media receiving layer receives the UDP protocol data and passes it directly to the media data processing layer without parsing the packet body and header. The media data processing layer then receives and processes the media data, i.e., the protocol data. Finally, the application layer logic module performs business logic processing on the processed media data or RPC / HTTP request data to implement specific application logic.

[0135] The reason why this method needs to judge the protocol request type of protocol data in the data processing flow of the data processing framework is that RPC / HTTP protocol data and UDP protocol data have different data structures, and different data processing methods will be used for protocol data with different data structures. The structural comparison diagram of RPC / HTTP protocol data and UDP protocol data is shown in the figure below. Figure 9 As shown, for RPC / HTTP protocol data, the protocol data includes an RPC / HTTP packet header and a packet body. For UDP protocol data, the data protocol includes a service code and a packet body.

[0136] For mainstream data processing frameworks that support RPC / HTTP protocols, the protocol data received by the Socket network layer must be able to be sub-packetized, the packet header and packet body of the protocol data must be parsed, callback mapping must be performed based on the contents of the packet header, and the data must be sent to the upper application layer logic module for processing.

[0137] In the audio and video domain, many existing data processing frameworks (for example, the UDP private architectures of various media services) use proprietary protocols as bypass systems. Communication packets do not contain RPC / HTTP protocol headers, making them incompatible with proprietary (i.e., internally defined) or bare-protocol multimedia data bypass systems. Therefore, at the parsing layer, this method provides a media mode that bypasses the parsing of application protocol headers like RPC / HTTP and directly transparently passes independent communication packets to the media data processing layer.

[0138] For application protocols such as RPC / HTTP, Figure 10 As shown, this data processing framework retrieves the Action ID field from the packet header, which is the code for accessing a specific transaction. It then uses the Action ID to search the list of Action IDs and Handlers (the code implementations that handle specific transactions) registered with the framework, finds the handler corresponding to the current protocol, and passes it to the application layer for consumption. In media mode, since there is no application-layer protocol header and therefore no Action ID, this approach binds a fixed handler at the architectural level to process raw media packets.

[0139] Compare the differences between the method proposed in this embodiment and the existing solutions from the perspective of deployment and code maintenance, such as Figure 11As shown, the method proposed in this embodiment supports data processing methods for different scenarios of RPC, HTTP, and UDP bare protocols, and only requires one set of code and one process. Compared with the method proposed in this embodiment, the traditional architecture needs to maintain two sets of architectures and design different processes to connect to RPC / HTTP and UDP bare protocols. At the same time, the interaction between the two types of protocols can only be achieved through cross-process communication, which greatly increases the coding complexity and the maintenance cost is also very high. Therefore, through the method proposed in this embodiment, the access cost of new services is greatly reduced, and the number of processes deployed online is also greatly reduced.

[0140] It is understandable that in the embodiments of the present application, the content involving user information, such as current business, data to be processed, and business processing result information, if it involves data related to user information or enterprise information, when the embodiments of the present application are applied to specific products or technologies, it is necessary to obtain user permission or consent, or to blur this information to eliminate the correspondence between this information and the user; and the relevant data collection and processing should be strictly in accordance with the requirements of relevant national laws and regulations when applied in examples, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of authorization of laws and regulations and the personal information subject.

[0141] The following continues to describe the exemplary structure of the data processing device 455 provided in the embodiment of the present application implemented as a software module. In some embodiments, such as Figure 2 As shown, the software modules stored in the data processing device 455 of the memory 450 may include: a data parsing module 4551, which is used to perform data parsing on the data to be processed in response to the data processing request of the current business to obtain the data format of the data to be processed; a subpackaging module 4552, which is used to perform a subpackaging operation on the data to be processed when the data format is the first type of data format, to obtain the packet header of the data to be processed and the business data of the data to be processed; a first business data processing module 4553, which is used to perform business data processing on the business data based on the packet header and the first type of data processing method for data in the first type of data format under the current business to obtain a first business data result; a second business data processing module 4554, which is used to perform business data processing on the data to be processed using the second type of data processing method for data in the second type of data format under the current business when the data format is the second type of data format to obtain a second business data result; a business processing result determination module 4555, which is used to determine the business processing result of the current business based on the first business data result and the second business data result.

[0142] In some embodiments, the first type of data format includes a header and a body; the first business data processing module 4553 is also used to: deserialize the business data to obtain business object data corresponding to the business data; obtain the business identifier of the business object data from the header; based on the business identifier and a preset business processing code list, determine the first type of data processing method for the data in the first type of data format under the current business; use the first type of data processing method to perform business data processing on the business object data to determine the first business data result.

[0143] In some embodiments, the preset business processing code list stores business processing codes corresponding to multiple different business identifiers; the first business data processing module 4553 is also used to: query the target business processing code corresponding to the business identifier from the preset business processing code list; and determine the business processing mechanism corresponding to the target business processing code as the first type of data processing method.

[0144] In some embodiments, the second type of data format includes a service identifier and a package body; the second business data processing module 4554 is also used to: when the data format is the second type of data format, extract the service identifier of the data to be processed from the data to be processed; delete the service identifier from the data to be processed to obtain the second business data result.

[0145] In some embodiments, the business processing result determination module 4555 is also used to: determine the business processing method corresponding to the current business; call the business processing method, perform business logic processing on the first business data result and the second business data result, and obtain the business processing result of the current business.

[0146] In some embodiments, the device 455 further includes a sending module, which is used to: encode the business processing result to obtain encoded business data; and transmit the encoded business data to the terminal that sends the data processing request.

[0147] In some embodiments, the data in the first data format includes RPC / HTTP protocol data, and the data in the second data format includes UDP protocol data; the device 455 also includes an application module, and the application module is used to: when the data to be processed is the RPC / HTTP protocol data, perform a subpackaging operation on the RPC / HTTP protocol data to obtain the packet header of the RPC / HTTP protocol data and the business data of the RPC / HTTP protocol data; based on the packet header and the first data processing method for the RPC / HTTP protocol data under the current business, perform business data processing on the business data to obtain a first business data result corresponding to the RPC / HTTP protocol data; when the data to be processed is the UDP protocol data, adopt the second data processing method for the UDP protocol data under the current business to perform business data processing on the UDP protocol data to obtain a second business data result corresponding to the UDP protocol data.

[0148] In some embodiments, the device 455 also includes a selection module, which is used to: determine a second business data result set when the number of the second business data results meets a preset business logic processing condition; call the business processing method corresponding to the current business, perform business logic processing on the second business data result set, and obtain the business processing result set of the current business.

[0149] It should be noted that the description of the device embodiment of the present application is similar to the description of the method embodiment described above, and has similar beneficial effects as the method embodiment, so it will not be repeated. For technical details not disclosed in the device embodiment, please refer to the description of the method embodiment of the present application for understanding.

[0150] The embodiment of the present application provides a computer-readable storage medium in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, the processor will execute the data processing method provided by the embodiment of the present application, for example, Figure 3 The data processing method is shown.

[0151] An embodiment of the present application provides a computer program product, which includes computer-executable instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer-executable instructions from the computer-readable storage medium and executes the computer-executable instructions, causing the electronic device to perform the data processing method described in the embodiment of the present application.

[0152] In some embodiments, the computer-readable storage medium may be a memory such as RAM, ROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or may be various devices including one or any combination of the above memories.

[0153] In some embodiments, computer-executable instructions may be in the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.

[0154] As an example, computer-executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinating files (e.g., files storing one or more modules, subroutines, or code portions).

[0155] By way of example, computer-executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located at one site, or on multiple electronic devices distributed across multiple sites and interconnected by a communication network.

[0156] The above description is merely an embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent replacements, and improvements made within the spirit and scope of the present application are included in the scope of protection of the present application.

Claims

1. A data processing method, characterized in that: Applied to a server, the method includes: In response to a data processing request of the current business, performing data parsing on the data to be processed to obtain a data format of the data to be processed; In a case where the data format is the first type of data format, performing a subpackaging operation on the data to be processed to obtain a packet header of the data to be processed and business data of the data to be processed; Based on the packet header and the first type of data processing method for the data in the first type of data format under the current service, performing service data processing on the service data to obtain a first service data result; When the data format is the second type of data format, the second type of data processing method for the data in the second type of data format under the current business is adopted to perform business data processing on the data to be processed to obtain a second business data result; A business processing result of the current business is determined based on the first business data result and the second business data result.

2. The method according to claim 1, characterized in that The first data format includes a packet header and a packet body; performing business data processing on the business data based on the packet header and the first data processing method for the data in the first data format under the current business to obtain a first business data result includes: Deserialize the business data to obtain business object data corresponding to the business data; Acquire the service identifier of the service object data from the packet header; Determining, based on the service identifier and a preset service processing code list, a first-category data processing method for the data in the first-category data format under the current service; The business object data is processed using the first type of data processing method to determine the first business data result.

3. The method according to claim 2, characterized in that The preset business processing code list stores business processing codes corresponding to a plurality of different business identifiers; The determining, based on the service identifier and the preset service processing code list, of a first type of data processing method for the data in the first type of data format under the current service includes: Querying the target business processing code corresponding to the business identifier from the preset business processing code list; The business processing mechanism corresponding to the target business processing code is determined to be the first type of data processing mode.

4. The method according to claim 1, wherein The second data format includes a service identifier and a package body; when the data format is the second data format, the second data processing method for the data in the second data format under the current business is adopted to perform business data processing on the data to be processed to obtain a second business data result, including: In a case where the data format is the second type of data format, extracting the service identifier of the data to be processed from the data to be processed; The service identifier is deleted from the data to be processed to obtain the second business data result.

5. The method according to claim 1, wherein The determining, based on the first business data result and the second business data result, a business processing result of the current business includes: Determine a business processing method corresponding to the current business; The business processing method is called to perform business logic processing on the first business data result and the second business data result to obtain the business processing result of the current business.

6. The method according to claim 1, characterized in that The method further comprises: Encoding the service processing result to obtain encoded service data; The encoded service data is transmitted to the terminal that sends the data processing request.

7. The method according to any one of claims 1 to 6, characterized in that The data in the first data format includes RPC / HTTP protocol data, and the data in the second data format includes UDP protocol data; the method further includes: In a case where the data to be processed is the RPC / HTTP protocol data, performing a subpacketization operation on the RPC / HTTP protocol data to obtain a packet header of the RPC / HTTP protocol data and business data of the RPC / HTTP protocol data; Based on the packet header and the first type of data processing method for the RPC / HTTP protocol data under the current service, performing service data processing on the service data to obtain a first service data result corresponding to the RPC / HTTP protocol data; When the data to be processed is the UDP protocol data, the second type of data processing method for the UDP protocol data under the current business is adopted to perform business data processing on the UDP protocol data to obtain a second business data result corresponding to the UDP protocol data.

8. The method according to any one of claims 1 to 6, characterized in that The method further comprises: When the number of the second business data results meets a preset business logic processing condition, determining a second business data result set; The business processing method corresponding to the current business is called, and business logic processing is performed on the second business data result set to obtain the business processing result set of the current business.

9. A data processing device, characterized in that: include: A data parsing module is used to respond to the data processing request of the current business, parse the data to be processed, and obtain the data format of the data to be processed; A subpackaging module is used to perform a subpackaging operation on the data to be processed when the data format is the first type of data format, to obtain a packet header of the data to be processed and business data of the data to be processed; A first business data processing module is configured to perform business data processing on the business data based on the packet header and a first data processing method for the data in the first data format under the current business to obtain a first business data result; a second business data processing module configured to, when the data format is a second type of data format, perform business data processing on the data to be processed using a second type of data processing method for data in the second type of data format under the current business to obtain a second business data result; The business processing result determination module is used to determine the business processing result of the current business based on the first business data result and the second business data result.

10. An electronic device, characterized in that: include: a memory for storing computer-executable instructions; A processor, configured to implement the data processing method according to any one of claims 1 to 8 when executing the computer-executable instructions stored in the memory.

11. A computer-readable storage medium, characterized in that Computer-executable instructions are stored, and when the computer-executable instructions are executed by a processor, the data processing method according to any one of claims 1 to 8 is implemented.

12. A computer program product, characterized in that The computer program product includes computer-executable instructions stored in a computer-readable storage medium; Wherein, when the processor of the electronic device reads the computer-executable instructions from the computer-readable storage medium and executes the computer-executable instructions, the data processing method according to any one of claims 1 to 8 is implemented.