CN110609990B - Method and system for editing structured data text based on artificial intelligence - Google Patents

Method and system for editing structured data text based on artificial intelligence Download PDF

Info

Publication number
CN110609990B
CN110609990B CN201910842205.7A CN201910842205A CN110609990B CN 110609990 B CN110609990 B CN 110609990B CN 201910842205 A CN201910842205 A CN 201910842205A CN 110609990 B CN110609990 B CN 110609990B
Authority
CN
China
Prior art keywords
data
structured
text
line
structured data
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
CN201910842205.7A
Other languages
Chinese (zh)
Other versions
CN110609990A (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.)
Trend New Technology Beijing Co ltd
Original Assignee
Trend New Technology Beijing 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 Trend New Technology Beijing Co ltd filed Critical Trend New Technology Beijing Co ltd
Priority to CN201910842205.7A priority Critical patent/CN110609990B/en
Publication of CN110609990A publication Critical patent/CN110609990A/en
Application granted granted Critical
Publication of CN110609990B publication Critical patent/CN110609990B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a method and a system for editing structured data texts based on artificial intelligence, wherein the method comprises the following steps of S1, serializing structured data into common text data according to the data characteristics of the structured data; s2, using a common text tool to carry out relevant editing operation on the common text data to obtain the edited common text data; and S3, deserializing the edited common text data into new structured data. The advantages are that: the problem that structured data can only be edited by using a table tool like excel is solved; the method can be used for managing the structured table data, so that the management and the editing of the business data aiming at the table class are as simple as editing a common text; meanwhile, the structured service data is edited in a text editing mode, and the editing convenience and the editing efficiency of the structured data are greatly improved.

Description

Method and system for editing structured data text based on artificial intelligence
Technical Field
The invention relates to the field of computer software design and development, in particular to a structured data text editing method and system based on artificial intelligence.
Background
At present, data editing software is mainly divided into two types, one type is text editing tool software similar to word, txt and the like; the other is an excel-like form editing tool. At present, the business data is managed by table tools commonly used in most business function software, in this way, firstly, structured data needing to be managed is displayed by a list, then, a certain line is selected and then clicking and editing is carried out, and an editing interface aiming at the data is popped up; or excel-like can edit a cell directly, either way that must be edited for a fixed row or a fixed cell.
A first word-like text editing tool, which is simple to use but cannot manage structured service data (table-like service data); in the second excel-like form editing tool, because the data columns are relatively fixed, each form only manages one fixed service data, when multiple types of service data cannot be aggregated together for unified management and unified operation, and only can be edited for a fixed row or a fixed cell, the operation is relatively complex, and the editing efficiency is not high.
Disclosure of Invention
The invention aims to provide a structured data text editing method and system based on artificial intelligence, so as to solve the problems in the prior art.
In order to achieve the purpose, the technical scheme adopted by the invention is as follows:
a structured data text editing method based on artificial intelligence, the method comprises the following steps,
s1, according to the data characteristics of structured data, the structured data are serialized into common text data;
s2, using a common text tool to carry out relevant editing operation on the common text data, and obtaining the edited common text data;
and S3, deserializing the edited common text data into new structured data.
Preferably, before step S1, loading external structured data; the loading external structured data is specifically that structured information in the structured data to be loaded is identified, data capable of representing the structured information is separated from actual data according to the structured information, and the data is used as the data characteristic of the structured data; different identification modes and identification of structural information of different structural data are required.
Preferably, the step S1 specifically includes the following steps,
s11, serializing the whole line of data of the structured data; respectively serializing each line of data in the structured data into a piece of common text data, and respectively associating each line of data with the corresponding common text data;
s12, serializing multiple rows of data in the same row of data of the structured data; i.e. all the column data in the same row are serialized into a whole piece of plain text data.
Preferably, in step S11, the structured data has a fixed line number or a fixed serial number, and each line of data in the structured data is identified according to the line number or the serial number.
Preferably, in step S12, the data type and the data value range of each line of data in the same row of data are analyzed, and it is identified whether each line of data is specifically classified data, numerical data, date data, person name data, geographic position data or open type common text type data; if multiple rows of adjacent data of the same type exist in the same row of data, a special separator is used for dividing the two rows of data during serialization.
Preferably, step S3 specifically includes the following steps,
s31, deserializing each line of data in the edited common text data into structured multi-line data; corresponding each line data in the edited common text data to the structured multi-line data by using the corresponding relation between the identification and the line number or the serial number;
s32, classifying the text content in each row of data in the step S31 according to the data type based on artificial intelligence, and then corresponding the text content of the corresponding data type to a column with the same data type; when the same row of data has text contents with the same data type, corresponding the text contents to corresponding columns according to separators used in the serialization process and sequence information of each column;
and S33, summarizing the data of each line acquired in the step S32 line by line, and finally generating new structured data.
Preferably, after the step S3, the method further includes saving the generated new structured data as a structured data file, or calling a data interface to save the generated new structured data.
Preferably, in the process of saving the new structured data, the line number or the serial number is used to associate the new structured data with the original data in the loaded external structured data, and the line number or the serial number of the edited structured data and the line number or the serial number of the loaded external structured data exist and correspond to each other; if the new structured data has data without line numbers or serial numbers, the data is represented as new data in the editing operation process; and if the data is deleted in the editing operation process, the corresponding data in the new structured data is in a deleted state.
The invention also aims to provide an artificial intelligence based structured data text editing system, which is used for realizing the editing method, the editing system comprises,
a data loading module; the data processing method comprises the steps of loading external structured data, separating data capable of representing structured information in the structured data from actual data, and using the data as data characteristics of the structured data;
a data serialization module; according to the data characteristics of the structured data, the structured data are serialized into common text data;
a text editing module; using a common text tool to carry out relevant editing operation on the common text data, and acquiring the edited common text data;
a data deserialization module; deserializing the edited common text data into new structured data;
a data saving and outputting module; and saving the generated new structured data as a structured data file, or calling a data interface to save the generated new structured data.
The invention has the beneficial effects that: 1. the invention solves the problem that structured data can only be edited using a table tool like excel. 2. The invention can be used for managing structured table data, so that the management and the editing of the business data aiming at the table class are as simple as editing common texts. 3. The invention realizes the editing of the structured service data in a text editing mode, and greatly improves the editing convenience and the editing efficiency of the structured data.
Drawings
FIG. 1 is a flow chart illustrating an editing method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of data representing structured information in an Excel table in an embodiment of the present invention;
FIG. 3 is a diagram illustrating the use of a row number to identify a row of data in an embodiment of the present invention;
FIG. 4 is a diagram illustrating serialized data in an embodiment of the invention;
FIG. 5 is a diagram illustrating deserialization of plain text data in an embodiment of the present invention;
FIG. 6 is a schematic diagram of new structured data acquired in an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail below with reference to the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating the invention, are intended for purposes of illustration only and are not intended to limit the scope of the invention.
As shown in fig. 1 to 6, the present embodiment provides an artificial intelligence based structured data text editing method, which includes the following steps,
s1, according to the data characteristics of structured data, the structured data are serialized into common text data;
s2, using a common text tool to carry out relevant editing operation on the common text data, and obtaining the edited common text data;
and S3, deserializing the edited common text data into new structured data.
In this embodiment, the method is applicable to table files of Excel types and files in the form of xml or json; in this embodiment, an implementation process of the method is described in detail by taking a table file of an Excel class as an example.
In this embodiment, before step S1, loading external structured data; the loading external structured data is specifically that structured information in the structured data to be loaded is identified, data capable of representing the structured information is separated from actual data according to the structured information, and the data is used as the data characteristic of the structured data; different identification modes and identification of structural information of different structural data are required.
In the embodiment, the first row of data in the excel is used as the data of the structured information to identify the number of columns of the structured data, the title and meaning of each column of data, and the like; as shown in fig. 2.
In this embodiment, the step S1 specifically includes the following contents,
s11, serializing the whole line of data of the structured data; respectively serializing each line of data in the structured data into a piece of common text data, and respectively associating each line of data with the corresponding common text data;
s12, serializing multiple rows of data in the same row of data of the structured data; i.e. all columns of data in the same row are serialized into a whole piece of plain text data.
In this embodiment, in step S11, the structured data has a fixed line number or a serial number, and each line of data in the structured data is identified according to the line number or the serial number.
In this embodiment, in step S12, the data type and the data value range of each line of data in the same row of data are analyzed, and it is identified whether each line of data is specifically classified data, numerical data, date data, person name data, geographic position data, or open type common text type data; if multiple rows of adjacent data of the same type exist in the same row of data, a special separator is used for dividing the two rows of data during serialization.
In this embodiment, first, serialization of the whole line of data of the structured data is performed; associating a line in the structured data with the serialized common text data; the excel data identifies each row of data by the row number of the structured data; a fixed sequence number column, such as an ID column, is agreed upon based on the data loaded by the interface mode. That is, the structured data has a fixed line number or serial number, and each line of data in the structured data is identified according to the line number or serial number. As shown in particular in figure 3.
In this embodiment, after a line of data is serialized into text data, the line numbers of the structured data corresponding to the data are recorded, so that when the data is deserialized, the data corresponds to the original data in the structured data. As shown in fig. 4.
In this embodiment, the plurality of unit data in one line of data are serialized, and the data of all the units in one line are serialized into a whole segment of plain text data. In the process of serializing one line of data, analyzing information such as data types and data value ranges of each line of data, identifying that each unit is classified data, numerical data, date data, character name data, geographic position data or open type common text type and the like, and if a plurality of units in the same line of data are the same in type and adjacent in type, segmenting the two lines of data by taking special characters as segmentation symbols when serializing text contents, wherein the segmentation symbols can be $, |, and the like, but are not limited to the two segmentation symbols; the analyzed results will be used for reverse serialization.
In this embodiment, the serialized common text data is edited correspondingly by using a corresponding text editor, the editing process is the same as that of the common text, and operations such as entry, modification, deletion, and movement are performed on corresponding contents, so that the data is edited.
In this embodiment, step S3 specifically includes the following contents,
s31, deserializing each line of data in the edited common text data into structured multi-line data; corresponding each line data in the edited common text data to the structured multi-line data by using the corresponding relation between the identification and the line number or the serial number;
s32, classifying the text content in each row of data in the step S31 according to the data type based on artificial intelligence, and then corresponding the text content of the corresponding data type to a column with the same data type; when the same row of data has text contents with the same data type, corresponding the text contents to corresponding columns according to separators used in the serialization process and sequence information of each column;
and S33, summarizing the data of each line acquired in the step S32 line by line, and finally generating new structured data.
In this embodiment, according to the relationship between the plain text data and the structured data generated in the serialization process, the plain text data that is finally edited is reversely serialized into structured multi-line data; the original data in the structured data of the excel file class are reversely corresponding to the original data by using the line number identification, and the original data in the structured data loaded by the interface are reversely corresponding to the original data by the ID identification data in the interface data. Secondly, intelligently classifying the common text contents according to types based on an artificial intelligence identification technology according to the information of the identified structured data in the step 1 and the data types, data value ranges, segmentation characters used in serialization and the like of each row of units collected in the serialization process in the step 2, and then corresponding the text contents of the corresponding types to the units of the same type; if the units of the same type exist, the units are further corresponded to specific data units through information such as the range of data values, the segmentation symbols used in serialization, the sequence of data sequences and the like, and finally one line of text data is deserialized into a whole line of structured data with a plurality of data units. Finally, summarizing the serialized row-by-row data into complete new structured data; as shown in fig. 5-6.
In this embodiment, after the step S3, the step further includes saving the generated new structured data as a structured data file, or calling a data interface to save the generated new structured data.
In this embodiment, in the process of saving new structured data, the serial number is used to associate the new structured data with original data in the loaded external structured data, and the line numbers or serial numbers of the edited structured data and the loaded external structured data both exist and correspond to each other; if the new structured data has data without line numbers or serial numbers, the data is represented as new data in the editing operation process; and if the data is deleted in the editing operation process, the corresponding data in the new structured data is in a deleted state.
In this embodiment, the generated data is saved as a structured data file or the edited data is saved by calling a data interface. And in the process of saving the data, the line number or the ID generated in the step 1 is used for associating the original data, wherein the edited data and the line number or the ID in the original data exist, the edited data is edited aiming at the data, the edited data does not have the line number or the ID and is newly added structural data, the deleted data marks the data of the line number or the ID in a deleted state when being saved, if the deleted data is saved as the deleted data of the file, the deleted data is directly deleted, if the deleted data is the number loaded through the interface, the deleted data is submitted to the data saving interface through the saving interface, and finally the saving of the structural data is finished.
Example two
The embodiment provides a structured data text editing system based on artificial intelligence, which is used for realizing the editing method, and the editing system comprises,
a data loading module; the data processing method comprises the steps of loading external structured data, separating data capable of representing structured information in the structured data from actual data, and using the data as data characteristics of the structured data;
a data serialization module; according to the data characteristics of the structured data, the structured data is serialized into common text data;
a text editing module; using a common text tool to carry out relevant editing operation on the common text data, and acquiring the edited common text data;
a data deserialization module; deserializing the edited common text data into new structured data;
a data saving and outputting module; and saving the generated new structured data as a structured data file, or calling a data interface to save the generated new structured data.
In this embodiment, the system support software may be installed in the device to realize visualization of the editing process, and the software may be invoked to complete editing of the structured data. The text editing module is a common text editor and can edit common texts. The system supports loading structured data in an interface manner and restricting, defining the number of columns of data and the title, meaning and the like of each column of data based on the form of xml or json.
By adopting the technical scheme disclosed by the invention, the following beneficial effects are obtained:
the invention provides a method and a system for editing structured data text based on artificial intelligence, which solve the problem that structured data can only be edited by using a table tool similar to excel. The method and the system can be used for managing structured table data, so that the management and the editing of the business data aiming at the table class are as simple as editing common texts; the method and the device realize the editing of the structured service data in a text editing mode, and greatly improve the editing convenience and the editing efficiency of the structured data.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, many modifications and adaptations can be made without departing from the principle of the present invention, and such modifications and adaptations should also be considered to be within the scope of the present invention.

Claims (8)

1. A structured data text editing method based on artificial intelligence is characterized in that: the method comprises the following steps of,
s1, according to the data characteristics of structured data, the structured data are serialized into common text data;
s2, using a common text tool to carry out relevant editing operation on the common text data to obtain the edited common text data;
s3, deserializing the edited common text data into new structured data; the step S3 specifically includes the following contents,
s31, deserializing each line of data in the edited common text data into structured multi-line data; corresponding each line of data in the edited common text data to the structured multi-line data by using the corresponding relation between the identification and the line number or the serial number;
s32, classifying the text content in each row of data in the step S31 according to the data type based on artificial intelligence, and then corresponding the text content of the corresponding data type to a column with the same data type; when the same row of data has text contents with the same data type, corresponding the text contents to corresponding columns according to separators used in the serialization process and sequence information of each column;
and S33, summarizing the data of each line acquired in the step S32 line by line, and finally generating new structured data.
2. The artificial intelligence based structured data text editing method of claim 1, wherein: before the step S1, loading external structured data; the loading external structured data is specifically that structured information in the structured data to be loaded is identified, data capable of representing the structured information is separated from actual data according to the structured information, and the data is used as the data characteristic of the structured data; different identification modes and identification of structural information of different structural data are required.
3. The artificial intelligence based structured data text editing method of claim 1, wherein: the step S1 specifically includes the following contents,
s11, serializing the whole line of data of the structured data; respectively serializing each line of data in the structured data into a piece of common text data, and respectively associating each line of data with the corresponding common text data;
s12, serializing multiple rows of data in the same row of data of the structured data; i.e. all the column data in the same row are serialized into a whole piece of plain text data.
4. The artificial intelligence based structured data text editing method of claim 3, wherein: in step S11, the structured data has a fixed line number or serial number, and each line of data in the structured data is identified according to the line number or serial number.
5. The artificial intelligence based structured data text editing method of claim 4, wherein: step S12, analyzing the data type and the data value range of each line of data in the same row of data, and identifying whether each line of data is classified data, numerical data, date data, character name data, geographic position data or open type common text type data; if multiple rows of adjacent data of the same type exist in the same row of data, a special separator is used for dividing the two rows of data during serialization.
6. The artificial intelligence based structured data text editing method of claim 1, wherein: after the step S3, saving the generated new structured data as a structured data file, or calling a data interface to save the generated new structured data.
7. The artificial intelligence based structured data text editing method of claim 6, wherein: in the process of saving new structured data, a line number or a serial number is used for correlating the new structured data with original data in the loaded external structured data, and the line numbers or the serial numbers of the edited structured data and the loaded external structured data exist and are corresponding to each other; if the new structured data has data without line numbers or serial numbers, the data is represented as new data in the editing operation process; and if the data is deleted in the editing operation process, the corresponding data in the new structured data is in a deleted state.
8. An artificial intelligence based structured data text editing system, the editing system being used for implementing the editing method of any one of the preceding claims 1 to 7, characterized in that: the editing system comprises a plurality of editing units,
a data loading module; the data characteristic is used for loading external structured data, separating data which can represent structured information in the structured data from actual data, and taking the data as the structured data;
a data serialization module; according to the data characteristics of the structured data, the structured data are serialized into common text data;
a text editing module; using a common text tool to carry out relevant editing operation on the common text data, and acquiring the edited common text data;
a data deserialization module; deserializing the edited common text data into new structured data;
a data storage output module; and saving the generated new structured data as a structured data file, or calling a data interface to save the generated new structured data.
CN201910842205.7A 2019-09-06 2019-09-06 Method and system for editing structured data text based on artificial intelligence Active CN110609990B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910842205.7A CN110609990B (en) 2019-09-06 2019-09-06 Method and system for editing structured data text based on artificial intelligence

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910842205.7A CN110609990B (en) 2019-09-06 2019-09-06 Method and system for editing structured data text based on artificial intelligence

Publications (2)

Publication Number Publication Date
CN110609990A CN110609990A (en) 2019-12-24
CN110609990B true CN110609990B (en) 2023-02-07

Family

ID=68892242

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910842205.7A Active CN110609990B (en) 2019-09-06 2019-09-06 Method and system for editing structured data text based on artificial intelligence

Country Status (1)

Country Link
CN (1) CN110609990B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101963955A (en) * 2010-09-17 2011-02-02 深圳市万兴软件有限公司 System and method for converting XML format document into Word format document
CN104077335A (en) * 2013-05-07 2014-10-01 腾讯科技(深圳)有限公司 Methods, devices and system for serializing and deserializing structured data
CN106776507A (en) * 2015-11-19 2017-05-31 北京国双科技有限公司 Word file generation method and device
CN106844307A (en) * 2017-01-05 2017-06-13 上海核工程研究设计院 It is a kind of to realize that Excel turns the system and method for Word based on mark
CN107679027A (en) * 2017-10-10 2018-02-09 中国航发控制系统研究所 Excel test case forms are converted to the method and device of Word test case forms
CN108153717A (en) * 2017-12-29 2018-06-12 北京仁和汇智信息技术有限公司 A kind of structuring processing method and processing device of papers in sci-tech word document
CN109117466A (en) * 2018-07-26 2019-01-01 腾讯科技(深圳)有限公司 table format conversion method, device, equipment and storage medium
CN110175317A (en) * 2019-04-26 2019-08-27 武汉欧铭达科技有限公司 A kind of txt batch turns the data method of Excel

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7117435B1 (en) * 2000-06-21 2006-10-03 Microsoft Corporation Spreadsheet fields in text

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101963955A (en) * 2010-09-17 2011-02-02 深圳市万兴软件有限公司 System and method for converting XML format document into Word format document
CN104077335A (en) * 2013-05-07 2014-10-01 腾讯科技(深圳)有限公司 Methods, devices and system for serializing and deserializing structured data
CN106776507A (en) * 2015-11-19 2017-05-31 北京国双科技有限公司 Word file generation method and device
CN106844307A (en) * 2017-01-05 2017-06-13 上海核工程研究设计院 It is a kind of to realize that Excel turns the system and method for Word based on mark
CN107679027A (en) * 2017-10-10 2018-02-09 中国航发控制系统研究所 Excel test case forms are converted to the method and device of Word test case forms
CN108153717A (en) * 2017-12-29 2018-06-12 北京仁和汇智信息技术有限公司 A kind of structuring processing method and processing device of papers in sci-tech word document
CN109117466A (en) * 2018-07-26 2019-01-01 腾讯科技(深圳)有限公司 table format conversion method, device, equipment and storage medium
CN110175317A (en) * 2019-04-26 2019-08-27 武汉欧铭达科技有限公司 A kind of txt batch turns the data method of Excel

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
文本文件批量转换EXCEL表格文件格式的算法;王炜 等;《电脑学习》;20181031(第5期);第60-61页 *
用VB将文本类文件转换为EXCEL文件;杨元法;《计算机时代》;20011025;第6页 *
由EXCEL文件到数据库标准文本文件(STF)的数据格式转换;黄方 等;《铁路航测》;20031230(第4期);第12-14页 *

Also Published As

Publication number Publication date
CN110609990A (en) 2019-12-24

Similar Documents

Publication Publication Date Title
CN109448100B (en) Three-dimensional model format conversion method, system, computer device and storage medium
CN107704539B (en) Method and device for large-scale text information batch structuring
CN103617047A (en) Method, device and processor for developing business processes
CN112036736A (en) Workflow creating method and device
CN101772760B (en) Database management program and database management device
CN113688288B (en) Data association analysis method, device, computer equipment and storage medium
CN102087657B (en) IO (Input/output) to point method and IO (Input/output) to point for nuclear power plant simulation platform
US20150089415A1 (en) Method of processing big data, apparatus performing the same and storage media storing the same
CN105701251A (en) Data export and import method based on object definition
CN110765402A (en) Visual acquisition system and method based on network resources
CN107103035A (en) This earth's surface data-updating method and device
CN115309749A (en) Big data experiment system for scientific and technological service
CN104537012A (en) Data processing method and device
CN110609990B (en) Method and system for editing structured data text based on artificial intelligence
CN105808748A (en) MIB (Management Information Base) version contrast method and device
CN116150099A (en) Method for automatically generating ktr file based on keyle
CN101788977A (en) Method for implementing editing and modifying of medical examination report
CN114895875A (en) Zero-code visual information system metadata production application method and system
CN107844639B (en) Project standard structure automatic generation method and system
CN112084111A (en) Data processing method, system and device
CN111858387B (en) Data preparation method and device
CN115248803B (en) Collection method and device suitable for network disk file, network disk and storage medium
US20210141996A1 (en) System and method for note taking and management
CN110515913B (en) Log processing method and device
CN117520192A (en) Method, system and storage medium for escaping Excel test cases from XMIND mind map

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