CN102289372A - Character string protocol resolution method and device based on launcher umbilical tower (LUT) - Google Patents

Character string protocol resolution method and device based on launcher umbilical tower (LUT) Download PDF

Info

Publication number
CN102289372A
CN102289372A CN2011102048694A CN201110204869A CN102289372A CN 102289372 A CN102289372 A CN 102289372A CN 2011102048694 A CN2011102048694 A CN 2011102048694A CN 201110204869 A CN201110204869 A CN 201110204869A CN 102289372 A CN102289372 A CN 102289372A
Authority
CN
China
Prior art keywords
character string
command
function
lut
agreement
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN2011102048694A
Other languages
Chinese (zh)
Inventor
黄健安
刘雪峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Comba Network Systems Co Ltd
Original Assignee
Comba Telecom Systems China 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 Comba Telecom Systems China Ltd filed Critical Comba Telecom Systems China Ltd
Priority to CN2011102048694A priority Critical patent/CN102289372A/en
Publication of CN102289372A publication Critical patent/CN102289372A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a character string protocol resolution method and a device based on a launcher umbilical tower (LUT), which comprises the following steps of: carrying out resolution on character string command packs according to the preset character string protocol to obtain resolution results; and finding corresponding executing functions according to the resolution results. When the method and the device of the invention are adopted, the character string command organization chart realizes the leveled effect, and each command has uniform and standardized formats. In the communication protocol resolution process, the corresponding function can be executed only through finding the corresponding commands according to a certain algorithm through table finding, so the single and efficient process is realized, the transplanting is convenient, and the readability is good. In addition, the new execution function can be added at any time according to requirements, the original executing function does not need to be modified, and the stability and the extendibility of a system can be ensured.

Description

Character string protocol analysis method and device based on LUT
Technical field
The present invention relates to the analytic method of character string command, relate in particular to a kind ofly, show look-up table based on LUT(Look-Up-Table) character string protocol analysis method and device.
Background technology
In novel power amplifier project, in order to improve competitiveness of product and extensibility, adopted the software and radio technique of forefront, in the signal link design, used FPGA (Field Programmable Gate Array, field programmable gate array), DPD(Digital Predistortion, digital pre-distortion), ADC(Analog-to-Digital Converter, analog/digital converter) a large amount of digit chips such as, therefore, in the product item debugging, PC debugging interface GUI must realize the FPGA on the digiboard, DPD, a large amount of operations of digit chips such as ADC, a large amount of character string command need be resolved and handle to slave digiboard monitoring software.Compare one by one with all command words by the character string that will receive in the technology now, handling among the case accordingly.This method realizes with the switch-case structure that in a function this realizes that function is comparatively huge, and search efficiency is lower, and extensibility is relatively poor.
At present, existing character string command analytic method, definition is strict inadequately, has bigger potential safety hazard, and implementation method is too complicated, and efficient is not high, and extensibility and transplantability are bad.
Summary of the invention
In order to solve the problems of the technologies described above, the invention provides character string protocol analysis method and device based on LUT, the resolving of order is had search efficient, transplant convenient, readable advantage such as good.
Character string protocol analysis method based on LUT provided by the invention comprises: according to default character string agreement, the character string command bag is resolved, obtain analysis result; Search corresponding execution function according to described analysis result.
Correspondingly, the present invention also provides the character string protocol analysis device based on LUT, comprising:
The protocol analysis unit is used for according to default character string agreement the character string command bag being resolved, and obtains analysis result;
Function storaging unit is used for storage and carries out function accordingly with character string command;
Be connected the command process unit between described protocol analysis unit and the described function storaging unit, be used for searching corresponding execution function, fill order according to described analysis result.
Implement the present invention, have following beneficial effect:
The sense that has levels of the organizational structure of character string command, each bar command format is unified, standard.The present invention has designed a character string agreement, and it is a command set, is used to preserve all character string command and carries out function pointer.Only need table look-up by certain algorithm in the process that communication protocol is resolved and find corresponding order, can carry out corresponding function, thereby implementation procedure be simply efficient, it is convenient to transplant, and readability is good.In addition, the present invention is divided into two parts with resolving: protocol analysis and command process.Protocol analysis part character string agreement by appointment, comparatively fixing, need not revise during transplanting.The command process part is according to the result of protocol analysis, enter corresponding execution function, detailed processing is carried out in each order, this part can increase new execution function as required at any time, need not revise original execution function, thus the stability and the extensibility of the system of assurance.
Description of drawings
Fig. 1 is the communication topology figure of novel power amplification system;
Fig. 2 is the process flow diagram that the present invention is based on the character string protocol analysis method of LUT;
Fig. 3 is the particular flow sheet that the present invention is based on the character string protocol analysis method of LUT
Fig. 4 is the character string protocol analysis device synoptic diagram that the present invention is based on LUT;
Fig. 5 is the embodiment synoptic diagram that the present invention is based on the character string protocol analysis device of LUT.
Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, the present invention is described in further detail below in conjunction with accompanying drawing.
Fig. 1 is the communication topology figure of novel power amplification system.In novel power amplification system, PC debugging interface GUI must realize a large amount of operations to the digit chip on the digiboard, and a large amount of character string command need be resolved and handle to slave digiboard monitoring software.
Fig. 2 is the process flow diagram that the present invention is based on the character string protocol analysis method of LUT, comprising:
S101: according to default character string agreement, the character string command bag is resolved, obtain analysis result.
Need to prove,, operate accordingly after relatively one by one by command word row places all in the character string that will receive and the function for prior art.This function realizes that with the switch-case structure parsing of order is handled in corresponding case.So this function is comparatively huge, search efficiency is lower, and extensibility is relatively poor.
For this reason, the present invention has designed a kind of new character string protocol analysis method based on LUT.Be that unlike the prior art this method is split into two parts with resolving: protocol analysis and command process.As shown in Figure 2, protocol analysis partly is a character string agreement by appointment, is responsible for that the character string command in the communications packets is carried out escape and resolves, and specifically comprises command word identification, parameter check and correction etc.At last, obtain analysis result.Agreement explains that part is the character string agreement of simplifying, and is fixed in the system, need not revise during transplanting, thus the stability of the system of assurance.
S102: search corresponding execution function according to described analysis result.
Need to prove that command process partly is according to the analysis result that obtains, and enters corresponding execution function, and detailed processing is carried out in each order.This part is one and carries out the corresponding character string command of function, can increase new execution function as required at any time, need not revise original execution function, the stability that the assurance system is original.The sense thereby the organizational structure that has realized character string command has levels, advantage such as each bar command format is unified, standard, and the program implementation process is directly perceived, efficient.
Fig. 3 is the particular flow sheet that the present invention is based on the character string protocol analysis method of LUT, and Fig. 3 compares with Fig. 2, and Fig. 3 is the process step of concrete refinement.
S201: default character string agreement is stored in the look-up table, and described default character string agreement comprises default character string command and carries out the pointer of function.
In order to realize described character string agreement, the present invention has designed a look-up table, the pointer that is used to preserve all character string command and carries out function.In computer science, look-up table is array or the such data structure of calculating when replacing operation with simple query manipulation of associative array.Often the computing velocity than complexity is a lot of soon owing to extract numerical value from internal memory, is very significant so the speed that obtains like this promotes.Each row is a command body in the form, corresponding character string command.This command body has comprised important informations such as the parameter of this order, the pointer of carrying out function, usage example.Preferably, the described command body of present embodiment realizes by the data structure of a struct type.
S202: according to default character string agreement, the character string command bag is resolved, obtain analysis result.
Preferably, the data structure of this struct type comprises following element: command word, number of parameters scope, the pointer of carrying out function, driving title, extension name and usage example etc.In implementation process, serial ports or network interface receive the order data of PC GUI or main frame constantly, but only the effective order data that wherein meet communication protocol are resolved.For invalid order data, the slave monitoring software will abandon.When the character string command bag is resolved, according to the command word of valid string, table look-up find this table in command body.Obtain the analysis result of command body elements corresponding.
S203: search corresponding execution function according to described analysis result.
Command process according to the pointer of carrying out function in this command body, finds its corresponding function of carrying out also to move.
S204: move described execution function, obtain the deal with data of function operation, generate back bag.
Exectorial process is the result according to protocol analysis, finds the pointer of carrying out function to enter corresponding execution function, and every order is handled accordingly.Obtain the deal with data of function operation, and data are generated back bag according to certain form, partly be responsible for returning to PC GUI or main frame by protocol analysis.
Create character string command and carry out function, and the pointer of the character string command that will newly create and execution function thereof is added to described character string agreement.
When the technological development personnel expanded new character string command as required, main focus and difficult point all were this.This also is an innovation part of the present invention.Character string command of newly creating and the pointer of carrying out function thereof are added to described character string agreement, and resolving only needs look-up table is operated, and has shielded the execution of specific instructions, and is clear, easy to understand.On the other hand, for the technological development personnel, can be indifferent to concrete resolving, expand new character string command if desired, need only in table, increase the look-up table that a command body is put into described character string agreement, the execution function of writing a correspondence simultaneously adds command analysis and partly gets final product, and expands effect easily thereby reach.
Fig. 4 is the character string protocol analysis device synoptic diagram that the present invention is based on LUT, comprising:
The protocol analysis unit is used for according to default character string agreement the character string command bag being resolved, and obtains analysis result.
Function storaging unit is used for storage and carries out function accordingly with character string command.
Be connected the command process unit between described protocol analysis unit and the described function storaging unit, be used for searching corresponding execution function, fill order according to described analysis result.
Fig. 5 is the embodiment synoptic diagram that the present invention is based on the character string protocol analysis device of LUT, also comprises:
With the protocol tables storage unit that described protocol analysis unit links to each other, be used for default character string agreement is stored in the look-up table.
Return the unit with the data that described command process unit links to each other, be used to obtain the deal with data of command execution, generate back bag.
With the order creating unit that described protocol tables storage unit and described function storaging unit link to each other respectively, be used to create character string command and carry out function, and the pointer of the character string command that will newly create and execution function thereof is added to described character string agreement.Identical in described implementation and the method.
Below in conjunction with the method and apparatus part, enumerate specific embodiment whole implementation procedure of the present invention is described.
The protocol analysis unit receives the character string command bag, extracts valid string, and will carry out escape and capital and small letter is handled, command word identification, and operation such as parameter check and correction.After collation is normal, can think that this character string command is legal.The command process unit finds the inlet of corresponding execution function according to the pointer of carrying out function in function storaging unit, carry out executable operations.
Command process part last, data are returned the deal with data that the unit obtains command execution, generate the data of returning, and deposit in back to wrap, and serial ports or Ethernet by Physical layer return to PC GUI or main frame.If handle failure, then return the bag that returns of the prompting of losing efficacy.
So far, finished a whole character string command resolving.
Above-described embodiment of the present invention does not constitute the qualification to protection domain of the present invention.Any modification of being done within the spirit and principles in the present invention, be equal to and replace and improvement etc., all should be included within the claim protection domain of the present invention.

Claims (9)

1. based on the character string protocol analysis method of LUT, it is characterized in that, comprising:
According to default character string agreement, the character string command bag is resolved, obtain analysis result;
Search corresponding execution function according to described analysis result.
2. the character string protocol analysis method based on LUT according to claim 1 is characterized in that, described according to default character string agreement, the concrete steps that the character string command bag is resolved comprise:
According to default character string agreement, the character string command in the communications packets is carried out command word identification, parameter check and correction.
3. the character string protocol analysis method based on LUT according to claim 2 is characterized in that,,, comprising before the step that the character string command bag is resolved according to default character string agreement described:
Default character string agreement is stored in the look-up table, and described default character string agreement comprises default character string command and carries out the pointer of function.
4. the character string protocol analysis method based on LUT according to claim 3 is characterized in that, after described step of searching corresponding execution function according to described analysis result, comprising:
Move described execution function, obtain the deal with data of function operation, generate back bag.
5. according to each described character string protocol analysis method in the claim 2~4, it is characterized in that, also comprise based on LUT:
Create character string command and carry out function, and the pointer of the character string command that will newly create and execution function thereof is added to described character string agreement.
6. based on the character string protocol analysis device of LUT, it is characterized in that, comprising:
The protocol analysis unit is used for according to default character string agreement the character string command bag being resolved, and obtains analysis result;
Function storaging unit is used for storage and carries out function accordingly with character string command;
Be connected the command process unit between described protocol analysis unit and the described function storaging unit, be used for searching corresponding execution function, fill order according to described analysis result.
7. the character string protocol analysis device based on LUT according to claim 6 is characterized in that, comprising:
With the protocol tables storage unit that described protocol analysis unit links to each other, be used for default character string agreement is stored in the look-up table.
8. the character string protocol analysis device based on LUT according to claim 7 is characterized in that, comprising:
Return the unit with the data that described command process unit links to each other, be used to obtain the deal with data of command execution, generate back bag.
9. the character string protocol analysis device based on LUT according to claim 6 is characterized in that, also comprises:
With the order creating unit that described protocol tables storage unit and described function storaging unit link to each other respectively, be used to create character string command and carry out function, and the pointer of the character string command that will newly create and execution function thereof is added to described character string agreement.
CN2011102048694A 2011-07-21 2011-07-21 Character string protocol resolution method and device based on launcher umbilical tower (LUT) Pending CN102289372A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011102048694A CN102289372A (en) 2011-07-21 2011-07-21 Character string protocol resolution method and device based on launcher umbilical tower (LUT)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011102048694A CN102289372A (en) 2011-07-21 2011-07-21 Character string protocol resolution method and device based on launcher umbilical tower (LUT)

Publications (1)

Publication Number Publication Date
CN102289372A true CN102289372A (en) 2011-12-21

Family

ID=45335825

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011102048694A Pending CN102289372A (en) 2011-07-21 2011-07-21 Character string protocol resolution method and device based on launcher umbilical tower (LUT)

Country Status (1)

Country Link
CN (1) CN102289372A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102546809A (en) * 2012-01-16 2012-07-04 东莞市正欣科技有限公司 Unified control method of large-scale server cluster
CN112671770A (en) * 2020-12-23 2021-04-16 波达通信设备(广州)有限公司 Outdoor unit serial port protocol analysis method and device, computer equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100388690C (en) * 2004-07-08 2008-05-14 中兴通讯股份有限公司 Automatic testing system and method for command of command line interface of data communication apparatus
CN101183973A (en) * 2007-12-06 2008-05-21 中兴通讯股份有限公司 Method of implementing command line configuration distribution in distributed system
CN100395695C (en) * 2006-07-26 2008-06-18 华为技术有限公司 Small size computer system interface command processing method and equipment
CN101251799A (en) * 2008-04-16 2008-08-27 中兴通讯股份有限公司 Apparatus and method for implementing management

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100388690C (en) * 2004-07-08 2008-05-14 中兴通讯股份有限公司 Automatic testing system and method for command of command line interface of data communication apparatus
CN100395695C (en) * 2006-07-26 2008-06-18 华为技术有限公司 Small size computer system interface command processing method and equipment
CN101183973A (en) * 2007-12-06 2008-05-21 中兴通讯股份有限公司 Method of implementing command line configuration distribution in distributed system
CN101251799A (en) * 2008-04-16 2008-08-27 中兴通讯股份有限公司 Apparatus and method for implementing management

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102546809A (en) * 2012-01-16 2012-07-04 东莞市正欣科技有限公司 Unified control method of large-scale server cluster
CN112671770A (en) * 2020-12-23 2021-04-16 波达通信设备(广州)有限公司 Outdoor unit serial port protocol analysis method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
JP6870203B2 (en) Field device commissioning system and method
CN103475584B (en) Three-state content addressing memory (TCAM) querying method and device
CN105204823A (en) Method and device for generating application installation package
CN104331315B (en) A kind of parsing of arbitrary levels json objects and generation method and system
CN102984737B (en) A kind of improve parameter unification collocation method of wireless network and device
CN105005543A (en) Interface generation apparatus and method
US8473504B2 (en) Stabilized binary differencing
CN106802927A (en) A kind of date storage method and querying method
CN104881461A (en) Rapid data storage method
CN108628900A (en) A kind of method and relevant apparatus of data format acquisition
CN107992498A (en) A kind of method and system for importing data to data warehouse
CN103336706B (en) False code is converted to the system and method for programming language
CN101909314A (en) Method and system for configuring base station parameter
CN106339249B (en) Dynamic configuration programmed method
CN102289372A (en) Character string protocol resolution method and device based on launcher umbilical tower (LUT)
CN105550333A (en) MongoDB-based test data storage query method and system
CN103678413B (en) The methods of exhibiting and device of dynamic column of report
CN102968336B (en) Method and system for processing tasks
CN107577712B (en) A kind of method, apparatus and computer equipment of loading page
CN103902565A (en) Method and device for determining data access relation
CN102799528B (en) A kind of script debugging method for circuit board level test, device and system thereof
CN104578418B (en) Configuration method and system of automatic power distribution equipment based on 101 protocols, and equipment
CN101272222A (en) Restriction calibration method and device
CN106776275A (en) A kind of testing process automatic generation method based on Packet Multiplexing
CN101516086B (en) Service matching method for mobile communication

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20111221