CN116846517B - Network data transmission method and device, storage medium and electronic equipment - Google Patents

Network data transmission method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN116846517B
CN116846517B CN202311112957.0A CN202311112957A CN116846517B CN 116846517 B CN116846517 B CN 116846517B CN 202311112957 A CN202311112957 A CN 202311112957A CN 116846517 B CN116846517 B CN 116846517B
Authority
CN
China
Prior art keywords
network data
data
port
parameters
network
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.)
Active
Application number
CN202311112957.0A
Other languages
Chinese (zh)
Other versions
CN116846517A (en
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.)
Zhejiang Lab
Original Assignee
Zhejiang Lab
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 Zhejiang Lab filed Critical Zhejiang Lab
Priority to CN202311112957.0A priority Critical patent/CN116846517B/en
Publication of CN116846517A publication Critical patent/CN116846517A/en
Application granted granted Critical
Publication of CN116846517B publication Critical patent/CN116846517B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0036Systems modifying transmission characteristics according to link quality, e.g. power backoff arrangements specific to the receiver
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0015Systems modifying transmission characteristics according to link quality, e.g. power backoff characterised by the adaptation strategy

Landscapes

  • Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The specification discloses a transmission method, a device, a storage medium and an electronic device of network data, wherein after receiving first network data, data parameters of the first network data are determined, when the data transmission is matched with port configuration information of a port, the first network data are received, and when the transmission rate of the first network data is too fast and/or the data length of the first network data is too long, the first network data are stored in a storage unit, and after the transmission rate and the data length of the first network data are adjusted by the storage unit, the first network data are sent to the port. Therefore, the network data received by the port for receiving the first network data can not occupy the network resources of other ports of the device, and the data transmission efficiency is ensured.

Description

一种网络数据的传输方法、装置、存储介质及电子设备A network data transmission method, device, storage medium and electronic equipment

技术领域Technical field

本说明书涉及数据处理领域,尤其涉及一种网络数据的传输方法、装置、存储介质及电子设备。This specification relates to the field of data processing, and in particular to a network data transmission method, device, storage medium and electronic equipment.

背景技术Background technique

随着计算机技术的发展和业务深入融合的需要,数据传输在人们生活中的应用愈发广泛。With the development of computer technology and the need for in-depth business integration, data transmission is increasingly used in people's lives.

一种常见的数据传输方式是基于端口实现的。具体的,在设备中可设置有多个用于传输数据的端口,每个端口有其对应的网络资源。于是,在设备需要传输网络数据时,可通过空闲的端口所对应的网络资源,将网络数据进行传输。A common data transmission method is based on ports. Specifically, the device may be provided with multiple ports for transmitting data, and each port has its corresponding network resource. Therefore, when the device needs to transmit network data, the network data can be transmitted through the network resources corresponding to the idle ports.

但是,现有技术在进行数据传输的过程中,可能会出现设备的某一端口在短暂时间内接收到大量网络数据的情况,导致该端口占用的网络资源较多,占用了其他端口的网络资源,进而导致网络拥挤,使得该设备在该段时间内无法传输数据。However, in the process of data transmission with the existing technology, it may happen that a certain port of the device receives a large amount of network data in a short period of time, causing the port to occupy a lot of network resources and occupy the network resources of other ports. , which in turn causes network congestion, making the device unable to transmit data during that period of time.

基于此,本说明书提供了一种网络数据的传输方法。Based on this, this specification provides a network data transmission method.

发明内容Contents of the invention

本说明书提供一种网络数据的传输方法、装置、可读存储介质及电子设备,以部分的解决现有技术存在的上述问题。This specification provides a network data transmission method, device, readable storage medium, and electronic equipment to partially solve the above problems existing in the prior art.

本说明书采用下述技术方案:This manual adopts the following technical solutions:

本说明书提供一种网络数据的传输方法,所述方法应用于端口,所述方法包括:This specification provides a method for transmitting network data. The method is applied to a port. The method includes:

确定待接收的第一网络数据,并确定所述第一网络数据的数据参数,所述数据参数包括传输速率和数据长度中的至少一种;Determine the first network data to be received, and determine data parameters of the first network data, where the data parameters include at least one of a transmission rate and a data length;

确定预先设置的端口配置信息,并判断所述数据参数和所述端口配置信息是否匹配;Determine the preset port configuration information, and determine whether the data parameters and the port configuration information match;

若是,则接收所述第一网络数据;If so, receive the first network data;

若否,则将所述第一网络数据转发至存储单元,并接收所述存储单元发送的目标数据,所述目标数据为所述存储单元根据所述端口配置信息将所述第一网络数据调整后生成的。If not, the first network data is forwarded to the storage unit, and the target data sent by the storage unit is received. The target data is that the storage unit adjusts the first network data according to the port configuration information. generated later.

可选地,所述端口中存储有与所述端口进行通信的各指定设备的地址;Optionally, the port stores addresses of designated devices that communicate with the port;

接收所述第一网络数据,具体包括:Receiving the first network data specifically includes:

确定发送所述第一网络数据的目标设备的地址;Determine the address of the target device sending the first network data;

判断所述各指定设备的地址中,是否存在所述目标设备的地址;Determine whether the address of the target device exists among the addresses of each designated device;

若是,则接收所述第一网络数据;If so, receive the first network data;

若否,则丢弃所述第一网络数据。If not, discard the first network data.

可选地,接收所述第一网络数据,具体包括:Optionally, receiving the first network data specifically includes:

对所述第一网络数据进行解析,确定所述第一网络数据中携带的第一标识,所述第一标识用于指示所述第一网络数据是否有效;Parse the first network data to determine a first identifier carried in the first network data, where the first identifier is used to indicate whether the first network data is valid;

根据所述第一标识,判断所述第一网络数据是否为有效数据;According to the first identifier, determine whether the first network data is valid data;

若是,则接收所述第一网络数据;If so, receive the first network data;

若否,则丢弃所述第一网络数据。If not, discard the first network data.

可选地,所述端口传输的网络数据有其对应的优先级,不同优先级的网络数据在不同的通道上传输,所述方法还包括:Optionally, the network data transmitted by the port has its corresponding priority, and network data of different priorities are transmitted on different channels. The method further includes:

确定待发送的第二网络数据,并确定所述第二网络数据的目标优先级;Determine the second network data to be sent, and determine the target priority of the second network data;

根据所述目标优先级,将所述第二网络数据加入用于传输所述目标优先级的网络数据的通道对应的消息队列中;According to the target priority, add the second network data to the message queue corresponding to the channel used to transmit the network data of the target priority;

按照所述端口配置信息对应的传输速率和数据长度,对所述第二网络数据进行传输。The second network data is transmitted according to the transmission rate and data length corresponding to the port configuration information.

可选地,所述端口与校准单元连接,所述校准单元用于测量所述第二网络数据的传输速率和数据长度;Optionally, the port is connected to a calibration unit, and the calibration unit is used to measure the transmission rate and data length of the second network data;

所述方法还包括:The method also includes:

接收所述校准单元测量得到的测量速率和测量长度;Receive the measurement rate and measurement length measured by the calibration unit;

判断所述测量速度和所述测量长度与所述端口配置信息是否匹配;Determine whether the measurement speed and the measurement length match the port configuration information;

若否,则发送提示信息,所述提示信息用于提示所述端口存在异常。If not, prompt information is sent, and the prompt information is used to prompt that the port is abnormal.

可选地,所述端口与设置单元连接,所述设置单元用于确定用户输入的端口设置参数;Optionally, the port is connected to a setting unit, and the setting unit is used to determine the port setting parameters input by the user;

所述方法还包括:The method also includes:

接收所述设置单元根据用户操作确定出的端口设置参数;Receive port setting parameters determined by the setting unit according to user operations;

根据所述端口设置参数,对所述端口进行配置。Configure the port according to the port setting parameters.

可选地,所述端口与校准单元连接,所述校准单元用于测量所述第一网络数据的传输速率和数据长度;Optionally, the port is connected to a calibration unit, and the calibration unit is used to measure the transmission rate and data length of the first network data;

所述方法还包括:The method also includes:

根据所述端口设置参数中的待定传输速率和所述待定数据长度,配置所述端口;Configure the port according to the pending transmission rate and the pending data length in the port setting parameters;

当所述第一网络数据的数据参数与所述端口设置参数不匹配时,将所述第一网络数据的数据参数发送到所述设置单元,以提示所述用户根据所述第一网络数据的数据参数调整所述待定传输速率和所述待定数据长度;When the data parameters of the first network data do not match the port setting parameters, the data parameters of the first network data are sent to the setting unit to prompt the user according to the settings of the first network data. Data parameters adjust the pending transmission rate and the pending data length;

接收所述设置单元发送的端口设置参数,并重新配置所述端口。Receive the port setting parameters sent by the setting unit, and reconfigure the port.

本说明书提供一种网络数据的传输装置,所述装置应用于端口,所述装置包括:This specification provides a network data transmission device, the device is applied to a port, and the device includes:

参数确定模块,用于确定待接收的第一网络数据,并确定所述第一网络数据的数据参数,所述数据参数包括传输速率和数据长度中的至少一种;A parameter determination module, configured to determine the first network data to be received, and determine the data parameters of the first network data, where the data parameters include at least one of a transmission rate and a data length;

匹配模块,用于确定预先设置的端口配置信息,并判断所述数据参数和所述端口配置信息是否匹配;A matching module, used to determine the preset port configuration information and determine whether the data parameters and the port configuration information match;

第一执行模块,用于若是,则接收所述第一网络数据;A first execution module, configured to receive the first network data if yes;

第二执行模块,用于若否,则将所述第一网络数据转发至存储单元,并接收所述存储单元发送的目标数据,所述目标数据为所述存储单元根据所述端口配置信息将所述第一网络数据调整后生成的。The second execution module is configured to forward the first network data to the storage unit if not, and receive the target data sent by the storage unit, where the target data is that the storage unit transfers the data according to the port configuration information. The first network data is generated after adjustment.

本说明书提供了一种计算机可读存储介质,所述存储介质存储有计算机程序,所述计算机程序被处理器执行时实现上述网络数据的传输方法。This specification provides a computer-readable storage medium. The storage medium stores a computer program. When the computer program is executed by a processor, the above-mentioned network data transmission method is implemented.

本说明书提供了一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现上述网络数据的传输方法。This specification provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the above network data transmission method is implemented.

本说明书采用的上述至少一个技术方案能够达到以下有益效果:At least one of the above technical solutions adopted in this manual can achieve the following beneficial effects:

在接收到第一网络数据后,确定该第一网络数据的数据参数,并当该数据传输与该端口的端口配置信息匹配的情况下,接收该第一网络数据,而在该第一网络数据的传输速率过快和/或该第一网络数据的数据长度过长的情况下,先将该第一网络数据存储到存储单元中,由存储单元将该第一网络数据的传输速率和数据长度进行调整后,再发送给该端口。以此来保证接收该第一网络数据的端口接收到的网络数据不会挤占设备其他端口的网络资源,保证了数据传输的效率。After receiving the first network data, determine the data parameters of the first network data, and when the data transmission matches the port configuration information of the port, receive the first network data, and when the first network data If the transmission rate is too fast and/or the data length of the first network data is too long, the first network data is first stored in the storage unit, and the storage unit stores the transmission rate and data length of the first network data. After making adjustments, send it to the port. This ensures that the network data received by the port that receives the first network data will not occupy network resources of other ports of the device, thereby ensuring the efficiency of data transmission.

附图说明Description of drawings

此处所说明的附图用来提供对本说明书的进一步理解,构成本说明书的一部分,本说明书的示意性实施例及其说明用于解释本说明书,并不构成对本说明书的不当限定。在附图中:The drawings described here are used to provide a further understanding of this specification and constitute a part of this specification. The illustrative embodiments and descriptions of this specification are used to explain this specification and do not constitute an improper limitation of this specification. In the attached picture:

图1为本说明书提供的网络数据的传输方法的流程示意图;Figure 1 is a schematic flow chart of the network data transmission method provided in this specification;

图2为本说明书提供的数据传输方法的流程示意图;Figure 2 is a schematic flow chart of the data transmission method provided in this specification;

图3为本说明书提供的数据传输方法的流程示意图;Figure 3 is a schematic flow chart of the data transmission method provided in this specification;

图4为本说明书提供的端口的结构示意图;Figure 4 is a schematic structural diagram of the port provided in this manual;

图5为本说明书提供的网络数据的传输装置的结构示意图;Figure 5 is a schematic structural diagram of the network data transmission device provided in this specification;

图6为本说明书提供的对应于图1的电子设备示意图。FIG. 6 is a schematic diagram of the electronic device corresponding to FIG. 1 provided in this specification.

具体实施方式Detailed ways

为使本说明书的目的、技术方案和优点更加清楚,下面将结合本说明书具体实施例及相应的附图对本说明书技术方案进行清楚、完整地描述。显然,所描述的实施例仅是本说明书一部分实施例,而不是全部的实施例。基于本说明书中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本说明书保护的范围。In order to make the purpose, technical solutions and advantages of this specification more clear, the technical solutions of this specification will be clearly and completely described below in conjunction with specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only some of the embodiments of this specification, but not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of this specification.

以下结合附图,详细说明本说明书各实施例提供的技术方案。The technical solutions provided by each embodiment of this specification will be described in detail below with reference to the accompanying drawings.

图1为本说明书提供的网络数据的传输方法的流程示意图,具体包括以下步骤:Figure 1 is a schematic flowchart of the network data transmission method provided in this manual, which specifically includes the following steps:

S100:确定待接收的第一网络数据,并确定所述第一网络数据的数据参数,所述数据参数包括传输速率和数据长度中的至少一种。S100: Determine the first network data to be received, and determine the data parameters of the first network data, where the data parameters include at least one of a transmission rate and a data length.

本说明书实施例提供一种网络数据的传输方法,该网络数据的传输方法的执行过程可由用于传输数据的端口来执行。Embodiments of this specification provide a network data transmission method. The execution process of the network data transmission method can be performed by a port used to transmit data.

区别于目前在传输数据时,并不对待传输的网络数据的速率等参数进行管控,导致设备在遇到容量耗尽攻击的情况下,只能通过重启设备等方式来解决该攻击行为,则该设备在尚未重启之前无法进行信息传输。Different from the current data transmission, parameters such as the rate of the network data to be transmitted are not controlled. As a result, when the device encounters a capacity exhaustion attack, the attack behavior can only be solved by restarting the device. Information cannot be transferred until the device is restarted.

本说明书提供一种新的网络数据的传输方法,在接收到第一网络数据后,确定该第一网络数据的数据参数,并当该数据传输与该端口的端口配置信息匹配的情况下,再接收该第一网络数据,而在该第一网络数据的传输速率过快和/或该第一网络数据的数据长度过长的情况下,先将该第一网络数据存储到存储单元中,由存储单元将该第一网络数据的传输速率和数据长度进行调整后,再发送给该端口。以此来保证接收该第一网络数据的端口接收到的网络数据不会挤占设备其他端口的网络资源,保证了数据传输的效率。This specification provides a new network data transmission method. After receiving the first network data, the data parameters of the first network data are determined, and when the data transmission matches the port configuration information of the port, then Receive the first network data, and when the transmission rate of the first network data is too fast and/or the data length of the first network data is too long, first store the first network data into the storage unit, by The storage unit adjusts the transmission rate and data length of the first network data before sending it to the port. This ensures that the network data received by the port that receives the first network data will not occupy network resources of other ports of the device, thereby ensuring the efficiency of data transmission.

基于上述对该网络数据的传输方法的简要说明,可见,该网络数据的传输方法需基于第一网络数据的数据参数,来判断是否直接接收该第一网络数据。因此,该终端可确定该第一网络数据。Based on the above brief description of the network data transmission method, it can be seen that the network data transmission method needs to determine whether to directly receive the first network data based on the data parameters of the first network data. Therefore, the terminal can determine the first network data.

具体的,如前所述的,每个端口有其对应的传输通道。于是,数据发送方可通过该传输通道,将该第一网络数据传输至该端口。Specifically, as mentioned above, each port has its corresponding transmission channel. Therefore, the data sender can transmit the first network data to the port through the transmission channel.

于是,该端口可确定该待接收的第一网络数据。Thus, the port can determine the first network data to be received.

然后,该端口可确定该第一网络数据的数据长度。或者,该端口可确定该第一网络数据的传输速率。The port can then determine the data length of the first network data. Alternatively, the port may determine the transmission rate of the first network data.

最后,该端口可将确定出的数据长度和传输速率中的至少一个,作为该第一网络数据的数据参数。Finally, the port may use at least one of the determined data length and transmission rate as a data parameter of the first network data.

S102:确定预先设置的端口配置信息,并判断所述数据参数和所述端口配置信息是否匹配。若是,执行步骤S104。若否,执行步骤S106。S102: Determine the preset port configuration information, and determine whether the data parameters and the port configuration information match. If yes, execute step S104. If not, execute step S106.

在本说明书提供的一个或多个实施例中,该端口有其预先设置的端口配置信息。其中,该端口配置信息可为该端口的最大传输速率,也可为该端口最大能够传输的数据长度。因此,在确定出第一网络数据的数据参数后,可判断该第一网络数据的数据参数与该端口是否匹配。In one or more embodiments provided in this specification, the port has its preset port configuration information. The port configuration information may be the maximum transmission rate of the port, or the maximum data length that the port can transmit. Therefore, after the data parameters of the first network data are determined, it can be determined whether the data parameters of the first network data match the port.

具体的,若该端口配置信息为该端口的最大传输速率,则该端口可判断该第一网络数据的传输速率是否不大于该端口的最大传输速率。若是,则该端口可接收该第一网络数据。若否,该端口可将该第一网络数据先行存储。Specifically, if the port configuration information is the maximum transmission rate of the port, the port can determine whether the transmission rate of the first network data is not greater than the maximum transmission rate of the port. If so, the port can receive the first network data. If not, the port can store the first network data in advance.

若该端口配置信息为该端口能够传输的网络数据的最大长度,则该端口可判断该第一网络数据的数据长度是否不大于该最大长度。若是,则该端口可接收该第一网络数据。若否,该端口可将该第一网络数据先行存储。If the port configuration information is the maximum length of network data that the port can transmit, the port can determine whether the data length of the first network data is not greater than the maximum length. If so, the port can receive the first network data. If not, the port can store the first network data in advance.

当然,该端口配置信息还可为网络数据的数据发送方的设备标识等。具体该端口配置信息所对应的数据类型,可根据需要进行设置,本说明书对此不做限制。Of course, the port configuration information may also be the device identification of the data sender of the network data, etc. The specific data type corresponding to the port configuration information can be set as needed, and this manual does not limit this.

需要说明的是,该端口还可将上述数据传输速率和数据传输速度分别进行匹配,若任一判断结果为否,则该端口可确定该匹配结果为不匹配。具体该匹配结果如何确定,可根据需要进行设置,本说明书对此不做限制。It should be noted that the port can also match the above-mentioned data transmission rate and data transmission speed respectively. If any judgment result is no, the port can determine that the matching result is a mismatch. How to determine the specific matching result can be set as needed, and this manual does not limit this.

S104:接收所述第一网络数据。S104: Receive the first network data.

在本说明书提供的一个或多个实施例中,在确定该第一网路数据的数据参数和该端口的端口配置信息匹配时,该端口可将该第一网络数据进行接收,并在接收后对该第一网络数据进行处理。In one or more embodiments provided in this specification, when it is determined that the data parameters of the first network data match the port configuration information of the port, the port may receive the first network data, and after receiving Process the first network data.

S106:则将所述第一网络数据转发至存储单元,并接收所述存储单元发送的目标数据,所述目标数据为所述存储单元根据所述端口配置信息将所述第一网络数据调整后生成的。S106: Then forward the first network data to the storage unit, and receive the target data sent by the storage unit. The target data is the first network data adjusted by the storage unit according to the port configuration information. Generated.

在本说明书提供的一个或多个实施例中,当该第一网络数据的数据参数和该端口的端口配置信息不匹配时,该端口可将该第一网络数据存储在存储单元中,由存储单元对第一网络数据进行调整后,再重新发送给该端口。In one or more embodiments provided in this specification, when the data parameters of the first network data do not match the port configuration information of the port, the port can store the first network data in the storage unit. After the unit adjusts the first network data, it resends it to the port.

具体的,该存储单元用于存储数据参数和该端口配置信息不匹配的网络数据,以避免突发性数据传输导致端口阻塞,造成关键数据的异常丢失。如图2所示。Specifically, the storage unit is used to store network data whose data parameters do not match the port configuration information, so as to avoid port blockage caused by sudden data transmission and abnormal loss of key data. as shown in picture 2.

图2为本说明书提供的数据传输方法的流程示意图。其中,该数据发送方和该端口之间通过网络进行连接,在确定数据参数与该端口配置信息不匹配的情况下,该端口可将不接收该第一网络数据,而是将该第一网络数据转发至存储单元中。Figure 2 is a schematic flow chart of the data transmission method provided in this specification. Wherein, the data sender and the port are connected through a network. When it is determined that the data parameters do not match the port configuration information, the port may not receive the first network data, but instead send the first network data to the port. The data is forwarded to the storage unit.

该存储单元可将该第一网络数据进行接收,并根据该端口配置信息对应的传输速率和数据长度,对该第一网络数据的传输速率或数据长度进行调整,以得到数据参数与该端口配置信息匹配的目标数据。The storage unit can receive the first network data and adjust the transmission rate or data length of the first network data according to the transmission rate and data length corresponding to the port configuration information to obtain the data parameters and the port configuration. The information matches the target data.

于是,该存储单元可将该目标数据传输至该端口。The storage unit can then transfer the target data to the port.

该端口可接收该存储单元发送的目标数据。This port can receive the target data sent by this memory unit.

基于图1所示的网络数据的传输方法,在接收到第一网络数据后,确定该第一网络数据的数据参数,并当该数据传输与该端口的端口配置信息匹配的情况下,接收该第一网络数据,而在该第一网络数据的传输速率过快和/或该第一网络数据的数据长度过长的情况下,先将该第一网络数据存储到存储单元中,由存储单元将该第一网络数据的传输速率和数据长度进行调整后,再发送给该端口。以此来保证接收该第一网络数据的端口接收到的网络数据不会挤占设备其他端口的网络资源,保证了数据传输的效率。Based on the network data transmission method shown in Figure 1, after receiving the first network data, determine the data parameters of the first network data, and when the data transmission matches the port configuration information of the port, receive the First network data, and when the transmission rate of the first network data is too fast and/or the data length of the first network data is too long, the first network data is first stored in the storage unit, and the storage unit After adjusting the transmission rate and data length of the first network data, the data is then sent to the port. This ensures that the network data received by the port that receives the first network data will not occupy network resources of other ports of the device, thereby ensuring the efficiency of data transmission.

另外,为了避免第三方设备通过该端口发起网络攻击的情况出现,该端口中还可存储有可与该端口进行通信的指定设备的地址。则当接收到第一网络数据时,可判断该第一网络数据的数据发送方是否可信,在可信度的情况下,再接收该第一网络数据。其中,该地址可为网络地址,也可为物理地址。In addition, in order to prevent third-party devices from launching network attacks through this port, the port can also store the address of a designated device that can communicate with this port. Then, when the first network data is received, it can be determined whether the data sender of the first network data is trustworthy. If the data sender of the first network data is trustworthy, the first network data can be received again. The address can be a network address or a physical address.

具体的,在接收到该第一网络数据的情况下,该端口可确定发送该第一网络设备的目标设备的地址。Specifically, upon receiving the first network data, the port may determine the address of the target device sending the first network device.

然后,该端口可根据该目标设备的地址,以及该端口预先存储的各指定设备分别对应的地址,判断各指定设备的地址中,是否存在该目标设备的地址。其中,各指定设备对于该端口来说,为可信设备。则若存在,该端口可确定发送该第一网络数据的目标设备为可信设备,若不存在,则为不可信设备。Then, the port can determine whether the address of the target device exists in the address of each designated device based on the address of the target device and the addresses corresponding to each designated device pre-stored by the port. Among them, each designated device is a trusted device for this port. Then, if it exists, the port can determine that the target device sending the first network data is a trusted device; if it does not exist, it is an untrusted device.

于是,该端口可在确定该目标设备可信的情况下,接收该第一网络数据。Therefore, the port can receive the first network data after determining that the target device is trustworthy.

而在该目标设备不可信的情况下,该端口可将该第一网络数据作为不可信数据进行丢弃。If the target device is untrusted, the port may discard the first network data as untrusted data.

进一步的,对于数据传输过程来说,为了保证数据传输过程中的数据安全,两个端口或两个设备之间传输的数据可包含有效数据,也可包含无效数据。因此,在接收到第一网络数据后,该端口还可判断该第一网络数据是否有效,并当该第一网络数据有效的情况下,再接收该第一网络数据。Furthermore, for the data transmission process, in order to ensure data security during the data transmission process, the data transmitted between two ports or two devices may contain valid data or invalid data. Therefore, after receiving the first network data, the port can also determine whether the first network data is valid, and when the first network data is valid, receive the first network data again.

具体的,一般的,对于如何区分网络数据是否有效,可为传输网络数据的两个端口事先预定的第一标识确定的。因此,在接收到该第一网络数据后,该服务器可确定该第一网络数据中携带的第一标识。其中,该第一标识可为该网络数据的第一位数字,也可为对该第一网络数据进行哈希运算后所得结果,该第一标识具体如何确定可根据需要进行设置,本说明书对此不做限制。Specifically, generally, how to distinguish whether the network data is valid or not can be determined by predetermined first identifiers of the two ports that transmit the network data. Therefore, after receiving the first network data, the server can determine the first identifier carried in the first network data. The first identifier can be the first digit of the network data, or can be the result of a hash operation on the first network data. How to specifically determine the first identifier can be set as needed. This specification explains There is no restriction on this.

于是,该端口可根据该第一标识,判断该第一网络数据是否为有效数据。Therefore, the port can determine whether the first network data is valid data according to the first identifier.

若有效,则该端口可接收该第一网络数据。若无效,则该端口可将该第一网络数据丢弃。If valid, the port can receive the first network data. If it is invalid, the port can discard the first network data.

更进一步的,在本说明书中,端口传输的网络数据可有其对应的优先级,为了避免端口长时间被优先级较高的数据占用,导致优先级较低的数据无法进行传输的情况出现,该端口可设置不同优先级分别对应的通道。也就是说,在本说明书中,不同优先级的网络数据在不同的通道上传输,不同通道对应于不同的网络资源。如,优先级为1的网络数据所对应的带宽资源为1k-10kbit/s,优先级为2的网络数据所对应的带宽资源为10k-100kbit/s。Furthermore, in this specification, the network data transmitted by the port can have its corresponding priority. In order to avoid the situation where the port is occupied by data with higher priority for a long time, causing data with lower priority to be unable to be transmitted, This port can set channels corresponding to different priorities. That is to say, in this specification, network data with different priorities are transmitted on different channels, and different channels correspond to different network resources. For example, the bandwidth resources corresponding to network data with priority 1 are 1k-10kbit/s, and the bandwidth resources corresponding to network data with priority 2 are 10k-100kbit/s.

另外,该端口在发送数据时,可基于网络数据的优先级,将第二网络数据在对应的优先级所对应的通道中进行发送。In addition, when sending data, the port can send the second network data in the channel corresponding to the corresponding priority based on the priority of the network data.

具体的,该端口可确定待发送的第二网络数据,并确定该第二网络数据的目标优先级。Specifically, the port can determine the second network data to be sent, and determine the target priority of the second network data.

然后,该端口可确定用于传输该目标优先级的网络数据的通道,并将该第二网络数据加入该通道对应的消息队列中。Then, the port may determine the channel used to transmit the network data of the target priority, and add the second network data to the message queue corresponding to the channel.

最后,该端口可基于该消息队列,当需要将该第二网络数据按照端口配置信息对应的传输速率和数据长度进行传输。其中,该第一网络数据为该接口接收的网络数据,该第二网络数据为该接口需要发送的网络数据。Finally, based on the message queue, the port can transmit the second network data according to the transmission rate and data length corresponding to the port configuration information. The first network data is network data received by the interface, and the second network data is network data that needs to be sent by the interface.

进一步的,在端口传输数据的过程中,可能出现端口异常,导致端口传输的数据不符合端口配置信息的情况。因此,在本申请中,该端口还可连接有校准单元,以实时确定该端口传输的网络数据的数据参数,进而基于该数据参数避免上述情况的发生。Furthermore, during the process of port transmission of data, port anomalies may occur, causing the data transmitted by the port to be inconsistent with the port configuration information. Therefore, in this application, the port can also be connected to a calibration unit to determine the data parameters of the network data transmitted by the port in real time, and then avoid the above situation based on the data parameters.

具体的,该端口与校准单元连接,该校准单元用于测量第二网络数据的传输速率和数据长度。如图3所示。Specifically, the port is connected to a calibration unit, and the calibration unit is used to measure the transmission rate and data length of the second network data. As shown in Figure 3.

图3为本说明书提供的数据传输方法的流程示意图。其中,该数据接收方和该端口之间通过网络进行连接,该端口和校准单元连接。在该端口向数据接收方发送第二网络数据时,该校准单元可对该第二网络数据的数据参数进行测量。Figure 3 is a schematic flow chart of the data transmission method provided in this specification. The data receiver and the port are connected through a network, and the port is connected to the calibration unit. When the port sends the second network data to the data receiver, the calibration unit can measure the data parameters of the second network data.

于是,该端口可接收该校准单元对第二网络数据进行测量后得到的测量速率和测量长度,并判断该测量速度和该测量长度与该端口配置信息是否匹配。Therefore, the port can receive the measurement rate and measurement length obtained by measuring the second network data by the calibration unit, and determine whether the measurement speed and the measurement length match the port configuration information.

若匹配,则该端口可继续传输该第二网络数据。If there is a match, the port can continue to transmit the second network data.

若不匹配,则该端口可向用户发送提示信息。其中,该提示信息用于提示该端口存在异常。该用户可为使用该端口传输数据的用户。If there is no match, the port can send a prompt message to the user. Among them, the prompt information is used to prompt that there is an abnormality in the port. This user can be a user who uses this port to transmit data.

另外,在本说明书中,该端口的配置信息还可为使用该端口传输数据的用户设置的。In addition, in this specification, the configuration information of the port can also be set by the user who uses the port to transmit data.

具体的,该端口与设置单元连接,该设置单元可根据用户执行的操作,确定端口设置参数。Specifically, the port is connected to a setting unit, and the setting unit can determine the port setting parameters according to operations performed by the user.

于是,该端口可接收设置单元根据用户操作确定出的端口设置参数。其中,该端口设置参数可包含与该端口通信的指定设备的标识、该端口的最大传输速率以及该端口可传输的网络数据的最大长度中的至少一种。Therefore, the port can receive the port setting parameters determined by the setting unit according to the user operation. The port setting parameters may include at least one of an identification of a designated device communicating with the port, a maximum transmission rate of the port, and a maximum length of network data that the port can transmit.

则该端口可根据接收到的端口设置参数,对该端口进行配置。Then the port can be configured according to the received port setting parameters.

进一步的,在本说明书中,当该第一网络数据的数据参数与该端口的配置信息不匹配时,用户还可基于该第一网络数据的数据参数,对该端口的配置信息进行调整。Further, in this specification, when the data parameters of the first network data do not match the configuration information of the port, the user can also adjust the configuration information of the port based on the data parameters of the first network data.

具体的,该端口和设置单元连接。于是,该端口可接收该设置单元根据用户操作确定出的待定传输速率和待定数据长度。并根据该待定传输速率和该待定数据长度,对该端口进行配置,确定该端口的待定配置信息。Specifically, this port is connected to the setting unit. Therefore, the port can receive the pending transmission rate and the pending data length determined by the setting unit according to the user operation. And configure the port according to the pending transmission rate and the pending data length, and determine the pending configuration information of the port.

该端口还和校准单元连接,该校准单元用于测量该第一网络数据的传输速率和数据长度。The port is also connected to a calibration unit, which is used to measure the transmission rate and data length of the first network data.

于是,该端口可接收校准单元确定出的第一网络数据的数据参数,并判断该待定配置信息和该第一网络数据的数据参数是否匹配。Therefore, the port can receive the data parameters of the first network data determined by the calibration unit, and determine whether the pending configuration information matches the data parameters of the first network data.

若匹配,则该端口可继续接收该第一网络数据。If there is a match, the port can continue to receive the first network data.

若不匹配,则该端口可将确定出的第一网络数据的数据参数发送给设置单元。If there is no match, the port may send the determined data parameters of the first network data to the setting unit.

该设置单元可接收该端口发送的第一网络数据的数据参数,并根据该数据参数提示用户该待定传输速率和待定数据长度存在异常,以使该用户根据该第一网络数据的数据参数,对该待定传输速率和待定数据长度进行调整。The setting unit can receive the data parameters of the first network data sent by the port, and prompt the user that there is an abnormality in the pending transmission rate and the pending data length according to the data parameters, so that the user can adjust the data according to the data parameters of the first network data. The pending transfer rate and pending data length are adjusted.

于是,该设置单元可响应于该用户的输入操作,重新确定端口设置信息,并将重新确定出的端口设置信息发送给该端口。Therefore, the setting unit can re-determine the port setting information in response to the user's input operation, and send the re-determined port setting information to the port.

该端口根据重新接收到的端口设置信息,对该端口重新进行配置。The port reconfigures the port based on the re-received port setting information.

需要说明的是,本说明书中的端口,可仅为物理设备进行数据传输的端口,其与各单元进行连接,来实现如上述所说的保证数据传输效率,避免网络攻击等功能。该端口还可为包含上述用于进行数据传输的传输单元,以及上述所述各单元,通过内置的各单元来实现上述保证数据传输效率等功能的端口。如图4所示。It should be noted that the ports in this specification can only be the ports for data transmission of physical devices, which are connected to each unit to achieve the above-mentioned functions of ensuring data transmission efficiency and avoiding network attacks. The port may also be a port that includes the above-mentioned transmission unit for data transmission and the above-mentioned units, and realizes the above-mentioned functions of ensuring data transmission efficiency through the built-in units. As shown in Figure 4.

图4为本说明书提供的端口的结构示意图。图中,该存储单元、传输单元、设置单元和校准单元四个单元组成端口。该端口即可接收数据发送方发送的网络数据,也可作为数据发送方向数据接收方发送网络数据。于是,该端口可接收设置单元发送的端口设置参数,并根据该端口设置参数,对传输单元进行配置。则该传输单元可接收数据发送方发送的第一网络数据,并确定该第一网络数据的数据参数,以及判断该数据参数和自身的配置信息是否匹配。若匹配,则接收该第一网络数据。若不匹配,则将第一网络数据转发至存储单元。Figure 4 is a schematic structural diagram of the port provided in this manual. In the figure, the four units of the storage unit, transmission unit, setting unit and calibration unit constitute the port. This port can receive network data sent by the data sender, and can also be used as a data sender to send network data to the data receiver. Therefore, the port can receive the port setting parameters sent by the setting unit, and configure the transmission unit according to the port setting parameters. Then the transmission unit can receive the first network data sent by the data sender, determine the data parameters of the first network data, and determine whether the data parameters match its own configuration information. If there is a match, the first network data is received. If there is no match, the first network data is forwarded to the storage unit.

存储单元接收该第一网络数据,并对该第一网络数据的数据参数进行调整后,得到目标数据发送给传输单元。The storage unit receives the first network data, adjusts the data parameters of the first network data, and then obtains the target data and sends it to the transmission unit.

该传输单元在作为数据发送方向外发送第二网络数据时,可通过校准模块确定第二网络数据的测量参数,并基于该测量参数和该传输单元自身的配置信息是否匹配的结果,来发送该第二网络数据。When the transmission unit sends the second network data outward as a data sending direction, it can determine the measurement parameters of the second network data through the calibration module, and send the transmission unit based on whether the measurement parameters match the configuration information of the transmission unit itself. Second network data.

需要说明的是,上述各单元的连接关系仅为示例说明,该校准单元还可用于测量第一网络数据的数据参数,该校准单元还可与设置单元连接等。具体该端口内各单元如何连接可根据需要进行设置,本说明书对此不做限制。It should be noted that the connection relationship between the above units is only an example. The calibration unit can also be used to measure the data parameters of the first network data, and the calibration unit can also be connected to the setting unit. The specific connection of each unit in this port can be set according to needs, and this manual does not limit this.

基于同样思路,本说明书还提供一种网络数据的传输装置,如图5所示。Based on the same idea, this specification also provides a network data transmission device, as shown in Figure 5.

图5为本说明书提供的网络数据的传输装置,所述装置应用于端口,其中:Figure 5 is a network data transmission device provided in this specification. The device is applied to a port, where:

参数确定模块200,用于确定待接收的第一网络数据,并确定所述第一网络数据的数据参数,所述数据参数包括传输速率和数据长度中的至少一种。The parameter determination module 200 is used to determine the first network data to be received, and determine the data parameters of the first network data, where the data parameters include at least one of a transmission rate and a data length.

匹配模块202,用于确定预先设置的端口配置信息,并判断所述数据参数和所述端口配置信息是否匹配。The matching module 202 is used to determine the preset port configuration information, and determine whether the data parameters and the port configuration information match.

第一执行模块204,用于若是,则接收所述第一网络数据;The first execution module 204 is configured to receive the first network data if so;

第二执行模块206,用于若否,则将所述第一网络数据转发至存储单元,并接收所述存储单元发送的目标数据,所述目标数据为所述存储单元根据所述端口配置信息将所述第一网络数据调整后生成的。The second execution module 206 is configured to forward the first network data to the storage unit if not, and receive the target data sent by the storage unit, where the target data is the storage unit according to the port configuration information. Generated after adjusting the first network data.

可选地,第一执行模块204,用于确定发送所述第一网络数据的目标设备的地址,判断所述各指定设备的地址中,是否存在所述目标设备的地址,若是,则接收所述第一网络数据,若否,则丢弃所述第一网络数据,其中,所述端口中存储有与所述端口进行通信的各指定设备的地址。Optionally, the first execution module 204 is used to determine the address of the target device that sends the first network data, determine whether the address of the target device exists among the addresses of each designated device, and if so, receive the address of the target device. If not, the first network data is discarded, wherein the addresses of designated devices communicating with the port are stored in the port.

可选地,第一执行模块204,用于对所述第一网络数据进行解析,确定所述第一网络数据中携带的第一标识,所述第一标识用于指示所述第一网络数据是否有效,根据所述第一标识,判断所述第一网络数据是否为有效数据,若是,则接收所述第一网络数据,若否,则丢弃所述第一网络数据。Optionally, the first execution module 204 is used to parse the first network data and determine the first identifier carried in the first network data, where the first identifier is used to indicate the first network data. Whether it is valid or not, determine whether the first network data is valid data according to the first identifier. If so, the first network data is received. If not, the first network data is discarded.

可选地,匹配模块202,用于确定待发送的第二网络数据,并确定所述第二网络数据的目标优先级,根据所述目标优先级,将所述第二网络数据加入用于传输所述目标优先级的网络数据的通道对应的消息队列中,按照所述端口配置信息对应的传输速率和数据长度,对所述第二网络数据进行传输。所述端口传输的网络数据有其对应的优先级,不同优先级的网络数据在不同的通道上传输。Optionally, the matching module 202 is used to determine the second network data to be sent, determine the target priority of the second network data, and add the second network data for transmission according to the target priority. In the message queue corresponding to the channel of the network data of the target priority, the second network data is transmitted according to the transmission rate and data length corresponding to the port configuration information. The network data transmitted by the port has its corresponding priority, and network data of different priorities are transmitted on different channels.

可选地,匹配模块202,用于接收所述校准单元测量得到的测量速率和测量长度,所述端口与校准单元连接,所述校准单元用于测量所述第二网络数据的传输速率和数据长度,判断所述测量速度和所述测量长度与所述端口配置信息是否匹配,若否,则发送提示信息,所述提示信息用于提示所述端口存在异常。Optionally, the matching module 202 is used to receive the measurement rate and measurement length measured by the calibration unit, the port is connected to the calibration unit, and the calibration unit is used to measure the transmission rate and data of the second network data. Length, determine whether the measurement speed and the measurement length match the port configuration information, and if not, send prompt information, and the prompt information is used to prompt that there is an abnormality in the port.

可选地,参数确定模块200,用于接收所述设置单元根据用户操作确定出的端口设置参数,所述端口与设置单元连接,所述设置单元用于确定用户输入的端口设置参数,根据所述端口设置参数,对所述端口进行配置。Optionally, the parameter determination module 200 is used to receive the port setting parameters determined by the setting unit according to the user operation. The port is connected to the setting unit. The setting unit is used to determine the port setting parameters input by the user. According to the Set the parameters for the port described above to configure the port.

可选地,参数确定模块200,用于根据所述端口设置参数中的待定传输速率和所述待定数据长度,配置所述端口,当所述第一网络数据的数据参数与所述端口设置参数不匹配时,将所述第一网络数据的数据参数发送到所述设置单元,以提示所述用户根据所述第一网络数据的数据参数调整所述待定传输速率和所述待定数据长度,接收所述设置单元发送的端口设置参数,并重新配置所述端口,其中,所述端口与校准单元连接,所述校准单元用于测量所述第一网络数据的传输速率和数据长度。Optionally, the parameter determination module 200 is configured to configure the port according to the pending transmission rate and the pending data length in the port setting parameters. When the data parameters of the first network data are consistent with the port setting parameters, When there is a mismatch, the data parameters of the first network data are sent to the setting unit to prompt the user to adjust the pending transmission rate and the pending data length according to the data parameters of the first network data, and receive The port setting parameters sent by the setting unit are configured to reconfigure the port, wherein the port is connected to a calibration unit, and the calibration unit is used to measure the transmission rate and data length of the first network data.

本说明书还提供了一种计算机可读存储介质,该存储介质存储有计算机程序,计算机程序可用于执行上述图1提供的网络数据的传输方法。This specification also provides a computer-readable storage medium that stores a computer program. The computer program can be used to execute the network data transmission method provided in Figure 1 above.

本说明书还提供了图6所示的电子设备的示意结构图。如图6所述,在硬件层面,该电子设备包括处理器、内部总线、网络接口、内存以及非易失性存储器,当然还可能包括其他业务所需要的硬件。处理器从非易失性存储器中读取对应的计算机程序到内存中然后运行,以实现上述图1所述的网络数据的传输方法。当然,除了软件实现方式之外,本说明书并不排除其他实现方式,比如逻辑器件抑或软硬件结合的方式等等,也就是说以下处理流程的执行主体并不限定于各个逻辑单元,也可以是硬件或逻辑器件。This specification also provides a schematic structural diagram of the electronic device shown in Figure 6. As shown in Figure 6, at the hardware level, the electronic device includes a processor, internal bus, network interface, memory and non-volatile memory, and of course may also include other hardware required for business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to implement the network data transmission method described in Figure 1 above. Of course, in addition to software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc. That is to say, the execution subject of the following processing flow is not limited to each logical unit, and may also be hardware or logic device.

在20世纪90年代,对于一个技术的改进可以很明显地区分是硬件上的改进(例如,对二极管、晶体管、开关等电路结构的改进)还是软件上的改进(对于方法流程的改进)。然而,随着技术的发展,当今的很多方法流程的改进已经可以视为硬件电路结构的直接改进。设计人员几乎都通过将改进的方法流程编程到硬件电路中来得到相应的硬件电路结构。因此,不能说一个方法流程的改进就不能用硬件实体模块来实现。例如,可编程逻辑器件(Programmable Logic Device, PLD)(例如现场可编程门阵列(Field Programmable GateArray,FPGA))就是这样一种集成电路,其逻辑功能由用户对器件编程来确定。由设计人员自行编程来把一个数字系统“集成”在一片PLD上,而不需要请芯片制造厂商来设计和制作专用的集成电路芯片。而且,如今,取代手工地制作集成电路芯片,这种编程也多半改用“逻辑编译器(logic compiler)”软件来实现,它与程序开发撰写时所用的软件编译器相类似,而要编译之前的原始代码也得用特定的编程语言来撰写,此称之为硬件描述语言(Hardware Description Language,HDL),而HDL也并非仅有一种,而是有许多种,如ABEL(Advanced Boolean Expression Language)、AHDL(Altera Hardware DescriptionLanguage)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL(Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(RubyHardware Description Language)等,目前最普遍使用的是VHDL(Very-High-SpeedIntegrated Circuit Hardware Description Language)与Verilog。本领域技术人员也应该清楚,只需要将方法流程用上述几种硬件描述语言稍作逻辑编程并编程到集成电路中,就可以很容易得到实现该逻辑方法流程的硬件电路。In the 1990s, improvements in a technology could be clearly distinguished as hardware improvements (for example, improvements in circuit structures such as diodes, transistors, switches, etc.) or software improvements (improvements in method processes). However, with the development of technology, many improvements in today's method processes can be regarded as direct improvements in hardware circuit structures. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement of a method flow cannot be implemented using hardware entity modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic functions are determined by the user programming the device. Designers can program themselves to "integrate" a digital system on a PLD, instead of asking chip manufacturers to design and produce dedicated integrated circuit chips. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented using "logic compiler" software, which is similar to the software compiler used in program development and writing. Before compiling, The original code must also be written in a specific programming language, which is called Hardware Description Language (HDL). There is not only one type of HDL, but many types, such as ABEL (Advanced Boolean Expression Language) , AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones currently are VHDL (Very-High-SpeedIntegrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that by simply logically programming the method flow using the above-mentioned hardware description languages and programming it into the integrated circuit, the hardware circuit that implements the logical method flow can be easily obtained.

控制器可以按任何适当的方式实现,例如,控制器可以采取例如微处理器或处理器以及存储可由该(微)处理器执行的计算机可读程序代码(例如软件或固件)的计算机可读介质、逻辑门、开关、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程逻辑控制器和嵌入微控制器的形式,控制器的例子包括但不限于以下微控制器:ARC 625D、Atmel AT91SAM、Microchip PIC18F26K20 以及Silicone Labs C8051F320,存储器控制器还可以被实现为存储器的控制逻辑的一部分。本领域技术人员也知道,除了以纯计算机可读程序代码方式实现控制器以外,完全可以通过将方法步骤进行逻辑编程来使得控制器以逻辑门、开关、专用集成电路、可编程逻辑控制器和嵌入微控制器等的形式来实现相同功能。因此这种控制器可以被认为是一种硬件部件,而对其内包括的用于实现各种功能的装置也可以视为硬件部件内的结构。或者甚至,可以将用于实现各种功能的装置视为既可以是实现方法的软件模块又可以是硬件部件内的结构。The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code (eg, software or firmware) executable by the (micro)processor. , logic gates, switches, Application Specific Integrated Circuit (ASIC), programmable logic controllers and embedded microcontrollers. Examples of controllers include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320, the memory controller can also be implemented as part of the memory control logic. Those skilled in the art also know that in addition to implementing the controller in the form of pure computer-readable program code, the controller can be completely programmed with logic gates, switches, application-specific integrated circuits, programmable logic controllers and embedded logic by logically programming the method steps. Microcontroller, etc. to achieve the same function. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be considered as structures within the hardware component. Or even, the means for implementing various functions can be considered as structures within hardware components as well as software modules implementing the methods.

上述实施例阐明的系统、装置、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机。具体的,计算机例如可以为个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任何设备的组合。The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or A combination of any of these devices.

为了描述的方便,描述以上装置时以功能分为各种单元分别描述。当然,在实施本说明书时可以把各单元的功能在同一个或多个软件和/或硬件中实现。For the convenience of description, when describing the above device, the functions are divided into various units and described separately. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and/or hardware.

本领域内的技术人员应明白,本说明书的实施例可提供为方法、系统、或计算机程序产品。因此,本说明书可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本说明书可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will understand that embodiments of the present specification may be provided as methods, systems, or computer program products. Thus, the present description may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment that combines software and hardware aspects. Furthermore, the present description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.

本说明书是参照根据本说明书实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程病灶检测设备的处理器以产生一个机器,使得通过计算机或其他可编程病灶检测设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。This specification is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the specification. It will be understood that each process and/or block in the flowchart illustrations and/or block diagrams, and combinations of processes and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a general-purpose computer, a special-purpose computer, an embedded processor, or a processor of other programmable lesion detection devices to produce a machine such that the instructions executed by the processor of the computer or other programmable lesion detection device generate a A device for realizing the functions specified in a process or processes in a flowchart and/or a block or blocks in a block diagram.

这些计算机程序指令也可存储在能引导计算机或其他可编程病灶检测设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable lesion detection device to operate in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means, the instructions The device implements the functions specified in a process or processes in the flowchart and/or in a block or blocks in the block diagram.

这些计算机程序指令也可装载到计算机或其他可编程病灶检测设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions may also be loaded onto a computer or other programmable lesion detection device, causing a series of operating steps to be performed on the computer or other programmable device to produce computer-implemented processing, thereby executing on the computer or other programmable device. Instructions provide steps for implementing the functions specified in a process or processes of a flowchart diagram and/or a block or blocks of a block diagram.

在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.

内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。Memory may include non-permanent storage in computer-readable media, random access memory (RAM), and/or non-volatile memory in the form of read-only memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.

计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。Computer-readable media includes both persistent and non-volatile, removable and non-removable media that can be implemented by any method or technology for storage of information. Information may be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), and read-only memory. (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, Magnetic tape cassettes, tape magnetic disk storage or other magnetic storage devices or any other non-transmission medium can be used to store information that can be accessed by a computing device. As defined in this article, computer-readable media does not include transitory media, such as modulated data signals and carrier waves.

还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。It should also be noted that the terms "comprises," "comprises," or any other variation thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements not only includes those elements, but also includes Other elements are not expressly listed or are inherent to the process, method, article or equipment. Without further limitation, an element defined by the statement "comprises a..." does not exclude the presence of additional identical elements in a process, method, article, or device that includes the stated element.

本领域技术人员应明白,本说明书的实施例可提供为方法、系统或计算机程序产品。因此,本说明书可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本说明书可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that embodiments of the present specification may be provided as methods, systems, or computer program products. Thus, the present description may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment that combines software and hardware aspects. Furthermore, the present description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.

本说明书可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。也可以在分布式计算环境中实践本说明书,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行任务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。This specification may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present description may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through communications networks. In a distributed computing environment, program modules may be located in both local and remote computer storage media including storage devices.

本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。Each embodiment in this specification is described in a progressive manner. The same and similar parts between the various embodiments can be referred to each other. Each embodiment focuses on its differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple. For relevant details, please refer to the partial description of the method embodiment.

以上所述仅为本说明书的实施例而已,并不用于限制本说明书。对于本领域技术人员来说,本说明书可以有各种更改和变化。凡在本说明书的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本说明书的权利要求范围之内。The above descriptions are only examples of this specification and are not intended to limit this specification. Various modifications and variations may occur to those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of this specification shall be included in the scope of the claims of this specification.

Claims (7)

1. The method is characterized in that the method is applied to a port, the port is connected with a setting unit, the setting unit is used for determining port setting parameters input by a user, the port is connected with a calibration unit, and the calibration unit is used for measuring the transmission rate and the data length of first network data; the method comprises the following steps:
receiving port setting parameters determined by the setting unit according to user operation;
configuring the port according to the port setting parameters;
determining first network data to be received, and determining data parameters of the first network data, wherein the data parameters comprise at least one of transmission rate and data length;
determining preset port configuration information, and judging whether the data parameters are matched with the port configuration information or not;
if yes, receiving the first network data;
if not, forwarding the first network data to a storage unit, and receiving target data sent by the storage unit, wherein the target data is generated by the storage unit after the first network data is adjusted according to the port configuration information, and the data parameters of the target data are matched with the port configuration information; the data parameters of the first network data are sent to the setting unit so as to prompt the user to adjust the port setting parameters according to the data parameters of the first network data, receive the port setting parameters sent by the setting unit and reconfigure the port;
The receiving of the first network data specifically includes:
determining an address of a target device that transmits the first network data;
judging whether the address of the target equipment exists in the addresses of the designated equipment;
if yes, receiving the first network data;
if not, discarding the first network data;
wherein the port stores therein an address of each designated device in communication with the port.
2. The method of claim 1, wherein receiving the first network data specifically comprises:
analyzing the first network data, and determining a first identifier carried in the first network data, wherein the first identifier is used for indicating whether the first network data is valid or not;
judging whether the first network data is valid data or not according to the first identifier;
if yes, receiving the first network data;
and if not, discarding the first network data.
3. The method of claim 1, wherein the port transmits network data having its corresponding priority, different priority network data being transmitted on different channels, the method further comprising:
determining second network data to be transmitted, and determining a target priority of the second network data;
According to the target priority, adding the second network data into a message queue corresponding to a channel for transmitting the network data of the target priority;
and transmitting the second network data according to the transmission rate and the data length corresponding to the port configuration information.
4. A method according to claim 3, wherein the port is connected to a calibration unit for measuring the transmission rate and data length of the second network data;
the method further comprises the steps of:
receiving the measurement rate and the measurement length obtained by the measurement of the calibration unit;
judging whether the measurement speed and the measurement length are matched with the port configuration information or not;
if not, sending prompt information, wherein the prompt information is used for prompting that the port is abnormal.
5. The device is characterized in that the device is applied to a port, the port is connected with a setting unit, the setting unit is used for determining port setting parameters input by a user, the port is connected with a calibration unit, and the calibration unit is used for measuring the transmission rate and the data length of first network data; the device comprises:
The parameter determining module is used for receiving the port setting parameters determined by the setting unit according to the user operation, configuring the port according to the port setting parameters, determining first network data to be received, and determining data parameters of the first network data, wherein the data parameters comprise at least one of transmission rate and data length;
the matching module is used for determining preset port configuration information and judging whether the data parameters are matched with the port configuration information or not;
the first execution module is used for receiving the first network data if yes;
the second execution module is used for forwarding the first network data to a storage unit and receiving target data sent by the storage unit if not, wherein the target data is generated after the storage unit adjusts the first network data according to the port configuration information, and the data parameters of the target data are matched with the port configuration information; the data parameters of the first network data are sent to the setting unit so as to prompt the user to adjust the port setting parameters according to the data parameters of the first network data, receive the port setting parameters sent by the setting unit and reconfigure the port;
The receiving of the first network data specifically includes:
determining an address of a target device that transmits the first network data;
judging whether the address of the target equipment exists in the addresses of the designated equipment;
if yes, receiving the first network data;
if not, discarding the first network data;
wherein the port stores therein an address of each designated device in communication with the port.
6. A computer readable storage medium storing a computer program, wherein the computer program when executed by a processor implements the method of any of the preceding claims 1-4.
7. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of any of the preceding claims 1-4 when executing the program.
CN202311112957.0A 2023-08-31 2023-08-31 Network data transmission method and device, storage medium and electronic equipment Active CN116846517B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311112957.0A CN116846517B (en) 2023-08-31 2023-08-31 Network data transmission method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311112957.0A CN116846517B (en) 2023-08-31 2023-08-31 Network data transmission method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN116846517A CN116846517A (en) 2023-10-03
CN116846517B true CN116846517B (en) 2024-01-02

Family

ID=88165521

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311112957.0A Active CN116846517B (en) 2023-08-31 2023-08-31 Network data transmission method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN116846517B (en)

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009152753A1 (en) * 2008-06-20 2009-12-23 华为技术有限公司 Method, network node and network system for negotiating the port attribute parameters
US7639616B1 (en) * 2004-06-08 2009-12-29 Sun Microsystems, Inc. Adaptive cut-through algorithm
CN103986610A (en) * 2014-06-04 2014-08-13 珠海格力电器股份有限公司 Communication interface matching method, device and controller
CN108132896A (en) * 2018-01-17 2018-06-08 西安闻泰电子科技有限公司 Data transmission method and device
CN110880952A (en) * 2019-10-23 2020-03-13 浪潮思科网络科技有限公司 Switch interface rate self-adaptive tuning system, method, equipment and medium
CN111357370A (en) * 2017-11-17 2020-06-30 华为技术有限公司 Data transmission method and device
CN111917786A (en) * 2020-08-06 2020-11-10 冯田旺 GRE tunnel-based data packet fragmentation method and data packet recombination method
CN113438097A (en) * 2021-05-21 2021-09-24 翱捷科技股份有限公司 Method and device for realizing network acceleration
WO2021212906A1 (en) * 2020-04-21 2021-10-28 珠海格力电器股份有限公司 Network port allocation method and apparatus, electronic device, and computer-usable medium
CN113783808A (en) * 2021-11-12 2021-12-10 北京国科天迅科技有限公司 Data forwarding method and device for adaptive switching of forwarding modes
WO2022068302A1 (en) * 2020-09-30 2022-04-07 华为技术有限公司 Chip, communication system and communication method
CN114448790A (en) * 2022-01-28 2022-05-06 苏州浪潮智能科技有限公司 An adaptive configuration system, method, network device and storage medium
CN114793209A (en) * 2021-01-07 2022-07-26 大唐移动通信设备有限公司 Data transmission method and device and SDN (software defined network) equipment
CN115525510A (en) * 2022-09-30 2022-12-27 苏州浪潮智能科技有限公司 Port state monitoring method and device, computer equipment and storage medium
WO2023026084A1 (en) * 2021-08-27 2023-03-02 Sensetime International Pte. Ltd. Data processing method, apparatus, system and device and computer-readable storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9608865B2 (en) * 2014-07-09 2017-03-28 Cisco Technology, Inc. Method, system and logic for configuring a local link based on a remote link partner
US10142177B2 (en) * 2015-05-13 2018-11-27 Dell Products Lp Mechanisms to identify mismatches in layer 3 configuration in a network
CN109274603B (en) * 2018-08-29 2022-05-17 天津芯海创科技有限公司 Software-defined interconnection method and device between heterogeneous protocol data
US10924332B2 (en) * 2018-10-17 2021-02-16 Juniper Networks, Inc. Node protection for bum traffic for multi-homed node failure

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7639616B1 (en) * 2004-06-08 2009-12-29 Sun Microsystems, Inc. Adaptive cut-through algorithm
WO2009152753A1 (en) * 2008-06-20 2009-12-23 华为技术有限公司 Method, network node and network system for negotiating the port attribute parameters
CN103986610A (en) * 2014-06-04 2014-08-13 珠海格力电器股份有限公司 Communication interface matching method, device and controller
CN111357370A (en) * 2017-11-17 2020-06-30 华为技术有限公司 Data transmission method and device
CN108132896A (en) * 2018-01-17 2018-06-08 西安闻泰电子科技有限公司 Data transmission method and device
CN110880952A (en) * 2019-10-23 2020-03-13 浪潮思科网络科技有限公司 Switch interface rate self-adaptive tuning system, method, equipment and medium
WO2021212906A1 (en) * 2020-04-21 2021-10-28 珠海格力电器股份有限公司 Network port allocation method and apparatus, electronic device, and computer-usable medium
CN111917786A (en) * 2020-08-06 2020-11-10 冯田旺 GRE tunnel-based data packet fragmentation method and data packet recombination method
WO2022068302A1 (en) * 2020-09-30 2022-04-07 华为技术有限公司 Chip, communication system and communication method
CN114793209A (en) * 2021-01-07 2022-07-26 大唐移动通信设备有限公司 Data transmission method and device and SDN (software defined network) equipment
CN113438097A (en) * 2021-05-21 2021-09-24 翱捷科技股份有限公司 Method and device for realizing network acceleration
WO2023026084A1 (en) * 2021-08-27 2023-03-02 Sensetime International Pte. Ltd. Data processing method, apparatus, system and device and computer-readable storage medium
CN113783808A (en) * 2021-11-12 2021-12-10 北京国科天迅科技有限公司 Data forwarding method and device for adaptive switching of forwarding modes
CN114448790A (en) * 2022-01-28 2022-05-06 苏州浪潮智能科技有限公司 An adaptive configuration system, method, network device and storage medium
CN115525510A (en) * 2022-09-30 2022-12-27 苏州浪潮智能科技有限公司 Port state monitoring method and device, computer equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
DAS-SPM通信接口模块的设计与实现;李媛媛;胡靖宇;张树兵;杜建超;;空间电子技术(06);全文 *

Also Published As

Publication number Publication date
CN116846517A (en) 2023-10-03

Similar Documents

Publication Publication Date Title
US11146362B2 (en) Internet of things data transmission method, device and system
US10789198B2 (en) Methods and apparatus for reduced-latency data transmission with an inter-processor communication link between independently operable processors
CN105519071A (en) Electronic device using logical channels for communication
US10505852B2 (en) Priority data transmission using fibre channel over ethernet
CN109691200B (en) Method for activating bandwidth part BWP and related product
CN110691370A (en) A data transmission method, device and system
US9769012B2 (en) Notification normalization
CN113574836B (en) Electronic device and method for controlling data transmission
CN107888500B (en) Message forwarding method and device, storage medium and electronic equipment
CN112703781B (en) Wireless signal sending method, wireless signal sending device and terminal equipment
CN111741512B (en) A kind of private network access method and device
KR20200017127A (en) Apparatus and method for processing data packets
CN116405554B (en) Method, device, storage medium and electronic equipment for network communication
CN110312283A (en) An information processing method and device
CN114006871A (en) Flow control method, flow control device, container and storage medium
EP2905928B1 (en) Apparatus and method for providing metadata with network traffic
WO2018107433A1 (en) Information processing method and device
EP3891687A1 (en) Method and system for determining a state of an account in a network device running a light client protocol of a distributed ledger technology network
US9843527B2 (en) Method for processing data and an electronic device thereof
CN116846517B (en) Network data transmission method and device, storage medium and electronic equipment
CN114697387A (en) Data packet transmission method, device and storage medium
WO2015180560A1 (en) Service router packet processing method and service node
US20190109789A1 (en) Infrastructure and components to provide a reduced latency network with checkpoints
CN108337068B (en) Data communication and related products
WO2022183890A1 (en) Frame preemption method and apparatus, and device and storage medium

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
GR01 Patent grant
GR01 Patent grant