Data transmission method and device, electronic equipment, storage medium and program product
By filtering out message delivery interfaces without vulnerabilities and creating data transmission threads, the data security problems existing in the data transmission process in the prior art are solved, and the stability and security of data transmission are improved.
Patent Information
- Application Number
- CN202411612557.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-02-18
AI Technical Summary
The existing data transmission method based on the messaging interface has data security problems, including data leakage, transmission redundancy, low stability and data interruption, resulting in high security risks in the data transmission process.
By obtaining parallel thread parameters, filter out message delivery interfaces that do not have vulnerabilities, and create data transmission threads based on these interfaces, merging data to improve the stability and security of data transmission.
By filtering out message delivery interfaces without vulnerabilities, the data transmission exceptions are reduced and the security and stability of the data transmission process are improved.
Smart Images

Figure CN119473658A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and in particular to a data transmission method, device, electronic device, storage medium and program product. Background Art
[0002] The Message Passing Interface (MPI) refers to a standard message passing interface for distributed computing, which has the characteristics of high performance, high flexibility, high efficiency and stability.
[0003] The existing method for realizing data transmission based on the message passing interface mainly processes the data transmitted based on the message passing interface through a software program to realize the communication function between processes in a multi-processor system.
[0004] However, the above-mentioned method of realizing data transmission based on the message passing interface has certain software program loopholes, which leads to various types of data security issues in the data transmission process, such as data storage security issues (including data leakage, etc.), data transmission security issues (including data transmission redundancy, low data transmission stability, data transmission interruption, etc.) and data credibility issues (including transmitted data anomalies), etc., resulting in a high security risk in the data transmission process. Summary of the invention
[0005] The present application provides a data transmission method, device, electronic device, storage medium and program product to solve the technical problem of data security existing in the data transmission process in the prior art.
[0006] In a first aspect, the present application provides a data transmission method, comprising:
[0007] Acquire parallel thread parameters, and determine a plurality of first message passing interfaces from each message passing interface based on the parallel thread parameters;
[0008] Determining a target number of second message passing interfaces based on transmission parameters of each of the first message passing interfaces; wherein the second message passing interfaces are first message passing interfaces without vulnerabilities;
[0009] A target data transmission thread is created based on each of the second message transmission interfaces, and data of each of the target data transmission threads is merged to obtain target data.
[0010] Optionally, in the method as described above, determining a target number of second message passing interfaces based on the transmission parameters of each of the first message passing interfaces includes:
[0011] Screening each of the first message delivery interfaces according to the buffered data of each of the first message delivery interfaces to obtain a plurality of first candidate message delivery interfaces;
[0012] Screening each of the first message delivery interfaces according to the behavior data of each of the first message delivery interfaces to obtain a plurality of second candidate message delivery interfaces;
[0013] The target number of second message passing interfaces is determined based on the first candidate message passing interface and the second candidate message passing interface.
[0014] The first message transmission interface is screened through multiple transmission parameters to determine a message transmission interface without vulnerabilities, thereby facilitating data transmission through the message transmission interface without vulnerabilities, reducing data transmission anomalies, and improving the security of the data transmission process.
[0015] Optionally, in the method as described above, screening each of the first message delivery interfaces according to the buffered data of each of the first message delivery interfaces to obtain a plurality of first candidate message delivery interfaces includes:
[0016] Executing the same data transmission thread based on each of the first message passing interfaces, and determining buffered data of each of the first message passing interfaces;
[0017] Determining, according to each of the buffered data, a first message delivery interface having a vulnerability and a first candidate message delivery interface having no vulnerability;
[0018] Select a third message passing interface from each of the message passing interfaces, update the first message passing interface with a vulnerability based on the third message passing interface, return to execute the same data transmission thread based on each of the first message passing interfaces, and determine the buffered data of each of the first message passing interfaces and subsequent steps until the target number of first candidate message passing interfaces is reached or exceeded; wherein the target number is an integer greater than or equal to 1.
[0019] By comparing the buffered data of multiple message passing interfaces executing the same data transmission thread, it is possible to accurately determine whether an abnormal problem occurs in the message passing interface during data transmission, thereby improving the accuracy of the second message passing interface in determining whether there are vulnerabilities, thereby improving the security of the process of transmitting data based on the second message passing interface.
[0020] Optionally, in the above method, the step of screening each of the first message passing interfaces according to the behavior data of each of the first message passing interfaces to obtain a plurality of second candidate message passing interfaces includes:
[0021] Based on each of the first message passing interfaces executing the same data transmission thread, and according to the behavior data of each of the first message passing interfaces, determining a behavior data difference between every two of the first message passing interfaces;
[0022] Determining, according to each of the behavior data differences, a first message delivery interface having a vulnerability and a second candidate message delivery interface having no vulnerability;
[0023] Select a fourth message passing interface from the message passing interfaces, update the first message passing interface with the vulnerability based on the fourth message passing interface, return to execute the same data transmission thread based on each of the first message passing interfaces, and determine the behavior data difference between every two of the first message passing interfaces and subsequent steps based on the behavior data of each of the first message passing interfaces, until the target number of second candidate message passing interfaces is reached or exceeded.
[0024] By comparing the behavioral data differences between each pair of message passing interfaces, the behavioral differences of the message passing interfaces during data transmission can be accurately determined, thereby improving the accuracy of the second message passing interface in terms of the absence of vulnerabilities, thereby improving the security of the process of transmitting data based on the second message passing interface.
[0025] Optionally, in the above method, determining the first message delivery interface with a vulnerability and the second candidate message delivery interface without a vulnerability according to each of the behavior data differences includes:
[0026] When there are behavior data differences corresponding to the first message transmission interface, all of which are within the behavior data difference range, determining that the first message transmission interface is a second candidate message transmission interface without vulnerabilities;
[0027] and / or,
[0028] When there are behavior data differences corresponding to the first message transmission interface, all of which are outside the behavior data difference range, it is determined that the first message transmission interface has a vulnerability.
[0029] By presetting the behavior data difference range, the size of the behavior data difference between two message passing interfaces can be determined, thereby determining the identification result of the vulnerability of the message passing interface, thereby improving the identification accuracy of whether the message passing interface has a vulnerability.
[0030] Optionally, in the method as described above, after determining the target number of second message passing interfaces based on the transmission parameters of each of the first message passing interfaces, the method further includes:
[0031] Determine a fifth message delivery interface; wherein the fifth message delivery interface is used to indicate a message delivery interface in the first message delivery interface other than the second message delivery interface;
[0032] Each data transmission thread of the fifth message passing interface is deleted.
[0033] By deleting each data transmission thread of the vulnerable fifth message passing interface, data transmission through the vulnerable message passing interface can be avoided, data leakage, data transmission anomalies, etc. caused by the above reasons can be reduced, thereby reducing the risk of data transmission.
[0034] In a second aspect, the present application provides a data transmission device, including:
[0035] A first determination module, configured to obtain parallel thread parameters, and determine a plurality of first message passing interfaces from each message passing interface based on the parallel thread parameters;
[0036] A second determination module, configured to determine a target number of second message delivery interfaces based on transmission parameters of each of the first message delivery interfaces; wherein the second message delivery interfaces are first message delivery interfaces without vulnerabilities;
[0037] The transmission module is used to create a target data transmission thread based on each of the second message transmission interfaces, and merge the data of each of the target data transmission threads to obtain target data.
[0038] In a third aspect, an embodiment of the present application provides an electronic device, including: a processor and a memory communicatively connected to the processor;
[0039] The memory stores computer-executable instructions;
[0040] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the data transmission method described in the first aspect and various possible designs of the first aspect.
[0041] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the data transmission method described in the first aspect and various possible designs of the first aspect is implemented.
[0042] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements the data transmission method described in the first aspect and various possible designs of the first aspect.
[0043] The present application provides a data transmission method, device, electronic device, storage medium and program product, which preliminarily screen the message passing interface through parallel thread parameters to determine the first message passing interface, and then perform secondary screening on the first message passing interface based on the transmission parameters of the first message passing interface to determine a target number of second message passing interfaces without vulnerabilities, thereby creating a data transmission process based on the second message transmission interface to transmit data, avoiding data transmission through a message passing interface with vulnerabilities, causing data leakage and other problems, and improving the stability of target data transmission and the security of target data transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] 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.
[0045] Figure 1 A schematic diagram of a scenario of a data transmission method in the prior art;
[0046] Figure 2 A flowchart of a data transmission method provided in an embodiment of the present application;
[0047] Figure 3 A flowchart of step S102 of a data transmission method provided in an embodiment of the present application;
[0048] Figure 4 A flowchart of step S1021 of a data transmission method provided in an embodiment of the present application;
[0049] Figure 5 A flowchart of step S1022 of a data transmission method provided in an embodiment of the present application;
[0050] Figure 6 Another schematic diagram of a data transmission method provided in an embodiment of the present application;
[0051] Figure 7 A schematic diagram of a software architecture of an electronic device provided in an embodiment of the present application;
[0052] Figure 8 A schematic diagram of the structure of a data transmission device provided in an embodiment of the present application;
[0053] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0054] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0055] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0056] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards, and corresponding operation entrances shall be provided for users to choose to authorize or refuse.
[0057] Terminology explanation:
[0058] Message Passing Interface (MPI) is used for inter-process communication in multi-processor systems (such as supercomputers or clusters). MPI provides a set of API functions that allow different nodes or processes to exchange and synchronize data through message passing. It is mainly used in the field of high-performance computing (HPC).
[0059] The parallel thread parameter, which may also be called redundancy, is used to indicate the number of ways in which data transfer threads are executed in parallel.
[0060] The message passing interface has the characteristics of high performance, high flexibility, high efficiency and stability, and is often used to implement inter-process communication functions in multi-processor systems.
[0061] However, the above-mentioned method for realizing data transmission based on the message passing interface usually has problems such as data transmission anomaly and data transmission interruption, which leads to data transmission instability and affects data transmission security.
[0062] The message passing interface includes but is not limited to the distributed parallel message passing interface OpenMPI and the parallel message passing interface MPICH.
[0063] Figure 1A schematic diagram of a scenario of a data transmission method in the prior art is exemplarily provided.
[0064] See also Figure 1 In response to the data transmission task, the electronic device generates a data transmission instruction and sends the data transmission instruction to the message transmission interface, and transmits data to the internal or external device of the electronic device through the message transmission interface to realize the data transmission function.
[0065] However, when there is a network attack or device abnormality during the above-mentioned data transmission process, the data transmission process executed by the message passing interface may be interrupted, resulting in problems such as data transmission omissions, data transmission interruptions or data transmission duplication, making the data transmission stability poor and possibly leading to security issues such as data leakage.
[0066] The data transmission method provided in this application is intended to solve the above technical problems in the prior art.
[0067] The data transmission method provided in the embodiment of the present application is applied to electronic devices, and the above-mentioned electronic devices may include smart phones, tablet computers, laptops, personal computers (PCs) and other devices. The embodiment of the present application does not impose any special restrictions on the specific type of the electronic device.
[0068] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0069] Figure 2 For a flow chart of the data transmission method provided in the embodiment of the present application, see Figure 2 , the data transmission method comprises the following steps:
[0070] S101. Acquire parallel thread parameters, and determine a plurality of first message passing interfaces from various message passing interfaces based on the parallel thread parameters.
[0071] Specifically, a plurality of message transmission interfaces are provided in the electronic device, and the same preset data transmission thread is executed through each message transmission interface to determine the parallel thread parameter (also referred to as redundancy, which is used to indicate the number of ways of executing the data transmission thread in parallel) of the electronic device. Based on the parallel thread parameter, the plurality of message transmission interfaces are screened through the preset transmission strategy to determine as the first message transmission interface.
[0072] In some embodiments, the parallel thread parameter may also be preset. For example, the parallel thread parameter is set to 3, correspondingly selecting 3 first message transmission interfaces.
[0073] Exemplarily, the preset data transmission thread may be: MPI-ALLreduce (sendbuf, recvbuf, 100, MPI-INT, MPI-SUM, comm). Wherein, sendbuf is an integer array including 100 elements. The preset data transmission thread is used to sum the sendbuf between each node and send the sum result to the buffer of each message passing interface.
[0074] Optionally, the preset transmission strategy may include a message delivery interface with a usage frequency greater than a first usage frequency, wherein the first usage frequency may be specifically set according to actual conditions. For example, the first usage frequency is 50%, or 60%. Alternatively, the preset transmission strategy may include randomly selecting N message delivery interfaces. Wherein, N is an integer greater than or equal to 1. Exemplarily, N is 10 or N is 3.
[0075] Optionally, the preset transmission strategy may further include message transmission interfaces with the same usage frequency. Exemplarily, if there are three message transmission interfaces with the same usage frequency, the three message transmission interfaces are determined to be the first message transmission interface.
[0076] S102. Determine a target number of second message passing interfaces based on transmission parameters of each of the first message passing interfaces; wherein the second message passing interfaces are first message passing interfaces without vulnerabilities.
[0077] Specifically, the transmission parameters of each first message passing interface are determined, wherein the transmission parameters include but are not limited to the buffer data and behavior data of the first message passing interface. The second message passing interface of the target tree is screened out according to the transmission parameters of each first message passing interface. The second message passing interface is used to indicate the first message passing interface without vulnerabilities. The buffer data can be used to indicate the data in the buffer corresponding to the message passing interface. The behavior data includes but is not limited to the data transmission duration, data transmission size, number of data transmission repetitions, etc.
[0078] S103: Create a target data transmission thread based on each of the second message transmission interfaces, and merge the data of each of the target data transmission threads to obtain target data.
[0079] Specifically, a target data transmission thread is created through each second message transmission interface without vulnerabilities, the target data is transmitted through each second message transmission interface through the target data transmission thread, and the data transmitted by each target data transmission thread is merged to obtain the target data.
[0080] Among them, the vulnerable message passing interface is a message passing interface used to indicate that there are data transmission anomalies, data transmission omissions, etc. during the data transmission process.
[0081] Exemplarily, the buffer data of the vulnerable message passing interface may contain abnormal data, so that the buffer data of the message passing interface is different from the buffer data of other message interfaces.
[0082] As another example, a vulnerable message transmission interface may transmit duplicate data, so that the behavior data of the message transmission interface and the behavior data of other message transmission interfaces have a large difference value.
[0083] The message passing interface is preliminarily screened through parallel thread parameters to determine the first message passing interface. The first message passing interface is secondary screened based on the transmission parameters of the first message passing interface to determine the first message passing interface without vulnerabilities of the target tree, thereby creating a data transmission process based on the second message transmission interface to transmit data, so as to improve the stability of the target data transmission and the security of the target data transmission.
[0084] Figure 3 A schematic diagram of a data transmission method step S102 provided in an embodiment of the present application is shown in FIG. Figure 3 , step S102 of the method comprises the following steps:
[0085] S1021. Screen each of the first message delivery interfaces according to the buffered data of each of the first message delivery interfaces to obtain a plurality of first candidate message delivery interfaces;
[0086] S1022: Screen each of the first message transmission interfaces according to the behavior data of each of the first message transmission interfaces to obtain a plurality of second candidate message transmission interfaces;
[0087] S1023: Determine the target number of second message passing interfaces based on the first candidate message passing interface and the second candidate message passing interface.
[0088] It is understandable that when identifying whether a message transmission interface has a vulnerability based on a single transmission parameter of the message transmission interface, there may be a situation of identification error, such as identifying a message transmission interface without a vulnerability as a message transmission interface with a vulnerability, or identifying a message transmission interface with a vulnerability as a message transmission interface without a vulnerability. This will still affect the stability of data transmission and result in low security of data transmission. Based on this, two or more transmission parameters can be used to jointly identify whether a message transmission interface has a vulnerability.
[0089] Specifically, when the transmission parameters include buffer data and behavior data, the first message passing interfaces are screened based on the buffer data of each first message passing interface to obtain at least one message passing interface without vulnerabilities as the first candidate message passing interface.
[0090] Specifically, based on the behavior data of each second message transmission interface, each first message transmission interface is screened to obtain multiple second candidate message transmission interfaces. Based on this, the second message transmission interface of the target data can be selected from each first candidate message transmission interface and the second candidate message transmission interface.
[0091] The method of selecting the second message transmission interface from the first candidate message transmission interface and the second candidate message transmission interface may be specifically set according to actual conditions.
[0092] Exemplarily, a target number of identical message passing interfaces are selected from each first candidate message passing interface and each second candidate message passing interface as the second message passing interface. For example, the target number is 3, MPI1, MPI2, and MPI3 are selected from each first candidate message passing interface, and MPI1, MPI2, and MPI3 are selected from the second candidate message passing interfaces as the second message passing interface.
[0093] Also illustratively, a target number of message passing interfaces are randomly selected from each of the first candidate message passing interfaces and each of the second candidate message passing interfaces as the second message passing interfaces.
[0094] As another example, a target number of message passing interfaces with relatively high usage frequencies are selected from each of the first candidate message passing interfaces and each of the second candidate message passing interfaces as the second message passing interfaces.
[0095] Figure 4 A flow chart of step S1021 of a data transmission method provided in an embodiment of the present application is shown in FIG. Figure 4 , step S1021 of the method comprises the following steps:
[0096] S10211. Execute the same data transmission thread based on each of the first message passing interfaces, and determine the buffered data of each of the first message passing interfaces.
[0097] Specifically, the same preset data transmission thread is created through each first message transmission interface, and data transmission is performed, and buffered data corresponding to each first message transmission interface is obtained during the data transmission process.
[0098] S10212. Determine, according to each of the buffered data, a first message passing interface having a vulnerability and a first candidate message passing interface having no vulnerability.
[0099] Specifically, when a data transmission error, data transmission omission, or data transmission duplication occurs in a message transmission interface during the data transmission process (which may also be referred to as a vulnerability in the data transmission process), the buffered data of the message transmission interface is different from the buffered data of other message transmission interfaces executing the same data transmission thread. Based on this, the first message transmission interface with a vulnerability and the first message transmission interface without a vulnerability (which may also be referred to as a first candidate message transmission interface) may be determined based on the buffered data of each message transmission interface. The above-mentioned same data transmission thread may be the preset data transmission thread described above.
[0100] S10213. Select a third message passing interface from each of the message passing interfaces, update the first message passing interface with a vulnerability based on the third message passing interface, return to execute the same data transmission thread based on each of the first message passing interfaces, and determine the buffered data of each of the first message passing interfaces and subsequent steps until the target number of first candidate message passing interfaces is reached or exceeded; wherein the target number is an integer greater than or equal to 1.
[0101] Specifically, when a first message passing interface with a vulnerability is determined based on each buffer data, one or more message passing interfaces are reselected from each of the message passing interfaces as the third message passing interface, and the first message passing interface with a vulnerability is updated to the third message passing interface, and based on the updated first message passing interface, step S10211 and subsequent steps are returned to be executed until a target number of first candidate message passing interfaces is reached or exceeded, where the target number is an integer greater than or equal to 1.
[0102] For example, the target number is 3. At this time, based on the buffered data of each first message transmission interface, the first candidate message transmission interfaces determined are 2. Then, each first message transmission interface with a vulnerability is updated to a third message transmission interface, and the process returns to execute step S10211 and subsequent steps until the number reaches or exceeds 3 first candidate message transmission interfaces.
[0103] The method of selecting the third message transmission interface may be specifically set according to actual conditions.
[0104] Exemplarily, the third message passing interface may be randomly selected from the message passing interfaces.
[0105] Also illustratively, the third message passing interface is filtered through the parallel thread parameters based on the method described in step S101.
[0106] In some embodiments, step S10212 includes:
[0107] When the buffer data of each of the first message passing interfaces are the same, determining each of the first message passing interfaces as a first candidate message passing interface without vulnerabilities;
[0108] And / or:
[0109] When there is second buffer data in each of the buffer data that is different from each of the first buffer data, it is determined that a vulnerability exists in the first message passing interface corresponding to the second buffer data; wherein the first buffer data is the buffer data in each of the buffer data except the second buffer data.
[0110] Specifically, a consistency check is performed on the buffer data of each first message transmission interface, and when the buffer data of each first message transmission interface are the same, it is determined that each first message transmission interface is a first candidate message transmission interface without vulnerabilities.
[0111] Alternatively, among the buffer data of each first message transmission interface, if there are one or more buffer data of the first message transmission interface (also referred to as the second buffer data) that are different from the buffer data of other first message transmission interfaces (also referred to as the first buffer data), it is determined that the first message transmission interface corresponding to the second buffer data has a vulnerability. The first buffer data is the buffer data other than the second buffer data among the buffer data.
[0112] For example, there are currently four message passing interfaces, namely MPI1, MPI2, MPI3, and MPI4. The buffer data of MPI1 and MPI2 are completely consistent, while the buffer data of MPI3 and MPI4 are different from the buffer data of other message buffer interfaces (including MPI1 and MPI2), and the buffer data of the above MPI3 and MPI4 are also different. It is determined that the above MPI3 and MPI4 have vulnerabilities.
[0113] Figure 5 A flow chart of step S1022 of a data transmission method provided in an embodiment of the present application is shown in FIG. Figure 5 , step S1022 of the method includes the following steps:
[0114] S10221. Based on each of the first message passing interfaces executing the same data transmission thread, and according to the behavior data of each of the first message passing interfaces, determine the behavior data difference between every two of the first message passing interfaces.
[0115] Specifically, a preset data transmission thread is created through each first message transmission interface, and data transmission is performed, behavior data corresponding to each first message transmission interface is obtained during the data transmission process, and the difference in behavior data between every two first message transmission interfaces is calculated and determined.
[0116] S10222. Determine, according to the behavior data differences, a first message delivery interface having a vulnerability and a second candidate message delivery interface having no vulnerability.
[0117] Specifically, when a data transmission error, data transmission omission, or data transmission duplication occurs in a message passing interface during the data transmission process (which can also be referred to as a loophole in the data transmission process), the behavior data of the message passing interface is significantly different from the behavior data of other message passing interfaces that execute the same data transmission thread. For example, the number of repetitions of data transmission by a certain message passing interface is greater than that of other message passing interfaces that execute the same data transmission thread; or the transmission time of data transmission by a certain message passing interface is longer than that of other message passing interfaces that execute the same data transmission thread.
[0118] Based on this, the first message passing interface with vulnerabilities and the first message passing interface without vulnerabilities (also referred to as the second candidate message passing interface) can be determined according to the difference in behavior data between every two of the first message passing interfaces.
[0119] S10223. Select a fourth message passing interface from the message passing interfaces, update the first message passing interface with a vulnerability based on the fourth message passing interface, return to execute the same data transmission thread based on each of the first message passing interfaces, and determine the behavior data difference between every two of the first message passing interfaces and subsequent steps based on the behavior data of each of the first message passing interfaces, until the target number of second candidate message passing interfaces is reached or exceeded.
[0120] Specifically, when the first message passing interface with a vulnerability is determined based on the difference in behavior data between each two of the first message passing interfaces, one or more message passing interfaces are reselected from the message passing interfaces as the fourth message passing interface. The first message passing interface with a vulnerability is updated to the fourth message passing interface, and based on the updated first message passing interface, step S10221 and subsequent steps are returned to be executed until the target number of first candidate message passing interfaces is reached or exceeded.
[0121] Optionally, for the manner of selecting the fourth message transmission interface, reference may be made to the description of the manner of selecting the third message transmission interface in the aforementioned embodiment, which will not be repeated here.
[0122] In some embodiments, S10222 includes:
[0123] When there are behavior data differences corresponding to the first message transmission interface, all of which are within the behavior data difference range, determining that the first message transmission interface is a second candidate message transmission interface without vulnerabilities;
[0124] and / or,
[0125] When there are behavior data differences corresponding to the first message transmission interface, all of which are outside the behavior data difference range, it is determined that the first message transmission interface has a vulnerability.
[0126] Specifically, the behavior data difference of each first message transmission interface is compared with the behavior data difference range. When the behavior data difference of each first message transmission interface is within the behavior data difference range, it is determined that each first message transmission interface is a second candidate message transmission interface without vulnerabilities. When the behavior data difference of each first message transmission interface is not within the behavior data difference range, it is determined that each first message transmission interface has vulnerabilities, and the first message transmission interface is reselected from each message transmission interface. Among them, the behavior data difference range can be specifically set according to actual conditions. For example, when the behavior data is the data transmission duration, the behavior data difference range can be [10ms, 50ms].
[0127] Alternatively, when, in each first message transmission interface, there are one or more behavior data differences corresponding to the first message transmission interface, all of which are outside the behavior data difference range, it is determined that the first message transmission interface has a vulnerability.
[0128] For example, there are currently four message passing interfaces, namely MPI1, MPI2, MPI3, and MPI4. When the behavior data differences corresponding to MPI1 (including the behavior data differences between MPI1 and MPI2, the behavior data differences between MPI1 and MPI3, and the behavior data differences between MPI1 and MPI4) are all outside the behavior data difference range, it is determined that MPI1 has a vulnerability.
[0129] Figure 6 Another flowchart of a data transmission method provided in an embodiment of the present application is shown in FIG. Figure 6 After step S102, the method further includes:
[0130] S201. Determine a fifth message transmission interface; wherein the fifth message transmission interface is used to indicate a message transmission interface in the first message transmission interface except the second message transmission interface;
[0131] S202: Delete each data transmission thread of the fifth message passing interface.
[0132] Specifically, in determining the first message passing interface, other message passing interfaces except the second message passing interface without vulnerabilities are determined to be the fifth message passing interface, and the data transmission threads of the fifth message passing interface are deleted. This can avoid transmitting data through the message passing interface with vulnerabilities, reduce data leakage and data transmission anomalies caused by the above reasons, and reduce the risk of data transmission.
[0133] It is understandable that the fifth message transmission interface can also be understood as: a first message transmission interface whose behavior data difference with other first message transmission interfaces is outside the behavior data difference range. And / or: a first message transmission interface whose buffer data is different from the buffer data of other first message transmission interfaces.
[0134] It is understandable that data security issues caused by electronic devices transmitting data based on a message passing interface are generally caused by software used by the electronic devices and generated based on the message passing interface. For example, data security issues caused by high software complexity, software anomalies, or software-related component anomalies, etc., the above problems can all be called vulnerabilities in software generated based on a message passing interface.
[0135] For example, software generated based on the message passing interface may have vulnerabilities, allowing third parties to modify user permissions through vulnerabilities, resulting in data leakage and other problems. Alternatively, software generated based on the message passing interface may have vulnerabilities, allowing third parties to interrupt data transmission or repeatedly transmit large amounts of data through vulnerabilities.
[0136] Based on this, the embodiment of the present application also proposes a heterogeneous redundant software framework, which can reduce vulnerabilities and reduce data transmission anomalies.
[0137] Figure 7 A schematic diagram of a software architecture provided for an embodiment of the present application.
[0138] See also Figure 7 ,The software architecture includes interface adaptation layer, policy layer and execution layer. Among them, the execution layer includes message ,transmission interface management module and behavior monitoring module.
[0139] The message passing interface management module is used to manage all available MPIs, including but not limited to executing operations such as loading and unloading different MPIs (dynamic link libraries). The behavior monitoring module monitors and determines the second candidate message passing interface based on the behavior during the execution of the MPI operation.
[0140] The strategy layer is used to determine the number of first message passing interfaces in the execution layer based on the parallel thread parameters, and select the corresponding first message passing interface based on the preset strategy. And by controlling each first message passing interface to create the same data magic thread, the second candidate message passing interface is determined. The interface adaptation layer is used to provide a unified data interaction interface API for the upper layer.
[0141] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present application.
[0142] It should be further noted that, although the various steps in the flowchart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowchart may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
[0143] Figure 8 A schematic diagram of a data transmission device according to an embodiment of the present invention is shown in FIG. Figure 8 , the data transmission device comprises:
[0144] A first determination module 801 is used to obtain parallel thread parameters, and determine a plurality of first message passing interfaces from each message passing interface based on the parallel thread parameters;
[0145] A second determination module 802 is used to determine a target number of second message delivery interfaces based on the transmission parameters of each of the first message delivery interfaces; wherein the second message delivery interfaces are first message delivery interfaces without vulnerabilities;
[0146] The transmission module 803 is used to create a target data transmission thread based on each of the second message transmission interfaces, and merge the data of each of the target data transmission threads to obtain target data.
[0147] In some embodiments, the second determining module includes:
[0148] A first screening submodule, configured to screen each of the first message transmission interfaces according to the buffered data of each of the first message transmission interfaces to obtain a plurality of first candidate message transmission interfaces;
[0149] A second screening submodule, configured to screen each of the first message transmission interfaces according to the behavior data of each of the first message transmission interfaces to obtain a plurality of second candidate message transmission interfaces;
[0150] The interface determination submodule is used to determine the target number of second message passing interfaces based on the first candidate message passing interface and the second candidate message passing interface.
[0151] In some embodiments, the first screening submodule includes:
[0152] a buffered data determining unit, configured to execute the same data transmission thread based on each of the first message passing interfaces, and determine the buffered data of each of the first message passing interfaces;
[0153] A first interface determination unit, configured to determine a first message delivery interface having a vulnerability and a first candidate message delivery interface having no vulnerability according to each of the buffered data;
[0154] A second interface determination unit is used to select a third message passing interface from each of the message passing interfaces, update the first message passing interface with a vulnerability based on the third message passing interface, return to execute the same data transmission thread based on each of the first message passing interfaces, and determine the buffered data of each of the first message passing interfaces and subsequent steps until the target number of first candidate message passing interfaces is reached or exceeded; wherein the target number is an integer greater than or equal to 1.
[0155] In some embodiments, the second screening submodule comprises:
[0156] a behavior data determining unit, configured to determine a behavior data difference between every two of the first message passing interfaces based on the execution of the same data transmission thread by each of the first message passing interfaces and according to the behavior data of each of the first message passing interfaces;
[0157] A third interface determination unit, configured to determine a first message transmission interface having a vulnerability and a second candidate message transmission interface having no vulnerability according to each of the behavior data differences;
[0158] A fourth interface determination unit is used to select a fourth message passing interface from the message passing interfaces, update the first message passing interface with a vulnerability based on the fourth message passing interface, return to execute the same data transmission thread based on each of the first message passing interfaces, and determine the behavior data difference between every two of the first message passing interfaces and subsequent steps based on the behavior data of each of the first message passing interfaces, until the target number of second candidate message passing interfaces is reached or exceeded.
[0159] In some embodiments, the third interface determination unit is specifically configured to:
[0160] When there are behavior data differences corresponding to the first message transmission interface, all of which are within the behavior data difference range, determining that the first message transmission interface is a second candidate message transmission interface without vulnerabilities;
[0161] and / or,
[0162] When there are behavior data differences corresponding to the first message transmission interface, all of which are outside the behavior data difference range, it is determined that the first message transmission interface has a vulnerability.
[0163] In some embodiments, the data transmission device further includes:
[0164] A third determination module, used to determine a fifth message transmission interface; wherein the fifth message transmission interface is used to indicate a message transmission interface in the first message transmission interface except the second message transmission interface;
[0165] The deleting module is used to delete each data transmission thread of the fifth message passing interface.
[0166] It should be understood that the above-mentioned device embodiments are only illustrative, and the device of the present application can also be implemented in other ways. For example, the division of units / modules in the above-mentioned embodiments is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units, modules or components can be combined, or can be integrated into another system, or some features can be ignored or not executed.
[0167] Fig. 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Fig. 9 As shown, the electronic device may include: a transceiver 901 , a processor 902 , and a memory 903 .
[0168] The processor 902 executes the computer-executable instructions stored in the memory, so that the processor 902 executes the solution in the above embodiment. The processor 902 can be a general-purpose processor, including a central processing unit CPU, a network processor (NP), etc.; it can also be a digital signal processor DSP, an application-specific integrated circuit ASIC, a field programmable gate array FPGA or other programmable logic devices, discrete gates or transistor logic devices, and discrete hardware components.
[0169] The memory 903 is connected to the processor 902 via a system bus and completes communication between them. The memory 903 is used to store computer program instructions.
[0170] The transceiver 901 may be used to obtain parallel thread parameters, target quantity, target data, and the like.
[0171] The system bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The system bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The transceiver is used to realize the communication between the database access device and other computers (such as clients, read-write libraries, and read-only libraries). The memory may include random access memory (RAM) and may also include non-volatile memory.
[0172] An embodiment of the present application further provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions are executed on a computer, the computer executes the technical solution of the data transmission method in the above embodiment.
[0173] An embodiment of the present application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium. When at least one processor executes the computer program, it can implement the technical solution of the data transmission method in the above embodiment.
[0174] In addition, unless otherwise specified, each functional unit / module in each embodiment of the present application may be integrated into one unit / module, each unit / module may exist physically separately, or two or more units / modules may be integrated together. The above-mentioned integrated unit / module may be implemented in the form of hardware or in the form of a software program module.
[0175] If the integrated unit / module is implemented in the form of hardware, the hardware may be a digital circuit, an analog circuit, etc. The physical implementation of the hardware structure includes but is not limited to transistors, memristors, etc. Unless otherwise specified, the processor may be any appropriate hardware processor, such as a CPU, a GPU, an FPGA, a DSP, an ASIC, etc. Unless otherwise specified, the storage unit may be any appropriate magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory (RRAM), a dynamic random access memory (DRAM), a static random access memory (SRAM), an enhanced dynamic random access memory (EDRAM), a high-bandwidth memory (HBM), a hybrid memory cube (HMC), etc.
[0176] If the integrated unit / module is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.
[0177] In the above embodiments, the description of each embodiment has its own emphasis. For parts not described in detail in a certain embodiment, please refer to the relevant description of other embodiments. The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0178] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0179] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A data transmission method, characterized in that: include: Acquire parallel thread parameters, and determine a plurality of first message passing interfaces from each message passing interface based on the parallel thread parameters; Determining a target number of second message passing interfaces based on transmission parameters of each of the first message passing interfaces; wherein the second message passing interfaces are first message passing interfaces without vulnerabilities; A target data transmission thread is created based on each of the second message transmission interfaces, and data of each of the target data transmission threads is merged to obtain target data.
2. The method according to claim 1, characterized in that The determining a target number of second message passing interfaces based on the transmission parameters of each of the first message passing interfaces includes: Screening each of the first message delivery interfaces according to the buffered data of each of the first message delivery interfaces to obtain a plurality of first candidate message delivery interfaces; Screening each of the first message delivery interfaces according to the behavior data of each of the first message delivery interfaces to obtain a plurality of second candidate message delivery interfaces; The target number of second message passing interfaces is determined based on the first candidate message passing interface and the second candidate message passing interface.
3. The method according to claim 1 or 2, characterized in that: The step of screening each of the first message delivery interfaces according to the buffered data of each of the first message delivery interfaces to obtain a plurality of first candidate message delivery interfaces includes: Executing the same data transmission thread based on each of the first message passing interfaces, and determining buffered data of each of the first message passing interfaces; Determining, according to each of the buffered data, a first message delivery interface having a vulnerability and a first candidate message delivery interface having no vulnerability; Select a third message passing interface from each of the message passing interfaces, update the first message passing interface with a vulnerability based on the third message passing interface, return to execute the same data transmission thread based on each of the first message passing interfaces, and determine the buffered data of each of the first message passing interfaces and subsequent steps until the target number of first candidate message passing interfaces is reached or exceeded; wherein the target number is an integer greater than or equal to 1.
4. The method according to claim 1 or 2, characterized in that: The step of screening each of the first message transmission interfaces according to the behavior data of each of the first message transmission interfaces to obtain a plurality of second candidate message transmission interfaces includes: Based on each of the first message passing interfaces executing the same data transmission thread, and according to the behavior data of each of the first message passing interfaces, determining a behavior data difference between every two of the first message passing interfaces; Determining, according to each of the behavior data differences, a first message delivery interface having a vulnerability and a second candidate message delivery interface having no vulnerability; Select a fourth message passing interface from the message passing interfaces, update the first message passing interface with the vulnerability based on the fourth message passing interface, return to execute the same data transmission thread based on each of the first message passing interfaces, and determine the behavior data difference between every two of the first message passing interfaces and subsequent steps based on the behavior data of each of the first message passing interfaces, until the target number of second candidate message passing interfaces is reached or exceeded.
5. The method according to claim 4, characterized in that The step of determining the first message delivery interface with a vulnerability and the second candidate message delivery interface without a vulnerability according to the behavior data differences includes: When there are behavior data differences corresponding to the first message transmission interface, all of which are within the behavior data difference range, determining that the first message transmission interface is a second candidate message transmission interface without vulnerabilities; and / or, When there are behavior data differences corresponding to the first message transmission interface, all of which are outside the behavior data difference range, it is determined that the first message transmission interface has a vulnerability.
6. The method according to any one of claims 1 to 4, characterized in that After determining a target number of second message passing interfaces based on the transmission parameters of each of the first message passing interfaces, the method further includes: Determine a fifth message delivery interface; wherein the fifth message delivery interface is used to indicate a message delivery interface in the first message delivery interface other than the second message delivery interface; Each data transmission thread of the fifth message passing interface is deleted.
7. A data transmission device, characterized in that: include: A first determination module, configured to obtain parallel thread parameters, and determine a plurality of first message passing interfaces from each message passing interface based on the parallel thread parameters; A second determination module, configured to determine a target number of second message delivery interfaces based on transmission parameters of each of the first message delivery interfaces; wherein the second message delivery interfaces are first message delivery interfaces without vulnerabilities; The transmission module is used to create a target data transmission thread based on each of the second message transmission interfaces, and merge the data of each of the target data transmission threads to obtain target data.
8. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 6 when executed by a processor.
10. A computer program product, characterized in that The method comprises a computer program, which implements the method according to any one of claims 1 to 6 when being executed by a processor.