A method and device for adjusting power line signal transmission rate
By implementing a signal transmission rate adjustment method in the power line system, using debugging mode and confirmation code to build communication enhanced frames, dynamically adjusting the slave communication rate, the problem of signal distortion and communication rate limit in the power line system is solved, and the slave is realized Adaptive communication rate adjustment and flexible system adaptation.
Patent Information
- Application Number
- CN202311817825.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-27
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2043-12-27
AI Technical Summary
During long-distance transmission of existing power cord technology, the signal distortion is severe, and the communication rate is difficult to meet the needs of different systems, resulting in a limitation of the number of slaves and distance.
By implementing a signal transmission rate adjustment method in the host of the power line system, the communication enhancement frame is constructed using debug mode and preset confirmation codes, and the communication rate of the slave is dynamically adjusted to match the performance and system requirements of different slaves.
The adaptive communication rate adjustment of slaves in the power line system is realized, ensuring that each slave can transmit and receive signal data normally and efficiently, and adapt to the working environment and construction requirements of different systems.
Smart Images

Figure CN117792574B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the technical field of power line transmission rate, and in particular to a method and device for adjusting the power line signal transmission rate. Background Art
[0002] Power line technology is a technology that combines two power lines and two signal lines into two lines to achieve signal and power sharing. It saves construction and cable costs and brings great convenience to on-site construction and later maintenance. It has been widely used in fire protection, instrumentation, sensors, industrial control and other fields. It uses voltage pulse width modulation technology for downlink and current loop modulation technology for uplink.
[0003] As power line technology develops towards intelligence, networking, and multifunctionality, it is required that the more slave controllers or components can be connected to a power line loop, the better, and the longer the communication distance, the better. Due to the parasitic line resistance and line capacitance of the power line, the longer the communication distance, the more serious the pulse width signal distortion, and the greater the voltage drop. These effects are most obvious at the slave at the end of the long line, such as Figure 1 and Figure 2 As shown. In the actual system deployment process, some systems require fast communication speed, narrow pulse width, and no special requirements for the number and distance of slaves; some systems require a large number of slaves and a long distance, and no particularly high requirements for speed. In this regard, it is necessary to customize and develop power line systems with different working environments and construction requirements according to different system requirements. This requirement also poses a great challenge to the development and research and development of the system. Summary of the invention
[0004] The present invention provides a method and device for adjusting the transmission rate of a power line signal, which can adaptively adjust the transmission rates of different channels in the power line signal according to actual needs.
[0005] In order to solve the above technical problems, an embodiment of the present invention provides a method for adjusting the transmission rate of a power line signal, which is applied to a host of a power line system, wherein the power line system is composed of a host and a slave cluster mounted on a power line, and is characterized in that the method for adjusting the transmission rate of a power line signal comprises:
[0006] In response to triggering of the debugging mode, sending a debugging instruction to the slave cluster based on a first communication rate, so that the slave cluster enters the debugging mode;
[0007] constructing a communication enhancement frame based at least on a preset confirmation code, wherein the confirmation code is used by the slave to determine a second communication rate used by the master when sending the communication enhancement frame, wherein the second communication rate is not less than the first communication rate;
[0008] Sending the communication enhancement frame to the slave cluster based on a second communication rate, and obtaining first feedback information generated by a first slave based on the communication enhancement frame, wherein the first slave is one or more slaves in the slave cluster;
[0009] Verifying the first feedback information, and determining a second slave from the first slave that can correctly parse the content of the communication enhancement frame based on the verification result, wherein the second slave is a slave that can communicate based on a second communication rate;
[0010] The second communication rate and the second slave are matched and recorded to control the channel in the power line connected to the second slave to transmit data based on the second communication rate, and to notify the second slave to operate based on the second communication rate.
[0011] As an optional embodiment, the method further includes:
[0012] After power-on, a group inspection frame is sent to the slave cluster at a third communication rate, and second feedback information fed back by some or all slaves in the slave cluster in response to the group inspection frame is obtained, wherein the second feedback information indicates that the slave is currently in an online state;
[0013] Determine a slave in an online state based on the second feedback information;
[0014] When the ratio of the online slaves to the slave cluster meets a preset threshold, it is determined that a trigger condition for the debugging mode is met.
[0015] As an optional embodiment, the method further includes:
[0016] In a normal operating state, determining the number of third feedback information received within a preset period of time, each of the third feedback information corresponds to one of the slaves;
[0017] When the proportion of the amount of the third feedback information relative to the total number of slaves in the slave cluster meets a preset threshold, determining that the triggering condition of the debugging mode is met; or
[0018] The time length from the current time to the end time of the last debugging mode is determined, and when the time length matches a preset debugging cycle, it is determined that the triggering condition of the debugging mode is met.
[0019] As an optional embodiment, constructing a communication enhancement frame at least based on a preset confirmation code includes:
[0020] Determine the confirmation code based at least on the second communication rate, the confirmation code consisting of one or more 0s and 1s;
[0021] The communication enhancement frame is constructed based on a preset format in combination with the confirmation code, and the preset format includes a frame header, a confirmation code, a frame type, an address, data, and a slave return code area.
[0022] As an optional embodiment, the verifying the first feedback information includes:
[0023] Verifying whether the format of the first feedback information is the preset format;
[0024] If so, verify whether the corresponding slave return code area in the first feedback information contains information about the frame type, address, and data returned by the slave. The frame type, address, and data information are obtained by the slave by parsing the content of the communication enhancement frame according to the second communication rate. The second communication rate is determined by measuring the pulse width of the confirmation code.
[0025] As an optional embodiment, the method further includes:
[0026] determining a fourth slave that has not fed back the first feedback information, and a fifth slave that has fed back the first feedback information but failed to verify it;
[0027] Based on the second communication rate, the rate is reduced by different proportions to form a fourth communication rate corresponding to the fourth slave and a fifth rate corresponding to the fifth slave;
[0028] updating the confirmation code based on the fourth communication rate and the fifth communication rate, and constructing a new communication enhancement frame based on the updated confirmation code, so as to detect the fourth slave and the fifth slave again based on the new communication enhancement frame, and obtain verification results of corresponding feedback information;
[0029] If the verification result indicates that the verification is successful, the fourth communication rate and the fourth slave are matched and recorded to control the channel connected to the fourth slave in the power line to transmit data based on the fourth communication rate, and the fifth communication rate and the fifth slave are matched and recorded to control the channel connected to the fifth slave in the power line to transmit data based on the fifth communication rate.
[0030] If the verification result indicates that the verification fails, the above steps are repeated until a communication rate that matches the fourth slave and a communication rate that matches the fifth slave are determined.
[0031] Another embodiment of the present invention also provides a method for adjusting the transmission rate of a power line signal, which is applied to a slave of a power line system. The power line system is composed of a host mounted on a power line and a slave cluster. The slave is any slave in the slave cluster. The method for adjusting the transmission rate of a power line signal includes:
[0032] In response to a debug instruction, entering a debug mode;
[0033] Obtain a communication enhancement frame, and calculate a second communication rate through a confirmation code in the communication enhancement frame, where the second communication rate is a transmission rate of the communication enhancement frame;
[0034] updating its own communication rate based on the second communication rate;
[0035] Parsing the content recorded in the communication enhancement frame at the second communication rate to obtain a parsing result, wherein the parsing result includes a first result corresponding to a successful parsing;
[0036] generating first feedback information based on the first result, and feeding back the first feedback information to the host at the second communication rate;
[0037] In response to the received notification information indicating operation at the second communication rate, it is determined to operate based on the second communication rate.
[0038] As an optional embodiment, the method further includes:
[0039] A group patrol frame is obtained, and second feedback information indicating that the host itself is in an online state is fed back to the host.
[0040] Another embodiment of the present invention further provides a power line signal transmission rate adjustment device, which is applied to a host of a power line system, wherein the power line system is composed of a host and a slave cluster mounted on the power line, and the power line signal transmission rate adjustment method includes:
[0041] A first response module, configured to respond to triggering of the debugging mode and send a debugging instruction to the slave cluster based on a first communication rate, so that the slave cluster enters the debugging mode;
[0042] A first construction module, configured to construct a communication enhancement frame based at least on a preset confirmation code, wherein the confirmation code is used by the slave to determine a second communication rate used by the master when sending the communication enhancement frame, wherein the second communication rate is not less than the first communication rate;
[0043] A first transceiver module, configured to send the communication enhancement frame to the slave cluster at a second communication rate, and obtain first feedback information generated by a first slave based on the communication enhancement frame, wherein the first slave is one or more slaves in the slave cluster;
[0044] a first processing module, configured to verify the first feedback information, and determine, based on the verification result, from the first slave a second slave capable of correctly parsing the content of the communication enhancement frame, wherein the second slave is a slave capable of communicating based on a second communication rate;
[0045] The first control module matches and records the second communication rate and the second slave, so as to control the channel in the power line connected to the second slave to transmit data based on the second communication rate, and notify the second slave to operate based on the second communication rate.
[0046] Another embodiment of the present invention further provides a power line signal transmission rate adjustment device, which is applied to a slave of a power line system, wherein the power line system is composed of a host mounted on the power line and a slave cluster, wherein the slave is any slave in the slave cluster, and the power line signal transmission rate adjustment method comprises:
[0047] A second response module, configured to enter a debugging mode in response to a debugging instruction;
[0048] A second obtaining module, used to obtain a communication enhancement frame, and calculate a second communication rate through a confirmation code in the communication enhancement frame, where the second communication rate is a transmission rate of the communication enhancement frame;
[0049] A second updating module, configured to update its own communication rate according to the second communication rate;
[0050] A second parsing module, configured to parse the content recorded in the communication enhancement frame at the second communication rate to obtain a parsing result, wherein the parsing result includes a first result corresponding to a successful parsing;
[0051] a second generating module, configured to generate first feedback information according to the first result, and feed back the first feedback information to the host at the second communication rate;
[0052] A second determining module is configured to determine to operate based on the second communication rate in response to the received notification information indicating to operate at the second communication rate.
[0053] Based on the disclosure of the above embodiments, it can be known that the beneficial effects of the embodiments of the present invention include enabling the host to adaptively adjust the power line transmission rate of each slave in the slave cluster, so that each slave has a corresponding matching communication rate, thereby ensuring that the transmission rate can match the performance of each corresponding slave, thereby ensuring that each slave can normally and efficiently send and receive signal data. In addition, corresponding to power line systems with different configurations, the communication rate requirements are different. In this regard, the scheme of this embodiment can also meet the requirements and realize the matching adjustment of the communication rates of different slaves, that is, it can realize the matching adjustment of the communication rates of different slaves according to different system requirements, so as to obtain a power line system that meets different working environments and construction requirements. The overall flexibility of the scheme is strong, the scope of application is wide, and after the rate is adjusted, each slave can operate stably, effectively ensuring that the power line system can still operate normally after the rate adjustment.
[0054] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings.
[0055] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0057] Figure 1 This is a block diagram of the power line system in the existing solution.
[0058] Figure 2 Schematic diagram of power line pulse width signal distortion and voltage drop in existing solutions.
[0059] Figure 3 4 is a flow chart of a method for adjusting a power line signal transmission rate in an embodiment of the present invention.
[0060] Figure 4 FIG. 4 is a flow chart of a method for adjusting a power line signal transmission rate in another embodiment of the present invention.
[0061] Figure 5 FIG. 4 is a diagram showing the internal structure of a slave device in a power line system in an embodiment of the present invention.
[0062] Figure 6 4 is a structural block diagram of a power line signal transmission rate adjustment device in an embodiment of the present invention.
[0063] Figure 7 FIG. 4 is a structural block diagram of a power line signal transmission rate adjustment device in another embodiment of the present invention. DETAILED DESCRIPTION
[0064] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings, but are not intended to limit the present invention.
[0065] It should be understood that various modifications may be made to the embodiments disclosed herein. Therefore, the following description should not be considered as limiting, but merely as an example of an embodiment. Other modifications within the scope and spirit of the present disclosure will occur to those skilled in the art.
[0066] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present disclosure and, together with the general description of the present disclosure given above and the detailed description of the embodiments given below, serve to explain the principles of the present disclosure.
[0067] These and other characteristics of the invention will become apparent from the following description of a preferred form of embodiment given as a non-limiting example, with reference to the accompanying drawings.
[0068] It should also be understood that, although the invention has been described with reference to some specific examples, those skilled in the art will be able to realize many other equivalent forms of the invention that have the characteristics recited in the claims and are therefore within the scope of protection defined thereby.
[0069] The above and other aspects, features and advantages of the present disclosure will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings.
[0070] Specific embodiments of the present disclosure are described hereinafter with reference to the accompanying drawings; however, it should be understood that the disclosed embodiments are merely examples of the present disclosure, which may be implemented in a variety of ways. Well-known and / or repeated functions and structures are not described in detail to avoid obscuring the present disclosure with unnecessary or redundant details. Therefore, the specific structural and functional details disclosed herein are not intended to be limiting, but merely serve as a basis and representative basis for the claims to teach those skilled in the art to use the present disclosure in a variety of ways with substantially any suitable detailed structure.
[0071] This specification may use the phrases "in one embodiment," "in another embodiment," "in a further embodiment," or "in other embodiments," all of which may refer to one or more of the same or different embodiments according to the present disclosure.
[0072] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0073] like Figure 3 As shown, an embodiment of the present invention provides a method for adjusting the transmission rate of a power line signal, which is applied to a host of a power line system, wherein the power line system is composed of a host and a slave cluster mounted on the power line, and the method for adjusting the transmission rate of a power line signal includes:
[0074] S1: in response to triggering of the debugging mode, sending a debugging instruction to the slave cluster based on a first communication rate, so that the slave cluster enters the debugging mode;
[0075] S2: constructing a communication enhancement frame based at least on a preset confirmation code, wherein the confirmation code is used by the slave to determine a second communication rate used by the master when sending the communication enhancement frame, wherein the second communication rate is not less than the first communication rate;
[0076] S3: sending the communication enhancement frame to the slave cluster based on the second communication rate, and obtaining first feedback information generated by a first slave based on the communication enhancement frame, where the first slave is one or more slaves in the slave cluster;
[0077] S4: verifying the first feedback information, and determining a second slave from the first slave that can correctly parse the content of the communication enhancement frame based on the verification result, wherein the second slave is a slave that can communicate based on the second communication rate;
[0078] S5: Match and record the second communication rate and the second slave, so as to control the channel in the power line connected to the second slave to transmit data based on the second communication rate, and notify the second slave to operate based on the second communication rate.
[0079] Based on the above embodiments, it can be known that the scheme described in this embodiment enables the host to adaptively adjust the power line transmission rate of each slave in the slave cluster, so that each slave has a corresponding matching communication rate, thereby ensuring that the transmission rate can match the performance of each corresponding slave, thereby ensuring that each slave can normally and efficiently send and receive signal data. In addition, corresponding to power line systems with different configurations, the communication rate requirements are different. In this regard, the scheme of this embodiment can also meet and achieve matching adjustment of the communication rates of different slaves, that is, it can achieve matching adjustment of the communication rates of different slaves according to different system requirements, so as to obtain a power line system that meets different working environments and construction requirements. The overall flexibility of the scheme is strong, the scope of application is wide, and after the rate is adjusted, each slave can operate stably, effectively ensuring that the power line system can still operate normally after the rate adjustment.
[0080] Furthermore, the method further comprises:
[0081] S6: after power-on, sending a group inspection frame to the slave cluster at a third communication rate, and obtaining second feedback information fed back by some or all slaves in the slave cluster in response to the group inspection frame, wherein the second feedback information indicates that the slave is currently in an online state;
[0082] S7: Determine the slave in the online state based on the second feedback information;
[0083] S8: When the ratio of the online slaves to the slave cluster meets a preset threshold, determine that a trigger condition for the debugging mode is met.
[0084] For example, after power-on, the host can first send a group inspection frame at a third communication rate to collect online device information on the bus (power line), that is, determine which slaves are online, and count the number of online devices. At the same time, the slave identity, such as the slave code, can also be determined. The third communication rate is not specific, and the inspection frame communication rate at the last power-on can be used, or it can be customized, such as setting a slower communication rate, or setting a relatively faster communication rate, etc., which is specific. When the status of the online slave device is confirmed, the host can issue a debugging instruction, such as by broadcasting a command, to notify all online slave devices to enter the debugging mode.
[0085] The response to the triggering of the debug mode described in the above embodiment refers to that the current system state satisfies the triggering conditions of the debug mode. There is no unique specific implementation method for what circumstances will satisfy the triggering conditions. In this embodiment, the slaves in the online state are compared with the total number of slaves in the original slave cluster, such as calculating the proportion. If the ratio between the current number of online slaves and the total number of slaves meets the preset threshold representing the system abnormality, the host can determine that there may be a situation in the current power line system, that is, some slave devices may be online, but due to the limitation of the communication rate, they cannot feedback information, or they cannot parse the information and realize feedback, etc. Therefore, the host will determine that the current system state meets the triggering conditions of the debug mode and the communication rate of the slave needs to be adjusted.
[0086] As for the determination of the triggering condition, in another embodiment, the method further includes:
[0087] S9: Under normal operating conditions, determining the number of third feedback information received within a preset period of time, each of the third feedback information corresponds to one of the slaves;
[0088] S10: when the proportion of the amount of the third feedback information relative to the total number of slaves in the slave cluster meets a preset threshold, determining that a trigger condition for the debugging mode is met; or
[0089] S11: Determine the time length from the current moment to the end moment of the last debugging mode, and when the time length matches a preset debugging cycle, determine that the triggering condition of the debugging mode is met.
[0090] That is, when the host finds that there is a communication anomaly in the slave in the system for a period of time, it automatically sends a command to enter the debugging mode, so that both the host and the slave enter the debugging mode, and then adjusts the pulse width appropriately through the aforementioned method, that is, adjusts the communication rate to ensure that all slaves can send and receive signals normally and communicate normally. Alternatively, a debugging cycle is set. Every time a debugging is completed and normal operation is started, the host starts timing. When the timing duration matches the debugging cycle, it automatically enters the debugging mode and notifies the slave to enter the debugging mode. Alternatively, after the host obtains the command input by the debugger, it responds to the input command, controls itself to enter the debugging mode, and notifies the slave in the system to enter the debugging mode.
[0091] Furthermore, in this embodiment, the construction of a communication enhancement frame based at least on a preset confirmation code includes:
[0092] S12: determining the confirmation code based at least on the second communication rate, the confirmation code consisting of one or more 0s and 1s;
[0093] S13: Based on a preset format, the communication enhancement frame is constructed in combination with the confirmation code, and the preset format includes a frame header, a confirmation code, a frame type, an address, data, and a slave return code area.
[0094] The synchronization confirmation code is a specific content, such as 10101, etc. Each 1 and 0 has a corresponding code width. The slave can determine the communication rate by calculating and measuring the code element width of the confirmation code, that is, determine the communication rate for sending the communication enhancement frame.
[0095] When verifying the first feedback information, it includes:
[0096] S14: Verifying whether the format of the first feedback information is the preset format;
[0097] S15: If so, verify whether the part of the first feedback information corresponding to the slave return code area contains the information about the frame type, address, and data returned by the slave, and the frame type, address, and data information are obtained by the slave by parsing the content of the communication enhancement frame according to the second communication rate, and the second communication rate is determined by measuring the pulse width of the confirmation code.
[0098] For example, during verification, first verify whether the first feedback information is configured in the format of the frame header, confirmation code, frame type, address, data, and slave return code area. If so, further verify the correctness of the content in the slave return code area of the first feedback information, that is, whether the data in this part is the correct frame type, address, and data. For the information in the slave return code area, after the slave calculates and determines the second communication rate through the confirmation code, the content after the confirmation code in the communication enhancement frame is parsed based on the second communication rate to obtain the corresponding return code data.
[0099] Specifically, Figure 5 As shown, in this embodiment, after receiving the instruction that the bus enters the debug mode, multiple slaves on the bus are converted into the debug mode. The rate detection engine in the slave chip counts the high level and low level and the confirmation code in the signal frame waveform through the clock, and calculates the pulse width of the synchronization confirmation code issued by the host. Then, the rate control module in the slave chip averages the multiple pulse widths to obtain the communication rate of this frame, that is, the second communication rate, and records it to adjust the rate setting of the RX receiving module and the TX sending module according to this communication rate. After the slave updates the rate configuration, it will parse the instruction content after the confirmation code in the communication enhancement frame according to the new rate setting, and return the code based on the parsing result. If the parsing fails, there is no return code. After the host obtains the first feedback information fed back by the slave, it verifies its format and content in turn. When all verifications are successful, it can be determined that the slave providing the first feedback information is a device that can realize communication based on the second communication rate, and for the slave that fails to feedback the first feedback information, and the slave corresponding to the first feedback information that fails to verify, it is determined that it is a device that cannot communicate at the second communication rate. At this time, the host will match and record the second slaves that support the second communication rate and the second communication rate, so as to realize data transmission based on the second communication rate based on the channels corresponding to each second slave in this control bus. That is, when the host issues instructions, it will control the corresponding channels based on the second communication rate to realize the transmission of instructions.
[0100] In addition, for the setting of the second communication rate, the host can determine it based on power system requirements, communication requirements input by the package user, etc., or it can be determined according to the default configuration value or the value specified by the user, which is not unique.
[0101] Furthermore, for a slave that does not support running the second communication rate, it is necessary to find a communication rate that matches the slave. To this end, the method in this embodiment further includes:
[0102] S16: determining a fourth slave that has not fed back the first feedback information, and a fifth slave that has fed back the first feedback information but failed to verify the feedback;
[0103] S17: based on the second communication rate, lowering the rate by different proportions to form a fourth communication rate corresponding to the fourth slave and a fifth rate corresponding to the fifth slave;
[0104] S18: updating the confirmation code based on the fourth communication rate and the fifth communication rate, and constructing a new communication enhancement frame based on the updated confirmation code, so as to detect the fourth slave and the fifth slave again based on the new communication enhancement frame, and obtain verification results of corresponding feedback information;
[0105] S1: If the verification result indicates that the verification is successful, the fourth communication rate and the fourth slave are matched and recorded to control the channel in the power line connected to the fourth slave to transmit data based on the fourth communication rate, and the fifth communication rate and the fifth slave are matched and recorded to control the channel in the power line connected to the fifth slave to transmit data based on the fifth communication rate.
[0106] S19: If the verification result indicates that the verification has failed, the above steps are repeated until a communication rate that matches the fourth slave and a communication rate that matches the fifth slave are determined.
[0107] The above scheme in this embodiment refers to the device that the fourth slave is determined by verification to be a device that cannot be identified at all, or cannot normally send and receive enhanced communication frames, and the fifth slave is a device that can send and receive enhanced communication frames, but cannot accurately learn the data content. It can be seen that the communication rate adapted by the fourth slave is less than the communication rate adapted by the fifth slave. Accordingly, the host will make different adjustments based on the second communication rate to form the fourth communication rate and the fifth communication rate respectively, and then the host will debug the fourth slave and the fifth slave at the fourth communication rate and the fifth communication rate based on the aforementioned content to verify whether the fourth slave and the fifth slave support the new communication rate. If supported, the relationship between the slave and the corresponding rate is matched and recorded to provide a basis for subsequent use. If not supported, the second communication rate can be adjusted to generate the sixth communication rate and the seventh communication rate, or the fourth communication rate and the fifth communication rate can be adjusted to generate the sixth communication rate and the seventh communication rate, and the corresponding slave can be debugged again until the matching communication rate is determined.
[0108] like Figure 4 As shown, another embodiment of the present invention also provides a method for adjusting the transmission rate of a power line signal, which is applied to a slave of a power line system. The power line system is composed of a host and a slave cluster mounted on the power line. The slave is any slave in the slave cluster. The method for adjusting the transmission rate of a power line signal includes:
[0109] S01: In response to a debugging instruction, entering a debugging mode;
[0110] S02: Obtain a communication enhancement frame, and calculate a second communication rate through a confirmation code in the communication enhancement frame, where the second communication rate is a transmission rate of the communication enhancement frame;
[0111] S03: updating its own communication rate based on the second communication rate;
[0112] S04: parsing the content recorded in the communication enhancement frame at the second communication rate to obtain a parsing result, wherein the parsing result includes a first result corresponding to a successful parsing;
[0113] S05: generating first feedback information based on the first result, and feeding back the first feedback information to the host at the second communication rate;
[0114] S06: In response to the received notification information indicating operation at the second communication rate, determining to operate based on the second communication rate.
[0115] For example, Figure 5 As shown, in this embodiment, after receiving the instruction that the bus enters the debug mode, multiple slaves on the bus are converted into the debug mode. The rate detection engine in the slave chip counts the high level and low level and the confirmation code in the signal frame waveform through the clock, and calculates the pulse width of the synchronization confirmation code issued by the host. Then, the rate control module in the slave chip averages the multiple pulse widths to obtain the communication rate of this frame, that is, the second communication rate, and records it to adjust the rate setting of the RX receiving module and the TX sending module according to this communication rate. After the slave updates the rate configuration, it will parse the instruction content after the confirmation code in the communication enhancement frame according to the new rate setting, and return the code based on the parsing result. If the parsing fails, there is no return code. After the host obtains the first feedback information fed back by the slave, it verifies its format and content in turn. When all verifications are successful, it can be determined that the slave providing the first feedback information is a device that can realize communication based on the second communication rate, and for the slave that fails to feedback the first feedback information, and the slave corresponding to the first feedback information that fails to verify, it is determined that it is a device that cannot communicate at the second communication rate. At this time, the host will match and record the second slaves that support the second communication rate and the second communication rate, so as to realize data transmission based on the second communication rate based on the channels corresponding to each second slave in this control bus. That is, when the host issues instructions, it will control the corresponding channels based on the second communication rate to realize the transmission of instructions.
[0116] The method further comprises:
[0117] S07: Obtain a group patrol frame, and feed back second feedback information indicating that the host itself is in an online state to the host.
[0118] like Figure 6 As shown, another embodiment of the present invention further provides a power line signal transmission rate adjustment device, which is applied to a host of a power line system, wherein the power line system is composed of a host and a slave cluster mounted on the power line, and the power line signal transmission rate adjustment method includes:
[0119] A first response module, configured to respond to triggering of the debugging mode and send a debugging instruction to the slave cluster based on a first communication rate, so that the slave cluster enters the debugging mode;
[0120] A first construction module, configured to construct a communication enhancement frame based at least on a preset confirmation code, wherein the confirmation code is used by the slave to determine a second communication rate used by the master when sending the communication enhancement frame, wherein the second communication rate is not less than the first communication rate;
[0121] A first transceiver module, configured to send the communication enhancement frame to the slave cluster at a second communication rate, and obtain first feedback information generated by a first slave based on the communication enhancement frame, wherein the first slave is one or more slaves in the slave cluster;
[0122] a first processing module, configured to verify the first feedback information, and determine, based on the verification result, from the first slave a second slave capable of correctly parsing the content of the communication enhancement frame, wherein the second slave is a slave capable of communicating based on a second communication rate;
[0123] The first control module matches and records the second communication rate and the second slave, so as to control the channel in the power line connected to the second slave to transmit data based on the second communication rate, and notify the second slave to operate based on the second communication rate.
[0124] As an optional embodiment, the device further includes:
[0125] A patrol module, configured to send a group patrol frame to the slave cluster at a third communication rate after power-on, and obtain second feedback information fed back by some or all slaves in the slave cluster in response to the group patrol frame, wherein the second feedback information indicates that the slave is currently in an online state;
[0126] A first determining module, configured to determine a slave in an online state according to the second feedback information;
[0127] The second determining module is used to determine that a triggering condition of a debugging mode is met when the ratio of the online slaves to the slave cluster meets a preset threshold.
[0128] As an optional embodiment, the device further includes:
[0129] A third determination module, used for determining, in a normal operating state, the number of third feedback information received within a preset period of time, each of the third feedback information corresponding to one of the slaves;
[0130] A fourth determination module, configured to determine that a trigger condition for a debugging mode is satisfied when a proportion of the amount of the third feedback information relative to the total number of slaves in the slave cluster meets a preset threshold; or
[0131] The fifth determination module is used to determine the time length from the current moment to the end moment of the last debugging mode, and when the time length matches the preset debugging cycle, determine that the triggering condition of the debugging mode is met.
[0132] As an optional embodiment, constructing a communication enhancement frame at least based on a preset confirmation code includes:
[0133] Determine the confirmation code based at least on the second communication rate, the confirmation code consisting of one or more 0s and 1s;
[0134] The communication enhancement frame is constructed based on a preset format in combination with the confirmation code, and the preset format includes a frame header, a confirmation code, a frame type, an address, data, and a slave return code area.
[0135] As an optional embodiment, the verifying the first feedback information includes:
[0136] Verifying whether the format of the first feedback information is the preset format;
[0137] If so, verify whether the corresponding slave return code area in the first feedback information contains information about the frame type, address, and data returned by the slave. The frame type, address, and data information are obtained by the slave by parsing the content of the communication enhancement frame according to the second communication rate. The second communication rate is determined by measuring the pulse width of the confirmation code.
[0138] As an optional embodiment, the device further includes:
[0139] a sixth determining module, configured to determine a fourth slave that has not fed back the first feedback information, and a fifth slave that has fed back the first feedback information but failed to verify the feedback;
[0140] An adjustment module, configured to adjust the second communication rate down by different proportions based on the second communication rate, so as to form a fourth communication rate corresponding to the fourth slave and a fifth rate corresponding to the fifth slave;
[0141] a detection module, configured to update the confirmation code according to the fourth communication rate and the fifth communication rate, and construct a new communication enhancement frame based on the updated confirmation code, so as to re-detect the fourth slave and the fifth slave based on the new communication enhancement frame, and obtain verification results of corresponding feedback information;
[0142] The first judgment module is used for matching and recording the fourth communication rate and the fourth slave when the verification result indicates that the verification is successful, so as to control the channel connected to the fourth slave in the power line to transmit data based on the fourth communication rate, and matching and recording the fifth communication rate and the fifth slave, so as to control the channel connected to the fifth slave in the power line to transmit data based on the fifth communication rate.
[0143] The second judgment module is used to repeat the above steps until the communication rate matching the fourth slave and the communication rate matching the fifth slave are determined if the verification result indicates that the verification has failed.
[0144] like Figure 7 As shown, another embodiment of the present invention further provides a power line signal transmission rate adjustment device, which is applied to a slave of a power line system, wherein the power line system is composed of a host and a slave cluster mounted on the power line, and the slave is any slave in the slave cluster. The power line signal transmission rate adjustment method includes:
[0145] A second response module, configured to enter a debugging mode in response to a debugging instruction;
[0146] A second obtaining module, used to obtain a communication enhancement frame, and calculate a second communication rate through a confirmation code in the communication enhancement frame, where the second communication rate is a transmission rate of the communication enhancement frame;
[0147] A second updating module, configured to update its own communication rate according to the second communication rate;
[0148] A second parsing module, configured to parse the content recorded in the communication enhancement frame at the second communication rate to obtain a parsing result, wherein the parsing result includes a first result corresponding to a successful parsing;
[0149] a second generating module, configured to generate first feedback information according to the first result, and feed back the first feedback information to the host at the second communication rate;
[0150] A second determining module is configured to determine to operate based on the second communication rate in response to the received notification information indicating to operate at the second communication rate.
[0151] As an optional embodiment, the device further includes:
[0152] The second feedback module is used to obtain the group inspection frame and feed back second feedback information indicating that the host is in an online state to the host.
[0153] Another embodiment of the present invention further provides an electronic device, including:
[0154] at least one processor; and,
[0155] a memory communicatively coupled to the at least one processor;
[0156] The memory stores instructions executable by the at least one processor, and the instructions are configured to execute the method for adjusting the power line signal transmission rate as described in any one of the embodiments above.
[0157] Another embodiment of the present invention further provides a storage medium, which includes a stored program, wherein when the program is executed, a device including the storage medium is controlled to execute the power line signal transmission rate adjustment method as described in any one of the above embodiments.
[0158] The embodiment of the present invention further provides a computer program product, which is tangibly stored on a computer-readable medium and includes computer-readable instructions, and when the computer-executable instructions are executed, at least one processor executes the power line signal transmission rate adjustment method in the embodiment described above. It should be understood that each solution in this embodiment has the corresponding technical effect in the above method embodiment, which will not be repeated here.
[0159] It should be noted that the computer storage medium of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access storage medium (RAM), a read-only storage medium (ROM), an erasable programmable read-only storage medium (EPROM or flash memory), an optical fiber, a portable compact disk read-only storage medium (CD-ROM), an optical storage medium, a magnetic storage medium, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate or transmit a program configured to be used by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, antenna, optical cable, RF, etc., or any suitable combination of the above.
[0160] A person skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of protection of the present application is limited to these examples. In line with the concept of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of different aspects of one or more embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.
[0161] The above embodiments are only exemplary embodiments of the present invention and are not intended to limit the present invention. The protection scope of the present invention is defined by the claims. Those skilled in the art may make various modifications or equivalent substitutions to the present invention within the essence and protection scope of the present invention, and such modifications or equivalent substitutions shall also be deemed to fall within the protection scope of the present invention.
[0162] The above embodiments are only exemplary embodiments of the present invention and are not intended to limit the present invention. The protection scope of the present invention is defined by the claims. Those skilled in the art may make various modifications or equivalent substitutions to the present invention within the essence and protection scope of the present invention, and such modifications or equivalent substitutions shall also be deemed to fall within the protection scope of the present invention.
Claims
1. A method for adjusting the transmission rate of a power line signal, applied to a host of a power line system, wherein the power line system is composed of a host and a slave cluster mounted on the power line, characterized in that: The power line signal transmission rate adjustment method comprises: In response to triggering of the debugging mode, sending a debugging instruction to the slave cluster based on a first communication rate, so that the slave cluster enters the debugging mode; constructing a communication enhancement frame based at least on a preset confirmation code, wherein the confirmation code is used by the slave to determine a second communication rate used by the master when sending the communication enhancement frame, wherein the second communication rate is not less than the first communication rate; Sending the communication enhancement frame to the slave cluster based on a second communication rate, and obtaining first feedback information generated by a first slave based on the communication enhancement frame, wherein the first slave is one or more slaves in the slave cluster; Verifying the first feedback information, and determining a second slave from the first slave that can correctly parse the content of the communication enhancement frame based on the verification result, wherein the second slave is a slave that can communicate based on a second communication rate; The second communication rate and the second slave are matched and recorded to control the channel in the power line connected to the second slave to transmit data based on the second communication rate, and to notify the second slave to operate based on the second communication rate.
2. The method for adjusting the power line signal transmission rate according to claim 1, characterized in that: The method further comprises: After power-on, a group inspection frame is sent to the slave cluster at a third communication rate, and second feedback information fed back by some or all slaves in the slave cluster in response to the group inspection frame is obtained, wherein the second feedback information indicates that the slave is currently in an online state; Determine a slave in an online state based on the second feedback information; When the ratio of the online slaves to the slave cluster meets a preset threshold, it is determined that a trigger condition for the debugging mode is met.
3. The method for adjusting the power line signal transmission rate according to claim 1, characterized in that: The method further comprises: In a normal operating state, determining the number of third feedback information received within a preset period of time, each of the third feedback information corresponds to one of the slaves, and the third feedback information is any communication information; When the proportion of the amount of the third feedback information relative to the total number of slaves in the slave cluster meets a preset threshold, determining that the triggering condition of the debugging mode is met; or The time length from the current time to the end time of the last debugging mode is determined, and when the time length matches a preset debugging cycle, it is determined that the triggering condition of the debugging mode is met.
4. The method for adjusting the power line signal transmission rate according to claim 1, characterized in that: The step of constructing a communication enhancement frame based at least on a preset confirmation code includes: Determine the confirmation code based at least on the second communication rate, the confirmation code consisting of one or more 0s and 1s; The communication enhancement frame is constructed based on a preset format in combination with the confirmation code, and the preset format includes a frame header, a confirmation code, a frame type, an address, data, and a slave return code area.
5. The method for adjusting the power line signal transmission rate according to claim 4, characterized in that: The verifying the first feedback information includes: Verifying whether the format of the first feedback information is the preset format; If so, verify whether the corresponding slave return code area in the first feedback information contains information about the frame type, address, and data returned by the slave. The frame type, address, and data information are obtained by the slave by parsing the content of the communication enhancement frame according to the second communication rate. The second communication rate is determined by measuring the pulse width of the confirmation code.
6. The method for adjusting the power line signal transmission rate according to claim 1, characterized in that: The method further comprises: determining a fourth slave that has not fed back the first feedback information, and a fifth slave that has fed back the first feedback information but failed to verify it; Based on the second communication rate, the rate is reduced by different proportions to form a fourth communication rate corresponding to the fourth slave and a fifth rate corresponding to the fifth slave; updating the confirmation code based on the fourth communication rate and the fifth communication rate, and constructing a new communication enhancement frame based on the updated confirmation code, so as to detect the fourth slave and the fifth slave again based on the new communication enhancement frame, and obtain verification results of corresponding feedback information; If the verification result indicates that the verification is successful, the fourth communication rate and the fourth slave are matched and recorded to control the channel connected to the fourth slave in the power line to transmit data based on the fourth communication rate, and the fifth communication rate and the fifth slave are matched and recorded to control the channel connected to the fifth slave in the power line to transmit data based on the fifth communication rate. If the verification result indicates that the verification fails, the above steps are repeated until a communication rate that matches the fourth slave and a communication rate that matches the fifth slave are determined.
7. A method for adjusting the transmission rate of a power line signal, applied to a slave of a power line system, wherein the power line system is composed of a host mounted on the power line and a slave cluster, wherein the slave is any slave in the slave cluster, and wherein: The power line signal transmission rate adjustment method comprises: In response to the debugging instruction, entering the debugging mode includes sending the debugging instruction to the slave cluster based on the first communication rate in response to the triggering of the debugging mode, so that the slave cluster enters the debugging mode; constructing a communication enhancement frame based on at least a preset confirmation code, wherein the confirmation code is used for the slave to determine the second communication rate used by the master when sending the communication enhancement frame, and the second communication rate is not less than the first communication rate; Obtain a communication enhancement frame, and calculate a second communication rate through a confirmation code in the communication enhancement frame, where the second communication rate is a transmission rate of the communication enhancement frame; updating its own communication rate based on the second communication rate; Parsing the content recorded in the communication enhancement frame at the second communication rate to obtain a parsing result, wherein the parsing result includes a first result corresponding to a successful parsing; generating first feedback information based on the first result, and feeding back the first feedback information to the host at the second communication rate; In response to receiving notification information indicating operation at the second communication rate, determining to operate based on the second communication rate.
8. The method for adjusting the power line signal transmission rate according to claim 7, characterized in that: The method further comprises: A group patrol frame is obtained, and second feedback information indicating that the host itself is in an online state is fed back to the host.
9. A power line signal transmission rate adjustment device, applied to a host of a power line system, wherein the power line system is composed of a host and a slave cluster mounted on the power line, characterized in that: The power line signal transmission rate adjustment device comprises: A first response module, configured to respond to triggering of the debugging mode and send a debugging instruction to the slave cluster based on a first communication rate, so that the slave cluster enters the debugging mode; A first construction module, configured to construct a communication enhancement frame based at least on a preset confirmation code, wherein the confirmation code is used by the slave to determine a second communication rate used by the master when sending the communication enhancement frame, wherein the second communication rate is not less than the first communication rate; A first transceiver module, configured to send the communication enhancement frame to the slave cluster at a second communication rate, and obtain first feedback information generated by a first slave based on the communication enhancement frame, wherein the first slave is one or more slaves in the slave cluster; a first processing module, configured to verify the first feedback information, and determine, based on the verification result, from the first slave a second slave capable of correctly parsing the content of the communication enhancement frame, wherein the second slave is a slave capable of communicating based on a second communication rate; The first control module matches and records the second communication rate and the second slave, so as to control the channel in the power line connected to the second slave to transmit data based on the second communication rate, and notify the second slave to operate based on the second communication rate.
10. A power line signal transmission rate adjustment device, applied to a slave of a power line system, wherein the power line system is composed of a host mounted on the power line and a slave cluster, wherein the slave is any slave in the slave cluster, and wherein: The power line signal transmission rate adjustment device comprises: A second response module, configured to enter a debugging mode in response to a debugging instruction; A second obtaining module, used for obtaining a communication enhancement frame, and calculating a second communication rate through a confirmation code in the communication enhancement frame, where the second communication rate is a transmission rate of the communication enhancement frame; A second updating module, configured to update its own communication rate according to the second communication rate; A second parsing module, configured to parse the content recorded in the communication enhancement frame at the second communication rate to obtain a parsing result, wherein the parsing result includes a first result corresponding to a successful parsing; a second generating module, configured to generate first feedback information according to the first result, and feed back the first feedback information to the host at the second communication rate; A second determining module is configured to determine to operate based on the second communication rate in response to the received notification information indicating to operate at the second communication rate.
Citation Information
Patent Citations
Power line signal transmission rate adjusting method and device
CN117792573A