CN112765997A - Multi-language conversion method, device, computer equipment and storage medium - Google Patents
Multi-language conversion method, device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN112765997A CN112765997A CN202011641182.2A CN202011641182A CN112765997A CN 112765997 A CN112765997 A CN 112765997A CN 202011641182 A CN202011641182 A CN 202011641182A CN 112765997 A CN112765997 A CN 112765997A
- Authority
- CN
- China
- Prior art keywords
- data
- language
- target language
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/40—Processing or translation of natural language
- G06F40/55—Rule-based translation
- G06F40/56—Natural language generation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/958—Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
- G06F9/454—Multi-language systems; Localisation; Internationalisation
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Data Mining & Analysis (AREA)
- Human Computer Interaction (AREA)
- Artificial Intelligence (AREA)
- Machine Translation (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The application relates to the technical field of artificial intelligence, in particular to a multi-language conversion method, a multi-language conversion device, computer equipment and a storage medium. The method comprises the following steps: intercepting a website data sending message, wherein the website data sending message carries data to be converted and a target language type corresponding to the data to be converted; matching a corresponding target language cache component according to the target language type, wherein data in the target language cache component is obtained based on a target language database corresponding to a target website; acquiring a data type corresponding to data to be converted; and matching data corresponding to the data type in the data prestored in the target language cache component, and determining target language conversion data according to the matched data, wherein the target language conversion data can be stored into the block link points.
Description
Technical Field
The present application relates to the field of artificial intelligence technologies, and in particular, to a multi-language conversion method, apparatus, computer device, and storage medium.
Background
With the development of internationalization and internet technology, no regional limitation exists for websites, and users who face different language type requirements need to face the same website, namely, multi-language conversion of the website is realized.
In the prior art, a production scheme of a multilingual website is generally to modify a source code of the website, specifically to add a code capable of realizing a translation function in the source code so as to realize the translation function of the website according to the added code.
However, the above translation method for the multilingual website needs to modify the source code of the website, which results in a large workload, and the website data is translated in real time by the newly added code, which results in low efficiency of acquiring the multilingual website data when the amount of data to be translated is large.
Disclosure of Invention
In view of the above, there is a need to provide a multilingual conversion method, apparatus, computer device, and storage medium that can improve the efficiency of language type conversion.
A multi-language conversion method is applied to a component server and comprises the following steps:
intercepting a website data sending message, wherein the website data sending message carries data to be converted and a target language type corresponding to the data to be converted;
matching a corresponding target language cache component according to the target language type, wherein data in the target language cache component is obtained based on a target language database corresponding to a target website;
acquiring a data type corresponding to data to be converted;
and matching data corresponding to the data type in the data pre-stored in the target language cache component, and determining target language conversion data according to the matched data.
In one embodiment, intercepting a website data transmission message comprises:
intercepting a website data sending message sent from a business server to a terminal, wherein the website data sending message is sent by the terminal to the business server, and after the terminal sends a data acquisition request carrying a target website, request conversion data and a target language type, the business server extracts data to be converted corresponding to the request conversion data from a target website database corresponding to the target website, and sends the website data sending message carrying the data to be converted and the target language type to the terminal.
In one embodiment, the method further comprises:
acquiring target website source data corresponding to a target website;
and respectively carrying out language type conversion on the source data of the target website through pre-configured language conversion components with different language types to obtain language databases with different data types.
In one embodiment, the method further comprises:
storing the language database in different language types according to the language types corresponding to the language database to obtain a plurality of language type databases;
for each language type database, carrying out data clustering on the data in the language type database to obtain a data category corresponding to each data;
and classifying and storing the language type database according to the data category to obtain one or more idea databases.
In one embodiment, obtaining the data category corresponding to the data to be converted includes:
performing intention analysis on the data to be converted based on an intention analysis algorithm to obtain a data intention category corresponding to the data to be converted;
matching data corresponding to the data type in data pre-stored in a target language cache component, and determining target language conversion data according to the matched data, wherein the data matching method comprises the following steps:
matching a target language database corresponding to the target language type in a plurality of language type databases;
matching an intention database corresponding to the data intention type in a target language database;
and matching target language conversion data corresponding to the data to be converted in the intention database.
In one embodiment, after matching target language conversion data corresponding to the data to be converted in the intent database, the method further comprises:
when target language conversion data corresponding to the data to be converted cannot be matched in the intention database, calling a target language real-time conversion component corresponding to the target language type;
and performing language type conversion on the data to be converted according to the target language real-time conversion component to obtain target language conversion data.
In one embodiment, after the target language conversion data corresponding to the data to be converted is matched based on the target language cache component, the method further comprises:
acquiring a localization component corresponding to the target language type, wherein the localization component is configured correspondingly based on the service requirement;
and carrying out localization conversion on the target language conversion data based on the localization component to obtain target language conversion data meeting the service requirement, and storing the target language conversion data into the block chain.
A multi-language conversion apparatus, the apparatus comprising:
the intercepting module is used for intercepting a website data sending message, and the website data sending message carries the data to be converted and the target language type corresponding to the data to be converted;
the type conversion module is used for matching a corresponding target language cache component according to the target language type, and data in the target language cache component is obtained based on a target language database corresponding to a target website;
the acquisition module is used for acquiring the data type corresponding to the data to be converted;
and the matching module is used for matching data corresponding to the data type in the data pre-stored in the target language cache component and determining target language conversion data according to the matched data.
A computer device comprising a memory storing a computer program and a processor implementing the steps of the method of any of the embodiments described above when the computer program is executed by the processor.
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.
The multi-language conversion method, the multi-language conversion device, the computer equipment and the storage medium intercept website data sending messages, wherein the website data sending messages carry the data to be converted and the target language type corresponding to the data to be converted. By intercepting the request message and independently processing the data carried in the intercepted request message, the source data of the target website cannot be changed, and the safety of the target website information is ensured. Matching a corresponding target language cache component according to the target language type, wherein data in the target language cache component is obtained based on a target language database corresponding to a target website; acquiring a data type corresponding to data to be converted; and matching data corresponding to the data type in the data pre-stored in the target language cache component, and determining target language conversion data according to the matched data. The method has the advantages that the language data types are converted through the components, so that the flexibility of language type conversion is improved, and the source data corresponding to the target website are converted into the data of multiple language types in advance and are stored in different categories, so that the data of the corresponding types can be directly searched in the cache in actual service, the target language conversion data is obtained, the language conversion is not carried out in real time, and the efficiency of the language type conversion is greatly improved.
Drawings
FIG. 1 is a diagram of an application environment of a multilingual conversion method in an embodiment;
FIG. 2 is a flow diagram that illustrates a multi-lingual translation method in accordance with an embodiment;
FIG. 3 is a flowchart of translation system operation provided in one embodiment;
FIG. 4 is a block diagram showing the construction of a multi-language conversion apparatus according to an embodiment;
FIG. 5 is a diagram illustrating an internal structure of a computer device according to an 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 multi-language conversion method provided by the application can be applied to the application environment shown in fig. 1. Wherein, the terminal 102 (such as a client) communicates with the service server 104 through a network, and during the communication process between the terminal and the service server, the component server 103 can also intercept data and perform a data language type conversion process on the intercepted data. Specifically, the component server 103 intercepts a website data transmission message sent from the service server 104 to the terminal 102, where the website data transmission message carries data to be converted and a target language type corresponding to the data to be converted; matching a corresponding target language cache component according to the target language type, wherein data in the target language cache component is obtained based on a target language database corresponding to a target website; acquiring a data type corresponding to data to be converted; and matching data corresponding to the data type in the data pre-stored in the target language cache component, and determining target language conversion data according to the matched data. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the service server 104 and the component server may be implemented by independent servers or a server cluster formed by a plurality of servers.
In one embodiment, as shown in FIG. 2, a multi-language conversion method is provided, which is illustrated by applying the method to the component server in FIG. 1, and comprises the following steps:
Specifically, the website data sending message request is a message request sent from the server to the terminal, and corresponds to that when the terminal has a request for obtaining website data, the terminal operates in an operation interface such as a website page to send the website data obtaining request to the server, and after the server receives the website data obtaining request sent by the terminal, the server extracts website data from a target website corresponding to the website obtaining request, packages the website data, generates a website data sending message, and sends the website data sending message to the terminal.
In the process that the server sends the website data sending message to the terminal, the corresponding website data sending message can be intercepted through an interception algorithm, and the data to be converted carried by the message and the target language type corresponding to the data to be converted are extracted from the intercepted message. The data to be converted only refers to data that needs to be subjected to language type conversion, and for example, when the data to be converted corresponds to chinese address data and the target language type corresponds to english, the conversion of the chinese address data into english address data is performed at this time.
The interception method may be based on route interception, for example, in the process of transmitting data from the client a to the server B, the data is intercepted from the router, then data translation processing is performed, the translated data is returned to the router, and then the translated data is transmitted to the server B, so that the non-inductance of the client a and the server B is realized through the process of intercepting the data in the middle and performing translation, not in the client a nor in the server B, and performing translation service.
And step 204, matching the corresponding target language cache component according to the target language type, wherein the data in the target language cache component is obtained based on a target language database corresponding to the target website.
In a specific embodiment, the target language cache component corresponding to the target language conversion component is obtained according to the target language type matching corresponding target language conversion component, and data in the target language cache component is obtained based on a target language database corresponding to the target website.
Wherein the target language conversion component is preconfigured and can be used to implement the converted language type. Specifically, the target language conversion component may include an english language conversion component for implementing conversion of data into an english expression, a japanese language conversion component for implementing conversion of data into a japanese expression, and a korean language conversion component for implementing conversion of data into a korean expression, according to a difference in language type. It should be noted that the target language conversion component may be specifically in an independent plug-in form, may be configured adaptively according to specific business requirements, and may dynamically add services or components according to different business requirements in specific applications, without affecting source website data, so as to achieve non-intrusion on the source website data, and really achieve horizontal expansion and hot plug.
The target language cache component is used for storing source data corresponding to the target website, and specifically, cache can be performed according to different classifications of language types to obtain cache components corresponding to the language types respectively. Like a target website, it can have an english language cache component, a japanese language cache component, a korean language cache component, and the like. Specifically, the source data corresponding to the target website is extracted, and the extracted source data may specifically be data of a language type to be converted (data to be translated), or may also be all data of the target website in the source database (including the data of the language type to be converted this time and the data that does not need to be converted), which is not limited herein.
And then, carrying out language type conversion on the acquired source data according to a plurality of pre-configured language conversion components (translators) to obtain a language database corresponding to a plurality of language types. By translating and storing the source data corresponding to the target website in advance, the corresponding data to be translated can be directly acquired from the language database in the actual language conversion service scene without real-time translation, the pressure of real-time translation is reduced by a healthy person, and the efficiency of language type conversion is improved.
Moreover, the proposal also provides a language cache component with multiple language types, and the language database and the language cache component are in data butt joint, so as to realize that the data to be translated can be directly extracted from the language database and subjected to cache processing, on the one hand, the acquisition efficiency of the data to be translated is improved, on the other hand, the pressure of real-time translation data is reduced, and the data stored in the language database can be the data subjected to localization processing, so that the accuracy of the data is higher.
And step 206, acquiring the data type corresponding to the data to be converted.
Specifically, the data category of the data to be converted may be obtained by analyzing the data category of the data to be converted, where the data category analysis may be an artificial intelligence algorithm based on data intent analysis or the like, which is not limited herein.
And step 208, matching data corresponding to the data type in the data pre-stored in the target language cache component, and determining target language conversion data according to the matched data.
The target language cache producer can include all data in the website, and the data to be converted can be part of the data in the website data, so that the corresponding data can be matched from the corresponding target language cache component according to the data to be converted required by a user, the searched target language conversion data is sent to the user terminal, and different language types of the data are converted. In a specific embodiment, data can be classified and stored in the language cache component according to data classes, and then data division of the language cache component is realized, so that the data volume corresponding to each data class is relatively strong in pertinence and relatively small. Furthermore, in the actual language type conversion process, the category data matched with the data category of the data to be converted can be matched in the target language cache component, the target language conversion data is matched in the corresponding category data, and the data is not matched in all data stored in the target language cache component, so that the data matching efficiency is improved, the pertinence of data matching is improved, and the target language type conversion efficiency is improved.
In one embodiment, the data production module, the data interception module and the data translation module in the system are independent modules, the inside of each module component can be realized through plug-in, and the deployment and configuration can be performed according to specific service requirements.
In the above embodiment, because different modules and components are configured independently, changes of the modules or components do not affect other modules or components, that is, all modules, components, and plug-ins in the present application are not sensitive to deployment, so that independent deployment and non-sensitivity between modules or components are really realized, and any distributed deployment scheme can be used, thereby improving the applicability of multi-language translation in the present application.
In one embodiment, intercepting a website data transmission message comprises: intercepting a website data sending message sent from a business server to a terminal, wherein the website data sending message is sent by the terminal to the business server, and after the terminal sends a data acquisition request carrying a target website, request conversion data and a target language type, the business server extracts data to be converted corresponding to the request conversion data from a target website database corresponding to the target website, and sends the website data sending message carrying the data to be converted and the target language type to the terminal.
The website source data corresponding to the website is stored in the website database, and the website source data refers to data corresponding to the original website, and if the website corresponds to a Chinese website, the website source data corresponding to the target website is the Chinese source data. The data to be converted refers to data that needs to be converted into the target language type, and for example, the data to be converted may be part of data in a website, such as "china security", and the data to be converted may also be all data in the website, so as to convert all data in the target website into data corresponding to the target language type. The target language may specifically include english, japanese, korean, and other language types, and may be configured according to specific actual requirements.
In one embodiment, after the component server intercepts a website data transmission message, the component server performs language type conversion on data carried in the message data, instead of converting the language type in the terminal or the service server, so that the terminal data and the service server data are not changed in the process of realizing the language type conversion, and the integrity and the safety of the terminal and the service server data are ensured.
In one embodiment, the method further comprises: acquiring target website source data corresponding to a target website; and respectively carrying out language type conversion on the source data of the target website through pre-configured language conversion components with different language types to obtain language databases with different data types.
Specifically, the webpage source data are obtained from the database, and data caching and storing operations are performed according to the obtained webpage source data, so that data can be conveniently obtained from the website subsequently, and the data obtaining efficiency is improved. Moreover, because the data volume of the website data is large, the method also comprises the step of storing the website data in a classified manner, so that the corresponding data can be searched from the data files of the corresponding category subsequently, and the efficiency of data query is further improved.
In one embodiment, the method further comprises: storing the language database in different language types according to the language types corresponding to the language database to obtain a plurality of language type databases; and for each language type database, performing data clustering on the data in the language type database to obtain a data category corresponding to each data, and classifying and storing the language type database according to the data category to obtain one or more idea databases.
The classification storage comprises the step of performing classification storage on the basis of different types of languages to obtain language type databases corresponding to different language types, and the classification storage also comprises the step of performing classification storage on the basis of data categories. For example, the data can be divided into fruit type data, plant type data and diet type data, and then the corresponding data can be classified and stored, and different types of data are labeled, so that conditions are provided for subsequent data indexing.
In one embodiment, obtaining the data category corresponding to the data to be converted includes: performing intention analysis on the data to be converted based on an intention analysis algorithm to obtain a data intention category corresponding to the data to be converted; matching data corresponding to the data type in data pre-stored in a target language cache component, and determining target language conversion data according to the matched data, wherein the data matching method comprises the following steps: matching a target language database corresponding to the target language type in a plurality of language type databases; matching an intention database corresponding to the data intention type in a target language database; and matching target language conversion data corresponding to the data to be converted in the intention database.
Specifically, the intention of the request data is analyzed based on an intention analysis algorithm, so that the data type corresponding to the request data is determined, an intention database corresponding to the data type can be matched in a corresponding target language database according to the determined type, and a corresponding target language is extracted from the matched intention database.
The intent analysis may include, among other things, intent analysis of the data type or intent analysis of the data type to be obtained. For example, when the data to be acquired is an address request, the intention analysis may determine that the intention is to acquire the address data, and the address information may be searched for in the corresponding production database, and the searched address information may be used as the target language conversion data. In other embodiments, the intention analysis may correspond to a data type analysis, such as when the received data type is an orange, the corresponding data type may be determined to be a fruit type, and the corresponding target language may be matched in the intention database for the corresponding fruit type.
In one embodiment, after matching target language conversion data corresponding to the data to be converted in the intent database, the method further comprises: when target language conversion data corresponding to the data to be converted cannot be matched in the intention database, calling a target language real-time conversion component corresponding to the target language type; and performing language type conversion on the data to be converted according to the target language real-time conversion component to obtain target language conversion data.
Specifically, when the corresponding target language conversion data cannot be matched, the method further includes calling the target language real-time conversion component, and then performing real-time conversion on the language type of the data to be converted according to the called target language real-time conversion component, wherein the real-time language conversion plug-in can be used for realizing conversion into data of different language types.
In one embodiment, after the target language conversion data corresponding to the data to be converted is matched based on the target language cache component, the method further comprises: acquiring a localization component corresponding to the target language type, wherein the localization component is configured correspondingly based on the service requirement; and carrying out localization conversion on the target language conversion data based on the localization component to obtain target language conversion data meeting the service requirement, and storing the target language conversion data into the block chain.
In one embodiment, the method further comprises: and adaptively adjusting the target language conversion data, specifically acquiring language style data corresponding to the target language type, and adaptively adjusting the target language conversion data according to the language style data so that the obtained target language conversion data more conforms to the actual service requirement.
It is emphasized that, to further ensure the privacy and security of the target language translation data, the target language translation data may also be stored in a node of a blockchain.
Wherein the adaptive adjustment may correspond to a localized translation server, such as a localized component, the localized translation service comprising: and correspondingly processing the target language conversion data according to the language type, the language environment, the language requirement and the like, such as correspondingly converting and adapting. Specifically, the date may be converted into an english standard, the time may be converted into an english standard, and the address may be converted into a standard corresponding to the target language. In addition, the localization service also comprises specialized translation, and specialized processing on target language conversion data can be realized through a specialized library.
In an actual application scenario, the operation of the multi-language website is not only a problem of single language and translation, but also a series of problems of website page content editing, content updating, single language type, website localization, multi-language website domain name selection, post management and maintenance and the like. The current multi-language production scheme of the website is more traditional. One part of the method is to apply templates to build a website and then translate the content of the website into the required language to fill the content. If a certain part of data in a website is translated and then the service is embedded in a client or the server, the code of the client or the server needs to be modified, so that the data translation is complex on one hand, and on the other hand, the source data is changed, so that the risk of data leakage exists. This causes the problems of inconvenient modification of website content and incapability of synchronously updating the original Chinese and English stations and the multi-language website. In addition, in the conventional technology, a seller is required to provide source codes of an original station, such as development data, and the like, so as to make a multi-language station, which invisibly increases the risk of information leakage of the website of the seller. And a plurality of language websites need to be managed separately, so that the operation cost and difficulty are greatly improved.
In a specific embodiment, as shown in fig. 3, fig. 3 is a flowchart of the operation of a translation system provided in one embodiment. Referring to fig. 3, the translation system has the following workflow: the method comprises the steps of pre-linking an original application database, deploying language data translation plug-ins (components) such as English translation plug-ins, Japanese translation plug-ins or Korean translation plug-ins and the like, and deploying the language data translation plug-ins in different services according to actual requirements. And producing translation data based on the source website data, specifically performing data production through a data production module, and based on different language types, storing the production translation data in different language categories, such as production translation data which can be classified into English language types, Japanese language types and translation data generation. Furthermore, the data can be stored in different types according to different data types. The system also comprises a translation database, specifically, corresponding data in the database can be translated into data of different language types, and specifically, the data can be translated according to language type plug-ins corresponding to the different language types. And cache data is loaded from the database of the corresponding type according to actual service requirements, so that cache loading on demand is realized. And returning by intercepting the original program, and calling the corresponding language type translator according to the target language by intercepting the request message in the specific application so as to execute the translation of the language according to the corresponding language type translator. And then the data is translated by using different language caches or translation services according to the called translator.
In a specific embodiment, the server acquires data from the database service db and transmits the data to the client, and in the data transmission process, the interception server intercepts the data requested by the client, performs translation service on the intercepted requested data by using the API service, and finally transmits the translated data to the client. Moreover, the API translation service can be docked to any website, and all types of websites can be docked through a standard interface.
After the interception server intercepts the request, the intercepted data is transmitted to a language interceptor and is sent to a language adapter, a language translation server of which the type is required is determined, a corresponding translator is matched in a translation service library, and if the matched language translator is not found, an AI translator, namely real-time translator service, can be called at the moment. And the language translator is connected with a language provider to realize the matching transmission of the language translator and the language provider.
The data production module in fig. 3 is configured to extract website data from the database service db, where the extracted data may be determined according to user requirements, and specifically may be all data in the whole website, or may be data that needs to be translated partially, which is not limited herein. After reading data from the website database, the data can be transmitted to a corresponding language translator (producer), wherein a language generator can be adapted according to user requirements, and the plug-ins of which language types are needed by a user can be provided, specifically, the data can be sent to translators of English translators, Japanese translators and other types to realize the translation of the data, and the translated data is stored in a language database according to types. Wherein the language database is in data communication with the language type providing module. For example, data such as "security group", "ali", "Baidu" and the like can be extracted from the website database, and translation data required by the user is "security group", so that translation data corresponding to the security group is provided to the user. Specifically, matching can be performed according to intention identification, such as the real intention of the user can be identified from the user request, such as the user intention can be identified according to the address, such as the fact that the user wants to translate the name of a company is identified, at the moment, data can be extracted from a company information base in a category base, if the user intention is fruit type translation, the data can be searched from the fruit base, and through intention identification and classification matching, the matching efficiency is greatly improved.
With continued reference to the language type conversion providing module in fig. 3, the request data carried in the user request is adapted to the data extracted from the language type database, so as to obtain the translation data corresponding to the request data, and the translation data is returned to the client, thereby implementing a translation service. According to the scheme of the application, the translation work of the multi-language data is realized in the API through the request intercepting operation, and a specific terminal or a server is decoupled, so that the source data cannot be changed in the data translation step, and the information safety is ensured. The language type conversion step is realized through the form of the configuration plug-in, so that different business self-adaption configuration plug-ins with different language types can be realized, the plug-in configuration is more flexible and the applicability is wider, the change of business metadata can be avoided through the self-adaption increase and reduction of the plug-ins, and the reservation of source data information is further ensured. When the corresponding target language data is adapted, the database of the corresponding type can be quickly positioned through the intention recognition algorithm, and then the corresponding data can be searched in the positioned database instead of performing data search in all databases, so that the efficiency of data search is further improved.
The localization scheme based on result interception decouples 4 large modules of original application programs, data translation, program translation and external translation services, and comprises the following steps: the whole translation process is insensitive to the original program such as the original client or the original server, and the original program does not even know that the translation service exists. In a second aspect: because the production module and the translation module of the translation data are independently deployed, the production and translation processes of the translation data are independent, namely the production module and the translation module of the translation data are noninductive and do not interfere with each other, and the production module and the translation module of the translation data can be freely replaced according to different business requirements. And for what is translated at the bottom layer, the program dynamically adapts to what, and the flexibility of translation is improved. In a third aspect: in addition, different modules and components can use the form of plug-in no matter data production or real-time translation through plug-in events, services and components can be dynamically added according to actual business requirements, the original process is free of invasion through the form of the components, and real horizontal expansion and hot plug are achieved. In a fourth aspect: and other external translation services can be seamlessly connected in a plug-in mode, and the original program and the translation pipeline are not influenced. In a fifth aspect: all modules are based on a standard interface form such as a socket communication mode, so that the method can be applied to any website, and the universality and the applicability of the method are realized. And the system can also be distributed and developed by using different languages and different technologies, is insensitive to a deployment environment, and is adaptive to a distributed environment and a cloud environment. A sixth aspect: the method in the proposal can intercept all types of services and programs through one-time development, and has strong applicability.
It should be understood that, although the steps in the flowchart of fig. 2 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 a portion of the steps in fig. 2 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least a portion of the other steps or stages.
In one embodiment, as shown in fig. 4, there is provided a multilingual conversion apparatus including:
the intercepting module 402 is configured to intercept a website data sending message, where the website data sending message carries data to be converted and a target language type corresponding to the data to be converted.
And the type conversion module 404 is configured to match a corresponding target language cache component according to the target language type, where data in the target language cache component is obtained based on a target language database corresponding to the target website.
An obtaining module 406, configured to obtain a data category corresponding to the data to be converted.
The matching module 408 is configured to match data corresponding to the data type in the data pre-stored in the target language cache component, and determine target language conversion data according to the matched data.
In an embodiment, the intercepting module 402 is further configured to intercept a website data sending message sent from the service server to the terminal, where the website data sending message is after the terminal sends a data obtaining request carrying a target website, request conversion data, and a target language type to the service server, and the service server extracts data to be converted corresponding to the request conversion data from a target website database corresponding to the target website, and sends the website data sending message carrying the data to be converted and the target language type to the terminal.
In one embodiment, the multi-language conversion apparatus further includes a storage module, where the storage module is configured to obtain target website source data corresponding to a target website; and respectively carrying out language type conversion on the source data of the target website through pre-configured language conversion components with different language types to obtain language databases with different data types.
In one embodiment, the storage module is further configured to perform language type storage on the language database according to the language type corresponding to the language database to obtain a plurality of language type databases; and for each language type database, performing data clustering on the data in the language type database to obtain a data category corresponding to each data, and classifying and storing the language type database according to the data category to obtain one or more idea databases.
In an embodiment, the obtaining module 406 is further configured to perform intent analysis on the data to be converted based on an intent analysis algorithm, so as to obtain a data intent category corresponding to the data to be converted; the matching module 408 is further configured to match a target language database corresponding to the target language type among the plurality of language type databases; matching an intention database corresponding to the data intention type in a target language database; and matching target language conversion data corresponding to the data to be converted in the intention database.
In one embodiment, the multi-language conversion device further comprises a real-time conversion module, wherein the real-time conversion module is used for calling a target language real-time conversion component corresponding to the target language type when target language conversion data corresponding to the data to be converted cannot be matched in the intention database; and performing language type conversion on the data to be converted according to the target language real-time conversion component to obtain target language conversion data.
In one embodiment, the multi-language conversion apparatus further includes a local module, where the local module is configured to obtain a localized component corresponding to the target language type, and the localized component is configured based on the service requirement; and carrying out localization conversion on the target language conversion data based on the localization component to obtain the target language conversion data meeting the service requirement.
For the specific limitations of the multilingual conversion apparatus, reference may be made to the above limitations of the multilingual conversion method, which will not be described herein again. The respective modules in the above-described multilingual conversion apparatus may be implemented in whole or in part by software, hardware, or 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 one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 5. The computer device includes a processor, a memory, and a network interface 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 to store website data. 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 multilingual 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, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program: intercepting a website data sending message, wherein the website data sending message carries data to be converted and a target language type corresponding to the data to be converted; matching a corresponding target language cache component according to the target language type, wherein data in the target language cache component is obtained based on a target language database corresponding to a target website; acquiring a data type corresponding to data to be converted; and matching data corresponding to the data type in the data pre-stored in the target language cache component, and determining target language conversion data according to the matched data.
In one embodiment, the processor, when executing the computer program, further performs the steps of: intercepting a website data sending message sent from a business server to a terminal, wherein the website data sending message is sent by the terminal to the business server, and after the terminal sends a data acquisition request carrying a target website, request conversion data and a target language type, the business server extracts data to be converted corresponding to the request conversion data from a target website database corresponding to the target website, and sends the website data sending message carrying the data to be converted and the target language type to the terminal.
In one embodiment, the processor, when executing the computer program, further performs the steps of: acquiring target website source data corresponding to a target website; and respectively carrying out language type conversion on the source data of the target website through pre-configured language conversion components with different language types to obtain language databases with different data types.
In one embodiment, the processor, when executing the computer program, further performs the steps of: storing the language database in different language types according to the language types corresponding to the language database to obtain a plurality of language type databases; for each language type database, carrying out data clustering on the data in the language type database to obtain a data category corresponding to each data; and classifying and storing the language type database according to the data category to obtain one or more idea databases.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and performing intention analysis on the data to be converted based on an intention analysis algorithm to obtain a data intention category corresponding to the data to be converted.
In one embodiment, the processor, when executing the computer program, further performs the steps of: matching a target language database corresponding to the target language type in a plurality of language type databases; matching an intention database corresponding to the data intention type in a target language database; and matching target language conversion data corresponding to the data to be converted in the intention database.
In one embodiment, the processor, when executing the computer program, further performs the steps of: when target language conversion data corresponding to the data to be converted cannot be matched in the intention database, calling a target language real-time conversion component corresponding to the target language type; and performing language type conversion on the data to be converted according to the target language real-time conversion component to obtain target language conversion data.
In one embodiment, the processor, when executing the computer program, further performs the steps of: acquiring a localization component corresponding to the target language type, wherein the localization component is configured correspondingly based on the service requirement; and carrying out localization conversion on the target language conversion data based on the localization component to obtain target language conversion data meeting the service requirement, and storing the target language conversion data into the block chain.
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: intercepting a website data sending message, wherein the website data sending message carries data to be converted and a target language type corresponding to the data to be converted; matching a corresponding target language cache component according to the target language type, wherein data in the target language cache component is obtained based on a target language database corresponding to a target website; acquiring a data type corresponding to data to be converted; matching data corresponding to the data type in the data pre-stored in the target language cache component, and determining target language conversion data according to the matched data
In one embodiment, the computer program when executed by the processor further performs the steps of: intercepting a website data sending message sent from a business server to a terminal, wherein the website data sending message is sent by the terminal to the business server, and after the terminal sends a data acquisition request carrying a target website, request conversion data and a target language type, the business server extracts data to be converted corresponding to the request conversion data from a target website database corresponding to the target website, and sends the website data sending message carrying the data to be converted and the target language type to the terminal.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring target website source data corresponding to a target website; and respectively carrying out language type conversion on the source data of the target website through pre-configured language conversion components with different language types to obtain language databases with different data types.
In one embodiment, the computer program when executed by the processor further performs the steps of: storing the language database in different language types according to the language types corresponding to the language database to obtain a plurality of language type databases; for each language type database, carrying out data clustering on the data in the language type database to obtain a data category corresponding to each data; and classifying and storing the language type database according to the data category to obtain one or more idea databases.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and performing intention analysis on the data to be converted based on an intention analysis algorithm to obtain a data intention category corresponding to the data to be converted.
In one embodiment, the processor, when executing the computer program, further performs the steps of: matching a target language database corresponding to the target language type in a plurality of language type databases; matching an intention database corresponding to the data intention type in a target language database; and matching target language conversion data corresponding to the data to be converted in the intention database.
In one embodiment, the computer program when executed by the processor further performs the steps of:
when target language conversion data corresponding to the data to be converted cannot be matched in the intention database, calling a target language real-time conversion component corresponding to the target language type; and performing language type conversion on the data to be converted according to the target language real-time conversion component to obtain target language conversion data.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring a localization component corresponding to the target language type, wherein the localization component is configured correspondingly based on the service requirement; and carrying out localization conversion on the target language conversion data based on the localization component to obtain target language conversion data meeting the service requirement, and storing the target language conversion data into the block chain.
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 related to 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 can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
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 examples 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 (10)
1. A multi-language conversion method applied to a component server is characterized by comprising the following steps:
intercepting a website data sending message, wherein the website data sending message carries data to be converted and a target language type corresponding to the data to be converted;
matching a corresponding target language cache component according to the target language type, wherein data in the target language cache component is obtained based on a target language database corresponding to a target website;
acquiring a data type corresponding to the data to be converted;
and matching data corresponding to the data type in the data pre-stored in the target language cache component, and determining target language conversion data according to the matched data.
2. The method of claim 1, wherein intercepting the website data send message comprises:
intercepting a website data sending message sent from a business server to a terminal, wherein the website data sending message is sent by the terminal to the business server and carries the target website, the request conversion data and a data acquisition request of the target language type, and then the business server extracts data to be converted corresponding to the request conversion data from a target website database corresponding to the target website and sends the website data sending message carrying the data to be converted and the target language type to the terminal.
3. The method of claim 1, further comprising:
acquiring target website source data corresponding to the target website;
and respectively carrying out language type conversion on the source data of the target website through pre-configured language conversion components with different language types to obtain language databases with different data types.
4. The method of claim 3, further comprising:
storing the language database in different language types according to the language types corresponding to the language database to obtain a plurality of language type databases;
for each language type database, performing data clustering on data in the language type database to obtain a data category corresponding to each data;
and classifying and storing the language type database according to the data types to obtain one or more semantic databases.
5. The method according to claim 4, wherein the obtaining of the data category corresponding to the data to be converted includes:
performing intention analysis on the data to be converted based on an intention analysis algorithm to obtain a data intention category corresponding to the data to be converted;
the matching of the data corresponding to the data type in the data pre-stored in the target language cache component and the determination of the target language conversion data according to the matched data comprises the following steps:
matching a target language database corresponding to the target language type in a plurality of language type databases;
matching an intent database corresponding to the data intent type in the target language database;
and matching target language conversion data corresponding to the data to be converted in the intention database.
6. The method according to claim 5, wherein after matching target language conversion data corresponding to the data to be converted in the intent database, the method further comprises:
when target language conversion data corresponding to the data to be converted cannot be matched in the intention database, calling a target language real-time conversion component corresponding to the target language type;
and performing language type conversion on the data to be converted according to the target language real-time conversion component to obtain target language conversion data.
7. The method according to any one of claims 1 to 6, wherein after the target language cache component is used for matching target language conversion data corresponding to the data to be converted, the method further comprises:
acquiring a localization component corresponding to the target language type, wherein the localization component is configured correspondingly based on business requirements;
and carrying out localization conversion on the target language conversion data based on the localization component to obtain target language conversion data meeting the service requirement, and storing the target language conversion data into a block chain.
8. A multi-language conversion apparatus, comprising:
the system comprises an interception module, a conversion module and a conversion module, wherein the interception module is used for intercepting a website data sending message, and the website data sending message carries data to be converted and a target language type corresponding to the data to be converted;
the type conversion module is used for matching a corresponding target language conversion component according to the target language type;
the acquisition module is used for acquiring a target language cache component corresponding to the target language conversion component, and data in the target language cache component is obtained based on a target language database corresponding to a target website;
and the matching module is used for matching the target language conversion data corresponding to the data to be converted in the data pre-stored in the target language cache component.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 7.
10. 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.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011641182.2A CN112765997A (en) | 2020-12-31 | 2020-12-31 | Multi-language conversion method, device, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011641182.2A CN112765997A (en) | 2020-12-31 | 2020-12-31 | Multi-language conversion method, device, computer equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112765997A true CN112765997A (en) | 2021-05-07 |
Family
ID=75698451
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011641182.2A Pending CN112765997A (en) | 2020-12-31 | 2020-12-31 | Multi-language conversion method, device, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112765997A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113687860A (en) * | 2021-08-20 | 2021-11-23 | 北京达佳互联信息技术有限公司 | Dynamic configuration method, device, equipment and storage medium |
CN114386387A (en) * | 2022-01-13 | 2022-04-22 | 上海中通吉网络技术有限公司 | Multi-language conversion method of express service system |
-
2020
- 2020-12-31 CN CN202011641182.2A patent/CN112765997A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113687860A (en) * | 2021-08-20 | 2021-11-23 | 北京达佳互联信息技术有限公司 | Dynamic configuration method, device, equipment and storage medium |
CN114386387A (en) * | 2022-01-13 | 2022-04-22 | 上海中通吉网络技术有限公司 | Multi-language conversion method of express service system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10303689B2 (en) | Answering natural language table queries through semantic table representation | |
CN109800258B (en) | Data file deployment method, device, computer equipment and storage medium | |
CN109617647B (en) | Message conversion method and device, computer equipment and computer readable storage medium | |
CN111310427A (en) | Service data configuration processing method and device, computer equipment and storage medium | |
CN111382341B (en) | Scientific and technological information resource retrieval and query system and method based on big data | |
CN112765997A (en) | Multi-language conversion method, device, computer equipment and storage medium | |
CN110858172A (en) | Automatic test code generation method and device | |
CN112434811A (en) | Knowledge graph construction method and device, computing equipment and storage medium | |
US20200142674A1 (en) | Extracting web api endpoint data from source code | |
US10803257B2 (en) | Machine translation locking using sequence-based lock/unlock classification | |
WO2020124723A1 (en) | Resource description file processing and page resource obtaining method, and intermediate server | |
US11120064B2 (en) | Transliteration of data records for improved data matching | |
CN114153626A (en) | Method and device for abstracting service integration process and computer equipment | |
CN110321374B (en) | Standard file IO operating system and method based on distributed network | |
CN112784029B (en) | Business processing method and device based on natural language processing and computer equipment | |
US10235455B2 (en) | Semantic search system interface and method | |
CN111083054B (en) | Route configuration processing method and device, computer equipment and storage medium | |
CN104536769A (en) | International file achieving method | |
US20100228772A1 (en) | Method and apparatus for performing an information search and retrieval by submitting an electronic form over e-mail | |
CN114416847A (en) | Data conversion method, device, server and storage medium | |
WO2021174756A1 (en) | Application system deployment method and apparatus, and computer device and storage medium | |
CN112732423A (en) | Process migration method, device, equipment and medium | |
CN113312540A (en) | Information processing method, device, equipment, system and readable storage medium | |
CN111400623A (en) | Method and apparatus for searching information | |
US12067073B2 (en) | URL exchange |
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 |