CN107025214B - Data processing method and device - Google Patents

Data processing method and device Download PDF

Info

Publication number
CN107025214B
CN107025214B CN201710284432.3A CN201710284432A CN107025214B CN 107025214 B CN107025214 B CN 107025214B CN 201710284432 A CN201710284432 A CN 201710284432A CN 107025214 B CN107025214 B CN 107025214B
Authority
CN
China
Prior art keywords
data
protocol
electronic form
file
attribute
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
CN201710284432.3A
Other languages
Chinese (zh)
Other versions
CN107025214A (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.)
Gree Electric Appliances Inc of Zhuhai
Original Assignee
Gree Electric Appliances Inc of Zhuhai
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 Gree Electric Appliances Inc of Zhuhai filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN201710284432.3A priority Critical patent/CN107025214B/en
Publication of CN107025214A publication Critical patent/CN107025214A/en
Application granted granted Critical
Publication of CN107025214B publication Critical patent/CN107025214B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/177Editing, e.g. inserting or deleting of tables; using ruled lines
    • G06F40/18Editing, e.g. inserting or deleting of tables; using ruled lines of spreadsheets
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/151Transformation
    • G06F40/157Transformation using dictionaries or tables
    • 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/26Special purpose or proprietary protocols or architectures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computing Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a kind of data processing method and device, it is related to field of computer technology, method therein includes: that protocol data is converted to the first electronic form file data, the first electronic form file data arrange according to screening rule and determine the first data attribute for needing to delete, the protocol contents data with the first data attribute are deleted from the first electronic form file data, obtain the second electronic form file data;The second data attribute retained and the mapping relations of the protocol contents data with the second data attribute are established based on the second electronic form file data, are correspondingly handled according to mapping relations.Data processing method and device of the invention reduce the processing difficulty of protocol data, reduce size of code, save the code development time, software development efficiency is improved, the speed of service of system is improved and reduces the occupancy of system resource, the code maintenance task in later period can be reduced.

Description

Data processing method and device
Technical field
The present invention relates to field of computer technology more particularly to a kind of data processing method and device.
Background technique
Currently, the agreement used in computer systems not only has network protocol, it also include for specific system and biography Defeated demand and the Data Transport Protocol etc. arranged.Network protocol is one group of agreement that communication computer both sides must defer to jointly, Such as how to establish connection, how to identify mutually.The Data Transport Protocol of agreement is according to the data transmission between system It is required that etc. the transmission data of agreements format and content, the data of transmission include: project information data, monitoring information data, Control data etc..For example, needing to transmit manufacturing schedule data between management system and production system, agreement manufacturing schedule data are passed Defeated agreement determines the format and content of the manufacturing schedule data of transmission.Production system is generated based on manufacturing schedule data protocol Management system is reported and be sent to manufacturing schedule, and management system is based on the parsing manufacturing schedule report of manufacturing schedule Data Transport Protocol And obtain progress msg.Currently, developer's processing Data Transport Protocol is all based on code and handles, it is still, practical to need The protocol contents data wanted are less, and the content-data of redundancy is more in the protocol data generated based on Data Transport Protocol, makes The calculating speed for obtaining processing protocol data is slow, also, when system upgrade, transformation, the data transmission association originally arranged The specific format and content of view also changes correspondingly, since the processing to protocol data is all handled in code, code revision Measure larger, protocol data is not convenient for safeguarding.
Summary of the invention
In view of this, the invention solves a technical problem be to provide a kind of data processing method and device, will assist View data be converted to electronic form document data arranged, Screening Treatment, and establish data attribute and protocol contents number According to mapping relations.
According to an aspect of the present invention, a kind of data processing method is provided, comprising: protocol data is converted into the first electricity Sub-table file data, wherein the first electronic form file data packet contains data attribute information and protocol contents data; The first electronic form file data are carried out according to screening rule to arrange and determine the first data attribute for needing to delete, from The protocol contents data with the first data attribute are deleted in the first electronic form file data, obtain the second electrical form File data;The second data attribute retained is established based on the second electronic form file data and there is the second data attribute Protocol contents data mapping relations, correspondingly handled according to the mapping relations.
Optionally, described to establish the second data attribute retained based on the second electronic form file data and have the The mapping relations of the protocol contents data of two data attributes include: generation text file, by the second electronic form file number According to format be converted to format and the storage of the text file, wherein include the second data attribute in the text file Information, the protocol contents data with the second data attribute;The text file is read, second data attribute is obtained Information and the protocol contents data with the second data attribute simultaneously establish the mapping relations.
It is optionally, described that establish the mapping relations include: according to second data attribute information and described to have The protocol contents data of two data attributes generate protocol data dictionary;Wherein, the key in the protocol data dictionary is described the Two data attribute informations, the corresponding key assignments of key in the protocol data dictionary are in the agreement with the second data attribute Hold data.
Optionally, in the text file, the protocol contents data arrangement of the second data attribute having the same is same One column, also, the protocol contents data for being arranged in same a line belong to same protocol data;The generation protocol data dictionary is also Include: the protocol contents data for obtaining and being arranged in the text file in the same row, establishes the protocol data dictionary.
It optionally, include multirow protocol contents data in the text file;Establish respectively with multirow protocol contents number According to corresponding multiple protocol data dictionaries;Array is established, the multiple protocol data dictionary is stored in the array.
Optionally, the protocol contents to match with second data attribute information are obtained from the protocol data dictionary Data;Determine that result judges based on the determination with the presence or absence of the protocol contents data to match in the protocol data Whether the protocol data dictionary generated is correct.
It is optionally, described that according to mapping relations progress, correspondingly processing includes: in response to call instruction, from the association The protocol contents data to match with the recalls information in the call instruction are obtained in view data dictionary and are shown, to Code or file are generated according to the protocol contents data to match.
Optionally, the first electronic form file data and the second electronic form file data include: Excel number According to;The text file includes: csv file.
Optionally, described protocol data is converted into the first electronic form file data to comprise determining that the protocol data Protocol type, obtain corresponding with protocol type electronic form template;It is mentioned according to corresponding with the protocol type It takes rule to extract data attribute information and protocol contents data from the protocol data and is filled into the electronic form template In, obtain the first electronic form file data.
Optionally, it is described according to screening rule to the first electronic form file data carry out arrange include: traversal institute The first electronic form file data are stated, extensive processing is carried out to the protocol contents data;The protocol contents data are arranged, with Make the protocol contents data arrangement with identical data attribute in same row.
According to another aspect of the present invention, a kind of data processing equipment is provided, comprising: data acquisition module, for that will assist View data are converted to the first electronic form file data, wherein the first electronic form file data packet contains data attribute Information and protocol contents data;Data screening module, for according to screening rule to the first electronic form file data into Row arranges and determines the first data attribute for needing to delete, and deleting from the first electronic form file data has the first number According to the protocol contents data of attribute, the second electronic form file data are obtained;Data mapping module, for based on second electricity The mapping that sub-table file data establishes the second data attribute and protocol contents data with the second data attribute retained is closed System, is correspondingly handled according to the mapping relations.
Optionally, the data mapping module, comprising: Date Conversion Unit, for generating text file, by described second The format of electronic form file data is converted to the format of the text file and storage, wherein includes in the text file There are the second data attribute information, the protocol contents data with the second data attribute;Generation unit is mapped, for reading Text file is stated, second data attribute information and the protocol contents data with the second data attribute are obtained and is established The mapping relations.
Optionally, the mapping generation unit is also used to according to second data attribute information and described has second The protocol contents data of data attribute generate protocol data dictionary;Wherein, the key in the protocol data dictionary is described second Data attribute information, the corresponding key assignments of key in the protocol data dictionary are the protocol contents with the second data attribute Data.
Optionally, in the text file, the protocol contents data arrangement of the second data attribute having the same is same One column, also, the protocol contents data for being arranged in same a line belong to same protocol data;The mapping generation unit, is also used In obtaining the protocol contents data arranged in the text file in the same row, the protocol data dictionary is established.
It optionally, include multirow protocol contents data in the text file;The mapping generation unit, is also used to build Found multiple protocol data dictionaries corresponding with multirow protocol contents data respectively;Array is established, by the multiple protocol data Dictionary is stored in the array.
Optionally, data checking module is believed for obtaining from the protocol data dictionary with second data attribute The matched protocol contents data of manner of breathing;It determines in the protocol data with the presence or absence of the protocol contents data to match, base Judge whether the protocol data dictionary generated is correct in the definitive result.
Optionally, the data mapping module, comprising: call processing unit, be used in response to call instruction, from the association The protocol contents data to match with the recalls information in the call instruction are obtained in view data dictionary and are shown, to Code or file are generated according to the protocol contents data to match.
Optionally, the first electronic form file data and the second electronic form file data include: EXCEL number According to;The text file includes: csv file.
Optionally, the data acquisition module is also used to determine the protocol type of the protocol data, obtains and the association Discuss the corresponding electronic form template of type;It is mentioned from the protocol data according to extracting rule corresponding with the protocol type It takes data attribute information and protocol contents data and is filled into the electronic form template, obtain the first electrical form text Number of packages evidence.
Optionally, the data screening module is also used to traverse the first electronic form file data, to the agreement Content-data carries out extensive processing;The protocol contents data are arranged, so that the protocol contents data with identical data attribute It is arranged in same row.
It is whole to be converted to the progress of electronic form document data by data processing method and device of the invention for protocol data Reason, Screening Treatment, and the mapping relations of data attribute Yu protocol contents data are established, agreement number can be obtained based on mapping relations According to, reduce the processing difficulty of protocol data, reduce size of code, save the code development time, improve software development effect Rate improves the speed of service of system and reduces the occupancy of system resource, can reduce the code maintenance task in later period.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only Some embodiments of the present invention, for those of ordinary skill in the art, without any creative labor, also Other drawings may be obtained according to these drawings without any creative labor.
Fig. 1 is the flow diagram of one embodiment of data processing method according to the present invention;
Fig. 2 is the flow diagram of another embodiment of data processing method according to the present invention;
Fig. 3 is the module diagram of one embodiment of data processing equipment according to the present invention;
Fig. 4 is the module diagram of data mapping module in one embodiment of data processing equipment according to the present invention.
Specific embodiment
With reference to the accompanying drawings to invention is more fully described, wherein illustrating exemplary embodiment of the present invention.Under Face will combine the attached drawing in the embodiment of the present invention, and technical scheme in the embodiment of the invention is clearly and completely described, show So, described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.Based on the reality in the present invention Example is applied, every other embodiment obtained by those of ordinary skill in the art without making creative efforts all belongs to In the scope of protection of the invention.Various descriptions are carried out to technical solution of the present invention below with reference to each figure and embodiment.
" first " hereinafter, " second " etc. are only used for distinguishing in description, and there is no other special meanings.
Fig. 1 is the flow diagram of one embodiment of data processing method according to the present invention, as shown in Figure 1:
Step 101, protocol data is converted into the first electronic form file data, the first electronic form file data include There are data attribute information and protocol contents data.
Protocol data includes the Internet protocol data, such as RS485 protocol data, and protocol data also may include in exploit person Member between, between system etc. agreements Data Transport Protocol data, comprising: project data transmission protocol data, supervision and reporting association Discuss data, control protocol data etc..
Step 102, the first electronic form file data arrange according to screening rule and determine need to delete the One data attribute deletes the protocol contents data with the first data attribute from the first electronic form file data, obtains the Two electronic form file data.Screening rule can be configured according to specific protocol type and demand, can be removed and be not required to The protocol contents data wanted.
Step 103, the second data attribute retained is established based on the second electronic form file data and there are the second data The mapping relations of the protocol contents data of attribute are correspondingly handled according to mapping relations.Can be there are many processing method, example Such as, it can be obtained based on mapping relations in code development by screening, treated the protocol contents data such as arrange, generate generation Code or file etc..
Protocol data is converted to spreadsheet by the data processing method of above-described embodiment, is carried out to list data The data attribute and the mapping relations of the protocol contents data with this data attribute of reservation are established in the processing such as screening, arrangement, and It is handled based on mapping relations, editable size of code can be reduced, save the development time, and reduce the work of later maintenance It measures.
Fig. 2 is the flow diagram of another embodiment of data processing method according to the present invention, as shown in Figure 2:
Step 201, the first spread-sheet data is obtained, the processing such as arranged, screened to the first spread-sheet data, obtaining To the second electronic form file data.
Protocol data has corresponding data format, determines the protocol type of protocol data, obtains corresponding with protocol type Electronic form template.Data attribute information and agreement are extracted from protocol data according to extracting rule corresponding with protocol type Content-data is simultaneously filled into electronic form template, obtains the first electronic form file data.First electronic form file can be with For Excel table etc..
For example, having worked out project data transport protocol, project data transmission according to the transmission of project or project data needs The protocol data of agreement has fixed format, including version number, coded format.The fields such as project number, item description.It receives To project data transmission protocol data, there can be many protocol datas, every protocol data may all contain Item version, item Mesh coded format, project number etc..According to extracting rule corresponding with the protocol type of project data transport protocol, from agreement Data attribute information and protocol contents data are extracted in data and are filled into electronic form template.List data is obtained mainly to use In extracting useful data, the format of the first electronic form file data of generation is as shown in following table one:
Table 1- the first electronic form file data format table
Project data transmission protocol data is more, and the data attribute information of the first electronic form file data includes: project File needed for id, Item version, project number, item description etc..First electronic form file data are carried out to simplify processing, root The first electronic form file data arrange according to screening rule and determine the first data attribute for needing to delete.
For example, protocol contents data are carried out extensive processing by the first electronic form file data of traversal.Arrange protocol contents Data, so that the protocol contents data arrangement with identical data attribute is in same row.For descriptive in protocol contents data The redundant data of text needs to arrange, and deletes the description etc. in bracket.It is extensive refer to some similar words are replaced with it is same Indicate, for example, will not have, temporarily not with and without, reserve etc. protocol contents data replace with nothing.It deletes descriptive and without decision Property meaning data attribute " file needed for item description ", from the first electronic form file data delete have " item description The protocol contents data of required file " data attribute, Delete Entire Column final finishing are the second succinct electronic form file data, the The format of two electronic form file data forms is as shown in following table two:
Project id Item version Coded format Project number
1 Nothing UTF-8 Nothing
2 1 Nothing Nothing
3 2 Nothing 100001
4 3 UTF-8 100002
5 Nothing UTF-8 100007
The format table of table 2- the second electronic form file data
Step 202, text file is generated, the format of the second electronic form file data is converted to the format of text file And it is stored in text file.It include the second data attribute information in text file, in the agreement with the second data attribute Hold data.The second more succinct electronic form file data after being arranged are generated based on the second electronic form file data For program convenient for the text file form of identification, the format that each program requires is different, needs to be arranged the lattice of corresponding this paper file Formula.The format of text file may include: txt, csv etc..
For example, the second electronic form file data are Excel data, by Excel data generator convenient for the csv of identification Excel file is saved as csv file by file, and csv file each column is separated with comma, and programming is suitble to call.By the second electronics The csv format that the Excel format of form document data is converted to text file is as follows:
Project id, Item version, coded format, project number
1, nothing, UTF-8, nothing
2,1, nothing, nothing
3,2, nothing, 100001
4,3,UTF-8,100002
5, nothing, UTF-8,100007
Step 203, text file is read, the second data attribute information and the protocol contents with the second data attribute are obtained Data.The mapping of the second data attribute information and the protocol contents data with the second data attribute is processed into based on text file Relationship can obtain the exploitation identifiable code of environment based on mapping relations.Large batch of protocol data is converted to succinctly Code data, pass through external file carry out protocol data screening, arrange, it is possible to reduce the maintenance workers of size of code and code It measures, mapping relations can be called by other software functions.Mapping relations can be implemented as dictionary etc..
Step 204, the protocol contents data according to the second data attribute information and with the second data attribute generate agreement Data dictionary.
Dictionary stores data using the form of Key-Value.Object storage in dictionary carrys out table using key without sequence Show each object.Dictionary can be there are many building mode.For example, the key (key) in protocol data dictionary is the second data attribute Information, the key in protocol data dictionary is project id, Item version, coded format, project number etc., in protocol data dictionary The corresponding key assignments of key (Value) is in the agreement with data attributes such as project id, Item version, coded format, project numbers Hold data.
In text file, the protocol contents data arrangement of the second data attribute having the same is arranged in same row Protocol contents data with a line belong to same protocol data.Obtain the protocol contents arranged in text file in the same row Data establish protocol data dictionary.Text file is read, obtains the number of lines and columns evidence in text file, data attribute is as word The key assignments of allusion quotation generates the protocol data dictionary of every record.Because there is a plurality of record, then it is added into array, dictionary sum number Group is the exploitation identifiable code of environment.For example, correspond to the csv file of the second electronic form file data conversion, csv text Include 5 row protocol contents data in part, establishes 5 protocol data dictionaries corresponding with 5 row protocol contents data respectively, and Array is established, it will be in 5 protocol data dictionary deposit arrays.
After generating protocol data dictionary, the association to match with the second data attribute information is obtained from protocol data dictionary Discuss content-data.It determines in initial protocol data with the presence or absence of in the agreement to match with the second data attribute information obtained Hold data, if it does, the protocol data dictionary that judgement generates is correct, if it does not exist, then the protocol data word that judgement generates Allusion quotation is incorrect.Data in obtained protocol data dictionary can be made into sampling comparison processing with initial list data, with true Protect the correctness and integrality of data.
It is called after protocol data dictionary creation for other modules or developer, there are many processing methods.For example, In exploitation environment, developer's invocation protocol data dictionary, protocol data dictionary is in response to call instruction, from protocol data word The protocol contents data to match with the recalls information in call instruction are obtained in allusion quotation and are shown.Developer is from agreement number After obtaining protocol contents data in dictionary, by all or part of write-in code of protocol contents data, exploitation code is generated, Alternatively, developer writes all or part of protocol contents data after obtaining protocol contents data in protocol data dictionary Enter in the files such as webpage.
Protocol data is converted to electronic form document data by data processing method provided by the above embodiment, will The succinct protocol data that obtains is converted to text file after being arranged, being screened, and establishes data category by reading text file Property with the mapping relations of protocol contents data, above-mentioned function is realized by program, agreement number can be obtained based on mapping relations According to and handled, reduce the processing difficulty of protocol data, reduce relevant size of code, improve software development efficiency, It improves the speed of service of computer system and reduces the occupancy to resource for computer system, the code dimension in later period can be reduced Nurse makees.
In one embodiment, as shown in figure 4, the present invention provides a kind of data processing equipment 30, comprising: data acquisition mould Block 31, data screening module 32, data mapping module 33 and data checking module 34.Data acquisition module 31 turns protocol data The first electronic form file data are changed to, the first electronic form file data packet contains data attribute information and protocol contents number According to.
Data screening module 32 arrange and determine needing to delete according to screening rule to the first electronic form file data The first data attribute removed deletes the protocol contents data with the first data attribute from the first electronic form file data, Obtain the second electronic form file data.Data mapping module 33 establishes second retained based on the second electronic form file data The mapping relations of data attribute and the protocol contents data with the second data attribute, are accordingly located according to mapping relations Reason.
Data acquisition module 31 determines the protocol type of protocol data, obtains electrical form mould corresponding with protocol type Plate extracts data attribute information and protocol contents data simultaneously according to extracting rule corresponding with protocol type from protocol data It is filled into electronic form template, obtains the first electronic form file data.Data screening module 32 traverses the first electrical form File data carries out extensive processing to protocol contents data, arranges protocol contents data, so that the association with identical data attribute View content-data is arranged in same row.
As shown in figure 4, data mapping module 33 includes: at Date Conversion Unit 331, mapping generation unit 332 and calling Manage unit 333.Date Conversion Unit 331 generates text file, and the format of the second electronic form file data is converted to text The format of file is simultaneously stored in text file, includes the second data attribute information in text file, has the second data category The protocol contents data of property.It maps generation unit 332 and reads text file, obtain the second data attribute information and there is the second number According to attribute protocol contents data and establish mapping relations.
Generation unit 332 is mapped according to the second data attribute information and the protocol contents data with the second data attribute are raw At protocol data dictionary, the key in protocol data dictionary is the second data attribute information, and the key in protocol data dictionary is corresponding Key assignments is the protocol contents data with the second data attribute.In text file, the association of the second data attribute having the same View content-data is arranged in same row, also, the protocol contents data for being arranged in same a line belong to same protocol data.Mapping Generation unit 332 obtains the protocol contents data arranged in text file in the same row, establishes protocol data dictionary.
It include multirow protocol contents data in text file.Generation unit 332 is mapped to establish respectively and in multirow agreement Hold the corresponding multiple protocol data dictionaries of data, establish array, multiple protocol data dictionaries are stored in array.Calling processing Unit 333 is in response to call instruction, from the agreement that acquisition matches with the recalls information in call instruction in protocol data dictionary Content-data is simultaneously shown, to generate code or file according to the protocol contents data to match.
Data checking module 34 obtains the protocol contents to match with the second data attribute information from protocol data dictionary Data are determined with the presence or absence of the protocol contents data to match in protocol data, the agreement number generated based on definitive result judgement It is whether correct according to dictionary.First electronic form file data and the second electronic form file data include: Excel data etc.;Text This document includes: csv file etc..
Protocol data is converted to electronic form document number by data processing method and device provided by the above embodiment According to the succinct protocol data obtained after being arranged, screened is converted to text file, establishes number by reading text file According to the mapping relations of attribute and protocol contents data, protocol data can be obtained based on mapping relations and be handled, reduce association The processing difficulty for discussing data, reduces relevant size of code, saves the code development time, improve software development efficiency, mention The high speed of service of computer system and the occupancy for reducing resource for computer system, reduce because the code of protocol modification is repaired Change quantity, the code maintenance task in later period can be reduced, it is easy to maintain.
Method and system of the invention may be achieved in many ways.For example, can by software, hardware, firmware or Software, hardware, firmware any combination realize method and system of the invention.The said sequence of the step of for method is only In order to be illustrated, the step of method of the invention, is not limited to sequence described in detail above, especially says unless otherwise It is bright.In addition, in some embodiments, also the present invention can be embodied as to record program in the recording medium, these programs include For realizing machine readable instructions according to the method for the present invention.Thus, the present invention also covers storage for executing according to this hair The recording medium of the program of bright method.
Description of the invention is given for the purpose of illustration and description, and is not exhaustively or will be of the invention It is limited to disclosed form.Many modifications and variations are obvious for the ordinary skill in the art.It selects and retouches It states embodiment and is to more preferably illustrate the principle of the present invention and practical application, and those skilled in the art is enable to manage The solution present invention is to design various embodiments suitable for specific applications with various modifications.

Claims (20)

1. a kind of data processing method characterized by comprising
Protocol data is converted into the first electronic form file data, wherein the first electronic form file data packet contains Data attribute information and protocol contents data;
The first electronic form file data arrange according to screening rule and determine the first data category for needing to delete Property, the protocol contents data with the first data attribute are deleted from the first electronic form file data, obtain the second electricity Sub-table file data;Wherein, the first electronic form file data are traversed, extensive place is carried out to the protocol contents data Reason;
The second data attribute retained is established based on the second electronic form file data and with the association of the second data attribute The mapping relations for discussing content-data, are correspondingly handled according to the mapping relations.
2. the method as described in claim 1, which is characterized in that described established based on the second electronic form file data is protected The second data attribute stayed and the mapping relations of the protocol contents data with the second data attribute include:
Text file is generated, the format of the second electronic form file data is converted into the format of the text file and is deposited Storage, wherein include the second data attribute information, the protocol contents number with the second data attribute in the text file According to;
The text file is read, second data attribute information and the protocol contents with the second data attribute are obtained Data simultaneously establish the mapping relations.
3. method according to claim 2, which is characterized in that described to establish the mapping relations and include:
Protocol data is generated according to second data attribute information and the protocol contents data with the second data attribute Dictionary;
Wherein, the key in the protocol data dictionary is second data attribute information, the key in the protocol data dictionary Corresponding key assignments is the protocol contents data with the second data attribute.
4. method as claimed in claim 3, which is characterized in that in the text file, there is identical second data attribute Protocol contents data arrangement in same row, also, the protocol contents data for being arranged in same a line belong to same protocol data;
The generation protocol data dictionary includes:
The protocol contents data arranged in the text file in the same row are obtained, the protocol data dictionary is established.
5. method as claimed in claim 4, which is characterized in that include multirow protocol contents data in the text file;
Establish multiple protocol data dictionaries corresponding with multirow protocol contents data respectively;
Array is established, the multiple protocol data dictionary is stored in the array.
6. method as claimed in claim 3, which is characterized in that further include:
The protocol contents data to match with second data attribute information are obtained from the protocol data dictionary;
It determines in the protocol data with the presence or absence of the protocol contents data to match, is generated based on definitive result judgement Whether the protocol data dictionary is correct.
7. method as claimed in claim 3, which is characterized in that described to carry out correspondingly processing packet according to the mapping relations It includes:
In response to call instruction, match from acquisition in the protocol data dictionary with the recalls information in the call instruction Protocol contents data are simultaneously shown that the protocol contents data to match according to generate code or file.
8. method according to claim 2, which is characterized in that
The first electronic form file data and the second electronic form file data include: Excel data;The text File includes: csv file.
9. the method as described in claim 1, which is characterized in that described that protocol data is converted to the first electronic form file number According to including:
It determines the protocol type of the protocol data, obtains electronic form template corresponding with the protocol type;
Data attribute information and agreement are extracted from the protocol data according to extracting rule corresponding with the protocol type Content-data is simultaneously filled into the electronic form template, obtains the first electronic form file data.
10. the method as described in claim 1, which is characterized in that described literary to first electrical form according to screening rule Number of packages is according to being arranged further include:
The protocol contents data are arranged, so that the protocol contents data arrangement with identical data attribute is in same row.
11. a kind of data processing equipment characterized by comprising
Data acquisition module, for protocol data to be converted to the first electronic form file data, wherein first electronic watch Lattice file data packet contains data attribute information and protocol contents data;
Data screening module, for arrange to the first electronic form file data according to screening rule and determining needs The first data attribute deleted deletes the protocol contents with the first data attribute from the first electronic form file data Data obtain the second electronic form file data;Wherein, the data screening module is also used to traverse first electronic watch Lattice file data carry out extensive processing to the protocol contents data;
Data mapping module, for establishing the second data attribute retained based on the second electronic form file data and having The mapping relations of the protocol contents data of second data attribute, are correspondingly handled according to the mapping relations.
12. device as claimed in claim 11, which is characterized in that
The data mapping module, comprising:
Date Conversion Unit is converted to the format of the second electronic form file data described for generating text file The format of text file and storage, wherein include the second data attribute information in the text file, described there is the second number According to the protocol contents data of attribute;
Generation unit is mapped, for reading the text file, second data attribute information is obtained and described has second The protocol contents data of data attribute simultaneously establish the mapping relations.
13. device as claimed in claim 12, which is characterized in that
The mapping generation unit is also used to according to second data attribute information and the association with the second data attribute It discusses content-data and generates protocol data dictionary;Wherein, the key in the protocol data dictionary is second data attribute information, The corresponding key assignments of key in the protocol data dictionary is the protocol contents data with the second data attribute.
14. device as claimed in claim 13, which is characterized in that in the text file, there is identical second data category The protocol contents data arrangement of property is in same row, also, the protocol contents data for being arranged in same a line belong to same agreement number According to;
The mapping generation unit is also used to obtain the protocol contents data arranged in the text file in the same row, builds Found the protocol data dictionary.
15. device as claimed in claim 14, which is characterized in that include multirow protocol contents number in the text file According to;
The mapping generation unit is also used to establish multiple protocol data words corresponding with multirow protocol contents data respectively Allusion quotation;Array is established, the multiple protocol data dictionary is stored in the array.
16. device as claimed in claim 13, which is characterized in that further include:
Data checking module, for obtaining the association to match with second data attribute information from the protocol data dictionary Discuss content-data;It determines in the protocol data with the presence or absence of the protocol contents data to match, is sentenced based on definitive result Medium well at the protocol data dictionary it is whether correct.
17. device as claimed in claim 13, which is characterized in that
The data mapping module, comprising:
Call processing unit, in response to call instruction, from obtained in the protocol data dictionary in the call instruction The protocol contents data that match of recalls information and shown, the protocol contents data to match according to generate Code or file.
18. device as claimed in claim 12, which is characterized in that
The first electronic form file data and the second electronic form file data include: Excel data;The text File includes: csv file.
19. device as claimed in claim 11, which is characterized in that
The data acquisition module is also used to determine the protocol type of the protocol data, obtains corresponding with the protocol type Electronic form template;Data attribute is extracted from the protocol data according to extracting rule corresponding with the protocol type Information and protocol contents data are simultaneously filled into the electronic form template, obtain the first electronic form file data.
20. device as claimed in claim 11, which is characterized in that
The data screening module is also used to arrange the protocol contents data, so that in the agreement with identical data attribute Hold data arrangement in same row.
CN201710284432.3A 2017-04-27 2017-04-27 Data processing method and device Active CN107025214B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710284432.3A CN107025214B (en) 2017-04-27 2017-04-27 Data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710284432.3A CN107025214B (en) 2017-04-27 2017-04-27 Data processing method and device

Publications (2)

Publication Number Publication Date
CN107025214A CN107025214A (en) 2017-08-08
CN107025214B true CN107025214B (en) 2019-08-30

Family

ID=59527268

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710284432.3A Active CN107025214B (en) 2017-04-27 2017-04-27 Data processing method and device

Country Status (1)

Country Link
CN (1) CN107025214B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108959210A (en) * 2018-07-09 2018-12-07 网易(杭州)网络有限公司 A kind of method and device of file conversion
CN111507075B (en) * 2019-01-31 2023-06-16 贵州白山云科技股份有限公司 Method and device for converting data format
CN111898345A (en) * 2020-07-24 2020-11-06 北京车和家信息技术有限公司 Data processing method and device based on detailed design document

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101794280A (en) * 2010-03-11 2010-08-04 北京中科辅龙计算机技术股份有限公司 Form automatic generation method and system based on form template set
CN102270194A (en) * 2010-12-31 2011-12-07 北京谊安医疗系统股份有限公司 Character processing method and device
CN102541867A (en) * 2010-12-15 2012-07-04 金蝶软件(中国)有限公司 Data dictionary generating method and system
CN105824790A (en) * 2016-03-15 2016-08-03 上海缔安科技股份有限公司 Equipment table adapting method, computer equipment and mobile terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7017112B2 (en) * 2003-02-28 2006-03-21 Microsoft Corporation Importing and exporting markup language data in a spreadsheet application document

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101794280A (en) * 2010-03-11 2010-08-04 北京中科辅龙计算机技术股份有限公司 Form automatic generation method and system based on form template set
CN102541867A (en) * 2010-12-15 2012-07-04 金蝶软件(中国)有限公司 Data dictionary generating method and system
CN102270194A (en) * 2010-12-31 2011-12-07 北京谊安医疗系统股份有限公司 Character processing method and device
CN105824790A (en) * 2016-03-15 2016-08-03 上海缔安科技股份有限公司 Equipment table adapting method, computer equipment and mobile terminal

Also Published As

Publication number Publication date
CN107025214A (en) 2017-08-08

Similar Documents

Publication Publication Date Title
CN106600105B (en) Lean management system and method for dosage data of nuclear power plant
US20160321405A1 (en) Extracting clinical care pathways correlated with outcomes
CN109255523B (en) Analytical index computing platform based on KKS coding rule and big data architecture
CN107025214B (en) Data processing method and device
CN104732154A (en) Method And System For Anonymizing Data
CN103838672A (en) Automated testing method and device for all-purpose financial statements
CN103544074A (en) Method and device for verifying service
CN108073146B (en) Automated process control hardware engineering planning using architecturally represented requirements
CN103714086A (en) Method and device used for generating non-relational data base module
CN106873957A (en) The processing method and equipment of a kind of operation flow
CN107025411A (en) A kind of system and method for fine-grained data permission dynamic control
CN113672230A (en) Industrial element identification coding method
CN107392264A (en) Eletronic data management system and eletronic data management method
CN110378569A (en) Industrial relations chain building method, apparatus, equipment and storage medium
CN103810408B (en) Method and device for generating permission object
CN106600206B (en) Method for realizing unidirectional transmission of dosage data of nuclear power plant from management network to industrial network
CN110110153A (en) A kind of method and apparatus of node searching
CN106708869B (en) Group data processing method and device
US20230307103A1 (en) Platform for collobarative analysis of electronic records
CN108399251A (en) A kind of Intelligence Generator and data exhibiting process that multi-layer data shows
CN112783989A (en) Data processing method and device based on block chain
CN108108444B (en) Enterprise business unit self-adaptive system and implementation method thereof
CN107247715A (en) The synchronous method of WMS systems and ERP system
CN103197961B (en) A kind of Internet of Things flow chart of data processing automatic generation method based on RFID
CN115840738A (en) Data migration method and device, electronic equipment and storage medium

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
GR01 Patent grant
GR01 Patent grant