CN115242350A - Communication method for power device, and storage medium - Google Patents

Communication method for power device, and storage medium Download PDF

Info

Publication number
CN115242350A
CN115242350A CN202210769894.5A CN202210769894A CN115242350A CN 115242350 A CN115242350 A CN 115242350A CN 202210769894 A CN202210769894 A CN 202210769894A CN 115242350 A CN115242350 A CN 115242350A
Authority
CN
China
Prior art keywords
data
threshold
power device
target data
upper computer
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.)
Granted
Application number
CN202210769894.5A
Other languages
Chinese (zh)
Other versions
CN115242350B (en
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.)
Xiamen Kecan Information Technology Co ltd
Kehua Data Co Ltd
Original Assignee
Xiamen Kecan Information Technology Co ltd
Kehua Data 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 Xiamen Kecan Information Technology Co ltd, Kehua Data Co Ltd filed Critical Xiamen Kecan Information Technology Co ltd
Priority to CN202210769894.5A priority Critical patent/CN115242350B/en
Publication of CN115242350A publication Critical patent/CN115242350A/en
Application granted granted Critical
Publication of CN115242350B publication Critical patent/CN115242350B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors
    • H04L43/0829Packet loss
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0002Systems modifying transmission characteristics according to link quality, e.g. power backoff by adapting the transmission rate
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/16Threshold monitoring
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Quality & Reliability (AREA)
  • Environmental & Geological Engineering (AREA)
  • Communication Control (AREA)

Abstract

The invention provides a communication method of a power device, the power device and a storage medium. The method comprises the following steps: acquiring target data transmitted between the power device and an upper computer; performing communication test by using the target data to obtain a frame loss rate between the power device and the upper computer; determining a first threshold and a second threshold corresponding to the target data, and controlling the power device and the upper computer to perform data communication at a baud rate not higher than the second threshold when the frame loss rate is greater than the first threshold; the first threshold is used for indicating the maximum allowable frame loss rate corresponding to the target data, and the second threshold is used for indicating the maximum allowable baud rate corresponding to the target data under the first threshold. The invention can improve the data transmission reliability of the power device and the upper computer.

Description

Communication method for power device, and storage medium
Technical Field
The present invention relates to the field of data communication of power devices, and in particular, to a communication method of a power device, and a storage medium.
Background
The inverter generally operates in an environment with high frequency PWM (Pulse Width Modulation) waves. The high-frequency harmonic environment generally has interference, so that the inverter has larger interference when communicating with an upper computer, a data part can be lost, the control and data acquisition of the inverter by the upper computer are not stable enough, and the reliability is reduced.
Some communication parameters of the inverter and the upper computer are usually adjusted at present, and the communication stability is enhanced. However, the existing way of adjusting the communication parameters may reduce the communication rate, resulting in reduced reliability.
Disclosure of Invention
The invention provides a communication method of a power device, the power device and a storage medium, which are used for solving the problem that the existing mode for adjusting communication parameters can reduce the communication speed and cause the reduction of reliability.
In a first aspect, the present invention provides a communication method for an electric power device, where the electric power device is used for data communication with an upper computer, and the method includes:
acquiring target data transmitted between the power device and an upper computer;
performing communication test by using the target data to obtain a frame loss rate between the power device and the upper computer;
determining a first threshold value and a second threshold value corresponding to the target data, and controlling the power device and the upper computer to perform data communication at a baud rate not higher than the second threshold value when the frame loss rate is greater than the first threshold value; the first threshold is used for indicating the maximum allowable frame loss rate corresponding to the target data, and the second threshold is used for indicating the maximum allowable baud rate corresponding to the target data under the first threshold.
In one possible implementation manner, determining the first threshold and the second threshold corresponding to the target data includes:
determining a data type of the target data; the data type comprises continuous data or discontinuous data;
determining a first threshold and a second threshold corresponding to the target data according to the data type;
when the target data is continuous data, the corresponding first threshold value is lower than that when the target data type is discontinuous data; the second threshold corresponding to the target data being continuous data is lower than the second threshold corresponding to the target data being discontinuous data.
In a possible implementation manner, when the data type of the target data is discontinuous data, after determining a first threshold and a second threshold corresponding to the target data, and controlling the power device and the upper computer to perform data communication at a baud rate not higher than the second threshold when the frame loss rate is greater than the first threshold, the communication method of the power device further includes:
adjusting the sending frame period of the target data to make the sending frame period the same as the discontinuous period of the discontinuous data;
adjusting a first threshold value and a second threshold value by a first preset multiple; the first preset multiple is a numerical value larger than 1;
and when the frame loss rate is greater than the adjusted first threshold, controlling the power device and the upper computer to perform data communication at a baud rate which is not higher than the adjusted second threshold.
In one possible implementation, the continuous data includes power waveform data or firmware upgrade data; the discontinuous data comprises operation parameter data or configuration parameter data;
determining the data type of the target data comprises:
and detecting the identification bit value of the target data, and determining the data type of the target data according to the identification bit value of the target data.
In a possible implementation manner, performing a communication test by using target data to obtain a frame loss rate between an electric power device and an upper computer includes:
when target data are transmitted between the power device and the upper computer, detecting the receiving level overturning times of bit segment data with a preset byte length in a communication message received by the power device within a preset time length, and calculating the receiving level overturning times in each frame of communication message according to the receiving level overturning times;
sending the receiving level turnover times in each frame of communication message to an upper computer, so that the upper computer calculates the frame loss rate between the power device and the upper computer according to the receiving level turnover times in each frame of communication message and the sending level turnover times in each frame of communication message sent by the upper computer;
and acquiring the frame loss rate sent by the upper computer.
In a possible implementation manner, the preset byte length corresponding to the target data type being continuous data is higher than the preset byte length corresponding to the target data type being discontinuous data.
In one possible implementation, the power device includes a DSP chip and an ARM chip; the ARM chip is respectively connected with the DSP chip and the upper computer;
when the frame loss rate is greater than the first threshold value, the power device and the upper computer are controlled to perform data communication at a baud rate not higher than the second threshold value, and the method comprises the following steps:
when the frame loss rate is greater than the first threshold value, the DSP chip establishes communication with the ARM chip at a baud rate not greater than a second threshold value and sends the second threshold value to the ARM chip, so that the ARM chip establishes communication with the upper computer at the baud rate not greater than the second threshold value;
after the DSP chip receives the data of the upper computer forwarded by the ARM chip, the DSP chip adjusts the baud rate between the DSP chip and the ARM chip by a second preset multiple and communicates with the ARM chip by the adjusted baud rate; the second predetermined multiple is a number greater than 1.
In a second aspect, the present invention provides a communication device for an electric power device, comprising:
the acquisition module is used for acquiring target data transmitted between the power device and the upper computer;
the computing module is used for carrying out communication test by utilizing the target data to obtain a frame loss rate between the power device and the upper computer;
the adjusting module is used for determining a first threshold and a second threshold corresponding to the target data, and controlling the power device and the upper computer to carry out data communication at a baud rate not higher than the second threshold when the frame loss rate is greater than the first threshold; the first threshold is used for indicating the maximum allowable frame loss rate corresponding to the target data, and the second threshold is used for indicating the maximum allowable baud rate corresponding to the target data under the first threshold.
In a third aspect, the present invention provides an electric power device, including a memory and a processor, where the memory stores a computer program operable on the processor, and the processor executes the computer program to implement the steps of the communication method of the electric power device according to the first aspect or any one of the possible implementations of the first aspect.
In a possible implementation, the power device further comprises an inverter, and the inverter is controlled by the processor.
In a fourth aspect, the present invention provides a computer-readable storage medium, in which a computer program is stored, which, when executed by a processor, implements the steps of the communication method of the power device as described above in the first aspect or any one of the possible implementations of the first aspect.
The invention provides a communication method of a power device, the power device and a storage medium, which are used for determining a frame loss rate corresponding to target data by performing a communication test on the target data transmitted between the power device and an upper computer. And when the frame loss rate is greater than the first threshold value, controlling the electric power device and the upper computer to perform data transmission at a baud rate which does not exceed a second threshold value. And a corresponding first threshold and a second threshold are determined according to the target data matching, so that the purpose of reducing the baud rate and ensuring the transmission reliability of the target data is achieved, and the relationship between the communication stability and the communication rate is well balanced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a flowchart illustrating an implementation of a communication method of a power device according to an embodiment of the present invention;
fig. 2 is a schematic communication diagram of an electrical device and an upper computer according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a communication device of an electric power device according to an embodiment of the present invention;
fig. 4 is a schematic diagram of an electrical apparatus according to an embodiment of the present invention.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following description is made by way of specific embodiments with reference to the accompanying drawings.
Referring to fig. 1, an implementation flowchart of a communication method of an electric power device provided by an embodiment of the invention is shown. As shown in fig. 1, a communication method of a power device for data communication with an upper computer may include S101 to S103.
And S101, acquiring target data transmitted between the power device and the upper computer.
Alternatively, the power device may be an inverter system operating in a high frequency environment. The power device communicates with the upper computer, the upper computer can acquire working parameters of the power device, and the power device can receive control parameters sent by the upper computer.
Optionally, the target data may include one or more of power waveform data, firmware upgrade data, operating parameter data, configuration parameter data.
And S102, performing communication test by using the target data to obtain a frame loss rate between the power device and the upper computer.
Optionally, the frame loss rate is used to indicate the reliability of data transmission between the power device and the upper computer. The frame loss rate is high, and the data transmission reliability is low; the frame loss rate is low, and the data transmission reliability is high. And performing communication test between the power device and the upper computer to obtain a frame loss rate corresponding to the target data.
S103, determining a first threshold and a second threshold corresponding to the target data, and controlling the power device and the upper computer to perform data communication at a baud rate not higher than the second threshold when the frame loss rate is greater than the first threshold; the first threshold is used for indicating the maximum allowable frame loss rate corresponding to the target data, and the second threshold is used for indicating the maximum allowable baud rate corresponding to the target data under the first threshold.
Optionally, different data have different requirements for frame loss rate during transmission. The target data generally corresponds to a maximum frame loss rate threshold, i.e., a first threshold. The higher the baud rate is, the higher the data transmission rate is, and the higher the frame loss rate is; the lower the baud rate, the lower the data transmission rate and the lower the frame loss rate. That is, the frame loss rate and baud rate are inversely related. Therefore, the first threshold is used for indicating the maximum allowable frame loss rate corresponding to the target data, and the second threshold is used for indicating the maximum allowable baud rate corresponding to the target data under the first threshold.
Optionally, when the frame loss rate during transmission of the target data is greater than the first threshold, it indicates that the target baud rate is too high, and the baud rate needs to be reduced, and the baud rate is controlled to be at or below the second threshold, so as to ensure the reliability of transmission of the target data.
Before formal data transmission, the embodiment of the invention determines target data, and a frame loss rate threshold and a baud rate threshold corresponding to the target data. And judging whether the current baud rate is reduced to the baud rate threshold value or not according to whether the current frame loss rate exceeds the frame loss rate threshold value or not. The embodiment of the invention fully considers that different data transmitted by the power device and the external upper computer in the power scene actually have different requirements on the communication transmission stability, thereby carrying out correlation matching on the adjustment of the communication parameters and the data to be transmitted and better balancing the relationship between the communication stability and the communication rate.
In some embodiments of the present invention, the "determining the first threshold and the second threshold corresponding to the target data" in S103 above may include:
determining a data type of the target data; the data type comprises continuous data or discontinuous data; determining a first threshold and a second threshold corresponding to the target data according to the data type; when the target data is continuous data, the corresponding first threshold value is lower than that when the target data type is discontinuous data; the second threshold corresponding to the target data being continuous data is lower than the second threshold corresponding to the target data being discontinuous data.
Optionally, the data type is divided according to whether it must be continuous or intermittent periodically in time. The data that must be continuous in time is continuous data, and the data that can be periodically discontinuous in time is discontinuous data.
Illustratively, the continuous type data includes power waveform data or firmware upgrade data, and the discontinuous type data includes operation parameter data or configuration parameter data.
Optionally, determining the data type of the target data includes: and detecting the identification bit value of the target data, and determining the data type of the target data according to the identification bit value of the target data. The identification bit value may be a number or a letter. For example, the continuous type data may be represented by 0 and the discontinuous type data may be represented by 1.
In some embodiments of the present invention, when the data type of the target data is discontinuous data, after determining a first threshold and a second threshold corresponding to the target data, and controlling the power device and the upper computer to perform data communication at a baud rate not higher than the second threshold when the frame loss rate is greater than the first threshold, the communication method of the power device further includes:
adjusting the sending frame period of the target data to make the sending frame period the same as the discontinuous period of the discontinuous data; adjusting a first threshold value and a second threshold value by a first preset multiple; the first preset multiple is a numerical value larger than 1; and when the frame loss rate is greater than the adjusted first threshold, controlling the power device and the upper computer to perform data communication at a baud rate which is not higher than the adjusted second threshold. Alternatively, the first preset multiple may be a positive integer greater than 1. For example, the first preset multiple may be 2 or 3.
Specifically, the controller needs to be paired with a clock signal when transmitting data, so that the corresponding data is transmitted at a certain determined frame bit, thereby determining a corresponding transmission frame period. For discontinuous data, there is usually a corresponding data interval period, such as inverter voltage parameters collected every other preset period.
Therefore, for discontinuous target data, the sending frame period of the target data is adjusted to be the same as the discontinuous period of the target data, namely the sending frame period of the discontinuous data and the data discontinuous period of the data are synchronously aligned, so that the data discontinuous time has a certain corresponding relation with the sending frame time of the data, and the integrity of the whole data is not influenced even if no data with practical significance is lost, thereby improving the baud rate in turn to improve the communication rate.
Optionally, for the target data of the discontinuous data, after the sending frame period of the target data is adjusted, the first threshold and the second threshold may be adjusted by a first preset multiple, so that the frame loss rate threshold and the baud rate threshold of the target data are correspondingly increased, and the transmission rate is not increased while the reliability of the target data transmission is ensured.
Illustratively, the target data is discontinuous data.
When the transmission frame period of the target data is not adjusted: the first threshold of the target data is A1, and the second threshold is B1. If the current frame loss rate is larger than A1, adjusting to carry out data transmission at a baud rate not exceeding B1.
After the sending frame period of the target data is adjusted, the first threshold and the second threshold are adjusted to obtain a first threshold A2 and a second threshold B2. Wherein A2/A1 is more than 1, and B2/B1 is more than 1. If the current frame loss rate is larger than A2, adjusting to carry out data transmission at a baud rate not exceeding B2.
As can be seen from the above description, for the target data of the discontinuous data, the baud rate corresponding to the target data can be adjusted from B1 to B2 at most, which corresponds to an increase in the data transmission rate. And the frame loss rate threshold is also adjusted from A1 to A2, so that the baud rate adjusting condition is reduced, and the reliability of data transmission can be ensured.
In some embodiments of the present invention, performing a communication test using the target data to obtain a frame loss rate between the power device and the upper computer may include:
when target data are transmitted between the power device and the upper computer, the receiving level overturning times of bit segment data with a preset byte length in a communication message received by the power device within a preset time length are detected, and the receiving level overturning times in each frame of communication message are calculated according to the receiving level overturning times.
And sending the receiving level turnover times in each frame of communication message to the upper computer, so that the upper computer calculates the frame loss rate between the power device and the upper computer according to the receiving level turnover times in each frame of communication message and the sending level turnover times in each frame of communication message sent by the upper computer.
And acquiring the frame loss rate sent by the upper computer.
Optionally, the data of different data types correspond to different preset byte lengths, and the detection time of the continuous data is generally longer than that of the discontinuous data. Therefore, the corresponding preset byte length when the target data type is continuous data is higher than the corresponding preset byte length when the target data type is discontinuous data, differential design is carried out, and the transmission rate of the continuous data can be effectively improved.
Generally, communication tests are used to confirm that the frame loss rate needs to be compared with the message content frame by frame, and the calculation process is long. The embodiment of the invention considers that the communication message is composed of a plurality of continuous level signals, and the data loss condition of the whole message can be reflected by counting the level turnover times of the bit segment data with the preset byte length in the message, so that the frame loss rate can be accurately and quickly obtained.
Referring to fig. 2, a schematic communication diagram of an electrical device and an upper computer provided in an embodiment of the present invention is shown. In some embodiments of the present invention, as shown in fig. 2, the power device includes a DSP chip and an ARM chip; the ARM chip is respectively connected with the DSP chip and the upper computer.
When the frame loss rate is greater than the first threshold, controlling the power device and the upper computer to perform data communication at a baud rate not greater than the second threshold, which may include:
when the frame loss rate is larger than the first threshold value, the DSP chip establishes communication with the ARM chip at the baud rate which is not higher than the second threshold value, and sends the second threshold value to the ARM chip, so that the ARM chip establishes communication with the upper computer at the baud rate which is not higher than the second threshold value.
After the DSP chip receives the data of the upper computer forwarded by the ARM chip, the DSP chip adjusts the baud rate between the DSP chip and the ARM chip by a second preset multiple and communicates with the ARM chip by the adjusted baud rate; the second predetermined multiple is a number greater than 1.
Optionally, the DSP chip communicates with the ARM chip to form an internal communication of the power device. The ARM chip is communicated with the upper computer to form external communication between the power device and the upper computer. The DSP chip is used for acquiring and processing target data from the ARM chip. The ARM chip is used for communicating with the upper computer and exchanging data with the upper computer, and can cache data sent by the upper computer or the DSP chip. The second preset multiple may be a positive integer greater than 1.
Optionally, data transmission is performed between the ARM chip and the DSP chip at a first baud rate, data transmission is performed between the ARM chip and the DSP chip at a second baud rate, and the first baud rate and the second baud rate may be equal or unequal.
In order to ensure the simplicity of data transmission, the first baud rate and the second baud rate can be synchronously adjusted, and the first baud rate and the second baud rate are equal. The data transmission rate is improved, and the reliability of internal communication is higher than that of external communication. Therefore, the first baud rate and the second baud rate can be adjusted to be unequal, and the first baud rate is higher than the second baud rate.
Specifically, a DSP chip and an ARM chip are arranged to carry out two-stage communication with an external upper computer. First, when establishing communication, a stable external communication relationship is established at a lower baud rate (the baud rate of internal communication can be the same as the baud rate of external communication). Then, on the basis of keeping the baud rate of external communication unchanged, the baud rate of internal communication is gradually improved. The advantages of high processing speed of the DSP chip and strong cache capability of the ARM chip can be fully utilized. In some cases, for example, under the condition that the baud rate of external communication needs to be reduced in order to ensure the stability of external communication, data is buffered firstly through the data buffering capacity of the ARM chip, then internal communication is performed at a faster rate, and buffering and processing are performed while transmission is performed, so that the overall data processing capacity is improved.
Illustratively, the adjustment process may be as follows:
the DSP chip establishes communication with the ARM chip according to a baud rate value corresponding to the second threshold value and sends the second threshold value to the ARM chip; the ARM chip establishes communication with the upper computer according to the baud rate value corresponding to the second threshold; and after receiving the data from the upper computer forwarded by the ARM chip, the DSP chip adjusts the communication baud rate of the DSP chip and the ARM chip by a second preset multiple.
In the embodiment of the invention, after the data communication command is sent each time, the power device acquires the communication data type contained in the command so as to determine whether the data required to be communicated at this time is required to be continuous in time. If the discontinuous data is allowed to have a higher frame dropping rate and a higher baud rate, the rate can be increased (and for the discontinuous data, the frame bits of the corresponding data can be matched and corresponding to the data type, so that invalid data is dropped without affecting the effectiveness of the whole data, and the rate can be increased reversely). If the data is continuous, only a lower frame loss rate and a lower baud rate can be allowed, so as to ensure the transmission stability.
Before communication data transmission, the data type of the communication required at this time is determined, then different frame loss rate thresholds and baud rate thresholds are determined according to the data type, and whether the baud rate needs to be reduced according to the baud rate threshold (namely, a second threshold) in the current scene is judged according to the different frame loss rate thresholds (namely, a first threshold).
The embodiment of the invention fully considers that different data types transmitted by the power device and the external upper computer in the power scene actually have different requirements on communication transmission stability, thereby performing association matching on the adjustment of the communication parameters and the data types required to be transmitted, and better balancing the relationship between the communication stability and the communication rate.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
The following are embodiments of the apparatus of the invention, reference being made to the corresponding method embodiments described above for details which are not described in detail therein.
Fig. 3 is a schematic structural diagram of a communication device of an electric power device according to an embodiment of the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are shown, and detailed descriptions are as follows:
as shown in fig. 3, the communication device 20 of the power device may include:
an obtaining module 201, configured to obtain target data transmitted between an electrical device and an upper computer;
the computing module 202 is configured to perform a communication test by using the target data to obtain a frame loss rate between the power device and the upper computer;
the adjusting module 203 is configured to determine a first threshold and a second threshold corresponding to the target data, and control the power device and the upper computer to perform data communication at a baud rate not higher than the second threshold when the frame loss rate is greater than the first threshold; the first threshold is used for indicating the maximum allowable frame loss rate corresponding to the target data, and the second threshold is used for indicating the maximum allowable baud rate corresponding to the target data under the first threshold.
In some embodiments of the invention, the adjusting module 203 may comprise:
a data type determination unit for determining a data type of the target data; the data type comprises continuous data or discontinuous data;
the threshold determining unit is used for determining a first threshold and a second threshold corresponding to the target data according to the data type; when the target data is continuous data, the corresponding first threshold value is lower than that when the target data type is discontinuous data; the second threshold corresponding to the target data being continuous data is lower than the second threshold corresponding to the target data being discontinuous data.
In some embodiments of the present invention, the communication device 20 may further include:
the period adjusting module is used for determining a first threshold and a second threshold corresponding to the target data when the data type of the target data is discontinuous data, and controlling the power device and the upper computer to perform data communication at a baud rate not higher than the second threshold when the frame loss rate is greater than the first threshold: adjusting the sending frame period of the target data to make the sending frame period the same as the discontinuous period of the discontinuous data; adjusting a first threshold value and a second threshold value by a first preset multiple; the first preset multiple is a numerical value larger than 1; and when the frame loss rate is greater than the adjusted first threshold, controlling the power device and the upper computer to perform data communication at a baud rate which is not higher than the adjusted second threshold.
In some embodiments of the invention, the continuous data comprises power waveform data or firmware upgrade data; the discontinuous data comprises operation parameter data or configuration parameter data; the data type determining unit is further used for detecting the identification bit value of the target data and determining the data type of the target data according to the identification bit value of the target data.
In some embodiments of the present invention, the adjusting module 203 may further include:
the detection unit is used for detecting the receiving level overturning times of bit segment data with a preset byte length in a communication message received by the power device within a preset time length when target data are transmitted between the power device and the upper computer, and calculating the receiving level overturning times in each frame of communication message according to the receiving level overturning times;
the transmitting unit is used for transmitting the receiving level overturning times in each frame of communication message to the upper computer so that the upper computer can calculate the frame loss rate between the electric power device and the upper computer according to the receiving level overturning times in each frame of communication message and the transmitting level overturning times in each frame of communication message transmitted by the upper computer;
and the receiving unit is used for acquiring the frame loss rate sent by the upper computer.
In some embodiments of the present invention, the predetermined byte length corresponding to the target data type being continuous data is higher than the predetermined byte length corresponding to the target data type being discontinuous data.
In some embodiments of the invention, the power device comprises a DSP chip and an ARM chip; the ARM chip is respectively connected with the DSP chip and the upper computer;
the adjusting module 203 further includes:
the first adjusting unit is used for establishing communication between the DSP chip and the ARM chip at the baud rate not higher than the second threshold when the frame loss rate is greater than the first threshold, and sending the second threshold to the ARM chip so that the ARM chip establishes communication with the upper computer at the baud rate not higher than the second threshold;
the second adjusting unit is used for adjusting the baud rate between the DSP chip and the ARM chip by a second preset multiple after the DSP chip receives the data of the upper computer forwarded by the ARM chip, and communicating with the ARM chip by the adjusted baud rate; the second predetermined multiple is a number greater than 1.
Fig. 4 is a schematic diagram of an electrical apparatus according to an embodiment of the present invention. As shown in fig. 4, the power device 30 of this embodiment includes: a processor 300 and a memory 301, the memory 301 having stored therein a computer program 302 executable on the processor 300. The processor 300, when executing the computer program 302, implements the steps in the communication method embodiments of the respective power devices described above, such as S101 to S103 shown in fig. 1. Alternatively, the processor 300, when executing the computer program 302, implements the functions of the modules/units in the above-described device embodiments, such as the functions of the modules 201 to 203 shown in fig. 3.
Illustratively, the computer program 302 may be partitioned into one or more modules/units, which are stored in the memory 301 and executed by the processor 300 to implement the present invention. One or more of the modules/units may be a series of computer program instruction segments capable of performing specific functions, the instruction segments describing the execution of the computer program 302 in the power device 30. For example, the computer program 302 may be divided into the modules 201 to 203 shown in fig. 3.
The power device 30 may be a computing device such as a desktop computer, a notebook computer, a palm computer, and a cloud server. The power device 30 may include, but is not limited to, a processor 300, a memory 301. Those skilled in the art will appreciate that fig. 4 is merely an example of the power device 30, and does not constitute a limitation on the power device 30, and may include more or less components than those shown, or combine certain components, or different components, e.g., the power device may also include input-output devices, network access devices, buses, etc.
The Processor 300 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 301 may be an internal storage unit of the power device 30, such as a hard disk or a memory of the power device 30. The memory 301 may also be an external storage device of the power device 30, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the power device 30. Further, the memory 301 may also include both an internal storage unit of the power device 30 and an external storage device. The memory 301 is used to store computer programs and other programs and data required by the power device. The memory 301 may also be used to temporarily store data that has been output or is to be output.
In some embodiments of the present invention, the power device 30 may also include an inverter. The inverter is controlled by a processor 300.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules, so as to perform all or part of the functions described above. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will 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 depends upon the particular application and design constraints imposed on the implementation. 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 present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/power apparatus and method may be implemented in other ways. For example, the above-described device/power device embodiments are merely illustrative, and for example, a module or unit may be divided into only one logical function, and may be implemented in other ways, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not implemented. 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.
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 achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention 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 integrated unit may be implemented in the form of hardware, or may also be implemented in the form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method of the embodiments described above can be realized by the present invention, and the computer program can be stored in a computer readable storage medium, and when the computer program is executed by a processor, the steps of the communication method embodiments of each power device described above can be realized. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying computer program code, recording medium, U.S. disk, removable hard disk, magnetic disk, optical disk, computer Memory, read-Only Memory (ROM), random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution media, and the like.
The above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (10)

1. A communication method of a power device, wherein the power device is used for data communication with an upper computer, and the communication method comprises the following steps:
acquiring target data transmitted between the power device and the upper computer;
performing a communication test by using the target data to obtain a frame loss rate between the power device and the upper computer;
determining a first threshold and a second threshold corresponding to the target data, and controlling the power device and the upper computer to perform data communication at a baud rate not higher than the second threshold when the frame loss rate is greater than the first threshold; the first threshold is used for indicating a maximum allowed frame loss rate corresponding to the target data, and the second threshold is used for indicating a maximum allowed baud rate corresponding to the target data under the first threshold.
2. The communication method for the power device according to claim 1, wherein the determining the first threshold and the second threshold corresponding to the target data comprises:
determining a data type of the target data; the data type comprises continuous data or discontinuous data;
determining a first threshold and a second threshold corresponding to the target data according to the data type;
when the target data is continuous data, the corresponding first threshold value is lower than that when the target data type is discontinuous data; and the second threshold corresponding to the target data being continuous data is lower than the second threshold corresponding to the target data being discontinuous data.
3. The communication method of the power device according to claim 2, wherein when the data type of the target data is the discontinuous data, after the determining a first threshold and a second threshold corresponding to the target data and controlling the power device and the upper computer to perform data communication at a baud rate not higher than the second threshold when the frame loss rate is greater than the first threshold, the communication method of the power device further includes:
adjusting the sending frame period of the target data to enable the sending frame period to be the same as the discontinuous period of the discontinuous data;
adjusting the first threshold and the second threshold by a first preset multiple; the first preset multiple is a numerical value greater than 1;
and when the frame loss rate is greater than the adjusted first threshold, controlling the power device and the upper computer to perform data communication at a baud rate which is not higher than the adjusted second threshold.
4. The communication method of the power device according to claim 2, wherein the continuous type data includes power waveform data or firmware upgrade data; the discontinuous data comprises operation parameter data or configuration parameter data;
the determining the data type of the target data comprises:
and detecting the identification bit value of the target data, and determining the data type of the target data according to the identification bit value of the target data.
5. The communication method of the electric power device according to claim 2, wherein the performing the communication test by using the target data to obtain a frame loss rate between the electric power device and the upper computer comprises:
when the target data is transmitted between the power device and the upper computer, detecting the receiving level overturning times of bit segment data with a preset byte length in a communication message received by the power device within a preset time length, and calculating the receiving level overturning times in each frame of communication message according to the receiving level overturning times;
sending the receiving level turnover times in each frame of communication message to the upper computer, so that the upper computer calculates the frame loss rate between the power device and the upper computer according to the receiving level turnover times in each frame of communication message and the sending level turnover times in each frame of communication message sent by the upper computer;
and acquiring the frame loss rate sent by the upper computer.
6. The communication method of the power device according to claim 5, wherein the preset byte length corresponding to the target data type being continuous data is higher than the preset byte length corresponding to the target data type being discontinuous data.
7. The communication method for the electric power device according to any one of claims 1 to 6, wherein the electric power device includes a DSP chip and an ARM chip; the ARM chip is respectively connected with the DSP chip and the upper computer;
when the frame loss rate is greater than the first threshold, controlling the power device and the upper computer to perform data communication at a baud rate not higher than the second threshold, including:
when the frame loss rate is greater than the first threshold value, the DSP chip establishes communication with the ARM chip at a baud rate not greater than the second threshold value and sends the second threshold value to the ARM chip, so that the ARM chip establishes communication with the upper computer at the baud rate not greater than the second threshold value;
after the DSP chip receives the data of the upper computer forwarded by the ARM chip, the DSP chip adjusts the baud rate between the DSP chip and the ARM chip by a second preset multiple and communicates with the ARM chip by the adjusted baud rate; the second preset multiple is a value greater than 1.
8. An electric power device comprising a memory and a processor, the memory having stored therein a computer program operable on the processor, wherein the processor when executing the computer program implements the steps of the communication method of the electric power device according to any of the above claims 1 to 7.
9. The electrical device of claim 8, further comprising an inverter; the inverter is controlled by the processor.
10. A computer-readable storage medium, in which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the communication method of the electrical device according to any one of the claims 1 to 7 above.
CN202210769894.5A 2022-06-30 2022-06-30 Communication method for power device, and storage medium Active CN115242350B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210769894.5A CN115242350B (en) 2022-06-30 2022-06-30 Communication method for power device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210769894.5A CN115242350B (en) 2022-06-30 2022-06-30 Communication method for power device, and storage medium

Publications (2)

Publication Number Publication Date
CN115242350A true CN115242350A (en) 2022-10-25
CN115242350B CN115242350B (en) 2024-01-02

Family

ID=83670981

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210769894.5A Active CN115242350B (en) 2022-06-30 2022-06-30 Communication method for power device, and storage medium

Country Status (1)

Country Link
CN (1) CN115242350B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090065049A (en) * 2007-12-17 2009-06-22 주식회사 케이티 System and method for measuring and estimating quility of xdsl link
CN103685749A (en) * 2013-12-06 2014-03-26 无锡清华信息科学与技术国家实验室物联网技术中心 Communication electricity taking device and method based on mobile phone earphone interface
CN109528220A (en) * 2018-11-29 2019-03-29 上海联影医疗科技有限公司 Adjusting method, device and the computer equipment of CT scan system
CN112153063A (en) * 2020-09-28 2020-12-29 杭州浅海科技有限责任公司 Communication protocol suitable for inductive coupling transmission
CN112443951A (en) * 2020-11-30 2021-03-05 佛山市顺德区美的电子科技有限公司 Anti-interference control method and device, storage medium, air conditioner and communication circuit
CN113157625A (en) * 2021-04-27 2021-07-23 百富计算机技术(深圳)有限公司 Data transmission method and device, terminal equipment and computer readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090065049A (en) * 2007-12-17 2009-06-22 주식회사 케이티 System and method for measuring and estimating quility of xdsl link
CN103685749A (en) * 2013-12-06 2014-03-26 无锡清华信息科学与技术国家实验室物联网技术中心 Communication electricity taking device and method based on mobile phone earphone interface
CN109528220A (en) * 2018-11-29 2019-03-29 上海联影医疗科技有限公司 Adjusting method, device and the computer equipment of CT scan system
CN112153063A (en) * 2020-09-28 2020-12-29 杭州浅海科技有限责任公司 Communication protocol suitable for inductive coupling transmission
CN112443951A (en) * 2020-11-30 2021-03-05 佛山市顺德区美的电子科技有限公司 Anti-interference control method and device, storage medium, air conditioner and communication circuit
CN113157625A (en) * 2021-04-27 2021-07-23 百富计算机技术(深圳)有限公司 Data transmission method and device, terminal equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN115242350B (en) 2024-01-02

Similar Documents

Publication Publication Date Title
EP2972927B1 (en) Data bus inversion (dbi) encoding based on the speed of operation
CN111314945B (en) Test method, system and terminal equipment
EP4020843A1 (en) Method and apparatus for obtaining test parameter of transmitter, and storage medium
CN110908940B (en) Method for adjusting serial port communication parameters and terminal equipment
CN107147553B (en) Method, device and equipment for adjusting Baud rate and frame format of slave station
CN113157625B (en) Data transmission method, device, terminal equipment and computer readable storage medium
CN111901164B (en) Adaptive control method, device, equipment and system of OCP NIC network card
EP3706009A1 (en) Redriver to autonomously detect cable orientation
WO2020102928A1 (en) Wireless signal transmission method, wireless signal transmission device and terminal device
CN112637013A (en) CAN bus message abnormity detection method and device, equipment and storage medium
CN111813638A (en) Alarm information processing method and device and terminal equipment
CN112448732A (en) Radio frequency exposure control method and device of wireless equipment and wireless equipment
CN115242350B (en) Communication method for power device, and storage medium
CN107592666B (en) Method and device for increasing transmission power of terminal equipment
CN111159009B (en) Pressure testing method and device for log service system
CN113660547A (en) Vehicle detection method and device, terminal equipment and readable storage medium
CN116561038A (en) Serial communication method, device, serial communication system and medium
CN113873003B (en) Data transmission control method and system between storage end and communication end in Internet of things
CN112671909B (en) Application method and system of Internet of things rule chain
CN112203338B (en) Networking method and device for wireless terminal
WO2010050957A1 (en) Bit inversion for communication interface
CN111556535B (en) Communication method, communication device, electronic equipment and storage medium
CN113873026A (en) Dynamic timeout response method, device, terminal equipment and storage medium
CN110649602A (en) Electric power early warning method and electric power early warning system
CN104702364A (en) Clock frequency adjustment method and clock frequency adjustment device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant