CN106850145B - Data message processing method and device - Google Patents

Data message processing method and device Download PDF

Info

Publication number
CN106850145B
CN106850145B CN201710093091.1A CN201710093091A CN106850145B CN 106850145 B CN106850145 B CN 106850145B CN 201710093091 A CN201710093091 A CN 201710093091A CN 106850145 B CN106850145 B CN 106850145B
Authority
CN
China
Prior art keywords
message
current
data
attribute
symbol
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.)
Active
Application number
CN201710093091.1A
Other languages
Chinese (zh)
Other versions
CN106850145A (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
Inspur General Software 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 Inspur General Software Co Ltd filed Critical Inspur General Software 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

Images

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 data message processing method and a device, wherein the method dynamically creates an entity object through attribute information in a control instruction, and carries out serialization processing on the entity object according to a set message format and a corresponding relation between an attribute symbol and a data identifier to obtain a data message. The method realizes the unified processing of the data messages of different equipment by self-defining the corresponding relation between the message format and the attribute symbol and the data identifier, and when a plurality of intelligent equipment are managed simultaneously, the data messages do not need to be processed respectively, thereby improving the processing efficiency of the data messages.

Description

Data message processing method and device
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for processing a data message.
Background
With the increase in the degree of informatization, various kinds of intelligent devices, for example, intelligent machine tools in factories, are rapidly developed. In practical application scenarios, it is generally necessary to manage multiple intelligent devices simultaneously. In the management process, the control command needs to be encoded into a data message identified by the intelligent device to control the operation of the intelligent device. Therefore, the processing of data packets is crucial for the management of intelligent devices.
In the prior art, the intelligent devices are different, the formats of the data messages are also different, and correspondingly, the processing processes of the data messages are also different. When a plurality of intelligent devices are managed simultaneously, a plurality of data messages need to be generated according to different message formats. For example, the fan rotation speeds of 3 pieces of intelligent equipment are controlled simultaneously according to the control instruction, and the data message formats of the 3 pieces of intelligent equipment are A, B, C respectively, so that the control instruction needs to be processed respectively to obtain three data messages with the format of A, B, C, and the three data messages are used to control the corresponding intelligent equipment.
When the number of managed intelligent devices is large, the data message processing efficiency in the prior art is low.
Disclosure of Invention
The embodiment of the invention provides a data message processing method and device, which can improve the data message processing efficiency.
In a first aspect, an embodiment of the present invention provides a data packet processing method, where a correspondence between an attribute symbol and a data identifier is preset, a packet format is preset, and an entity class is predetermined, and the method further includes:
receiving a control instruction input from the outside;
determining at least one attribute to be controlled and an attribute value of each attribute to be controlled according to the control instruction;
determining a target entity object according to the entity class, the at least one attribute to be controlled and the attribute value of each attribute to be controlled;
according to the message format and the corresponding relation, carrying out serialization processing on the target entity object to generate a data message;
and sending the data message to at least one external intelligent device to control the working state of the at least one intelligent device.
Preferably, the first and second electrodes are formed of a metal,
the serializing the target entity object according to the message format and the corresponding relation to generate a data message, including:
combining the target entity objects according to the message format to generate a message format character string;
determining attribute characters to be controlled, control characters, data separators and data characters in the message format character strings;
determining a target data identifier corresponding to the attribute character to be controlled according to the corresponding relation;
respectively encoding the target data identifier, the data symbol, the control symbol and the data separator to generate a corresponding target data identifier sub-message, a corresponding data symbol sub-message, a corresponding control symbol sub-message and a corresponding data separator sub-message;
and combining the target data identifier sub-message, the data symbol sub-message, the control symbol sub-message and the data separator sub-message according to the message format to generate the data message.
Preferably, the first and second electrodes are formed of a metal,
further comprising:
receiving at least one message to be processed sent by at least one external intelligent device;
and performing deserialization processing on the current message to be processed according to the entity class and the corresponding relation aiming at each message to be processed, and determining a current entity object.
Preferably, the first and second electrodes are formed of a metal,
the deserializing processing is performed on the current message to be processed according to the entity class and the corresponding relation, and the determining of the current entity object comprises the following steps:
decoding the current message to be processed to generate a current character string;
determining a current data identifier, a current control symbol, a current data separator symbol and a current data symbol in the current character string;
determining a current attribute symbol corresponding to the current data identifier according to the corresponding relation;
and arranging the current attribute symbol, the current control symbol, the current data separator symbol and the current data symbol according to the entity class to determine the current entity object.
Preferably, the first and second electrodes are formed of a metal,
after the deserializing is performed on the current message to be processed according to the entity class and the corresponding relationship and the current entity object is determined, the method further comprises the following steps:
determining at least one current attribute and an attribute value of each current attribute according to the current entity object;
and sending the at least one current attribute and the attribute value of each current attribute to an external user.
In a second aspect, an embodiment of the present invention provides a data packet processing apparatus, including:
a first setting unit for setting a correspondence between the attribute symbol and the data identifier;
the second setting unit is used for setting the message format;
a first determining unit, configured to determine an entity class;
the first receiving unit is used for receiving an externally input control instruction;
a second determining unit, configured to determine at least one attribute to be controlled and an attribute value of each attribute to be controlled according to the control instruction received by the first receiving unit;
a third determining unit, configured to determine a target entity object according to the entity class determined by the first determining unit, the at least one attribute to be controlled determined by the second determining unit, and an attribute value of each attribute to be controlled;
a generating unit, configured to perform serialization processing on the target entity object determined by the third determining unit according to the message format set by the second setting unit and the corresponding relationship set by the first setting unit, and generate a data message;
and the first sending unit is used for sending the data message generated by the generating unit to at least one external intelligent device so as to control the working state of the at least one intelligent device.
Preferably, the first and second electrodes are formed of a metal,
the generating unit is used for combining the target entity objects according to the message format to generate a message format character string; determining attribute characters to be controlled, control characters, data separators and data characters in the message format character strings; determining a target data identifier corresponding to the attribute character to be controlled according to the corresponding relation; respectively encoding the target data identifier, the data symbol, the control symbol and the data separator to generate a corresponding target data identifier sub-message, a corresponding data symbol sub-message, a corresponding control symbol sub-message and a corresponding data separator sub-message; and combining the target data identifier sub-message, the data symbol sub-message, the control symbol sub-message and the data separator sub-message according to the message format to generate the data message.
Preferably, the first and second electrodes are formed of a metal,
further comprising:
the second receiving unit is used for receiving at least one message to be processed sent by at least one external intelligent device;
and the processing unit is used for performing deserialization processing on the current message to be processed according to the entity class determined by the first determining unit and the corresponding relation set by the first setting unit aiming at the message to be processed sent by each external intelligent device received by the second receiving unit, and determining a current entity object.
Preferably, the first and second electrodes are formed of a metal,
the processing unit is used for decoding the current message to be processed to generate a current character string; determining a current data identifier, a current control symbol, a current data separator symbol and a current data symbol in the current character string; determining a current attribute symbol corresponding to the current data identifier according to the corresponding relation; and arranging the current attribute symbol, the current control symbol, the current data separator symbol and the current data symbol according to the entity class to determine the current entity object.
Preferably, the first and second electrodes are formed of a metal,
further comprising:
a fourth determining unit, configured to determine at least one current attribute and an attribute value of each current attribute according to the current entity object determined by the processing unit;
a second sending unit, configured to send the at least one current attribute determined by the fourth determining unit and the attribute value of each current attribute to an external user.
In a third aspect, an embodiment of the present invention provides a readable medium, which includes an execution instruction, and when a processor of a storage controller executes the execution instruction, the storage controller executes any one of the methods described above.
In a fourth aspect, an embodiment of the present invention provides a storage controller, including: a processor, a memory, and a bus; the memory is used for storing execution instructions, the processor is connected with the memory through the bus, and when the storage controller runs, the processor executes the execution instructions stored in the memory to enable the storage controller to execute any one of the methods.
The embodiment of the invention provides a data message processing method and a device, wherein the method dynamically creates entity objects through attribute information in a control instruction, and carries out serialization processing on the entity objects according to the set corresponding relation between a message format and an attribute symbol as well as a data identifier to obtain the data message.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a flow chart of a data message processing method according to an embodiment of the present invention;
fig. 2 is a flow chart of another data packet processing method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a data message processing apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of another data packet processing apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of another data packet processing apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer and more complete, the technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention, and based on the embodiments of the present invention, all other embodiments obtained by a person of ordinary skill in the art without creative efforts belong to the scope of the present invention.
As shown in fig. 1, an embodiment of the present invention provides a data message processing method, which may include the following steps:
step 101: setting a corresponding relation between the attribute symbol and the data identifier, setting a message format, and determining an entity class;
step 102: receiving a control instruction input from the outside;
step 103: determining at least one attribute to be controlled and an attribute value of each attribute to be controlled according to the control instruction;
step 104: determining a target entity object according to the entity class, at least one attribute to be controlled and the attribute value of each attribute to be controlled;
step 105: according to the message format and the corresponding relation, carrying out serialization processing on the target entity object to generate a data message;
step 106: and sending the data message to at least one external intelligent device to control the working state of the at least one intelligent device.
In the embodiment shown in fig. 1, an entity object is dynamically created through attribute information in a control instruction, and the entity object is serialized according to the set message format and the corresponding relationship between an attribute symbol and a data identifier, so as to obtain a data message. The method realizes the unified processing of the data messages of different equipment by self-defining the corresponding relation between the message format and the attribute symbol and the data identifier, and when a plurality of intelligent equipment are managed simultaneously, the data messages do not need to be processed respectively, thereby improving the processing efficiency of the data messages.
In an embodiment of the present invention, in order to convert the target entity object into a data packet according to a customized packet format, so as to enable the smart device to recognize the target entity object, step 105 includes: combining the target entity objects according to the message format to generate a message format character string; determining attribute characters to be controlled, control characters, data separators and data characters in the message format character strings; determining a target data identifier corresponding to the attribute symbol to be controlled according to the corresponding relation; respectively coding the target data identifier, the data symbol, the control symbol and the data separator to generate a corresponding target data identifier sub-message, a corresponding data symbol sub-message, a corresponding control symbol sub-message and a corresponding data separator sub-message; and combining the target data identifier sub-message, the data symbol sub-message, the control symbol sub-message and the data separator sub-message according to the message format to generate the data message.
The message formats are various, and the message formats include the arrangement sequence of control symbols, data separators and the like in the generated data messages. For example, one message format is "RS GS [ Z ] GS [ SD ] GS [ P ] GS [ Pr ] RS EOT", where RS, GS, and EOT are control symbols and [ ] is a target data identifier.
In this embodiment, different types of characters in the target entity object are encoded by using ASCII codes, and a plurality of sub-messages obtained after encoding are combined according to the arrangement order of the characters in the message format to form a data message. It should be noted that different characters may be encoded and then combined, or different characters may be encoded after being combined according to a message format, and a processing process is not unique.
The target entity object varies from entity class to entity class, and in this embodiment, a DataEntity class may be used.
The following is an implementation code corresponding to a data message generation process:
Figure BDA0001229506520000071
Figure BDA0001229506520000081
Figure BDA0001229506520000091
in an embodiment of the present invention, in order to perform uniform processing on messages to be processed sent by different intelligent devices, the method further includes: receiving at least one message to be processed sent by at least one external intelligent device; and performing deserialization processing on the current message to be processed according to the entity class and the corresponding relation aiming at each message to be processed, and determining the current entity object.
In this embodiment, the entity class may be used to perform unified parsing on different to-be-processed messages sent by different intelligent devices, so as to obtain a current entity object. The deserialization process corresponds to the serialization process described above.
In an embodiment of the present invention, in order to analyze a data packet to be processed and obtain an operating state of an intelligent device, deserializing a current packet to be processed according to an entity class and a corresponding relationship, and determining a current entity object includes: decoding the current message to be processed to generate a current character string; determining a current data identifier, a current control symbol, a current data separator and a current data symbol in a current character string; determining a current attribute symbol corresponding to the current data identifier according to the corresponding relation; and arranging the current attribute symbol, the current control symbol, the current data separator and the current data symbol according to the entity class to determine the current entity object.
In this embodiment, for each message to be processed, an ASCII code is used for decoding, and the decoded character string is processed according to a format corresponding to an entity class to determine a corresponding entity object.
In an embodiment of the present invention, in order to obtain attribute information of an intelligent device through an entity object, the method further includes: determining at least one current attribute and an attribute value of each current attribute according to the current entity object; and sending the at least one current attribute and the attribute value of each current attribute to an external user.
In this embodiment, the entity objects are as follows:
DataEntitydataEntity=new DataEntity();
dataEntity.Speed="2100";
dataEntity.Power="2200";
dataEntity.Pressure="3000";
entity class DataEntity is shown below:
Figure BDA0001229506520000101
according to the corresponding relationship between the entity class and the entity object, determining the attribute comprises: speed, Power, Pressure, corresponding attribute values are 2100, 2300, 3000 respectively.
The following is an implementation code corresponding to a data message parsing process:
Figure BDA0001229506520000102
Figure BDA0001229506520000111
Figure BDA0001229506520000121
as shown in fig. 2, the embodiment of the present invention takes the simultaneous management of 5 intelligent devices as an example to describe in detail the data message processing method, which may include the following steps:
step 201: setting the corresponding relation between the attribute symbol and the data identifier, setting the message format and determining the entity class.
Presetting a message format, RS GS [ Z ] GS [ SD ] GS [ P ] GS [ Pr ] RS EOT.
Determining the entity class as DataEntity, wherein the specific format is as follows:
Figure BDA0001229506520000122
the correspondence between the attribute and the data identifier is preset, and as shown in table 1,
TABLE 1
Data item name Attribute symbol Data identifier
Status of state EquipState Z
Rotational speed Speed SD
Pressure of Pressure P
Power of Power Pr
Step 202: receiving a control instruction input from the outside, and determining at least one attribute to be controlled and an attribute value of each attribute to be controlled according to the control instruction.
The control instructions include: the plant state is on (01), set at 2100 rpm, power 2200, pressure 3000.
It should be noted that, in this embodiment, the startup is replaced by a value of 01, that is, when the attribute to be controlled is the device state, the corresponding attribute value is 01.
Step 203: and determining a target entity object according to the entity class, at least one attribute to be controlled and the attribute value of each attribute to be controlled.
According to step 201 and step 202, the target entity object is determined as follows:
DataEntitydataEntity=new DataEntity();
dataEntity.EquipState="01";
dataEntity.Speed="2100";
dataEntity.Power="2200";
dataEntity.Pressure="3000";
step 204: and determining attribute characters to be controlled, control characters, data separators and data characters in the target entity object.
The attribute character to be controlled includes: EquisState, Speed, Power, Pressure; the control symbol includes: RS (start bit), EOT (end bit); data delimiter is "; "; the data symbol includes: 01. 2100, 2200, 3000.
Step 205: and determining the target data identifier corresponding to the attribute character to be controlled according to the corresponding relation.
According to table 1, the target data identifiers corresponding to EquisState, Speed, Power, and Pressure are determined to be E, SD, P, and Pr, respectively.
Step 206: and respectively coding the target data identifier, the data symbol, the control symbol and the data separator to generate a corresponding target data identifier sub-message, a corresponding data symbol sub-message, a corresponding control symbol sub-message and a corresponding data separator sub-message.
The target data identifier, the data symbol, the control symbol and the data delimiter are encoded separately.
Taking the encoding of the control symbol as an example, the relationship between the control symbol and the ASCII code is shown in table 2,
TABLE 2
Content providing method and apparatus Control symbol ASCII code
Start bit RS 30
End bit EOT 4
In this embodiment, three control symbol sub-packets are generated for the control symbol "RS, EOT", which are "30, 4", and so on, to obtain other types of sub-packets.
Step 207: and combining the target data identifier sub-message, the data symbol sub-message, the control symbol sub-message and the data separator sub-message according to the message format to generate the data message.
The sub-messages are combined according to the message format to generate a data message '3029 … … 304'.
Step 208: and sending the data message to 5 external intelligent devices to control the operation of the 5 intelligent devices.
The data message "3029 … … 304" is sent to 5 external smart devices, and the 5 smart devices can be powered on and adjust the rotating speed to 2100, the power to 2200, and the pressure to 3000 according to the data message "3029 … … 304".
Step 209: receiving 5 messages to be processed sent by 5 external intelligent devices, and decoding the current message to be processed aiming at each message to be processed to generate a current character string.
In this embodiment, a message to be processed of one of the intelligent devices a is taken as an example. The message to be processed is '3029 … … 304', the current message to be processed is decoded, and the current character string generated is 'RS GS Z01GS SD2100GSP2200GS Pr3000RS EOT'.
Step 210: a current data identifier, a current control symbol, a current data separator symbol, and a current data symbol in the current string are determined.
The current data identifier includes: z, SD, P, Pr;
the current control symbol includes: RS, EOT;
the current data separator includes: GS, GS;
the current data symbol includes: 01. 2100, 2200, 3000.
Step 211: and determining the current attribute symbol corresponding to the current data identifier according to the corresponding relation.
According to table 1, the current attribute symbols corresponding to Z, SD, P, Pr are determined to be EquipState, Speed, Power, Pressure, respectively.
Step 212: and arranging the current attribute symbol, the current control symbol, the current data separator and the current data symbol according to the entity class to determine the current entity object.
Obtaining the current entity object as:
DataEntitydataEntity=new DataEntity();
dataEntity.EquipState="01";
dataEntity.Speed="2100";
dataEntity.Power="2200";
dataEntity.Pressure="3000";
step 213: and determining at least one current attribute and the attribute value of each current attribute according to the current entity object.
According to the current physical object, the state of the equipment is determined to be power-on (01), the rotating speed is determined to be 2100, the power is determined to be 2200, and the pressure is determined to be 3000.
Step 214: and sending the at least one current attribute and the attribute value of each current attribute to an external user.
The device state is 01 (starting up), the rotating speed is 2100, the power 2200 and the pressure 3000 are sent to an external user, and the user can know the running state of the current intelligent device through the working state and further send a control instruction to the current intelligent device. For example, if the rated power is 2200 and the current smart device power is 2500, the control command may be "power 2200".
It should be noted that generation and analysis of the data packet are not sequentially performed, and this embodiment takes the example of first generating the data packet and then analyzing the data packet as an example.
As shown in fig. 3, an embodiment of the present invention provides a data packet processing apparatus, including:
a first setting unit 301 for setting a correspondence relationship between the attribute symbol and the data identifier;
a second setting unit 302, configured to set a message format;
a first determining unit 303, configured to determine an entity class;
a first receiving unit 304, configured to receive an externally input control instruction;
a second determining unit 305, configured to determine at least one attribute to be controlled and an attribute value of each attribute to be controlled according to the control instruction received by the first receiving unit 304;
a third determining unit 306, configured to determine a target entity object according to the entity class determined by the first determining unit 303, the at least one attribute to be controlled determined by the second determining unit 305, and the attribute value of each attribute to be controlled;
a generating unit 307, configured to perform serialization processing on the target entity object determined by the third determining unit 306 according to the message format set by the second setting unit 302 and the corresponding relationship set by the first setting unit 301, so as to generate a data message;
a first sending unit 308, configured to send the data message generated by the generating unit 307 to at least one external intelligent device, so as to control an operating state of the at least one intelligent device.
In an embodiment of the present invention, the generating unit 307 is configured to combine the target entity objects according to a message format to generate a message format character string; determining attribute characters to be controlled, control characters, data separators and data characters in the message format character strings; determining a target data identifier corresponding to the attribute symbol to be controlled according to the corresponding relation; respectively coding the target data identifier, the data symbol, the control symbol and the data separator to generate a corresponding target data identifier sub-message, a corresponding data symbol sub-message, a corresponding control symbol sub-message and a corresponding data separator sub-message; and combining the target data identifier sub-message, the data symbol sub-message, the control symbol sub-message and the data separator sub-message according to the message format to generate the data message.
As shown in fig. 4, in an embodiment of the present invention, the data packet processing apparatus further includes:
a second receiving unit 309, configured to receive at least one to-be-processed packet sent by at least one external smart device;
the processing unit 310 is configured to perform deserialization processing on the current packet to be processed according to the entity class determined by the first determining unit 303 and the corresponding relationship set by the first setting unit 301, and determine a current entity object, for the packet to be processed sent by each external intelligent device and received by the second receiving unit 309.
In an embodiment of the present invention, the processing unit 310 is configured to decode a current message to be processed, and generate a current character string; determining a current data identifier, a current control symbol, a current data separator and a current data symbol in a current character string; determining a current attribute symbol corresponding to the current data identifier according to the corresponding relation; and arranging the current attribute symbol, the current control symbol, the current data separator and the current data symbol according to the entity class to determine the current entity object.
As shown in fig. 5, in an embodiment of the present invention, the data packet processing apparatus further includes:
a fourth determining unit 311, configured to determine at least one current attribute and an attribute value of each current attribute according to the current entity object determined by the processing unit 310;
a second sending unit 312, configured to send the at least one current attribute and the attribute value of each current attribute determined by the fourth determining unit 311 to an external user.
In summary, the embodiments of the present invention have at least the following effects:
1. in the embodiment of the invention, the method dynamically creates the entity object through the attribute information in the control instruction, and carries out serialization processing on the entity object according to the set corresponding relationship between the message format and the attribute symbol and the data identifier to obtain the data message.
2. In the embodiment of the invention, the data message to be processed can be analyzed through the deserialization process to obtain the entity object. The method realizes the uniform analysis of the data messages of different equipment by self-defining the corresponding relation between the message format and the attribute symbol and the data identifier, does not need to analyze the data messages respectively when a plurality of intelligent equipment are managed simultaneously, and improves the processing efficiency of the data messages.
3. In the embodiment of the invention, different types of characters can be coded firstly, and then different types of sub-messages obtained after coding are combined according to the message format to obtain the data message; the different types of characters can be combined firstly, and then the character strings formed after combination are coded to obtain the data message.
4. In the embodiment of the invention, in the analysis process, the entity object can be analyzed, the attribute and the corresponding attribute value are determined, and the working state of the intelligent equipment is further determined. The user can determine the control instruction according to the working state and adjust the working state of the intelligent device.
Because the information interaction, execution process, and other contents between the units in the device are based on the same concept as the method embodiment of the present invention, specific contents may refer to the description in the method embodiment of the present invention, and are not described herein again.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, the inclusion of an element by the phrase "comprising a" does not exclude the presence of other similar elements in a process, method, article, or apparatus that comprises the element.
Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it is to be noted that: the above description is only a preferred embodiment of the present invention, and is only used to illustrate the technical solutions of the present invention, and not to limit the protection scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (8)

1. A data message processing method is characterized in that the corresponding relation between an attribute symbol and a data identifier is preset, the message format is preset, and an entity class is predetermined, and the method further comprises the following steps:
receiving a control instruction input from the outside;
determining at least one attribute to be controlled and an attribute value of each attribute to be controlled according to the control instruction;
determining a target entity object according to the entity class, the at least one attribute to be controlled and the attribute value of each attribute to be controlled;
according to the message format and the corresponding relation, carrying out serialization processing on the target entity object to generate a data message;
sending the data message to at least one external intelligent device to control the working state of the at least one intelligent device;
the serializing the target entity object according to the message format and the corresponding relation to generate a data message, including:
combining the target entity objects according to the message format to generate a message format character string;
determining attribute characters to be controlled, control characters, data separators and data characters in the message format character strings;
determining a target data identifier corresponding to the attribute character to be controlled according to the corresponding relation;
respectively encoding the target data identifier, the data symbol, the control symbol and the data separator to generate a corresponding target data identifier sub-message, a corresponding data symbol sub-message, a corresponding control symbol sub-message and a corresponding data separator sub-message;
and combining the target data identifier sub-message, the data symbol sub-message, the control symbol sub-message and the data separator sub-message according to the message format to generate the data message.
2. The method of claim 1, further comprising:
receiving at least one message to be processed sent by at least one external intelligent device;
and performing deserialization processing on the current message to be processed according to the entity class and the corresponding relation aiming at each message to be processed, and determining a current entity object.
3. The method of claim 2,
the deserializing processing is performed on the current message to be processed according to the entity class and the corresponding relation, and the determining of the current entity object comprises the following steps:
decoding the current message to be processed to generate a current character string;
determining a current data identifier, a current control symbol, a current data separator symbol and a current data symbol in the current character string;
determining a current attribute symbol corresponding to the current data identifier according to the corresponding relation;
and arranging the current attribute symbol, the current control symbol, the current data separator symbol and the current data symbol according to the entity class to determine the current entity object.
4. The method of claim 2,
after the deserializing is performed on the current message to be processed according to the entity class and the corresponding relationship and the current entity object is determined, the method further comprises the following steps:
determining at least one current attribute and an attribute value of each current attribute according to the current entity object;
and sending the at least one current attribute and the attribute value of each current attribute to an external user.
5. A data message processing apparatus, comprising:
a first setting unit for setting a correspondence between the attribute symbol and the data identifier;
the second setting unit is used for setting the message format;
a first determining unit, configured to determine an entity class;
the first receiving unit is used for receiving an externally input control instruction;
a second determining unit, configured to determine at least one attribute to be controlled and an attribute value of each attribute to be controlled according to the control instruction received by the first receiving unit;
a third determining unit, configured to determine a target entity object according to the entity class determined by the first determining unit, the at least one attribute to be controlled determined by the second determining unit, and an attribute value of each attribute to be controlled;
a generating unit, configured to perform serialization processing on the target entity object determined by the third determining unit according to the message format set by the second setting unit and the corresponding relationship set by the first setting unit, and generate a data message;
the first sending unit is used for sending the data message generated by the generating unit to at least one external intelligent device so as to control the working state of the at least one intelligent device;
the generating unit is used for combining the target entity objects according to the message format to generate a message format character string; determining attribute characters to be controlled, control characters, data separators and data characters in the message format character strings; determining a target data identifier corresponding to the attribute character to be controlled according to the corresponding relation; respectively encoding the target data identifier, the data symbol, the control symbol and the data separator to generate a corresponding target data identifier sub-message, a corresponding data symbol sub-message, a corresponding control symbol sub-message and a corresponding data separator sub-message; and combining the target data identifier sub-message, the data symbol sub-message, the control symbol sub-message and the data separator sub-message according to the message format to generate the data message.
6. The datagram processing device of claim 5, further comprising:
the second receiving unit is used for receiving at least one message to be processed sent by at least one external intelligent device;
and the processing unit is used for performing deserialization processing on the current message to be processed according to the entity class determined by the first determining unit and the corresponding relation set by the first setting unit aiming at the message to be processed sent by each external intelligent device received by the second receiving unit, and determining a current entity object.
7. The datagram processing device of claim 6,
the processing unit is used for decoding the current message to be processed to generate a current character string; determining a current data identifier, a current control symbol, a current data separator symbol and a current data symbol in the current character string; determining a current attribute symbol corresponding to the current data identifier according to the corresponding relation; and arranging the current attribute symbol, the current control symbol, the current data separator symbol and the current data symbol according to the entity class to determine the current entity object.
8. The datagram processing device of claim 6, further comprising:
a fourth determining unit, configured to determine at least one current attribute and an attribute value of each current attribute according to the current entity object determined by the processing unit;
a second sending unit, configured to send the at least one current attribute determined by the fourth determining unit and the attribute value of each current attribute to an external user.
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 CN106850145A (en) 2017-06-13
CN106850145B true 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)

Families Citing this family (1)

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

Citations (3)

* 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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9553843B1 (en) * 2014-10-08 2017-01-24 Google Inc. Service directory profile for a fabric network

Patent Citations (3)

* 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

Also Published As

Publication number Publication date
CN106850145A (en) 2017-06-13

Similar Documents

Publication Publication Date Title
RU2608464C2 (en) Device, method and network server for detecting data structures in data stream
US11150896B2 (en) Automated generation of service definitions for message queue application clients
KR102168212B1 (en) Apparatus and method for application log data processing
CN115242896B (en) Dynamic message parsing method and device, electronic equipment and computer readable storage medium
CN106850145B (en) Data message processing method and device
US9723091B1 (en) Variable length protocol using serialized payload with compression support
JP6042243B2 (en) Monitoring system, monitoring server, and monitoring method
CN109522072B (en) Control interface generation method and device
JP5348413B2 (en) Application server, object management method, and object management program
CN115514656B (en) Object model adaptation method and device
CN108959411B (en) Processing method, device and equipment of ETL (extract transform and load) task
CN106385656A (en) Intelligent household electrical appliance prompt tone generation method and device, intelligent household electric appliance and air conditioner
CN112992142B (en) Voice message reply method, device, equipment and medium
WO2018041036A1 (en) Keyword searching method, apparatus and terminal
CN115456188A (en) Quantum computing task optimization processing method and device and quantum computer
CN114900835A (en) Malicious traffic intelligent detection method and device and storage medium
US10375601B2 (en) Condensed message multicast method and a system employing same
CN112181509A (en) Ensuring data consistency between modular devices and external systems
US10185565B2 (en) Method and apparatus for controlling register of reconfigurable processor, and method and apparatus for creating command for controlling register of reconfigurable processor
US20240013864A1 (en) System and method for auto-configurable data compression framework
CN114679324B (en) Data exchange method, tool, system, equipment and medium
CN112883224B (en) Audio fingerprint retrieval library updating method, device, equipment and medium
CN114461352B (en) Implementation method for managing virtual machine cluster, computer equipment and storage medium
CN107704606B (en) Universal extraction method for instant chat protocol elements based on custom tag language
CN116303717A (en) Data acquisition format protocol conversion method and device

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