Data transmission method and device of network layer, storage medium and electronic device

In the operating system of the base station equipment, data is transmitted in a one-to-one correspondence between multiple network layers and the memory space to improve the data transmission efficiency of the network layer. This solves the problem of low data transmission efficiency between network layers in the existing technology and realizes for more efficient data processing and communication performance.

CN118714142AInactive Publication Date: 2024-09-27SUNWAVE COMM +1
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202411196147.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2024-09-27
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the existing technology, the data transmission efficiency between network layers is low, especially when processing large traffic services, resulting in a significant reduction in transmission efficiency.

Method used

In the operating system protocol stack program of the base station equipment, multiple network layers correspond to multiple memory spaces one-to-one, the data to be transmitted is obtained and the storage location is applied for in the first memory space, and the target data is stored and the storage location information is transferred to Adjacent network layers use this information for data processing to avoid direct data transmission between network layers.

Benefits of technology

It improves the data transmission efficiency of the network layer, reduces the data transmission volume and processing delay, and improves the overall performance and stability of the communication system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118714142A
    Figure CN118714142A
Patent Text Reader

Abstract

The invention discloses a network layer data transmission method and device, a storage medium and an electronic device, a protocol stack program of an operating system of a base station device comprises a plurality of network layers connected in sequence, the plurality of network layers are in one-to-one correspondence with a plurality of memory spaces, and the method is applied to a first network layer in the plurality of network layers. The method comprises: obtaining target data to be transmitted to a second network layer, the second network layer being a network layer adjacent to a first network layer in a plurality of network layers; applying for a target storage position in a first memory space corresponding to the first network layer; storing the target data to a target storage position in the first memory space; the target position information of the target storage position is transmitted to the second network layer, the second network layer is used for obtaining the target data from the target storage position according to the target position information and processing the target data, and by adopting the technical scheme, the problems that in the related technology, the data transmission efficiency of the network layer is low and the like are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a network layer data transmission method and device, a storage medium and an electronic device. Background Art

[0002] The protocol stack program of the base station runs on the operating system. The protocol stack program includes multiple network layers. The base station needs to use the protocol stack program to send / receive data through multiple network layers. Each network layer runs in the embedded chip, and each network layer runs independently inside the chip.

[0003] Currently, the data transmission method between multiple network layers is to directly transmit data from one network layer to another network layer. This method is to directly transmit data between each network layer, so the transmission efficiency is low, especially when dealing with large-volume services, involving a large number of data packets that need to be transmitted between each other. The defect of low transmission efficiency is particularly obvious.

[0004] In view of the low data transmission efficiency of the network layer and other problems in the related technologies, no effective solution has been proposed yet. Summary of the invention

[0005] The embodiments of the present application provide a network layer data transmission method and device, a storage medium, and an electronic device to at least solve the problem of low data transmission efficiency at the network layer in the related art.

[0006] According to an embodiment of the present application, a network layer data transmission method is provided, wherein a protocol stack program of an operating system of a base station device includes a plurality of network layers connected in sequence, wherein the plurality of network layers correspond one-to-one to a plurality of memory spaces, and the method is applied to a first network layer among the plurality of network layers, and the method includes:

[0007] Acquire target data to be transmitted to a second network layer, wherein the second network layer is a network layer adjacent to the first network layer among the multiple network layers;

[0008] Applying for a target storage location in a first memory space corresponding to the first network layer;

[0009] storing the target data at the target storage location in the first memory space;

[0010] The target location information of the target storage location is transmitted to the second network layer, wherein the second network layer is used to obtain the target data from the target storage location according to the target location information and process the target data.

[0011] Optionally, the first memory space includes a first uplink memory space and / or a first downlink memory space, a first uplink identifier corresponding to the first uplink memory space is created in the operating system, and / or a first downlink identifier corresponding to the first downlink memory space is created in the operating system, and the target location information of the target storage location is transmitted to the second network layer, including at least one of the following:

[0012] In the case where the target data is uplink data, the target location information is written into the first uplink identifier, wherein the second network layer is an uplink adjacent network layer of the first network layer, the target storage location is located in the first uplink memory space, and the second network layer is used to monitor the location information in the first uplink identifier and obtain data from the first uplink memory space according to the location information monitored on the first uplink identifier and process the obtained data;

[0013] When the target data is downlink data, the target location information is written into the first downlink identifier, wherein the second network layer is a downstream adjacent network layer of the first network layer, the target storage location is located in the first downlink memory space, and the second network layer is used to monitor the location information in the first downlink identifier and obtain data from the first downlink memory space according to the location information monitored on the first downlink identifier and process the obtained data.

[0014] Optionally, a plurality of space identifiers corresponding to the plurality of memory spaces are created in the operating system, and after the target location information of the target storage location is transmitted to the second network layer, the method further includes:

[0015] Monitoring a first space identifier corresponding to the first memory space among the multiple space identifiers;

[0016] In case the target location information is monitored from the first space identifier, the target storage location is recovered to a memory resource pool, wherein the memory resource pool is used to record storage locations in the first memory space that are allowed to be allocated to the first network layer for storing data, and the target location information is written into the first space identifier by the second network layer after obtaining the target data from the target storage location according to the target location information and processing the target data.

[0017] Optionally, the first memory space includes a data index area and a data area.

[0018] The applying for a target storage location in the first memory space corresponding to the first network layer includes: allocating a data storage location for the target data in the data area as the target storage location, and obtaining a target storage address of the data storage location; storing the target storage address in the data index area and allocating a target index to the target storage address, and obtaining the target index and the target storage address having a corresponding relationship; and determining the target index as the target location information;

[0019] The storing the target data in the target storage location in the first memory space includes: storing the target data in the data storage location;

[0020] The transmitting the target location information of the target storage location to the second network layer includes: transmitting the target index to the second network layer.

[0021] Optionally, obtaining target data to be transmitted to the second network layer includes:

[0022] Receiving reference location information transmitted by a third network layer among the multiple network layers, wherein the third network layer is another network layer among the multiple network layers except the second network layer and adjacent to the first network layer;

[0023] Accessing a reference storage location indicated by the reference location information in a second memory space corresponding to the third network layer;

[0024] Acquire initial data from the reference storage location;

[0025] The initial data is subjected to protocol processing to obtain the target data.

[0026] Optionally, a listening thread is created on the first network layer, the second memory space includes a second uplink memory space and / or a second downlink memory space, a second uplink identifier corresponding to the second uplink memory space is created in the operating system and / or a second downlink identifier corresponding to the second downlink memory space is created in the operating system, and the receiving of reference location information transmitted by the third network layer among the multiple network layers includes:

[0027] Monitoring the second uplink identifier and / or the second downlink identifier through the monitoring thread;

[0028] In a case where the reference location information transmitted by the third network layer is monitored from the second uplink identifier, determining a storage location indicated by the reference location information in the second uplink memory space as the reference storage location;

[0029] In case that the reference location information transmitted by the third network layer is monitored from the second downlink identifier, the storage location indicated by the reference location information in the second downlink memory space is determined as the reference storage location.

[0030] According to another embodiment of the embodiment of the present application, a data transmission device of a network layer is further provided, wherein a protocol stack program of an operating system of a base station device includes a plurality of network layers connected in sequence, wherein the plurality of network layers correspond one-to-one to a plurality of memory spaces, and the device is applied to a first network layer of the plurality of network layers, and the device includes:

[0031] an acquisition module, configured to acquire target data to be transmitted to a second network layer, wherein the second network layer is a network layer adjacent to the first network layer among the multiple network layers;

[0032] An application module, used for applying for a target storage location in a first memory space corresponding to the first network layer;

[0033] A storage module, used for storing the target data in the target storage location in the first memory space;

[0034] A transfer module is used to transfer the target location information of the target storage location to the second network layer, wherein the second network layer is used to obtain the target data from the target storage location according to the target location information and process the target data.

[0035] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned network layer data transmission method when running.

[0036] According to another aspect of an embodiment of the present application, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the network layer data transmission method through the computer program.

[0037] In an embodiment of the present application, a data transmission method for a network layer is proposed. The protocol stack program of the operating system of the base station device includes a plurality of network layers connected in sequence, and the plurality of network layers correspond to a plurality of memory spaces one by one. The method is applied to the first network layer among the plurality of network layers. The first network layer first obtains the target data to be transmitted to the second network layer, wherein the second network layer is a network layer adjacent to the first network layer among the plurality of network layers; then, a target storage location is applied in the first memory space corresponding to the first network layer, and the target data is stored in the target storage location in the first memory space; finally, the target location information of the target storage location is transmitted to the second network layer, and then the second network layer can obtain the target data from the target storage location according to the target location information and process the target data. In this way, the problem of low transmission efficiency caused by the direct transmission of data between different network layers is avoided, and the interaction between the network layer and the memory space is adopted, and the characteristics of high efficiency of data interaction between the network layer and the memory space are utilized to improve the data transmission efficiency of the network layer. The above technical scheme is adopted to solve the problems of low data transmission efficiency of the network layer in the related technology, and the technical effect of improving the data transmission efficiency of the network layer is achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0039] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0040] Figure 1 It is a hardware environment diagram of a network layer data transmission method according to an embodiment of the present application;

[0041] Figure 2 is a flow chart of a network layer data transmission method according to an embodiment of the present application;

[0042] Figure 3 is a schematic diagram of a protocol stack program according to an embodiment of the present application;

[0043] Figure 4 is a schematic diagram of data transmission between a PDCP network layer and an RLC network layer according to an embodiment of the present application;

[0044] Figure 5 It is a structural block diagram of a network layer data transmission device according to an embodiment of the present application. DETAILED DESCRIPTION

[0045] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0046] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0047] The method embodiments provided in the embodiments of the present application can be executed in a computer terminal, a device terminal or a similar computing device. Taking running on a computer terminal as an example, Figure 1 Schematic diagram of the hardware environment of a network layer data transmission method according to an embodiment of the present application. Figure 1 As shown, the computer terminal may include one or more ( Figure 1 Only one is shown in the figure) processor 102 (processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. In an exemplary embodiment, the computer terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above-mentioned computer terminal. Figure 1 More or fewer components as shown, or with Figure 1 Equivalent functions or comparisons shown Figure 1 A different configuration with more features is shown.

[0048] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the data transmission method of the network layer in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0049] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of a computer terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0050] In this embodiment, a network layer data transmission method is provided, which is applied to the above-mentioned computer terminal. Figure 2 It is a flowchart of a data transmission method of a network layer according to an embodiment of the present application. The protocol stack program of the operating system of the base station device includes multiple network layers connected in sequence, and the multiple network layers correspond to multiple memory spaces one by one. The method is applied to the first network layer of the multiple network layers, such as Figure 2 As shown, the process includes the following steps:

[0051] Step S202, obtaining target data to be transmitted to a second network layer, wherein the second network layer is a network layer adjacent to the first network layer among the multiple network layers;

[0052] Step S204, applying for a target storage location in a first memory space corresponding to the first network layer;

[0053] Step S206, storing the target data in the target storage location in the first memory space;

[0054] Step S208: passing the target location information of the target storage location to the second network layer, wherein the second network layer is used to obtain the target data from the target storage location according to the target location information and process the target data.

[0055] Optionally, in this embodiment, the protocol stack program of the operating system of the base station device includes multiple network layers connected in sequence, and the base station device can be but is not limited to a macro base station, a micro base station, a pico base station and a femto base station.

[0056] The operating system may be, but is not limited to, a Linux-based operating system / a Windows-based Linux-based operating system. The protocol stack program includes multiple network layers connected in sequence. Taking the operating system as a Linux-based operating system as an example, the protocol stack program of the operating system includes multiple network layers connected in sequence. Figure 3 is a schematic diagram of a protocol stack program according to an embodiment of the present application, such as Figure 3 As shown in the figure, multiple network layers in the protocol stack program include: SDAP, PDCP, RLC, MAC and PHY. Each network layer runs in the embedded chip. The PDCP and RLC modules run independently inside the chip. When processing large-volume services, it is necessary to transfer data packets to each other. This solution adopts the interaction between the network layer and the memory space, and utilizes the high efficiency of data interaction between the network layer and the memory space to improve the data transmission efficiency of the network layer.

[0057] Optionally, in this embodiment, the first network layer may be, but is not limited to, any one of the multiple network layers of the protocol stack program, such as, but not limited to, PDCP. The second network layer is a network layer adjacent to the first network layer among the multiple network layers, so the second network layer may be, but is not limited to, RLC. This application takes the first network layer as PDCP and the second network layer as RLC as an example to introduce the data transmission method of the network layer.

[0058] In an exemplary embodiment, the target data to be transmitted to the second network layer can be obtained in the following manner but is not limited to: receiving reference location information transmitted by a third network layer among the multiple network layers, wherein the third network layer is another network layer adjacent to the first network layer except the second network layer among the multiple network layers; accessing the reference storage location indicated by the reference location information in the second memory space corresponding to the third network layer; obtaining initial data from the reference storage location; and performing protocol processing on the initial data to obtain the target data.

[0059] Optionally, in this embodiment, if Figure 3As shown, the first network layer may be, but is not limited to, any one of the multiple network layers of the protocol stack program, such as, but is not limited to, PDCP. The second network layer is a network layer adjacent to the first network layer among the multiple network layers, so the second network layer may be, but is not limited to, RLC. The third network layer is another network layer adjacent to the first network layer among the multiple network layers except the second network layer, so the third network layer may be, but is not limited to, SDAP.

[0060] In an exemplary embodiment, a listening thread is created on the first network layer, the second memory space includes a second uplink memory space and / or a second downlink memory space, a second uplink identifier corresponding to the second uplink memory space is created in the operating system and / or a second downlink identifier corresponding to the second downlink memory space is created in the operating system, and the reference location information transmitted by the third network layer among the multiple network layers can be received in the following manner but is not limited to: listening to the second uplink identifier and / or the second downlink identifier through the listening thread; in the case of listening to the reference location information transmitted by the third network layer from the second uplink identifier, determining the storage location indicated by the reference location information in the second uplink memory space as the reference storage location; in the case of listening to the reference location information transmitted by the third network layer from the second downlink identifier, determining the storage location indicated by the reference location information in the second downlink memory space as the reference storage location.

[0061] Optionally, in this embodiment, the first network layer PDCP creates a thread to listen to the second uplink identifier / second downlink identifier (ifd, ingress file descriptor, receive fd) to continuously receive and process data. For the same identifier, for the first network layer PDCP, the first network layer PDCP is the receiving end of the data, so the identifier is the receive fd (ifd), and for the third network layer SDAP, the third network layer SDAP is the sending end of the data, so the identifier is the send fd (ofd, egress file descriptor).

[0062] In an exemplary embodiment, the first memory space includes a data index area and a data area, and the target storage location can be applied for in the first memory space corresponding to the first network layer in the following manner, but is not limited to: allocating a data storage location for the target data in the data area as the target storage location, and obtaining a target storage address of the data storage location; storing the target storage address in the data index area and allocating a target index to the target storage address, and obtaining the target index and the target storage address having a corresponding relationship; determining the target index as the target location information;

[0063] The target data may be stored in the target storage location in the first memory space in the following manners, but is not limited to: storing the target data in the data storage location;

[0064] The target location information of the target storage location may be delivered to the second network layer in the following manner but is not limited to: delivering the target index to the second network layer.

[0065] Optionally, in this embodiment, Figure 4 is a schematic diagram of data transmission between a PDCP network layer and an RLC network layer according to an embodiment of the present application, such as Figure 4 As shown, the first network layer can be but not limited to the PDCP network layer, and the second network layer can be but not limited to the RLC network layer. The memory space (shared memory) created by PDCP and RLC is divided into two blocks, one for the data index area and the other for the data area. For these two blocks of memory, PDCP and RLC need to simultaneously maintain the correspondence between the index table and the data table of the two tables to ensure that the correct data block is obtained according to the index. The data transmitted between PDCP and RLC is the index area data, so the impact on performance is very small. Compared with directly sending the data itself, it can greatly improve the processing efficiency under large traffic data. For example, Figure 4 As shown, in the data area, a data storage location is allocated to the target data as the target storage location, and a target storage address of the data storage location is obtained; the target storage address is stored in the data index area and a target index is allocated to the target storage address: 3. Compared with the direct transmission of the target storage address requiring 2048 BYTE, the transmission of the target index only requires 2 BYTE. The amount of transmitted data is greatly reduced, which greatly improves the efficiency of processing under large traffic data.

[0066] In an exemplary embodiment, the first memory space includes a first uplink memory space and / or a first downlink memory space, a first uplink identifier corresponding to the first uplink memory space is created in the operating system, and / or a first downlink identifier corresponding to the first downlink memory space is created in the operating system, and the target location information of the target storage location may be transmitted to the second network layer in at least one of the following ways, but is not limited to:

[0067] In the case where the target data is uplink data, the target location information is written into the first uplink identifier, wherein the second network layer is an uplink adjacent network layer of the first network layer, the target storage location is located in the first uplink memory space, and the second network layer is used to monitor the location information in the first uplink identifier and obtain data from the first uplink memory space according to the location information monitored on the first uplink identifier and process the obtained data;

[0068] When the target data is downlink data, the target location information is written into the first downlink identifier, wherein the second network layer is a downstream adjacent network layer of the first network layer, the target storage location is located in the first downlink memory space, and the second network layer is used to monitor the location information in the first downlink identifier and obtain data from the first downlink memory space according to the location information monitored on the first downlink identifier and process the obtained data.

[0069] Optionally, in this embodiment, the operating system mentioned above may be, but is not limited to: a Linux-based operating system / a Windows-based Linux-based operating system. When the operating system is a Linux-based operating system, the first upstream identifier / first downstream identifier may be, but is not limited to, a file descriptor fd; when the operating system is a Windows-based operating system, the first upstream identifier / first downstream identifier may be, but is not limited to, a handle.

[0070] Optionally, in this embodiment, when the target data is downlink data, the target location information is written into the first downlink identifier, such as Figure 4As shown in the figure, when the downlink data DownLink Date arrives at the first network layer PDCP, PDCP first applies for a target storage location in the shared memory it created (PDCP alloc DL date spacefrom PDCP sham pool), and after processing the data (Process DL date), obtains the target data, and sends the shared memory index (target index: 3) of the target data to the second network layer RLC through ofd (send DL date index toRLC using ofd). The first downlink identifier ofd is called ifd for the second network layer RLC at the data receiving end. The second network layer creates a thread to monitor the location information in the first downlink identifier ofd (ifd of the second network layer) and obtains data from the first downlink memory space according to the location information monitored on the first downlink identifier and processes the obtained data (Process DL date end). After the processing is completed, the index data is no longer used. The RLC sends the data index to the PDCP through gr_fd (send this date index using gr_fd). After the PDCP obtains the data index through gc_fd, it recycles the data to the shared memory (target storage location) created by the PDCP layer, which can be used for subsequent re-application.

[0071] In an exemplary embodiment, a plurality of space identifiers corresponding one-to-one to the plurality of memory spaces are created in the operating system. After the target location information of the target storage location is passed to the second network layer, the following methods may be used but are not limited to: monitoring a first space identifier corresponding to the first memory space among the plurality of space identifiers; and when the target location information is monitored from the first space identifier, recycling the target storage location to a memory resource pool, wherein the memory resource pool is used to record storage locations in the first memory space that are allowed to be allocated to the first network layer for storing data, and the target location information is written into the first space identifier by the second network layer after the second network layer obtains the target data from the target storage location according to the target location information and processes the target data.

[0072] Optionally, in this embodiment, if Figure 4As shown in the figure, when the uplink data UpLink Date arrives at RLC, RLC first applies for a shared memory (target storage location) in the shared memory it created to store the data (RLC alloc ULdate space from RLC sham pool). After processing the data (Process UL date), the shared memory index where the data is located is sent to PDCP through ofd (send UL date index to PDCP using ofd). PDCP obtains the data through ifd and obtains the data address according to the index, and processes the data (Process UL date end). After the processing is completed, the index data is no longer used. PDCP sends the data index to RLC through gr_fd (send this date indexusing gr_fd). RLC obtains the data index through gc_fd and recycles the data to the shared memory created by the RLC layer, which can be used for subsequent application and use.

[0073] The first space identifier can be but is not limited to gc_fd. Similarly, for the first network layer PDCP, as the data transmitter, the first space identifier is gc_fd (garbage collect file descriptor), and the first space identifier is gr_fd (garbage return file descriptor) from the perspective of the second network layer RLC as the data receiver.

[0074] In the field of wireless communication, especially in base stations, due to the large amount of data transmitted and clear requirements for transmission delay, it is necessary to efficiently transmit large-volume services while keeping the transmission delay low. Through the network layer data transmission method proposed in this application, through the shared memory method, data does not need to be copied during the transmission process, and only the index of the data needs to be transmitted, so that the receiver can efficiently and accurately obtain and process the data. It can improve the overall performance and stability of communication.

[0075] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.

[0076] Figure 5 is a structural block diagram of a data transmission device of a network layer according to an embodiment of the present application; Figure 5 As shown, the protocol stack program of the operating system of the base station device includes multiple network layers connected in sequence, the multiple network layers correspond one-to-one to multiple memory spaces, the device is applied to the first network layer of the multiple network layers, and the device includes:

[0077] An acquisition module 502 is configured to acquire target data to be transmitted to a second network layer, wherein the second network layer is a network layer adjacent to the first network layer among the multiple network layers;

[0078] An application module 504, configured to apply for a target storage location in a first memory space corresponding to the first network layer;

[0079] A storage module 506, configured to store the target data in the target storage location in the first memory space;

[0080] The transfer module 508 is used to transfer the target location information of the target storage location to the second network layer, wherein the second network layer is used to obtain the target data from the target storage location according to the target location information and process the target data.

[0081] In an exemplary embodiment, the first memory space includes a first uplink memory space and / or a first downlink memory space, a first uplink identifier corresponding to the first uplink memory space is created in the operating system, and / or a first downlink identifier corresponding to the first downlink memory space is created in the operating system, and the transfer module includes at least one of the following:

[0082] a first writing unit, configured to write the target location information into the first uplink identifier when the target data is uplink data, wherein the second network layer is an uplink adjacent network layer of the first network layer, the target storage location is located in the first uplink memory space, and the second network layer is configured to monitor the location information in the first uplink identifier and obtain data from the first uplink memory space according to the location information monitored on the first uplink identifier and process the obtained data;

[0083] A second writing unit is used to write the target location information into the first downlink identifier when the target data is downlink data, wherein the second network layer is a downstream adjacent network layer of the first network layer, and the target storage location is located in the first downlink memory space. The second network layer is used to monitor the location information in the first downlink identifier and obtain data from the first downlink memory space according to the location information monitored on the first downlink identifier and process the obtained data.

[0084] In an exemplary embodiment, a plurality of space identifiers corresponding one-to-one to the plurality of memory spaces are created in the operating system, and the apparatus further comprises:

[0085] a monitoring module, configured to monitor a first space identifier corresponding to the first memory space among the multiple space identifiers after the target location information of the target storage location is transmitted to the second network layer;

[0086] A recycling module is used to recycle the target storage location to a memory resource pool when the target location information is monitored from the first space identifier, wherein the memory resource pool is used to record the storage locations in the first memory space that are allowed to be allocated to the first network layer for storing data, and the target location information is written into the first space identifier by the second network layer after obtaining the target data from the target storage location according to the target location information and processing the target data.

[0087] In an exemplary embodiment, the first memory space includes a data index area and a data area.

[0088] The application module includes: a first allocation unit, used to allocate a data storage location for the target data in the data area as the target storage location, and obtain a target storage address of the data storage location; a second allocation unit, used to store the target storage address in the data index area and allocate a target index to the target storage address, and obtain the target index and the target storage address having a corresponding relationship; a determination unit, used to determine the target index as the target location information;

[0089] The storage module includes: a storage unit for storing the target data in the data storage location;

[0090] The monitoring module includes: a transmission unit, used to transmit the target index to the second network layer.

[0091] In an exemplary embodiment, the acquisition module includes:

[0092] a receiving unit, configured to receive reference location information transmitted by a third network layer among the multiple network layers, wherein the third network layer is another network layer among the multiple network layers except the second network layer and adjacent to the first network layer;

[0093] An access unit, configured to access a reference storage location indicated by the reference location information in a second memory space corresponding to the third network layer;

[0094] an acquisition unit, configured to acquire initial data from the reference storage location;

[0095] A processing unit is used to perform protocol processing on the initial data to obtain the target data.

[0096] In an exemplary embodiment, a listening thread is created on the first network layer, the second memory space includes a second uplink memory space and / or a second downlink memory space, a second uplink identifier corresponding to the second uplink memory space is created in the operating system and / or a second downlink identifier corresponding to the second downlink memory space is created in the operating system, and the receiving unit is further used to:

[0097] Monitoring the second uplink identifier and / or the second downlink identifier through the monitoring thread;

[0098] In a case where the reference location information transmitted by the third network layer is monitored from the second uplink identifier, determining a storage location indicated by the reference location information in the second uplink memory space as the reference storage location;

[0099] In case that the reference location information transmitted by the third network layer is monitored from the second downlink identifier, the storage location indicated by the reference location information in the second downlink memory space is determined as the reference storage location.

[0100] An embodiment of the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the method described in each embodiment of the present application; the computer program product also includes a non-volatile computer-readable storage medium, which stores the computer program, and when executed by a processor, implements the steps of the method described in each embodiment of the present application.

[0101] An embodiment of the present application further provides a storage medium, which includes a stored program, wherein the program executes any of the above methods when it is run.

[0102] Optionally, in this embodiment, the storage medium may be configured to store program codes for executing the following steps:

[0103] S1, obtaining target data to be transmitted to a second network layer, wherein the second network layer is a network layer adjacent to the first network layer among the multiple network layers;

[0104] S2, applying for a target storage location in a first memory space corresponding to the first network layer;

[0105] S3, storing the target data at the target storage location in the first memory space;

[0106] S4, passing the target location information of the target storage location to the second network layer, wherein the second network layer is used to obtain the target data from the target storage location according to the target location information and process the target data.

[0107] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0108] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0109] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0110] S1, obtaining target data to be transmitted to a second network layer, wherein the second network layer is a network layer adjacent to the first network layer among the multiple network layers;

[0111] S2, applying for a target storage location in a first memory space corresponding to the first network layer;

[0112] S3, storing the target data at the target storage location in the first memory space;

[0113] S4, passing the target location information of the target storage location to the second network layer, wherein the second network layer is used to obtain the target data from the target storage location according to the target location information and process the target data.

[0114] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store program codes.

[0115] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.

[0116] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.

[0117] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A data transmission method at a network layer, characterized in that: The protocol stack program of the operating system of the base station device includes a plurality of network layers connected in sequence, the plurality of network layers correspond one-to-one to a plurality of memory spaces, the method is applied to a first network layer among the plurality of network layers, and the method includes: Acquire target data to be transmitted to a second network layer, wherein the second network layer is a network layer adjacent to the first network layer among the multiple network layers; Applying for a target storage location in a first memory space corresponding to the first network layer; storing the target data at the target storage location in the first memory space; The target location information of the target storage location is transmitted to the second network layer, wherein the second network layer is used to obtain the target data from the target storage location according to the target location information and process the target data.

2. The method according to claim 1, characterized in that The first memory space includes a first uplink memory space and / or a first downlink memory space, a first uplink identifier corresponding to the first uplink memory space is created in the operating system, and / or a first downlink identifier corresponding to the first downlink memory space is created in the operating system, and the target location information of the target storage location is transmitted to the second network layer, including at least one of the following: In the case where the target data is uplink data, the target location information is written into the first uplink identifier, wherein the second network layer is an uplink adjacent network layer of the first network layer, the target storage location is located in the first uplink memory space, and the second network layer is used to monitor the location information in the first uplink identifier and obtain data from the first uplink memory space according to the location information monitored on the first uplink identifier and process the obtained data; When the target data is downlink data, the target location information is written into the first downlink identifier, wherein the second network layer is a downstream adjacent network layer of the first network layer, the target storage location is located in the first downlink memory space, and the second network layer is used to monitor the location information in the first downlink identifier and obtain data from the first downlink memory space according to the location information monitored on the first downlink identifier and process the obtained data.

3. The method according to claim 1, characterized in that A plurality of space identifiers corresponding to the plurality of memory spaces are created in the operating system. After the target location information of the target storage location is transmitted to the second network layer, the method further includes: Monitoring a first space identifier corresponding to the first memory space among the multiple space identifiers; In case the target location information is monitored from the first space identifier, the target storage location is recovered to a memory resource pool, wherein the memory resource pool is used to record storage locations in the first memory space that are allowed to be allocated to the first network layer for storing data, and the target location information is written into the first space identifier by the second network layer after obtaining the target data from the target storage location according to the target location information and processing the target data.

4. The method according to claim 1, characterized in that: The first memory space includes a data index area and a data area. The applying for a target storage location in the first memory space corresponding to the first network layer includes: allocating a data storage location for the target data in the data area as the target storage location, and obtaining a target storage address of the data storage location; storing the target storage address in the data index area and allocating a target index to the target storage address, and obtaining the target index and the target storage address having a corresponding relationship; and determining the target index as the target location information; The storing the target data in the target storage location in the first memory space includes: storing the target data in the data storage location; The transmitting the target location information of the target storage location to the second network layer includes: transmitting the target index to the second network layer.

5. The method according to claim 1, characterized in that: The obtaining of target data to be transmitted to the second network layer includes: Receiving reference location information transmitted by a third network layer among the multiple network layers, wherein the third network layer is another network layer among the multiple network layers except the second network layer and adjacent to the first network layer; Accessing a reference storage location indicated by the reference location information in a second memory space corresponding to the third network layer; Acquire initial data from the reference storage location; The initial data is subjected to protocol processing to obtain the target data.

6. The method according to claim 5, characterized in that A listening thread is created on the first network layer, the second memory space includes a second uplink memory space and / or a second downlink memory space, a second uplink identifier corresponding to the second uplink memory space is created in the operating system, and / or a second downlink identifier corresponding to the second downlink memory space is created in the operating system, and the receiving of reference location information transmitted by a third network layer among the multiple network layers includes: Monitoring the second uplink identifier and / or the second downlink identifier through the monitoring thread; In a case where the reference location information transmitted by the third network layer is monitored from the second uplink identifier, determining a storage location indicated by the reference location information in the second uplink memory space as the reference storage location; In case that the reference location information transmitted by the third network layer is monitored from the second downlink identifier, the storage location indicated by the reference location information in the second downlink memory space is determined as the reference storage location.

7. A data transmission device at the network layer, characterized in that: The protocol stack program of the operating system of the base station device includes a plurality of network layers connected in sequence, the plurality of network layers correspond one to one with a plurality of memory spaces, the device is applied to a first network layer among the plurality of network layers, and the device includes: an acquisition module, configured to acquire target data to be transmitted to a second network layer, wherein the second network layer is a network layer adjacent to the first network layer among the multiple network layers; An application module, used for applying for a target storage location in a first memory space corresponding to the first network layer; A storage module, used for storing the target data in the target storage location in the first memory space; A transfer module is used to transfer the target location information of the target storage location to the second network layer, wherein the second network layer is used to obtain the target data from the target storage location according to the target location information and process the target data.

8. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method according to any one of claims 1 to 6 when executed.

10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 6 through the computer program.

Citation Information

Patent Citations

  • Data processing method, device and system and computer readable storage medium

    CN113849293A

  • Data processing system, method and device

    CN114722259A

  • Data communication method, communication system and computer readable storage medium

    CN115525417A

  • Communication method and device, computer readable storage medium and electronic equipment

    CN116243995A

  • Message character data extraction method and device, storage medium and electronic device

    CN116708609A