Data transmission method and multi-serial port integrator

By setting different acquisition time and using multiple transmission interfaces in the multi-serial integrator, the problem of data confusion in multi-host environment under half-duplex communication mode of RS485 bus is solved, and efficient and accurate device data transmission is achieved.

CN119621625APending Publication Date: 2025-03-14EMERSON NETWORK POWER CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311191254.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-14
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

In the prior art, the half-duplex communication method of the RS485 bus is prone to confusion in a multi-host environment and the device data cannot be obtained normally.

Method used

Design a multi-serial integrator to ensure the accuracy and efficiency of data transmission by setting different acquisition time and using multiple transmission interfaces to transmit data requests and reply packets in different time periods.

Benefits of technology

It realizes the accurate transmission of device data to different platforms in a half-duplex bus environment, improving the accuracy and efficiency of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119621625A_ABST
    Figure CN119621625A_ABST
Patent Text Reader

Abstract

The data transmission method comprises the following steps: receiving a first data request packet sent by a first platform through a first transmission interface, and receiving a second data request packet sent by a second platform through a second transmission interface; a first data request packet is sent to the first electronic device through the third transmission interface in the first collection duration, and a second data request packet is sent to the second electronic device through the third transmission interface in the second collection duration; a first data reply packet sent by the first electronic equipment is received through the third transmission interface, and a second data reply packet sent by the second electronic equipment is received through the third transmission interface. Therefore, the equipment data can be transmitted at different acquisition durations through the first transmission interface and the second transmission interface, and the equipment data can be accurately transmitted to different platforms when the half-duplex bus is adopted to transmit the data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a data transmission method and a multi-serial port integrator. Background Art

[0002] RS485 bus is widely used in monitoring systems. Some electronic devices, such as electric meters, UPS power supplies, air conditioners, etc., provide communication interfaces through RS485 bus, and the collector is connected to these electronic devices through RS485. RS485 is a half-duplex communication mode, that is, a communication mode in which one host corresponds to multiple slaves.

[0003] In the prior art, the electronic device has been connected to an old system. Due to the value-added service, a new system needs to be built to obtain data from the electronic device. Due to the half-duplex communication mode of RS485, the bus already has a host. Adding one or more hosts will cause communication data confusion and the device data cannot be obtained normally. Summary of the invention

[0004] The invention provides a data transmission method and a multi-serial port integrator, which are used to solve the problem of communication data confusion when half-duplex communication is used for data transmission in the prior art.

[0005] In a first aspect, the present application provides a data transmission method, which is applied to a multi-serial port integrator, wherein the multi-serial port integrator includes a first transmission interface, a second transmission interface, and a third transmission interface, and the method includes:

[0006] The multi-serial port integrator sends a first data request packet to a first electronic device through the third transmission interface during a first acquisition time, and sends a second data request packet to a second electronic device through the third transmission interface during a second acquisition time, wherein the first acquisition time and the second acquisition time are set at intervals, the first data request packet is sent by a first platform to the multi-serial port integrator through the first transmission interface, and the second data request packet is sent by a second platform to the serial port integrator through the second transmission interface;

[0007] The multi-serial port integrator receives a first data reply packet sent by the first electronic device through the third transmission interface, and receives a second data reply packet sent by the second electronic device through the third transmission interface, wherein the first data reply packet is device data corresponding to the first data request packet, and the second data reply packet is device data corresponding to the second data request packet;

[0008] The multi-serial port integrator sends the first data reply packet to the first platform through the first transmission interface, and sends the second data reply packet to the second platform through the second transmission interface.

[0009] In a data transmission method provided by an embodiment of the present application, a multi-serial port integrator comprises a first transmission interface, a second transmission interface and a third transmission interface. The multi-serial port integrator sends a first data request packet to a first electronic device through the third transmission interface during a first acquisition time, and sends a second data request packet to a second electronic device through the third transmission interface during a second acquisition time, wherein the first acquisition time and the second acquisition time are set at an interval, the first data request packet is sent by the first platform to the multi-serial port integrator through the first transmission interface, and the second data request packet is sent by the second platform to the serial port integrator through the second transmission interface; the multi-serial port integrator receives a first data reply packet sent by the first electronic device through the third transmission interface, and receives a second data reply packet sent by the second electronic device through the third transmission interface, wherein the first data reply packet is device data corresponding to the first data request packet, and the second data reply packet is device data corresponding to the second data request packet; the multi-serial port integrator sends a first data reply packet to the first platform through the first transmission interface, and sends a second data reply packet to the second platform through the second transmission interface. In the embodiment of the present application, since the first collection duration corresponding to the first transmission interface and the second collection duration corresponding to the second transmission interface are set at intervals, device data can be transmitted at different collection durations through the first transmission interface and the second transmission interface, thereby achieving accurate transmission of device data to different platforms when a half-duplex bus is used for data transmission, thereby improving the accuracy of data transmission.

[0010] In a possible implementation, the method further includes:

[0011] The correspondence between the data request packet and the corresponding data reply packet is stored; the data request packet includes at least one of the first data request packet and the second data request packet; the data reply packet includes at least one of the first data reply packet and the second data reply packet.

[0012] The above scheme stores the correspondence between the data request packet and the corresponding data reply packet, so that when a half-duplex bus is used for data transmission, the multi-serial port integrator can obtain the corresponding reply in real time and the data collection is transparent.

[0013] In a possible implementation, the storing of the correspondence between the data request packet and the corresponding data reply packet includes:

[0014] In the case where there is a target data request packet in the corresponding relationship, updating the target data reply packet corresponding to the target data request packet; the target data request packet is any one of the data request packets from the first platform or the second platform;

[0015] When the target data request packet does not exist in the correspondence relationship, a correspondence relationship between the target data request packet and the target data reply packet is generated and stored.

[0016] The above scheme updates the target data reply packet corresponding to the target data request packet when there is a target data request packet in the corresponding relationship, and generates and stores the corresponding relationship between the target data request packet and the target data reply packet when there is no target data request packet in the corresponding relationship, thereby realizing real-time search and update when the multi-serial port integrator receives and stores data, thereby improving the accuracy of data collection of the multi-serial port integrator.

[0017] In a possible implementation manner, the method further includes, within the second collection duration:

[0018] The multi-serial port integrator receives a first data request packet sent by the first platform through the first transmission interface;

[0019] In a case where the first data reply packet exists in the corresponding relationship, the multi-serial port integrator sends the first data reply packet to the first platform through the first transmission interface.

[0020] In the above scheme, the multi-serial port integrator receives the first data request packet sent by the first platform through the first transmission interface during the second collection time, and sends the first data reply packet to the first platform through the first transmission interface when the first data reply packet exists in the corresponding relationship, thereby realizing the collection time of the second platform, sending the first data reply packet to the first platform through the first transmission interface, thereby improving data transmission efficiency.

[0021] In a possible implementation manner, the method further includes, within the first collection duration:

[0022] The multi-serial port integrator receives a second data request packet sent by the second platform through the second transmission interface;

[0023] In a case where the second data reply packet exists in the corresponding relationship, the second data reply packet is sent to the second platform through the second transmission interface.

[0024] In the above scheme, the multi-serial port integrator receives the second data request packet sent by the second platform through the second transmission interface during the first collection period, and sends the second data reply packet to the second platform through the second transmission interface when there is a second data reply packet in the corresponding relationship, thereby realizing the transmission of device data to the second platform during the collection period of the first platform and improving data transmission efficiency.

[0025] In a possible implementation, the method further includes:

[0026] When the duration of the correspondence between the target data request packet and the target data reply packet is greater than a preset duration, the correspondence between the target data request packet and the target data reply packet is deleted from the correspondence.

[0027] In the above scheme, when the multi-serial port integrator determines that the correspondence between the target data request packet and the target data reply packet in the storage queue lasts longer than the preset time, the correspondence between the target data request packet and the target data reply packet is deleted from the correspondence, thereby reducing the probability of returning expired device data to the platform and improving the accuracy of data transmission.

[0028] In a second aspect, the present application provides a multi-serial port integrator, including: a first transmission interface, a second transmission interface, a third transmission interface, and a processor;

[0029] The processor is used to send a first data request packet to a first electronic device through the third transmission interface during a first collection time, and send a second data request packet to a second electronic device through the third transmission interface during a second collection time, wherein the first collection time and the second collection time are set at intervals, the first data request packet is sent by the first platform to the multi-serial port integrator through the first transmission interface, and the second data request packet is sent by the second platform to the serial port integrator through the second transmission interface; receive a first data reply packet sent by the first electronic device through the third transmission interface, and receive a second data reply packet sent by the second electronic device through the third transmission interface, wherein the first data reply packet is device data corresponding to the first data request packet, and the second data reply packet is device data corresponding to the second data request packet; send the first data reply packet to the first platform through the first transmission interface, and send the second data reply packet to the second platform through the second transmission interface.

[0030] In a possible implementation manner, the processor is further configured to:

[0031] The correspondence between the data request packet and the corresponding data reply packet is stored; the data request packet includes at least one of the first data request packet and the second data request packet; the data reply packet includes at least one of the first data reply packet and the second data reply packet.

[0032] In a possible implementation manner, the processor is specifically configured to:

[0033] In the case where there is a target data request packet in the corresponding relationship, updating the target data reply packet corresponding to the target data request packet; the target data request packet is any one of the data request packets from the first platform or the second platform;

[0034] When the target data request packet does not exist in the correspondence relationship, a correspondence relationship between the target data request packet and the target data reply packet is generated and stored.

[0035] In a possible implementation manner, the processor is further configured to:

[0036] receiving, through the first transmission interface, a first data request packet sent by the first platform;

[0037] In a case where the first data reply packet exists in the corresponding relationship, the multi-serial port integrator sends the first data reply packet to the first platform through the first transmission interface.

[0038] In a possible implementation manner, the processor is further configured to:

[0039] receiving, through the second transmission interface, a second data request packet sent by the second platform;

[0040] In a case where the second data reply packet exists in the corresponding relationship, the second data reply packet is sent to the second platform through the second transmission interface.

[0041] In a possible implementation manner, the processor is further configured to:

[0042] When the duration of the correspondence between the target data request packet and the target data reply packet is greater than a preset duration, the correspondence between the target data request packet and the target data reply packet is deleted from the correspondence.

[0043] For each aspect in the above-mentioned second aspect and the technical effects that may be achieved by each aspect, please refer to the above-mentioned description of the technical effects that can be achieved by various possible schemes in the first aspect, and no further details will be given here. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0045] Figure 1A schematic diagram of a data transmission system structure provided for related technologies;

[0046] Figure 2 A schematic diagram of the structure of a multi-serial port integrator provided in an embodiment of the present application;

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

[0048] Figure 4 A schematic diagram of an interactive data transmission provided in an embodiment of the present application;

[0049] Figure 5 A schematic diagram of a process for querying and storing a first data request packet and a first data reply packet provided in an embodiment of the present application;

[0050] Figure 6 A schematic diagram of a process of querying and storing a second data request packet and a second data reply packet provided in an embodiment of the present application;

[0051] Figure 7 A schematic diagram of the structure of another multi-serial port integrator provided in an embodiment of the present application. DETAILED DESCRIPTION

[0052] In order to make the purpose, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0053] In the description of the embodiments of the present application, unless otherwise specified, “ / ” means or, for example, A / B can mean A or B; the “and / or” in the text is merely a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, “multiple” refers to two or more than two.

[0054] In the following, the terms "first", "second", and "first" are used for descriptive purposes only and should not be understood as suggesting or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first", "second", or "first" may explicitly or implicitly include one or more of the features.

[0055] RS485 is a widely used serial interface communication. RS485 is a half-duplex communication mode, that is, a communication mode in which one host corresponds to multiple slaves. Figure 1As shown, electronic device 1 and the first platform 11 are connected via RS485 bus communication, electronic device 2 and the first platform 11 are connected via RS485 bus communication, electronic device 3 and the first platform 11 are connected via RS485 bus communication, and electronic device n and the first platform 11 are connected via RS485 bus communication.

[0056] When value-added services are needed, a new platform needs to be established to obtain data from electronic devices. Due to the half-duplex communication mode of RS485, the RS485 bus already has the first platform as the host. If one or more new platforms are added as hosts, the communication data will be confused and the device data cannot be obtained normally.

[0057] Based on the above problems, the present application provides a data transmission method, which is applied to a multi-serial port integrator, such as Figure 2 As shown, the multi-serial port integrator 21 includes a first transmission interface COM1, a second transmission interface COM2 and a third transmission interface COM3. Figure 3 FIG. 1 is a flow chart of a data transmission method provided by an embodiment of the present invention, and the method comprises the following steps:

[0058] S301, the multi-serial port integrator sends a first data request packet to the first electronic device through the third transmission interface during a first collection time, and sends a second data request packet to the second electronic device through the third transmission interface during a second collection time, wherein the first collection time and the second collection time are set at intervals, the first data request packet is sent by the first platform to the multi-serial port integrator through the first transmission interface, and the second data request packet is sent by the second platform to the serial port integrator through the second transmission interface;

[0059] S302, the multi-serial port integrator receives a first data reply packet sent by the first electronic device through the third transmission interface, and receives a second data reply packet sent by the second electronic device through the third transmission interface, wherein the first data reply packet is device data corresponding to the first data request packet, and the second data reply packet is device data corresponding to the second data request packet;

[0060] S303: The multi-serial port integrator sends a first data reply packet to the first platform through the first transmission interface, and sends a second data reply packet to the second platform through the second transmission interface.

[0061] In a data transmission method provided by an embodiment of the present application, a multi-serial port integrator comprises a first transmission interface, a second transmission interface and a third transmission interface. The multi-serial port integrator sends a first data request packet to a first electronic device through the third transmission interface during a first acquisition time, and sends a second data request packet to a second electronic device through the third transmission interface during a second acquisition time, wherein the first acquisition time and the second acquisition time are set at an interval, the first data request packet is sent by the first platform to the multi-serial port integrator through the first transmission interface, and the second data request packet is sent by the second platform to the serial port integrator through the second transmission interface; the multi-serial port integrator receives a first data reply packet sent by the first electronic device through the third transmission interface, and receives a second data reply packet sent by the second electronic device through the third transmission interface, wherein the first data reply packet is device data corresponding to the first data request packet, and the second data reply packet is device data corresponding to the second data request packet; the multi-serial port integrator sends a first data reply packet to the first platform through the first transmission interface, and sends a second data reply packet to the second platform through the second transmission interface. In the embodiment of the present application, since the first collection duration corresponding to the first transmission interface and the second collection duration corresponding to the second transmission interface are set at intervals, device data can be transmitted at different collection durations through the first transmission interface and the second transmission interface, thereby achieving accurate transmission of device data to different platforms when a half-duplex bus is used to transmit data.

[0062] In the present application, both the first acquisition duration and the second acquisition duration can be set according to actual conditions, for example, the first acquisition duration is set to 60s, and the second acquisition duration is set to 120s. The first acquisition duration and the second acquisition duration are set at intervals, that is, during the first acquisition duration, the first transmission interface COM1 is in the POLLING state, and the second transmission interface COM2 is in the IDLE state; during the second acquisition duration, the first transmission interface COM1 is in the IDLE state, and the second transmission interface COM2 is in the POLLING state.

[0063] It should be noted that the multi-serial port integrator can receive data request packets sent by the first platform and the second platform during the first collection time and the second collection time, and forward the received data request packets sent by the first platform to the first electronic device during the first collection time, and forward the received data request packets sent by the second platform to the second electronic device during the second collection time.

[0064] For example, the first acquisition time is 60s, and the second acquisition time is 120s. Within the first acquisition time of 60s and / or the second acquisition time of 120s, the first platform 11 sends a first data request packet to the multi-serial port integrator 21 through the first transmission interface COM1. If the first data request packet is sent within the first acquisition time of 60s, the multi-serial port integrator 21 sends the first data request packet to the first electronic device through the third transmission interface COM3. After the first electronic device receives the first data request packet, it sends the first data reply packet to the multi-serial port integrator 21 through the third transmission interface COM3. After the multi-serial port integrator 21 receives the first data reply packet, it sends the first data reply packet to the first platform 11 through the first transmission interface COM1. After receiving the first data reply packet, the first platform 11 stores it and repeats the above steps until the first acquisition time of 60s ends.

[0065] After the first acquisition time of 60s ends, the second acquisition time of 120s begins, the first transmission interface COM1 is in the IDLE state, and the second transmission interface COM2 is in the POLLING state. Within the first acquisition time of 60s and / or the second acquisition time of 120s, the second platform 12 sends a second data request packet to the multi-serial port integrator 21 through the second transmission interface COM2. If the second data request packet is sent within the second acquisition time of 120s, the multi-serial port integrator 21 sends the second data request packet to the second electronic device through the third transmission interface COM3. After the second electronic device receives the second data request packet, it sends the second data reply packet to the multi-serial port integrator 21 through the third transmission interface COM3. After the multi-serial port integrator 21 receives the second data reply packet, it sends the second data reply packet to the second platform 12 through the second transmission interface COM2. After the second platform 12 receives the second data reply packet, it stores it and repeats the above steps until the second acquisition time of 120s ends;

[0066] After the second collection time of 120 seconds is over, the first collection time of 60 seconds is entered again, and the above steps are repeated, so that the device data is stored in the first platform 11 and the second platform 12.

[0067] It should be noted that if the multi-serial port integrator 21 is connected to multiple platforms, when one platform is in the POLLING state, the other platforms are in the IDLE state. The acquisition duration corresponding to each platform, that is, the POLLING state duration, can be set according to actual conditions.

[0068] In the embodiment of the present application, the first electronic device and the second electronic device may be the same electronic device or different electronic devices; the first transmission interface, the second transmission interface and the third transmission interface are all half-duplex signal transmission interfaces.

[0069] In one embodiment, after receiving the data reply packet, the multi-serial port integrator stores the correspondence between the data request packet and the corresponding data reply packet; the data request packet includes at least one of the first data request packet and the second data request packet; the data reply packet includes at least one of the first data reply packet and the second data reply packet.

[0070] Specifically, after receiving the first data reply packet, the multi-serial port integrator stores the correspondence between the first data request packet and the first data reply packet, and after receiving the second data reply packet, the multi-serial port integrator stores the correspondence between the second data request packet and the second data reply packet.

[0071] For example, after the multi-serial port integrator receives the first data request packet 1 sent by the first platform through the first transmission interface during the first collection period, the multi-serial port integrator sends the first data request packet 1 to the first electronic device through the third transmission interface, and then receives the first data reply packet 1 returned by the first electronic device through the third transmission interface. The multi-serial port integrator sends the first data reply packet 1 to the first platform through the first transmission interface, and stores the correspondence between the first data request packet 1 and the first data reply packet 1.

[0072] For another example, after the multi-serial port integrator receives the second data request packet 1 sent by the second platform through the second transmission interface during the second collection period, the multi-serial port integrator sends the second data request packet 1 to the second electronic device through the third transmission interface, and then receives the second data reply packet 1 returned by the second electronic device through the third transmission interface. The multi-serial port integrator sends the second data reply packet 1 to the second platform through the second transmission interface, and stores the correspondence between the second data request packet 1 and the second data reply packet 1.

[0073] It should be noted that the correspondence between the first data request packet and the first data reply packet, and the correspondence between the second data request packet and the second data reply packet can be stored in one table or in two different tables, and the embodiment of the present application does not limit this.

[0074] In one embodiment, when there is a target data request packet in the corresponding relationship, the target data reply packet corresponding to the target data request packet is updated, wherein the target data request packet is any one of the data request packets from the first platform or the second platform;

[0075] When the target data request packet does not exist in the correspondence relationship, a correspondence relationship between the target data request packet and the target data reply packet is generated and stored.

[0076] It should be noted that the correspondence between the data request packet and the corresponding data reply packet can be stored in one table, or can be stored in two different tables according to the first platform and the second platform respectively, which is not limited in the embodiment of the present application.

[0077] For example, after the multi-serial port integrator receives the first data request packet 1 sent by the first platform through the first transmission interface during the first acquisition period, the multi-serial port integrator sends the first data request packet 1 to the first electronic device through the third transmission interface, and then receives the first data reply packet 1 returned by the first electronic device through the third transmission interface. The multi-serial port integrator sends the first data reply packet 1 to the first platform through the first transmission interface, and determines whether there is the first data request packet 1 in the corresponding relationship. If so, the first data reply packet corresponding to the first data request packet 1 is updated to the first data reply packet 1; if not, the corresponding relationship between the first data request packet 1 and the first data reply packet 1 is stored.

[0078] For another example, after the multi-serial port integrator receives the second data request packet 1 sent by the second platform through the second transmission interface during the second collection period, the multi-serial port integrator sends the second data request packet 1 to the second electronic device through the third transmission interface, and then receives the second data reply packet 1 returned by the second electronic device through the third transmission interface. The multi-serial port integrator sends the second data reply packet 1 to the second platform through the second transmission interface, and determines whether there is a second data request packet 2 in the corresponding relationship. If so, the second data reply packet corresponding to the second data request packet 2 is updated to the second data reply packet 1; if not, the correspondence between the second data request packet 1 and the second data reply packet 1 is stored.

[0079] like Figure 4 FIG. 1 is a schematic diagram of an interactive data transmission provided in an embodiment of the present application, which specifically includes the following steps:

[0080] S401, the first platform 11 sends a first data request packet to the multi-serial port integrator 21 through the first transmission interface COM1;

[0081] S402: After receiving the first data request packet, the multi-serial port integrator 21 sends the first data request packet to the first electronic device through the third transmission interface COM3;

[0082] S403: After receiving the first data request packet, the first electronic device searches for a first data reply packet corresponding to the first data request packet;

[0083] S404, the first electronic device sends the first data reply packet to the multi-serial port integrator 21 through the third transmission interface COM3;

[0084] S405, after receiving the first data reply packet, the multi-serial port integrator 21 sends the first data reply packet to the first platform 11 through the first transmission interface COM1;

[0085] S406: After receiving the first data reply packet, the first platform 11 stores it and repeats the above steps until the first collection time of 60 seconds ends;

[0086] S407, the second platform 12 sends a second data request packet to the multi-serial port integrator 21 through the second transmission interface COM2;

[0087] S408, after receiving the second data request packet through the second transmission interface COM2, the multi-serial port integrator 21 sends the second data request packet to the second electronic device through the third transmission interface COM3;

[0088] S409: After receiving the second data request packet, the second electronic device searches for a second data reply packet corresponding to the second data request packet;

[0089] S410, the second electronic device sends the second data reply packet to the multi-serial port integrator 21 through the third transmission interface COM3;

[0090] S411, after receiving the second data reply packet, the multi-serial port integrator 21 sends the second data reply packet to the second platform 12 through the second transmission interface COM2;

[0091] S412: After receiving the second data reply package, the second platform 12 stores it and repeats the above steps until the second collection time of 120 seconds ends.

[0092] like Figure 5 FIG. 1 is a flow chart of querying and storing a first data request packet and a first data reply packet provided by an embodiment of the present invention. The method includes the following steps:

[0093] S501, the multi-serial port integrator receives a first data reply packet returned by the first platform;

[0094] S502: The multi-serial port integrator searches for a first data request packet from the corresponding relationship, wherein the first data request packet is a data request packet sent by the first platform and corresponds to the first data reply packet;

[0095] S503, the multi-serial port integrator determines whether the first data request packet is found, if so, executes S504, otherwise executes S505;

[0096] S504, the multi-serial port integrator updates the found first data reply packet to the received first data reply packet;

[0097] S505. The multi-serial port integrator stores the first data request packet and the received first data reply packet in a corresponding relationship.

[0098] For example, the corresponding relationship is the first data request packet A1 and the first data reply packet B1, the first data request packet A2 and the first data reply packet B2, and the first data request packet A3 and the first data reply packet B3. The first platform 11 sends the first data request packet A1 through the first transmission interface COM1 during the first acquisition period. After the multi-serial port integrator 21 receives the first data request packet A1, it sends the first data request packet A1 to the first electronic device through the third transmission interface COM3. After the first electronic device receives the first data request packet A1, the first electronic device determines the first data reply packet B1' corresponding to the first data request packet A1. The first electronic device sends the first data reply packet B1' to the multi-serial port integrator 21 through the third transmission interface COM3. After the multi-serial port integrator 21 receives the first data reply packet B1', it searches in the corresponding relationship whether there is the first data request packet A1. After determining that the first data request packet A1 exists, the first data reply packet corresponding to the first data request packet A1 stored in the corresponding relationship is updated to the first data reply packet B1'.

[0099] like Figure 6 As shown, it is a schematic diagram of the query and storage process of the second data request packet and the second data reply packet provided by an embodiment of the present invention, and the method includes the following steps:

[0100] S601, the multi-serial port integrator receives a second data reply packet sent by a second electronic device;

[0101] S602, the multi-serial port integrator searches for a second data request packet from the corresponding relationship, wherein the second data request packet is a data request packet sent by the second platform and corresponds to the second data packet reply packet;

[0102] S603, the multi-serial port integrator determines whether the second data request packet is found, if so, executes S604, otherwise executes S605;

[0103] S604, the multi-serial port integrator updates the second data reply packet corresponding to the second data request packet to the received second data reply packet;

[0104] S605. The multi-serial port integrator stores the second data request packet and the received second data reply packet in a corresponding relationship.

[0105] In the embodiment of the present application, the data reply packet in the storage queue is updated, so as to avoid the unlimited growth of the message record due to the change of the device data.

[0106] In one embodiment, if during the second acquisition period, the multi-serial port integrator receives a first data request packet sent by the first platform through the first transmission interface, the multi-serial port integrator determines whether there is a first data request packet in the corresponding relationship. If there is a first data reply packet in the corresponding relationship, the multi-serial port integrator sends a first data reply packet corresponding to the first data request packet in the corresponding relationship to the first platform through the first transmission interface. If there is no first data reply packet in the corresponding relationship, the multi-serial port integrator does not take any action.

[0107] If within the first acquisition time length, the multi-serial port integrator receives a second data request packet sent by the second platform through the second transmission interface, the multi-serial port integrator determines whether there is a second data request packet in the corresponding relationship. If there is a second data reply packet in the corresponding relationship, the multi-serial port integrator sends a second data reply packet corresponding to the second data request packet in the corresponding relationship to the second platform through the second transmission interface. If there is no second data reply packet in the corresponding relationship, the multi-serial port integrator does not take any action.

[0108] In one embodiment, when the duration of the correspondence between the target data request packet and the target data reply packet is greater than a preset duration, the correspondence between the target data request packet and the target data reply packet is deleted from the correspondence.

[0109] Specifically, for any data reply packet in the corresponding relationship, the multi-serial port integrator 21 can periodically determine whether the time between the time when the data reply packet in the corresponding relationship is updated and the current time is greater than the preset time. If it is greater than the preset time, the data reply packet and the corresponding data request packet are deleted.

[0110] In the embodiment of the present application, when the time length between the time when the data reply packet is updated in the determined corresponding relationship and the current time is greater than the preset time length, the data reply packet and the corresponding data request packet are deleted, thereby preventing expired device data from being returned to the platform.

[0111] Based on the same disclosed concept, the data transmission method disclosed above can also be implemented by a multi-serial port integrator. The effect of the multi-serial port integrator is similar to that of the aforementioned method, and will not be described in detail here.

[0112] like Figure 7 , which is a schematic diagram of the structure of a multi-serial port integrator provided by an embodiment of the present invention, the multi-serial port integrator comprises: a first transmission interface COM1, a second transmission interface COM2, a third transmission interface COM3, and a processor 701;

[0113] The first transmission interface COM1 is used to transmit a first data request packet and a first data reply packet;

[0114] The second transmission interface COM2 is used to transmit the second data request packet and the second data reply packet;

[0115] The third transmission interface COM3 is used to transmit the first data request packet, the first data reply packet, the second data request packet and the second data reply packet;

[0116] Processor 701 is used to send a first data request packet to a first electronic device through a third transmission interface COM3 during a first collection time, and to send a second data request packet to a second electronic device through the third transmission interface COM3 during a second collection time, wherein the first collection time and the second collection time are set at intervals, the first data request packet is sent by the first platform 11 to the multi-serial port integrator through the first transmission interface COM1, and the second data request packet is sent by the second platform 12 to the serial port integrator through the second transmission interface COM2; receive a first data reply packet sent by the first electronic device through the third transmission interface COM3, and receive a second data reply packet sent by the second electronic device through the third transmission interface COM3, wherein the first data reply packet is device data corresponding to the first data request packet, and the second data reply packet is device data corresponding to the second data request packet; send the first data reply packet to the first platform 11 through the first transmission interface COM1, and send the second data reply packet to the second platform 12 through the second transmission interface COM2.

[0117] The multi-serial port integrator provided in the embodiment of the present application includes a first transmission interface, a second transmission interface, a third transmission interface and a processor. The processor receives a first data request packet sent by a first platform through the first transmission interface, receives a second data request packet sent by a second platform through the second transmission interface, sends a first data request packet to a first electronic device through the third transmission interface during a first collection time, sends a second data request packet to a second electronic device through the third transmission interface during a second collection time, receives a first data reply packet corresponding to the first data request packet and a second data reply packet corresponding to the second data request packet returned by the first electronic device, sends the first data reply packet to the first platform, and sends the second data reply packet to the second platform. Since the first collection time and the second collection time are set at intervals, device data can be transmitted at different collection times through the first transmission interface and the second transmission interface, so that when a half-duplex bus is used to transmit data, device data can be accurately transmitted to different platforms.

[0118] In a possible implementation manner, the processor 71 is further configured to:

[0119] The correspondence between the data request packet and the corresponding data reply packet is stored; the data request packet includes at least one of the first data request packet and the second data request packet; the data reply packet includes at least one of the first data reply packet and the second data reply packet.

[0120] In a possible implementation manner, the processor 71 is specifically configured to:

[0121] In the case where there is a target data request packet in the corresponding relationship, updating the target data reply packet corresponding to the target data request packet; the target data request packet is any one of the data request packets from the first platform or the second platform;

[0122] When the target data request packet does not exist in the correspondence relationship, a correspondence relationship between the target data request packet and the target data reply packet is generated and stored.

[0123] In a possible implementation, during the second collection duration, the processor 71 is further configured to:

[0124] receiving, through the first transmission interface, a first data request packet sent by the first platform;

[0125] In a case where the first data reply packet exists in the corresponding relationship, the first data reply packet is sent to the first platform through the first transmission interface.

[0126] In a possible implementation, during the first acquisition duration, the processor 71 is further configured to:

[0127] receiving, through the second transmission interface, a second data request packet sent by the second platform;

[0128] In a case where the second data reply packet exists in the corresponding relationship, the second data reply packet is sent to the second platform through the second transmission interface.

[0129] In a possible implementation manner, the processor 71 is further configured to:

[0130] When the duration of the correspondence between the target data request packet and the target data reply packet is greater than a preset duration, the correspondence between the target data request packet and the target data reply packet is deleted from the correspondence.

[0131] In one embodiment, if Figure 7As shown, the multi-serial port integrator 21 may also include an interactive interface 72. In a specific implementation, the interactive interface 72 is used to send the received acquisition instruction to the processor 71; the processor 71 is used to obtain the first data reply packet from the corresponding relationship and / or obtain the second data reply packet from the corresponding relationship according to the received acquisition instruction, and send the obtained first data reply packet and / or second data reply packet to the device connected to the interactive interface 72 through the interactive interface 72.

[0132] In an embodiment of the present application, the multi-serial port integrator 21 can receive an acquisition instruction through the interactive interface 72, and then acquire device data from the electronic device according to the acquisition instruction, and send the acquired first data reply package and / or second data reply package through the interactive interface 72 to the device connected to the interactive interface 72 through the interactive interface 72, thereby facilitating on-site debugging by the staff according to the first data reply package and / or second data reply package received by the device.

[0133] It should be noted that the interactive interface 72 in the embodiment of the present application is an ordinary communication interface that can receive acquisition instructions and send data packets to the communication interfaces of the device connected to the interface. All of them are applicable to the embodiment of the present application. The interactive interface 72 is a non-transmission interface, and its data transmission method is different from that of the half-duplex signal transmission interface.

[0134] The data transmission method and multi-serial port integrator disclosed in the embodiment of the present application transmit the first data request packet and the first data reply packet through the first transmission interface, transmit the second data request packet and the second data reply packet through the second transmission interface, and transmit the first data request packet, the second data request packet, the first data reply packet and the second data reply packet through the third transmission interface, wherein the first data reply packet is the device data corresponding to the first data request packet, and the second data reply packet is the device data corresponding to the first data request packet. In addition, the first data request packet and the first data reply packet are stored in a corresponding relationship; the second data request packet and the second data reply packet are stored in a corresponding relationship; before the data request packet and the data reply packet are stored in a corresponding relationship, it is also possible to find out whether the data request packet exists from the corresponding relationship, if the data request packet is found, the data reply packet corresponding to the data request packet is updated to the newly received data reply packet; if the data request packet is not found, the data request packet and the newly received data reply packet are stored in a corresponding relationship. Finally, it is realized that support for multi-host data collection can be obtained in real time.

[0135] The present application is described above with reference to the block diagrams and / or flow charts showing the methods, devices (systems) and / or computer program products according to the embodiments of the present application. It should be understood that a block of the block diagram and / or flow chart diagram and a combination of blocks of the block diagram and / or flow chart diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer and / or other programmable data processing device to produce a machine, so that the instructions executed by the computer processor and / or other programmable data processing device create a method for implementing the functions / actions specified in the block diagram and / or flow chart block.

[0136] Accordingly, the present application may also be implemented with hardware and / or software (including firmware, resident software, microcode, etc.). Furthermore, the present application may take the form of a computer program product on a computer-usable or computer-readable storage medium, which has a computer-usable or computer-readable program code implemented in the medium, for use by an instruction execution system or in conjunction with an instruction execution system. In the context of the present application, a computer-usable or computer-readable medium may be any medium that may contain, store, communicate, transmit, or convey a program for use by an instruction execution system, device, or apparatus, or in conjunction with an instruction execution system, device, or apparatus.

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

Claims

1. A data transmission method, characterized in that: Applied to a multi-serial port integrator, the multi-serial port integrator includes a first transmission interface, a second transmission interface and a third transmission interface, the method includes: The multi-serial port integrator sends a first data request packet to a first electronic device through the third transmission interface during a first acquisition time, and sends a second data request packet to a second electronic device through the third transmission interface during a second acquisition time, wherein the first acquisition time and the second acquisition time are set at intervals, the first data request packet is sent by a first platform to the multi-serial port integrator through the first transmission interface, and the second data request packet is sent by a second platform to the serial port integrator through the second transmission interface; The multi-serial port integrator receives a first data reply packet sent by the first electronic device through the third transmission interface, and receives a second data reply packet sent by the second electronic device through the third transmission interface, wherein the first data reply packet is device data corresponding to the first data request packet, and the second data reply packet is device data corresponding to the second data request packet; The multi-serial port integrator sends the first data reply packet to the first platform through the first transmission interface, and sends the second data reply packet to the second platform through the second transmission interface.

2. The method according to claim 1, characterized in that The method further comprises: The correspondence between the data request packet and the corresponding data reply packet is stored; the data request packet includes at least one of the first data request packet and the second data request packet; the data reply packet includes at least one of the first data reply packet and the second data reply packet.

3. The method according to claim 2, characterized in that The corresponding relationship between the stored data request packet and the corresponding data reply packet includes: In the case where there is a target data request packet in the corresponding relationship, updating the target data reply packet corresponding to the target data request packet; the target data request packet is any one of the data request packets from the first platform or the second platform; When the target data request packet does not exist in the correspondence relationship, a correspondence relationship between the target data request packet and the target data reply packet is generated and stored.

4. The method according to claim 2, characterized in that During the second acquisition time period, the method further includes: The multi-serial port integrator receives a first data request packet sent by the first platform through the first transmission interface; In a case where the first data reply packet exists in the corresponding relationship, the multi-serial port integrator sends the first data reply packet to the first platform through the first transmission interface.

5. The method according to claim 2, characterized in that During the first acquisition duration, the method further includes: The multi-serial port integrator receives a second data request packet sent by the second platform through the second transmission interface; In a case where the second data reply packet exists in the corresponding relationship, the second data reply packet is sent to the second platform through the second transmission interface.

6. The method according to claim 3, characterized in that The method further includes: When the duration of the correspondence between the target data request packet and the target data reply packet is greater than a preset duration, the correspondence between the target data request packet and the target data reply packet is deleted from the correspondence.

7. A multi-serial port integrator, characterized in that: include: A first transmission interface, a second transmission interface, a third transmission interface and a processor; The processor is used to send a first data request packet to a first electronic device through the third transmission interface during a first collection time, and send a second data request packet to a second electronic device through the third transmission interface during a second collection time, wherein the first collection time and the second collection time are set at intervals, the first data request packet is sent by the first platform to the multi-serial port integrator through the first transmission interface, and the second data request packet is sent by the second platform to the serial port integrator through the second transmission interface; receive a first data reply packet sent by the first electronic device through the third transmission interface, and receive a second data reply packet sent by the second electronic device through the third transmission interface, wherein the first data reply packet is device data corresponding to the first data request packet, and the second data reply packet is device data corresponding to the second data request packet; send the first data reply packet to the first platform through the first transmission interface, and send the second data reply packet to the second platform through the second transmission interface.

8. The integrator according to claim 7, characterized in that: The processor is further configured to: The correspondence between the data request packet and the corresponding data reply packet is stored; the data request packet includes at least one of the first data request packet and the second data request packet; the data reply packet includes at least one of the first data reply packet and the second data reply packet.

9. The integrator according to claim 8, characterized in that: The processor is specifically used for: In the case where there is a target data request packet in the corresponding relationship, updating the target data reply packet corresponding to the target data request packet; the target data request packet is any one of the data request packets from the first platform or the second platform; When the target data request packet does not exist in the correspondence relationship, a correspondence relationship between the target data request packet and the target data reply packet is generated and stored.

10. The integrator according to claim 8, characterized in that: During the second acquisition duration, the processor is further configured to: receiving, through the first transmission interface, a first data request packet sent by the first platform; In a case where the first data reply packet exists in the corresponding relationship, the first data reply packet is sent to the first platform through the first transmission interface.

11. The integrator according to claim 8, characterized in that: During the first acquisition duration, the processor is further configured to: receiving, through the second transmission interface, a second data request packet sent by the second platform; In a case where the second data reply packet exists in the corresponding relationship, the second data reply packet is sent to the second platform through the second transmission interface.

12. The integrator according to claim 9, characterized in that: The processor is further configured to: When the duration of the correspondence between the target data request packet and the target data reply packet is greater than a preset duration, the correspondence between the target data request packet and the target data reply packet is deleted from the correspondence.