CN108900501A - A kind of protocol contents read method, system, storage medium and terminal - Google Patents

A kind of protocol contents read method, system, storage medium and terminal Download PDF

Info

Publication number
CN108900501A
CN108900501A CN201810674129.9A CN201810674129A CN108900501A CN 108900501 A CN108900501 A CN 108900501A CN 201810674129 A CN201810674129 A CN 201810674129A CN 108900501 A CN108900501 A CN 108900501A
Authority
CN
China
Prior art keywords
information
communication protocol
protocol
data message
contents read
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
CN201810674129.9A
Other languages
Chinese (zh)
Other versions
CN108900501B (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.)
Anhui Huntkey Zhiyuan Technology Co Ltd
Original Assignee
Anhui Huntkey Zhiyuan Technology 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 Anhui Huntkey Zhiyuan Technology Co Ltd filed Critical Anhui Huntkey Zhiyuan Technology Co Ltd
Priority to CN201810674129.9A priority Critical patent/CN108900501B/en
Publication of CN108900501A publication Critical patent/CN108900501A/en
Application granted granted Critical
Publication of CN108900501B publication Critical patent/CN108900501B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/03Protocol definition or specification 

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Communication Control (AREA)

Abstract

The present invention provides a kind of protocol contents read method, and the protocol contents read method includes at least:Receive the data message that user sends;According to the data message, judge whether the information of target bits position is presupposed information;If so, determining the corresponding communication protocol in the target bits position;The communication protocol is sent according to preset format.In addition, the embodiment of the invention also provides a kind of protocol contents to read system, storage medium and terminal.Using the embodiment of the present invention, solves in the case where not knowing power inverter agreement, quickly understand protocol contents, achieve the purpose that using power inverter.

Description

A kind of protocol contents read method, system, storage medium and terminal
Technical field
The present invention relates to the protocol contents of power device to read technical field, more particularly to a kind of protocol contents reading side Method, system, storage medium and terminal.
Background technique
DC-DC/AC-DC power converter uses CAN bus to realize and the communications such as BMS, VCU, realization power mostly The instructions such as transducer parameters read and receive switching on and shutting down, Current Voltage is adjusted.User is using and is testing power converter , it need to be instructed with receiving data according to communications protocol and issuing, no communications protocol is not available power converter
In existing product, if user needs to operate this power inverter, by memory or agreement rule need to be looked at Lattice book content is realized.But protocol contents mostly remember by very abstract hardly possible, client is perhaps no at the scene to carry communications protocol, this Sample may just not be available power inverter.
Summary of the invention
In view of the foregoing deficiencies of prior art, the purpose of the present invention is to provide a kind of protocol contents read method, System, storage medium and terminal lead to nothing without carrying the constant acquisition communications protocol of communications protocol in the prior art for solving Method uses the problem of power inverter.
In order to achieve the above objects and other related objects, the present invention provides a kind of protocol contents read method, the agreement Content read method includes at least:Receive the data message that user sends;According to the data message, target bits position is judged Whether information is presupposed information;If so, determining the corresponding communication protocol in the target bits position;By the communication protocol according to Preset format is sent.
In the preferred embodiment of the present invention, described the step of being sent the communication protocol according to preset format, Including:Target information relevant to the communication protocol is sent, and receives feedback information corresponding with the target information, In, the target information is the information for determining whether to send the communication protocol;Determine the feedback information for described in reception In the case where communication protocol, the communication protocol is sent according to preset format.
It is described to send relevant to communication protocol target information in the preferred embodiment of the present invention, and receive and The corresponding feedback information of the target information;It, will be described in the case where determining the feedback information to receive the communication protocol The step of communication protocol is sent according to preset format, including:Send target information relevant to the communication protocol;Judgement Feedback information corresponding with the target information whether is received in the first preset time;If so, judging the feedback letter Whether breath is to receive the communication protocol;If the feedback information is that described will lead in the case where receiving the communication protocol Letter agreement is sent according to preset format.
In the preferred embodiment of the present invention, the method also includes:According to the data message, the first bit is judged Information whether be default boot-strap information mark;If so, executing power-on operation.
In the preferred embodiment of the present invention, the method also includes:According to the data message, the second bit is judged Information whether be default shutdown information mark;If so, executing power-off operation.
In the preferred embodiment of the present invention, the method also includes:According to the data message, third bit is judged Information whether be that predeterminated voltage adjusts corresponding Information sign;If so, executing voltage adjustment operations.
In the preferred embodiment of the present invention, the method also includes:According to the data message, the 4th bit is judged Information whether be that predetermined current adjusts corresponding Information sign;If so, executing current regulation operation.
In addition, the invention also discloses a kind of protocol contents to read system, the system comprises:It is equipment to be read, upper Machine and CAN signal switch bus;The equipment to be read passes through the CAN signal switch bus and the host computer communication link It connects, the equipment to be read is power inverter.
And a kind of readable storage medium storing program for executing is disclosed, it is stored thereon with computer program, when which is executed by processor The step of realizing described in any item protocol contents read methods.
The invention also discloses a kind of terminal, including processor storage, memory is stored with program instruction, processor fortune The step in described in any item protocol contents read methods is realized in line program instruction.
As described above, a kind of protocol contents read method, system, storage medium and terminal of the invention, have with following Beneficial effect:It solves in the case where not knowing power inverter agreement, quickly understands protocol contents, reach using power conversion The purpose of device.
Detailed description of the invention
Fig. 1 is shown as the flow diagram of protocol contents read method of the invention.
Fig. 2 is shown as the structural schematic diagram that the protocol contents in the present invention read system.
Component label instructions
S101~S104 step
Specific embodiment
Illustrate embodiments of the present invention below by way of specific specific example, those skilled in the art can be by this specification Other advantages and efficacy of the present invention can be easily understood for disclosed content.The present invention can also pass through in addition different specific realities The mode of applying is embodied or practiced, the various details in this specification can also based on different viewpoints and application, without departing from Various modifications or alterations are carried out under spirit of the invention.
Fig. 1 is please referred to Fig. 2.It should be noted that diagram provided in the present embodiment only illustrates this in a schematic way The basic conception of invention, only shown in schema then with related component in the present invention rather than package count when according to actual implementation Mesh, shape and size are drawn, when actual implementation kenel, quantity and the ratio of each component can arbitrarily change for one kind, and its Assembly layout kenel may also be increasingly complex.
It is a kind of protocol contents read method provided in an embodiment of the present invention, which is characterized in that the agreement referring to Fig. 1 Content read method includes at least:
S101 receives the data message that user sends.
It should be noted that method provided by the embodiment of the present invention is applied to the device communicated using communication protocol The devices such as the powers converter such as part, such as power inverter.As long as can be closed in the scheme of the embodiment of the present invention The modification of reason achievees the purpose that reading protocol contents of the invention in turn.
It should be noted that since power inverter has the efficiency of raising system, the function of the power density of aggrandizement apparatus Energy.In modern society, (DC/DC converter) is widely used in long-range and data communication, computer, office automation and sets The fields such as standby, industrial instruments, military affairs, space flight are related to all trades and professions of national economy, have a wide range of applications.
In recent years growth rate of (DC/DC) power inverter in low power ranges increases substantially, wherein 6W~25WDC/ The growth rate highest of DC converter, this is because they are largely used to DC measurement and test equipment, calculator display organization, meter Calculation machine and military communication system.Due to the high speed of microprocessor, DC/DC converter is from low-power to the development of middle power direction Inevitable trend, so the growth rate of the DC/DC converter of 251W~750W is also that faster, this is mainly it for service Medical treatment and experimental facilities, industrial control equipment, telecommunication device, multichannel communication multiple telecommunication and sending device, this also shows it In the broad prospect of application of long-range and digital communication field.
It is specifically used, such as:1. direct-current switch power supply, the core of power conversion is exactly DC/DC power inverter;② DC/DC power inverter be also in modern fuels battery car dynamical system a pith, major function be nonadjustable DC power supply becomes adjustable DC power supply.2. whether principle analysis DC/DC power inverter is had electrically by input with outlet chamber Two class of direct current variator that isolation can be divided into no electrical isolation and have electric appliance to be isolated.There is buck by operating circuit differentiation (BUCK), boost type (BOOST), step-down/up type (BUCK/BOOST), Cook (CUK), Rui Tai (ZETA) fill in pik (SEPIC) Deng six kinds.
It is understood that in the case that the application main equipment of the embodiment of the present invention is power inverter, power conversion Device receives data message, and specific data message can be the data mode that host computer is sent.Power inverter receives Data message later can parse data message.
S102 judges whether the information of target bits position is presupposed information according to the data message, if so, executing S103。
It is understood that obtaining the parsing result of data message when power inverter carries out data message parsing.It can be with Understand, illustratively, data message form A AN ID1 received by power inverter is as shown in table 1 below, data message It is the information with multiple bytes, the data of each byte correspond to specific information.
Table 1
It is understood that the type of data message can be determined by Byte1, indicate outside the reception of this agreement Used in ID or power inverter to outside issue.CAN ID1 as shown in Table 1 can indicate fixed transmission data Starting only can send a frame, for example, indicating the appearance of fixed transmission data when for CAN ID2, can be multiframe data, when for The CAN ID3 fixed end for sending data is indicated when CAN ID2, can only send a frame.Illustratively, power inverter is resolved to The information of target bits position Byte2 is 1, and according to itself preset rule it is known that indicating should when Byte2 is 1 The information of Byte2 is identical as presupposed information, is not identical otherwise.
S103 determines the corresponding communication protocol in the target bits position.
It is understood that when the information for determining target bits position Byte2 in step S102 is identical as presupposed information, function Rate converter determines the corresponding communication protocol in target bits position.
Illustratively, the corresponding communication protocol of Byte2 is CAN communication agreement, then power conversion goes to have determined that this Corresponding communication protocol is CAN communication agreement.
Further it will be understood that can be used different when power inverter supports a communication protocol incessantly The reading of Byte progress communication protocol.
For example, the corresponding communication protocol of Byte3 is MODBUS agreement, then when the corresponding information of Byte3 is presupposed information 1 When, then the communication protocol that power inverter determines is MODBUS agreement.Specific implementation leads to above-mentioned CAN communication agreement, This will not be repeated here for the embodiment of the present invention.
S104 sends the communication protocol according to preset format.
It goes to be determined that communication protocol can be sent later according to preset data it is understood that working as power conversion Form or data transmission format send identified communication protocol.
For example, power inverter is direct by determining CAN communication agreement when host computer is communicated with power inverter It is sent to host computer.
User can carry out the reading of communication protocol by host computer, thus in the case where user does not know communication protocol It is conveniently transferred and is interpreted.To quickly understand protocol contents, achieve the purpose that using power inverter.
It should be noted that the step of communication protocol is sent according to preset format, including:It sends and leads to described Believe protocol-dependent target information, and receive feedback information corresponding with the target information, wherein the target information is true The fixed information that whether send the communication protocol;It, will in the case where determining the feedback information to receive the communication protocol The communication protocol is sent according to preset format.
It is understood that power inverter sends information, asks when the information for determining target bits position is presupposed information Host computer determines whether to need to carry out communication protocol reception, prevents information from sending mistake.When power inverter receive it is upper The transmission of communication protocol can be carried out after the determination information that machine is sent.
Operating error can be further reduced using the embodiment of the present invention, and in host computer, work as power inverter When the request sended over determines information, it can be determined manually by personnel on host computer, so that feedback information be sent To power inverter, prevent that there are errors.
In addition, in a kind of implementation of the invention, it is described to send target information relevant to the communication protocol, and connect Receive feedback information corresponding with the target information;It, will in the case where determining the feedback information to receive the communication protocol The step of communication protocol is sent according to preset format, including:Send target information relevant to the communication protocol; Judge feedback information corresponding with the target information whether is received in the first preset time;If so, judging described anti- Whether feedforward information is to receive the communication protocol;If the feedback information is in the case where receiving the communication protocol, by institute Communication protocol is stated to be sent according to preset format.
Power inverter is sent and is determined in the first preset time after determining information to the time for receiving feedback information, This time operation can be considered as beyond first preset time to cancel.Host computer is being waited always so as not to influence power inverter Accordingly, it influences power inverter and executes other operations.
In another implementation of the invention, the method also includes:According to the data message, the first bit is judged Whether the information of position is default boot-strap information mark;If so, executing power-on operation.
It further include a kind of implementation, the method also includes:According to the data message, the letter of the second bit is judged Whether breath is default shutdown information mark;If so, executing power-off operation.
And in another implementation, the method also includes:According to the data message, third bit is judged Whether information is that predeterminated voltage adjusts corresponding Information sign;If so, executing voltage adjustment operations.
In another implementation, the method also includes:According to the data message, the information of the 4th bit is judged It whether is that predetermined current adjusts corresponding Information sign;If so, executing current regulation operation.
As shown in table 2, data message is CAN ID2, and Byte2 is the first bit, Byte3 is the second bit, Byte4 It is the 4th bit for third bit, Byte5.
It is assumed that default boot-strap information mark, default shutdown information mark, predetermined current adjust corresponding Information sign, pre- If the corresponding Information sign of current regulation is 1, then it is corresponding to execute the bit when the corresponding information of bit is 1 It adjusts, the specific data that adjust can be obtained by other data of data message, and the embodiment of the present invention is not done superfluous herein It states.
Illustratively, when the first bit Byte2 is 1, power inverter executes power-on operation, when the second bit When Byte3 is 1, power inverter executes power-off operation, when third bit Byte3 is 1, and power inverter executes voltage tune Section operation, when the 4th bit Byte2 is 1, power inverter executes the operation of voltage adjustment operations current regulation.
In addition, Byte2, Byte3, Byte4, Byte5 may be embodied in the same data message, also may be embodied in not In same data message.
Table 2
In addition, the invention also discloses a kind of protocol contents as shown in Figure 2 to read system, which is characterized in that the system System includes:Equipment, host computer and CAN signal switch bus to be read;The equipment to be read is converted total by the CAN signal Line and the host computer communicate to connect, and the equipment to be read is power inverter.Implement what morning protocol contents were read Each step.
Power inverter receives the message of this specific ID of this host computer sending, byte-by-byte to judge that whether correct data are (false It is the preset password of power inverter that fixed each byte, which is 0x55, receives this password and represents host computer and is asking for communication association View), after power inverter judges that password is correct, issues a frame message and ask whether that need to issue communications protocol (misses in order to prevent This password is triggered, increase one-time authentication mechanism), host computer replys a frame message, and it is logical to confirm that needs issue to power inverter. more Agreement is interrogated, power inverter issues power inverter and extraneous communications protocol according to certain data format.
In addition, it is stored thereon with computer program the embodiment of the invention also discloses a kind of readable storage medium storing program for executing, the program The step of described in any item protocol contents read methods are realized when being executed by processor.
And a kind of terminal, including processor storage are disclosed, memory is stored with program instruction, processor operation Program instruction realizes the step in described in any item protocol contents read methods.
The above-described embodiments merely illustrate the principles and effects of the present invention, and is not intended to limit the present invention.It is any ripe The personage for knowing this technology all without departing from the spirit and scope of the present invention, carries out modifications and changes to above-described embodiment.Cause This, institute is complete without departing from the spirit and technical ideas disclosed in the present invention by those of ordinary skill in the art such as At all equivalent modifications or change, should be covered by the claims of the present invention.

Claims (10)

1. a kind of protocol contents read method, which is characterized in that the protocol contents read method includes at least:
Receive the data message that user sends;
According to the data message, judge whether the information of target bits position is presupposed information;
If so, determining the corresponding communication protocol in the target bits position;
The communication protocol is sent according to preset format.
2. protocol contents read method according to claim 1, which is characterized in that it is described by the communication protocol according to pre- If the step of format is sent, including:
Target information relevant to the communication protocol is sent, and receives feedback information corresponding with the target information, wherein The target information is the information for determining whether to send the communication protocol;
In the case where determining the feedback information to receive the communication protocol, the communication protocol is carried out according to preset format It sends.
3. protocol contents read method according to claim 1, which is characterized in that the transmission and the communication protocol phase The target information of pass, and receive feedback information corresponding with the target information;It is described logical to receive to determine the feedback information In the case where believing agreement, the step of the communication protocol is sent according to preset format, including:
Send target information relevant to the communication protocol;
Judge feedback information corresponding with the target information whether is received in the first preset time;
If so, judging whether the feedback information is to receive the communication protocol;
If the feedback information is that in the case where receiving the communication protocol, the communication protocol is carried out according to preset format It sends.
4. protocol contents read method according to claim 1-3, which is characterized in that the method also includes:
According to the data message, judge whether the information of the first bit is default boot-strap information mark;
If so, executing power-on operation.
5. protocol contents read method according to claim 1-3, which is characterized in that the method also includes:
According to the data message, judge whether the information of the second bit is default shutdown information mark;
If so, executing power-off operation.
6. protocol contents read method according to claim 1-3, which is characterized in that the method also includes:
According to the data message, judge whether the information of third bit is that predeterminated voltage adjusts corresponding Information sign;
If so, executing voltage adjustment operations.
7. protocol contents read method according to claim 1-3, which is characterized in that the method also includes:
According to the data message, judge whether the information of the 4th bit is that predetermined current adjusts corresponding Information sign;
If so, executing current regulation operation.
8. one kind reads system based on the described in any item protocol contents of claim 1-7, which is characterized in that the system packet It includes:Equipment, host computer and CAN signal switch bus to be read;
The equipment to be read is communicated to connect by the CAN signal switch bus and the host computer, the equipment to be read For power inverter.
9. a kind of readable storage medium storing program for executing, is stored thereon with computer program, which is characterized in that real when the program is executed by processor The step of existing claim 1 to 7 described in any item protocol contents read methods.
10. a kind of terminal, including processor storage, memory are stored with program instruction, it is characterised in that:Processor runs journey Sequence instruction is realized such as the step in 1 to 7 described in any item protocol contents read methods.
CN201810674129.9A 2018-06-27 2018-06-27 Protocol content reading method, system, storage medium and terminal Active CN108900501B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810674129.9A CN108900501B (en) 2018-06-27 2018-06-27 Protocol content reading method, system, storage medium and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810674129.9A CN108900501B (en) 2018-06-27 2018-06-27 Protocol content reading method, system, storage medium and terminal

Publications (2)

Publication Number Publication Date
CN108900501A true CN108900501A (en) 2018-11-27
CN108900501B CN108900501B (en) 2021-06-15

Family

ID=64346162

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810674129.9A Active CN108900501B (en) 2018-06-27 2018-06-27 Protocol content reading method, system, storage medium and terminal

Country Status (1)

Country Link
CN (1) CN108900501B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110138810A (en) * 2019-06-28 2019-08-16 阳光电源股份有限公司 Communications protocol switching method and system

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103259826A (en) * 2012-02-20 2013-08-21 伊顿公司 Data transmission device and method used between charger and electric vehicle
CN103259299A (en) * 2012-02-20 2013-08-21 伊顿公司 Multi-standard compatible charger
US20170054809A1 (en) * 2010-04-26 2017-02-23 International Business Machines Corporation Conclusive write operation dispersed storage network frame
CN106921656A (en) * 2017-02-09 2017-07-04 浙江风向标科技有限公司 Multiplex the method and device of transmitting message
CN206789649U (en) * 2017-05-18 2017-12-22 天津市三源电力设备制造有限公司 A kind of Lithium Polymer Battery Formation System
CN107548105A (en) * 2017-10-18 2018-01-05 中国联合网络通信集团有限公司 A kind of data transfer confirmation method and base station based on UDP
CN108063862A (en) * 2017-11-29 2018-05-22 努比亚技术有限公司 A kind of Notification Method, terminal and computer readable storage medium
CN108111517A (en) * 2017-12-27 2018-06-01 成都博高信息技术股份有限公司 A kind of protocol converter and control method

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170054809A1 (en) * 2010-04-26 2017-02-23 International Business Machines Corporation Conclusive write operation dispersed storage network frame
CN103259826A (en) * 2012-02-20 2013-08-21 伊顿公司 Data transmission device and method used between charger and electric vehicle
CN103259299A (en) * 2012-02-20 2013-08-21 伊顿公司 Multi-standard compatible charger
CN106921656A (en) * 2017-02-09 2017-07-04 浙江风向标科技有限公司 Multiplex the method and device of transmitting message
CN206789649U (en) * 2017-05-18 2017-12-22 天津市三源电力设备制造有限公司 A kind of Lithium Polymer Battery Formation System
CN107548105A (en) * 2017-10-18 2018-01-05 中国联合网络通信集团有限公司 A kind of data transfer confirmation method and base station based on UDP
CN108063862A (en) * 2017-11-29 2018-05-22 努比亚技术有限公司 A kind of Notification Method, terminal and computer readable storage medium
CN108111517A (en) * 2017-12-27 2018-06-01 成都博高信息技术股份有限公司 A kind of protocol converter and control method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110138810A (en) * 2019-06-28 2019-08-16 阳光电源股份有限公司 Communications protocol switching method and system

Also Published As

Publication number Publication date
CN108900501B (en) 2021-06-15

Similar Documents

Publication Publication Date Title
CN203367660U (en) Intelligent metering socket
CN102845018A (en) A method and systems for operating a communications network based on energy status
CN108900501A (en) A kind of protocol contents read method, system, storage medium and terminal
CN104932373A (en) Intelligent industrial network protocol wireless converter
CN102323478A (en) Flexible wide area power grid harmonic synchronous monitoring system
CN103036437A (en) Distribution network terminal power supply device
WO2023124206A1 (en) Single-phase electric energy metering chip and intelligent internet-of-things meter based on ir46 standard
CN103378737A (en) All-digital control type high-power direct current stabilized power supply control method
CN201788275U (en) Analog sampling and protocol generating device
CN204810192U (en) Intelligence power drive module
Dharmawan et al. A modular approach and controller area network bus implementation in an embedded system of a 3-phase 10 kVA energy efficient switchable distribution transformer
CN201928264U (en) Analog-sampling and specification-generating device
CN108233543A (en) A kind of wireless power adapter, wireless charging system and method
Lobo et al. Design and implementation of a gateway between IEC 61850 and IEC 60870-5-101 standards for power electrical systems
CN206773119U (en) A kind of multi-channel long networking electrical equipment online supervision configures system
CN206775525U (en) Ethernet gateway, ethernet gateway equipment and system
CN110401586A (en) A kind of bus communication, device, equipment and readable storage medium storing program for executing
CN201450499U (en) Field bus access device
CN205596100U (en) Converter
CN110166481A (en) A kind of power equipment protocol conversion system and method
CN204314381U (en) A kind of novel electric power loss measurement device
CN111585299A (en) Direct-current energy router and control method thereof
Ravindran et al. Design of MODBUS based monitoring system for variable frequency drive
CN204667148U (en) A kind of electric equipment control device based on Internet of Things
CN201699425U (en) Power factor controller

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