Method, apparatus, system, device and storage medium for data transmission
By allocating transmission cycles and using a QoS system and token bucket algorithm in the CANopen protocol stack, the problems of randomness and conflict in data transmission are solved, and orderly and controllable data interaction is achieved, thereby improving the reliability and efficiency of the system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SCHNEIDER ELECTRIC IND SAS
- Filing Date
- 2025-01-14
- Publication Date
- 2026-07-14
AI Technical Summary
In the CANopen protocol stack, the lack of control and management in the transmission of application data leads to random, conflicting, chaotic, and congested data transmission, affecting the controllability and effectiveness of data interaction.
By determining the transmission period, allocating time windows for data transmission, and utilizing QoS systems and token bucket algorithms for data classification and management, orderly data transmission is ensured.
This ensures controllability and effectiveness in data transmission, avoids data chaos and congestion, and improves the reliability and efficiency of the service system.
Smart Images

Figure CN122394984A_ABST
Abstract
Description
Technical Field
[0001] The exemplary embodiments disclosed herein generally relate to the field of electrical equipment, and particularly to methods, apparatus, systems, devices, and storage media for data transmission. Background Technology
[0002] Applications developed using the CANopen protocol stack, based on the Controller Area Network (CAN) bus, can typically directly call the interfaces provided by the CANopen protocol stack to implement various service functions. However, the lack of control and management over the various service messages requested by the application can lead to delayed message delivery, data transmission conflicts, and random and unpredictable data arrival times. Furthermore, if the protocol stack's buffer space is insufficient, the data required for the current service may even be discarded.
[0003] Furthermore, various arbitrations exist in CAN communication systems. When the data volume is large or the number of devices is large, data chaos and data congestion are more likely to occur, making it impossible to guarantee effective control of application data and making the return of data interaction uncontrollable, thus affecting the normal interaction of application data. Summary of the Invention
[0004] The purpose of this disclosure is to provide a scheme for data transmission that at least partially solves the above-mentioned problems and other potential problems.
[0005] In a first aspect of this disclosure, a method for data transmission is provided, comprising: in response to receiving a request for application data from a client, determining a transmission period for transmitting the application data; within a first time window of the transmission period, a master device sending first process data object information to a plurality of slave devices, the first process data object information indicating a control operation of the master device for the plurality of slave devices; within a second time window of the transmission period, the master device sending synchronization information to the plurality of slave devices such that the plurality of slave devices send second process data object information to the master device, the second process data object information indicating at least a response of the plurality of slave devices to the control operation; and within at least one time window of the transmission period other than the first and second time windows, transmitting the application data to the client in response to the request.
[0006] In a second aspect of this disclosure, a data transmission apparatus is provided, comprising: a transmission period determination module configured to determine a transmission period for transmitting application data in response to receiving a request for application data from a client; a first information sending module configured to send first process data object information from a master device to a plurality of slave devices within a first time window of the transmission period, the first process data object information indicating a control operation of the master device for the plurality of slave devices; a second information sending module configured to send synchronization information from the master device to the plurality of slave devices within a second time window of the transmission period, such that the plurality of slave devices send second process data object information to the master device, the second process data object information indicating at least a response of the plurality of slave devices to the control operation; and an application data transmission module configured to transmit application data to a client in response to a request within at least one time window of the transmission period other than the first and second time windows.
[0007] In a third aspect of this disclosure, a system for data transmission is provided, comprising: a master device; a plurality of slave devices; a processor and a memory storing computer-executable instructions, which, when executed by the processor, cause the system to perform the method of the first aspect of this disclosure.
[0008] In a fourth aspect of this disclosure, an electronic device is provided. The electronic device includes at least one processing unit; and at least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions causing the electronic device to perform the method of the first aspect of this disclosure when executed by the at least one processing unit.
[0009] In a fifth aspect of this disclosure, a computer-readable storage medium is provided. This computer-readable storage medium stores a computer program that can be executed by a processor to perform the method according to a first aspect of this disclosure.
[0010] It should be understood that the content described in this content section is not intended to limit the key or essential features of the embodiments of this disclosure, nor is it intended to restrict the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0011] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. In the drawings, the same or similar reference numerals denote the same or similar elements, wherein:
[0012] Figure 1 A schematic diagram of a system for data transmission according to some embodiments of the present disclosure is shown;
[0013] Figure 2 A schematic diagram illustrating the categorized storage of application data according to some embodiments of the present disclosure is shown;
[0014] Figure 3 A schematic diagram illustrating data transmission between a master device and a plurality of slave devices according to some embodiments of the present disclosure is shown;
[0015] Figure 4 A flowchart illustrating a data transmission process according to some embodiments of the present disclosure is shown;
[0016] Figure 5 A block diagram of an apparatus for data transmission according to some embodiments of the present disclosure is shown; and
[0017] Figure 6 A block diagram of an electronic device in which one or more embodiments of the present disclosure may be implemented is shown. Detailed Implementation
[0018] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0019] In the description of embodiments of this disclosure, the term "comprising" and similar terms should be understood as open-ended inclusion, i.e., "including but not limited to". The term "based on" should be understood as "at least partially based on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions may also be included below.
[0020] Figure 1 A schematic diagram of a system for data transmission according to some embodiments of the present disclosure is shown. For example... Figure 1 As shown, the data transmission system described herein generally includes client device 110, master device 121, multiple slave devices 122-1, 122-2, 122-3, 122-4, protocol stack 130, and bus 140. It is worth noting that this disclosure is not limited to the modules involved in the system; any additions or replacements of modules shown in the figure to achieve similar purposes should be considered as included within the scope of this disclosure.
[0021] In embodiments of this disclosure, client device 110, master device 121, and bus 140 are communicatively connected. Client device 110 can be any type of mobile terminal, fixed terminal, or portable terminal, including mobile phones, desktop computers, laptop computers, notebook computers, netbook computers, tablet computers, media computers, multimedia tablets, personal communication system (PCS) devices, personal navigation devices, personal digital assistants (PDAs), audio / video players, digital cameras / camcorders, positioning devices, television receivers, radio receivers, e-book devices, gaming devices, or any combination thereof, including accessories and peripherals of these devices or any combination thereof. Master device 121 and multiple slave devices 122-1, 122-2, 122-3, and 122-4 can be various types of computing systems / electronic devices capable of providing computing power, including but not limited to mainframes, edge computing nodes, computing devices in cloud environments, etc. It should be understood that the type and number of the aforementioned devices can be determined according to actual circumstances, and this disclosure does not impose any limitations on this.
[0022] like Figure 1 As shown, master device 121 can receive requests for application data from client device 110. Multiple slave devices 122-1, 122-2, 122-3, and 122-4 can buffer application data under the control of master device 121 and transfer the application data to protocol stack 130. Protocol stack 130 can determine the transmission priority based on the protocol type of the application data, so as to transmit the application data to client 110 via bus 140 in sequence.
[0023] As mentioned above, applications developed based on the CANopen protocol stack can typically directly call the interfaces provided by the CANopen protocol stack to implement various service functions. However, the lack of control and management over the various service messages requested by the application can lead to delayed message delivery, data transmission conflicts, and random and unpredictable data arrival times. Furthermore, if the protocol stack's cache space is insufficient, the data required by the current service may even be discarded.
[0024] Furthermore, various arbitrations exist in CAN communication systems. When the data volume is large or the number of devices is large, data chaos and data congestion are more likely to occur, making it impossible to guarantee effective control of application data and making the return of data interaction uncontrollable, thus affecting the normal interaction of application data.
[0025] If application data transmission relies entirely on the protocol stack, various data conflicts and confusions can easily occur on the bus. For example, when a master device needs to query information about a single slave device by sending a Service Data Object (SDO), other slave devices on the bus are constantly reporting Process Data Objects (PDOs). Since PDOs have a higher priority than SDOs on the CAN bus, the transmission of SDOs will be delayed, affecting the real-time performance of application data transmission.
[0026] Therefore, embodiments of this disclosure provide a scheme for data transmission. In this scheme, in response to receiving a request for application data from a client, a transmission period for transmitting the application data is determined. Then, within a first time window of the transmission period, a master device sends first process data object information to multiple slave devices. The first process data object information indicates control operations performed by the master device on the multiple slave devices. Subsequently, within a second time window of the transmission period, the master device sends synchronization information to the multiple slave devices, causing the multiple slave devices to send second process data object information to the master device. The second process data object information at least indicates the responses of the multiple slave devices to the control operations. Thus, application data is transmitted to the client in response to the request within at least one time window of the transmission period other than the first and second time windows.
[0027] In this way, messages can be managed and transmitted in an orderly manner, effectively avoiding data transmission chaos and congestion, and improving the reliability of the service system. In some embodiments, the data transmission scheme provided by the present disclosure can classify and store application data, then determine the transmission period according to the priority of the application data, perform orderly data interaction within multiple time windows in the transmission period, and use a token bucket algorithm to limit the data transmission rate, thereby ensuring that the transmission of application data is controllable throughout the entire process. The specific process will be described in detail below. Figure 2 and Figure 3 A detailed introduction will be provided.
[0028] Figure 2 A schematic diagram illustrating the categorized storage of application data according to some embodiments of the present disclosure is shown. According to embodiments of the present disclosure, such as... Figure 1 and Figure 2 As shown, if the master device 121 receives a request for application data 210 from the client 110, the master device 121 can divide the requested application data 210 into multiple categories of data, such as a first category 211, a second category 212, a third category 213, etc. The transmission priorities of the multiple categories of data are different. It should be understood that the application data 210 can be divided into any number of categories of data, and this disclosure does not limit this.
[0029] In some embodiments, such as Figure 2As shown, data in each category can be stored in a queue according to the device identifier of at least one corresponding slave device. For example, data in the first category 211 can be stored in a queue formed by slave devices such as the first slave device 2111, the second slave device 2112, and the third slave device 2113. Similarly, data in the second category 212 can be stored in a queue formed by slave devices such as the fourth slave device 2121, the fifth slave device 2122, and the sixth slave device 2123, and data in the third category 213 can be stored in a queue formed by slave devices such as the seventh slave device 2131, the eighth slave device 2132, and the ninth slave device 2133. The number or value of the devices mentioned above is only an example, and those skilled in the art can use any appropriate number of master devices and slave devices to classify and store application data.
[0030] In some embodiments, the master device 121 and multiple slave devices manage the application data 210 using a Quality of Service (QoS) management system. Utilizing the interface provided by the QoS system with the client 110, it can determine whether the multiple slave devices corresponding to the application data 210 are in an active state (i.e., whether the devices are online), thereby queuing the categorized data into a queue formed by at least one corresponding slave device as a first-level cache. By controlling multiple slave devices through the master device 121 to categorize and store the application data 210, the management of the application data 210 becomes simpler and more efficient.
[0031] Figure 3 A schematic diagram illustrating data transmission between a master device and a plurality of slave devices according to some embodiments of the present disclosure is shown. In some embodiments, such as Figures 1 to 3 As shown, in response to receiving a request for application data 210 from client 110, master device 121 can determine a transmission period 300 for transmitting application data 210. The transmission period 300 includes multiple time windows to perform data interaction in a fixed time order.
[0032] In some embodiments, within a first time window 301 of the transmission cycle 300, the master device 121 sends first process data object (TPDO) information 310 to multiple slave devices. The sent TPDO information 310 may instruct the master device 121 to perform control operations, such as switching operations, on the multiple slave devices.
[0033] In some embodiments, within the second time window 302 of transmission cycle 300, the master device 121 sends synchronization (SYNC) information 320 to multiple slave devices, causing the multiple slave devices to send second process data object (RPDO) information to the master device 121. The RPDO information can indicate the responses of the multiple slave devices to control operations. By sending the RPDO information in a time window earlier in transmission cycle 300, the control relationship between the master device 121 and the multiple slave devices can be quickly determined, facilitating control and management.
[0034] In some embodiments, application data 210 may be transmitted to the client 110 in response to a request within at least one time window other than the first time window 301 and the second time window 302 of the transmission cycle 300. For example, data interaction of the first category of data 211 may be performed in the third time window 303, data interaction of the second category of data 212 may be performed in the fourth time window 304, and data interaction of the third category of data 213 may be performed in the fifth time window 305. After all categories of data interaction in the application data 210 are completed, the master device 121 and multiple slave devices may enter the next transmission cycle 300, and so on.
[0035] In some embodiments, during data interaction between the master device 121 and multiple slave devices, a QoS system can be used to determine whether the protocol stack corresponding to a certain category of data is idle. Only when the protocol stack corresponding to that category of data is idle and can provide service can the transmission of that category of data be performed within the corresponding time window.
[0036] In some embodiments, to limit data interaction traffic and reduce the workload of the service system, a token bucket algorithm can be used to perform data retrieval and transmission. Specifically, the token bucket can generate a predetermined number of tokens at predetermined intervals for the transmission of application data 210. Each category of data in application data 210 is assigned a set of tokens for the transmission of that category of data. The number of tokens in the assigned set is related to the transmission priority of that category of data.
[0037] For example, when the first category of data 211 needs to be transmitted in the third time window 303, a token request is required. Upon receiving the request, the token bucket releases a set of tokens for the transmission of the first category of data 211. If there are enough tokens in the set and the protocol stack corresponding to the first category of data 211 is idle, the first category of data 211 can be retrieved from the corresponding queue for transmission in the third time window 303. During data transmission, if a portion of the first category of data 211 needs to be transmitted, a portion of the tokens in the set are used until all of the first category of data 211 has been transmitted. Similarly, the data transmission of other categories follows the same process and will not be described further here.
[0038] Optimizing the transmission of application data 210 using the token bucket algorithm makes the transmission of data of various categories more orderly. This reduces the operating pressure on the service system and effectively avoids data congestion.
[0039] In some embodiments, the QoS system can utilize the interface between the protocol stack 130 and multiple slave devices to transmit application data 210. Since the application data 210 received by the protocol stack 130 is managed data with a predefined transmission priority, the protocol stack 130 does not need to perform excessive processing on the application data 210; it only needs to notify the client 110 of the transmission result of the application data 210 via the bus 140. This greatly reduces the workload of the protocol stack 130 and prevents data conflicts and data corruption. Furthermore, since the QoS system is located at the service layer of the CANopen protocol stack, rather than the data transmission layer, it can be compatible with various packet fragmentation mechanisms.
[0040] Figure 4 A flowchart of a data transmission process 400 according to some embodiments of the present disclosure is shown. Process 400 can be implemented as follows: Figure 1 The main equipment shown is located at point 121.
[0041] In box 410, in response to receiving a request for application data from the client, a transmission period for transmitting the application data is determined.
[0042] In box 420, within the first time window of the transmission cycle, the master device sends first process data object information to multiple slave devices. The first process data object information indicates the master device's control operations for the multiple slave devices.
[0043] In box 430, within the second time window of the transmission cycle, the master device sends synchronization information to multiple slave devices, so that the multiple slave devices send second process data object information to the master device, the second process data object information indicating at least the responses of the multiple slave devices to the control operation.
[0044] In block 440, application data is transmitted to the client in response to a request within at least one time window other than the first and second time windows of the transmission cycle. In some embodiments, process 400 further includes: dividing the requested application data into multiple categories of data, the multiple categories of data having different transmission priorities, the at least one time window including multiple time windows respectively corresponding to the multiple categories of data, and wherein transmitting the application data to the client includes: transmitting data of the category corresponding to the time window within the multiple time windows. In some embodiments, dividing the requested application data into multiple categories of data includes: determining whether multiple slave devices are in an active state; and in response to the multiple slave devices being in an active state, dividing the application data into multiple categories of data, each category of data being stored by at least one of the multiple slave devices.
[0045] In some embodiments, process 400 further includes: storing data for each of a plurality of categories of data, the data for each category being stored in a queue according to the device identifier of at least one slave device corresponding to the data for that category; generating a queue for the data for each category based on the device identifier of at least one slave device corresponding to the data for that category, to obtain a plurality of queues corresponding to the plurality of categories of data respectively, and wherein transmitting application data includes: sequentially retrieving data for a plurality of categories from the plurality of queues based on a predetermined transmission priority; and sequentially transmitting data corresponding to each time window within a plurality of time windows.
[0046] In some embodiments, retrieving multiple categories of data from multiple queues includes: determining whether a protocol stack corresponding to a first category of data among the multiple categories of data is idle; determining whether the number of a set of tokens allocated to the first category of data for data transmission is sufficient to transmit the first category of data; and retrieving the first category of data from the queue corresponding to the first category of data from the multiple queues in response to the protocol stack corresponding to the first category of data being idle and the number of a set of tokens being sufficient.
[0047] In some embodiments, retrieving data of a first category from a queue corresponding to data of a first category from multiple queues includes: assigning a set of tokens to the data of the first category; and using multiple tokens from the set of tokens to retrieve the first data from at least one slave device corresponding to the first data in the data of the first category.
[0048] In some embodiments, transmitting application data further includes: using the protocol stack corresponding to the application data and the interface between multiple slave devices to transmit the application data.
[0049] In some embodiments, process 400 further includes: using the protocol stack corresponding to the application data to notify the client of the transmission result of the application data.
[0050] Figure 5 A block diagram of an apparatus 500 for data transmission according to some embodiments of the present disclosure is shown. The apparatus 500 may, for example, be implemented in a host device 121. Various modules / components in the apparatus 500 may be implemented by hardware, software, firmware, or any combination thereof.
[0051] The apparatus 500 includes a transmission period determination module 510, configured to determine a transmission period for transmitting application data in response to receiving a request for application data from a client. The apparatus 500 also includes a first information sending module 520, configured to send first process data object information from a master device to multiple slave devices within a first time window of the transmission period, the first process data object information indicating control operations performed by the master device on the multiple slave devices. The apparatus 500 further includes a second information sending module 530, configured to send synchronization information from the master device to the multiple slave devices within a second time window of the transmission period, causing the multiple slave devices to send second process data object information to the master device, the second process data object information indicating at least the responses of the multiple slave devices to the control operations. The apparatus 500 also includes an application data transmission module 540, configured to transmit application data to the client in response to a request within at least one time window of the transmission period other than the first and second time windows.
[0052] In some embodiments, the apparatus 500 further includes: a first category segmentation module configured to segment the requested application data into multiple categories of data, the transmission priorities of the multiple categories of data being different from each other, at least one time window including multiple time windows corresponding to the multiple categories of data respectively, and the application data transmission module 540 further includes: a category data transmission module configured to transmit data of the category corresponding to the time window to the client within the time window of the multiple time windows.
[0053] In some embodiments, the first category segmentation module includes: a state determination module configured to determine whether a plurality of slave devices are in an active state; and a second category segmentation module configured to, in response to the plurality of slave devices being in an active state, segment application data into multiple categories of data, wherein data in each of the multiple categories of data is stored by at least one of the plurality of slave devices.
[0054] In some embodiments, the apparatus 500 further includes: a classification storage module configured to store data of each of a plurality of categories of data, wherein the data of each category is stored in a queue according to the device identifier of at least one slave device corresponding to the data; a queue generation module configured to generate a queue for each category of data according to the device identifier of at least one slave device corresponding to the data of that category, so as to obtain a plurality of queues corresponding to the plurality of categories of data respectively; and the application data transmission module 540 further includes: a data scheduling module configured to sequentially retrieve data of a plurality of categories from the plurality of queues based on a predetermined transmission priority; and a data transmission module configured to sequentially transmit data corresponding to each time window within a plurality of time windows.
[0055] In some embodiments, the data scheduling module includes: a protocol stack determination module configured to determine whether the protocol stack corresponding to a first category of data among a plurality of categories of data is idle; a token determination module configured to determine whether the number of a set of tokens allocated to the first category of data for data transmission is sufficient to transmit the first category of data; and a first category data scheduling module configured to, in response to the protocol stack corresponding to the first category of data being idle and the number of a set of tokens being sufficient, retrieve the first category of data from the queue corresponding to the first category of data among a plurality of queues.
[0056] In some embodiments, the first category data scheduling module includes: a token allocation module configured to allocate a set of tokens to the first category of data; and a first data scheduling module configured to use multiple tokens from the set of tokens to retrieve first data from at least one slave device corresponding to the first data in the first category of data.
[0057] In some embodiments, the application data transmission module 540 further includes an interface data transmission module configured to transmit application data using an interface between a protocol stack corresponding to the application data and multiple slave devices.
[0058] In some embodiments, the apparatus 500 further includes a protocol stack data transmission module, configured to notify the client of the transmission result of the application data using the protocol stack corresponding to the application data.
[0059] The units included in device 500 can be implemented in various ways, including software, hardware, firmware, or any combination thereof. In some embodiments, one or more units may be implemented using software and / or firmware, such as machine-executable instructions stored on a storage medium. In addition to or as an alternative to machine-executable instructions, some or all of the units in device 500 may be implemented at least partially by one or more hardware logic components. By way of example and not limitation, exemplary types of hardware logic components that may be used include field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-chips (SoCs), complex programmable logic devices (CPLDs), and so on.
[0060] Figure 6 A block diagram of an electronic device 600 in which one or more embodiments of the present disclosure may be implemented is shown. It should be understood that... Figure 6 The electronic device 600 shown is merely exemplary and should not be construed as limiting the functionality and scope of the embodiments described herein. Figure 6 The electronic device 600 shown can be used to achieve Figure 1 Main equipment 121.
[0061] like Figure 6 As shown, electronic device 600 is in the form of a general-purpose electronic device. Components of electronic device 600 may include, but are not limited to, one or more processors or processing units 610, memory 620, storage device 630, one or more communication units 640, one or more input devices 650, and one or more output devices 660. Processing unit 610 may be a physical or virtual processor and is capable of performing various processes according to programs stored in memory 620. In a multiprocessor system, multiple processing units execute computer-executable instructions in parallel to improve the parallel processing capability of electronic device 600.
[0062] Electronic device 600 typically includes multiple computer storage media. Such media can be any available media accessible to electronic device 600, including but not limited to volatile and non-volatile media, removable and non-removable media. Memory 620 can be volatile memory (e.g., registers, cache, random access memory (RAM)), non-volatile memory (e.g., read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. Storage device 630 can be a removable or non-removable medium and can include machine-readable media, such as flash drives, disks, or any other media that can be used to store information and / or data (e.g., training data for training) and can be accessed within electronic device 600.
[0063] Electronic device 600 may further include additional removable / non-removable, volatile / non-volatile storage media. Although not explicitly stated... Figure 6 As shown, disk drives for reading from or writing to removable, non-volatile disks (e.g., "floppy disks") and optical disk drives for reading from or writing to removable, non-volatile optical disks can be provided. In these cases, each drive can be connected to a bus (not shown) via one or more data media interfaces. Memory 620 may include computer program product 625 having one or more program modules configured to perform various methods or actions of various embodiments of this disclosure.
[0064] The communication unit 640 enables communication with other electronic devices via a communication medium. Additionally, the functionality of the components of the electronic device 600 can be implemented using a single computing cluster or multiple computing machines capable of communicating via communication connections. Therefore, the electronic device 600 can operate in a networked environment using logical connections to one or more other servers, network personal computers (PCs), or another network node.
[0065] Input device 650 can be one or more input devices, such as a mouse, keyboard, trackball, etc. Output device 660 can be one or more output devices, such as a monitor, speaker, printer, etc. Electronic device 600 can also communicate with one or more external devices (not shown) via communication unit 640 as needed. These external devices include storage devices, display devices, etc., and can communicate with one or more devices that enable user interaction with electronic device 600, or with any device that enables electronic device 600 to communicate with one or more other electronic devices (e.g., network card, modem, etc.). Such communication can be performed via input / output (I / O) interface (not shown).
[0066] According to an exemplary implementation of this disclosure, a computer-readable storage medium is provided that stores one or more computer instructions, wherein one or more computer instructions are executed by a processor to implement the methods described above. According to an exemplary implementation of this disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions that are executed by a processor to implement the methods described above.
[0067] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products implemented according to this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0068] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processing unit of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0069] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions that execute on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0070] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a part of a system, program segment, or instruction, which contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0071] Various implementations of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed implementations. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described implementations. The terminology used herein is chosen to best explain the principles, practical applications, or improvements to technology in the market, or to enable others skilled in the art to understand the various implementations disclosed herein.
Claims
1. A data transmission method, comprising: In response to receiving a request for application data from a client, a transmission period for transmitting the application data is determined; Within the first time window of the transmission cycle, the master device sends first process data object information to multiple slave devices. The first process data object information indicates the control operation of the master device for the multiple slave devices. Within the second time window of the transmission cycle, the master device sends synchronization information to the plurality of slave devices, so that the plurality of slave devices send second process data object information to the master device, the second process data object information indicating at least the responses of the plurality of slave devices to the control operation; as well as In response to the request, the application data is transmitted to the client within at least one time window other than the first time window and the second time window during the transmission period.
2. The method according to claim 1, further comprising: The requested application data is divided into multiple categories, each with a different transmission priority. The at least one time window includes multiple time windows corresponding to the various data categories. The transmission of the application data to the client includes: Within each of the multiple time windows, data of the category corresponding to that time window is transmitted to the client.
3. The method of claim 2, wherein dividing the requested application data into multiple categories comprises: Determine whether the plurality of slave devices are in the startup state; as well as In response to the plurality of slave devices being in an active state, the application data is divided into the plurality of data categories, and the data of each category is stored by at least one of the plurality of slave devices.
4. The method according to claim 3, further comprising: Data for each of the multiple categories is stored separately, and the data for each category is stored in a queue according to the device identifier of the corresponding at least one slave device; For each category of data, a queue for that category of data is generated based on the device identifier of the at least one slave device corresponding to that category of data, resulting in multiple queues corresponding to the multiple categories of data respectively. The transmitted application data includes: Based on a predetermined transmission priority, data of the multiple categories are retrieved sequentially from the multiple queues; as well as Data corresponding to each time window is transmitted sequentially within the multiple time windows.
5. The method of claim 4, wherein retrieving data of the plurality of categories from the plurality of queues comprises: Determine whether the protocol stack corresponding to the first category of data among the multiple categories of data is idle; Determine whether the number of tokens allocated to the first category of data for data transmission is sufficient to transmit the first category of data; as well as In response to the protocol stack corresponding to the data of the first category being idle and the number of the set of tokens being sufficient, the data of the first category is retrieved from the queue corresponding to the data of the first category among the plurality of queues.
6. The method of claim 5, wherein retrieving data of the first category from the queue corresponding to the data of the first category in the plurality of queues comprises: Assign the set of tokens to the data in the first category; as well as Using multiple tokens from the set of tokens, the first data is retrieved from the first slave device corresponding to the first data in the first category of data in the at least one slave device.
7. The method of claim 1, wherein transmitting the application data further comprises: The application data is transmitted through the interface between the protocol stack corresponding to the application data and the multiple slave devices.
8. The method according to claim 1, further comprising: The protocol stack corresponding to the application data is used to notify the client of the transmission result of the application data.
9. A data transmission apparatus, comprising: The transmission period determination module is configured to determine the transmission period for transmitting the application data in response to receiving a request for application data from a client. The first information sending module is configured to send first process data object information from the master device to multiple slave devices within a first time window of the transmission cycle. The first process data object information indicates the control operation of the master device for the multiple slave devices. The second information sending module is configured to send synchronization information from the master device to the plurality of slave devices within a second time window of the transmission cycle, so that the plurality of slave devices send second process data object information to the master device, wherein the second process data object information at least indicates the response of the plurality of slave devices to the control operation; as well as An application data transmission module is configured to transmit the application data to the client in response to the request within at least one time window other than the first time window and the second time window of the transmission period.
10. A system for data transmission, comprising: Main equipment; Multiple devices; as well as A processor and a memory storing computer-executable instructions, which, when executed by the processor, cause the system to perform the method according to any one of claims 1 to 8.
11. An electronic device, comprising: At least one processing unit; as well as At least one memory, coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, which, when executed by the at least one processing unit, cause the electronic device to perform the method according to any one of claims 1 to 8.
12. A computer-readable storage medium having a computer program stored thereon, the computer program being executable by a processor to implement the method according to any one of claims 1 to 8.