[go: up one dir, main page]

CN113312605A - Data transmission method and device, electronic equipment and storage medium - Google Patents

Data transmission method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113312605A
CN113312605A CN202110407832.5A CN202110407832A CN113312605A CN 113312605 A CN113312605 A CN 113312605A CN 202110407832 A CN202110407832 A CN 202110407832A CN 113312605 A CN113312605 A CN 113312605A
Authority
CN
China
Prior art keywords
data
core
transmitted
idle
processor
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110407832.5A
Other languages
Chinese (zh)
Inventor
郑涛
樊伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jiaotong University
Original Assignee
Beijing Jiaotong University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jiaotong University filed Critical Beijing Jiaotong University
Priority to CN202110407832.5A priority Critical patent/CN113312605A/en
Publication of CN113312605A publication Critical patent/CN113312605A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/44Program or device authentication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computer And Data Communications (AREA)

Abstract

本申请提供一种数据传输方法、装置、电子设备及存储介质,该方法包括:获取待传输数据及多核处理器各内核的运行信息;根据各内核的运行信息,判断多核处理器中是否存在空闲内核;当确定多核处理器中存在空闲内核时,将待传输数据发送至任一空闲内核,以利用空闲内核处理待传输数据。上述方案提供的数据传输方法,通过将待传输数据直接传输至空闲内核,无需等待处理器运行权,减少了数据传输延迟,提高了数据传输效率,该方法包括。

Figure 202110407832

The present application provides a data transmission method, device, electronic device and storage medium. The method includes: acquiring data to be transmitted and operation information of each core of a multi-core processor; and judging whether there is idle time in the multi-core processor according to the operation information of each core Core; when it is determined that there is an idle core in the multi-core processor, the data to be transmitted is sent to any idle core, so that the idle core is used to process the data to be transmitted. In the data transmission method provided by the above solution, by directly transmitting the data to be transmitted to the idle core, there is no need to wait for the running right of the processor, the data transmission delay is reduced, and the data transmission efficiency is improved, and the method includes:

Figure 202110407832

Description

Data transmission method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a data transmission method and apparatus, an electronic device, and a storage medium.
Background
With the rapid development of science and technology, the functions of various software and hardware devices are increased, and more data are required to be transmitted and processed, so how to improve the data transmission efficiency becomes an important research content.
In the prior art, in order to improve the communication efficiency between the client and the server, a concurrent manner is usually adopted to transmit data packets, that is, a plurality of data packets simultaneously preempt the processor resources of the client.
However, when a large amount of data packets occupy the processor resources of the client, only the link which occupies the processor resources can process the corresponding data packets preferentially, and other links can continue to occupy the operation right of the processor only by waiting for the transmission completion of the current link. The operation of the processor is divided into a plurality of time slices, and different time slices are used for processing data of different links, so that the data transmission delay is large.
Disclosure of Invention
The application provides a data transmission method, a data transmission device, an electronic device and a storage medium, which are used for overcoming the defects of large data transmission delay and the like in the prior art.
A first aspect of the present application provides a data transmission method applied to a communication device, where the communication device includes a multi-core processor, and includes:
acquiring data to be transmitted and operation information of each kernel of the multi-core processor;
judging whether an idle core exists in the multi-core processor or not according to the running information of each core;
and when determining that an idle kernel exists in the multi-core processor, sending the data to be transmitted to the idle kernel so as to process the data to be transmitted by utilizing the idle kernel.
Optionally, the method further includes:
when determining that no idle kernel exists in the multi-core processor, acquiring identity authentication information of a data sender of the data to be transmitted;
determining a target kernel according to the identity authentication information of the data sender of the data to be transmitted;
and sending the data to be transmitted to the target kernel.
Optionally, the determining a target kernel according to the identity authentication information of the data sender of the to-be-transmitted data includes:
acquiring identity attribute information of data in each non-idle core;
and determining a target kernel according to the matching relationship between the identity authentication information and the identity attribute information of the data in each non-idle kernel.
Optionally, the method further includes:
when determining that no idle core exists in the multi-core processor, acquiring the residual resources of each non-idle core;
determining the non-idle core with the most residual resources as a target core;
and sending the data to be transmitted to the target kernel.
Optionally, before sending the data to be transmitted to the target kernel, the method further includes:
acquiring the data volume of the data to be transmitted;
and when the residual resources of the target kernel are not enough to process the data volume of the data to be transmitted, returning to the step of acquiring the residual resources of each non-idle kernel.
Optionally, the method further includes:
monitoring the number of started threads of each non-idle kernel;
when the number of threads started by any non-idle kernel reaches a preset upper limit value, setting the non-idle kernel to be in a busy state; wherein the kernel in the busy state does not receive the data to be transmitted.
Optionally, after sending the data to be transmitted to the idle kernel or the target kernel, the method further includes:
acquiring processing demand information corresponding to the data to be transmitted;
determining a target thread according to the processing demand information;
and controlling the idle kernel or the target kernel to start the target thread so as to process the data to be transmitted.
A second aspect of the present application provides a data transmission apparatus, including:
the acquisition module is used for acquiring data to be transmitted and the operation information of each kernel of the multi-core processor;
the judging module is used for judging whether an idle kernel exists in the multi-core processor according to the running information of each kernel;
and the transmission module is used for sending the data to be transmitted to an idle kernel when the idle kernel in the multi-core processor is determined to exist so as to process the data to be transmitted by utilizing the idle kernel.
Optionally, the apparatus further comprises:
the determining module is used for acquiring the identity authentication information of the data sender of the data to be transmitted when the idle kernel does not exist in the multi-core processor; determining a target kernel according to the identity authentication information of the data sender of the data to be transmitted; and sending the data to be transmitted to the target kernel.
Optionally, the determining module is specifically configured to:
acquiring identity attribute information of data in each non-idle core;
and determining a target kernel according to the matching relationship between the identity authentication information and the identity attribute information of the data in each non-idle kernel.
Optionally, the determining module is further configured to:
when determining that no idle core exists in the multi-core processor, acquiring the residual resources of each non-idle core;
determining the non-idle core with the most residual resources as a target core;
and sending the data to be transmitted to the target kernel.
Optionally, the determining module is further configured to:
acquiring the data volume of the data to be transmitted;
and when the residual resources of the target kernel are not enough to process the data volume of the data to be transmitted, returning to the step of acquiring the residual resources of each non-idle kernel.
Optionally, the determining module is further configured to:
monitoring the number of started threads of each non-idle kernel;
when the number of threads started by any non-idle kernel reaches a preset upper limit value, setting the non-idle kernel to be in a busy state; wherein the kernel in the busy state does not receive the data to be transmitted.
Optionally, the apparatus further comprises:
the processing module is used for acquiring processing demand information corresponding to the data to be transmitted; determining a target thread according to the processing demand information; and controlling the idle kernel or the target kernel to start the target thread so as to process the data to be transmitted.
A third aspect of the present application provides an electronic device, comprising: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executes computer-executable instructions stored by the memory to cause the at least one processor to perform the method as set forth in the first aspect above and in various possible designs of the first aspect.
A fourth aspect of the present application provides a computer-readable storage medium having stored thereon computer-executable instructions that, when executed by a processor, implement a method as set forth in the first aspect and various possible designs of the first aspect.
This application technical scheme has following advantage:
according to the data transmission method, the data transmission device, the electronic equipment and the storage medium, the data to be transmitted and the operation information of each kernel of the multi-core processor are acquired; judging whether an idle core exists in the multi-core processor or not according to the operation information of each core; and when determining that the idle cores exist in the multi-core processor, sending the data to be transmitted to any idle core so as to process the data to be transmitted by utilizing the idle cores. According to the data transmission method provided by the scheme, the data to be transmitted is directly transmitted to the idle kernel without waiting for the operation right of the processor, so that the data transmission delay is reduced, and the data transmission efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art according to these drawings.
Fig. 1 is a schematic structural diagram of a data transmission system according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a data transmission method according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a conventional data transmission network;
fig. 4 is a schematic structural diagram of an exemplary data transmission network according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of another exemplary data transmission network provided in an embodiment of the present application;
fig. 6 is a schematic structural diagram of another exemplary data transmission network provided in an embodiment of the present application;
fig. 7 is a schematic structural diagram of another exemplary data transmission network provided in an embodiment of the present application;
fig. 8 is a schematic structural diagram of another exemplary data transmission network provided in an embodiment of the present application;
fig. 9 is a schematic structural diagram of a data transmission device according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
With the above figures, there are shown specific embodiments of the present application, which will be described in more detail below. These drawings and written description are not intended to limit the scope of the disclosed concepts in any way, but rather to illustrate the concepts of the disclosure to those skilled in the art by reference to specific embodiments.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Furthermore, the terms "first", "second", etc. are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. In the description of the following examples, "plurality" means two or more unless specifically limited otherwise.
In the prior art, data packet transmission is generally performed in a concurrent manner, that is, a plurality of data packets simultaneously preempt processor resources of a client. However, when a large amount of data packets occupy the processor resources of the client, only the link which occupies the processor resources can process the corresponding data packets preferentially, and other links can continue to occupy the operation right of the processor only by waiting for the transmission completion of the current link. The operation of the processor is divided into a plurality of time slices, and different time slices are used for processing data of different links, so that the data transmission delay is large.
In order to solve the above problems, in the data transmission method, the data transmission device, the electronic device, and the storage medium provided in the embodiments of the present application, the data to be transmitted and the operation information of each core of the multi-core processor are acquired; judging whether an idle core exists in the multi-core processor or not according to the operation information of each core; and when determining that the idle cores exist in the multi-core processor, sending the data to be transmitted to any idle core so as to process the data to be transmitted by utilizing the idle cores. According to the data transmission method provided by the scheme, the data to be transmitted is directly transmitted to the idle kernel without waiting for the operation right of the processor, so that the data transmission delay is reduced, and the data transmission efficiency is improved.
The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present invention will be described below with reference to the accompanying drawings.
First, a structure of a data transmission system based on the present application will be explained:
the data transmission method, the data transmission device, the electronic equipment and the storage medium are suitable for transmitting data to a processor so as to enable the processor to process the data. As shown in fig. 1, which is a schematic structural diagram of a data transmission system based on the embodiment of the present application, the data transmission system mainly includes a data sender, a multi-core processor, and a data transmission device for transmitting data. Specifically, the data transmission device receives data to be transmitted sent by a data sender, and transmits the received data to be transmitted to the multi-core processor.
The embodiment of the application provides a data transmission method, which is applied to communication equipment, wherein the communication equipment comprises a multi-core processor and is used for transmitting data to a processor so as to enable the processor to process the data. The execution subject of the embodiment of the present application is an electronic device, such as a server, a desktop computer, a notebook computer, a tablet computer, and other electronic devices that can be used for data transmission.
As shown in fig. 2, a schematic flow chart of a data transmission method provided in the embodiment of the present application is shown, where the method includes:
step 201, acquiring data to be transmitted and operation information of each core of the multi-core processor.
It should be noted that each core of the multi-core processor operates independently, and each core generates corresponding operation information in the operation process. The running information may include a start time and an end time of the data processing thread, and the like.
Step 202, judging whether an idle core exists in the multi-core processor according to the running information of each core.
It should be noted that the idle core may refer to a core that does not start any thread, and also includes a core in an inactive state such as hibernation or sleep.
Specifically, whether each core is currently in an occupied state (at least one thread is started) can be judged according to the running information of each core, and then an idle core in the current multi-core processor is screened out.
And 203, when the idle core exists in the multi-core processor, sending the data to be transmitted to the idle core so as to process the data to be transmitted by using the idle core.
Specifically, when it is determined that there are multiple idle cores, one of the idle cores may be randomly selected as a target core, and data to be transmitted is sent to the target core (idle core).
Each core in the multi-core processor provided by the embodiment of the application is a multi-thread core, when a plurality of data to be transmitted are obtained simultaneously and the number of the current idle cores is less than that of the data to be transmitted, the obtained data to be transmitted can be equally distributed to each idle core, and each core starts a corresponding thread after receiving the data, namely, a plurality of threads in the cores run in parallel.
Specifically, in an embodiment, after the data to be transmitted is sent to the idle kernel or the target kernel, processing requirement information corresponding to the data to be transmitted may be obtained; determining a target thread according to the processing demand information; and controlling the idle kernel or the target kernel to start the target thread so as to process data to be transmitted.
Specifically, after the kernel receives the data, a data processing thread (target thread) corresponding to the data is started to perform decryption, encryption, transcoding, redundancy removal and other processing on the data, and finally, the processed data is forwarded to a target storage unit or other communication devices.
On the basis of the above embodiments, since each core in the multi-core processor will be occupied when the number of data transmission is large, in order to reduce the data transmission delay in this case, as an implementable manner, in one embodiment, the method includes:
step 301, when determining that no idle kernel exists in the multi-core processor, acquiring identity authentication information of a data sender of data to be transmitted;
step 302, determining a target kernel according to the identity authentication information of a data sender of data to be transmitted;
step 303, sending the data to be transmitted to the target kernel.
It should be noted that the data sending party provided in the embodiment of the present application may be a router, a server, another client terminal, or a base station.
It should be further noted that the identity authentication information may include operator information for providing communication service for the data sender, a device type, an IP address of the data sender, and/or interface information of a communication interface of the data sender, etc.
For example, taking the current data sender as a wireless router as an example, the corresponding identity authentication information may be operator information. When the SIM card is inserted into the 4G/5G module interface of the wireless router, the data to be transmitted sent by the SIM card carries operator information. After receiving data to be transmitted sent by the wireless router, searching a kernel corresponding to the data to be transmitted in the multi-core processing according to operator information carried by the data to be transmitted, and determining the kernel as a target kernel.
Before data transmission, a matching relationship between each core in the multi-core processor and an operator may be configured. Taking the example that the multi-core processor includes four cores, three cores may be selected to be respectively responsible for the first operator data, the second operator data and the third operator data, and the other core is responsible for the ethernet data, that is, each core provides services for the corresponding operator link.
Specifically, in an embodiment, identity attribute information of data in each non-idle kernel may also be obtained; and determining the target kernel according to the matching relationship between the identity authentication information and the identity attribute information of the data in each non-idle kernel.
It should be explained that the identity attribute information and the identity authentication information have the same information content, taking the identity authentication information as the operator information as an example, the identity attribute information of the data in the non-idle kernel also includes the corresponding operator information.
Specifically, under the condition that each kernel in the multi-core processor is occupied, data with identity attribute information matched with identity authentication information of current data to be transmitted is selected, and the kernel to which the data belongs is determined as a target kernel.
Further, the current data to be transmitted is sent to the target kernel, and the target kernel is triggered to start a corresponding thread, so that the data parallel processing of the same operator is realized.
On the basis of the above embodiment, if the same data sender or the data senders with the same identity authentication information send a large amount of data to be transmitted at the same time, load imbalance among the cores will be caused, which is not beneficial to ensuring data transmission efficiency.
Therefore, in view of the above problem, as an implementable manner, in an embodiment, the method further includes:
step 401, when determining that no idle core exists in the multi-core processor, acquiring the residual resources of each non-idle core;
step 402, determining the non-idle core with the most residual resources as a target core;
and step 403, sending the data to be transmitted to the target kernel.
It should be noted that, there is an upper limit to the amount of data that can be processed by one core, and a difference between the upper limit of the amount of core data and the total amount of data of the currently stored (currently processed) data is the amount of data that can be processed by the above-mentioned remaining resources.
Specifically, the core with the most residual resources is selected from the multi-core processor as the target core, so that the load among the cores is balanced, and the data transmission efficiency is further guaranteed.
Further, in an embodiment, if the kernel runs in an overload state, the kernel data may be jammed, and the service life of the kernel may be shortened, so that, in order to avoid the overload operation of the kernel, before sending the data to be transmitted to the target kernel, the data amount of the data to be transmitted may be acquired; and when the residual resources of the target kernel are not enough to process the data volume of the data to be transmitted, returning to the step of acquiring the residual resources of each non-idle kernel.
Specifically, while returning to the step of obtaining the remaining resources of each non-idle core, adding the data to be transmitted currently to the waiting queue, and waiting for the core with sufficient remaining resources to provide services for the core.
On the basis of the above embodiment, because the threads in each kernel run in parallel, and the computational resources of the kernels are limited, that is, each time the parallel running of a fixed number of threads can only be satisfied, if new data is received under the condition that the number of threads running in parallel has reached a preset fixed number, the threads corresponding to the data can only be restarted after a certain thread is finished, and the data transmission delay is increased.
Therefore, in view of the above problem, as an implementable manner, in an embodiment, the method further includes:
step 501, monitoring the number of threads started by each non-idle kernel;
step 502, when the number of threads started by any non-idle kernel reaches a preset upper limit value, the non-idle kernel is set to be in a busy state.
Wherein the kernel in the busy state does not receive the data to be transmitted.
It should be noted that, in the process of selecting the target kernel based on the above embodiment, the kernels in the busy state are removed from the candidate kernels, that is, the kernels in the busy state are not determined as the target kernels.
Specifically, in an embodiment, if all the current cores are in a busy state, the current data to be transmitted is added to the wait queue, the current state of each core is monitored, and if any core is out of the busy state, the core is taken as a target core.
To help those skilled in the art to better understand the data transmission method provided by the embodiments of the present application, the following is an exemplary implementation manner provided for the embodiments of the present application:
for comparison, as shown in fig. 3, which is a schematic structural diagram of an existing data transmission network, in a conventional manner, 7 links respectively preempt a time slice of one core of a processor (CPU), the links that preempt data transmit processing data, and other links wait for the completion of processing, and continue to preempt the CPU, and links that do not preempt CPU resources can only wait.
Fig. 4 is a schematic structural diagram of an exemplary data transmission network provided in an embodiment of the present application. When a single 4G module of any operator communicates, a core in the CPU is selected at will to start a new thread at the moment, and data of the single 4G module is processed.
Fig. 5 is a schematic structural diagram of another exemplary data transmission network provided in the embodiment of the present application. When the 4G modules of any two operators are used simultaneously, firstly, which two operators are respectively (assuming mobile and connected) is judged according to an interface (identity authentication information), then, the CPU uses two idle kernels, and each kernel respectively starts a thread to be responsible for processing data of the 4G module.
Fig. 6 is a schematic structural diagram of another exemplary data transmission network provided in the embodiment of the present application. When two 4G modules of any two operators are used simultaneously, firstly, which two operators are respectively judged according to the interfaces (2 mobile and 2 intercommunicating are assumed), then the CPU uses two idle kernels, and each kernel respectively starts two threads to be responsible for processing data of the 4G module of the same operator.
Fig. 7 is a schematic structural diagram of another exemplary data transmission network provided in the embodiment of the present application. When two 4G modules of the same operator are used simultaneously, if the data volume transmission of one 4G module is large, according to the previous rule, if a single core is used for starting two threads, the CPU occupation is possibly too high, at the moment, two kernels can be started to be respectively responsible for the data transmission of the two 4G modules, the parallel transmission is realized, the load of the CPU is reduced, and the data transmission efficiency is improved.
Fig. 8 is a schematic structural diagram of another exemplary data transmission network provided in the embodiment of the present application. When there are 6 4G modules (assuming 2 mobile, 2 connected, 2 telecom) and ethernet ports used simultaneously, three cores are first used and each core opens two threads responsible for processing data of 4G modules of the same operator. In addition, the other core is used for processing data transmitted by the Ethernet port through an interface (such as a PCIE interface), so that the parallel processing of the data is realized.
According to the data transmission method provided by the embodiment of the application, the data to be transmitted and the operation information of each kernel of the multi-core processor are acquired; judging whether an idle core exists in the multi-core processor or not according to the operation information of each core; and when determining that the idle cores exist in the multi-core processor, sending the data to be transmitted to any idle core so as to process the data to be transmitted by utilizing the idle cores. According to the data transmission method provided by the scheme, the data to be transmitted is directly transmitted to the idle kernel without waiting for the operation right of the processor, so that the data transmission delay is reduced, and the data transmission efficiency is improved. And moreover, the data transmission efficiency is further improved by fully and reasonably utilizing the resources of the multi-core processor.
The embodiment of the application provides a data transmission device, which is used for executing the data transmission method provided by the embodiment.
Fig. 9 is a schematic structural diagram of a data transmission device according to an embodiment of the present application. The data transmission device 90 includes an obtaining module 901, a judging module 902 and a transmitting module 903.
The device comprises an acquisition module, a data transmission module and a data transmission module, wherein the acquisition module is used for acquiring data to be transmitted and operation information of each kernel of the multi-core processor; the judging module is used for judging whether an idle kernel exists in the multi-core processor according to the operation information of each kernel; and the transmission module is used for sending the data to be transmitted to the idle kernel when the idle kernel in the multi-core processor is determined to exist so as to process the data to be transmitted by utilizing the idle kernel.
Specifically, in an embodiment, the apparatus further comprises:
the determining module is used for acquiring the identity authentication information of a data sender of the data to be transmitted when the idle kernel does not exist in the multi-core processor; determining a target kernel according to the identity authentication information of a data sender of data to be transmitted; and sending the data to be transmitted to the target kernel.
Specifically, in an embodiment, the determining module is specifically configured to:
acquiring identity attribute information of data in each non-idle core;
and determining the target kernel according to the matching relationship between the identity authentication information and the identity attribute information of the data in each non-idle kernel.
Specifically, in an embodiment, the determining module is further configured to:
when determining that no idle core exists in the multi-core processor, acquiring the residual resources of each non-idle core;
determining the non-idle core with the most residual resources as a target core;
and sending the data to be transmitted to the target kernel.
Specifically, in an embodiment, the determining module is further configured to:
acquiring the data volume of data to be transmitted;
and when the residual resources of the target kernel are not enough to process the data volume of the data to be transmitted, returning to the step of acquiring the residual resources of each non-idle kernel.
Specifically, in an embodiment, the determining module is further configured to:
monitoring the number of started threads of each non-idle kernel;
when the number of the threads started by any non-idle kernel reaches a preset upper limit value, setting the non-idle kernel to be in a busy state; wherein the kernel in the busy state does not receive the data to be transmitted.
Specifically, in an embodiment, the apparatus further comprises:
the processing module is used for acquiring processing demand information corresponding to the data to be transmitted; determining a target thread according to the processing demand information; and controlling the idle kernel or the target kernel to start the target thread so as to process data to be transmitted.
With regard to the data transmission apparatus in the present embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
The data transmission device provided in the embodiment of the present application is configured to execute the data transmission method provided in the above embodiment, and an implementation manner and a principle thereof are the same and are not described again.
The embodiment of the application provides electronic equipment for executing the data transmission method provided by the embodiment.
Fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present application. The electronic device 100 includes: at least one processor 1001 and memory 1002;
the memory stores computer-executable instructions; the at least one processor executes the computer-executable instructions stored by the memory to cause the at least one processor to perform the data transfer method provided by the above embodiments.
The electronic device provided in the embodiment of the present application is configured to execute the data transmission method provided in the above embodiment, and an implementation manner and a principle of the electronic device are the same and are not described again.
The embodiment of the present application provides a computer-readable storage medium, where a computer executing instruction is stored in the computer-readable storage medium, and when a processor executes the computer executing instruction, the data transmission method provided in any of the above embodiments is implemented.
The storage medium including the computer-executable instructions of the embodiments of the present application may be used to store the computer-executable instructions of the data transmission method provided in the foregoing embodiments, and the implementation manner and the principle thereof are the same and are not described again.
It is obvious to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to perform all or part of the above described functions. For the specific working process of the device described above, reference may be made to the corresponding process in the foregoing method embodiment, which is not described herein again.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.

Claims (10)

1.一种数据传输方法,应用于通信设备,所述通信设备包括多核处理器,其特征在于,所述方法包括:1. A data transmission method, applied to a communication device, the communication device comprising a multi-core processor, wherein the method comprises: 获取待传输数据及所述多核处理器各内核的运行信息;obtaining the data to be transmitted and the operation information of each core of the multi-core processor; 根据所述各内核的运行信息,判断所述多核处理器中是否存在空闲内核;According to the operation information of each core, determine whether there is an idle core in the multi-core processor; 当确定所述多核处理器中存在空闲内核时,将所述待传输数据发送至空闲内核,以利用所述空闲内核处理所述待传输数据。When it is determined that there is an idle core in the multi-core processor, the data to be transmitted is sent to the idle core, so as to use the idle core to process the data to be transmitted. 2.根据权利要求1所述的方法,其特征在于,还包括:2. The method of claim 1, further comprising: 当确定所述多核处理器中不存在空闲内核时,获取所述待传输数据的数据发送方的身份认证信息;When it is determined that there is no idle core in the multi-core processor, acquiring the identity authentication information of the data sender of the data to be transmitted; 根据所述待传输数据的数据发送方的身份认证信息,确定目标内核;Determine the target kernel according to the identity authentication information of the data sender of the data to be transmitted; 将所述待传输数据发送至所述目标内核。Send the data to be transmitted to the target kernel. 3.根据权利要求2所述的方法,其特征在于,所述根据所述待传输数据的数据发送方的身份认证信息,确定目标内核,包括:3. The method according to claim 2, wherein determining the target kernel according to the identity authentication information of the data sender of the data to be transmitted comprises: 获取各非空闲内核中数据的身份属性信息;Obtain the identity attribute information of the data in each non-idle core; 根据所述身份认证信息和各非空闲内核中数据的身份属性信息之间的匹配关系,确定目标内核。The target core is determined according to the matching relationship between the identity authentication information and the identity attribute information of the data in each non-idle core. 4.根据权利要求1所述的方法,其特征在于,还包括:4. The method of claim 1, further comprising: 当确定所述多核处理器中不存在空闲内核时,获取各非空闲内核的剩余资源;When it is determined that there is no idle core in the multi-core processor, obtain the remaining resources of each non-idle core; 将所述剩余资源最多的非空闲内核,确定为目标内核;Determine the non-idle core with the most remaining resources as the target core; 将所述待传输数据发送至所述目标内核。Send the data to be transmitted to the target kernel. 5.根据权利要求4所述的方法,其特征在于,在将所述待传输数据发送至所述目标内核之前,所述方法还包括:5. The method according to claim 4, wherein before sending the data to be transmitted to the target kernel, the method further comprises: 获取所述待传输数据的数据量;obtaining the data volume of the data to be transmitted; 当所述目标内核的剩余资源不足以处理所述待传输数据的数据量时,返回到所述获取各非空闲内核的剩余资源的步骤。When the remaining resources of the target core are insufficient to process the data amount of the data to be transmitted, return to the step of acquiring the remaining resources of each non-idle core. 6.根据权利要求1所述的方法,其特征在于,还包括:6. The method of claim 1, further comprising: 监控各非空闲内核已启动的线程数量;Monitor the number of threads started by each non-idle core; 当任一非空闲内核已启动的线程数量达到预设的上限值时,将所述非空闲内核设置为忙碌状态;其中,处于忙碌状态的内核不接收待传输数据。When the number of threads started by any non-idle core reaches a preset upper limit, the non-idle core is set to a busy state; wherein, the core in the busy state does not receive data to be transmitted. 7.根据权利要求1-6任一项所述的方法,其特征在于,在将所述待传输数据发送至空闲内核或目标内核后,还包括:7. The method according to any one of claims 1-6, wherein after sending the data to be transmitted to the idle core or the target core, the method further comprises: 获取所述待传输数据对应的处理需求信息;obtaining processing requirement information corresponding to the data to be transmitted; 根据所述处理需求信息,确定目标线程;Determine the target thread according to the processing requirement information; 控制所述空闲内核或目标内核启动所述目标线程,以对所述待传输数据进行数据处理。The idle core or the target core is controlled to start the target thread, so as to perform data processing on the data to be transmitted. 8.一种数据传输装置,应用于通信设备,所述通信设备包括多核处理器,其特征在于,所述装置包括:8. A data transmission device, applied to a communication device, the communication device comprising a multi-core processor, wherein the device comprises: 获取模块,用于获取待传输数据及所述多核处理器各内核的运行信息;an acquisition module for acquiring the data to be transmitted and the operation information of each core of the multi-core processor; 判断模块,用于根据所述各内核的运行信息,判断所述多核处理器中是否存在空闲内核;a judgment module, configured to judge whether there is an idle core in the multi-core processor according to the operation information of each core; 传输模块,用于当确定所述多核处理器中存在空闲内核时,将所述待传输数据发送至空闲内核,以利用所述空闲内核处理所述待传输数据。A transmission module, configured to send the data to be transmitted to the idle core when it is determined that there is an idle core in the multi-core processor, so as to use the idle core to process the data to be transmitted. 9.一种电子设备,其特征在于,包括:至少一个处理器和存储器;9. An electronic device, comprising: at least one processor and a memory; 所述存储器存储计算机执行指令;the memory stores computer-executable instructions; 所述至少一个处理器执行所述存储器存储的计算机执行指令,使得所述至少一个处理器执行如权利要求1至7任一项所述的方法。The at least one processor executes computer-implemented instructions stored in the memory, causing the at least one processor to perform the method of any one of claims 1-7. 10.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机执行指令,当处理器执行所述计算机执行指令时,实现如权利要求1至7任一项所述的方法。10. A computer-readable storage medium, characterized in that, computer-executable instructions are stored in the computer-readable storage medium, and when a processor executes the computer-executable instructions, the method as claimed in any one of claims 1 to 7 is implemented. method described.
CN202110407832.5A 2021-04-15 2021-04-15 Data transmission method and device, electronic equipment and storage medium Pending CN113312605A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110407832.5A CN113312605A (en) 2021-04-15 2021-04-15 Data transmission method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110407832.5A CN113312605A (en) 2021-04-15 2021-04-15 Data transmission method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113312605A true CN113312605A (en) 2021-08-27

Family

ID=77372405

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110407832.5A Pending CN113312605A (en) 2021-04-15 2021-04-15 Data transmission method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113312605A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116366519A (en) * 2021-12-28 2023-06-30 北京灵汐科技有限公司 Routing transmission method, routing control method, event processing method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101403982A (en) * 2008-11-03 2009-04-08 华为技术有限公司 Task distribution method, system and equipment for multi-core processor
CN101847106A (en) * 2009-02-20 2010-09-29 株式会社日立制作所 Packet processing device and method by multiple processor cores
CN103532876A (en) * 2013-10-23 2014-01-22 中国科学院声学研究所 Processing method and system of data stream
CN107547508A (en) * 2017-06-29 2018-01-05 新华三信息安全技术有限公司 A kind of message sending, receiving method, device and the network equipment
CN112583722A (en) * 2021-02-26 2021-03-30 紫光恒越技术有限公司 Data processing method and device, cloud equipment and storage equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101403982A (en) * 2008-11-03 2009-04-08 华为技术有限公司 Task distribution method, system and equipment for multi-core processor
CN101847106A (en) * 2009-02-20 2010-09-29 株式会社日立制作所 Packet processing device and method by multiple processor cores
CN103532876A (en) * 2013-10-23 2014-01-22 中国科学院声学研究所 Processing method and system of data stream
CN107547508A (en) * 2017-06-29 2018-01-05 新华三信息安全技术有限公司 A kind of message sending, receiving method, device and the network equipment
CN112583722A (en) * 2021-02-26 2021-03-30 紫光恒越技术有限公司 Data processing method and device, cloud equipment and storage equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116366519A (en) * 2021-12-28 2023-06-30 北京灵汐科技有限公司 Routing transmission method, routing control method, event processing method and device

Similar Documents

Publication Publication Date Title
CN111580995B (en) Synchronous communication method and system of distributed cloud platform and Internet of things intelligent terminal based on MQTT asynchronous communication scene
US9537786B2 (en) Method, device, and system for information processing based on distributed buses
CN106034084B (en) A data transmission method and device
CN112769905B (en) NUMA (non uniform memory access) architecture based high-performance network card performance optimization method under Feiteng platform
WO2017185615A1 (en) Method for determining service status of service processing device and scheduling device
CN111741512B (en) A kind of private network access method and device
CN116208615A (en) Network data processing method, processing module, array server and medium
CN113312605A (en) Data transmission method and device, electronic equipment and storage medium
CN105592134A (en) Load sharing method and device
CN112910991B (en) Back-end application calling method and device, computer equipment and readable storage medium
CN117472844B (en) Multi-chip module and data processing method
CN112148453A (en) Computing chip for privacy computation and network computing system
CN115361271B (en) SSH server switching and connecting method, cloud server and storage medium
CN111131081A (en) Method and device for supporting multi-process high-performance unidirectional transmission
CN114025016B (en) Data forwarding method, device and storage medium
CN116467249A (en) Data transmission processing method and device based on CPU and FPGA
JP2006260543A (en) Method and apparatus for transmitting data to network, and method and apparatus for receiving data from network
CN111510337B (en) Modem and communication method
CN111240867B (en) Information communication system and method
CN110661731B (en) Message processing method and device
CN109257227B (en) Coupling management method, device and system in data transmission
WO2012126212A1 (en) Communication apparatus and method for interface layer of radio frequency identification device
CN114205307A (en) Data packet transmission method, RLC entity and storage medium
CN111083182B (en) Distributed Internet of things equipment management method and device
CN101909283B (en) M2M (Machine-to-Machine) platform and method for sharing load downloaded with in high capacity

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20210827

RJ01 Rejection of invention patent application after publication