Data polling transmission method, device and equipment based on level signal

The slave module's independent time slot allocation is achieved through level signals, which solves the problems of excessive host burden and low communication efficiency in the traditional polling mechanism, and achieves efficient and stable data transmission and good system scalability.

CN120050133APending Publication Date: 2025-05-27SHANGHAI HIGH-FLYING ELECTRONICS TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510372980.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-27
Publication Date
2025-05-27

AI Technical Summary

Technical Problem

Under the traditional polling mechanism, the host needs to query each slave one by one, resulting in excessive burden on the host, low communication efficiency, poor system scalability, and high maintenance costs.

Method used

The slave module's independent time slot allocation is realized through level signals, avoiding the host module query one by one. The slave module uploads data independently according to its own data situation, and the host does not need to query one by one.

Benefits of technology

Improve communication efficiency, reduce the burden on host modules, avoid bus conflicts, ensure the stability and reliability of communication, and reduce system maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120050133A_ABST
    Figure CN120050133A_ABST
Patent Text Reader

Abstract

The invention discloses a data polling transmission method, device and equipment based on a level signal. Comprising the following steps: monitoring a level signal through a host module and slave modules, and when the level signal is monitored to be in a specified state, determining a zero time slot and starting a polling process; determining an uploading time slot sequence corresponding to each slave module; and selecting a target slave module from the slave modules in sequence based on the uploading time slot sequence, and uploading data to the host module through the target slave module. The zero time slot is determined by monitoring the level signal, so that the modules can start the polling process at the same time, and data transmission errors or conflicts caused by desynchrony are avoided. By defining the uploading time slot sequence, each slave module can occupy the bus according to the set sequence, the bus conflict is effectively avoided, and the stability and reliability of communication are ensured. The slave modules autonomously upload data according to own data conditions, the host does not need to inquire one by one, the workload of the host is reduced, the burden of the host is reduced, and the communication efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data transmission, and in particular, to a data polling transmission method, device, and equipment based on level signals. Background Art

[0002] In modern electronic systems, bus communication systems play a crucial role. Especially in the scenario of multiple slave devices, an effective data transmission management method is required to ensure the orderly transmission of data and the stable operation of the system. As a data transmission management method widely applied in bus communication systems, the polling mechanism can provide an orderly scheduling strategy for the communication between the host and slave devices in a multi-slave environment.

[0003] Under the traditional polling mechanism, the host queries each slave device in a preset order to ensure that each slave device has the opportunity to upload data, thereby achieving fair communication scheduling.

[0004] The traditional polling mechanism has many drawbacks. The host needs to query each slave device one by one. Even if some slave devices have no data to upload, the host still needs to send query instructions and wait for responses, which makes the host burden too heavy and significantly reduces the communication efficiency. At the same time, in terms of system scalability, when the number of slave devices increases, it is necessary to reconfigure the polling list of the host and adjust the address allocation of the existing slave devices, increasing the system maintenance cost and complexity. Summary of the Invention

[0005] The present invention provides a data polling transmission method, device, and equipment based on level signals, which realizes the autonomous time slot allocation of slave modules through level signals, avoids the host module from querying each one by one, improves the communication efficiency, and reduces the burden on the host module.

[0006] According to one aspect of the present invention, there is provided a data polling transmission method based on level signals, which is applied to a bus system and includes: a host module and slave modules, and the method includes:

[0007] By the host module and each slave module listening to the level signal, when the monitored level signal is in a specified state, a zero time slot is determined and the polling process is started;

[0008] Determine the upload time slot order corresponding to each slave module;

[0009] Based on the upload time slot order, target slave modules are sequentially selected from each slave module, and data is uploaded to the host module through the target slave modules.

[0010] Optionally, determining the upload time slot order corresponding to each slave module includes: obtaining the slave numbers of each slave module; arranging each slave module in ascending order of the slave number to generate the upload time slot order.

[0011] Optionally, uploading data from the target slave module to the host module includes: determining whether there is data in the target slave module; if so, uploading the data to the host module via the communication bus; otherwise, directly adjusting the level signal from the first level position to the second level position, and resetting the level signal to the first level position after a preset unit time slot.

[0012] Optionally, uploading data to the host module via the communication bus includes: adjusting the level signal from the first level position to the second level position; uploading the data to the host module via the communication bus, and resetting the level signal to the first level position after the upload is completed.

[0013] Optionally, the first level position is a high level, the second level position is a low level, the level signal is default to be high level, and the specified state is a high level lasting for two preset unit time slots.

[0014] Optionally, adjusting the level signal from the first level position to the second level position includes: connecting the pin of the target slave module to the level signal line, where the working mode of the pin is open-drain output; grounding the level signal line based on the pin to adjust the level signal from the first level position to the second level position.

[0015] Optionally, after uploading data from the target slave module to the host module, the method further includes: when all slave modules have completed the current round of data upload, resetting the level signal to the first level position to enter the monitoring of the starting point of the next round of polling zero time slot.

[0016] According to another aspect of the present invention, there is provided a data polling transmission device based on a level signal, the device includes:

[0017] A level signal monitoring module, configured to monitor the level signal through the host module and each slave module, and determine a zero time slot and start a polling process when the monitored level signal is in the specified state;

[0018] An upload time slot sequence determination module, configured to determine the upload time slot sequence corresponding to each slave module;

[0019] A data polling upload module, configured to sequentially select a target slave module from each slave module based on the upload time slot sequence, and upload data to the host module through the target slave module.

[0020] According to another aspect of the present invention, there is provided an electronic device, the electronic device includes:

[0021] At least one processor;

[0022] And a memory communicatively connected to the at least one processor;

[0023] Wherein, the memory stores a computer program that can be executed by the at least one processor. When the computer program is executed by the at least one processor, the at least one processor can execute a data polling transmission method based on level signals according to any embodiment of the present invention.

[0024] According to another aspect of the present invention, there is provided a computer-readable storage medium storing computer instructions for causing a processor to implement a data polling transmission method based on level signals according to any embodiment of the present invention when executed.

[0025] The technical solution of the embodiment of the present invention can determine a zero time slot by the host module and the slave module listening to level signals, enabling each module to start the polling process simultaneously, and avoiding data transmission errors or conflicts caused by asynchronization. By clarifying the order of the upload time slots corresponding to each slave module, the data upload is carried out in an orderly manner, and each slave module can occupy the bus according to the established order, effectively avoiding bus conflicts and ensuring the stability and reliability of communication. The slave module uploads autonomously according to its own data situation, and the host does not need to query one by one, reducing the workload of the host, thus reducing the burden on the host and improving communication efficiency.

[0026] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0028] Figure 1 is a flowchart of a data polling transmission method based on level signals according to Embodiment 1 of the present invention;

[0029] Figure 2 is a flowchart of another data polling transmission method based on level signals according to Embodiment 2 of the present invention;

[0030] Figure 3 is a schematic diagram of a bus system according to Embodiment 2 of the present invention;

[0031] Figure 4 is a schematic diagram of a level signal according to Embodiment 2 of the present invention;

[0032] Figure 5 It is a schematic structural diagram of a data polling transmission device based on level signals provided in Embodiment 3 of the present invention;

[0033] Figure 6 It is a schematic structural diagram of an electronic device implementing a data polling transmission method based on level signals according to an embodiment of the present invention. Specific embodiments

[0034] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a 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 those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0035] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above drawings are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device including a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.

[0036] Embodiment 1

[0037] Figure 1 A flowchart of a data polling transmission method based on level signals is provided for Embodiment 1 of the present invention. This embodiment is applicable to a bus system, including: a host module and a slave module. This method can be executed by a data polling transmission device based on level signals. The data polling transmission device based on level signals can be implemented in the form of hardware and / or software, and the data polling transmission device based on level signals can be configured in a computer controller. As Figure 1 shown, the method includes:

[0038] S110. Monitor the level signal through the host module and each slave module. When the monitored level signal is in a specified state, determine the zero time slot and start the polling process.

[0039] It should be noted that in the bus system, both the host module and the slave modules are connected to the communication bus. The level signal refers to the signal generated on the transmit line (TXL), and different states are usually represented by high level and low level. The default state of the level signal is high level, indicating that there is no application from the slave module to upload data. TXL is set in parallel with the bus communication line and is the key signal carrier for the entire data polling transmission, used to synchronize the time slot states of all master and slave modules in real time to avoid bus conflicts.

[0040] Among them, the host module is the core control unit in the bus system, responsible for monitoring the shared level signal line, receiving the data uploaded by the slave modules, and playing the role of data aggregation and coordination during the entire data transmission process. The slave module is the data sending end in the bus system, and multiple slave modules together form the slave part of the system. Each slave module has a unique number, such as slot1, slot2, …, slotN. In the preset time slot, the slave module can occupy the communication bus by pulling down the level signal to upload data to the host module. The specified state can be a high level that lasts for two preset unit time slots. When the host module and the slave modules detect that the level signal presents this state, it is determined that this is the zero time slot. The zero time slot refers to the special time slot determined when the host module and the slave modules detect the specified state, marking the start of a round of polling process and being the starting reference point of the entire data transmission polling mechanism. The polling process means starting from the zero time slot, in accordance with the preset upload time slot sequence, each slave module is given the opportunity to occupy the communication bus to upload data to the host module in turn. After completing one round of upload, it enters the next round and keeps looping.

[0041] S120. Determine the upload time slot sequence corresponding to each slave module.

[0042] Among them, the upload time slot sequence refers to the order in which each slave module occupies the communication bus for data upload determined according to the number of the slave module. The slave module with a smaller number occupies the bus first, that is, the slave module numbered slot1 occupies the bus first, and so on, ensuring that each slave module can upload data fairly and orderly.

[0043] S130. Based on the upload time slot sequence, sequentially select the target slave module from each slave module, and upload data to the host module through the target slave module.

[0044] Among them, the communication bus is used for data transmission and interaction between the host module and the slave module. The communication bus can be an RS-422 bus system, or a full-duplex or half-duplex RS-485 bus system. In serial communication, especially in bus communication protocols such as RS-485 and RS-422, data is usually transmitted in the form of frames, and the start and end of the frame are identified by start bits and stop bits. In this case, the slave module usually adopts an asynchronous communication mode, and there is no global synchronous clock between modules, which may lead to clock deviation. These deviations may cause multiple slaves to miss the correct upload time when uploading data concurrently, or even send data at the same time, resulting in data conflicts and reducing the stability and reliability of the system.

[0045] Optionally, uploading data from the target slave module to the host module includes: determining whether there is data in the target slave module. If so, uploading data to the host module through the communication bus; otherwise, directly adjusting the level signal from the first level position to the second level position, and resetting the level signal to the first level position after a preset unit time slot.

[0046] Among them, in the target slave module, there is usually a specific data storage area or buffer mechanism. By detecting the storage area, it is determined whether there is data waiting to be uploaded. For example, in some embedded systems, there is a dedicated buffer in the memory of the slave module for storing data to be sent. By checking the status of the buffer, such as whether the data counter is zero and whether there is a new data write flag, it is determined whether there is data to upload. When it is determined that there is data in the target slave module, data will be uploaded to the host module through the communication bus. When it is determined that there is no data in the target slave module, the target slave module will also adjust the level signal from the first level position to the second level position. Even if there is no data to upload, the target slave module will adjust the level signal, which is to follow the polling mechanism and indicate to the system that the target slave module has responded within its corresponding upload time slot. After adjustment, the level signal will last for a preset unit time slot. The setting of the preset unit time slot is to ensure that the system has enough time to identify and process the state change of the slave module, and ensure the stability and accuracy of the polling mechanism. The preset unit time slot is jointly determined by the MCU performance of the master and slave modules and the accuracy of the system clock. The preset unit time slot can be 50 μs. After lasting for the preset unit time slot, the level signal is reset to the first level position. At this time, it indicates that although the slave module has no data to upload, it has completed its response in this round of polling, and the bus returns to a state that can be occupied by other slave modules.

[0047] Optionally, uploading data to the host module through the communication bus includes: adjusting the level signal from the first level position to the second level position; uploading data to the host module through the communication bus, and resetting the level signal to the first level position after the upload is completed.

[0048] Specifically, the level signal is default at the first level position. When the target slave module needs to upload data, it first adjusts the level signal from the first level position to the second level position. After the level signal becomes the second level position, the target slave module starts to upload data to the host module through the communication bus. As the data transmission channel, the communication bus can ensure that data is stably and accurately transmitted from the slave module to the host module. During the upload process, the host module continuously monitors the bus, receives and processes the data sent by the slave module. When the target slave module completes the data upload, it needs to reset the level signal to the first level position. This indicates that the target slave module has ended its occupation of the communication bus, and the bus returns to the idle state, waiting for the next slave module to upload data according to the upload time slot sequence.

[0049] Optionally, the first level position is a high level, the second level position is a low level, the level signal is default a high level, and the specified state is a high level lasting for two preset unit time slots.

[0050] Among them, the level signal is default a high level, that is, when the system does not start polling or no slave module occupies the bus, the level signal remains at the high level state. The first level position is a high level, representing that the bus is in the idle state and no slave module is occupying the bus for data transmission. Each slave module can judge whether it can prepare for the data upload operation according to this state. The second level position is a low level, and the low level signal is equivalent to an "occupation flag", indicating to other slave modules and the host module that the current bus has been occupied, and other slave modules cannot preempt the bus resources at this time, thus avoiding data transmission conflicts. The specified state refers to a high level lasting for two preset unit time slots. When the host module and the slave module detect that the level signal is a high level lasting for two preset unit time slots, they will determine that this is the zero time slot. The zero time slot is the starting point of the entire polling process, providing a unified time reference for the system, enabling all master and slave modules to synchronously start a new round of polling. By setting the specified state as the judgment condition for the zero time slot, it can effectively avoid accidentally triggering the polling process due to high level fluctuations, improving the stability and reliability of the system.

[0051] Optionally, adjusting the level signal from the first level position to the second level position includes: connecting the pin of the target slave module to the level signal line, where the working mode of the pin is open-drain output; grounding the level signal line based on the pin to adjust the level signal from the first level position to the second level position.

[0052] Specifically, by connecting the pins of the target slave module to the level signal line, the slave module can control the level signal and occupy the bus. The working mode of the pins is set to open-drain output. Open-drain output is a circuit output mode. In the open-drain output mode, the pins can only output low level or be in a high-impedance state, and cannot actively output high level. When the pins are in a high-impedance state, the level signal line is maintained at a high level, i.e., the first level position, by the pull-up resistor; when the pins need to output low level, the level signal line can be pulled low.

[0053] Further, when the target slave module needs to occupy the bus for data upload, it will ground the level signal line based on this pin. Due to the characteristics of the open-drain output pins, once the pins ground the level signal line, the level signal will change from the high level maintained by the pull-up resistor to the low level. At this time, other slave modules and the host module can monitor the change of the level signal and thus know that the current bus is occupied by the target slave module.

[0054] Optionally, after uploading data from the target slave module to the host module, the method further includes: when all slave modules have completed the current round of data upload, reset the level signal to the first level position to enter the monitoring of the starting point of the next round of polling zero time slot.

[0055] Specifically, after all slave modules have completed a round of upload, TXL resumes to a high level, and the system enters the monitoring of the starting point of the next round of zero time slot. As long as the system keeps running, the above steps will be continuously looped, and data transmission will be carried out cyclically, ensuring that the data of each slave module can be uploaded to the host module in a timely and orderly manner, and realizing efficient and stable bus communication.

[0056] In summary, the present application realizes the autonomous time slot allocation of the slave module through the level signal, without the host module querying each slave module one by one, effectively solving the problem of the overheavy burden of the host module in the traditional polling mechanism, improving the bus utilization rate and the real-time performance of data transmission, avoiding bus conflicts caused by clock differences, and significantly enhancing the communication efficiency and reliability of the system. At the same time, the present application only relies on a simple shared level signal line to synchronize the time slots of the slave modules, the hardware circuit design is simple, the fault points are easy to locate and troubleshoot, it has good scalability, and is applicable to the scenario of multiple slave modules. When the system needs to increase the number of slave modules, only the new slave module needs to be connected to the TXL control circuit, without complex modification of the existing master and slave modules, reducing the maintenance cost of the system.

[0057] The technical solution of the embodiment of the present invention can determine the zero time slot by the host module and the slave modules listening to the level signal, enabling each module to start the polling process simultaneously, and avoiding data transmission errors or conflicts caused by asynchronization. By clarifying the upload time slot sequence corresponding to each slave module, the data upload is carried out in an orderly manner, and each slave module can occupy the bus according to the established sequence, effectively avoiding bus conflicts and ensuring the stability and reliability of communication. The slave module uploads autonomously according to its own data situation, and the host does not need to query one by one, reducing the workload of the host, thereby reducing the host burden and improving the communication efficiency.

[0058] Embodiment 2

[0059] Figure 2 FIG. is a flowchart of a data polling transmission method based on level signals provided by Embodiment 2 of the present invention. In this embodiment, the specific process of determining the upload time slot sequence corresponding to each slave module is added on the basis of Embodiment 1 above. Among them, the specific contents of steps S210 and S240 are substantially the same as those of steps S110 and S130 in Embodiment 1, so they will not be elaborated in this embodiment. As Figure 2 shown, the method includes:

[0060] S210. The host module and each slave module listen to the level signal. When the monitored level signal is in the specified state, determine the zero time slot and start the polling process.

[0061] S220. Obtain the slave numbers of each slave module.

[0062] Among them, the slave number refers to the identification information of the slave module, and each slave module can be numbered in turn according to the distance from the slave module to the host module or the function priority.

[0063] S230. Arrange each slave module in ascending order of the slave number to generate the upload time slot sequence.

[0064] Specifically, the upload time slot sequence corresponding to each slave module is determined according to the slave number of the slave module. The system will obtain the slave numbers of each slave module, and the slave number is the unique identifier of each slave module. Then, arrange each slave module in ascending order of the slave number to generate the upload time slot sequence. For example, if the slave module numbers are slot1, slot2, and slot3, then the upload time slot sequence is that slot1 uploads first, followed by slot2, and finally slot3. The order setting method based on the number is simple and direct, which not only ensures that each slave module has an equal opportunity to upload data, but also facilitates the unified management and scheduling of the system.

[0065] It can be known that the order of the upload time slots remains relatively stable during the operation of the system, unless the system is reconfigured or expanded. When the system needs to increase the number of slave modules, the new slave modules are assigned new numbers according to the rules and inserted into the original order system without adjusting the address allocation of the existing slaves, reducing the system maintenance cost and reflecting good scalability.

[0066] S240. Sequentially select target slave modules from each slave module based on the upload time slot order, and upload data to the host module through the target slave modules.

[0067] Optionally, uploading data to the host module through the target slave module includes: determining whether there is data in the target slave module; if so, uploading data to the host module through the communication bus; otherwise, directly adjusting the level signal from the first level position to the second level position, and resetting the level signal to the first level position after a preset unit time slot.

[0068] Optionally, uploading data to the host module through the communication bus includes: adjusting the level signal from the first level position to the second level position; uploading data to the host module through the communication bus, and resetting the level signal to the first level position after the upload is completed.

[0069] Optionally, the first level position is a high level, the second level position is a low level, the level signal is default to be a high level, and the specified state is a high level lasting for two preset unit time slots.

[0070] Optionally, adjusting the level signal from the first level position to the second level position includes: connecting the pin of the target slave module to the level signal line, where the working mode of the pin is open-drain output; grounding the level signal line based on the pin to adjust the level signal from the first level position to the second level position.

[0071] Optionally, after uploading data to the host module through the target slave module, the method further includes: when all slave modules have completed the data upload in this round, resetting the level signal to the first level position to enter the monitoring of the starting point of the next round of polling zero time slot.

[0072] Specific application scenario: Figure 3 This embodiment of the present invention provides a schematic diagram of a bus system, including: a host module 1, several slave modules 2, a communication bus 3, and a level signal line TXL 4; the signal transceiver end of the host module 1 is connected to the communication bus 3; the level signal line TXL 4 exists in parallel with the communication bus 3 and is connected to the host module 1 and all slave modules 2, and is used for the host module and each slave module to monitor the level signal to determine the zero time slot and the occupancy status of the bus, etc., to assist in realizing the orderly progress of data polling transmission; the communication bus 3 is used for data transmission and interaction between the host module 1 and the slave module 2.

[0073] Specifically, Figure 4 FIG. 2 provides a schematic diagram of a level signal for the second embodiment of the present invention. In the figure, it shows the change of TXL level signal in a single duration of 15 unit time slots. Among them, the horizontal axis represents time slots, from 1 to 15 and subsequent ones are omitted, which is used to divide time segments. The vertical axis is divided into two states, H and L. H represents high level and L represents low level. The level signal is defaulted to high level. When the slave module occupies the bus, the level signal will be pulled down to low level. The "polling 1 start flag" and "polling 2 start flag" marked in the figure represent the starting points of the data polling transmission process. When a high level lasting for two preset unit time slots is detected, it represents the start of polling. At this time, the zero time slot can be determined and polling can be started. slot1, slot2, and slot3 represent different slave modules. Time slots 1-2 are continuous high levels, marking the start of the first polling. Time slot 3 is the low level caused by the pull-down of slot1, which only lasts for one time slot, and then time slot 4 returns to high level; time slots 5-7 are for slot2 to upload data, and time slot 8 returns; similarly, time slot 9 is the low level caused by the pull-down of slot3, lasting for one time slot, and then time slot 10 returns to high level. When the TXL high level is detected again for two seconds, such as time slots 10-11, it marks the start of the second polling, and then it repeats.

[0074] The technical solution of the embodiment of the present invention can determine the zero time slot by the host module and the slave module listening to the level signal, enabling each module to start the polling process simultaneously, avoiding data transmission errors or conflicts caused by out-of-sync. By clarifying the order of the upload time slots corresponding to each slave module, the data upload proceeds in an orderly manner. Each slave module can occupy the bus according to the established order, effectively avoiding bus conflicts and ensuring the stability and reliability of communication. The slave module uploads autonomously according to its own data situation, and the host does not need to query one by one, reducing the workload of the host, thereby reducing the host burden and improving communication efficiency. Based on the slave number to determine the order of the upload time slots, when the number of slave devices increases, the new slave device only needs to be inserted into the order according to the rule of allocation number, without reconfiguring the host polling list and adjusting the existing slave addresses, reducing the system maintenance cost and complexity, and having good scalability.

[0075] Embodiment 3

[0076] Figure 5 FIG. 3 is a schematic structural diagram of a data polling transmission device based on a level signal provided for the third embodiment of the present invention. As Figure 5 shown, the device includes: a level signal listening module 310, which is used to listen to the level signal through the host module and each slave module, and when the level signal is detected to be in a specified state, determine the zero time slot and start the polling process;

[0077] An upload time slot sequence determination module 320, configured to determine the upload time slot sequence corresponding to each slave module;

[0078] A data polling and uploading module 330, configured to sequentially select a target slave module from each slave module based on the upload time slot sequence, and upload data to the host module through the target slave module.

[0079] Optionally, the upload time slot sequence determination module 320 is specifically configured to: obtain the slave numbers of each slave module; arrange each slave module in ascending order of the slave numbers to generate an upload time slot sequence.

[0080] Optionally, the data polling and uploading module 330 is specifically configured to: determine whether there is data in the target slave module, and if so, upload the data to the host module through the communication bus; otherwise, directly adjust the level signal from the first level position to the second level position, and after a preset unit time slot, reset the level signal to the first level position.

[0081] Optionally, the data polling and uploading module 330 specifically includes: a data uploading unit, configured to: adjust the level signal from the first level position to the second level position; upload data to the host module through the communication bus, and after the upload is completed, reset the level signal to the first level position.

[0082] Optionally, the data polling and uploading module 330 specifically includes: a level signal adjustment unit, configured to: connect the pin of the target slave module to the level signal line, where the working mode of the pin is open-drain output; ground the level signal line based on the pin to adjust the level signal from the first level position to the second level position.

[0083] Optionally, the device further includes: a level signal reset module, configured to: after uploading data to the host module through the target slave module, when all slave modules have completed the current round of data uploading, reset the level signal to the first level position to enter the monitoring of the starting point of the next round of polling zero time slot.

[0084] The technical solution of the embodiment of the present invention can determine the zero time slot by the host module and the slave module listening to the level signal, enabling each module to start the polling process simultaneously, avoiding data transmission errors or conflicts caused by out-of-sync. By clarifying the upload time slot sequence corresponding to each slave module, the data upload is carried out in an orderly manner, and each slave module can occupy the bus according to the established sequence, effectively avoiding bus conflicts and ensuring the stability and reliability of communication. The slave module uploads data independently according to its own data situation, and the host does not need to query one by one, reducing the workload of the host, thereby reducing the host burden and improving communication efficiency.

[0085] An apparatus for data polling transmission based on level signals provided by an embodiment of the present invention can execute a method for data polling transmission based on level signals provided by any embodiment of the present invention, and has function modules and beneficial effects corresponding to the execution of the method.

[0086] Embodiment 4

[0087] Figure 6 FIG. shows a schematic structural diagram of an electronic device 10 that can be used to implement an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as, for example, a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, for example, a personal digital assistant, a cellular phone, a smart phone, a wearable device (such as a helmet, glasses, a watch, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present invention described and / or claimed herein.

[0088] As Figure 6 shown, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc. The memory stores a computer program executable by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other via a bus 14. The input / output (I / O) interface 15 is also connected to the bus 14.

[0089] A plurality of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0090] The processor 11 may be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a data polling transmission method based on a level signal.

[0091] In some embodiments, a data polling transmission method based on a level signal may be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed onto the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of a data polling transmission method based on a level signal described above may be executed. Alternatively, in other embodiments, the processor 11 may be configured to execute a data polling transmission method based on a level signal in any other suitable manner (e.g., by means of firmware).

[0092] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a dedicated or general-purpose programmable processor, that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit the data and instructions to the storage system, the at least one input device, and the at least one output device.

[0093] The computer programs for implementing the methods of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to the processors of a general-purpose computer, a special-purpose computer, or other programmable data processing devices, such that when the computer programs are executed by the processors, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer programs can be executed entirely on the machine, partially on the machine, as a stand-alone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0094] In the context of the present invention, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0095] To provide for interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can also be used to provide for interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0096] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0097] A computing system may include a client and a server. The client and the server are generally far from each other and usually interact via a communication network. The client-server relationship is created by computer programs running on respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system, solving the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.

[0098] It should be understood that various forms of the processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in the present invention can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved, and no limitation is imposed herein.

[0099] The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. A data polling transmission method based on a level signal, characterized in that: Applied to a bus system, including: a host module and a slave module, the method includes: The host module and each slave module monitor the level signal, and when the level signal is detected to be in a specified state, the zero time slot is determined and the polling process is started; Determine the upload time slot sequence corresponding to each slave module; A target slave module is selected from each slave module in turn based on the upload time slot sequence, and data is uploaded to the host module through the target slave module.

2. The method according to claim 1, characterized in that: The step of determining the upload time slot sequence corresponding to each slave module includes: Get the slave number of each slave module; The slave modules are arranged in ascending order of slave numbers to generate the upload time slot sequence.

3. The method according to claim 1, characterized in that: The uploading of data to the host module through the target slave module includes: Determine whether there is data in the target slave module, and if so, upload the data to the host module through the communication bus; Otherwise, the level signal is directly adjusted from the first level position to the second level position, and after continuing for a preset unit time slot, the level signal is reset to the first level position.

4. The method according to claim 3, characterized in that: The uploading of data to the host module via the communication bus includes: Adjusting the level signal from a first level position to a second level position; The data is uploaded to the host module via the communication bus, and the level signal is reset to the first level position after the upload is completed.

5. The method according to claim 3, characterized in that: The first level position is a high level, the second level position is a low level, the level signal is a high level by default, and the specified state is a high level that lasts for two preset unit time slots.

6. The method according to claim 4, characterized in that The step of adjusting the level signal from a first level position to a second level position comprises: Connecting a pin of the target slave module to a level signal line, wherein the working mode of the pin is open-drain output; The level signal line is grounded based on the pin, so that the level signal is adjusted from the first level position to the second level position.

7. The method according to claim 1, characterized in that After uploading the data to the host module through the target slave module, the method further includes: When all slave modules have completed uploading the current round of data, the level signal is reset to the first level position to start monitoring of the next round of polling zero time slot starting point.

8. A data polling transmission device based on a level signal, characterized in that: include: The level signal monitoring module is used to monitor the level signal through the host module and each slave module, and when the level signal is detected to be in a specified state, the zero time slot is determined and the polling process is started; An upload time slot sequence determination module is used to determine the upload time slot sequence corresponding to each slave module; The data polling upload module is used to select a target slave module from each slave module in turn based on the upload time slot sequence, and upload data to the host module through the target slave module.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively coupled to the at least one processor; The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method according to any one of claims 1 to 7.

10. A computer storage medium, characterized in that: The computer storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method according to any one of claims 1 to 7 when executed.