CN110191095A - The method and terminal device of data processing - Google Patents

The method and terminal device of data processing Download PDF

Info

Publication number
CN110191095A
CN110191095A CN201910351974.7A CN201910351974A CN110191095A CN 110191095 A CN110191095 A CN 110191095A CN 201910351974 A CN201910351974 A CN 201910351974A CN 110191095 A CN110191095 A CN 110191095A
Authority
CN
China
Prior art keywords
data
message
service attribute
parsing
data processing
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
CN201910351974.7A
Other languages
Chinese (zh)
Other versions
CN110191095B (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.)
BEIJING KEHUA ZHONGSHENG CLOUD COMPUTING TECHNOLOGY CO.,LTD.
Xiamen kecan Information Technology Co., Ltd
Original Assignee
XIAMEN KECAN INFORMATION TECHNOLOGY Co Ltd
Kehua Hengsheng 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 XIAMEN KECAN INFORMATION TECHNOLOGY Co Ltd, Kehua Hengsheng Co Ltd filed Critical XIAMEN KECAN INFORMATION TECHNOLOGY Co Ltd
Priority to CN201910351974.7A priority Critical patent/CN110191095B/en
Publication of CN110191095A publication Critical patent/CN110191095A/en
Application granted granted Critical
Publication of CN110191095B publication Critical patent/CN110191095B/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
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Landscapes

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

Abstract

The present invention is suitable for network communication technology field, provides the method and terminal device of a kind of data processing, this method comprises: receiving message;According to preset packet parsing chain, piecewise analytic is carried out to the message, the data after being parsed;The data are subjected to data grouping and are stored, provide the good design of a set of message acquisition based on IEC104 agreement, packet parsing, data processing and data storage, message, analytic message and data processing by IEC104 acquisition is allowed to carry out good decoupling, multiplexing of being more convenient for, extension and maintenance.

Description

The method and terminal device of data processing
Technical field
The invention belongs to network communication technology field more particularly to the methods and terminal device of a kind of data processing.
Background technique
For IEC104 agreement as a kind of international standard protocol, with real-time, good, high reliablity, data traffic are big, are convenient for Information content expands, support network transmission the advantages that, content and function cover the definition of protection aspect, can not only apply In scheduling and transformer substation end, and it is completely suitable for the communication network in substation.Specifically, using the main website of IEC104 agreement It can carry out the operation of message acquisition, packet parsing, data processing and data storage.However, due to traditional IEC104 main website Exploitation, without carrying out good design, causes stability lower in terms of communication.Agreement of the exploitation based on IEC104 requires every time Respectively realize a set of acquisition, parsing, storage logic, and the coupling of service logic leads to not be multiplexed and extend.In addition, traditional Message parsing method do not carry out regular, design, error is easy when will lead to packet parsing, and be not easy to check after malfunctioning.
Summary of the invention
In view of this, the embodiment of the invention provides a kind of method of data processing and terminal device, to solve existing skill The agreement based on IEC104 is developed in art every time to require respectively to realize a set of acquisition, resolution logic, and the coupling of service logic Conjunction leads to not be multiplexed and extend and message parsing method does not carry out regular, design, causes to be easy when packet parsing Mistake, and the problem of checking is not easy after malfunctioning.
The first aspect of the embodiment of the present invention provides a kind of method of data processing, comprising:
Receive message;
According to preset packet parsing chain, piecewise analytic is carried out to the message, the data after being parsed;
The data are subjected to data grouping and are stored.
In one embodiment, the preset packet parsing chain includes at least one analytic thread subclass, and the basis is default Packet parsing chain, piecewise analytic, data after being parsed are carried out to the message, comprising:
A, byte to be resolved in the corresponding message of analytic thread subclass is determined;
B, according to the analytic thread subclass, corresponding byte to be resolved is parsed;
Circulation executes step A and B, until completing to the packet parsing, the data after being parsed.
It is in one embodiment, described that the data are subjected to data grouping and are stored, comprising:
According to the data after parsing, long-range number transmitted in the Iec104 agreement that the data use is obtained;
The data are stored with corresponding long-range number for index.
It is in one embodiment, described that the data are subjected to data grouping and are stored, comprising:
According to the data after parsing, inquiry obtains the service attribute of the data in the service attribute table prestored , at least a pair of of data and corresponding service attribute name are saved in the service attribute table;
The data are stored with the entitled index of the service attribute.
In one embodiment, it is described will the data carry out data grouping and store after, further includes:
According to the service attribute name of the data, the corresponding data of the data are inquired in the service attribute table Value, is arranged the data value of the data, and at least a pair of of service attribute name and corresponding data value are saved in the service attribute table.
In one embodiment, after the data value of the setting data, further includes:
According to the data value of the data, the data are handled according to corresponding service logic.
In one embodiment, the data after parsing correspond to different points, and each point binds an analyzer;
It is described that the data are handled according to corresponding service logic, comprising:
The corresponding all analyzers of data that storage is arranged are binary tree structure;
Each analyzer in the binary tree structure is traversed by the way of inorder traversal.
The second aspect of the embodiment of the present invention provides a kind of device of data processing, comprising:
Receiving module, for receiving message;
Parsing module, for piecewise analytic being carried out to the message, after being parsed according to preset packet parsing chain Data;
Memory module, for the data to be carried out data grouping and are stored.
The third aspect of the embodiment of the present invention provides a kind of terminal device, comprising: memory, processor and is stored in In the memory and the computer program that can run on the processor, when the processor executes the computer program It realizes such as the step of above-mentioned data processing the method.
The fourth aspect of the embodiment of the present invention provides a kind of computer readable storage medium, comprising: the computer can It reads storage medium and is stored with computer program, which is characterized in that realize when the computer program is executed by processor as above-mentioned The step of data processing the method.
Existing beneficial effect is the embodiment of the present invention compared with prior art: by receiving message;According to preset report Literary analytic thread carries out piecewise analytic to the message, the data after being parsed;The data are subjected to data grouping and are deposited Storage provides the good design of a set of message acquisition based on IEC104 agreement, packet parsing, data processing and data storage, Allow by IEC104 acquisition message, analytic message and data processing carry out good decoupling, be more convenient for multiplexing, extension and Maintenance.
Detailed description of the invention
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description is only of the invention some Embodiment for those of ordinary skill in the art without any creative labor, can also be according to these Attached drawing obtains other attached drawings.
Fig. 1 is a kind of implementation process schematic diagram of the method for data processing provided in an embodiment of the present invention;
Fig. 2 is the schematic diagram of packet parsing chain provided in an embodiment of the present invention;
Fig. 3 is the exemplary diagram of the device of data processing provided in an embodiment of the present invention;
Fig. 4 is the schematic diagram of terminal device provided in an embodiment of the present invention.
Specific embodiment
In being described below, for illustration and not for limitation, the tool of such as particular system structure, technology etc is proposed Body details, to understand thoroughly the embodiment of the present invention.However, it will be clear to one skilled in the art that there is no these specific The present invention also may be implemented in the other embodiments of details.In other situations, it omits to well-known system, device, electricity The detailed description of road and method, in case unnecessary details interferes description of the invention.
In order to illustrate technical solutions according to the invention, the following is a description of specific embodiments.
The embodiment of the present invention provides a kind of method of data processing, as shown in Figure 1, method includes the following steps:
Step 101, message is received.
Optionally, the IEC-104 agreement main website based on asynchronous non-obstruction is constructed in the present embodiment, and complete set is provided Implementation method.It is asynchronous with synchronize be relative concept, synchronize be issue a call instruction when, before not obtaining result, should The result of calling would not return, and return once calling, just obtain return value.And it is asynchronous, it is on the contrary, call instruction is being sent out After out, this calling is just directly returned, so not returning the result, i.e., after an asynchronous procedure call issues, is called Person will not be instantly obtained as a result, but after calling and issuing, callee is notified caller, or is passed through by state, notice Call back function handles this calling.After call result obtains, result can be sent by way of readjustment.Non- obstruction with obstruction is Relative concept, obstruction and non-obstruction are concerned with state of the program when waiting call result (message or return value).Obstruction is adjusted With before referring to that call result returns, current thread can be suspended, and call thread that can just return only after obtaining result.It is non- Obstruction, which calls, to be referred to before result is not immediately available, which will not block current thread.
Optionally, client object receives message, and client object can be IEC-104Client.IEC-104Client Realize the start and stop of the IEC-104 agreement main website program based on asynchronous non-obstruction, the beginning of all behaviors of program.
Step 102, according to preset packet parsing chain, piecewise analytic is carried out to the message, the data after being parsed.
Optionally, packet parsing chain is designed using chain-of-responsibilpattern pattern, several solutions for constituting packet parsing chain may be implemented Analyse chain subclass, be used for piecewise analytic message, as shown in Fig. 2, packet parsing chain include: Chain01_Start starting symbol, The subsequent length of Chain02_Length, Chain03_Ctrl control domain, Chain03b_Package_SS frame, Chain03c_ The variable knot of Package_UU frame, Chain03a_Package_II frame, Chain04_Type type, Chain05_Changeable Structure determiner, Chain06_Reason transmit reason, the site Chain07_FTUAddressFTU, Chain08_DataParse number According to the analytic threads subclass such as body.
Optionally, each analytic thread subclass in packet parsing chain can parse several bytes in message.To message Parsed the following steps are included:
A, byte to be resolved in the corresponding message of analytic thread subclass is determined;
B, according to the analytic thread subclass, corresponding byte to be resolved is parsed;
Circulation executes step A and B, until completing to the packet parsing, the data after being parsed.
Optionally, such as according to first analytic thread subclass of packet parsing chain, first analytic thread subclass is determined N to be resolved in the corresponding message1A byte, the N1More than or equal to 1;According to first analytic thread subclass, parsing The N1A byte;
For another example, according to the second of packet parsing chain analytic thread subclass, determine that second analytic thread subclass is corresponding N to be resolved in the message2A byte, the N2More than or equal to 1;According to first analytic thread subclass, the N is parsed2 A byte;According to all analytic thread subclasses of packet parsing chain, all bytes of the message are successively parsed, after being parsed Data.
The process of packet parsing is exemplified below.The message received uses hexadecimal representation, can be with are as follows: 68 1c 00 00 00 00 01 8f 14 00 33 00 01 02 00;01 00 01 00 01 00 01 00 01 00 01 00 01 00 01。
Chain01_Start parsing starting 1 byte of symbol, that is, parse 68, and perform the next step automatically.
Chain02_length parses subsequent length, i.e. parsing 1c, and it is 28 that 1c, which is converted to the decimal system, indicates parsing subsequent 28 A byte, and perform the next step automatically.
Chain03_Ctrl parses 4 bytes, that is, parses 00 00 00 00.Judge the data frame whether I frame, if the number It is I frame according to frame, then is performed the next step automatically according to I frame trend.
Optionally, I frame is information frame, is used for user data transmission, includes information field.S frame is supervisory frame, for monitoring With control data link, functions, the S frames such as the reception of completion I frame confirms, retransmits request, pause transmission is requested do not have information field. U frame is unnumbered frames, can be issued at the time of any need for the control of data link without number, without influencing band The exchange sequence of the information frame of number.
Chain04_Type parses a byte, that is, parses 01, indicates that type of message is single-point telemetering, then automatic to execute In next step.
Chain05_Changeable parses a byte, i.e. parsing 8f, and being scaled binary system is 10001111, the company of expression Continue 15 telemetries.
Chain06_Reason parses 2 bytes, that is, parses 14 00, and being scaled the decimal system is 20, indicates that message transmission is former Because respective stations are called.
Chain07_FTUAddress parses 2 bytes, that is, parses 33 00, and being scaled the decimal system is 51, indicates the station FTU Location is 51.
Chain07_DataParse parses 3 bytes, that is, parses 01 02 00, indicates data volume initial address: 0201H.
01 00 01 00 01 00 01 00 01 00 01 00 01 00 01 indicate Information element Data, i.e., 15 distant The value of letter data.15 remote signalling datas obtained after parsing are as follows:
Index=0201H, value=01H&0x01=1;
Index=0202H, value=00H&0x01=0;
……
Index=020dH, value=01H&0x01=1;
Index=020eH, value=00H&0x01=0;
Index=020fH, value=01H&0x01=1.
The present embodiment designs the parsing for realizing message by using chain-of-responsibilpattern pattern, so that packet parsing process is apparent, Do not allow error-prone.
Step 103, the data are subjected to data grouping and stored.
As an embodiment, this step may include: and obtain according to the data after parsing and transmit the number According to long-range number in the Iec104 agreement of use;The data are stored with corresponding long-range number for index.After parsing Data flow enters point, and point, that is, Iec104Pointer assists the data in point according to the Iec104 that the data use is transmitted Long-range number deposit point table in view, i.e. point table are a set with the point that long-range number is index.By data according to long-range number Grouping, the data after grouping enter Iec104Table group point table " interface.
The unique ability and characteristic of point include: reference and the index for holding affiliated Iec104Entity;It saves and obtains Data value;Obtain a data value;Each point, which binds an analyzer, can execute binding after data value is swept in point acquisition Analyzer.
As another embodiment, this step may include: according to the data after parsing, in the business category Property table in inquire the corresponding data value of the data, at least a pair of of data and corresponding business category are saved in the service attribute table Property name.
Data are grouped according to service attribute name, the data after grouping enter Iec104Entity, entity " interface. The unique ability and characteristic of Iec104Entity, entity " interface include: to inherit Map interface, are a dynamic object interfaces;It holds Have one with " service attribute name " be index point set;Data value is obtained according to attribute-name, data are obtained according to attribute-name Value.
Further, it after this step can also include: the service attribute name according to the data, will enter Iec104Entity is into entity " data of interface inquire the data value for obtaining the data in service attribute table;And according to The service attribute name of the data, is arranged the data value of the data.At least one is saved in the service attribute table To service attribute name and corresponding data value.It should be understood that saved in service attribute table several pairs of data, service attribute name and Corresponding record as data value.
Optionally, when needing to be implemented business, data value is arranged in data, then according to data value by data according to data It is worth corresponding service logic and business processing is carried out to data.
Optionally, after data have data value, so that it may execute the analyzer of binding, i.e. execution Iec104Parse is to divide Parser " interface, Iec104Parse is with analyzer " unique ability of interface and characteristic include: that analyzer is set as binary tree knot Structure is executed with the sequence of inorder traversal;Preposition analyzer and postposition analyzer are set;Obtain first analysis in inorder traversal sequence Device leaf node;Obtain end analyzer leaf node in inorder traversal sequence;Most common abstract base class is BaseIec104Parse。
Optionally, according to Iec104Parsea analyzer " characteristic of interface, according to the data value of the data, to described Data are handled according to corresponding service logic.
It optionally, can also include: that the corresponding all analyzers of data stored are arranged to be after this step Binary tree structure;Each analyzer in the binary tree structure is traversed by the way of inorder traversal.
Optionally, analyzer is also used to decouple the system business logic unrelated with acquisition.When data acquisition return after and industry Business is decoupling, and data can carry out different parsings by analyzer, it is also assumed that being the analyzer of data configuration, in this way Same data can produce different data parsing and polymerization by different analyzers, realize desired business demand.It is right System business logic has the irrelevant logic depending in analyzer.
The mode and data flow link design, data for present embodiments providing data storage are returned from packet parsing to data Collection, storage all provide external calling interface, so that the development and application of IEC104 agreement main website is more regular, stability is strong.
The embodiment of the present invention provides a kind of method of data processing, including receives message;According to preset packet parsing chain, Piecewise analytic is carried out to the message, the data after being parsed;The data are subjected to data grouping and are stored, provide one The good design that message acquisition, packet parsing, data processing and data based on IEC104 agreement store is covered, so that by IEC104 Message, analytic message and the data processing of acquisition carry out good decoupling, are more convenient for being multiplexed and extend.
It should be understood that the size of the serial number of each step is not meant that the order of the execution order in above-described embodiment, each process Execution sequence should be determined by its function and internal logic, the implementation process without coping with the embodiment of the present invention constitutes any limit It is fixed.
The embodiment of the present invention provides a kind of device of data processing, as shown in figure 3, the device includes: receiving module 301, Parsing module 302, memory module 303.
Receiving module 301, for receiving message.
Parsing module 302, for carrying out piecewise analytic to the message, being parsed according to preset packet parsing chain Data afterwards.
Optionally, the parsing module 302 for A, determines word to be resolved in the corresponding message of analytic thread subclass Section;B, according to the analytic thread subclass, corresponding byte to be resolved is parsed;Circulation executes step A and B, until to the report Text is parsed, the data after being parsed.
Memory module 303, for the data to be carried out data grouping and are stored.
Optionally, the memory module 303 transmits the data use for obtaining according to the data after parsing Iec104 agreement in long-range number;The data are stored with corresponding long-range number for index.
Optionally, the memory module 303, for according to the data after parsing, in the service attribute table prestored Inquiry obtains the service attribute name of the data, and at least a pair of of data and corresponding service attribute are saved in the service attribute table Name;The data are stored with the entitled index of the service attribute.
Further, after storing to data, described device is also used to the business category according to the data Property name, the corresponding data value of the data is inquired in the service attribute table, the data value of the data, the business is arranged At least a pair of of service attribute name and corresponding data value are saved in attribute list.And the data value according to the data, to described Data are handled according to corresponding service logic
Optionally, the data after parsing correspond to different points, and each point binds an analyzer;The dress It sets, the corresponding all analyzers of data for storage to be arranged are binary tree structure;By the way of inorder traversal time Go through each analyzer in the binary tree structure.
The embodiment of the present invention provides a kind of device of data processing, including receiving module for receiving message;According to default Packet parsing chain, parsing module carries out piecewise analytic, data after being parsed to the message;Memory module is by the number According to data grouping and store, the message acquisition that the embodiment of the invention provides a set of based on IEC104 agreement, packet parsing, The good design of data processing and data storage, so that the message, analytic message and data processing of IEC104 acquisition are carried out good Good decoupling is more convenient for being multiplexed and be extended.
Fig. 4 is the schematic diagram for the terminal device that one embodiment of the invention provides.As shown in figure 4, the terminal of the embodiment is set Standby 4 include: processor 401, memory 402 and are stored in the memory 402 and can run on the processor 401 Computer program 403, such as the detection program of transformer core D.C. magnetic biasing.The processor 401 executes the computer Realize the step in the embodiment of the method for above-mentioned data processing when program 403, such as step 101 shown in FIG. 1 is to 103.It is described Processor 401 realizes the function of each module in above-mentioned each Installation practice, such as Fig. 3 institute when executing the computer program 403 Show the function of module 301 to 303.
Illustratively, the computer program 403 can be divided into one or more modules, one or more of Module is stored in the memory 402, and is executed by the processor 401, to complete the present invention.It is one or more of Module can be the series of computation machine program instruction section that can complete specific function, and the instruction segment is for describing the computer Implementation procedure of the program 403 in the device or terminal device 4 of the data processing.For example, the computer program 403 can To be divided into receiving module 301, parsing module 302, memory module 303, each module concrete function is as shown in figure 3, herein not It repeats one by one again.
The terminal device 4 can be the calculating such as desktop PC, notebook, palm PC and cloud server and set It is standby.The terminal device may include, but be not limited only to, processor 401, memory 402.It will be understood by those skilled in the art that Fig. 4 is only the example of terminal device 4, does not constitute the restriction to terminal device 4, may include more more or fewer than illustrating Component, perhaps combines certain components or different components, for example, the terminal device can also include input-output equipment, Network access equipment, bus etc..
Alleged processor 401 can be central processing unit (Central Processing Unit, CPU), can also be Other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field- Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic, Discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processor Deng.
The memory 402 can be the internal storage unit of the terminal device 4, for example, terminal device 4 hard disk or Memory.The memory 402 is also possible to the External memory equipment of the terminal device 4, such as is equipped on the terminal device 4 Plug-in type hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, Flash card (Flash Card) etc..Further, the memory 402 can also have been deposited both the inside including the terminal device 4 Storage unit also includes External memory equipment.The memory 402 is for storing the computer program and the terminal device 4 Other required programs and data.The memory 402, which can be also used for temporarily storing, have been exported or will export Data.
It is apparent to those skilled in the art that for convenience of description and succinctly, only with above-mentioned each function Can unit, module division progress for example, in practical application, can according to need and by above-mentioned function distribution by different Functional unit, module are completed, i.e., the internal structure of described device is divided into different functional unit or module, more than completing The all or part of function of description.Each functional unit in embodiment, module can integrate in one processing unit, can also To be that each unit physically exists alone, can also be integrated in one unit with two or more units, it is above-mentioned integrated Unit both can take the form of hardware realization, can also realize in the form of software functional units.In addition, each function list Member, the specific name of module are also only for convenience of distinguishing each other, the protection scope being not intended to limit this application.Above system The specific work process of middle unit, module, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, is not described in detail or remembers in some embodiment The part of load may refer to the associated description of other embodiments.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed The scope of the present invention.
In embodiment provided by the present invention, it should be understood that disclosed device/terminal device and method, it can be with It realizes by another way.For example, device described above/terminal device embodiment is only schematical, for example, institute The division of module or unit is stated, only a kind of logical function partition, there may be another division manner in actual implementation, such as Multiple units or components can be combined or can be integrated into another system, or some features can be ignored or not executed.Separately A bit, shown or discussed mutual coupling or direct-coupling or communication connection can be through some interfaces, device Or the INDIRECT COUPLING or communication connection of unit, it can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated module/unit be realized in the form of SFU software functional unit and as independent product sale or In use, can store in a computer readable storage medium.Based on this understanding, the present invention realizes above-mentioned implementation All or part of the process in example method, can also instruct relevant hardware to complete, the meter by computer program Calculation machine program can be stored in a computer readable storage medium, the computer program when being executed by processor, it can be achieved that on The step of stating each embodiment of the method.Wherein, the computer program includes computer program code, the computer program Code can be source code form, object identification code form, executable file or certain intermediate forms etc..Computer-readable Jie Matter may include: can carry the computer program code any entity or device, recording medium, USB flash disk, mobile hard disk, Magnetic disk, CD, computer storage, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..It should be noted that described The content that computer-readable medium includes can carry out increasing appropriate according to the requirement made laws in jurisdiction with patent practice Subtract, such as does not include electric carrier signal and electricity according to legislation and patent practice, computer-readable medium in certain jurisdictions Believe signal.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although referring to aforementioned reality Applying example, invention is explained in detail, those skilled in the art should understand that: it still can be to aforementioned each Technical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modified Or replacement, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution should all It is included within protection scope of the present invention.

Claims (10)

1. a kind of method of data processing characterized by comprising
Receive message;
According to preset packet parsing chain, piecewise analytic is carried out to the message, the data after being parsed;
The data are subjected to data grouping and are stored.
2. the method for data processing as described in claim 1, which is characterized in that the preset packet parsing chain includes at least One analytic thread subclass, it is described according to preset packet parsing chain, piecewise analytic is carried out to the message, the number after being parsed According to, comprising:
A, byte to be resolved in the corresponding message of analytic thread subclass is determined;
B, according to the analytic thread subclass, corresponding byte to be resolved is parsed;
Circulation executes step A and B, until completing to the packet parsing, the data after being parsed.
3. the method for data processing as claimed in claim 2, which is characterized in that described that the data are carried out data grouping simultaneously Storage, comprising:
According to the data after parsing, long-range number transmitted in the Iec104 agreement that the data use is obtained;
The data are stored with corresponding long-range number for index.
4. the method for data processing as claimed in claim 2, which is characterized in that described that the data are carried out data grouping simultaneously Storage, comprising:
According to the data after parsing, inquiry obtains the service attribute name of the data, institute in the service attribute table prestored It states and saves at least a pair of of data and corresponding service attribute name in service attribute table;
The data are stored with the entitled index of the service attribute.
5. the method for data processing as claimed in claim 4, which is characterized in that the data are carried out data grouping described And after storing, further includes:
According to the service attribute name of the data, the corresponding data value of the data is inquired in the service attribute table, The data value of the data is set, at least a pair of of service attribute name and corresponding data value are saved in the service attribute table.
6. the method for data processing as claimed in claim 5, which is characterized in that the setting data data value it Afterwards, further includes:
According to the data value of the data, the data are handled according to corresponding service logic.
7. the method for data processing as claimed in claim 6, which is characterized in that the data after parsing correspond to different points Position, each point bind an analyzer;
It is described that the data are handled according to corresponding service logic, comprising:
The corresponding all analyzers of data that storage is arranged are binary tree structure;
Each analyzer in the binary tree structure is traversed by the way of inorder traversal.
8. a kind of device of data processing characterized by comprising
Receiving module, for receiving message;
Parsing module, for carrying out piecewise analytic to the message, the number after being parsed according to preset packet parsing chain According to;
Memory module, for the data to be carried out data grouping and are stored.
9. a kind of terminal device, including memory, processor and storage are in the memory and can be on the processor The computer program of operation, which is characterized in that the processor realizes such as claim 1 to 7 when executing the computer program The step of any one the method.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists In when the computer program is executed by processor the step of any one of such as claim 1 to 7 of realization the method.
CN201910351974.7A 2019-04-28 2019-04-28 Data processing method and terminal equipment Active CN110191095B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910351974.7A CN110191095B (en) 2019-04-28 2019-04-28 Data processing method and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910351974.7A CN110191095B (en) 2019-04-28 2019-04-28 Data processing method and terminal equipment

Publications (2)

Publication Number Publication Date
CN110191095A true CN110191095A (en) 2019-08-30
CN110191095B CN110191095B (en) 2022-01-07

Family

ID=67715306

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910351974.7A Active CN110191095B (en) 2019-04-28 2019-04-28 Data processing method and terminal equipment

Country Status (1)

Country Link
CN (1) CN110191095B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102325084A (en) * 2011-07-21 2012-01-18 航天科工深圳(集团)有限公司 Method and system for realizing data exchange in IEC104 (international electrotechnical commission 104) communication protocol forwarding
CN103036893A (en) * 2012-12-21 2013-04-10 国电南瑞科技股份有限公司 One-layer network data processing method suitable for intelligent substation
CN103391290A (en) * 2013-07-16 2013-11-13 沈阳时尚实业有限公司 Power consumer power utilization information acquisition system with protocol parsing
US20160087889A1 (en) * 2011-05-25 2016-03-24 Cisco Technology, Inc. Supporting multiple iec-101/iec-104 masters on an iec-101/iec-104 translation gateway
CN109510759A (en) * 2018-10-22 2019-03-22 智强通达科技(北京)有限公司 A kind of Universal-purpose quick multi-protocol gateway realization system and method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160087889A1 (en) * 2011-05-25 2016-03-24 Cisco Technology, Inc. Supporting multiple iec-101/iec-104 masters on an iec-101/iec-104 translation gateway
CN102325084A (en) * 2011-07-21 2012-01-18 航天科工深圳(集团)有限公司 Method and system for realizing data exchange in IEC104 (international electrotechnical commission 104) communication protocol forwarding
CN103036893A (en) * 2012-12-21 2013-04-10 国电南瑞科技股份有限公司 One-layer network data processing method suitable for intelligent substation
CN103391290A (en) * 2013-07-16 2013-11-13 沈阳时尚实业有限公司 Power consumer power utilization information acquisition system with protocol parsing
CN109510759A (en) * 2018-10-22 2019-03-22 智强通达科技(北京)有限公司 A kind of Universal-purpose quick multi-protocol gateway realization system and method

Also Published As

Publication number Publication date
CN110191095B (en) 2022-01-07

Similar Documents

Publication Publication Date Title
CN108667807A (en) A kind of protocol self-adapting method and system based on monitoring cloud platform and gateway
CN109768970B (en) Configurable universal protocol generation method
CN109561104A (en) A kind of communication protocol conversion method and device
CN109670081B (en) Method and device for processing service request
CN110445860B (en) Message sending method, device, terminal equipment and storage medium
CN105207366B (en) Distribution terminal plug and play model configuration tool and its implementation based on IEC61850
CN111343020A (en) Unified management method and device for multi-protocol Internet of things equipment
CN105989539A (en) Financial trading condition acquisition system and method
CN102760184A (en) Information interaction method for heterogeneous electric power application system
CN106341444A (en) Data access method and device
CN108833267A (en) Intelligent industrial gateway
CN110688828A (en) File processing method and device, file processing system and computer equipment
CN103780455B (en) TETRA digit cluster protocol test method and system based on TTCN-3
CN107193917A (en) Whole station CONFIG.SYS lossless data update method based on IID
CN111294235A (en) Data processing method, device, gateway and readable storage medium
CN109038824B (en) Distributed feeder automation method
CN109299173A (en) Data transmission method, device and storage medium
CN106713325A (en) Communication protocol conversion card
CN107040613A (en) A kind of message transmitting method and system
CN114301988A (en) Distributed calling method and device, storage medium and electronic equipment
CN110297748A (en) The method, apparatus and computer readable storage medium of error are called in a kind of positioning
CN107864199A (en) The realization device of Internet of Things communication means, device and Internet of Things Network Communication
CN110191095A (en) The method and terminal device of data processing
CN115328457A (en) Method and device for realizing form page based on parameter configuration
CN108629048A (en) A kind of routing parameter transmits optimization method and 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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 361000 unit 211, zone Z, Shengtong center 2, No.40, Xiangyun 1st Road, Xiamen area, Xiamen pilot Free Trade Zone, Fujian Province

Applicant after: XIAMEN KECAN INFORMATION TECHNOLOGY Co.,Ltd.

Applicant after: Kehua Data Co., Ltd

Address before: 361000 unit 211, zone Z, Shengtong center 2, No.40, Xiangyun 1st Road, Xiamen area, Xiamen pilot Free Trade Zone, Fujian Province

Applicant before: XIAMEN KECAN INFORMATION TECHNOLOGY Co.,Ltd.

Applicant before: Kehua Hengsheng Co., Ltd

CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Wang Jingqing

Inventor after: Lin Chenqiang

Inventor after: Chen Minhong

Inventor after: Liu Jun

Inventor before: Wang Jingqing

Inventor before: Lin Chenqiang

Inventor before: Chen Minhong

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

Effective date of registration: 20211231

Address after: 100176 floor 5, building 1, No. 28, Jinghai Second Road, Beijing Economic and Technological Development Zone, Daxing District, Beijing

Applicant after: BEIJING KEHUA ZHONGSHENG CLOUD COMPUTING TECHNOLOGY CO.,LTD.

Applicant after: Xiamen kecan Information Technology Co., Ltd

Address before: 361000 unit 211, zone Z, Shengtong center 2, No.40, Xiangyun 1st Road, Xiamen area, Xiamen pilot Free Trade Zone, Fujian Province

Applicant before: XIAMEN KECAN INFORMATION TECHNOLOGY Co.,Ltd.

Applicant before: Kehua Data Co., Ltd