CN114217891A - Page data conversion method and device, computer equipment and storage medium - Google Patents

Page data conversion method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN114217891A
CN114217891A CN202111398278.5A CN202111398278A CN114217891A CN 114217891 A CN114217891 A CN 114217891A CN 202111398278 A CN202111398278 A CN 202111398278A CN 114217891 A CN114217891 A CN 114217891A
Authority
CN
China
Prior art keywords
page
converted
data
conversion
target
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.)
Pending
Application number
CN202111398278.5A
Other languages
Chinese (zh)
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.)
CCB Finetech Co Ltd
Original Assignee
CCB Finetech 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 CCB Finetech Co Ltd filed Critical CCB Finetech Co Ltd
Priority to CN202111398278.5A priority Critical patent/CN114217891A/en
Publication of CN114217891A publication Critical patent/CN114217891A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • G06F9/454Multi-language systems; Localisation; Internationalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking

Landscapes

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

Abstract

The application relates to a page data conversion method, a page data conversion device, a computer device and a storage medium. The method comprises the following steps: acquiring a conversion request of a page to be converted, wherein the conversion request carries page data of the page to be converted; determining the coding type of a page to be converted; determining a data conversion mapping relation corresponding to the conversion requirement based on the coding type; and converting the page data according to the data conversion mapping relation to obtain a converted target page. By adopting the method, the intelligent level of page conversion processing can be improved.

Description

Page data conversion method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a page data conversion method and apparatus, a computer device, and a storage medium.
Background
With the development of computer technology and internet technology, the importance of displaying and communicating based on web pages in work and study is increasing. Because different countries or different regions have different requirements for displayed language characters, pages with different language versions need to be developed for different regions.
In the conventional manner, the conversion of page data is usually performed manually to obtain pages corresponding to different language versions.
The conversion processing of the page data is carried out manually, so that the data processing process is not intelligent enough.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a page data conversion method, an apparatus, a computer device, and a storage medium capable of improving the level of page conversion intelligence.
A method of page data conversion, the method comprising:
acquiring a conversion request of a page to be converted, wherein the conversion request carries page data of the page to be converted;
determining the coding type of a page to be converted;
determining a data conversion mapping relation corresponding to the conversion requirement based on the coding type;
and converting the page data according to the data conversion mapping relation to obtain a converted target page.
In one embodiment, converting the page data according to the data conversion mapping relationship to obtain a converted target page includes:
converting the page data into target page data of a target coding type and/or a target language according to the data conversion mapping relation;
and performing page configuration based on the target page data to obtain the converted target page.
In one embodiment, converting the page data according to the data conversion mapping relationship to obtain a converted target page includes:
determining each character to be converted in the page to be converted according to the page data;
determining target characters corresponding to the characters to be converted based on the data conversion mapping relation;
and obtaining the converted target page according to each target character.
In one embodiment, determining each character to be converted in the page to be converted according to the page data includes:
determining each text segment in the page to be converted according to the page data;
and splitting text characters of each text segment to obtain each character to be converted in the page to be converted.
In one embodiment, after obtaining the converted target page, the method further includes:
verifying the conversion integrity of the target page to generate a corresponding verification result;
and updating the data conversion mapping relation based on the verification result to obtain the updated data conversion mapping relation.
In one embodiment, the data transformation mapping relationship is a data transformation mapping relationship configured in a data dictionary.
In one embodiment, before converting the page data according to the data conversion mapping relationship to obtain the converted target page, the method further includes:
storing the page data in a file stream;
converting the page data according to the data conversion mapping relation to obtain a converted target page, including:
and reading page data in the file stream, and converting based on the data conversion mapping relation to obtain a converted target page.
A page data conversion apparatus, the apparatus comprising:
the conversion request acquisition module is used for acquiring the conversion requirement of the page to be converted, and the conversion request carries page data of the page to be converted;
the coding type determining module is used for determining the coding type of the page to be converted;
the data conversion mapping relation determining module is used for determining the data conversion mapping relation corresponding to the conversion requirement based on the coding type;
and the conversion module is used for converting the page data according to the data conversion mapping relation to obtain a converted target page.
In one embodiment, the conversion module comprises:
the first conversion submodule is used for converting the page data into target page data of a target coding type and/or a target language according to the data conversion mapping relation;
and the configuration submodule is used for carrying out page configuration based on the target page data to obtain the converted target page.
In one embodiment, the conversion module comprises:
the character to be converted determining submodule is used for determining each character to be converted in the page to be converted according to the page data;
the target character determination submodule is used for determining target characters corresponding to the characters to be converted based on the data conversion mapping relation;
and the second conversion sub-module is used for obtaining a converted target page according to each target character.
In one embodiment, the character to be converted determining sub-module includes:
a text segment determining unit, configured to determine each text segment in the page to be converted according to the page data;
and the character splitting unit is used for splitting text characters of each text segment to obtain each character to be converted in the page to be converted.
In one embodiment, the data transformation mapping relationship is a data transformation mapping relationship configured in a data dictionary.
In one embodiment, the apparatus further comprises:
the storage module is used for storing the page data in a file stream;
the conversion module is further configured to read the page data in the file stream, and perform conversion based on the data conversion mapping relationship to obtain a converted target page.
In one embodiment, the apparatus further comprises:
the verification module is used for verifying the conversion integrity of the target page and generating a corresponding verification result;
and the updating module is used for updating the data conversion mapping relation based on the verification result to obtain the updated data conversion mapping relation.
A computer device comprising a memory storing a computer program and a processor implementing the steps of the method of any of the above embodiments when the processor executes the computer program.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method of any of the above embodiments.
In the page data conversion method, the page data conversion device, the computer equipment and the storage medium, the conversion request is obtained, the conversion request carries the page data of the page to be converted, then the coding type of the page to be converted is determined, the data conversion mapping relation corresponding to the conversion request is determined based on the coding type, and the page data is further converted according to the data conversion mapping relation to obtain the converted target page. Therefore, the data conversion mapping relation can be determined according to the conversion requirements of the page through the coding type of the page, the page data is converted to obtain the target page, and compared with the traditional mode that the page conversion is carried out manually, the intelligent level of conversion processing is improved. Moreover, different data conversion mapping relations are determined for conversion based on different coding types, so that conversion processing is more targeted, and accurate determination of conversion processing can be improved.
Drawings
FIG. 1 is a diagram illustrating an application scenario of a page data conversion method according to a first embodiment;
FIG. 2 is a flowchart illustrating a page data conversion method according to a second embodiment;
FIG. 3 is a flowchart illustrating a page data conversion method according to a third embodiment;
FIG. 4 is a block diagram showing the construction of a page data converting apparatus in a fourth embodiment;
fig. 5 is an internal structural view of a computer device in the fifth embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The page data conversion method provided by the application can be applied to the application environment shown in fig. 1. Wherein, in the first embodiment, the terminal 102 communicates with the server 104 through a network. The terminal 102 may receive user input to generate a conversion request, and send the conversion request to the server 104, where the conversion request carries page data of a page to be converted. After the server 104 obtains the conversion requirement of the page to be converted, the coding type of the page to be converted may be determined, and based on the coding type, the data conversion mapping relation corresponding to the conversion requirement is determined. Further, the server 104 may convert the page data according to the data conversion mapping relationship to obtain a converted target page. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the server 104 may be implemented by an independent server or a server cluster formed by a plurality of servers.
In a second embodiment, as shown in fig. 2, a page data conversion method is provided, which is described by taking the application of the method to the server in fig. 1 as an example, and includes the following steps:
step S202, acquiring the conversion requirement of the page to be converted, wherein the conversion requirement carries the page data of the page to be converted.
The conversion request refers to a request for converting language words of a page. The conversion request may include request information and page data of the page to be converted.
In this embodiment, the page may refer to a web page.
In this embodiment, the request information includes information of the converted target page, such as a target page in which the page to be converted in the simplified language is converted into the traditional language.
The page data may be data of a page to be converted, and may include, but is not limited to, language words, text images, page coding types, information of page components, and the like, which are shown on the page.
In this embodiment, the terminal may determine the page to be converted based on the instruction of the user, acquire the conversion information input by the user, generate the conversion request, and send the conversion request to the server, so that the server performs subsequent processing.
In this embodiment, the conversion request may include a request corresponding to a plurality of pages to be converted, and the terminal may perform conversion processing on the plurality of pages to be converted based on a user instruction, that is, implement batch conversion processing.
Step S204, determining the coding type of the page to be converted.
The encoding type refers to the encoding type of a web page, and the region type may be different for the same web page based on the difference of geographic regions or the difference of requirements.
In the present embodiment, the encoding type of the page may include, but is not limited to, ASCII, ANSI, GBK, GB2312, UTF-8, GB18030, UNICODE, and the like.
In this embodiment, the server may determine the encoding type of the page to be converted based on the acquired page data. Or, the server may also directly identify the page to be converted to determine the encoding type of the page to be converted.
Step S206, based on the coding type, determining the data conversion mapping relation corresponding to the conversion requirement.
The data conversion mapping relation is a mapping relation used for page data conversion and used for data mapping conversion between a page to be converted and a target page.
In this embodiment, as described above, the encoding type of the page may include ASCII, ANSI, GBK, GB2312, UTF-8, GB18030, UNICODE, and the like, and after determining the encoding type of the page to be converted, the server may filter the data conversion mapping relationship corresponding to the encoding type, and perform conversion processing on the page data.
And S208, converting the page data according to the data conversion mapping relation to obtain a converted target page.
In this embodiment, the server may perform conversion processing on the page data of the page to be converted based on the data conversion mapping relationship, and perform loading of the target page based on the converted data, so as to generate the target page, that is, the converted target page.
In this embodiment, the server converts the page data, which may include the conversion of the text content and the conversion of the encoding type described above, and the application does not limit this.
According to the page data conversion method, the conversion requirement of the page to be converted is obtained, the conversion request carries page data of the page to be converted, then the coding type of the page to be converted is determined, the data conversion mapping relation corresponding to the conversion requirement is determined based on the coding type, and further the page data is converted according to the data conversion mapping relation to obtain the converted target page. Therefore, the data conversion mapping relation can be determined according to the conversion requirements of the page through the coding type of the page, the page data is converted to obtain the target page, and compared with the traditional mode that the page conversion is carried out manually, the intelligent level of conversion processing is improved. Moreover, different data conversion mapping relations are determined for conversion based on different coding types, so that conversion processing is more targeted, and accurate determination of conversion processing can be improved.
In one embodiment, converting the page data according to the data conversion mapping relationship to obtain a converted target page may include: converting the page data into target page data of a target coding type and/or a target language according to the data conversion mapping relation; and performing page configuration based on the target page data to obtain the converted target page.
As described above, the server converts the page data, which may include converting the text content and converting the encoding type as described above.
In this embodiment, the server may determine the target encoding type and/or target language after conversion based on the conversion request, such as a page converted into ASCII, or a page converted into english, etc.
In this embodiment, the server may filter a plurality of data conversion mapping relationships corresponding to the encoding types based on the determined encoding types of the pages to be converted, and then determine a target data conversion mapping relationship from the plurality of data conversion mapping relationships in combination with the page language of the pages to be converted, such as simplified chinese, and in combination with the target encoding type and/or the target language, and convert the page data based on the target data conversion mapping relationship.
Further, after the server performs data conversion to obtain target page data, page configuration data can be generated by configuring the target page data, and page loading is performed to obtain a converted target page.
In one embodiment, converting the page data according to the data conversion mapping relationship to obtain a converted target page may include: determining each character to be converted in the page to be converted according to the page data; determining target characters corresponding to the characters to be converted based on the data conversion mapping relation; and obtaining the converted target page according to each target character.
In this embodiment, for any webpage, it may also include multiple characters, and after acquiring page data corresponding to a page to be processed, the server may identify each character to be converted, and perform conversion processing on the character to be converted based on the determined data conversion mapping relationship, so as to obtain a target character.
In this embodiment, the data conversion mapping relationship may specifically refer to a conversion relationship between two characters, such as a chinese character "data" and an english character "data", or a simplified character "data" and a traditional character " ".
In this embodiment, after the server converts each character to be converted of the page to be processed to obtain a target character corresponding to each character to be converted, a target page corresponding to the page to be converted may be generated.
In one embodiment, determining each character to be converted in the page to be converted according to the page data may include: determining each text segment in the page to be converted according to the page data; and splitting text characters of each text segment to obtain each character to be converted in the page to be converted.
In this embodiment, the characters exist in the form of text segments in the page to be converted, and the page data acquired by the server may include each text segment in the page.
In this embodiment, the server may screen out each text segment to be converted of the page to be converted from the page data, and perform subsequent processing.
Specifically, the server may split text characters of each text segment to be converted, and generate a plurality of text characters corresponding to each text segment.
In this embodiment, when the server performs splitting, the text segment may be split by a word segmentation method, such as NLPIR, ending word segmentation, stanford word segmentation, and the like, which is not limited in this application.
In this embodiment, the server may traverse each text segment of the page to be converted, split the text characters to obtain corresponding characters to be converted, and perform conversion based on the data conversion mapping relationship.
In this embodiment, after the server splits each text segment, converts each obtained character to be converted, and generates each target character, the server may combine the target characters according to the composition sequence between the characters to be converted in the text segment to be converted, so as to obtain the converted target text segment, and further obtain the target webpage.
In one embodiment, the data transformation mapping relationship is a data transformation mapping relationship configured in a data dictionary.
Specifically, the server can associate text characters of different languages through the data dictionary, so that the data conversion mapping relation of the text characters between any languages can be directly acquired based on the data dictionary.
In one embodiment, converting the page data according to the data conversion mapping relationship to obtain a converted target page may further include: the page data is stored in a filestream.
In this embodiment, after the server reads the page data of the page to be converted, the server may store the read page data in the program file stream, so that subsequent data processing is performed based on the program file stream.
In this embodiment, converting the page data according to the data conversion mapping relationship to obtain a converted target page may include: and reading page data in the file stream, and converting based on the data conversion mapping relation to obtain a converted target page.
In this embodiment, the server performs data conversion work based on the page data of the file input stream. The processing program reads each character in the page data from the program file stream, finds out the matching mapping relation from the data dictionary configuration file in the program file stream, replaces each character into a target character, stores the target character in a buffer area of a file output stream, and reads in the next character to complete the conversion of the page to be converted.
In one embodiment, after obtaining the converted target page, the method may further include: verifying the conversion integrity of the target page to generate a corresponding verification result; and updating the data conversion mapping relation based on the verification result to obtain the updated data conversion mapping relation.
In this embodiment, after the server completes the conversion of the page to be converted and obtains the corresponding target page, the server may load the converted target page to the terminal and display the converted target page to the user.
In this embodiment, the user may perform verification of the integrity of page conversion based on the target page displayed by the terminal, for example, check whether the conversion is accurate, whether there are missing unconverted texts, and generate a corresponding verification result.
In this embodiment, the server may update the data conversion mapping relationship based on the verification result, for example, if there is an unconverted text in the converted target page, the server may maintain the mapping relationship from the unconverted text to the target text in a differentiated file based on the user instruction, and update the data conversion mapping relationship through the differentiated file, for example, update the data dictionary, so as to continuously enrich the data dictionary.
In the embodiment, the conversion integrity of the target page is verified, and the data conversion mapping relation is updated based on the verification result, so that the data conversion mapping relation can be continuously improved, and the conversion accuracy of the page to be converted can be improved.
In a third embodiment, FIG. 3 shows a flow chart of another page data conversion method. In this embodiment, the page data conversion method may be implemented by a specific tool, such as an internationalized translation tool, and then the translation conversion of the page data is performed based on the internationalized translation tool.
Specifically, the storage location of the acquired page data, such as the storage path of the acquired simplified file, may be selected by an internationalized translation tool.
Further, translation conversion of the page data is performed based on the selected coding mode, for example, GB2312 or UNICODE, to obtain the data after translation conversion, and generate a corresponding file.
Furthermore, the translated and converted file can be stored to a specified target, and the page is loaded, so that the conversion of the page to be converted can be realized.
It should be understood that although the steps in the flowcharts of fig. 2 and 3 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2 and 3 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performing the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
In a fourth embodiment, as shown in fig. 4, there is provided a page data converting apparatus including: a conversion request obtaining module 100, an encoding type determining module 200, a data conversion mapping relation determining module 300, and a converting module 400, wherein:
the conversion request obtaining module 100 is configured to obtain a conversion requirement of a page to be converted, where the conversion request carries page data of the page to be converted.
And an encoding type determining module 200, configured to determine an encoding type of the page to be converted.
A data transformation mapping relation determining module 300, configured to determine a data transformation mapping relation corresponding to the transformation requirement based on the encoding type.
And a conversion module 400, configured to convert the page data according to the data conversion mapping relationship to obtain a converted target page.
In one embodiment, the conversion module 400 may include:
and the first conversion submodule is used for converting the page data into target page data of a target coding type and/or a target language according to the data conversion mapping relation.
And the configuration submodule is used for carrying out page configuration based on the target page data to obtain the converted target page.
In one embodiment, the conversion module 400 may include:
and the character to be converted determining submodule is used for determining each character to be converted in the page to be converted according to the page data.
And the target character determining submodule is used for determining target characters corresponding to the characters to be converted based on the data conversion mapping relation.
And the second conversion sub-module is used for obtaining a converted target page according to each target character.
In one embodiment, the character to be converted determining sub-module includes:
and the text segment determining unit is used for determining each text segment in the page to be converted according to the page data.
And the character splitting unit is used for splitting the text characters of each text segment to obtain each character to be converted in the page to be converted.
In one embodiment, the apparatus may further include:
and the verification module is used for verifying the conversion integrity of the target page after the converted target page is obtained, and generating a corresponding verification result.
And the updating module is used for updating the data conversion mapping relation based on the verification result to obtain the updated data conversion mapping relation.
In one embodiment, the data transformation mapping relationship is a data transformation mapping relationship configured in a data dictionary.
In one embodiment, the apparatus may further include:
the storage module is used for converting the page data according to the data conversion mapping relation and storing the page data in the file stream before the converted target page is obtained;
in this embodiment, the conversion module 400 is configured to read page data in a file stream, and perform conversion based on a data conversion mapping relationship to obtain a converted target page.
For the specific definition of the page data conversion device, reference may be made to the above definition of the page data conversion method, which is not described herein again. The various modules in the page data conversion device can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In a fifth embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 5. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing data such as page data, data types, data conversion mapping relations, target pages and the like. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a page data conversion method.
Those skilled in the art will appreciate that the architecture shown in fig. 5 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, there is provided a computer device comprising a memory storing a computer program and a processor implementing the following steps when the processor executes the computer program: acquiring a conversion request of a page to be converted, wherein the conversion request carries page data of the page to be converted; determining the coding type of a page to be converted; determining a data conversion mapping relation corresponding to the conversion requirement based on the coding type; and converting the page data according to the data conversion mapping relation to obtain a converted target page.
In one embodiment, when the processor executes the computer program, the converting the page data according to the data conversion mapping relationship to obtain the converted target page may include: converting the page data into target page data of a target coding type and/or a target language according to the data conversion mapping relation; and performing page configuration based on the target page data to obtain the converted target page.
In one embodiment, when the processor executes the computer program, the converting the page data according to the data conversion mapping relationship to obtain the converted target page may include: determining each character to be converted in the page to be converted according to the page data; determining target characters corresponding to the characters to be converted based on the data conversion mapping relation; and obtaining the converted target page according to each target character.
In one embodiment, when the processor executes the computer program, determining each character to be converted in the page to be converted according to the page data may include: determining each text segment in the page to be converted according to the page data; and splitting text characters of each text segment to obtain each character to be converted in the page to be converted.
In one embodiment, after the processor executes the computer program to obtain the converted target page, the following steps may be further implemented: verifying the conversion integrity of the target page to generate a corresponding verification result; and updating the data conversion mapping relation based on the verification result to obtain the updated data conversion mapping relation.
In one embodiment, the data transformation mapping relationship is a data transformation mapping relationship configured in a data dictionary.
In one embodiment, when the processor executes the computer program, the following steps may be further implemented before the processor converts the page data according to the data conversion mapping relationship to obtain the converted target page: the page data is stored in a filestream.
In this embodiment, when the processor executes the computer program, the converting the page data according to the data conversion mapping relationship to obtain the converted target page may include: and reading page data in the file stream, and converting based on the data conversion mapping relation to obtain a converted target page.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of: acquiring a conversion request of a page to be converted, wherein the conversion request carries page data of the page to be converted; determining the coding type of a page to be converted; determining a data conversion mapping relation corresponding to the conversion requirement based on the coding type; and converting the page data according to the data conversion mapping relation to obtain a converted target page.
In one embodiment, when executed by a processor, the method for converting page data according to a data conversion mapping relationship to obtain a converted target page includes: converting the page data into target page data of a target coding type and/or a target language according to the data conversion mapping relation; and performing page configuration based on the target page data to obtain the converted target page.
In one embodiment, when executed by a processor, the method for converting page data according to a data conversion mapping relationship to obtain a converted target page includes: determining each character to be converted in the page to be converted according to the page data; determining target characters corresponding to the characters to be converted based on the data conversion mapping relation; and obtaining the converted target page according to each target character.
In one embodiment, the determining, by the processor, each character to be converted in the page to be converted according to the page data may include: determining each text segment in the page to be converted according to the page data; and splitting text characters of each text segment to obtain each character to be converted in the page to be converted.
In one embodiment, after the computer program is executed by the processor to obtain the converted target page, the following steps may be further implemented: verifying the conversion integrity of the target page to generate a corresponding verification result; and updating the data conversion mapping relation based on the verification result to obtain the updated data conversion mapping relation.
In one embodiment, the data transformation mapping relationship is a data transformation mapping relationship configured in a data dictionary.
In one embodiment, when executed by a processor, the computer program may further implement the following steps before converting page data according to the data conversion mapping relationship to obtain a converted target page: the page data is stored in a filestream.
In this embodiment, when executed by the processor, the implementing of converting the page data according to the data conversion mapping relationship to obtain the converted target page may include: and reading page data in the file stream, and converting based on the data conversion mapping relation to obtain a converted target page.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (16)

1. A method for converting page data, the method comprising:
acquiring a conversion request of a page to be converted, wherein the conversion request carries page data of the page to be converted;
determining the coding type of the page to be converted;
determining a data conversion mapping relation corresponding to the conversion requirement based on the coding type;
and converting the page data according to the data conversion mapping relation to obtain a converted target page.
2. The method of claim 1, wherein the converting the page data according to the data conversion mapping relationship to obtain a converted target page comprises:
converting the page data into target page data of a target coding type and/or a target language according to the data conversion mapping relation;
and performing page configuration based on the target page data to obtain a converted target page.
3. The method of claim 1, wherein the converting the page data according to the data conversion mapping relationship to obtain a converted target page comprises:
determining each character to be converted in the page to be converted according to the page data;
determining target characters corresponding to the characters to be converted based on the data conversion mapping relation;
and obtaining a converted target page according to each target character.
4. The method according to claim 3, wherein the determining each character to be converted in the page to be converted according to the page data comprises:
determining each text segment in the page to be converted according to the page data;
and splitting text characters of each text segment to obtain each character to be converted in the page to be converted.
5. The method of claim 1, wherein the data transformation mapping relationship is a data transformation mapping relationship configured in a data dictionary.
6. The method according to claim 1, wherein before converting the page data according to the data conversion mapping relationship to obtain a converted target page, the method further comprises:
storing the page data in a file stream;
the converting the page data according to the data conversion mapping relationship to obtain a converted target page includes:
and reading the page data in the file stream, and converting based on the data conversion mapping relation to obtain a converted target page.
7. The method of claim 1, wherein after obtaining the converted target page, further comprising:
verifying the conversion integrity of the target page to generate a corresponding verification result;
and updating the data conversion mapping relation based on the verification result to obtain the updated data conversion mapping relation.
8. An apparatus for converting page data, the apparatus comprising:
the conversion request acquisition module is used for acquiring the conversion requirement of the page to be converted, and the conversion request carries page data of the page to be converted;
the coding type determining module is used for determining the coding type of the page to be converted;
a data conversion mapping relation determining module, configured to determine, based on the encoding type, a data conversion mapping relation corresponding to the conversion requirement;
and the conversion module is used for converting the page data according to the data conversion mapping relation to obtain a converted target page.
9. The apparatus of claim 8, wherein the conversion module comprises:
the first conversion submodule is used for converting the page data into target page data of a target coding type and/or a target language according to the data conversion mapping relation;
and the configuration submodule is used for carrying out page configuration based on the target page data to obtain the converted target page.
10. The apparatus of claim 8, wherein the conversion module comprises:
the character to be converted determining submodule is used for determining each character to be converted in the page to be converted according to the page data;
the target character determination submodule is used for determining target characters corresponding to the characters to be converted based on the data conversion mapping relation;
and the second conversion sub-module is used for obtaining a converted target page according to each target character.
11. The apparatus of claim 10, wherein the character to be converted determining sub-module comprises:
a text segment determining unit, configured to determine each text segment in the page to be converted according to the page data;
and the character splitting unit is used for splitting text characters of each text segment to obtain each character to be converted in the page to be converted.
12. The apparatus of claim 8, wherein the data transformation mapping relationship is a data transformation mapping relationship configured in a data dictionary.
13. The apparatus of claim 8, further comprising:
the storage module is used for storing the page data in a file stream;
the conversion module is further configured to read the page data in the file stream, and perform conversion based on the data conversion mapping relationship to obtain a converted target page.
14. The apparatus of claim 8, further comprising:
the verification module is used for verifying the conversion integrity of the target page and generating a corresponding verification result;
and the updating module is used for updating the data conversion mapping relation based on the verification result to obtain the updated data conversion mapping relation.
15. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 7 when executing the computer program.
16. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202111398278.5A 2021-11-19 2021-11-19 Page data conversion method and device, computer equipment and storage medium Pending CN114217891A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111398278.5A CN114217891A (en) 2021-11-19 2021-11-19 Page data conversion method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111398278.5A CN114217891A (en) 2021-11-19 2021-11-19 Page data conversion method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114217891A true CN114217891A (en) 2022-03-22

Family

ID=80698129

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111398278.5A Pending CN114217891A (en) 2021-11-19 2021-11-19 Page data conversion method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114217891A (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110362370A (en) * 2019-06-14 2019-10-22 平安科技(深圳)有限公司 A kind of switching method of homepages language, device and terminal device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110362370A (en) * 2019-06-14 2019-10-22 平安科技(深圳)有限公司 A kind of switching method of homepages language, device and terminal device

Similar Documents

Publication Publication Date Title
CN108446116B (en) Application program page generation method and device, computer equipment and storage medium
CN110457431B (en) Knowledge graph-based question and answer method and device, computer equipment and storage medium
CN108804159B (en) Javascript module loading method and preprocessing method and device thereof, and computer equipment
CN109684607B (en) JSON data analysis method and device, computer equipment and storage medium
CN108399150B (en) Text processing method and device, computer equipment and storage medium
CN109814854B (en) Project framework generation method, device, computer equipment and storage medium
CN111176996A (en) Test case generation method and device, computer equipment and storage medium
CN109032662B (en) Code file generation method and device, computer equipment and storage medium
CN109766072B (en) Information verification input method and device, computer equipment and storage medium
CN112181489B (en) Code migration method, device, computer equipment and storage medium
CN108399166B (en) Text translation method and device, computer equipment and storage medium
CN109840083B (en) Webpage component template construction method and device, computer equipment and storage medium
CN109597618B (en) Program development method, program development device, computer device, and storage medium
CN112306620B (en) Multi-language loading method and device for user-defined form control
CN111191079A (en) Document content acquisition method, device, equipment and storage medium
CN115081440B (en) Method, device and equipment for recognizing variant words in text and extracting original sensitive words
CN111737981A (en) Vocabulary error correction method and device, computer equipment and storage medium
CN111552903A (en) Page generation method and device based on HTML (Hypertext markup language) template and computer equipment
CN112015378A (en) Skeleton screen page generation method and device, computer equipment and storage medium
CN110795197A (en) Method and device for internationalizing enumerated classes, computer equipment and storage medium
CN112187713A (en) Message conversion method, device, computer equipment and storage medium
CN110647350A (en) Interface document generation method and device, computer equipment and storage medium
CN109976683B (en) Data printing method, device, equipment and storage medium
CN109213775B (en) Search method, search device, computer equipment and storage medium
CN109344385B (en) Natural language processing method, device, computer 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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20220322