CN115708076A - Communication method, device, server and storage medium for single bus - Google Patents

Communication method, device, server and storage medium for single bus Download PDF

Info

Publication number
CN115708076A
CN115708076A CN202110956956.9A CN202110956956A CN115708076A CN 115708076 A CN115708076 A CN 115708076A CN 202110956956 A CN202110956956 A CN 202110956956A CN 115708076 A CN115708076 A CN 115708076A
Authority
CN
China
Prior art keywords
communication
target
bus
equipment
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110956956.9A
Other languages
Chinese (zh)
Inventor
卢鹏
王滨后
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Haier Smart Technology R&D Co Ltd
Haier Smart Home Co Ltd
Original Assignee
Qingdao Haier Smart Technology R&D Co Ltd
Haier Smart Home Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qingdao Haier Smart Technology R&D Co Ltd, Haier Smart Home Co Ltd filed Critical Qingdao Haier Smart Technology R&D Co Ltd
Priority to CN202110956956.9A priority Critical patent/CN115708076A/en
Publication of CN115708076A publication Critical patent/CN115708076A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Small-Scale Networks (AREA)

Abstract

The application relates to the technical field of data communication, and discloses a communication method for a single bus, which is applied to a server and comprises the steps of obtaining the current communication state of a communication bus; acquiring a first target waiting duration of target communication equipment according to the current communication state of the communication bus and communication information of the target communication equipment associated with the communication bus; acquiring a target communication state of the communication bus within the first target waiting duration; and controlling the target communication equipment to transmit data according to the target communication state. The method can avoid communication conflict of the multi-host device in the process of using the communication bus. The application also discloses a communication device, a server and a storage medium for the single bus.

Description

Communication method, device, server and storage medium for single bus
Technical Field
The present application relates to the field of data communication technologies, and for example, to a communication method, apparatus, server and storage medium for a single bus.
Background
Currently, single bus communication uses a single signal line, which not only transmits clock but also transmits data, and data transmission is bidirectional, and has the advantages of saving I/O (input/output) bus, simple resource structure, low cost, convenience for bus expansion and maintenance, and the like.
The existing single bus communication can realize the communication between a single host system and a plurality of slave nodes mounted by the host system, and because only one host system exists in the scheme, the bus conflict problem can not occur. However, in order to realize the situation that each node in the single bus communication can be used as a master and a slave, and realize the bidirectional communication of data of a plurality of nodes, the problem of data collision that a plurality of nodes simultaneously apply for using a bus in the single bus communication process must be solved.
Although a plurality of node devices can be simultaneously hung on a host system, the traditional single-bus communication scheme does not solve the problem of communication conflict among the plurality of node devices, so that the traditional single-bus communication scheme is only suitable for a single host system, namely, one host device controls one or more slave devices.
In the process of implementing the embodiments of the present disclosure, it is found that at least the following problems exist in the related art:
the existing single bus communication scheme can not solve the problem of communication conflict of multiple host devices.
Disclosure of Invention
The following presents a simplified summary in order to provide a basic understanding of some aspects of the disclosed embodiments. This summary is not an extensive overview nor is intended to identify key/critical elements or to delineate the scope of such embodiments but rather as a prelude to the more detailed description that is presented later.
The embodiment of the disclosure provides a communication method, a communication device, a server and a storage medium for a single bus, so as to avoid communication conflict during the use of a communication bus by multiple host devices.
In some embodiments, the method is applied to a server, the method comprising: acquiring the current communication state of a communication bus; acquiring a first target waiting duration of target communication equipment according to the current communication state of the communication bus and communication information of the target communication equipment associated with the communication bus; acquiring a target communication state of the communication bus within the first target waiting duration; and controlling the target communication equipment to transmit data according to the target communication state.
In some embodiments, the apparatus comprises: a processor and a memory storing program instructions, the processor being configured to, when executing the program instructions, perform a communication method for a single bus as previously described.
In some embodiments, the server comprises a data transmission device as described above.
In some embodiments, the storage medium stores program instructions that, when executed, perform a communication method for a single bus as previously described.
The communication method, the communication device, the server and the storage medium for the single bus provided by the embodiment of the disclosure can achieve the following technical effects:
the server can obtain the first target waiting time of the target communication equipment according to the current communication state of the communication bus and the communication information of the target communication equipment, and control the target communication equipment to transmit data through the communication bus according to the target communication state of the communication bus in the first target waiting time.
The foregoing general description and the following description are exemplary and explanatory only and are not restrictive of the application.
Drawings
One or more embodiments are illustrated in the accompanying drawings, which correspond to the accompanying drawings and not in a limiting sense, in which elements having the same reference numeral designations represent like elements, and in which:
FIG. 1 is a schematic diagram of a single bus communication system environment;
FIG. 2 is a schematic diagram of a communication method for a single bus according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of another communication method for a single bus according to an embodiment of the present disclosure;
fig. 4 is a schematic diagram of another communication method for a single bus according to an embodiment of the present disclosure;
FIG. 5 is a schematic diagram of another communication method for a single bus provided by an embodiment of the present disclosure;
FIG. 6 is a schematic diagram of another communication method for a single bus provided by an embodiment of the present disclosure;
FIG. 7 is a schematic diagram of an application provided by an embodiment of the present disclosure;
FIG. 8 is a schematic diagram of another application provided by an embodiment of the present disclosure;
FIG. 9 is a schematic diagram of another application provided by an embodiment of the present disclosure;
fig. 10 is a schematic diagram of a communication device for a single bus according to an embodiment of the present disclosure.
Detailed Description
So that the manner in which the features and elements of the disclosed embodiments can be understood in detail, a more particular description of the disclosed embodiments, briefly summarized above, may be had by reference to the embodiments, some of which are illustrated in the appended drawings. In the following description of the technology, for purposes of explanation, numerous details are set forth in order to provide a thorough understanding of the disclosed embodiments. However, one or more embodiments may be practiced without these details. In other instances, well-known structures and devices may be shown in simplified form in order to simplify the drawing.
The terms "first," "second," and the like in the description and in the claims, and the above-described drawings of embodiments of the present disclosure, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the present disclosure described herein may be made. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion.
The term "plurality" means two or more unless otherwise specified.
In the embodiment of the present disclosure, the character "/" indicates that the preceding and following objects are in an or relationship. For example, A/B represents: a or B.
The term "and/or" is an associative relationship that describes objects, meaning that three relationships may exist. E.g., a and/or B, represents: a or B, or A and B.
The term "correspond" may refer to an association or binding relationship, and a corresponding to B refers to an association or binding relationship between a and B.
In the embodiment of the disclosure, the intelligent household appliance is a household appliance formed by introducing a microprocessor, a sensor technology and a network communication technology into the household appliance, and has the characteristics of intelligent control, intelligent sensing and intelligent application, the operation process of the intelligent household appliance usually depends on the application and processing of modern technologies such as internet of things, internet and an electronic chip, for example, the intelligent household appliance can realize the remote control and management of a user on the intelligent household appliance by connecting the intelligent household appliance with the electronic device.
In the disclosed embodiment, the terminal device is an electronic device with a wireless connection function, and the terminal device can be in communication connection with the above intelligent household appliance by being connected to the internet, and can also be in communication connection with the above intelligent household appliance directly in a bluetooth mode, a wifi mode and the like. In some embodiments, the terminal device is, for example, a mobile device, a computer, a vehicle-mounted device built in a hovercar, or the like, or any combination thereof. The mobile device may include, for example, a cell phone, a smart home device, a wearable device, a smart mobile device, a virtual reality device, or the like, or any combination thereof, wherein the wearable device includes, for example: smart watches, smart bracelets, pedometers, and the like.
As shown in fig. 1, the single bus communication system includes a communication bus, a plurality of communication devices (R, G, B, W, O) communicatively connected to the communication bus, and a server. Each communication device can send communication data to other communication devices through the communication bus or receive the communication data transmitted by other communication devices through the communication bus. Each communication device is configured with communication information, which includes address information and latency information. The address information and the latency information of each communication device are different. The server may perform a communication method for the single bus as described below.
With reference to fig. 2, an embodiment of the present disclosure provides a communication method for a single bus, applied to a server, where the method includes:
and S01, the server acquires the current communication state of the communication bus.
And S02, the server obtains a first target waiting duration of the target communication equipment according to the current communication state of the communication bus and the communication information of the target communication equipment associated with the communication bus.
S03, the server obtains the target communication state of the communication bus in the first target waiting duration.
And S04, the server controls the target communication equipment to transmit data according to the target communication state.
By adopting the communication method for the single bus provided by the embodiment of the disclosure, the server can obtain the first target waiting time of the target communication equipment according to the current communication state of the communication bus and the communication information of the target communication equipment, and control the target communication equipment to transmit data through the communication bus according to the target communication state of the communication bus within the first target waiting time. In addition, because the target communication equipment of the method can be host equipment or slave equipment, the communication equipment associated with the communication bus can transmit data through the communication bus, and the interconnection and intercommunication among the communication equipment are realized.
The server controls the target communication device to perform data transmission according to the target communication state, and may control the target communication device to perform data transmission through the communication bus when the target communication state is continuously idle within the first target waiting duration.
In this way, the communication bus is idle within the first target waiting duration, which indicates that the communication bus is not used within the first target waiting duration, so that the target communication device can have the right of use of the communication bus, and therefore, the server controls the target communication device to perform data transmission through the communication bus.
It can be understood that when the target communication state is occupied within the first target waiting duration, it indicates that other communication devices except the target communication device acquire the right to use the communication bus, and at this time, the target communication device does not have the right to use the communication bus, and thus data transmission cannot be performed through the communication bus.
Optionally, the communication information includes latency information. With reference to fig. 3, the obtaining a first target waiting duration of a target communication device according to a current communication status of the communication bus and communication information of the target communication device associated with the communication bus includes:
s11, the server obtains the target communication information of the target communication equipment associated with the communication bus under the condition that the current communication state of the communication bus indicates that the communication bus is idle.
S12, the server extracts the first target waiting duration of the target communication equipment from the target communication information.
Therefore, when the server determines that the communication bus is idle, the communication bus is not occupied by other communication equipment currently, at the moment, the server acquires the target communication information of the target communication equipment and extracts the first target waiting time of the target communication equipment from the target communication information, so that the target communication state of the communication bus in the first target waiting time can be acquired.
With reference to fig. 4, an embodiment of the present disclosure further provides a communication method for a single bus, which is applied to a server, where the communication bus is associated with a plurality of communication devices, and waiting durations of the plurality of communication devices are different. The communication information includes latency information. The method comprises the following steps:
and S21, the server acquires the current communication state of the communication bus.
S22, the server acquires the communication information of a plurality of communication devices related to the communication bus under the condition that the current communication state of the communication bus indicates that the communication bus is idle.
And S23, the server obtains the waiting time information of the communication equipment according to the communication information of the communication equipment.
And S24, the server determines the communication equipment with the minimum waiting time information duration as the target communication equipment.
And S25, the server obtains the target communication information of the target communication equipment associated with the communication bus.
S26, the server extracts the first target waiting time of the target communication equipment from the target communication information.
S27, the server obtains the target communication state of the communication bus in the first target waiting duration.
And S28, the server controls the target communication equipment to transmit data according to the target communication state.
By adopting the communication method for the single bus provided by the embodiment of the disclosure, under the condition that the plurality of communication devices are associated with the communication bus, when the server determines that the communication bus is idle, the server acquires the communication information of the plurality of communication devices associated with the communication bus, acquires the waiting time information of the plurality of communication devices according to the communication information, and determines the communication device with the minimum waiting time as the target communication device.
It is understood that the waiting time periods of the plurality of communication devices are different. The latency may also reflect the priority of the communication bus used by the communication device. As an example, if there are two communication devices, namely a first communication device and a second communication device, and the waiting time of the first communication device is shorter than that of the second communication device, the first communication device has a higher priority than the second communication device.
With reference to fig. 5, an embodiment of the present disclosure further provides a communication method for a single bus, which is applied to a server, where the communication bus is associated with multiple communication devices, the waiting durations of the multiple communication devices are different, and address information of the multiple communication devices is different. The communication information includes latency information and address information. The method comprises the following steps:
and S31, the server acquires the current communication state of the communication bus.
S32, the server acquires the communication information of the plurality of communication devices related to the communication bus under the condition that the current communication state of the communication bus indicates that the communication bus is idle and the plurality of communication devices are determined to send communication requests to the communication bus.
And S33, the server obtains the waiting time information of the communication equipment according to the communication information of the communication equipment.
And S34, the server determines the communication equipment with the minimum waiting time information duration as the target communication equipment.
And S35, the server obtains the target communication information of the target communication equipment associated with the communication bus.
And S36, the server extracts the first target waiting duration of the target communication equipment from the target communication information.
S37, the server acquires the target communication state of the communication bus in the first target waiting duration.
And S38, the server controls the target communication equipment to transmit data according to the target communication state.
S39, the server obtains address information of the communication equipment which sends the communication request to the communication bus.
And S40, the server determines the communication equipment with the address information different from that of the target communication equipment as communication waiting equipment.
S41, the server determines a second target waiting time length of the communication waiting equipment according to the waiting time information of the communication waiting equipment, so that the communication waiting equipment performs data transmission according to the communication state of the communication bus determined by the second target waiting time length.
By adopting the communication method for the single bus provided by the embodiment of the disclosure, because the communication devices associated with the communication bus are provided with a plurality of address information and are configured with different address information, when the communication bus is idle and it is determined that the plurality of communication devices send communication requests to the communication bus, the server needs to determine the target communication device from the plurality of communication devices, and at the same time, other communication devices different from the address information of the target communication device also need to transmit data, the server obtains the address information of the communication device sending the communication request to the communication bus, determines the communication device different from the address information of the target communication device as the communication waiting device, and determines the second target waiting time length corresponding to the communication waiting device according to the waiting time information of the communication waiting device, so that the communication waiting device obtains the use condition of the communication bus within the second target waiting time length, and transmits data according to the use condition.
Optionally, the server determines that the preset conflict timeout duration is the waiting time information when determining that the plurality of communication devices send the communication request to the communication bus at the same time.
And the server determines the preset idle timeout duration as waiting time information under the condition of determining that the plurality of communication devices send communication requests to the communication bus at different moments.
Therefore, the server indicates that the communication conflicts occur to the communication devices under the condition that the server determines that the communication devices simultaneously send the communication requests to the communication bus, and at the moment, the preset conflict timeout duration is determined as the waiting time information. The server determines that the preset idle timeout duration is the waiting time information when determining that the plurality of communication devices send the communication requests to the communication bus at different moments, namely any two communication devices send the communication requests to the communication bus in advance.
It is understood that when the server determines that the plurality of communication devices simultaneously send the communication request to the communication bus, the plurality of communication devices sending the communication request to the communication bus will each wait for the preset conflict timeout period.
Optionally, the preset conflict timeout duration is obtained as follows:
t preset conflict =10+(NodeAddress&0x1F)
Wherein, t Preset conflict The unit of the preset conflict timeout duration is ms (millisecond), and the NodeAddress represents address information.&Indicating a bitwise and.
Thus, t Preset conflict Based on the lower 5 bits of the address information, and the smaller the lower 5 bits of the address information, t Preset conflict The smaller.
Understandably, 10ms ≦ t Preset conflict ≤41ms。
Optionally, the preset idle timeout duration is obtained according to the following method:
t preset idle =43+(NodeAddress&0x1F)+(PseudoRandomNumber&0x1F)
Wherein, t Preset idle The unit of the preset idle timeout duration is ms (millisecond), the pseudo random number represents pseudo random number, and 0 is less than or equal to the pseudo random number and is less than or equal to 255.
Understandably, 43ms ≦ t Preset idle ≤105ms。
Optionally, as shown in fig. 6, the controlling, by the server, the target communication device to perform data transmission according to the target communication state includes:
s51, under the condition that the target communication equipment is determined to send the communication data to the communication bus and the target communication equipment does not receive ACK (acknowledgement character) within an ACK (acknowledgement character) time period, the server controls the target communication equipment to send the communication data to the communication bus again, and the ACK is generated after the communication bus receives the communication data and is sent to the target communication equipment within the ACK time period.
And S52, under the condition that the target communication equipment is determined to receive the ACK in the ACK time period, the server determines that the communication bus receives the communication data.
And the duration of the ACK time interval is less than the duration of the waiting time information of the target communication equipment. The duration of the ACK period is greater than or equal to 6ms and less than or equal to 10ms.
Thus, when the server determines that the target communication device sends the communication data to the communication bus and the target communication device does not receive the ACK in the ACK time period, the server indicates that the target communication device fails to send the communication data.
It should be noted that, after the target communication device retransmits the communication data, if the ACK is not received within the ACK time period, the server determines that the transmission of the communication data of the target communication device fails, and the server does not control the target communication device to retransmit the communication data again.
Optionally, the communication data transmitted by the target communication device includes a plurality of data packets, and the delay time information exists between adjacent data packets.
The time length of the delay time information is less than the time length of the waiting time information of the target communication equipment.
Therefore, the time length of the delay time information is less than the time length of the waiting time information of the target communication equipment, the communication data transmitted by the target communication equipment through the communication bus can be ensured to be complete data, the interruption can not occur in the process of transmitting the communication data, and the reliability of data transmission of the communication equipment is ensured on the basis of avoiding communication conflict of multiple host equipment in the process of using the communication bus.
And the duration of the delay time information is less than or equal to 6ms.
In practical applications, fig. 7 represents the following application scenarios:
the communication device R sends communication data to the communication device B, and the communication device G sends communication data to the communication device R before the communication device B responds.
The waiting time of the waiting time information of the communication equipment B is shorter than that of the waiting time information of the communication equipment G.
The communication method for the single bus comprises the following steps:
firstly, the server acquires that the current communication state of the communication bus is idle, the communication device R acquires a first target waiting time corresponding to the communication device R, the server confirms that the communication bus is continuously idle within the first target waiting time corresponding to the communication device R, at the moment, the communication device R sends communication data to the communication device B, and the communication device B sends ACK to the communication device R within the time ACK Timeout of the ACK time period after successfully receiving the communication data.
Secondly, the server acquires that the current communication state of the communication Bus is Idle after the communication device B sends the ACK, the communication device G acquires a first target waiting Time G Bus Idle Time corresponding to the communication device G, and the server confirms that the communication Bus is continuously Idle within the first target waiting Time G Bus Idle Time, at this Time, the communication device G sends communication data to the communication device R, and the communication device R sends the ACK to the communication device G within ACK Timeout after successfully receiving the communication data.
Then, the server acquires that the current communication state of the communication Bus is Idle after the communication device R sends the ACK, the communication device B acquires a first target waiting duration B Bus Idle Time corresponding to the communication device B, and the server confirms that the communication Bus is continuously Idle within the first target waiting duration B Bus Idle Time, at this Time, the communication device B sends communication data to the communication device R, and the communication device R sends the ACK to the communication device B within the ACK Timeout after successfully receiving the communication data.
The time length of the ACK time period is less than the first target waiting time lengths of all the communication equipment, and the Inter-byte Delay information is less than the first target waiting time lengths of all the communication equipment.
Fig. 8 shows another application scenario:
the application scene is as follows: the communication devices R, G send communication requests to the communication bus at the same time.
The waiting time of the waiting time information of the communication equipment R is shorter than that of the waiting time information of the communication equipment G.
Firstly, the server determines that the communication equipment R and G simultaneously send communication requests to the communication bus, at the moment, communication conflicts occur in the communication equipment R and G, and at the moment, the preset conflict timeout duration is used as the waiting duration.
Secondly, since the preset conflict Timeout period a Collision Timeout of the communication device R is smaller than the preset conflict Timeout period G Collision Timeout of the communication device G, the server determines the communication device R as the target communication device.
Then, after the communication device R determines that the communication bus is continuously idle within the preset Collision Timeout duration a Collision Timeout, the communication device R transmits communication data to the communication device B through the communication bus, and the communication device B sends ACK to the communication device R within ACK Timeout after successfully receiving the communication data. The server acquires that the current communication state of the communication bus is idle after the communication equipment B sends the ACK, the communication equipment G transmits communication data to the communication equipment R through the communication bus after determining that the communication bus is continuously idle within the preset conflict Timeout duration G colloid Timeout, and the communication equipment R sends the ACK to the communication equipment G within the ACK Timeout after successfully receiving the communication data.
Fig. 9 shows another application scenario:
the application scene is as follows: the communication device R transmits data to the communication device B through the communication bus.
And under the condition that the communication equipment R does not receive the ACK in the ACK Timeout, the server controls the communication equipment R to transmit data to the communication equipment B again through the communication bus, and the ACK is generated after the communication bus receives the communication data and is sent to the communication equipment R in the ACK Timeout.
The server determines that the communication device R still does not receive the ACK, determines that the transmission of the communication data of the communication device R fails, and does not control the communication device R to retransmit the communication data again.
As shown in fig. 10, an embodiment of the present disclosure provides a communication apparatus for a single bus, which includes a processor (processor) 100 and a memory (memory) 101. Optionally, the apparatus may also include a Communication Interface (Communication Interface) 102 and a bus 103. The processor 100, the communication interface 102, and the memory 101 may communicate with each other via a bus 103. The communication interface 102 may be used for information transfer. The processor 100 may call logic instructions in the memory 101 to perform the communication method for the single bus of the above-described embodiment.
In addition, the logic instructions in the memory 101 may be implemented in the form of software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products.
The memory 101, which is a computer-readable storage medium, may be used for storing software programs, computer-executable programs, such as program instructions/modules corresponding to the methods in the embodiments of the present disclosure. The processor 100 executes functional applications and data processing, i.e., implements the communication method for the single bus in the above-described embodiments, by executing program instructions/modules stored in the memory 101.
The memory 101 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal device, and the like. In addition, memory 101 may include high speed random access memory and may also include non-volatile memory.
The embodiment of the disclosure provides a server, which comprises the communication device for the single bus.
Embodiments of the present disclosure provide a computer-readable storage medium storing computer-executable instructions configured to perform the above-described communication method for a single bus.
The disclosed embodiments provide a computer program product comprising a computer program stored on a computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, cause the computer to perform the above-described communication method for a single bus.
The computer readable storage medium described above may be a transitory computer readable storage medium or a non-transitory computer readable storage medium.
The technical solution of the embodiments of the present disclosure may be embodied in the form of a software product, which is stored in a storage medium and includes one or more instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present disclosure. And the aforementioned storage medium may be a non-transitory storage medium comprising: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes, and may also be a transient storage medium.
The above description and the drawings sufficiently illustrate embodiments of the disclosure to enable those skilled in the art to practice them. Other embodiments may incorporate structural, logical, electrical, process, and other changes. The examples merely typify possible variations. Individual components and functions are optional unless explicitly required, and the sequence of operations may vary. Portions and features of some embodiments may be included in or substituted for those of others. Furthermore, the words used in the specification are words of description for example only and are not limiting upon the claims. As used in the description of the embodiments and the claims, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. Similarly, the term "and/or" as used in this application is meant to encompass any and all possible combinations of one or more of the associated listed. Furthermore, the terms "comprises" and/or "comprising," when used in this application, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. Without further limitation, an element defined by the phrase "comprising one of 8230," does not exclude the presence of additional like elements in a process, method or device comprising the element. In this document, each embodiment may be described with emphasis on differences from other embodiments, and the same and similar parts between the respective embodiments may be referred to each other. For methods, products, etc. of the embodiment disclosures, reference may be made to the description of the method section for relevance if it corresponds to the method section of the embodiment disclosure.
Those of skill in the art would appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software may depend upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the disclosed embodiments. It can be clearly understood by the skilled person that, for convenience and brevity of description, the specific working processes of the system, the apparatus and the unit described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments disclosed herein, the disclosed methods, products (including but not limited to devices, apparatuses, etc.) may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units may be only one type of logical functional division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form. The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to implement the present embodiment. In addition, functional units in the embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. In the description corresponding to the flowcharts and block diagrams in the figures, operations or steps corresponding to different blocks may also occur in different orders than disclosed in the description, and sometimes there is no specific order between the different operations or steps. For example, two sequential operations or steps may in fact be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved. Each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.

Claims (10)

1. A communication method for a single bus, applied to a server, the method comprising:
acquiring the current communication state of a communication bus;
acquiring a first target waiting duration of target communication equipment according to the current communication state of the communication bus and communication information of the target communication equipment associated with the communication bus;
acquiring a target communication state of the communication bus within the first target waiting duration;
and controlling the target communication equipment to transmit data according to the target communication state.
2. The method of claim 1, wherein the communication information includes latency information, and the obtaining a first target latency of a target communication device according to a current communication status of the communication bus and communication information of the target communication device associated with the communication bus comprises:
under the condition that the current communication state of the communication bus indicates that the communication bus is idle, acquiring target communication information of target communication equipment associated with the communication bus;
and extracting the first target waiting time of the target communication equipment from the target communication information.
3. The method of claim 2, wherein the communication bus is associated with a plurality of communication devices, and wherein the plurality of communication devices have different wait durations, and before obtaining the target communication information of the target communication device associated with the communication bus, the method further comprises:
acquiring communication information of a plurality of communication devices associated with the communication bus;
according to the communication information of the communication equipment, obtaining the waiting time information of the communication equipment;
and determining the communication equipment with the minimum waiting time information duration as the target communication equipment.
4. The method according to claim 3, wherein the communication information further includes address information, the address information of the plurality of communication devices is different, and in a case where it is determined that a plurality of communication devices send communication requests to the communication bus, after determining that the communication device having the smallest duration of the latency information is the target communication device, the method further includes:
acquiring address information of communication equipment which sends the communication request to the communication bus;
determining communication equipment with address information different from that of the target communication equipment as communication waiting equipment;
and determining a second target waiting time length of the communication waiting equipment according to the waiting time information of the communication waiting equipment, so that the communication waiting equipment performs data transmission according to the communication state of the communication bus determined by the second target waiting time length.
5. The method of claim 3,
under the condition that a plurality of communication devices are determined to send communication requests to the communication bus at the same time, determining preset conflict timeout duration as the waiting time information;
and under the condition that the communication requests are sent to the communication bus by the plurality of communication devices at different moments, determining preset idle timeout duration as the waiting time information.
6. The method according to any one of claims 2 to 5, wherein the controlling the target communication device to perform data transmission according to the target communication state comprises:
under the condition that the target communication equipment is determined to send communication data to the communication bus and the target communication equipment does not receive ACK (acknowledgement) in an ACK (acknowledgement) time period, controlling the target communication equipment to send the communication data to the communication bus again, wherein the ACK is generated after the communication bus receives the communication data and is sent to the target communication equipment in the ACK time period;
under the condition that the target communication equipment is determined to receive the ACK in the ACK time period, determining that the communication bus receives the communication data;
and the duration of the ACK time period is less than the duration of the waiting time information of the target communication equipment.
7. The method according to any one of claims 2 to 5, wherein the communication data transmitted by the target communication device comprises a plurality of data packets and the delay time information is provided between adjacent data packets;
the time length of the delay time information is less than the time length of the waiting time information of the target communication equipment.
8. A communication apparatus for a single bus, comprising a processor and a memory storing program instructions, wherein the processor is configured to execute the communication method for a single bus according to any one of claims 1 to 7 when executing the program instructions.
9. A server, characterized in that it comprises a data transmission device according to claim 8.
10. A storage medium storing program instructions which, when executed, perform the communication method for a single bus of any one of claims 1 to 7.
CN202110956956.9A 2021-08-19 2021-08-19 Communication method, device, server and storage medium for single bus Pending CN115708076A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110956956.9A CN115708076A (en) 2021-08-19 2021-08-19 Communication method, device, server and storage medium for single bus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110956956.9A CN115708076A (en) 2021-08-19 2021-08-19 Communication method, device, server and storage medium for single bus

Publications (1)

Publication Number Publication Date
CN115708076A true CN115708076A (en) 2023-02-21

Family

ID=85212792

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110956956.9A Pending CN115708076A (en) 2021-08-19 2021-08-19 Communication method, device, server and storage medium for single bus

Country Status (1)

Country Link
CN (1) CN115708076A (en)

Similar Documents

Publication Publication Date Title
CN101484873B (en) Simultaneous interface use
JP2010272971A (en) Control system and method for rewriting control program
EP3502908B1 (en) Spi-based data transmission method and device
US6449289B1 (en) Multi-processor bus protocol system
CN115941102B (en) Method for synchronous communication between controllers connected with MCU and FPGA by SPI
CN107947906B (en) Slave device
CN104461978B (en) Method and device for unidirectional data transmission
KR102303424B1 (en) Direct memory access control device for at least one processing unit having a random access memory
CN113641610A (en) Processor interface circuit, time-sharing multiplexing method of processor interface and electronic equipment
CN103885910B (en) The method that many equipment carry out IIC communications under holotype
CN115708076A (en) Communication method, device, server and storage medium for single bus
CN116566761A (en) SPI dual-host sharing arbitration system and method
US11803494B2 (en) Data communication method, master device and system
CN115065966B (en) Terminal and communication method
KR101857088B1 (en) Remote Input/output apparatus having return circuit and method for interfacing internal bus thereof
CN113961497A (en) Communication circuit system, method, chip and storage medium
CN111400213A (en) Method, device and system for transmitting data
CN115604366B (en) Method and device for data transmission, near field communication chip and storage medium
KR102251494B1 (en) A PLC extension module interface method using Multi Drop serial communication
CN114490454B (en) Method and device for self-adaptive driving of equipment serial port and serial port equipment
KR101876636B1 (en) Apparatus and Method for transmitting/receiving message
CN110554984B (en) CPLD-based serial port bridging method and system
CN117674910A (en) Data receiving method for NFC equipment and NFC equipment
CN117008968A (en) Control method, control device, communication equipment, electronic equipment and medium
EP3547617A1 (en) Modular ups system, and data transmission method for power devices

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication