Data processing method and device, electronic equipment and storage medium

By analyzing, preprocessing, translating and automating page layout and layout of the documents selected by users, the problem that the existing technology cannot provide personalized and customized printing services is solved, and the efficiency, convenience and personalized processing of multilingual documents are achieved, improving the user experience.

CN119578367APending Publication Date: 2025-03-07BEIJING BAIDU NETCOM SCI & TECH CO LTD

Patent Information

Application Number
CN202411606510.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-11
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

Existing online printing services cannot provide secondary creation and deep processing functions of documents, and cannot meet users who need personalized and customized services, especially those with limited language capabilities.

Method used

By obtaining the user-selected pending documents and printing modes, including the target language and presentation mode, the document content is parsed, preprocessed, translated and automatically typed page layout, and finally personalized print output is achieved.

Benefits of technology

It realizes efficient, convenient and personalized processing of multilingual documents, improves the readability and practicality of documents, meets the deep needs of users, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119578367A_ABST
    Figure CN119578367A_ABST
Patent Text Reader

Abstract

The invention provides a data processing method and device, electronic equipment and a storage medium, and relates to the technical field of artificial intelligence, in particular to the technical field of printing. According to the specific implementation scheme, a to-be-processed document selected by a user and a printing mode are obtained, wherein the printing mode comprises a selected target language and a target display mode; the content of the to-be-processed document is analyzed and preprocessed, and the preprocessed to-be-processed document is obtained; performing translation processing on the preprocessed to-be-processed document according to the target language and the target display mode to obtain a translation corresponding to the to-be-processed document; and re-typesetting the translation corresponding to the to-be-processed document according to the automatic page layout strategy, and printing the typeset translation. The invention provides a new multi-language contrast printing mode capable of meeting the requirements of multi-language learning or working scenes, so that the deep requirements of users can be met, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of artificial intelligence technology, specifically to the field of printing technology, and especially to a data processing method, device, electronic device and storage medium. Background Art

[0002] Current online printing services generally follow a standardized operating process. Although this model is convenient for users to a certain extent, it has obvious limitations. Specifically, these services usually do not provide secondary creation and in-depth processing functions for documents, and only allow users to print directly according to the content of the original file. Although this approach is simple and direct, it obviously cannot meet the needs of users who need more personalized and customized services in learning and work scenarios, especially for those with limited language skills who need multilingual support to understand and use documents. Summary of the invention

[0003] The present disclosure provides a data processing method, device, electronic device and storage medium.

[0004] According to one aspect of the present disclosure, a data processing method is provided, the method comprising:

[0005] Obtaining a document to be processed and a printing mode selected by a user, wherein the printing mode includes a selected target language and a target display mode;

[0006] Parsing and preprocessing the content of the document to be processed to obtain the preprocessed document to be processed;

[0007] Translating the preprocessed document to be processed according to the target language and the target display mode to obtain a translation corresponding to the document to be processed;

[0008] The translated text corresponding to the document to be processed is re-layouted according to the automatic page layout strategy, and the translated text after typeset is printed.

[0009] According to another aspect of the present disclosure, there is provided a data processing device, comprising:

[0010] An acquisition module, used to acquire a document to be processed and a printing mode selected by a user, wherein the printing mode includes a selected target language and a target display mode;

[0011] A preprocessing module is used to parse and preprocess the content of the document to be processed to obtain the preprocessed document to be processed;

[0012] A translation module, used for translating the preprocessed document to be processed according to the target language and the target display mode to obtain a translation corresponding to the document to be processed;

[0013] The typesetting module is used to rearrange the translation corresponding to the document to be processed according to the automatic page layout strategy, and print the typeset translation.

[0014] According to a third aspect of the present disclosure, there is provided an electronic device, including:

[0015] at least one processor; and

[0016] a memory communicatively connected to the at least one processor; wherein,

[0017] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute any method in any of the above technical solutions.

[0018] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute any one of the methods described in the above technical solutions.

[0019] According to a fifth aspect of the present disclosure, a computer program product is provided, including a computer program, wherein the computer program implements any one of the methods described in the above technical solutions when executed by a processor.

[0020] The present disclosure provides a data processing method, apparatus, device and storage medium. The present disclosure can perform detailed analysis and preprocessing of the document content by accurately capturing the document and specific printing mode selected by the user, and can professionally translate the document according to the target language and target display mode set by the user to generate an accurate translation. Subsequently, the translation is intelligently typeset using advanced automated page layout strategies to ensure that the printed output conforms to both language habits and visual aesthetics. This coherent process greatly improves the efficiency and quality of multilingual document processing and provides users with an efficient, convenient and personalized printing solution. That is, the present disclosure provides a new multilingual comparison printing mode that can meet the needs of multilingual learning or work scenarios, thereby meeting the deep-seated needs of users and improving the user experience.

[0021] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0023] Figure 1 is a schematic diagram of the steps of the data processing method in an embodiment of the present disclosure;

[0024] Figure 2 A principle block diagram of a data processing device in an embodiment of the present disclosure;

[0025] Figure 3 It is a block diagram of an electronic device used to implement the data processing method of the embodiment of the present disclosure. DETAILED DESCRIPTION

[0026] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0027] The present disclosure provides a data processing method, see Figure 1 As shown, Figure 1 : is a schematic diagram of the steps of the data processing method in an embodiment of the present disclosure, which can be applied to the server side, and includes:

[0028] Step S101, obtaining a document to be processed and a printing mode selected by a user, where the printing mode includes a selected target language and a target display mode.

[0029] Specifically, "documents to be processed" refers to the original files that users upload and want to be processed in a specific way, while "print mode" refers to the set of printing options customized by users according to their needs, including "selected target language", which is the language that users want the documents to be translated into, and "target display mode", which refers to the way users expect documents to be displayed, such as whether bilingual comparison is required, or only the translated text is displayed. At this stage, the server will capture this input information for subsequent document parsing, preprocessing, translation and typesetting to ensure that the printed output meets the user's personalized needs.

[0030] In this way, by obtaining the documents to be processed and the specific printing mode selected by the user, including the target language and target display mode specified by the user, this solution can provide customized document processing and printing services. This personalized setting not only meets the user's needs for multilingual content, but also improves the readability and practicality of the document, making the printed output more in line with the user's specific reading and usage habits, thereby enhancing the user experience and satisfaction.

[0031] Step S102, parsing and preprocessing the content of the document to be processed to obtain the preprocessed document to be processed.

[0032] Specifically, after obtaining the document to be processed, the content of the document to be processed is parsed and preprocessed to obtain the preprocessed document to be processed. "Parsing" refers to the server's in-depth analysis of the content of these documents to identify and understand the structure and content of the documents. "Preprocessing" involves a series of automated preparations for the documents, such as format conversion, text cleaning, language detection, etc., to ensure that the documents are suitable for subsequent processing procedures. Through this parsing and preprocessing step, the server can convert the original document into a preprocessed document to be processed, laying a solid foundation for the next step of translation and typesetting, ensuring that the final print output is both accurate and meets the user's personalized needs.

[0033] In this way, through in-depth content analysis and meticulous preprocessing of the document to be processed, the original document can be effectively converted into a preprocessed version. This process not only improves the accuracy and efficiency of document processing, but also provides a basis for standardization and optimization for subsequent translation and typesetting work, ensuring the quality of printed output and the satisfaction of user customization needs, thereby improving the overall user experience and the professional level of document processing.

[0034] Step S103: translating the preprocessed document to be processed according to the target language and the target display mode to obtain a translation corresponding to the document to be processed.

[0035] Specifically, "preprocessed documents to be processed" refers to documents that have been formatted and optimized for content, and are ready for translation. After obtaining the preprocessed document to be processed, the document is translated. When translating the document, it can accurately translate the preprocessed document content according to the target language and display mode specified by the user. This process involves language recognition, term matching, and context understanding to ensure the accuracy and fluency of the translation. When translating, for example, machine translation, statistical-based machine translation, or large models can be used for translation, so that a translation corresponding to the original document to be processed can be generated, thereby meeting the user's multilingual reading and usage needs, and improving the accessibility and practicality of the document.

[0036] In this way, by accurately translating the pre-processed documents according to the target language and target display mode specified by the user, a high-quality translation corresponding to the original document content can be generated. This process not only improves the multilingual readability of the document, but also enhances the international applicability of the document, allowing users to easily obtain and understand the required information no matter where they are, greatly improving the efficiency and accuracy of cross-language communication.

[0037] Step S104: re-layout the translation corresponding to the document to be processed according to the automatic page layout strategy, and print the re-layout translation.

[0038] Specifically, "automatic page layout strategy" refers to a series of preset typesetting rules and algorithms that can automatically adjust the layout of the document to adapt to different printing needs. This process involves re-layouting the translated document (i.e., "translation") according to these strategies, including adjusting the font, font size, page margins, paragraph spacing, etc., to ensure the visual beauty of the document and the clarity of the content. The implementation process of this solution includes: inputting these translations into the typesetting system, the system intelligently typesets the document according to the preset automatic page layout strategy, and then outputs the typeset document, and finally prints it using a printer. This process not only improves printing efficiency, but also ensures printing quality, so that the final printing results are both professional and meet the user's personalized needs.

[0039] In this way, the translated text is reformatted using an automated page layout strategy. Through intelligent typesetting, the layout of the document is optimized, making the printed document visually neater and more beautiful, with a clearer content structure, which is easier to read and understand. At the same time, it also improves printing efficiency and professionalism, meeting users' needs for high-quality print output.

[0040] The present disclosure provides a data processing method, apparatus, device and storage medium. The present disclosure can perform detailed analysis and preprocessing of the document content by accurately capturing the document and specific printing mode selected by the user, and can professionally translate the document according to the target language and target display mode set by the user to generate an accurate translation. Subsequently, the translation is intelligently typeset using advanced automated page layout strategies to ensure that the printed output conforms to both language habits and visual aesthetics. This coherent process greatly improves the efficiency and quality of multilingual document processing and provides users with an efficient, convenient and personalized printing solution. That is, the present disclosure provides a new multilingual comparison printing mode that can meet the needs of multilingual learning or work scenarios, thereby meeting the deep-seated needs of users and improving the user experience.

[0041] In some optional embodiments, parsing and preprocessing the content of the document to be processed to obtain the preprocessed document to be processed includes:

[0042] Parsing the contents of the document to be processed to identify the document type of the document to be processed and the relationship between the contents of each part;

[0043] The contents with associated relationships in the to-be-processed document are position-locked to obtain the pre-processed to-be-processed document.

[0044] Specifically, after obtaining the document to be processed, the content of the document to be processed is parsed. Among them, "parsing" means that the server conducts in-depth analysis of the content of these documents to identify the type of document (such as reports, papers, manuals, etc.) and the logical and semantic associations between the contents of the various parts of the document. This process involves natural language processing technology and document analysis algorithms, which can understand the hierarchical relationship between the document structure and content. Next, the content with associated relationships in the document to be processed is position-locked, wherein "position locking" means that after identifying the content with associated relationships (such as charts and corresponding explanatory texts), the server will ensure that the relative positions between these contents remain unchanged in the subsequent processing process, and will not be separated even during translation or typesetting. In this way, after position locking and preprocessing, the preprocessed document to be processed can be obtained, which provides a structured and optimized basis for the next step of translation and typesetting, ensuring that the final print output is both accurate and in line with the original organizational structure of the document.

[0045] In this way, by conducting in-depth analysis of the document to be processed, the relationship between the document type and content can be accurately identified, and the position of the related content can be locked. This can ensure that in the subsequent translation and typesetting process of the document, the related content can maintain its original structure and layout, avoiding content dislocation and layout confusion, thereby improving the accuracy and professionalism of document processing, so that the final print output maintains the logic and coherence of the original document while meeting the user's demand for high-quality document presentation.

[0046] In some optional embodiments, the preprocessed document to be processed is translated according to the target language and the target display mode to obtain a translation corresponding to the document to be processed, including:

[0047] If the target display mode is a paragraph-by-paragraph comparison display mode, the pre-processed document to be processed is translated according to the target language to obtain a translation to be processed;

[0048] The translation to be processed is merged with the document to be processed segment by segment to obtain the translation corresponding to the document to be processed.

[0049] Specifically, "target display mode" refers to the document display method selected by the user, while "paragraph-by-paragraph comparison display mode" is a special display method that requires the original content and translated content of the document to be displayed paragraph by paragraph.

[0050] If the target display mode is the paragraph-by-paragraph comparison display mode, the translation corresponding to the document to be processed is achieved as follows: first, the server translates the pre-processed document according to the target language set by the user to generate the translation to be processed; then, the server merges these translations with the content of the original document paragraph by paragraph, that is, the original and the translation are arranged one by one, so as to obtain a complete bilingual document that can be compared and read. This process ensures that users can intuitively compare the original and the translation, which is convenient for learning and understanding, and is particularly suitable for scenarios such as language learning, academic research, and cross-cultural communication.

[0051] In this way, when the target display mode is set to the paragraph-by-paragraph comparison display mode, this solution translates the pre-processed documents to be processed into the target language to generate the translations to be processed, and then merges these translations with the original texts paragraph by paragraph to form a comparison document. This can greatly improve the readability and learning efficiency of the document, allowing users to intuitively compare the original text and the translation and deeply understand the content. This method is particularly suitable for scenarios such as language learning and literature comparison research, and enhances the practicality and educational value of the document.

[0052] In some optional embodiments, translating the preprocessed document to be processed according to the target language to obtain the translation to be processed includes:

[0053] The pre-processed document to be processed is translated using machine translation or a large model according to the target language to obtain a translation corresponding to the document to be processed.

[0054] Specifically, "machine translation" includes rule-based machine translation and statistics-based machine translation. Rule-based machine translation is an early translation method that relies on a series of grammatical and vocabulary rules jointly formulated by linguists and computer scientists to convert texts; statistics-based machine translation is a modern translation method that uses a large number of bilingual corpora (parallel texts) to count and learn the correspondence between languages. The machine translation in the disclosed embodiment adopts these two combined methods, so that accuracy and fluency can be better balanced, thereby improving the quality of translation. The "big model" refers to a machine learning model trained with large-scale data, such as a neural network, for translation. When performing translation processing, these two methods can be selected according to the complexity and professionalism of the document, and are not limited here.

[0055] The implementation process of this embodiment includes: first, the server will select an appropriate translation method according to the target language selected by the user - for structured and standardized documents, machine translation may be used; for complex or professional documents, a large model may be used for translation processing. Then, the server inputs the pre-processed document to be processed into the selected translation system, so that the translation corresponding to the document to be processed can be obtained. This process ensures the accuracy and fluency of the translation, and can adapt to the translation needs of different types of documents.

[0056] In this way, machine translation is suitable for structured and standardized documents to ensure the accuracy of translation; while large models are suitable for complex or professional documents, and deep learning technology is used to improve the naturalness and contextual adaptability of translation. By using machine translation or large models to translate the pre-processed documents into the target language, it can flexibly adapt to the translation needs of different documents and provide accurate and fluent translations. This flexible translation method not only improves the quality of translation, but also enhances the applicability of the service to meet the specific needs of different users in multilingual translation scenarios.

[0057] In some optional embodiments, the preprocessed document to be processed is translated according to the target language and the target display mode to obtain a translation corresponding to the document to be processed, including:

[0058] If the target display mode is a mode that displays only the translated text, the pre-processed document to be processed is translated using machine translation or a large model according to the target language to obtain a translated text corresponding to the document to be processed.

[0059] Specifically, "display translation only mode" refers to a specific display method, in which the user only wants to see the translated document content without displaying the original document. If the target display mode is the display translation only mode, the specific implementation process of obtaining the translation corresponding to the document to be processed is: according to the target language specified by the user, select a suitable translation method - for structured and standardized documents, machine translation may be used; for complex or professional documents, a large model may be used for translation processing. Then, the preprocessed document is input into the selected translation system for translation processing, and finally a translation corresponding to the original document to be processed is generated. This process ensures that users can obtain accurate and fluent translated documents, meets the user's needs to view only the translated content, and is especially suitable for scenarios where information needs to be understood and absorbed quickly.

[0060] In this way, when the target display mode is set to "display translated text only mode", the pre-processed documents to be processed are translated by selecting machine translation or a large model according to the target language. This can provide users with a clear and direct view of the translated documents without the need to display the original text additionally, thereby simplifying the reading experience. This is especially suitable for users who need to quickly obtain translation information without paying attention to the original text, improving the accessibility and practicality of the translated documents.

[0061] In some optional embodiments, the translation corresponding to the document to be processed is re-formatted according to the automatic page layout strategy, and the formatted translation is printed, including:

[0062] Detect the format of the document to be processed and obtain the original document format;

[0063] Typeset the translation according to the original document format to obtain the original format translation;

[0064] The original format translation is reformatted according to a preset automatic page layout strategy to obtain a typeset translation, which is then printed based on the typeset translation.

[0065] Specifically, "original document format" refers to the original layout and format of these files, including visual styles such as fonts, font sizes, and page margins. The specific implementation process of this embodiment includes: first, the format of the document to be processed is detected, that is, the server automatically identifies and records the original format of the document. Next, the server will "layout the translation according to the original document format", which means that the translated text will be formatted to match the visual style of the original text, thereby generating an "original format translation". Then, the server will "re-layout the original format translation according to the pre-set automated page layout strategy". This step involves adjusting the page layout of the document to optimize the printing effect, and finally obtain the "layout translated text". Finally, the server will "print based on the layout translated text" to ensure that the printed output document retains the format characteristics of the original text and adapts to the printing requirements, achieving high-quality document output. This process not only improves the professionalism of the printed document, but also ensures the consistency of the translated content with the original format, providing users with high-quality printing services.

[0066] In this way, by detecting the format of the document to be processed to obtain the original document format, then typeset the translation according to the format, and re-format the translation according to the automated page layout strategy, it is ensured that the translated document maintains the original format while further optimizing the page layout, so that the final printed output is both faithful to the style of the original and adapted to printing requirements, thereby improving the professionalism and reading experience of the document and providing users with high-quality printing services.

[0067] In some optional embodiments, the original format translation is reformatted according to a preset automatic page layout strategy to obtain a layout-enhanced translation, including:

[0068] According to the preset page parameters and the logical relationship between the various parts of the document to be processed, the format of the original format translation is adjusted to obtain the typeset translation.

[0069] Specifically, "page parameters" refer to predefined page layout settings, such as margins, font size, line spacing, etc. These parameters are used to guide the typesetting process of the document. "Logical relationship between the various parts of the document to be processed" involves the organization of the internal structure of the document, such as the relationship between the title and content, and between the chart and the caption.

[0070] The implementation process of this solution includes: first, the server will identify and understand the logical relationship between the various parts of the document to be processed; then, based on these relationships and the pre-set page parameters, the server will fine-tune the format of the original format translation, such as ensuring that the font and size of the title meet the requirements of the page parameters, and that the charts and related captions maintain the correct relative positions. Through such adjustments, the final typesetting translation is obtained. This translation not only conforms to the expected page layout visually, but also maintains the logical structure and coherence of the original text in terms of content, providing a guarantee for high-quality print output.

[0071] In this way, by adjusting the format of the original format translation according to the pre-set page parameters and the logical relationship between the various parts of the document to be processed, it can be ensured that the translated text meets professional page layout standards after typesetting, while maintaining the logical coherence and structural integrity of the document content. Such refined typesetting processing improves the overall readability and aesthetics of the document, making the final printed material more standardized and professional, greatly enhancing the presentation quality of the document and the user's reading experience.

[0072] The following describes an embodiment of the device of the present application, which can be used to execute the data processing method in the above embodiment of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the data processing method in the above embodiment of the present application.

[0073] The present disclosure also provides a data processing device 200, such as Figure 2 As shown, including:

[0074] An acquisition module 201 is used to acquire a document to be processed and a printing mode selected by a user, where the printing mode includes a selected target language and a target display mode;

[0075] A preprocessing module 202 is used to parse and preprocess the content of the document to be processed to obtain the preprocessed document to be processed;

[0076] The translation module 203 is used to translate the pre-processed document to be processed according to the target language and the target display mode to obtain a translation corresponding to the document to be processed;

[0077] The layout module 204 is used to layout the translation corresponding to the document to be processed according to the automatic page layout strategy, and print the layout translation.

[0078] In some optional embodiments, the preprocessing module 202 parses and preprocesses the content of the document to be processed to obtain the preprocessed document to be processed, including:

[0079] Parsing the contents of the document to be processed to identify the document type of the document to be processed and the relationship between the contents of each part;

[0080] The contents with associated relationships in the to-be-processed document are position-locked to obtain the pre-processed to-be-processed document.

[0081] In some optional embodiments, the translation module 203 translates the preprocessed document to be processed according to the target language and the target display mode to obtain a translation corresponding to the document to be processed, including:

[0082] If the target display mode is a paragraph-by-paragraph comparison display mode, the pre-processed document to be processed is translated according to the target language to obtain a translation to be processed;

[0083] The translation to be processed is merged with the document to be processed segment by segment to obtain the translation corresponding to the document to be processed.

[0084] In some optional embodiments, the translation module 203 translates the pre-processed document to be processed according to the target language to obtain a translation to be processed, including:

[0085] The pre-processed document to be processed is translated using machine translation or a large model according to the target language to obtain a translation corresponding to the document to be processed.

[0086] In some optional embodiments, the translation module 203 translates the preprocessed document to be processed according to the target language and the target display mode to obtain a translation corresponding to the document to be processed, including:

[0087] If the target display mode is a mode that displays only the translated text, the pre-processed document to be processed is translated using machine translation or a large model according to the target language to obtain a translated text corresponding to the document to be processed.

[0088] In some optional embodiments, the typesetting module 204 rearranges the translation corresponding to the document to be processed according to the automatic page layout strategy, and prints the rearranged translation, including:

[0089] Detect the format of the document to be processed and obtain the original document format;

[0090] Typeset the translation according to the original document format to obtain the original format translation;

[0091] The original format translation is reformatted according to a preset automatic page layout strategy to obtain a typeset translation, which is then printed based on the typeset translation.

[0092] In some optional embodiments, the typesetting module 204 rearranges the original format translation according to a preset automatic page layout strategy to obtain a typeset translation, including:

[0093] According to the preset page parameters and the logical relationship between the various parts of the document to be processed, the format of the original format translation is adjusted to obtain the typeset translation.

[0094] In the technical solution disclosed herein, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0095] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0096] Figure 3 A schematic block diagram of an example electronic device 300 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0097] like Figure 3As shown, the electronic device 300 includes a computing unit 301, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 302 or a computer program loaded from a storage unit 308 into a random access memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the device 300 can also be stored. The computing unit 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.

[0098] A number of components in the device 300 are connected to the I / O interface 305, including: an input unit 306, such as a keyboard, a mouse, etc.; an output unit 307, such as various types of displays, speakers, etc.; a storage unit 308, such as a disk, an optical disk, etc.; and a communication unit 309, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 309 allows the device 300 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0099] The computing unit 301 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 301 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 301 performs the various methods and processes described above, such as data processing methods. For example, in some embodiments, the data processing method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 308. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 300 via ROM 302 and / or communication unit 309. When the computer program is loaded into RAM 303 and executed by the computing unit 301, one or more steps of the applet distribution described above may be performed. Alternatively, in other embodiments, the computing unit 301 may be configured to perform the data processing method in any other appropriate manner (e.g., by means of firmware).

[0100] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0101] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0102] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0103] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0104] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0105] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0106] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0107] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A data processing method, the method comprising: Obtaining a document to be processed and a printing mode selected by a user, wherein the printing mode includes a selected target language and a target display mode; Parsing and preprocessing the content of the document to be processed to obtain the preprocessed document to be processed; Translating the preprocessed document to be processed according to the target language and the target display mode to obtain a translation corresponding to the document to be processed; The translated text corresponding to the document to be processed is re-layouted according to the automatic page layout strategy, and the translated text after typeset is printed.

2. The method according to claim 1, wherein: The parsing and preprocessing of the content of the document to be processed to obtain the preprocessed document to be processed includes: Parsing the content of the document to be processed to identify the document type of the document to be processed and the relationship between the various parts of the content; The contents with associated relationships in the to-be-processed document are position-locked to obtain the pre-processed to-be-processed document.

3. The method according to claim 1, wherein: The translating the preprocessed document to be processed according to the target language and the target display mode to obtain a translation corresponding to the document to be processed includes: If the target display mode is a paragraph-by-paragraph comparison display mode, translating the preprocessed document to be processed according to the target language to obtain a translation to be processed; The translation to be processed is merged with the document to be processed section by section to obtain a translation corresponding to the document to be processed.

4. The method according to claim 3, wherein: The step of translating the preprocessed document to be processed according to the target language to obtain a translation to be processed includes: The pre-processed document to be processed is translated according to the target language using machine translation or a large model to obtain a translation corresponding to the document to be processed.

5. The method according to claim 1, wherein: The translating the preprocessed document to be processed according to the target language and the target display mode to obtain a translation corresponding to the document to be processed includes: If the target display mode is a mode for displaying only the translated text, the pre-processed document to be processed is translated using machine translation or a large model according to the target language to obtain a translated text corresponding to the document to be processed.

6. The method according to any one of claims 1 to 5, wherein: The step of re-layouting the translation corresponding to the document to be processed according to the automatic page layout strategy and printing the re-layouted translation includes: Detecting the format of the document to be processed to obtain the original document format; Typesetting the translation according to the original document format to obtain the original format translation; The original format translation is re-formatted according to a preset automatic page layout strategy to obtain a typeset translation, and printing is performed based on the typeset translation.

7. The method according to claim 6, wherein: The step of re-layouting the original format translation according to a preset automatic page layout strategy to obtain a layout-enhanced translation includes: According to the preset page parameters and the logical relationship between the various parts in the document to be processed, the format of the original format translation is adjusted to obtain a typeset translation.

8. A data processing device, comprising: An acquisition module, used to acquire a document to be processed and a printing mode selected by a user, wherein the printing mode includes a selected target language and a target display mode; A preprocessing module is used to parse and preprocess the content of the document to be processed to obtain the preprocessed document to be processed; A translation module, used for translating the preprocessed document to be processed according to the target language and the target display mode to obtain a translation corresponding to the document to be processed; The typesetting module is used to rearrange the translation corresponding to the document to be processed according to the automatic page layout strategy, and print the typeset translation.

9. The device according to claim 8, wherein: The preprocessing module parses and preprocesses the content of the document to be processed to obtain the preprocessed document to be processed, including: Parsing the content of the document to be processed to identify the document type of the document to be processed and the relationship between the various parts of the content; The contents with associated relationships in the to-be-processed document are position-locked to obtain the pre-processed to-be-processed document.

10. The device according to claim 8, wherein: The translation module translates the preprocessed document to be processed according to the target language and the target display mode to obtain a translation corresponding to the document to be processed, including: If the target display mode is a paragraph-by-paragraph comparison display mode, translating the preprocessed document to be processed according to the target language to obtain a translation to be processed; The translation to be processed is merged with the document to be processed section by section to obtain a translation corresponding to the document to be processed.

11. The device according to claim 10, wherein: The translation module translates the preprocessed document to be processed according to the target language to obtain a translation to be processed, including: The pre-processed document to be processed is translated according to the target language using machine translation or a large model to obtain a translation corresponding to the document to be processed.

12. The device according to claim 8, wherein: The translation module translates the preprocessed document to be processed according to the target language and the target display mode to obtain a translation corresponding to the document to be processed, including: If the target display mode is a mode for displaying only the translated text, the pre-processed document to be processed is translated using machine translation or a large model according to the target language to obtain a translated text corresponding to the document to be processed.

13. The device according to any one of claims 8 to 12, wherein: The typesetting module re-typesets the translation corresponding to the document to be processed according to the automatic page layout strategy, and prints the typeset translation, including: Detecting the format of the document to be processed to obtain the original document format; Typesetting the translation according to the original document format to obtain the original format translation; The original format translation is re-formatted according to a preset automatic page layout strategy to obtain a typeset translation, and printing is performed based on the typeset translation.

14. The device according to claim 13, wherein: The typesetting module re-typesets the original format translation according to a preset automatic page layout strategy to obtain a typeset translation, including: According to the preset page parameters and the logical relationship between the various parts in the document to be processed, the format of the original format translation is adjusted to obtain a typeset translation.

15. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 7.

16. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-7.

17. A computer program product, comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Machine translation bilingual contrast method and system

    CN112765999A

  • Self-learning translation method and device based on machine translation and post-translation editing

    CN113792558A

  • Method of making translation document for keepinglayout of original text

    KR1020040016198A

  • System and method for automatic translation of documents scanned by multifunctional printer machines

    US20110122448A1

Cited By

  • Course editing system for displaying different contents by aiming at multiple languages

    CN120258011A

  • Contract document translation method and system based on large model

    CN120509421A

  • A contract document translation method and system based on large model

    CN120509421B

  • Multi-language payment text printing method, interaction method and electronic equipment

    CN121166047A