CN110532526B - Data conversion method, electronic device and computer readable storage medium - Google Patents

Data conversion method, electronic device and computer readable storage medium Download PDF

Info

Publication number
CN110532526B
CN110532526B CN201910665055.7A CN201910665055A CN110532526B CN 110532526 B CN110532526 B CN 110532526B CN 201910665055 A CN201910665055 A CN 201910665055A CN 110532526 B CN110532526 B CN 110532526B
Authority
CN
China
Prior art keywords
english
chinese characters
data conversion
dto
document
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
CN201910665055.7A
Other languages
Chinese (zh)
Other versions
CN110532526A (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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201910665055.7A priority Critical patent/CN110532526B/en
Publication of CN110532526A publication Critical patent/CN110532526A/en
Application granted granted Critical
Publication of CN110532526B publication Critical patent/CN110532526B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/31Indexing; Data structures therefor; Storage structures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The invention relates to a data analysis technology, and discloses a data conversion method, which comprises the following steps: providing an Excel document template for a user to download; receiving a document uploaded after a user fills in Chinese characters according to the downloaded template; automatically generating English descriptions corresponding to each column of Chinese characters in the document; receiving confirmation feedback of the user on the English description and storing a confirmed result; and generating a DTO code file according to the confirmed result. The invention also provides an electronic device and a computer readable storage medium. The data conversion method, the electronic device and the computer readable storage medium provided by the invention can reduce the process of English description which corresponds to individual customization of developers, and simultaneously greatly improve the development efficiency.

Description

Data conversion method, electronic device and computer readable storage medium
Technical Field
The present invention relates to the field of data analysis technologies, and in particular, to a data conversion method, an electronic device, and a computer readable storage medium.
Background
At present, for the situation that an Excel document needs to be uploaded, a template file is generally provided for a user to download, and then corresponding Chinese characters are filled in corresponding columns of the template file. When the background realizes the conversion of the corresponding columns into English corresponding keywords (keys), the key is basically defined by developers, and all the template realization is basically uniformly performed, so that the key is time-consuming and complex in operation especially under the condition of a plurality of template columns.
Disclosure of Invention
In view of the above, the present invention provides a data conversion method, an electronic device and a computer readable storage medium, so as to solve the problem of how to quickly implement the Chinese-English conversion of an Excel template file.
First, in order to achieve the above object, the present invention provides a data conversion method, which includes the steps of:
providing an Excel document template for a user to download;
Receiving a document uploaded after a user fills in Chinese characters according to the downloaded template;
Automatically generating English descriptions corresponding to each column of Chinese characters in the document;
receiving confirmation feedback of the user on the English description and storing a confirmed result; and
And generating a DTO code file according to the confirmed result, wherein the DTO code file defines English descriptions of all columns in the document, and each field of the English descriptions has Chinese annotation description.
Optionally, the method further comprises the steps of:
And creating an index library according to the confirmed result, and storing each column of Chinese characters and corresponding English descriptions thereof into the index library.
Optionally, the method further comprises the steps of:
and storing the DTO code file automatically generated and converted, and writing the converted process code into a file in a preset format so as to provide a code file downloading function.
Optionally, the step of automatically generating the english description corresponding to each column of chinese characters in the document includes:
The translation of each column of Chinese characters is realized by calling an API interface provided by translation software, so that English description corresponding to each column of Chinese characters is automatically generated;
directly filtering the virtual words without word sense in the English description obtained by translation;
and naming the filtered English description according to a hump type naming method.
Optionally, the step of creating an index base according to the confirmed result includes:
And generating an index file by means of slor search engine, wherein the index file is stored in slor, and the corresponding relation between the Chinese characters and the English description is stored.
In addition, to achieve the above object, the present invention further provides an electronic device, including a memory and a processor, where the memory stores a data conversion system that can be executed on the processor, and the data conversion system when executed by the processor implements the following steps:
providing an Excel document template for a user to download;
Receiving a document uploaded after a user fills in Chinese characters according to the downloaded template;
Automatically generating English descriptions corresponding to each column of Chinese characters in the document;
receiving confirmation feedback of the user on the English description and storing a confirmed result; and
And generating a DTO code file according to the confirmed result, wherein the DTO code file defines English descriptions of all columns in the document, and each field of the English descriptions has Chinese annotation description.
Optionally, the data conversion system further implements the steps when executed by the processor:
And creating an index library according to the confirmed result, and storing each column of Chinese characters and corresponding English descriptions thereof into the index library.
Optionally, the data conversion system further implements the steps when executed by the processor:
and storing the DTO code file automatically generated and converted, and writing the converted process code into a file in a preset format so as to provide a code file downloading function.
Optionally, the step of automatically generating the english description corresponding to each column of chinese characters in the document includes:
The translation of each column of Chinese characters is realized by calling an API interface provided by translation software, so that English description corresponding to each column of Chinese characters is automatically generated;
directly filtering the virtual words without word sense in the English description obtained by translation;
and naming the filtered English description according to a hump type naming method.
Further, to achieve the above object, the present invention also provides a computer-readable storage medium storing a data conversion system executable by at least one processor to cause the at least one processor to perform the steps of the data conversion method as described above.
Compared with the prior art, the data conversion method, the electronic device and the computer readable storage medium provided by the invention can automatically generate corresponding English descriptions for Chinese character columns in an Excel template file, store and generate corresponding DTOs after user confirmation, reduce the process of customizing corresponding English descriptions by developers, and greatly improve the development efficiency.
Drawings
FIG. 1 is a schematic diagram of an alternative hardware architecture of an electronic device according to the present invention;
FIG. 2 is a schematic diagram of a program module of a first embodiment of the data conversion system of the present invention;
FIG. 3 is a schematic diagram of a program module of a second embodiment of the data conversion system of the present invention;
FIG. 4 is a schematic diagram of a program module of a third embodiment of the data conversion system of the present invention;
FIG. 5 is a schematic flow chart of a first embodiment of the data conversion method of the present invention;
FIG. 6 is a schematic flow chart of a second embodiment of the data conversion method of the present invention;
FIG. 7 is a schematic flow chart of a third embodiment of the data conversion method of the present invention;
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be noted that the description of "first", "second", etc. in this disclosure is for descriptive purposes only and is not to be construed as indicating or implying a relative importance or implying an indication of the number of technical features being indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In addition, the technical solutions of the embodiments may be combined with each other, but it is necessary to base that the technical solutions can be realized by those skilled in the art, and when the technical solutions are contradictory or cannot be realized, the combination of the technical solutions should be considered to be absent and not within the scope of protection claimed in the present invention.
Referring to fig. 1, a schematic diagram of an alternative hardware architecture of an electronic device 2 according to the present invention is shown.
In this embodiment, the electronic device 2 may include, but is not limited to, a memory 11, a processor 12, and a network interface 13 that may be communicatively connected to each other through a system bus. It should be noted that fig. 1 only shows an electronic device 2 having components 11-13, but it should be understood that not all of the illustrated components are required to be implemented, and that more or fewer components may alternatively be implemented.
The electronic device 2 may be a server, a PC (Personal Computer ), or a terminal device such as a smart phone, a tablet computer, a palm computer, a portable computer, etc. The server may be a rack server, a blade server, a tower server, or a cabinet server, and may be an independent server or a server cluster formed by a plurality of servers.
The memory 11 includes at least one type of readable storage medium including flash memory, hard disk, multimedia card, card memory (e.g., SD or DX memory, etc.), random Access Memory (RAM), static Random Access Memory (SRAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), programmable Read Only Memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the storage 11 may be an internal storage unit of the electronic device 2, such as a hard disk or a memory of the electronic device 2. In other embodiments, the memory 11 may also be an external storage device of the electronic apparatus 2, such as a plug-in hard disk, a smart memory card (SMART MEDIA CARD, SMC), a Secure Digital (SD) card, a flash memory card (FLASH CARD) or the like, which are provided on the electronic apparatus 2. Of course, the memory 11 may also comprise both an internal memory unit and an external memory device of the electronic apparatus 2. In this embodiment, the memory 11 is generally used to store an operating system and various application software installed on the electronic device 2, such as program codes of the data conversion system 200. Further, the memory 11 may be used to temporarily store various types of data that have been output or are to be output.
The processor 12 may be a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments. The processor 12 is typically used to control the overall operation of the electronic device 2. In this embodiment, the processor 12 is configured to execute the program code stored in the memory 11 or process data, for example, execute the data conversion system 200.
The network interface 13 may comprise a wireless network interface or a wired network interface, which network interface 13 is typically used for establishing a communication connection between the electronic apparatus 2 and other electronic devices.
So far, the hardware structure and function of the related device of the present invention have been described in detail. In the following, various embodiments of the present invention will be presented based on the above description.
First, the present invention proposes a data conversion system 200.
Referring to FIG. 2, a block diagram of a first embodiment of a data conversion system 200 according to the present invention is shown.
In this embodiment, the data conversion system 200 includes a series of computer program instructions stored on the memory 11 that, when executed by the processor 12, perform the data conversion operations of the various embodiments of the invention. In some embodiments, the data conversion system 200 may be divided into one or more modules based on the particular operations implemented by portions of the computer program instructions. For example, in fig. 2, the data conversion system 200 may be divided into a download module 201, a receiving module 202, and a generating module 203. Wherein:
The download module 201 is configured to provide an Excel document template for a user to download.
Specifically, the embodiment adopts java language to realize functions such as Chinese-English conversion of the rear end, and adopts jsp and html language to realize a visual interface of the front end. Various Excel document templates can be provided for the user on the visual interface so that the user can download according to the content actually required.
The receiving module 202 is configured to receive a document after the user fills in the Chinese characters according to the template.
Specifically, after downloading a required Excel document template, a user fills in corresponding data (Chinese characters), and then directly operates the visual interface to upload the filled-in Excel document.
The generating module 203 is configured to automatically generate an english description corresponding to each column of chinese characters in the document.
Specifically, the translation of each column of Chinese characters (column names) can be realized by calling an API interface provided by translation software (such as hundred-degree translation or Google translation), so that English descriptions corresponding to each column of Chinese characters can be automatically generated. The english descriptions are named according to hump nomenclature, i.e. when the variable or function name is a unique identifier consisting of one or more words joined together, the first word starts with a lowercase letter and the first letter of each word after the second word starts with an uppercase letter. Some column names may be composed of a plurality of words, only key English words are selected during conversion, and the key English words are directly filtered according to the English words without practical meaning in the translation process. The English word without practical meaning mainly refers to the imaginary word without word sense, including the articles, prepositions and the like, such as the, on, of.
The receiving module 202 is further configured to receive confirmation feedback of the user on the english description and store the confirmed result.
Specifically, after the automatic conversion of the English description is completed for the Chinese character columns in the document, the visual page displays the conversion result to the user. The developer can manually check the conversion result, and if the English description of automatic conversion is not friendly, the developer can revise the conversion result; if there is no problem, click directly to use this version. And aiming at the feedback result after the confirmation of the developer, the system stores, if the revised result of the developer is stored, directly storing the conversion result of the original version without revising.
The generating module 203 is further configured to generate a DTO (DATA TRANSFER Object, data transmission Object) according to the result after the confirmation.
Specifically, when the feedback result after the confirmation of the developer is received and stored, a DTO is generated at the same time. The DTO is an entity class in the java language, the DTO defines English descriptions of all columns in the document, the relation between Chinese characters and English is automatically bound on the DTO through notes, and each field of the English description has Chinese annotation description in the DTO. In this embodiment, the corresponding DTO may be obtained by using an existing DTO generating technology according to the result of feedback after the developer confirms.
The data conversion system provided by the embodiment can automatically generate corresponding English descriptions aiming at Chinese character columns in an Excel template file, and store and generate corresponding DTOs after confirmation by a user, so that the process of customizing corresponding English descriptions by developers is reduced, and meanwhile, the development efficiency is greatly improved.
Referring to FIG. 3, a block diagram of a second embodiment of a data conversion system 200 according to the present invention is shown. In this embodiment, the data conversion system 200 further includes a creation module 204 in addition to the download module 201, the receiving module 202, and the generating module 203 in the first embodiment.
The creation module 204 is configured to create an index library according to the confirmed result.
Specifically, in this embodiment, an index library is also created, and each column of Chinese characters and corresponding english descriptions thereof are saved in the index library, so that the Chinese characters and the corresponding english descriptions can be obtained quickly later, and a relatively complete word library is generated through continuous accumulation. The index library stores the corresponding relation between Chinese characters and English descriptions, and an index file is generated by means of slor search engines and is stored in slor. Because of the different demands of users on Excel document templates, the data stored in the index library is more and more. When the English description corresponding to each Chinese character is automatically generated later, whether records exist or not can be firstly inquired from the index library, if so, the recorded English description can be directly used, translation is not needed, and if not, the translation is re-performed.
The data conversion system provided by the embodiment can automatically generate corresponding English descriptions aiming at Chinese character columns in an Excel template file, store and generate corresponding DTOs after confirmation by a user, and also can create an index library to avoid subsequent repeated translation, reduce the process of individually customizing corresponding English descriptions by developers, and greatly improve the development efficiency.
Referring to FIG. 4, a block diagram of a third embodiment of a data conversion system 200 according to the present invention is shown. In this embodiment, the data conversion system 200 includes a code module 205 in addition to the download module 201, the receive module 202, the generate module 203, and the create module 204 in the second embodiment.
The code module 205 is configured to generate a transformation algorithm code for downloading.
Specifically, the embodiment uses java language for development (by means of CGLIB and java reflection principle), automatically generates and stores the converted DTO code file, writes the converted process code into the file (file format supports txt, java, etc.), and the visual interface provides the code file downloading function. The user (developer) clicks the downloading tool to automatically download the automatically generated DTO and conversion algorithm, and the DTO and conversion algorithm can be used after direct copying.
The data conversion system provided by the embodiment can automatically generate corresponding English descriptions for Chinese character columns in an Excel template file, store and generate corresponding DTOs after confirmation by a user, and also can create an index library to avoid subsequent repeated translation, generate conversion algorithm codes for direct use after being downloaded by a developer, reduce the process of customizing corresponding English descriptions by the developer, and greatly improve the development efficiency.
In addition, the invention also provides a data conversion method.
Referring to fig. 5, a flow chart of a first embodiment of the data conversion method of the present invention is shown. In this embodiment, the execution sequence of the steps in the flowchart shown in fig. 5 may be changed, and some steps may be omitted according to different requirements. The method comprises the following steps:
step S500, an Excel document template is provided for downloading by a user.
Specifically, the embodiment adopts java language to realize functions such as Chinese-English conversion of the rear end, and adopts jsp and html language to realize a visual interface of the front end. Various Excel document templates can be provided for the user on the visual interface so that the user can download according to the content actually required.
Step S502, receiving a document after the user fills in Chinese characters according to the template.
Specifically, after downloading a required Excel document template, a user fills in corresponding data (Chinese characters), and then directly operates the visual interface to upload the filled-in Excel document.
Step S504, english description corresponding to each column of Chinese characters in the document is automatically generated.
Specifically, the translation of each column of Chinese characters (column names) can be realized by calling an API interface provided by translation software (such as hundred-degree translation or Google translation), so that English descriptions corresponding to each column of Chinese characters can be automatically generated. The english descriptions are named according to hump nomenclature, i.e. when the variable or function name is a unique identifier consisting of one or more words joined together, the first word starts with a lowercase letter and the first letter of each word after the second word starts with an uppercase letter. Some column names may be composed of a plurality of words, only key English words are selected during conversion, and the key English words are directly filtered according to the English words without practical meaning in the translation process. The English word without practical meaning mainly refers to the imaginary word without word sense, including the articles, prepositions and the like, such as the, on, of.
Step S506, receiving confirmation feedback of the user on the English description and storing a confirmed result.
Specifically, after the automatic conversion of the English description is completed for the Chinese character columns in the document, the visual page displays the conversion result to the user. The developer can manually check the conversion result, and if the English description of automatic conversion is not friendly, the developer can revise the conversion result; if there is no problem, click directly to use this version. And aiming at the feedback result after the confirmation of the developer, the system stores, if the revised result of the developer is stored, directly storing the conversion result of the original version without revising.
Step S508, a DTO is generated according to the confirmed result.
Specifically, when the feedback result after the confirmation of the developer is received and stored, a DTO is generated at the same time. The DTO is an entity class in the java language, the DTO defines English descriptions of all columns in the document, the relation between Chinese characters and English is automatically bound on the DTO through notes, and each field of the English description has Chinese annotation description in the DTO. In this embodiment, the corresponding DTO may be obtained by using an existing DTO generating technology according to the result of feedback after the developer confirms.
The data conversion method provided by the embodiment can automatically generate corresponding English descriptions aiming at Chinese character columns in an Excel template file, and store and generate corresponding DTOs after confirmation by a user, so that the process of customizing corresponding English descriptions by developers is reduced, and meanwhile, the development efficiency is greatly improved.
FIG. 6 is a flow chart of a second embodiment of the data conversion method of the present invention. In this embodiment, steps S600 to S608 of the data conversion method are similar to steps S500 to S508 of the first embodiment, except that the method further includes step S610.
The method comprises the following steps:
Step S600, an Excel document template is provided for downloading by a user.
Specifically, the embodiment adopts java language to realize functions such as Chinese-English conversion of the rear end, and adopts jsp and html language to realize a visual interface of the front end. Various Excel document templates can be provided for the user on the visual interface so that the user can download according to the content actually required.
Step S602, receiving a document after the user fills in Chinese characters according to the template.
Specifically, after downloading a required Excel document template, a user fills in corresponding data (Chinese characters), and then directly operates the visual interface to upload the filled-in Excel document.
Step S604, english descriptions corresponding to each column of Chinese characters in the document are automatically generated.
Specifically, the translation of each column of Chinese characters (column names) can be realized by calling an API interface provided by translation software (such as hundred-degree translation or Google translation), so that English descriptions corresponding to each column of Chinese characters can be automatically generated. The english descriptions are named according to hump nomenclature, i.e. when the variable or function name is a unique identifier consisting of one or more words joined together, the first word starts with a lowercase letter and the first letter of each word after the second word starts with an uppercase letter. Some column names may be composed of a plurality of words, only key English words are selected during conversion, and the key English words are directly filtered according to the English words without practical meaning in the translation process. The English word without practical meaning mainly refers to the imaginary word without word sense, including the articles, prepositions and the like, such as the, on, of.
Step S606, receiving confirmation feedback of the user on the English description and storing a confirmed result.
Specifically, after the automatic conversion of the English description is completed for the Chinese character columns in the document, the visual page displays the conversion result to the user. The developer can manually check the conversion result, and if the English description of automatic conversion is not friendly, the developer can revise the conversion result; if there is no problem, click directly to use this version. And aiming at the feedback result after the confirmation of the developer, the system stores, if the revised result of the developer is stored, directly storing the conversion result of the original version without revising.
Step S608, generating a DTO according to the result after the confirmation.
Specifically, when the feedback result after the confirmation of the developer is received and stored, a DTO is generated at the same time. The DTO is an entity class in the java language, the DTO defines English descriptions of all columns in the document, the relation between Chinese characters and English is automatically bound on the DTO through notes, and each field of the English description has Chinese annotation description in the DTO. In this embodiment, the corresponding DTO may be obtained by using an existing DTO generating technology according to the result of feedback after the developer confirms.
Step S610, an index library is created according to the confirmed result.
Specifically, in this embodiment, an index library is also created, and each column of Chinese characters and corresponding english descriptions thereof are saved in the index library, so that the Chinese characters and the corresponding english descriptions can be obtained quickly later, and a relatively complete word library is generated through continuous accumulation. The index library stores the corresponding relation between Chinese characters and English descriptions, and an index file is generated by means of slor search engines and is stored in slor. Because of the different demands of users on Excel document templates, the data stored in the index library is more and more. When the English description corresponding to each Chinese character is automatically generated later, whether records exist or not can be firstly inquired from the index library, if so, the recorded English description can be directly used, translation is not needed, and if not, the translation is re-performed.
The data conversion method provided by the embodiment can automatically generate corresponding English descriptions aiming at Chinese character columns in an Excel template file, store and generate corresponding DTOs after confirmation by a user, and also can create an index library to avoid subsequent repeated translation, reduce the process of individually customizing corresponding English descriptions by developers, and greatly improve the development efficiency.
FIG. 7 is a flow chart of a third embodiment of the data conversion method of the present invention. In this embodiment, steps S700 to S710 of the data conversion method are similar to steps S600 to S610 of the second embodiment, except that the method further includes step S712.
The method comprises the following steps:
Step S700, an Excel document template is provided for downloading by a user.
Specifically, the embodiment adopts java language to realize functions such as Chinese-English conversion of the rear end, and adopts jsp and html language to realize a visual interface of the front end. Various Excel document templates can be provided for the user on the visual interface so that the user can download according to the content actually required.
Step S702, a document of a user after filling Chinese characters according to a template is received.
Specifically, after downloading a required Excel document template, a user fills in corresponding data (Chinese characters), and then directly operates the visual interface to upload the filled-in Excel document.
Step S704, english descriptions corresponding to each column of Chinese characters in the document are automatically generated.
Specifically, the translation of each column of Chinese characters (column names) can be realized by calling an API interface provided by translation software (such as hundred-degree translation or Google translation), so that English descriptions corresponding to each column of Chinese characters can be automatically generated. The english descriptions are named according to hump nomenclature, i.e. when the variable or function name is a unique identifier consisting of one or more words joined together, the first word starts with a lowercase letter and the first letter of each word after the second word starts with an uppercase letter. Some column names may be composed of a plurality of words, only key English words are selected during conversion, and the key English words are directly filtered according to the English words without practical meaning in the translation process. The English word without practical meaning mainly refers to the imaginary word without word sense, including the articles, prepositions and the like, such as the, on, of.
Step S706, receiving the confirmation feedback of the user to the English description and storing the confirmed result.
Specifically, after the automatic conversion of the English description is completed for the Chinese character columns in the document, the visual page displays the conversion result to the user. The developer can manually check the conversion result, and if the English description of automatic conversion is not friendly, the developer can revise the conversion result; if there is no problem, click directly to use this version. And aiming at the feedback result after the confirmation of the developer, the system stores, if the revised result of the developer is stored, directly storing the conversion result of the original version without revising.
Step S708, a DTO is generated according to the confirmed result.
Specifically, when the feedback result after the confirmation of the developer is received and stored, a DTO is generated at the same time. The DTO is an entity class in the java language, the DTO defines English descriptions of all columns in the document, the relation between Chinese characters and English is automatically bound on the DTO through notes, and each field of the English description has Chinese annotation description in the DTO. In this embodiment, the corresponding DTO may be obtained by using an existing DTO generating technology according to the result of feedback after the developer confirms.
Step S710, creating an index base according to the confirmed result.
Specifically, in this embodiment, an index library is also created, and each column of Chinese characters and corresponding english descriptions thereof are saved in the index library, so that the Chinese characters and the corresponding english descriptions can be obtained quickly later, and a relatively complete word library is generated through continuous accumulation. The index library stores the corresponding relation between Chinese characters and English descriptions, and an index file is generated by means of slor search engines and is stored in slor. Because of the different demands of users on Excel document templates, the data stored in the index library is more and more. When the English description corresponding to each Chinese character is automatically generated later, whether records exist or not can be firstly inquired from the index library, if so, the recorded English description can be directly used, translation is not needed, and if not, the translation is re-performed.
In step S712, a transformation algorithm code is generated for downloading.
Specifically, the embodiment uses java language for development (by means of CGLIB and java reflection principle), automatically generates and stores the converted DTO code file, writes the converted process code into the file (file format supports txt, java, etc.), and the visual interface provides the code file downloading function. The user (developer) clicks the downloading tool to automatically download the automatically generated DTO and conversion algorithm, and the DTO and conversion algorithm can be used after direct copying.
The data conversion method provided by the embodiment can automatically generate corresponding English descriptions for Chinese character columns in an Excel template file, store and generate corresponding DTOs after confirmation by a user, and also can create an index library to avoid subsequent repeated translation, generate conversion algorithm codes for direct use after being downloaded by a developer, reduce the process of customizing corresponding English descriptions by the developer, and greatly improve the development efficiency.
The present invention also provides another embodiment, namely, a computer-readable storage medium storing a data conversion program executable by at least one processor to cause the at least one processor to perform the steps of the data conversion method as described above.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (8)

1. A method of data conversion, the method comprising the steps of:
providing an Excel document template for a user to download;
Receiving a document uploaded after a user fills in Chinese characters according to the downloaded template;
Automatically generating English descriptions corresponding to each column of Chinese characters in the document;
receiving confirmation feedback of the user on the English description and storing a confirmed result; and
Generating a DTO code file according to the confirmed result, wherein English descriptions of all columns in the document are defined in the DTO code file, and each field of the English description is provided with Chinese annotation description;
Storing the automatically generated and converted DTO code file, writing the converted process code into a file in a preset format, and providing a code file downloading function through a pre-constructed visual interface, so that a user clicks a preset downloading tool to automatically download the automatically generated DTO code and the converted process code, and copying and downloading completed codes for use.
2. The data conversion method of claim 1, further comprising the steps of:
And creating an index library according to the confirmed result, and storing each column of Chinese characters and corresponding English descriptions thereof into the index library.
3. The method of claim 1, wherein the step of automatically generating the english descriptions corresponding to each column of chinese characters in the document comprises:
The translation of each column of Chinese characters is realized by calling an API interface provided by translation software, so that English description corresponding to each column of Chinese characters is automatically generated;
directly filtering the virtual words without word sense in the English description obtained by translation;
and naming the filtered English description according to a hump type naming method.
4. The data conversion method of claim 2, wherein the creating an index base according to the confirmed result comprises:
And generating an index file by means of slor search engine, wherein the index file is stored in slor, and the corresponding relation between the Chinese characters and the English description is stored.
5. An electronic device comprising a memory, a processor, the memory having stored thereon a data conversion system operable on the processor, the data conversion system when executed by the processor performing the steps of:
providing an Excel document template for a user to download;
Receiving a document uploaded after a user fills in Chinese characters according to the downloaded template;
Automatically generating English descriptions corresponding to each column of Chinese characters in the document;
receiving confirmation feedback of the user on the English description and storing a confirmed result; and
Generating a DTO code file according to the confirmed result, wherein English descriptions of all columns in the document are defined in the DTO code file, and each field of the English description is provided with Chinese annotation description;
Storing the automatically generated and converted DTO code file, writing the converted process code into a file in a preset format, and providing a code file downloading function through a pre-constructed visual interface, so that a user clicks a preset downloading tool to automatically download the automatically generated DTO code and the converted process code, and copying and downloading completed codes for use.
6. The electronic device of claim 5, wherein the data conversion system, when executed by the processor, further performs the steps of:
And creating an index library according to the confirmed result, and storing each column of Chinese characters and corresponding English descriptions thereof into the index library.
7. The electronic device of claim 5, wherein the step of automatically generating the english descriptions corresponding to each column of chinese characters in the document comprises:
The translation of each column of Chinese characters is realized by calling an API interface provided by translation software, so that English description corresponding to each column of Chinese characters is automatically generated;
directly filtering the virtual words without word sense in the English description obtained by translation;
and naming the filtered English description according to a hump type naming method.
8. A computer readable storage medium storing a data conversion system executable by at least one processor to cause the at least one processor to perform the steps of the data conversion method of any one of claims 1-4.
CN201910665055.7A 2019-07-23 2019-07-23 Data conversion method, electronic device and computer readable storage medium Active CN110532526B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910665055.7A CN110532526B (en) 2019-07-23 2019-07-23 Data conversion method, electronic device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910665055.7A CN110532526B (en) 2019-07-23 2019-07-23 Data conversion method, electronic device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN110532526A CN110532526A (en) 2019-12-03
CN110532526B true CN110532526B (en) 2024-04-26

Family

ID=68660388

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910665055.7A Active CN110532526B (en) 2019-07-23 2019-07-23 Data conversion method, electronic device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110532526B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111881250A (en) * 2020-07-22 2020-11-03 深圳市维度统计咨询股份有限公司 Data conversion method and system

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101894100A (en) * 2010-07-06 2010-11-24 北京科技大学 Report processing device and system
CN102043808A (en) * 2009-10-14 2011-05-04 腾讯科技(深圳)有限公司 Method and equipment for extracting bilingual terms using webpage structure
CN104915204A (en) * 2015-06-08 2015-09-16 小米科技有限责任公司 Web processing method and device
CN104933034A (en) * 2014-03-20 2015-09-23 无锡伍新网络科技有限公司 Aided translation method and apparatus for personal form-filling information
CN107766039A (en) * 2017-10-30 2018-03-06 中国平安财产保险股份有限公司 The method of access attribute value, server and storage medium from Java object
CN108932122A (en) * 2018-06-19 2018-12-04 上海陆家嘴国际金融资产交易市场股份有限公司 Interface document generation method, device, computer equipment and storage medium
CN109783826A (en) * 2019-01-15 2019-05-21 四川译讯信息科技有限公司 A kind of document automatic translating method
CN109902673A (en) * 2019-01-28 2019-06-18 北京明略软件系统有限公司 Table Header information identification and method for sorting, system, terminal and storage medium in table

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102043808A (en) * 2009-10-14 2011-05-04 腾讯科技(深圳)有限公司 Method and equipment for extracting bilingual terms using webpage structure
CN101894100A (en) * 2010-07-06 2010-11-24 北京科技大学 Report processing device and system
CN104933034A (en) * 2014-03-20 2015-09-23 无锡伍新网络科技有限公司 Aided translation method and apparatus for personal form-filling information
CN104915204A (en) * 2015-06-08 2015-09-16 小米科技有限责任公司 Web processing method and device
CN107766039A (en) * 2017-10-30 2018-03-06 中国平安财产保险股份有限公司 The method of access attribute value, server and storage medium from Java object
CN108932122A (en) * 2018-06-19 2018-12-04 上海陆家嘴国际金融资产交易市场股份有限公司 Interface document generation method, device, computer equipment and storage medium
CN109783826A (en) * 2019-01-15 2019-05-21 四川译讯信息科技有限公司 A kind of document automatic translating method
CN109902673A (en) * 2019-01-28 2019-06-18 北京明略软件系统有限公司 Table Header information identification and method for sorting, system, terminal and storage medium in table

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
石油项目分析及查询平台研究与开发;陈福彬;《中国优秀硕士学位论文全文数据库经济与管理科学辑(月刊)》(第03期);第J150-507页 *

Also Published As

Publication number Publication date
CN110532526A (en) 2019-12-03

Similar Documents

Publication Publication Date Title
KR101999409B1 (en) Formatting data by example
US9864736B2 (en) Information processing apparatus, control method, and recording medium
CN107656729B (en) List view updating apparatus, method and computer-readable storage medium
CN109669692B (en) Source code sharing method, server, computer readable storage medium and system
CN106843978B (en) SDK access method and system
CN104731589A (en) Automatic generation method and device of user interface (UI)
CN108416679B (en) Device and method for issuing orders of multiple insurance products and computer readable storage medium
US10375149B2 (en) Application registration and interaction
CN110888843A (en) Cross-host sparse file copying method, device, equipment and storage medium
CN108363809A (en) A method of in PC client information input interface upload pictures
CN111782304A (en) Logic control method and device for paging loading data, computer equipment and medium
CN111522574B (en) Differential packet generation method and related equipment
CN110532526B (en) Data conversion method, electronic device and computer readable storage medium
CN115357252A (en) Source code file generation method and device, electronic equipment and storage medium
CN111191174A (en) Method, system and device for integrating Spanish Bitums
CN116795913A (en) Data export method, data import method and data export import system
CN111475468A (en) Log access method, device, equipment and storage medium of newly added system
CN107908634B (en) Cache control method of browser and mobile terminal
CN111104382A (en) File default naming method and device and electronic equipment
CN115150392A (en) Remote file copying method, system, computing equipment and storage medium
CN105119944A (en) Application starting method and related device
CN113112270B (en) Data organization method based on block chain
JP5526991B2 (en) Information processing apparatus, information processing method, program, information processing system
CN114004197A (en) Form processing method and device, electronic equipment and medium
CN113094367A (en) Data processing method and device and server

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