CN110636049A - General message organization and transmission method for software communication interface - Google Patents

General message organization and transmission method for software communication interface Download PDF

Info

Publication number
CN110636049A
CN110636049A CN201910798516.8A CN201910798516A CN110636049A CN 110636049 A CN110636049 A CN 110636049A CN 201910798516 A CN201910798516 A CN 201910798516A CN 110636049 A CN110636049 A CN 110636049A
Authority
CN
China
Prior art keywords
information unit
information
message
field
communication
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
CN201910798516.8A
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.)
Nanjing Tech University
Original Assignee
Nanjing Tech University
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 Nanjing Tech University filed Critical Nanjing Tech University
Priority to CN201910798516.8A priority Critical patent/CN110636049A/en
Publication of CN110636049A publication Critical patent/CN110636049A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/258Data format conversion from or to a database
    • 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/06Notations for structuring of protocol data, e.g. abstract syntax notation one [ASN.1]

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • Communication Control (AREA)

Abstract

The invention provides a general message organization and transmission method for a software communication interface, which is characterized in that a plurality of Access database templates are newly established according to a communication protocol, and three tables including corresponding communication protocol information are added to the database templates, wherein the three tables respectively comprise: a message header structure, an information unit and an information unit structure; adding a plurality of information units for each protocol framework template, and storing the information in a table corresponding to a database template; selecting a corresponding database protocol frame, screening out corresponding information units according to information unit identifications, filling field values of message head words and information unit structures according to message organization requirements, and storing the contents of the message head words and the information unit values as binary target data files; and selecting a communication mode to send the binary target data file. The invention realizes the editable sending protocol content by modularizing the Access database and the information unit, and meets the message organization and sending requirements of communication interfaces such as internet Access, RS422,1553b and the like.

Description

General message organization and transmission method for software communication interface
Technical Field
The invention belongs to a software communication technology, in particular to a general message organization and transmission method for a software communication interface.
Background
At present, message organization and transmission modes applied to software interfaces are various, but most methods mainly use project types, software and hardware are designed aiming at a hardware interface with a single model, a user organizes a message mode to be single and solidified, and the following problems exist to different degrees: due to the reasons of platform software architecture and the like, when the system needs to expand communication content, the expansion can be performed only by means of patching or upgrading software, and the expandability is poor; when the hardware of the system is replaced, the software can not be used any more, and the software must be modified to be consistent with the hardware; when any one of the changes is changed, the change needs to be modified by a developer, and the openness is poor.
Disclosure of Invention
The invention aims to provide a general message organization and transmission method for a software communication interface, which aims to solve the technical problems in the prior art.
The technical solution for realizing the invention is as follows: a method for organizing and sending a general message of a software communication interface comprises the following steps:
establishing a plurality of Access database templates according to a communication protocol, wherein the database templates are added with three tables including corresponding communication protocol information, and the three tables are respectively as follows: a message header structure, an information unit and an information unit structure;
adding a plurality of information units for each protocol framework template, wherein each information unit comprises an information unit serial number, an information unit identification, an information unit length and information unit structure field value content, and storing the information in a table corresponding to a database template;
selecting a corresponding database protocol frame, screening out corresponding information units according to information unit identifications, filling field values of message head words and information unit structures according to message organization requirements, and storing the contents of the message head words and the information unit values as binary target data files;
and selecting a communication mode to send the binary target data file.
Preferably, the message header structure table field includes: total length, standby, sender address, receiver address, serial number, confirmation mark _ message mark, confirmation effective mark _ message mark, retransmission times _ message mark and information unit number;
the information unit header includes: information unit name, information unit identification and information unit length;
the information unit structure table mainly comprises each field of the information unit, and a field name, a field length, whether a bit field, a bit position, a bit length, a value type, an information unit identifier, a resolution, an offset, a maximum value and a minimum value corresponding to each field.
Preferably, the specific steps of adding a plurality of information units to each protocol framework template are as follows:
adding information unit structure field value content for each information unit, and setting each field attribute;
updating the newly added information unit information into a database information unit table and an information unit structure table, and storing the database protocol framework template in mdb format;
screening out a message header structure table corresponding to the communication protocol of the current time;
screening out information units to be sent from the edited mdb file according to the information unit identifications;
placing the screened message head structure table and the information unit in the same table, and assigning values to the message head word structure table field and the screened information unit structure table field in the table;
and saving the edited message header word structure and the information unit structure field value information as a binary target file.
Preferably, the information unit field assignment mode comprises manual input of a user and automatic generation of data.
Preferably, the automatically generated data comprises maximum value data, minimum value data, random data.
Preferably, the communication method includes: network port communication, RS422 communication and 1553b communication.
Compared with the prior art, the invention has the following remarkable advantages:
(1) the header structure of the protocol frame message is flexible and convenient to increase and decrease, the invention is suitable for the requirements of different software interfaces, the information unit to be sent is selectable, the field value of the information unit can be edited, and the invention can meet the requirements of sending different data for organization;
(2) the invention can be used in the software development stage and the test stage, under the condition that peripheral equipment and software are not in place in the software development stage, the invention can debug the software interface, help to complete the software interface development work and verify the correctness of the software interface, and in the software test stage, interface boundary data, error data and the like can be sent by the invention to complete the software interface test and the reliability test.
Drawings
FIG. 1 is a software flow diagram of the present invention.
Fig. 2 is a schematic diagram of a new message protocol framework.
Detailed Description
As shown in fig. 1, a method for organizing and sending a general message of a software communication interface includes the following steps:
s1, creating a plurality of Access database templates according to the communication protocol, wherein the database templates are added with three tables including information corresponding to the communication protocol, and the three tables are respectively as follows: as shown in fig. 2, the message header structure, the information unit, and the information unit structure specifically include:
respectively creating Access frame templates according to the network port, RS422 and 1553b message protocols, wherein each frame template comprises three tables corresponding to communication information, and the table comprises the following steps: message header word structure, information element structure, and store under the software specified path in mdb format, where:
the message header structure table field includes: total length, standby, sender address, receiver address, serial number, confirmation mark _ message mark, confirmation effective mark _ message mark, retransmission times _ message mark and information unit number;
the information unit header includes: information unit name, information unit identification and information unit length;
the information unit structure table mainly comprises: each field of the information unit, and the field name, the field length, the bit field, the bit position, the bit length, the value type, the information unit identifier, the resolution, the offset, the maximum value and the minimum value corresponding to each field.
S2, adding multiple information units for each protocol frame template, each information unit includes information unit serial number, information unit identification, information unit length and information unit structure field value content, and storing the above information in the corresponding table of database, specifically:
adding information unit structure field value content for each information unit, and setting each field attribute;
updating the newly added information unit information into a database information unit table and an information unit structure table, and storing the database protocol framework template in mdb format;
screening out a message header structure table corresponding to the communication protocol of the current time;
screening out information units to be sent from the edited mdb file according to the information unit identifications;
placing the screened message head structure table and the information unit in the same table, and assigning values to the message head word structure table field and the screened information unit structure table field in the table;
in some embodiments, the assignment comprises: and manually inputting assignment, and automatically generating assignment by the test data.
Further, the automatically generated data includes: automatically generating minimum value data, and directly assigning the minimum value information stored in the database to a field value;
automatically generating maximum value data, and directly assigning the maximum value information stored in the database to a field value;
randomly generating test data by an algorithm, and calling random numbers to assign the random numbers to corresponding field values;
s3: selecting a corresponding database protocol frame, screening out corresponding information units according to information unit identifications, filling field values of message head words and information unit structures according to message organization requirements, and storing the contents of the message head words and the information unit values as binary target data files;
s4: selecting a communication mode to send the binary target data file, specifically:
and loading an Access database message protocol for transmitting data, loading a target binary file needing to transmit the data, selecting a communication mode, and transmitting the target binary file.
Further, the communication method includes: network port communication, RS422 serial port communication and 1553b communication.
Examples
A method for organizing and sending a general message of a software communication interface comprises the following specific steps:
newly building an internet protocol template, inputting in a first row in a header structure table (HeadStrect) of a standard message: field name (FieldName), field description (FieldDescription), field location (FieldPos), field length (FieldLen), field if location field (FieldIsBit), bit field location (FieldBitPos), and field length (fieldbytlen).
The field names include: the message header structure table field includes: total length, standby, sender address, receiver address, serial number, confirmation mark _ message mark, confirmation effective mark _ message mark, retransmission times _ message mark and information unit number;
copying the edited template into a table for a user to add an information unit, wherein the information unit header comprises: information unit name, information unit identification and information unit length; adding fields row by row for the new information unit structure includes: field name, field length, bit field, bit position, bit length, value type, information unit identification, resolution, offset, maximum value, minimum value.
Adding field names line by line: information unit serial number, information unit identification, information unit length, information unit sender equipment number, information unit receiver equipment number, timestamp, target type _ control word, weapon designation, target source, target type, control word 2, information source data cycle, target distance, target azimuth, target elevation, target coordinate Xm, and set corresponding values and sizes, and storing the values as mdb files.
Loading mdb files, creating and sending data in a table according to mdb stored information, selecting information units needing to be tested in the test, adding field values to each field name in a field value column, selecting an automatic minimum value generation mode, and storing the data as dat files after input is completed.
And selecting and loading a corresponding database template and dat data to be sent, and sending the boundary value data generated by the use case to third-party equipment.
The software communication interface general message organization and transmission method realizes the editable transmission protocol framework and transmission content, can be adapted to hardware devices as many as possible, and can also be suitable for the transmission requirements as many as possible. The development cost and the period of the software interface are effectively reduced, the program does not need to be recompiled under the condition that the sending requirement and the product are changed, and the reconfiguration of the software function can be realized by loading the database file.

Claims (6)

1. A method for organizing and sending a general message of a software communication interface is characterized by comprising the following steps:
establishing a plurality of Access database templates according to a communication protocol, wherein the database templates are added with three tables including corresponding communication protocol information, and the three tables are respectively as follows: a message header structure, an information unit and an information unit structure;
adding a plurality of information units for each protocol framework template, wherein each information unit comprises an information unit serial number, an information unit identification, an information unit length and information unit structure field value content, and storing the information in a table corresponding to a database template;
selecting a corresponding database protocol frame, screening out corresponding information units according to information unit identifications, filling field values of message head words and information unit structures according to message organization requirements, and storing the contents of the message head words and the information unit values as binary target data files;
and selecting a communication mode to send the binary target data file.
2. The method according to claim 1, wherein the message header structure table field comprises: total length, standby, sender address, receiver address, serial number, confirmation mark _ message mark, confirmation effective mark _ message mark, retransmission times _ message mark and information unit number;
the information unit header includes: information unit name, information unit identification and information unit length;
the information unit structure table mainly comprises each field of the information unit, and a field name, a field length, whether a bit field, a bit position, a bit length, a value type, an information unit identifier, a resolution, an offset, a maximum value and a minimum value corresponding to each field.
3. The method for organizing and transmitting generic messages for software communication interfaces according to claim 1, wherein the specific steps of adding a plurality of information units for each protocol framework template are as follows:
adding information unit structure field value content for each information unit, and setting each field attribute;
updating the newly added information unit information into a database information unit table and an information unit structure table, and storing the database protocol framework template in mdb format;
screening out a message header structure table corresponding to the communication protocol of the current time;
screening out information units to be sent from the edited mdb file according to the information unit identifications;
placing the screened message head structure table and the information unit in the same table, and assigning values to the message head word structure table field and the screened information unit structure table field in the table;
and saving the edited message header word structure and the information unit structure field value information as a binary target file.
4. The method as claimed in claim 3, wherein the information element field assignment method includes manual input by a user and automatic generation of data.
5. The method according to claim 4, wherein the automatically generated data includes maximum value data, minimum value data, and random data.
6. The method according to claim 1, wherein the communication mode includes: network port communication, RS422 communication and 1553b communication.
CN201910798516.8A 2019-08-27 2019-08-27 General message organization and transmission method for software communication interface Pending CN110636049A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910798516.8A CN110636049A (en) 2019-08-27 2019-08-27 General message organization and transmission method for software communication interface

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910798516.8A CN110636049A (en) 2019-08-27 2019-08-27 General message organization and transmission method for software communication interface

Publications (1)

Publication Number Publication Date
CN110636049A true CN110636049A (en) 2019-12-31

Family

ID=68968961

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910798516.8A Pending CN110636049A (en) 2019-08-27 2019-08-27 General message organization and transmission method for software communication interface

Country Status (1)

Country Link
CN (1) CN110636049A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090186643A1 (en) * 2006-09-29 2009-07-23 Huawei Technologies Co., Ltd. Method and system of implementing sms for ngn terminal
CN102480462A (en) * 2010-11-23 2012-05-30 中国电信股份有限公司 Universal protocol adapting method and device
CN105049256A (en) * 2015-08-10 2015-11-11 北京思特奇信息技术股份有限公司 Method and system for realizing universal custom interface message
CN109768970A (en) * 2018-12-24 2019-05-17 通号通信信息集团有限公司 It is a kind of based on configurable puppy parc generation method
CN109948132A (en) * 2019-03-18 2019-06-28 航天云网科技发展有限责任公司 A kind of data of configuration template make a report on method and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090186643A1 (en) * 2006-09-29 2009-07-23 Huawei Technologies Co., Ltd. Method and system of implementing sms for ngn terminal
CN102480462A (en) * 2010-11-23 2012-05-30 中国电信股份有限公司 Universal protocol adapting method and device
CN105049256A (en) * 2015-08-10 2015-11-11 北京思特奇信息技术股份有限公司 Method and system for realizing universal custom interface message
CN109768970A (en) * 2018-12-24 2019-05-17 通号通信信息集团有限公司 It is a kind of based on configurable puppy parc generation method
CN109948132A (en) * 2019-03-18 2019-06-28 航天云网科技发展有限责任公司 A kind of data of configuration template make a report on method and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
SYIT30: ""通用业务平台接口报文规范V1.0.3"", 《百度文库》 *
仵金刚: ""多接口通用协议解析方法研究与实现"", 《中国硕士论文全文数据库 信息科技辑》 *

Similar Documents

Publication Publication Date Title
US8704821B2 (en) System and method for managing virtual world environments based upon existing physical environments
CN103580942B (en) A kind of simulative serial port method of testing and device
CN101316196B (en) Method and apparatus for implementing simulation test of service on distributed platform
RU2007149277A (en) DATA-Oriented Workflows
CN106155775B (en) Message processing method, device and system
CN104506462A (en) MAC (Media Access Control) address management method and equipment in distributed switch
CN115242752B (en) Address allocation method, device, equipment and medium of battery management system
CN109902056A (en) A kind of method, apparatus of serial transmission, equipment and computer readable storage medium
CN107092502B (en) Automatic application configuration method and device based on cloud operating system
CN114285695B (en) Communication method, device, apparatus, system and storage medium
CN115277882A (en) CAN message database establishing method and device, vehicle-mounted electronic equipment and storage medium
CN101729286B (en) Method, device and system for modifying variables in management information base of agent terminal
CN109743225B (en) Data testing method and device, storage medium and computer equipment
CN110007946B (en) Method, device, equipment and medium for updating algorithm model
CN110636049A (en) General message organization and transmission method for software communication interface
CN107493251A (en) A kind of method and terminal for logging in destination server
CN101426220A (en) Method, apparatus and system for base station cutover
CN115883512A (en) DNS domain name processing method, device, system, equipment and medium
CN109814871B (en) Node management method and system based on DDS bus
CN106254440A (en) The upgrade method of a kind of AP and device
CN112925841B (en) Distributed JDBC implementation method, device and computer-readable storage medium
CN104331281B (en) A kind of proxy server and method that remote control function is provided for LXI modules
CN110221869B (en) Method and device for configuring data center operating environment
CN102761473B (en) Simulating and routing method of communication between component models and concurrent transaction level simulation system
CN110264130B (en) Data center storage medium warehousing system and data center storage medium retrieval method

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20191231

RJ01 Rejection of invention patent application after publication