CN106850145A - A kind of data message processing method and device - Google Patents

A kind of data message processing method and device Download PDF

Info

Publication number
CN106850145A
CN106850145A CN201710093091.1A CN201710093091A CN106850145A CN 106850145 A CN106850145 A CN 106850145A CN 201710093091 A CN201710093091 A CN 201710093091A CN 106850145 A CN106850145 A CN 106850145A
Authority
CN
China
Prior art keywords
message
data
current
attribute
sub
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
CN201710093091.1A
Other languages
Chinese (zh)
Other versions
CN106850145B (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.)
Inspur General Software Co Ltd
Original Assignee
Jinan Inspur Hi Tech Investment and Development 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 Jinan Inspur Hi Tech Investment and Development Co Ltd filed Critical Jinan Inspur Hi Tech Investment and Development Co Ltd
Priority to CN201710093091.1A priority Critical patent/CN106850145B/en
Publication of CN106850145A publication Critical patent/CN106850145A/en
Application granted granted Critical
Publication of CN106850145B publication Critical patent/CN106850145B/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
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0023Systems modifying transmission characteristics according to link quality, e.g. power backoff characterised by the signalling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0006Systems modifying transmission characteristics according to link quality, e.g. power backoff by adapting the transmission format
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0023Systems modifying transmission characteristics according to link quality, e.g. power backoff characterised by the signalling
    • H04L1/0028Formatting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/24Testing correct operation
    • H04L1/245Testing correct operation by using the properties of transmission codes
    • H04L1/246Testing correct operation by using the properties of transmission codes two-level transmission codes, e.g. binary

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Quality & Reliability (AREA)
  • Information Transfer Between Computers (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the invention provides a kind of data message processing method and device, wherein, the method is by the attribute information in control instruction, dynamic creation entity object, and according to message format and the attribute symbol and the corresponding relation of data identifier for setting, serializing treatment is carried out to entity object, data message is obtained.The method accords with the corresponding relation with data identifier by self-defined message format and attribute, realization is uniformly processed to distinct device data message, when many smart machines are managed simultaneously, it is not necessary to data message is processed respectively, data message treatment effeciency is improve.

Description

A kind of data message processing method and device
Technical field
The present invention relates to field of computer technology, more particularly to a kind of data message processing method and device.
Background technology
With the raising of the level of informatization, various smart machines are fast-developing, for example, the intelligent machine in factory Bed.In practical application scene, generally require and manage simultaneously multiple smart machines., it is necessary to control is referred to during management Order is encoded into the data message of smart machine identification to control the operation of smart machine.Therefore, the treatment of data message is for intelligence Can equipment management it is critical that.
In the prior art, smart machine is different, and the form of data message is also different, accordingly, data message it is treated Journey is also different.When many smart machines are managed simultaneously, it is necessary to respectively according to the different multiple data messages of message format generation. For example, controlling 3 rotation speeds of the fan of smart machine, 3 data message form difference of smart machine simultaneously according to control instruction It is A, B, C, then needs to be respectively processed the control instruction, obtains form and be three data messages of A, B, C, and utilize this Three data messages control corresponding smart machine.
When the smart machine of management is more, the data message treatment effeciency of prior art is relatively low.
The content of the invention
The embodiment of the invention provides a kind of data message processing method and device, it is possible to increase data message treatment effect Rate.
In a first aspect, the embodiment of the invention provides a kind of data message processing method, attribute symbol and data are pre-set The corresponding relation of identifier, pre-sets message format, predefines entity class, also includes:
Receive the control instruction of outside input;
According to the control instruction, the attribute of at least one attribute to be controlled and each attribute to be controlled is determined Value;
According to the property value of the entity class, at least one attribute to be controlled and each attribute to be controlled, Determine target entity object;
According to the message format and the corresponding relation, serializing treatment is carried out to the target entity object, generated Data message;
The data message is sent at least one smart machine of outside, to control at least one smart machine Working condition.
Preferably,
It is described that serializing treatment is carried out to the target entity object according to the message format and the corresponding relation, Generation data message, including:
The target entity object is combined according to the message format, generates message format character string;
Determine attribute symbol to be controlled in the message format character string, command character, data delimiter and data symbols;
According to the corresponding relation, determine that the attribute to be controlled accords with corresponding target data identifier;
The target data identifier, the data symbols, the command character and the data delimiter are compiled respectively Code, generates the corresponding sub- message of target data identifier, the sub- message of data symbols, the sub- message of command character and data delimiter report Text;
By the sub- message of target data identifier, the sub- message of data symbols, the sub- message of command character and data delimiter report Text is combined according to the message format, generates the data message.
Preferably,
Further include:
Receive at least one clear text that at least one smart machine of outside sends;
For clear text each described, according to the entity class and the corresponding relation, to currently pending report Text carries out unserializing treatment, determines current entity object.
Preferably,
It is described according to the entity class and the corresponding relation, unserializing treatment is carried out to currently pending message, really Settled preceding entity object, including:
The currently pending message is decoded, current string is generated;
Determine current data identifier in the current string, current command character, current data separator and current Data symbols;
According to the corresponding relation, the corresponding current attribute symbol of the current data identifier is determined;
According to the entity class, to current attribute symbol, the current command character, current data separator and current number Arranged according to symbol, determined the current entity object.
Preferably,
Described according to the entity class and the corresponding relation, unserializing treatment is carried out to currently pending message, Determine after current entity object, further include:
According to the current entity object, the attribute of at least one current attribute and each current attribute is determined Value;
The property value of at least one current attribute and each current attribute is sent to the user of outside.
Second aspect, the embodiment of the invention provides a kind of data message processing unit, including:
First setting unit, for symbol and the corresponding relation of data identifier of setting a property;
Second setting unit, for setting message format;
First determining unit, for determining entity class;
First receiving unit, the control instruction for receiving outside input;
Second determining unit, for the control instruction received according to first receiving unit, determines at least one The property value of attribute to be controlled and each attribute to be controlled;
3rd determining unit, for the entity class, the second determination list that are determined according to first determining unit Described at least one attribute to be controlled and the property value of each attribute to be controlled that unit determines, determine target entity pair As;
Generation unit, for the message format and first setting unit that are set according to second setting unit The corresponding relation for setting, serializing treatment is carried out to the target entity object that the 3rd determining unit determines, raw Into data message;
First transmitting element, for the data message that the generation unit is generated to be sent at least one of outside Smart machine, to control at least one working condition of smart machine.
Preferably,
The generation unit, for being combined to the target entity object according to the message format, generates message Format string;Determine attribute symbol to be controlled in the message format character string, command character, data delimiter and data symbols; According to the corresponding relation, determine that the attribute to be controlled accords with corresponding target data identifier;Respectively to the target data Identifier, the data symbols, the command character and the data delimiter are encoded, and generate corresponding target data identifier The sub- message of sub- message, data symbols, the sub- message of command character and the sub- message of data delimiter;Target data identifier is reported Text, the sub- message of data symbols, the sub- message of command character and the sub- message of data delimiter are combined according to the message format, generate the number According to message.
Preferably,
Further include:
Second receiving unit, for receiving at least one clear text that at least one smart machine of outside sends;
Processing unit, what the smart machine of each outside for being received for second receiving unit sent The institute that the clear text, the entity class determined according to first determining unit and first setting unit are set Corresponding relation is stated, unserializing treatment is carried out to currently pending message, determine current entity object.
Preferably,
The processing unit, for being decoded to the currently pending message, generates current string;It is determined that described Current data identifier, current command character, current data separator and current data symbol in current string;According to described right Should be related to, determine the corresponding current attribute symbol of the current data identifier;According to the entity class, to the current attribute Symbol, the current command character, current data separator and current data symbol are arranged, and determine the current entity object.
Preferably,
Further include:
4th determining unit, for the current entity object determined according to the processing unit, determines at least one The property value of current attribute and each current attribute;
Second transmitting element, at least one current attribute for determining the 4th determining unit and each The property value of the current attribute is sent to the user of outside.
The third aspect, the embodiment of the invention provides a kind of computer-readable recording medium, including execute instruction, when the place of storage control When reason device performs the execute instruction, the storage control performs the method described in any of the above-described.
Fourth aspect, the embodiment of the invention provides a kind of storage control, including:Processor, memory and bus;Institute Memory is stated for storing execute instruction, the processor is connected with the memory by the bus, when the storage control When device processed runs, the execute instruction of memory storage described in the computing device, so that the storage control is performed Method described in any of the above-described.
A kind of data message processing method and device are the embodiment of the invention provides, wherein, the method passes through control instruction In attribute information, dynamic creation entity object, and according to set message format and attribute symbol it is corresponding with data identifier Relation, serializing treatment is carried out to entity object, obtain data message the method by self-defined message format and attribute accord with The corresponding relation of data identifier, realization is uniformly processed to distinct device data message, and many smart machines are managed when simultaneously When, it is not necessary to data message is processed respectively, data message treatment effeciency is improve.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing The accompanying drawing to be used needed for having technology description is simply introduced, it should be apparent that, drawings in the following description are of the invention Some embodiments, for those of ordinary skill in the art, on the premise of not paying creative work, can also be according to this A little accompanying drawings obtain other accompanying drawings.
Fig. 1 is a kind of data message processing method flow chart that one embodiment of the invention is provided;
Fig. 2 is another data message processing method flow chart that one embodiment of the invention is provided;
Fig. 3 is a kind of data message processing device structure diagram that one embodiment of the invention is provided;
Fig. 4 is another data message processing device structure diagram that one embodiment of the invention is provided;
Fig. 5 is another data message processing device structure diagram that one embodiment of the invention is provided.
Specific embodiment
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is A part of embodiment of the present invention, rather than whole embodiments, based on the embodiment in the present invention, those of ordinary skill in the art The every other embodiment obtained on the premise of creative work is not made, belongs to the scope of protection of the invention.
As shown in figure 1, the embodiment of the invention provides a kind of data message processing method, the method can include following step Suddenly:
Step 101:Set a property symbol and the corresponding relation of data identifier, sets message format, determines entity class;
Step 102:Receive the control instruction of outside input;
Step 103:According to control instruction, the attribute of at least one attribute to be controlled and each attribute to be controlled is determined Value;
Step 104:According to the property value of entity class, at least one attribute to be controlled and each attribute to be controlled, it is determined that Target entity object;
Step 105:According to message format and corresponding relation, serializing treatment is carried out to target entity object, generate data Message;
Step 106:Data message is sent at least one smart machine of outside, to control at least one smart machine Working condition.
In the embodiment shown in fig. 1, by the attribute information in control instruction, dynamic creation entity object, and according to Message format and attribute symbol and the corresponding relation of data identifier of setting, serializing treatment is carried out to entity object, is counted According to message.The method accords with the corresponding relation with data identifier by self-defined message format and attribute, realizes to distinct device Data message is uniformly processed, when many smart machines are managed simultaneously, it is not necessary to data message is processed respectively, improve number According to Message processing efficiency.
In one embodiment of the invention, in order to target entity object is changed into number according to customized message form According to message, and then it is capable of identify that smart machine, step 105 includes:Target entity object is combined according to message format, Generation message format character string;Determine attribute symbol to be controlled in message format character string, command character, data delimiter and data Symbol;According to corresponding relation, determine that attribute to be controlled accords with corresponding target data identifier;Respectively to target data identifier, number Encoded according to symbol, command character and data delimiter, generate the corresponding sub- message of target data identifier, the sub- message of data symbols, The sub- message of command character and the sub- message of data delimiter;By the sub- message of target data identifier, the sub- message of data symbols, command character report Text and the sub- message of data delimiter are combined according to message format, generate data message.
Message format is varied, in message format comprising command character, data delimiter etc. in the data message of generation Put in order.For example, a kind of message format be " RS GS [Z] GS [SD] GS [P] GS [Pr] RS EOT ", wherein, RS, GS, EOT is command character, is target data identifier in [].
In the present embodiment, using ASCII character, respectively to target entity object in different types of character compile Code, and put in order according to character in message format, many sub- messages to being obtained after coding are combined, and form datagram Text.It should be noted that can be to being combined after different character codes, it is also possible to by different characters according to message format Encoded after combination, processing procedure is not unique.
Target entity object changes with the difference of entity class, in the present embodiment, can use DataEntity realities Body class.
Code is realized the following is a kind of data message generating process is corresponding:
In one embodiment of the invention, in order to carry out unified place to the clear text that different intelligent equipment sends Reason, the method also includes:Receive at least one clear text that at least one smart machine of outside sends;For each Clear text, according to entity class and corresponding relation, unserializing treatment is carried out to currently pending message, determines current entity Object.
In the present embodiment, it is possible to use entity class is unified to the different clear texts that different intelligent equipment sends Parsing, obtains current entity object.Wherein, unserializing treatment is corresponding with above-mentioned serializing treatment.
In one embodiment of the invention, in order to by pending data packet parsing, obtain the operation shape of smart machine State, according to entity class and corresponding relation, unserializing treatment is carried out to currently pending message, determines current entity object, bag Include:Currently pending message is decoded, current string is generated;Determine current data identifier in current string, Current command character, current data separator and current data symbol;According to corresponding relation, determine that current data identifier is corresponding and work as Preceding attribute symbol;According to entity class, current attribute symbol, current command character, current data separator and current data symbol are arranged Cloth, determines current entity object.
In the present embodiment, for each clear text, decoded using ASCII character, the word for obtaining will be decoded Symbol string is processed according to the corresponding form of entity class, determines corresponding entity object.
In one embodiment of the invention, in order to by the attribute information of entity object acquisition smart machine, the method Also include:According to current entity object, the property value of at least one current attribute and each current attribute is determined;To at least one The property value of individual current attribute and each current attribute is sent to the user of outside.
In the present embodiment, entity object is as follows:
DataEntitydataEntity=new DataEntity ();
DataEntity.Speed=" 2100 ";
DataEntity.Power=" 2200 ";
DataEntity.Pressure=" 3000 ";
Entity class DataEntity is as follows:
According to entity class and the corresponding relation of entity object, it may be determined that attribute includes:Speed, Power, Pressure, Corresponding property value is respectively 2100,2300,3000.
Code is realized the following is a kind of data message resolving is corresponding:
As shown in Fig. 2 the embodiment of the present invention is as a example by simultaneously to 5 intelligent device managements, to data message processing method It is described in detail, the method may comprise steps of:
Step 201:Set a property symbol and the corresponding relation of data identifier, sets message format, determines entity class.
Pre-set message format, RS GS [Z] GS [SD] GS [P] GS [Pr] RS EOT.
Entity class is determined for DataEntity, and specific form is as follows:
The corresponding relation of attribute symbol and data identifier is pre-set, as shown in table 1,
Table 1
Data item title Attribute is accorded with Data identifier
State EquipState Z
Rotating speed Speed SD
Pressure Pressure P
Power Power Pr
Step 202:Receive outside input control instruction, according to control instruction, determine at least one attribute to be controlled and The property value of each attribute to be controlled.
Control instruction includes:Equipment state is start (01), and it is 2100, power 2200, pressure 3000 to set rotating speed.
It should be noted that in the present embodiment, start is replaced with numerical value 01, i.e., when attribute to be controlled is equipment state, Corresponding property value is 01.
Step 203:According to the property value of entity class, at least one attribute to be controlled and each attribute to be controlled, it is determined that Target entity object.
According to step 201 and step 202, determine that target entity object is as follows:
DataEntitydataEntity=new DataEntity ();
DataEntity.EquipState=" 01 ";
DataEntity.Speed=" 2100 ";
DataEntity.Power=" 2200 ";
DataEntity.Pressure=" 3000 ";
Step 204:Determine attribute symbol to be controlled in target entity object, command character, data delimiter and data symbols.
Attribute symbol to be controlled includes:EquipState、Speed、Power、Pressure;Command character includes:RS (startings Position), EOT (stop bits);Data delimiter for ";”;Data symbols include:01、2100、2200、3000.
Step 205:According to corresponding relation, determine that attribute to be controlled accords with corresponding target data identifier.
According to table 1, determine that the corresponding target data identifier of EquipState, Speed, Power, Pressure is respectively E、SD、P、Pr。
Step 206:Target data identifier, data symbols, command character and data delimiter are encoded respectively, it is right to generate The sub- message of target data identifier, the sub- message of data symbols, the sub- message of command character and the sub- message of data delimiter answered.
Target data identifier, data symbols, command character and data delimiter are encoded respectively.
By taking the coding of command character as an example, command character is as shown in table 2 with the relation of ASCII character,
Table 2
Content Command character ASCII character
Start bit RS 30
Stop bits EOT 4
In the present embodiment, for command character " RS, RS, EOT " generate three sub- messages of command character, respectively " 30,30, 4 ", by that analogy, other kinds of sub- message is obtained.
Step 207:By the sub- message of target data identifier, the sub- message of data symbols, the sub- message of command character and data delimiter Sub- message is combined according to message format, generates data message.
Sub- message is combined according to message format, generation data message " 3029 ... 304 ".
Step 208:Data message is sent to 5 smart machines of outside, to control 5 operations of smart machine.
Data message " 3029 ... 304 " is sent to 5 smart machines of outside, 5 smart machines can be according to number Realize that it is 2100 to start shooting and adjust rotating speed according to message " 3029 ... 304 ", power is 2200, and pressure is 3000.
Step 209:5 clear texts that 5 smart machines of outside send are received, for each pending report Text, decodes to currently pending message, generates current string.
In the present embodiment, by taking wherein one clear text of smart machine A as an example.Preceding clear text is " 3029 ... 304 ", decode to currently pending message, and generation current string is " RS GS Z01GS SD2100GS P2200GS Pr3000RS EOT”。
Step 210:Determine current data identifier in current string, current command character, current data separator and Current data is accorded with.
Current data identifier includes:Z、SD、P、Pr;
Current command character includes:RS、RS、EOT;
Current data separator includes:GS、GS、GS、GS;
Current data symbol includes:01、2100、2200、3000.
Step 211:According to corresponding relation, the corresponding current attribute symbol of current data identifier is determined.
According to table 1, determine Z, SD, P, Pr corresponding current attribute symbol be respectively EquipState, Speed, Power, Pressure。
Step 212:According to entity class, current attribute symbol, current command character, current data separator and current data are accorded with Arranged, determined current entity object.
Obtaining current entity object is:
DataEntitydataEntity=new DataEntity ();
DataEntity.EquipState=" 01 ";
DataEntity.Speed=" 2100 ";
DataEntity.Power=" 2200 ";
DataEntity.Pressure=" 3000 ";
Step 213:According to current entity object, the attribute of at least one current attribute and each current attribute is determined Value.
According to current entity object, determine that equipment state is 2100, power 2200, pressure 3000 for start (01), rotating speed.
Step 214:The property value of at least one current attribute and each current attribute is sent to the user of outside.
It is that 01 (start), rotating speed are 2100, power 2200, pressure 3000 by equipment state, is sent to outside user, and And user can understand the running status of current smart machine by the working condition, and then control is sent to current smart machine Instruction.For example, rated power is 2200, the power of current smart machine is 2500, then control instruction can be " power 2200 ".
It should be noted that the generation of data message does not have dividing for priority with parsing, the present embodiment is with advanced row data The generation of message carries out being illustrated as a example by the parsing of data message again.
As shown in figure 3, a kind of data message processing unit is the embodiment of the invention provides, including:
First setting unit 301, for symbol and the corresponding relation of data identifier of setting a property;
Second setting unit 302, for setting message format;
First determining unit 303, for determining entity class;
First receiving unit 304, the control instruction for receiving outside input;
Second determining unit 305, for the control instruction received according to the first receiving unit 304, determines that at least one treats The property value of controlled attribute and each attribute to be controlled;
3rd determining unit 306, it is true for the entity class that is determined according to the first determining unit 303, the second determining unit 305 At least one fixed attribute to be controlled and the property value of each attribute to be controlled, determine target entity object;
Generation unit 307, message format and the first setting unit 301 for being set according to the second setting unit 302 set The corresponding relation put, serializing treatment is carried out to the target entity object that the 3rd determining unit 306 determines, generates data message;
First transmitting element 308, at least one intelligence for the data message that generation unit 307 is generated to be sent to outside Energy equipment, to control at least one working condition of smart machine.
In one embodiment of the invention, generation unit 307, for being carried out to target entity object according to message format Combination, generates message format character string;Determine attribute symbol to be controlled, command character, the data delimiter in message format character string And data symbols;According to corresponding relation, determine that attribute to be controlled accords with corresponding target data identifier;Target data is identified respectively Symbol, data symbols, command character and data delimiter are encoded, and generate the corresponding sub- message of target data identifier, data symbols The sub- message of message, command character and the sub- message of data delimiter;By the sub- message of target data identifier, the sub- message of data symbols, control Accord with sub- message and the sub- message of data delimiter to be combined according to message format, generate data message.
As shown in figure 4, in one embodiment of the invention, the data message processing unit also includes:
Second receiving unit 309, for receiving at least one pending report that at least one smart machine of outside sends Text;
Processing unit 310, what the smart machine of each outside for being received for the second receiving unit 309 sent treats The corresponding relation that treatment message, the entity class determined according to the first determining unit 303 and the first setting unit 301 are set, to working as Preceding clear text carries out unserializing treatment, determines current entity object.
In one embodiment of the invention, processing unit 310, for being decoded to currently pending message, generation Current string;Determine current data identifier in current string, current command character, current data separator and current number According to symbol;According to corresponding relation, the corresponding current attribute symbol of current data identifier is determined;According to entity class, current attribute is accorded with, Current command character, current data separator and current data symbol are arranged, and determine current entity object.
As shown in figure 5, in one embodiment of the invention, the data message processing unit also includes:
4th determining unit 311, for the current entity object determined according to processing unit 310, determines that at least one works as The property value of preceding attribute and each current attribute;
Second transmitting element 312, at least one current attribute and each for the 4th determining unit 311 to be determined are worked as The property value of preceding attribute is sent to the user of outside.
To sum up, each embodiment of the invention at least has the effect that:
1st, in embodiments of the present invention, the method is by the attribute information in control instruction, dynamic creation entity object, and According to message format and the attribute symbol and the corresponding relation of data identifier that set, serializing treatment is carried out to entity object, obtained To data message the method by self-defined message format and attribute symbol and the corresponding relation of data identifier, realize setting difference The unified generation of standby data message, when many smart machines are managed simultaneously, it is not necessary to generate various data messages, improve number According to Message processing efficiency.
2nd, in embodiments of the present invention, pending data message can be parsed by unserializing process, is obtained Entity object.The method accords with the corresponding relation with data identifier by self-defined message format and attribute, and realization sets to difference The analytic uniform of standby data message, when many smart machines are managed simultaneously, it is not necessary to parsed respectively to data message, carried Data message treatment effeciency high.
3rd, in embodiments of the present invention, first different types of character can be encoded, then will be obtained after coding Different types of sub- message is combined according to message format, obtains data message;First different types of character can also be entered Row combination, then to after combination formed character string encode, obtain data message.
4th, in embodiments of the present invention, in resolving, entity object can be analyzed, determines attribute and correspondence Property value, and then determine smart machine working condition.User can determine control instruction according to the working condition, adjustment The working condition of smart machine.
The contents such as the information exchange between each unit, implementation procedure in said apparatus, due to implementing with the inventive method Example is based on same design, and particular content can be found in the narration in the inventive method embodiment, and here is omitted.
It should be noted that herein, such as first and second etc relational terms are used merely to an entity Or operation makes a distinction with another entity or operation, and not necessarily require or imply these entities or exist between operating Any this actual relation or order.And, term " including ", "comprising" or its any other variant be intended to it is non- It is exclusive to include, so that process, method, article or equipment including a series of key elements not only include those key elements, But also other key elements including being not expressly set out, or also include by this process, method, article or equipment are solid Some key elements.In the absence of more restrictions, the key element limited by sentence " including a 〃 ", does not arrange Except also there is other identical factor in the process including the key element, method, article or equipment.
One of ordinary skill in the art will appreciate that:Realizing all or part of step of above method embodiment can pass through Programmed instruction related hardware is completed, and foregoing program can be stored in the storage medium of embodied on computer readable, the program Upon execution, the step of including above method embodiment is performed;And foregoing storage medium includes:ROM, RAM, magnetic disc or light Disk etc. is various can be with the medium of store program codes.
It is last it should be noted that:Presently preferred embodiments of the present invention is the foregoing is only, skill of the invention is merely to illustrate Art scheme, is not intended to limit the scope of the present invention.All any modifications made within the spirit and principles in the present invention, Equivalent, improvement etc., are all contained in protection scope of the present invention.

Claims (10)

1. a kind of data message processing method, it is characterised in that pre-set the corresponding relation of attribute symbol and data identifier, in advance Message format is first set, entity class is predefined, is also included:
Receive the control instruction of outside input;
According to the control instruction, the property value of at least one attribute to be controlled and each attribute to be controlled is determined;
According to the property value of the entity class, at least one attribute to be controlled and each attribute to be controlled, it is determined that Target entity object;
According to the message format and the corresponding relation, serializing treatment is carried out to the target entity object, generate data Message;
The data message is sent at least one smart machine of outside, to control at least one work of smart machine Make state.
2. method according to claim 1, it is characterised in that
It is described that serializing treatment is carried out to the target entity object according to the message format and the corresponding relation, generate Data message, including:
Determine attribute symbol to be controlled in the target entity object, command character, data delimiter and data symbols;
According to the corresponding relation, determine that the attribute to be controlled accords with corresponding target data identifier;
The target data identifier, the data symbols, the command character and the data delimiter are encoded respectively, it is raw Into the corresponding sub- message of target data identifier, the sub- message of data symbols, the sub- message of command character and the sub- message of data delimiter;
The sub- message of target data identifier, the sub- message of data symbols, the sub- message of command character and the sub- message of data delimiter are pressed According to message format combination, the data message is generated.
3. method according to claim 1, it is characterised in that further include:
Receive at least one clear text that at least one smart machine of outside sends;
For clear text each described, according to the entity class and the corresponding relation, currently pending message is entered The treatment of row unserializing, determines current entity object.
4. method according to claim 3, it is characterised in that
It is described that unserializing treatment is carried out to currently pending message according to the entity class and the corresponding relation, it is determined that working as Preceding entity object, including:
The currently pending message is decoded, current string is generated;
Determine current data identifier in the current string, current command character, current data separator and current data Symbol;
According to the corresponding relation, the corresponding current attribute symbol of the current data identifier is determined;
According to the entity class, current attribute symbol, the current command character, current data separator and current data are accorded with Arranged, determined the current entity object.
5. method according to claim 3, it is characterised in that
Described according to the entity class and the corresponding relation, unserializing treatment is carried out to currently pending message, it is determined that After current entity object, further include:
According to the current entity object, the property value of at least one current attribute and each current attribute is determined;
The property value of at least one current attribute and each current attribute is sent to the user of outside.
6. a kind of data message processing unit, it is characterised in that including:
First setting unit, for symbol and the corresponding relation of data identifier of setting a property;
Second setting unit, for setting message format;
First determining unit, for determining entity class;
First receiving unit, the control instruction for receiving outside input;
Second determining unit, for the control instruction received according to first receiving unit, determines that at least one is to be controlled The property value of attribute processed and each attribute to be controlled;
3rd determining unit, it is true for the entity class that is determined according to first determining unit, second determining unit Described at least one fixed attribute to be controlled and the property value of each attribute to be controlled, determine target entity object;
Generation unit, is set for the message format set according to second setting unit and first setting unit The corresponding relation, serializing treatment carried out to the target entity object that the 3rd determining unit determines, generate number According to message;
First transmitting element, at least one intelligence for the data message that the generation unit is generated to be sent to outside Equipment, to control at least one working condition of smart machine.
7. data message processing unit according to claim 6, it is characterised in that
The generation unit, for being combined to the target entity object according to the message format, generates message format Character string;Determine attribute symbol to be controlled in the message format character string, command character, data delimiter and data symbols;According to The corresponding relation, determines that the attribute to be controlled accords with corresponding target data identifier;The target data is identified respectively Symbol, the data symbols, the command character and the data delimiter are encoded, and generate corresponding target data identifier report Text, the sub- message of data symbols, the sub- message of command character and the sub- message of data delimiter;By the sub- message of target data identifier, number Combined according to the message format according to sub- message, the sub- message of command character and the sub- message of data delimiter is accorded with, generate the datagram Text.
8. data message processing unit according to claim 6, it is characterised in that further include:
Second receiving unit, for receiving at least one clear text that at least one smart machine of outside sends;
Processing unit, described in the smart machine of each outside for being received for second receiving unit sends It is described right that clear text, the entity class determined according to first determining unit and first setting unit are set Should be related to, unserializing treatment is carried out to currently pending message, determine current entity object.
9. data message processing unit according to claim 8, it is characterised in that
The processing unit, for being decoded to the currently pending message, generates current string;Determine described current Current data identifier, current command character, current data separator and current data symbol in character string;Closed according to the correspondence System, determines the corresponding current attribute symbol of the current data identifier;According to the entity class, to current attribute symbol, institute State current command character, current data separator and current data symbol to be arranged, determine the current entity object.
10. data message processing unit according to claim 8, it is characterised in that further include:
4th determining unit, for the current entity object determined according to the processing unit, determines that at least one is current The property value of attribute and each current attribute;
Second transmitting element, for described at least one current attribute for determining the 4th determining unit and each The property value of current attribute is sent to the user of outside.
CN201710093091.1A 2017-02-21 2017-02-21 Data message processing method and device Active CN106850145B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710093091.1A CN106850145B (en) 2017-02-21 2017-02-21 Data message processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710093091.1A CN106850145B (en) 2017-02-21 2017-02-21 Data message processing method and device

Publications (2)

Publication Number Publication Date
CN106850145A true CN106850145A (en) 2017-06-13
CN106850145B CN106850145B (en) 2020-04-21

Family

ID=59133363

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710093091.1A Active CN106850145B (en) 2017-02-21 2017-02-21 Data message processing method and device

Country Status (1)

Country Link
CN (1) CN106850145B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110932952A (en) * 2019-12-17 2020-03-27 杭州行至云起科技有限公司 Control system, control method and upgrading method of intelligent household product

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103236959A (en) * 2013-05-09 2013-08-07 中国银行股份有限公司 Test system and test method for testing business processing module
CN103532700A (en) * 2013-09-25 2014-01-22 国家电网公司 Communication message encryption and decryption model of electricity consumption information collecting system
CN105281943A (en) * 2014-07-25 2016-01-27 中兴通讯股份有限公司 Webpage-based remote equipment management method and device
US20160103911A1 (en) * 2014-10-08 2016-04-14 Google Inc. Time variant data profile for a fabric network

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103236959A (en) * 2013-05-09 2013-08-07 中国银行股份有限公司 Test system and test method for testing business processing module
CN103532700A (en) * 2013-09-25 2014-01-22 国家电网公司 Communication message encryption and decryption model of electricity consumption information collecting system
CN105281943A (en) * 2014-07-25 2016-01-27 中兴通讯股份有限公司 Webpage-based remote equipment management method and device
US20160103911A1 (en) * 2014-10-08 2016-04-14 Google Inc. Time variant data profile for a fabric network

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110932952A (en) * 2019-12-17 2020-03-27 杭州行至云起科技有限公司 Control system, control method and upgrading method of intelligent household product
CN110932952B (en) * 2019-12-17 2021-12-21 杭州行至云起科技有限公司 Control system, control method and upgrading method of intelligent household product

Also Published As

Publication number Publication date
CN106850145B (en) 2020-04-21

Similar Documents

Publication Publication Date Title
US9223765B1 (en) Encoding and decoding data using context model grouping
CN102246449B (en) Method for blind detection of physical downlink control channel (pdcch), and method and device for scheduling resources
CN109831302A (en) PDF electronic signature method and system based on national secret algorithm
CN103095726A (en) Processing method and device of protocol interpreter
CN107659381A (en) Coding method and device
CN104572781A (en) Method and device for generating transaction log
CN106850145A (en) A kind of data message processing method and device
CN104025520A (en) Lookup table creation method and query method, and controller, forwarding device and system therefor
CN105574032A (en) Rule matching operation method and device
US9830326B2 (en) Identifying data offsets using binary masks
KR102481162B1 (en) Subscription data push method and device in the Internet of Things, the device and storage medium
CN103856969A (en) Method, device and system for counting network element characteristic parameters
CN104205745A (en) Method and device for processing message
CN106533850A (en) Panel scene control method based on NFC card mode
CN116505954B (en) Huffman coding method, system, device and medium
CN109522072B (en) Control interface generation method and device
CN115514656B (en) Object model adaptation method and device
CN105471726B (en) The method and apparatus of retransmitting paramater transmitting
CN103002505A (en) Data communication method and data communication equipment
CN109068286A (en) A kind of method, medium and the equipment of information parsing
CN111800773B (en) Bluetooth Mesh node message repetition identification method, system and storage medium
CN104598464A (en) Information processing method and electronic equipment
CN207501208U (en) Smoke exhaust ventilator control device
CN106845595A (en) A kind of coding method of Quick Response Code, coding/decoding method, code device and decoding apparatus
CN108920478A (en) Batch data segmented acquisition approach based on mini system

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
TA01 Transfer of patent application right

Effective date of registration: 20200319

Address after: 250100 Ji'nan high tech Zone, Shandong, No. 1036 wave road

Applicant after: INSPUR GENERAL SOFTWARE Co.,Ltd.

Address before: 250100, Ji'nan province high tech Zone, Sun Village Branch Road, No. 2877, building, floor, building, on the first floor

Applicant before: JINAN INSPUR HI-TECH INVESTMENT AND DEVELOPMENT Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant