CN107483515A - Message transmitting method and system, message parsing method and device - Google Patents

Message transmitting method and system, message parsing method and device Download PDF

Info

Publication number
CN107483515A
CN107483515A CN201710971300.8A CN201710971300A CN107483515A CN 107483515 A CN107483515 A CN 107483515A CN 201710971300 A CN201710971300 A CN 201710971300A CN 107483515 A CN107483515 A CN 107483515A
Authority
CN
China
Prior art keywords
message
service
parameter
information
parsing
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
CN201710971300.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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN201710971300.8A priority Critical patent/CN107483515A/en
Publication of CN107483515A publication Critical patent/CN107483515A/en
Pending legal-status Critical Current

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/22Parsing or analysis of headers

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a kind of message transmitting method and system, message parsing method and device.Wherein, message transmitting method includes:Send message information;The message information includes Message Service information;The information on services includes Message Service section and method field, and methods described field includes at least one method, and each method is used to perform scheduled operation, and methods described is represented with parameter, and the attribute of the parameter includes the length and implication of parameter;Receive message information;Parse the information on services of the message;The length of parameter corresponding to each method is read, determines address corresponding to next method parameter, until message end, completes the parsing of multiple methods corresponding to the service in the message.The present invention allows a message to participate in the more information exchanges of system, adds the efficiency of transmission of message, reduces system delay caused by message transmissions.

Description

Message transmitting method and system, message parsing method and device
Technical field
The present invention relates to communication technical field, more particularly to a kind of message transmitting method and system, message parsing method and Device.
Background technology
At present, in existing communication system, for the efficiency of transmission of message than relatively low, one of reason is a report Text can only transmit the parameter of the limited individual function in limited individual system, and accordingly, the message information that recipient receives is past It is past also only to include a kind of or a limited number of kind of information.
In view of this, the efficiency of transmission of message in communication system is improved, it is as much as possible once to transmit enough information It is those skilled in the art's urgent problem.
The content of the invention
In view of above-mentioned technical problem, it is an object of the invention to propose a kind of message transmitting method and system, packet parsing Method and device, it is as much as possible once to transmit enough information to improve the efficiency of transmission of message in communication system.
In a first aspect, the invention provides a kind of message transmitting method, comprise the following steps:Step S1, send message letter Breath;The message information includes Message Service information;The information on services includes Message Service section and method field, methods described Field includes at least one method, and each method is used to perform scheduled operation, and methods described is represented with parameter, the category of the parameter Property includes the length and implication of parameter;Step S2, receive message information;Step S3, parse the information on services of the message;Read The length of parameter corresponding to each method, determines address corresponding to next method parameter, until message end, completes the report The parsing of multiple methods corresponding to service in text.
Further, in above-mentioned message transmitting method, in the step S1, the service segment includes representing service type Service format messages and the service field for representing service content.
Further, in above-mentioned message transmitting method, the step S3 further comprises:Destination in analytic message Location, source address, message length and message checking.
Further, in above-mentioned message transmitting method, the service format messages are, back message, response message, band node Location message or group data message.
Second aspect, present invention also offers a kind of message transfer system, including:Sending module, receiving module and parsing Module.Wherein, sending module is used to send message information;The message information includes Message Service information;The information on services Including Message Service section and method field, methods described field includes at least one method, and each method is used to perform predetermined behaviour Make, methods described represents that the attribute of the parameter includes the length and implication of parameter with parameter;Receiving module is used to receive message Information;Parsing module parses the information on services of the message;The length of parameter corresponding to each method is read, determines next side Address corresponding to method parameter, until message end, complete the parsing of multiple methods corresponding to the service in the message.
In message transmitting method of the present invention and Transmission system, by for the multiple methods of service configuration in message, that is, Say, the function to be realized of message is described respectively by multiple method parameters, adds what can be transmitted in a message Information content, the utilization rate of message is added, reduce system delay caused by message transmissions.
The third aspect, present invention also offers a kind of message parsing method, comprise the following steps:Step S1, receive message; Step S2, according to message format, parse the information on services of the message;The information on services includes Message Service section and method word Section, methods described field include at least one method, and each method is used to perform scheduled operation, and methods described is represented with parameter, The attribute of the parameter includes the length and implication of parameter;Step S3, the length of parameter corresponding to each method is read, it is determined that under Address corresponding to one method parameter, until message end, complete the solution of multiple methods corresponding to the service in the message Analysis.
Further, in above-mentioned message parsing method, in the step S2, the service segment includes representing service type Service format messages and the service field for representing service content.
Further, in above-mentioned message parsing method, the step S2 further comprises:Destination in analytic message Location, source address, message length and message checking.
Fourth aspect, present invention also offers a kind of packet parsing device, including:Receive message module, the first parsing mould Block and the second parsing module.Wherein, message module is received to be used to receive message;First parsing module is used for according to message format, Parse the information on services of the message;The information on services includes Message Service section and method field, and methods described field includes At least one method, each method are used to perform scheduled operation, and methods described is represented with parameter, and the attribute of the parameter includes ginseng Several length and implication;Second parsing module is used for the length for reading parameter corresponding to each method, determines next method ginseng Address corresponding to number, until message end, the parsing of multiple methods corresponding to the service in the message is completed,
It is complete by the first parsing module and the second parsing module in message parsing method and packet parsing device of the present invention Into the parsing of multiple methods corresponding to the service in message, and then, the function to be realized of message is joined by multiple methods Number is described respectively, adds the information content that can be transmitted in a message, adds the utilization rate of message, reduces message and passes System delay caused by defeated.
Brief description of the drawings
The accompanying drawing for forming the part of the present invention is used for providing a further understanding of the present invention, schematic reality of the invention Apply example and its illustrate to be used to explain the present invention, do not form inappropriate limitation of the present invention.In the accompanying drawings:
Fig. 1 is the step flow chart of message transmitting method embodiment of the present invention;
Fig. 2 is the step flow chart of message parsing method one embodiment of the present invention;
Fig. 3 is the step flow chart of another embodiment of message parsing method of the present invention;
Fig. 4 is the structured flowchart of message transfer system one embodiment of the present invention;
Fig. 5 is the structured flowchart of packet parsing device one embodiment of the present invention.
Embodiment
It should be noted that in the case where not conflicting, the feature in embodiment and embodiment in the present invention can phase Mutually combination.Describe the present invention in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 be message transmitting method embodiment of the present invention step flow chart, reference picture 1, the present embodiment message transmissions side Method comprises the following steps:
Step S110, send message information;Message information includes Message Service information;Information on services includes Message Service section With method field, method field includes at least one method, and each method is used to perform scheduled operation, and method is represented with parameter, The attribute of parameter includes the length and implication of parameter;Preferably, service segment includes representing service format messages and the expression of service type The service field of service content.Service format messages include, back message, response message, band node address message or group data message Deng.It will not be repeated here.
Step S120, receive message information;
Step S130, the information on services of analytic message;The length of parameter corresponding to each method is read, determines next side Address corresponding to method parameter, until message end, complete the parsing of multiple methods corresponding to the service in message.
Further, in one embodiment, the content of parsing also include analytic message in destination address, source address, Message length and message checking.
When it is implemented, step S110 is performed by transmitting terminal, step S120 and step S130 perform in receiving terminal.
Below, by the embodiment of message parsing method shown in Fig. 2, transmission method of the present invention is described further.
The present embodiment message parsing method comprises the following steps:
Step S1, receive message;
Step S2, according to message format, parse the information on services of the message;The information on services includes Message Service section With method field, methods described field includes at least one method, and each method is used to perform scheduled operation, methods described ginseng Number represents that the attribute of the parameter includes the length and implication of parameter;
Step S3, the length of parameter corresponding to each method is read, determine address corresponding to next method parameter, until Message end, complete the parsing of multiple methods corresponding to the service in the message.
Below, reference picture 3, Fig. 3 give the particular flow sheet of message parsing method embodiment, that is to say, that by the party Method is applied to exemplified by receiving the electronic equipment with disposal ability with message, and from receiving terminal, the present invention will be described.Including such as Lower step:
In a step 101, the service format messages in the message that receives are explained, it is effective that these information are present in header In load.
Specifically, after complete message is received, the service format messages field in message payload is carried out first Explain, specify the service type of message.
In a step 102, parsing obtains service field, and the service field in message determines that the service content of message is What.
In step 103, service followed by be exactly method parameter pair.
After it is determined that what the service of message is, to servicing the method parameter of heel to explaining.
At step 104, each method all exactly defines the length of parameter and implication determines according to the length of parameter The address of next method parameter, therefore, the position of next method can be determined according to parameter length.
In step 105, the method means of interpretation parameter according to step 104, until message end position.
With reference to an example, in message transmitting method of the present invention, the message transmitted by forwarding step S110 do into Illustrate to one step.
Assuming that there is a cooling system to provide air-cooled service 0x0800, method under master controller:0x01 opens fan, 0x02 is set Put rotation speed of the fan, 0x03 closes fan.
Now desire to open fan, and 3000 revolutions per seconds of rotation speed of the fan is set
Then organize message process as follows:
Master controller needs cooling system to reply confirmation, then the service format messages in message
Master controller needs cooling system to reply confirmation, then the service format messages in message
0x02
Cold wind service is 0x0800, then the message after increase service is
0x02 0x08 0x00
Master control needs to open fan, and it is 3000 revolutions per seconds to set rotation speed of the fan, then message is changed into
0x02 0x08 0x00 0x01 0x01 0x01 0x02 0x02 0x0B 0xB8
Finally added for message payload:The information such as destination address, source address, message length, message checking, you can real A now complete message.
Then, the message of above-mentioned form is sent to receiving terminal, then, the information on services of receiving terminal analytic message;Read The length of parameter corresponding to each method, determines address corresponding to next method parameter, until message end, completes in message Service corresponding to multiple methods parsing.
On the other hand, present invention also offers a kind of message transfer system, reference picture 4, Fig. 4 gives message transfer system Structured flowchart, including:
Sending module 40, for sending message information;The message information includes Message Service information;The information on services Including Message Service section and method field, methods described field includes at least one method, and each method is used to perform predetermined behaviour Make, methods described represents that the attribute of the parameter includes the length and implication of parameter with parameter;
Receiving module 42, for receiving message information;
Parsing module 44, parse the information on services of the message;The length of parameter corresponding to each method is read, it is determined that under Address corresponding to one method parameter, until message end, complete the solution of multiple methods corresponding to the service in the message Analysis.
In the present embodiment message transfer system, by for the multiple methods of service configuration in message, that is to say, that message institute The function to be realized is described respectively by multiple method parameters, is added the information content that can be transmitted in a message, is subtracted Lack and realized message bar number required for identical purpose, added the utilization rate of message, system caused by reducing message transmissions is prolonged When.
Due to being described above to message transmitting method, and the principle of message transfer system is similar, therefore This is repeated no more.
On the other hand, present invention also offers a kind of packet parsing device, including receive message module 50, first and parse mould The parsing module 54 of block 52 and second.Wherein, message module 50 is received to be used to receive message;First parsing module 52 is used for according to report Literary form, the information on services of analytic message;Information on services includes Message Service section and method field, and method field includes at least one Individual method, each method are used to perform scheduled operation, and method is represented with parameter, and the attribute of parameter includes the length of parameter and contained Justice;Second parsing module 54 is used for the length for reading parameter corresponding to each method, determines ground corresponding to next method parameter Location, until message end, complete the parsing of multiple methods corresponding to the service in message.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all essences in the present invention God any modification, equivalent substitution and improvements made etc., should be included in the scope of the protection with principle.

Claims (10)

1. a kind of message transmitting method, it is characterised in that comprise the following steps:
Step S1, send message information;The message information includes Message Service information;The information on services includes Message Service Section and method field, methods described field include at least one method, and each method is used to perform scheduled operation, and methods described is used Parameter represents that the attribute of the parameter includes the length and implication of parameter;
Step S2, receive message information;
Step S3, parse the information on services of the message;The length of parameter corresponding to each method is read, determines next method Address corresponding to parameter, until message end, complete the parsing of multiple methods corresponding to the service in the message.
2. message transmitting method according to claim 1, it is characterised in that
In the step S1, the service segment includes the service format messages for representing service type and the service words for representing service content Section.
3. message transmitting method according to claim 2, it is characterised in that the step S3 further comprises:
Destination address, source address, message length and message checking in analytic message.
4. message transmitting method according to claim 2, it is characterised in that
The service format messages are back message, response message, band node address message or group data message.
A kind of 5. message transfer system, it is characterised in that including:
Sending module, for sending message information;The message information includes Message Service information;The information on services includes report Literary service segment and method field, methods described field include at least one method, and each method is used to perform scheduled operation, described Method represents that the attribute of the parameter includes the length and implication of parameter with parameter;
Receiving module, for receiving message information;
Parsing module, parse the information on services of the message;The length of parameter corresponding to each method is read, determines next side Address corresponding to method parameter, until message end, complete the parsing of multiple methods corresponding to the service in the message.
6. a kind of message parsing method, it is characterised in that comprise the following steps:
Step S1, receive message;
Step S2, according to message format, parse the information on services of the message;The information on services includes Message Service section and side Method field, methods described field include at least one method, and each method is used to perform scheduled operation, methods described parameter list Show, the attribute of the parameter includes the length and implication of parameter;
Step S3, the length of parameter corresponding to each method is read, address corresponding to next method parameter is determined, until message End, complete the parsing of multiple methods corresponding to the service in the message.
7. message parsing method according to claim 6, it is characterised in that
In the step S2, the service segment includes the service format messages for representing service type and the service words for representing service content Section.
8. message parsing method according to claim 7, it is characterised in that the step S2 further comprises:
Destination address, source address, message length and message checking in analytic message.
A kind of 9. packet parsing device, it is characterised in that including:
Message module is received, for receiving message;
First parsing module, for according to message format, parsing the information on services of the message;The information on services includes message Service segment and method field, methods described field include at least one method, and each method is used to perform scheduled operation, the side Method represents that the attribute of the parameter includes the length and implication of parameter with parameter;
Second parsing module, for reading the length of parameter corresponding to each method, determine ground corresponding to next method parameter Location, until message end, complete the parsing of multiple methods corresponding to the service in the message.
10. packet parsing device according to claim 9, it is characterised in that in first parsing module,
The service segment includes the service format messages for representing service type and the service field for representing service content;And
First parsing module is further used for, destination address, source address, message length and message school in analytic message Test.
CN201710971300.8A 2017-10-18 2017-10-18 Message transmitting method and system, message parsing method and device Pending CN107483515A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710971300.8A CN107483515A (en) 2017-10-18 2017-10-18 Message transmitting method and system, message parsing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710971300.8A CN107483515A (en) 2017-10-18 2017-10-18 Message transmitting method and system, message parsing method and device

Publications (1)

Publication Number Publication Date
CN107483515A true CN107483515A (en) 2017-12-15

Family

ID=60605347

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710971300.8A Pending CN107483515A (en) 2017-10-18 2017-10-18 Message transmitting method and system, message parsing method and device

Country Status (1)

Country Link
CN (1) CN107483515A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101136856A (en) * 2007-06-05 2008-03-05 中兴通讯股份有限公司 Inter-board combined packet transmission method and system
CN101252534A (en) * 2008-03-28 2008-08-27 清华大学 Method for improving mobile self-organizing network communication capacity through link layer message combination
CN103379046A (en) * 2012-04-20 2013-10-30 唐漫宇 Method for improving message sending efficiency through IP message combining and splitting technology
CN104115452A (en) * 2012-02-17 2014-10-22 株式会社自动网络技术研究所 Communication system, relay device, and method for controlling power supply
CN106339265A (en) * 2016-08-30 2017-01-18 中国银行股份有限公司 Method and device for processing combined task
CN106926750A (en) * 2017-03-10 2017-07-07 汽-大众汽车有限公司 A kind of communication control method of distributed-driving electric automobile

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101136856A (en) * 2007-06-05 2008-03-05 中兴通讯股份有限公司 Inter-board combined packet transmission method and system
CN101252534A (en) * 2008-03-28 2008-08-27 清华大学 Method for improving mobile self-organizing network communication capacity through link layer message combination
CN104115452A (en) * 2012-02-17 2014-10-22 株式会社自动网络技术研究所 Communication system, relay device, and method for controlling power supply
CN103379046A (en) * 2012-04-20 2013-10-30 唐漫宇 Method for improving message sending efficiency through IP message combining and splitting technology
CN106339265A (en) * 2016-08-30 2017-01-18 中国银行股份有限公司 Method and device for processing combined task
CN106926750A (en) * 2017-03-10 2017-07-07 汽-大众汽车有限公司 A kind of communication control method of distributed-driving electric automobile

Similar Documents

Publication Publication Date Title
EP2712216B1 (en) Method, relevant device and system for pushing and receiving service information
CN100559774C (en) The method of multiplexing logic channel and equipment thereof in the mobile communication system
EP1625716B1 (en) Messaging system and service
EP1887747B1 (en) Messaging system and service
US6895251B2 (en) Method for generating multimedia events using short message service
CN102143035B (en) Data traffic processing method, network device and network system
US8315178B2 (en) Method and system for wireless message-based advertising
CN100539600C (en) The method that is used for the transmitting useful data object
US10079902B2 (en) Information push management method and device
CN104683216A (en) Forwarding method and forwarding device for customer service information as well as customer service system
CN103535004A (en) Anonymous signalling
CN107846432A (en) Data processing equipment and system
CN101110789B (en) Method for sending instant message in instant message system
JP2012531135A (en) Logical channel identifier transmission method and system in MBMS
CN101330348A (en) Data encapsulation apparatus and method
KR101030751B1 (en) Method and system for controlling short message congestion
CN100559780C (en) A kind of method, system and equipment that in IM message, shows multimedia messages
CN107483515A (en) Message transmitting method and system, message parsing method and device
US20040177154A1 (en) Method for trasmitting service data, network element and communications system
CN110475215B (en) Message editing, transmitting and displaying method, server and terminal thereof
CN103533001A (en) Communication method and communication system based on HTTP multi-proxy, and intermediate proxy server
CN102104846A (en) Method for acquiring short message and interposing sender identity information on communication network
CN101399781A (en) Message sending method, system, device and message server
CN112105008B (en) LoRaWAN gateway node data interaction method based on data unit
CN111355787B (en) Information transmission method and device and electronic equipment

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

Application publication date: 20171215