Data transmission method, device, electronic device and storage medium

By mapping the kernel space address of network card data to user space, receiving programmable requests from the client and generating programmable parameters, the problem of low VOLTE data transmission efficiency and inability to transmit according to user needs is solved, and efficient and personalized data transmission is achieved .

CN114401232BActive Publication Date: 2025-02-11CHINA TELECOM CORP LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111611784.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-27
Publication Date
2025-02-11
Estimated Expiration
2041-12-27

AI Technical Summary

Technical Problem

The existing VOLTE data transmission technology is inefficient and cannot transmit data according to user needs.

Method used

By mapping the kernel space address of network card data to user space, receiving programmable requests from the client, determining the target programmable capability, and generating programmable parameters based on this capability to realize data transmission.

Benefits of technology

It improves data transmission efficiency, can screen and transmit data according to user needs, and meet personalized needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114401232B_ABST
    Figure CN114401232B_ABST
Patent Text Reader

Abstract

The embodiments of the present application provide a data transmission method, device, electronic device and storage medium for improving data transmission efficiency and performing data transmission according to user needs. The method comprises: mapping the kernel space address of network card data to user space; receiving a programmable request sent by a client based on the user space; wherein the programmable request includes a programming requirement input by the user; determining a target programmable capability corresponding to the programming requirement; if the target programmable capability is a preset programmable capability, generating a programmable parameter according to the target programmable capability; and transmitting data to the client based on the programmable parameter.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of mobile communication technology, and in particular to a data transmission method, device, electronic equipment and storage medium. Background Art

[0002] With the development of mobile communication technology, Voice Over Long-Term Evolution (VOLTE) call services account for an important share of the entire communication business. The amount of VOLTE data in a province can reach more than hundreds of thousands per second, and there are many types of VOLTE transmission, such as location events, SMS events, roaming, calling and being called, hang up, failure and record events.

[0003] At present, the transport layer based on VOLTE data transmission is mainly based on the kernel protocol stack, and data is transmitted to the user space through the kernel space, resulting in low data transmission efficiency. In addition, the current Linux kernel protocol stack cannot provide extended programming capabilities for specific types of transmission. When the server faces network card data, it is more passive in receiving and transmitting, and cannot process the network card data, that is, it cannot transmit data according to user needs. Summary of the invention

[0004] The embodiments of the present application provide a data transmission method, device, electronic device and storage medium for improving data transmission efficiency and performing data transmission according to user needs.

[0005] In a first aspect, a data transmission method is provided, the method comprising:

[0006] Map the kernel space address of the network card data to the user space;

[0007] Receiving a programmable request sent by a client based on the user space; wherein the programmable request includes a programming requirement input by a user;

[0008] Determine a target programmable capability corresponding to the programming requirement;

[0009] If the target programmable capability is a preset programmable capability, generating a programmable parameter according to the target programmable capability;

[0010] Data is transmitted to the client based on the programmable parameters.

[0011] Optionally, transmitting data to the client based on the programmable parameter includes:

[0012] determining whether the programmable parameters meet programming parameter requirements;

[0013] If the programmable parameters meet the programming parameter requirements, data is transmitted to the client based on the programmable parameters.

[0014] Optionally, determining whether the programmable parameter meets the programming parameter requirement includes:

[0015] sending the programmable parameters to the client;

[0016] Receiving a response message sent by the client based on the programmable parameters;

[0017] Determine whether the programmable parameter meets the programming parameter requirement according to the response message.

[0018] Optionally, if the target programmable capability is a data tunnel programmable capability, transmitting data to the client based on the programmable parameter includes:

[0019] Generate a data plane flow control strategy based on the programmable parameters;

[0020] Filter the collected traffic based on the data plane flow control strategy to obtain target transmission data;

[0021] The target transmission data is transmitted to the client.

[0022] Optionally, if the target programmable capability is a data quality programmable capability, transmitting data to the client based on the programmable parameter includes:

[0023] determining a target packet loss rate based on the programmable parameters;

[0024] Determine a message parameter corresponding to the discarded message according to the target packet loss rate, discard the message based on the message parameter, and obtain the target transmission message; or randomly discard the message according to the target packet loss rate to obtain the target transmission message;

[0025] The target transmission message is transmitted to the client.

[0026] Optionally, if the target programmable capability is a data delay programmable capability, transmitting data to the client based on the programmable parameter includes:

[0027] Determine whether the current network bandwidth is greater than or equal to a preset threshold;

[0028] If the current network bandwidth is less than a preset threshold, the priority and message delay rate of each message in the plurality of messages to be sent are determined based on the programmable parameters; wherein the message delay rate is used to indicate the time during which the corresponding message can be delayed in sending.

[0029] Determining the transmission time of each message according to the priority of each message and the corresponding message delay rate;

[0030] Transmit a corresponding message to the client based on the transmission time.

[0031] In a second aspect, a data transmission device is provided, the device comprising:

[0032] A processing module, used for mapping the kernel space address of the network card data to the user space;

[0033] A communication module, configured to receive a programmable request sent by a client based on the user space; wherein the programmable request includes a programming requirement input by a user;

[0034] The processing module is further used to determine the target programmable capability corresponding to the programming requirement;

[0035] The processing module is further configured to generate a programmable parameter according to the target programmable capability when the target programmable capability is a preset programmable capability;

[0036] The communication module is further used to transmit data to the client based on the programmable parameters.

[0037] Optionally, the processing module is specifically used to:

[0038] determining whether the programmable parameters meet programming parameter requirements;

[0039] When it is determined that the programmable parameters meet the programming parameter requirements, the communication module is controlled to transmit data to the client based on the programmable parameters.

[0040] Optionally, the communication module is further used for:

[0041] sending the programmable parameters to the client;

[0042] Receiving a response message sent by the client based on the programmable parameters;

[0043] The processing module is specifically used for:

[0044] Determine whether the programmable parameter meets the programming parameter requirement according to the response message.

[0045] Optionally, if the target programmable capability is a data tunnel programmable capability, the processing module is specifically configured to:

[0046] Generate a data plane flow control strategy based on the programmable parameters;

[0047] Filter the collected traffic based on the data plane flow control strategy to obtain target transmission data;

[0048] The communication module is specifically used for:

[0049] The target transmission data is transmitted to the client.

[0050] Optionally, if the target programmable capability is data quality programmable capability, the processing module is specifically configured to:

[0051] determining a target packet loss rate based on the programmable parameters;

[0052] Determine a message parameter corresponding to the discarded message according to the target packet loss rate, discard the message based on the message parameter, and obtain the target transmission message; or randomly discard the message according to the target packet loss rate to obtain the target transmission message;

[0053] The communication module is specifically used for:

[0054] The target transmission message is transmitted to the client.

[0055] Optionally, if the target programmable capability is data delay programmable capability, the processing module is specifically configured to:

[0056] Determine whether the current network bandwidth is greater than or equal to a preset threshold;

[0057] If the current network bandwidth is less than a preset threshold, the priority and message delay rate of each message in the plurality of messages to be sent are determined based on the programmable parameters; wherein the message delay rate is used to indicate the time during which the corresponding message can be delayed in sending.

[0058] Determining the transmission time of each message according to the priority of each message and the corresponding message delay rate;

[0059] The communication module is specifically used for:

[0060] Transmit a corresponding message to the client based on the transmission time.

[0061] According to a third aspect, an electronic device is provided, the electronic device comprising:

[0062] A memory for storing program instructions;

[0063] The processor is used to call the program instructions stored in the memory, and execute the steps included in any one of the methods described in the first aspect according to the obtained program instructions.

[0064] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the steps included in any one of the methods described in the first aspect.

[0065] In a fifth aspect, a computer program product comprising instructions is provided, and when the computer program product is run on a computer, the computer is enabled to execute the data transmission method described in the above-mentioned various possible implementations.

[0066] In an embodiment of the present application, the kernel space address of the network card data is mapped to the user space, and a programmable request sent by the client is received based on the user space, wherein the programmable request includes the programming requirements input by the user, and the target programmable capability corresponding to the programming requirements is determined. If the target programmable capability is a preset programmable capability, a programmable parameter is generated according to the target programmable capability, and data is transmitted to the client based on the programmable parameter. In other words, the present application achieves direct mapping of kernel data to user space by mapping the kernel space address of the network card data to the user space, avoiding the copy from the kernel space to the user space, effectively improving the data transmission efficiency, and the user space can receive the user's data requirements (i.e., programming requirements), perform data screening according to the user's data requirements, and transmit the screened data to the user client, thereby achieving the purpose of data transmission according to user requirements. BRIEF DESCRIPTION OF THE DRAWINGS

[0067] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for describing the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application.

[0068] Figure 1 A flowchart of a data transmission method provided in an embodiment of the present application;

[0069] Figure 2 A flowchart of establishing a basic module of a programmable white box protocol stack provided in an embodiment of the present application;

[0070] Figure 3 A flowchart of transmitting data to a client based on programmable parameters provided in an embodiment of the present application;

[0071] Figure 4 Another flowchart of transmitting data to a client based on programmable parameters provided in an embodiment of the present application;

[0072] Figure 5 Another flowchart of transmitting data to a client based on programmable parameters provided in an embodiment of the present application;

[0073] Figure 6 A structural block diagram of a data transmission device provided in an embodiment of the present application;

[0074] Figure 7 Schematic diagram of the structure of a computer device in an embodiment of the present invention. DETAILED DESCRIPTION

[0075] In order to make the purpose, technical scheme and advantages of the present application clearer, the technical scheme in the embodiment of the present application will be clearly and completely described below in conjunction with the drawings in the embodiment of the present application. Obviously, the described embodiment is only a part of the embodiment of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application. In the absence of conflict, the embodiments in the present application and the features in the embodiments can be combined with each other arbitrarily. In addition, although the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in an order different from that here.

[0076] The terms "first" and "second" in the specification and claims of the present application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the term "comprising" and any of their variations are intended to cover non-exclusive protection. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices. "Multiple" in the present application can mean at least two, for example, two, three or more, and the embodiments of the present application are not limited.

[0077] In addition, the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article, unless otherwise specified, generally indicates that the associated objects before and after are in an "or" relationship.

[0078] The following is an introduction to the data transmission method provided by the embodiment of the present application in conjunction with the accompanying drawings. Figure 1 As shown, the process of the data transmission method in the embodiment of the present application is described as follows:

[0079] Step 101: Map the kernel space address of the network card data to the user space;

[0080] In the embodiments of the present application, considering that the data transmission layer in the prior art is mainly based on the kernel protocol stack, during the data transmission process, the server first needs to transfer the data in the kernel space to the user space, and then transfer the data to the client through the user space, and the data transmission efficiency is low. Therefore, the present application virtualizes the network card function and maps the kernel space address of the network card data to the user space, so that the kernel data can be directly mapped to the user space, avoiding the copying or transmission of the kernel space to the user space data, and can effectively improve the data transmission efficiency.

[0081] In one possible implementation, after mapping the kernel space address of the network card data to the user space, the server can also establish a programmable white box protocol stack, and formulate transparent programmable capabilities (i.e., the preset programmable capabilities described below) in the user-mode protocol stack according to the different needs of different users, which are used to control the programmable white box protocol stack to perform corresponding functions. Among them, when establishing a programmable white box protocol stack, first initialize the interfaces of each layer of the white box protocol stack (for example, the link layer network interface and the transport layer network interface), and load the basic protocol stack module (for example, the link layer network function virtualization module), and then load the virtual network card data fast receiving module, receive the network card data and save the received network card data to the memory data queue, initialize the programmable module, and establish the basic module of the programmable white box protocol stack. Specifically, the steps for establishing the basic module of the programmable white box protocol stack are as follows: Figure 2 As shown:

[0082] Step 2-1: Initialize the network card virtualization module and map the kernel space address of the network card data to the user space;

[0083] Step 2-2: Establish a three-layer cache mechanism, load pre-storage and pre-fetch modules, and save the programming requirement chain customized by common clients;

[0084] Step 2-3: Create 1 / 2 of the server machine's memory as a large page;

[0085] Step 2-4: Create a user-mode protocol stack data storage module based on mbuf.

[0086] Step 2-5: Establish a data trigger module, bind the specific transmission events triggered by the network card data to a linked list, and trigger in real time.

[0087] In one possible implementation, when the server starts, it preferentially reads a list of clients that have applied for access and have programmable request attributes from a local file list (i.e., the programming data link saved in the aforementioned step 2-2), transmits data to each client according to its corresponding programming requirements, and while the server is running, listens to the client's programmable request through the user-mode protocol stack, and executes step 102 when a programmable request sent by the client is listened to.

[0088] Step 102: receiving a programmable request sent by a client based on a user space;

[0089] The programmable request includes programming requirements input by the user. For example, if the user only pays attention to hang-up events and SMS events, the user can input the hang-up events and SMS events as requirements into the client, and send a programmable request to the server through the client.

[0090] Step 103: Determine the target programmable capability corresponding to the programming requirement;

[0091] In an embodiment of the present application, the type of data required by the user can be determined according to the programming requirements, and the processing that needs to be performed on the data transmitted to the user can be determined (i.e., the target programmable capability corresponding to the programming requirements is determined). For example, if the programming requirements input by the user are hang-up events and SMS events, the server determines that the data transmitted to the user needs to be screened, and only the data corresponding to the hang-up events and SMS events are transmitted. The determined target programmable capability is, for example, the data tunnel programmable capability; if the programming requirement input by the user is data real-time, the server determines that the data transmitted to the user must be guaranteed to be real-time, and it is necessary to give priority to ensuring the transmission of data to the user, and there is no need to retransmit data when an abnormality occurs in the transmitted data, etc. The determined target programming capability is, for example, the real-time capability programmable capability; if the programming requirement input by the user is sampling data to view a certain type of overall data trend or overall behavior analysis, the server determines that the data transmitted to the user needs to ensure data quality, so part of the data can be discarded when transmitting data to reduce the transmission bandwidth, thereby ensuring the quality of data transmission, and the determined target programming capability is, for example, the data quality programmable capability.

[0092] Step 104: if the target programmable capability is a preset programmable capability, generating programmable parameters according to the target programmable capability;

[0093] Among them, the preset programmable capabilities include but are not limited to data tunnel programmable capabilities, data quality programmable capabilities, data throughput programmable capabilities, data delay rate programmable capabilities, real-time capability programmable capabilities and abnormal traffic audit programmable capabilities.

[0094] In an embodiment of the present application, when the target capability becomes a preset programmable capability, programmable parameters are generated according to the target programmable capability, such as programming mode parameters corresponding to different programmable capabilities. In a possible implementation, after generating the programmable parameters, it is also possible to determine whether the programmable parameters meet the programming parameter requirements. Specifically, the server can send the programmable parameters to the client, and the user determines whether the programmable parameters meet the requirements. If they meet, a response message that meets the requirements is returned to the server through the client. If they do not meet, a response message that does not meet the requirements is returned to the server. The server determines whether the programmable parameters meet the programming parameter requirements based on the response message. If the server determines that the programmable parameters meet the programming parameter requirements based on the response message sent by the client, step 105 is executed. In a possible implementation, if the server determines that the programmable parameters do not meet the programming parameter requirements based on the response message sent by the client, the programmable parameters can be regenerated based on the programming requirements and sent to the client for the user to confirm. If the number of regenerations exceeds the preset number, the programmable parameters will not be generated again, and data transmission will be performed directly based on the traditional method.

[0095] In a possible implementation, if the target programmable capability is not a preset programmable capability, or there is no special requirement in the programming requirement input by the user, the input operation interface of the Linux kernel is directly called to transmit data to the client.

[0096] Step 105: Transmit data to the client based on programmable parameters.

[0097] As mentioned above, the preset programmable capabilities include data tunnel programmable capability, data quality programmable capability, data throughput programmable capability, data delay rate programmable capability, real-time capability programmable capability and abnormal traffic audit programmable capability.

[0098] If the target programmable capability is the data tunnel programmable capability, the specific steps of transmitting data to the client based on the programmable parameters are as follows: Figure 3 As shown:

[0099] Step 3-1: Generate a data plane flow control strategy based on programmable parameters;

[0100] Step 3-2: Filter the collected traffic based on the data plane flow control strategy to obtain the target transmission data;

[0101] Step 3-3: Transmit the target transmission data to the client.

[0102] Specifically, a diversion module and a tunnel module are loaded in the programmable white box protocol stack, a data plane flow control strategy is generated, the collected traffic is filtered by the diversion module based on the data plane flow control strategy, the target collected traffic (i.e., the target transmission data) is obtained, the target transmission data is redirected to the vxlan dedicated tunnel (i.e., the tunnel module), and the target transmission data is transmitted to the client through the vxlan dedicated tunnel. For example, the programming requirement sent by user A through client A is an on-hook event. At this time, the tunnel module is a vxlan dedicated tunnel for transmitting the target transmission data of the on-hook event. If the programming requirement sent by user A through client A is an on-hook event and a text message event, the tunnel module at this time is a combination tunnel of the vxlan dedicated tunnel for transmitting the target transmission data of the on-hook event and the vxlan dedicated tunnel for transmitting the target transmission data of the text message event.

[0103] In some other embodiments, after loading the tunnel module, a client information hash table can be established in the tunnel module to mix and bind the client information and programming requirement events (i.e., establish a mapping relationship between the tunnel module and the client). In a possible implementation, before loading the tunnel module in the white box protocol stack, it can also be determined whether there is already a tunnel module corresponding to the client. If there is already a tunnel module corresponding to the client, the data is directly redirected to the tunnel module to transmit the data.

[0104] In the specific implementation process, the server combines specific types of data and channels by establishing a vxlan dedicated tunnel with a specific data combination, so that the client does not need to split the data, making data use simpler and efficiency greatly improved.

[0105] If the target programmable capability is data quality programmable capability, the specific steps for transmitting data to the client based on programmable parameters are as follows: Figure 4 As shown:

[0106] Step 4-1: Determine a target packet loss rate based on programmable parameters;

[0107] In the embodiment of the present application, after determining the target packet loss rate, the target transmission message can be obtained in two ways, namely, the target transmission message can be obtained in the ways corresponding to steps 4-2 to 4-3 and step 4-4 respectively.

[0108] Step 4-2: Determine the message parameters corresponding to the discarded message according to the target packet loss rate;

[0109] Step 4-3: discard the message based on the message parameters to obtain the target transmission message;

[0110] Step 4-4: randomly discard packets according to the target packet loss rate to obtain the target transmission packet;

[0111] Step 4-5: Transmit the target transmission message to the client.

[0112] Specifically, a data quality programming module is loaded in the programmable white box protocol stack, the TCP / UDP target packet loss rate is determined according to programmable parameters, a packet loss factor is injected into the TCP / UDP protocol, and the data quality programming module discards the message based on the packet loss in the TCP / UDP protocol (randomly discard or discard according to certain discard rules, that is, discard according to the message parameters corresponding to the discarded message). In a possible implementation, when using the TCP / UDP protocol to transmit messages, the message data quality (that is, the target packet loss rate) can be adjusted in real time to reduce the transmission bandwidth.

[0113] In the specific implementation process, when the user does not need the full amount of data, some messages are discarded, which lowers the threshold for users to use data and enables various application layers of the client to process the data.

[0114] If the target programmable capability is data delay programmable capability, the specific steps of transmitting data to the client based on programmable parameters are as follows: Figure 5 As shown:

[0115] Step 5-1: Determine whether the current network bandwidth is greater than or equal to a preset threshold;

[0116] Step 5-2: If the current network bandwidth is less than a preset threshold, determining the priority and message delay rate of each message among the multiple messages to be sent based on programmable parameters;

[0117] The message delay rate is used to indicate the time during which the corresponding message can be delayed in sending.

[0118] Step 5-3: Determine the transmission time of each message according to the priority of each message and the corresponding message delay rate;

[0119] Step 5-4: Transmitting a corresponding message to the client based on the transmission time.

[0120] Specifically, a delay programmable module and a timer module are loaded in the programmable white box protocol stack, a bidirectional linked list cache is established for the delay programmable module, a red-black tree cache is established for the timer module, and it is determined whether the current network bandwidth is greater than or equal to a preset threshold. If it is less than the preset threshold, it indicates that the current network bandwidth is insufficient, resources are tight, and the client itself begins to delay processing. At this time, the delay programmable module can be used to configure a delay queue based on the message priority, and the timer module can be used to trigger the TCP / UDP transmission message according to the transmission time of each message to ensure the optimal use of data.

[0121] In the specific implementation process, when the current network bandwidth is insufficient, resources are tight, and the client itself starts to process delays, by configuring a delay queue, the server bears the data pressure, making data application no longer difficult.

[0122] If the target programmable capability is a real-time programmable capability, a real-time capability module is loaded in the programmable white box protocol stack when transmitting data to the client based on programmable parameters, a multi-threaded asynchronous IO mechanism is enabled based on programmable parameters, and data is transmitted through multiple channels.

[0123] If the target programmable capability is data throughput programmable capability, the process asynchronous module is loaded in the programmable white box protocol stack when transmitting data to the client based on programmable parameters, and the multi-threaded asynchronous IO mechanism is enabled based on programmable parameters to ensure transmission throughput.

[0124] If the target programmable capability is the abnormal traffic audit programmable capability, the traffic control module is loaded in the programmable white box protocol stack when transmitting data to the client based on programmable parameters. When the traffic is abnormal based on programmable parameters, current limiting and peak shaving are performed to ensure the flexibility of data transmission.

[0125] Based on the same inventive concept, the embodiment of the present application provides a data transmission device, which can implement the functions corresponding to the aforementioned data transmission method. The data transmission device can be a hardware structure, a software module, or a hardware structure plus a software module. The data transmission device can be implemented by a chip system, which can be composed of a chip or include a chip and other discrete devices. See Figure 6 As shown, the data transmission device includes a processing module 601 and a communication module 602. Among them:

[0126] Processing module 601, used for mapping the kernel space address of the network card data to the user space;

[0127] The communication module 602 is used to receive a programmable request sent by a client based on the user space; wherein the programmable request includes a programming requirement input by a user;

[0128] The processing module 601 is further used to determine the target programmable capability corresponding to the programming requirement;

[0129] The processing module 601 is further configured to generate a programmable parameter according to the target programmable capability when the target programmable capability is a preset programmable capability;

[0130] The communication module 602 is further configured to transmit data to the client based on the programmable parameters.

[0131] Optionally, the processing module 601 is specifically configured to:

[0132] determining whether the programmable parameters meet programming parameter requirements;

[0133] When it is determined that the programmable parameters meet the programming parameter requirements, the communication module 602 is controlled to transmit data to the client based on the programmable parameters.

[0134] Optionally, the communication module 602 is further used for:

[0135] sending the programmable parameters to the client;

[0136] Receiving a response message sent by the client based on the programmable parameters;

[0137] The processing module 601 is specifically used for:

[0138] Determine whether the programmable parameter meets the programming parameter requirement according to the response message.

[0139] Optionally, if the target programmable capability is a data tunnel programmable capability, the processing module 601 is specifically configured to:

[0140] Generate a data plane flow control strategy based on the programmable parameters;

[0141] Filter the collected traffic based on the data plane flow control strategy to obtain target transmission data;

[0142] The communication module 602 is specifically used for:

[0143] The target transmission data is transmitted to the client.

[0144] Optionally, if the target programmable capability is data quality programmable capability, the processing module 601 is specifically configured to:

[0145] determining a target packet loss rate based on the programmable parameters;

[0146] Determine a message parameter corresponding to the discarded message according to the target packet loss rate, discard the message based on the message parameter, and obtain the target transmission message; or randomly discard the message according to the target packet loss rate to obtain the target transmission message;

[0147] The communication module 602 is specifically used for:

[0148] The target transmission message is transmitted to the client.

[0149] Optionally, if the target programmable capability is data delay programmable capability, the processing module 601 is specifically configured to:

[0150] Determine whether the current network bandwidth is greater than or equal to a preset threshold;

[0151] If the current network bandwidth is less than a preset threshold, the priority and message delay rate of each message in the plurality of messages to be sent are determined based on the programmable parameters; wherein the message delay rate is used to indicate the time during which the corresponding message can be delayed in sending.

[0152] Determining the transmission time of each message according to the priority of each message and the corresponding message delay rate;

[0153] The communication module 602 is specifically used for:

[0154] Transmit a corresponding message to the client based on the transmission time.

[0155] All relevant contents of each step involved in the aforementioned embodiment of the data transmission method can be referred to the functional description of the functional module corresponding to the data transmission device in the embodiment of the present application, and will not be repeated here.

[0156] The division of modules in the embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, each functional module in each embodiment of the present application may be integrated into a processor, or may exist physically separately, or two or more modules may be integrated into one module. The above-mentioned integrated modules may be implemented in the form of hardware or in the form of software functional modules.

[0157] Based on the same inventive concept, the present application embodiment provides an electronic device. Figure 7 As shown, the electronic device includes at least one processor 701 and a memory 702 connected to the at least one processor. The specific connection medium between the processor 701 and the memory 702 is not limited in the embodiment of the present application. Figure 7 In the example, the processor 701 and the memory 702 are connected via a bus 700. Figure 7 The connections between other components are shown in bold lines, and are not intended to be limiting. The bus 700 can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, Figure 7 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0158] In the embodiment of the present application, the memory 702 stores instructions that can be executed by at least one processor 701. The at least one processor 701 can execute the steps included in the aforementioned data transmission method by executing the instructions stored in the memory 702.

[0159] Among them, the processor 701 is the control center of the electronic device, which can use various interfaces and lines to connect various parts of the entire electronic device, and monitor the electronic device as a whole by running or executing instructions stored in the memory 702 and calling data stored in the memory 702, various functions of the electronic device and processing data. Optionally, the processor 701 may include one or more processing units, and the processor 701 may integrate an application processor and a modem processor, wherein the application processor mainly processes operating systems and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 701. In some embodiments, the processor 701 and the memory 702 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on independent chips.

[0160] Processor 701 can be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, and can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the data transmission method disclosed in the embodiments of the present application can be directly embodied as a hardware processor to be executed, or a combination of hardware and software modules in the processor can be executed.

[0161] The memory 702 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 702 may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (Random Access Memory, RAM), a static random access memory (Static Random Access Memory, SRAM), a programmable read-only memory (Programmable Read Only Memory, PROM), a read-only memory (Read Only Memory, ROM), an electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), a magnetic memory, a disk, an optical disk, etc. The memory 702 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 702 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.

[0162] By designing and programming the processor 701, the code corresponding to the data transmission method introduced in the aforementioned embodiment can be solidified into the chip, so that the chip can execute the steps of the aforementioned data transmission method during operation. How to design and program the processor 701 is a technology well known to those skilled in the art and will not be repeated here.

[0163] Based on the same inventive concept, an embodiment of the present application also provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are executed on a computer, the computer executes the steps of the aforementioned data transmission method.

[0164] In some possible implementations, various aspects of the data transmission method provided by the present application may also be implemented in the form of a program product, which includes a program code. When the program product is run on an electronic device, the program code is used to enable the detection device to execute the steps of the data transmission method according to various exemplary implementations of the present application described above in this specification.

[0165] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0166] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0167] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1A function specified in one or more boxes.

[0168] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0169] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A data transmission method, characterized in that: The method comprises: Map the kernel space address of the network card data to the user space; Receiving a programmable request sent by a client based on the user space; wherein the programmable request includes a programming requirement input by a user, and the programming requirement is used to indicate a processing method for processing the data to be transmitted; Determine a target programmable capability corresponding to the programming requirement; If the target programmable capability is a preset programmable capability, programmable parameters are generated according to the target programmable capability, wherein the preset programmable capability includes data tunnel programmable capability, data quality programmable capability, data throughput programmable capability, data delay rate programmable capability, real-time capability programmable capability and abnormal traffic audit programmable capability; Data is transmitted to the client based on the programmable parameters.

2. The method according to claim 1, characterized in that The transmitting data to the client based on the programmable parameter comprises: determining whether the programmable parameters meet programming parameter requirements; If the programmable parameters meet the programming parameter requirements, data is transmitted to the client based on the programmable parameters.

3. The method according to claim 2, characterized in that The determining whether the programmable parameter meets the programming parameter requirement includes: sending the programmable parameters to the client; Receiving a response message sent by the client based on the programmable parameters; Determine whether the programmable parameter meets the programming parameter requirement according to the response message.

4. The method according to claim 1, characterized in that If the target programmable capability is a data tunnel programmable capability, transmitting data to the client based on the programmable parameter includes: Generate a data plane flow control strategy based on the programmable parameters; Filter the collected traffic based on the data plane flow control strategy to obtain target transmission data; The target transmission data is transmitted to the client.

5. The method according to claim 1, characterized in that If the target programmable capability is a data quality programmable capability, transmitting data to the client based on the programmable parameter includes: determining a target packet loss rate based on the programmable parameters; Determine a message parameter corresponding to the discarded message according to the target packet loss rate, discard the message based on the message parameter, and obtain the target transmission message; or randomly discard the message according to the target packet loss rate to obtain the target transmission message; The target transmission message is transmitted to the client.

6. The method according to claim 1, characterized in that If the target programmable capability is a data delay programmable capability, transmitting data to the client based on the programmable parameter includes: Determine whether the current network bandwidth is greater than or equal to a preset threshold; If the current network bandwidth is less than the preset threshold, the priority and message delay rate of each message in the plurality of messages to be sent are determined based on the programmable parameters; wherein the message delay rate is used to indicate the time that the corresponding message can be delayed in sending Determining the transmission time of each message according to the priority of each message and the corresponding message delay rate; Transmit a corresponding message to the client based on the transmission time.

7. A data transmission device, characterized in that: The device comprises: A processing module, used for mapping the kernel space address of the network card data to the user space; A communication module, configured to receive a programmable request sent by a client based on the user space; wherein the programmable request includes a programming requirement input by a user, and the programming requirement is used to indicate a processing method for processing the data to be transmitted; The processing module is further used to determine the target programmable capability corresponding to the programming requirement; The processing module is further configured to generate programmable parameters according to the target programmable capability when the target programmable capability is a preset programmable capability, wherein the preset programmable capability includes a data tunnel programmable capability, a data quality programmable capability, a data throughput programmable capability, a data delay rate programmable capability, a real-time capability programmable capability, and an abnormal traffic audit programmable capability; The communication module is further used to transmit data to the client based on the programmable parameters.

8. The device according to claim 7, characterized in that The processing module is specifically used for: determining whether the programmable parameters meet programming parameter requirements; When it is determined that the programmable parameters meet the programming parameter requirements, the communication module is controlled to transmit data to the client based on the programmable parameters.

9. An electronic device, characterized in that: include: A memory for storing program instructions; A processor is used to call the program instructions stored in the memory, and execute the steps included in the method according to any one of claims 1 to 6 according to the obtained program instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a computer, the computer executes the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Network card configuration method, host equipment, network card equipment and storage medium

    CN112540801A

  • Data transmission method and device based on RDMA (Remote Direct Memory Access) under Linux operating system

    CN112948318A

  • Data transmission method, device and equipment and computer readable storage medium

    CN113098955A