A text printing method, device, equipment and storage medium thereof

CN116841479BActive Publication Date: 2026-10-30CHINA PING AN PROPERTY INSURANCE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310784848.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-29
Publication Date
2026-10-30
Estimated Expiration
2043-06-29

AI Technical Summary

Technical Problem

[0004]本申请实施例的目的在于提出一种文本打印方法、装置、设备及其存储介质,以解决现有技术中传统打印平台还存在容灾性较低的问题

Benefits of technology

[0054]本申请实施例所述文本打印方法,根据预设的文字识别技术识别待打印文本中的数据内容,并获取文本识别结果;将文本识别结果分别缓存到打印生产集群和打印容灾集群中,并在缓存时生成相同的打印流水号信息,存储打印流水号信息,并构建打印流水号参照集;接收打印请求信息,其中,打印请求信息中包括目标打印流水号信息,目标打印流水号信息为打印流水号参照集中至少任一元素;通过解析打印请求信息,获取目标打印流水号信息;根据预设的故障监测组件,判断打印生产集群是否出现打印故障;若打印生产集群未出现打印故障,则根据目标打印流水号信息从打印生产集群的缓存中获取目标文本识别结果;若打印生产集群出现打印故障,则根据目标打印流水号信息从打印容灾集群的缓存中获取目标文本识别结果;将目标文本识别结果设置为打印任务结果;基于预设的打印输出设备,将打印任务结果打印到目标显示件,完成文本打印。通过将所述文本识别结果分别缓存到打印生产集群和打印容灾集群中,在打印生产集群正常情况下,使用打印生产集群设置打印任务结果,在打印生产集群异常情况下,可调用打印容灾集群设置打印任务结果,提高了打印平台的容灾性,尤其是在金融行业涉及到打印业务上,对于实时性要求比较高或者要求一次正确响应的关键业务时,能够采用本实施例所述的打印方法尽可能降低公司的业务经济损失。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116841479B_ABST
    Figure CN116841479B_ABST
Patent Text Reader

Abstract

The embodiment of the application belongs to the technical field of financial science and technology, is applied to a financial data content printing application scene, and relates to a text printing method, device and equipment and a storage medium thereof, and comprises the steps that printing request information is received; the printing request information is analyzed to obtain target printing serial number information; whether a printing fault occurs in a printing production cluster is judged according to a preset fault monitoring component; and printing task results are printed to a target display piece based on a preset printing output device to complete text printing. The text recognition results are respectively cached in the printing production cluster and a printing disaster recovery cluster in advance, the printing production cluster is used to set the printing task results in a normal case of the printing production cluster, the printing disaster recovery cluster is called to set the printing task results in an abnormal case of the printing production cluster, the disaster recovery of the printing platform is improved, and when a key business related to high real-time requirements or a correct response at one time is required, economic losses of a company can be reduced as much as possible.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of financial technology and is applied to the application scenario of printing financial data content, and in particular to a text printing method, apparatus, device and its storage medium. Background Technology

[0002] With the development of information technology in the financial industry and the advent of the big data era, financial companies are accumulating more and more financial data. Taking financial insurance or banking businesses as an example, after reaching an agreement with a financial client, it is often necessary to provide the client with an electronic or printed copy of the contract.

[0003] Traditional printing platforms primarily provide document printing, retrieval, and downloading functions. These platforms rely on multiple middleware components; any problem with any one of them will prevent the platform from providing normal printing functionality. Repairing or replacing middleware adds significant time to the entire printing process, during which the platform is unable to provide normal printing services. For critical business operations requiring high real-time performance or immediate correct response, this inability to provide printing services can result in substantial financial losses for the company. Therefore, existing traditional printing platforms suffer from low disaster recovery capabilities. Summary of the Invention

[0004] The purpose of this application is to provide a text printing method, apparatus, device and storage medium to solve the problem that traditional printing platforms in the prior art still have low disaster recovery capabilities.

[0005] To address the aforementioned technical problems, this application provides a text printing method, employing the following technical solution:

[0006] A text printing method includes the following steps:

[0007] The system identifies the data content in the text to be printed using a preset character recognition technology and obtains the text recognition results.

[0008] The text recognition results are cached in the printing production cluster and the printing disaster recovery cluster respectively. The same printing serial number information is generated when caching, the printing serial number information is stored, and a printing serial number reference set is constructed.

[0009] Receive print request information, wherein the print request information includes target print serial number information;

[0010] Based on the print request information, obtain the target print serial number information;

[0011] Based on the preset fault monitoring components, determine whether the printing production cluster has experienced a printing fault;

[0012] If no printing failure occurs in the printing production cluster, the first target text recognition result is obtained from the cache of the printing production cluster according to the target print serial number information, and the first target text recognition result is set as the print task result.

[0013] If the printing production cluster experiences a printing failure, the second target text recognition result is obtained from the cache of the printing disaster recovery cluster based on the target print serial number information, and the second target text recognition result is set as the print task result.

[0014] Based on a preset printing output device, the printing task results are printed onto the target display to complete the text printing.

[0015] Furthermore, the step of recognizing the data content in the text to be printed according to a preset character recognition technology and obtaining the text recognition result specifically includes:

[0016] The data content in the text to be printed is identified using OCR text recognition technology;

[0017] Determine whether the text to be printed exists in a bound text output template;

[0018] If the text to be printed does not have a bound text output template, the data content in the text to be printed is directly used as the text recognition result;

[0019] If the text to be printed has a bound text output template, the bound text output template is called, and formatted text data content is generated based on the bound text output template and the data content in the text to be printed. The formatted text data content is then used as the text recognition result.

[0020] Furthermore, before performing the step of caching the text recognition results into the print production cluster and the print disaster recovery cluster respectively, and generating the same print serial number information during caching, the method further includes:

[0021] The pre-defined printing platform is divided into service clusters according to the pre-defined partitioning rules, resulting in a printing production cluster and a printing disaster recovery cluster.

[0022] The step of caching the text recognition results in the printing production cluster and the printing disaster recovery cluster respectively, and generating the same printing serial number information during caching, specifically includes:

[0023] Generate a printable serial number based on the text recognition results;

[0024] The text recognition result is cached through the caching service provided by the caching middleware in the printing production cluster, and the storage location information of the text recognition result in the caching middleware is recorded. A one-to-one correspondence between the storage location information and the printing serial number information is constructed. The caching middleware includes Redis caching middleware or NAS caching middleware.

[0025] Based on the local caching service of the print disaster recovery cluster, the text recognition result is cached, and the storage address of the text recognition result in the local cache is recorded, thus establishing a one-to-one correspondence between the storage address and the print serial number information.

[0026] Furthermore, the step of calling the bound text output template and organizing the formatted text data content according to the bound text output template and the data content in the text to be printed specifically includes:

[0027] According to the transmission middleware in the printing production cluster, the bound text output template and the data content in the text to be printed are read asynchronously, and formatted text data content is generated according to the bound text output template and the data content in the text to be printed. The transmission middleware is an MQ transmission middleware; or

[0028] According to the multi-threaded processing method in the print disaster recovery cluster, the bound text output template and the data content in the text to be printed are read asynchronously, and formatted text data content is generated according to the bound text output template and the data content in the text to be printed.

[0029] Furthermore, the step of determining whether a printing failure has occurred in the printing production cluster based on a preset fault monitoring component specifically includes:

[0030] Obtain the service performance monitoring results for all middleware in the printing production cluster;

[0031] If the service performance monitoring results identify that there is a middleware in the printing production cluster that is experiencing service anomalies or is unable to provide corresponding services, then the printing production cluster will experience a printing failure.

[0032] If the service performance monitoring results indicate that all middleware in the printing production cluster can provide the corresponding services normally, then the printing production cluster has not experienced any printing failures.

[0033] Furthermore, the step of obtaining the first target text recognition result from the cache of the printing production cluster based on the target print serial number information specifically includes:

[0034] Based on the one-to-one correspondence between the printed serial number information and the storage location information in the cache middleware, the storage location information corresponding to the target printed serial number information in the target cache middleware is identified.

[0035] The first target text recognition result is obtained from the target cache middleware by using the storage location information corresponding to the target print serial number information in the target cache middleware.

[0036] Furthermore, the step of obtaining the second target text recognition result from the cache of the printing disaster recovery cluster based on the target print serial number information specifically includes:

[0037] Based on the one-to-one correspondence between the printed serial number information and the storage address in the local cache, the storage address of the target printed serial number information in the local cache is identified;

[0038] The second target text recognition result is obtained from the local cache by using the storage address of the target printed serial number information in the local cache.

[0039] To address the aforementioned technical problems, this application also provides a text printing device, which employs the following technical solution:

[0040] A text printing device, comprising:

[0041] The text recognition and acquisition module is used to recognize the data content in the text to be printed according to the preset text recognition technology and obtain the text recognition result;

[0042] The distinguishing caching module is used to cache the text recognition results in the printing production cluster and the printing disaster recovery cluster respectively. When caching, the same printing serial number information is generated, the printing serial number information is stored, and a printing serial number reference set is constructed.

[0043] A print request receiving module is used to receive print request information, wherein the print request information includes target print serial number information;

[0044] The print request parsing module is used to obtain the target print serial number information based on the print request information;

[0045] The printing fault detection module is used to determine whether a printing fault has occurred in the printing production cluster based on a preset fault monitoring component.

[0046] The first branch processing module is used to, if no printing failure occurs in the printing production cluster, obtain the first target text recognition result from the cache of the printing production cluster according to the target printing serial number information, and set the first target text recognition result as the printing task result.

[0047] The second branch processing module is used to obtain the second target text recognition result from the cache of the printing disaster recovery cluster according to the target print serial number information if the printing production cluster experiences a printing failure, and set the second target text recognition result as the printing task result.

[0048] The printing output module is used to print the printing task results onto the target display based on a preset printing output device, thereby completing text printing.

[0049] To address the aforementioned technical problems, this application also provides a computer device that employs the following technical solution:

[0050] A computer device includes a memory and a processor, wherein the memory stores computer-readable instructions, and the processor executes the computer-readable instructions to implement the steps of the text printing method described above.

[0051] To address the aforementioned technical problems, this application also provides a computer-readable storage medium, employing the technical solution described below:

[0052] A computer-readable storage medium storing computer-readable instructions that, when executed by a processor, implement the steps of the text printing method described above.

[0053] Compared with the prior art, the embodiments of this application have the following main advantages:

[0054] The text printing method described in this application embodiment identifies the data content in the text to be printed using a preset character recognition technology and obtains the text recognition result; the text recognition result is cached in both the printing production cluster and the printing disaster recovery cluster, and the same printing serial number information is generated during caching, the printing serial number information is stored, and a printing serial number reference set is constructed; a printing request information is received, wherein the printing request information includes target printing serial number information, and the target printing serial number information is at least any element in the printing serial number reference set; the target printing serial number information is obtained by parsing the printing request information; a preset fault monitoring component determines whether a printing fault has occurred in the printing production cluster; if no printing fault has occurred in the printing production cluster, the target text recognition result is obtained from the cache of the printing production cluster based on the target printing serial number information; if a printing fault has occurred in the printing production cluster, the target text recognition result is obtained from the cache of the printing disaster recovery cluster based on the target printing serial number information; the target text recognition result is set as the printing task result; and the printing task result is printed to the target display device based on a preset printing output device to complete the text printing. By caching the text recognition results into the printing production cluster and the printing disaster recovery cluster respectively, the printing task results can be set using the printing production cluster under normal conditions, and the printing task results can be set by calling the printing disaster recovery cluster under abnormal conditions. This improves the disaster recovery capability of the printing platform. Especially in the financial industry, where printing business is involved, for critical business with high real-time requirements or requiring a correct response on the first attempt, the printing method described in this embodiment can minimize the company's business economic losses. Attached Figure Description

[0055] To more clearly illustrate the solutions in this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0056] Figure 1 This is an exemplary system architecture diagram to which this application can be applied;

[0057] Figure 2 A flowchart of an embodiment of the text printing method according to this application;

[0058] Figure 3 A schematic diagram of a structure of an embodiment of the text printing apparatus according to this application;

[0059] Figure 4 A schematic diagram of the structure of an embodiment of the computer device according to this application. Detailed Implementation

[0060] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein in the specification of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "comprising" and "having," and any variations thereof, in the specification, claims, and foregoing drawings of this application, are intended to cover non-exclusive inclusion. The terms "first," "second," etc., in the specification, claims, or foregoing drawings of this application are used to distinguish different objects, not to describe a particular order.

[0061] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0062] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.

[0063] like Figure 1 As shown, system architecture 100 may include terminal devices 101, 102, and 103, a network 104, and a server 105. Network 104 serves as the medium for providing communication links between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.

[0064] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social media platform software, etc.

[0065] Terminal devices 101, 102, and 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 players (Moving Picture Experts Group Audio Layer IV), laptops, and desktop computers, etc.

[0066] Server 105 can be a server that provides various services, such as a backend server that supports the pages displayed on terminal devices 101, 102, and 103.

[0067] It should be noted that the text printing method provided in this application embodiment is generally executed by a server / terminal device, and correspondingly, the text printing device is generally set in the server / terminal device.

[0068] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0069] Continue to refer to Figure 2 A flowchart of an embodiment of the text printing method according to this application is shown. The text printing method includes the following steps:

[0070] Step 201: Identify the data content in the text to be printed using a preset text recognition technology and obtain the text recognition result.

[0071] In this embodiment, the step of recognizing the data content in the text to be printed according to the preset text recognition technology and obtaining the text recognition result specifically includes: recognizing the data content in the text to be printed using OCR text recognition technology; determining whether the text to be printed has a bound text output template; if the text to be printed does not have a bound text output template, then directly using the data content in the text to be printed as the text recognition result; if the text to be printed has a bound text output template, then calling the bound text output template, and organizing the formatted text data content according to the bound text output template and the data content in the text to be printed, and using the formatted text data content as the text recognition result.

[0072] In this embodiment, taking banking loan business as an example, after the loan application and the entire loan qualification review are completed, banks often need to present a paper loan contract in order to disburse the loan to the borrower. OCR text recognition technology is used to identify the data content in the text to be printed, and then it is determined whether the text to be printed has a bound text output template, i.e., whether there is a bound standard loan contract template. If so, the text recognition result is directly generated based on the text output template and the data content in the text to be printed; otherwise, the data content in the text to be printed is directly used as the text recognition result.

[0073] By determining whether the text to be printed has a bound text output template, the template selection during printing is ensured. Accordingly, all text output templates are pre-cached in the caching middleware of the printing production cluster, and all text output templates are also pre-cached in the local cache of the printing disaster recovery cluster.

[0074] In this embodiment, the step of calling the bound text output template and organizing the formatted text data content according to the bound text output template and the data content in the text to be printed specifically includes: asynchronously reading the bound text output template and the data content in the text to be printed according to the transmission middleware in the printing production cluster, and generating formatted text data content according to the bound text output template and the data content in the text to be printed. The transmission middleware is an MQ transmission middleware, or, according to the multi-threaded processing method in the printing disaster recovery cluster, asynchronously reading the bound text output template and the data content in the text to be printed, and generating formatted text data content according to the bound text output template and the data content in the text to be printed.

[0075] Step 202: Cache the text recognition results into the printing production cluster and the printing disaster recovery cluster respectively. Generate the same printing serial number information when caching, store the printing serial number information, and construct a printing serial number reference set.

[0076] In this embodiment, before executing the step of caching the text recognition results into the printing production cluster and the printing disaster recovery cluster respectively, and generating the same printing serial number information during caching, the method further includes: dividing the preset printing platform into service clusters according to preset division rules, dividing the printing production cluster and the printing disaster recovery cluster. Specifically, identifying the service items provided by the printing platform through middleware, and setting all middleware-provided service items as service items of the printing production cluster, identifying the local service items provided by the printing platform itself, and setting all local service items as service items of the printing disaster recovery cluster.

[0077] In this embodiment, the step of caching the text recognition result in both the printing production cluster and the printing disaster recovery cluster, and generating the same printing serial number information during caching, specifically includes: generating printing serial number information based on the text recognition result; caching the text recognition result using a caching service provided by a caching middleware in the printing production cluster, recording the storage location information of the text recognition result in the caching middleware, and constructing a one-to-one correspondence between the storage location information and the printing serial number information, wherein the caching middleware includes a Redis caching middleware or a NAS caching middleware; caching the text recognition result based on a local caching service in the printing disaster recovery cluster, recording the storage address of the text recognition result in the local cache, and constructing a one-to-one correspondence between the storage address and the printing serial number information.

[0078] Step 203: Receive print request information, wherein the print request information includes target print serial number information, and the target print serial number information is at least any element in the print serial number reference set.

[0079] In this embodiment, the target print serial number information is at least any element in the print serial number reference set. Accordingly, the target print serial number information can be a single print serial number or a set of print serial numbers in the form of a queue composed of multiple print serial numbers.

[0080] Step 204: Obtain the target print serial number information based on the print request information.

[0081] Step 205: Determine whether a printing failure has occurred in the printing production cluster based on the preset fault monitoring components.

[0082] In this embodiment, the step of determining whether the printing production cluster has experienced a printing failure based on a preset fault monitoring component specifically includes: obtaining the service performance monitoring results corresponding to all middleware in the printing production cluster; if the service performance monitoring results identify that some middleware in the printing production cluster has experienced service abnormalities or is unable to provide corresponding services, then the printing production cluster has experienced a printing failure; if the service performance monitoring results identify that all middleware in the printing production cluster can provide corresponding services normally, then the printing production cluster has not experienced a printing failure.

[0083] Step 206: If no printing failure occurs in the printing production cluster, the first target text recognition result is obtained from the cache of the printing production cluster according to the target print serial number information, and the first target text recognition result is set as the print task result.

[0084] In this embodiment, the step of obtaining the first target text recognition result from the cache of the printing production cluster based on the target print serial number information specifically includes: identifying the storage location information corresponding to the target print serial number information in the target cache middleware based on the one-to-one correspondence between the print serial number information and the storage location information in the cache middleware; and obtaining the first target text recognition result from the target cache middleware using the storage location information corresponding to the target print serial number information in the target cache middleware.

[0085] Step 207: If the printing production cluster experiences a printing failure, the second target text recognition result is obtained from the cache of the printing disaster recovery cluster based on the target print serial number information, and the second target text recognition result is set as the print task result.

[0086] In this embodiment, the step of obtaining the second target text recognition result from the cache of the print disaster recovery cluster based on the target print serial number information specifically includes: identifying the storage address of the target print serial number information in the local cache based on the one-to-one correspondence between the print serial number information and the storage address in the local cache; and obtaining the second target text recognition result from the local cache through the storage address of the target print serial number information in the local cache.

[0087] By caching the text recognition results in the printing production cluster and the printing disaster recovery cluster respectively, the printing task results can be set using the printing production cluster when it is in normal operation, and the printing task results can be set using the printing disaster recovery cluster when the printing production cluster is in failure. This improves the disaster recovery capability of the printing platform and can minimize the company's economic losses when dealing with critical business operations that require high real-time performance or a correct response on the first attempt.

[0088] Step 208: Based on the preset printing output device, print the printing task result onto the target display to complete the text printing.

[0089] In this embodiment, the preset printing output device refers to a specific printing hardware device.

[0090] This application identifies the data content in the text to be printed using a preset text recognition technology and obtains the text recognition result; the text recognition result is cached in both the printing production cluster and the printing disaster recovery cluster, and the same printing serial number information is generated and stored during caching, and a printing serial number reference set is constructed; a printing request information is received, wherein the printing request information includes target printing serial number information, which is at least any element in the printing serial number reference set; the target printing serial number information is obtained by parsing the printing request information; a preset fault monitoring component determines whether a printing fault has occurred in the printing production cluster; if no printing fault has occurred in the printing production cluster, the target text recognition result is obtained from the cache of the printing production cluster based on the target printing serial number information; if a printing fault has occurred in the printing production cluster, the target text recognition result is obtained from the cache of the printing disaster recovery cluster based on the target printing serial number information; the target text recognition result is set as the printing task result; and the printing task result is printed to the target display device based on a preset printing output device to complete the text printing. By caching the text recognition results in the printing production cluster and the printing disaster recovery cluster respectively, the printing task results can be set using the printing production cluster when it is in normal operation, and the printing task results can be set using the printing disaster recovery cluster when the printing production cluster is in failure. This improves the disaster recovery capability of the printing platform and can minimize the company's economic losses when dealing with critical business operations that require high real-time performance or a correct response on the first attempt.

[0091] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.

[0092] Foundational technologies for artificial intelligence generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.

[0093] In this embodiment, a print request is received; the target print serial number is obtained by parsing the print request; a pre-set fault monitoring component determines whether a printing failure has occurred in the print production cluster; and the print task result is printed to the target display based on a pre-set print output device, completing the text printing. By caching the text recognition results in both the print production cluster and the print disaster recovery cluster, the print task result is set using the print production cluster when it is functioning normally, and the print disaster recovery cluster is invoked to set the print task result when the print production cluster is malfunctioning. This improves the disaster recovery capability of the printing platform and minimizes business losses for companies in critical business scenarios requiring high real-time performance or a correct response on the first attempt.

[0094] Further reference Figure 3 As a response to the above Figure 2 To implement the method shown, this application provides an embodiment of a text printing apparatus, which is similar to... Figure 2 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.

[0095] like Figure 3 As shown, the text printing device 300 described in this embodiment includes: a text recognition and acquisition module 301, a differentiation and caching module 302, a print request receiving module 303, a print request parsing module 304, a print fault judgment module 305, a first branch processing module 306, a second branch processing module 307, and a print output module 308. Wherein:

[0096] The text recognition and acquisition module 301 is used to recognize the data content in the text to be printed according to a preset text recognition technology and to acquire the text recognition result;

[0097] The distinguishing cache module 302 is used to cache the text recognition results in the printing production cluster and the printing disaster recovery cluster respectively. When caching, the same printing serial number information is generated, the printing serial number information is stored, and a printing serial number reference set is constructed.

[0098] The print request receiving module 303 is used to receive print request information, wherein the print request information includes target print serial number information, and the target print serial number information is at least any element in the print serial number reference set;

[0099] The print request parsing module 304 is used to obtain the target print serial number information based on the print request information;

[0100] The printing fault judgment module 305 is used to determine whether a printing fault has occurred in the printing production cluster based on a preset fault monitoring component.

[0101] The first branch processing module 306 is used to, if no printing failure occurs in the printing production cluster, obtain the first target text recognition result from the cache of the printing production cluster according to the target printing serial number information, and set the first target text recognition result as the printing task result.

[0102] The second branch processing module 307 is used to obtain the second target text recognition result from the cache of the printing disaster recovery cluster according to the target print serial number information if the printing production cluster experiences a printing failure, and set the second target text recognition result as the printing task result.

[0103] The print output module 308 is used to print the print task results onto a target display device based on a preset print output device, thereby completing text printing.

[0104] In some specific embodiments of this application, the text printing device 300 further includes a text recognition result processing module. This module is used to determine whether the text to be printed has a bound text output template; if the text to be printed does not have a bound text output template, it directly uses the data content in the text to be printed as the text recognition result; and if the text to be printed has a bound text output template, it calls the bound text output template, and organizes formatted text data content according to the bound text output template and the data content in the text to be printed, using the formatted text data content as the text recognition result.

[0105] In some specific embodiments of this application, the text printing device 300 further includes a cluster differentiation module. The cluster differentiation module is used to divide the preset printing platform into service clusters according to preset division rules, dividing the printing production cluster and the printing disaster recovery cluster. Specifically, it identifies the service items provided by the printing platform through middleware and sets all middleware-provided service items as service items of the printing production cluster, identifies the local service items provided by the printing platform itself, and sets all local service items as service items of the printing disaster recovery cluster.

[0106] This application identifies the data content in the text to be printed using a preset text recognition technology and obtains the text recognition result; the text recognition result is cached in both the printing production cluster and the printing disaster recovery cluster, and the same printing serial number information is generated and stored during caching, and a printing serial number reference set is constructed; a printing request information is received, wherein the printing request information includes target printing serial number information, which is at least any element in the printing serial number reference set; the target printing serial number information is obtained by parsing the printing request information; a preset fault monitoring component determines whether a printing fault has occurred in the printing production cluster; if no printing fault has occurred in the printing production cluster, the target text recognition result is obtained from the cache of the printing production cluster based on the target printing serial number information; if a printing fault has occurred in the printing production cluster, the target text recognition result is obtained from the cache of the printing disaster recovery cluster based on the target printing serial number information; the target text recognition result is set as the printing task result; and the printing task result is printed to the target display device based on a preset printing output device to complete the text printing. By caching the text recognition results in the printing production cluster and the printing disaster recovery cluster respectively, the printing task results can be set using the printing production cluster when it is in normal operation, and the printing task results can be set using the printing disaster recovery cluster when the printing production cluster is in failure. This improves the disaster recovery capability of the printing platform and can minimize the company's economic losses when dealing with critical business operations that require high real-time performance or a correct response on the first attempt.

[0107] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing related hardware through computer-readable instructions. These computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the methods described above. The aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, optical disk, or read-only memory (ROM), or random access memory (RAM).

[0108] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.

[0109] To address the aforementioned technical problems, embodiments of this application also provide a computer device. Please refer to [link / reference needed]. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.

[0110] The computer device 4 includes a memory 4a, a processor 4b, and a network interface 4c that are interconnected via a system bus. It should be noted that only the computer device 4 with components 4a-4c is shown in the figure; however, it should be understood that it is not required to implement all the shown components, and more or fewer components can be implemented alternatively. Those skilled in the art will understand that the computer device described here is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.

[0111] The computer device can be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer device can interact with the user via a keyboard, mouse, remote control, touchpad, or voice control.

[0112] The memory 4a includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 4a may be an internal storage unit of the computer device 4, such as the hard disk or memory of the computer device 4. In other embodiments, the memory 4a may also be an external storage device of the computer device 4, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device 4. Of course, the memory 4a may also include both the internal storage unit and its external storage device of the computer device 4. In this embodiment, the memory 4a is typically used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions for a text printing method. In addition, the memory 4a can also be used to temporarily store various types of data that have been output or will be output.

[0113] In some embodiments, the processor 4b may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other data processing chip. The processor 4b is typically used to control the overall operation of the computer device 4. In this embodiment, the processor 4b is used to execute computer-readable instructions stored in the memory 4a or to process data, such as executing computer-readable instructions for the text printing method.

[0114] The network interface 4c may include a wireless network interface or a wired network interface, which is typically used to establish communication connections between the computer device 4 and other electronic devices.

[0115] The computer device proposed in this embodiment belongs to the field of financial technology and is applied in the application scenario of printing financial data content. This application identifies the data content in the text to be printed using a preset text recognition technology and obtains the text recognition result; the text recognition result is cached in both the printing production cluster and the printing disaster recovery cluster, and the same printing serial number information is generated during caching, the printing serial number information is stored, and a printing serial number reference set is constructed; a printing request information is received, wherein the printing request information includes target printing serial number information, which is at least any element in the printing serial number reference set; the target printing serial number information is obtained by parsing the printing request information; a preset fault monitoring component determines whether a printing fault has occurred in the printing production cluster; if no printing fault has occurred in the printing production cluster, the target text recognition result is obtained from the cache of the printing production cluster based on the target printing serial number information; if a printing fault has occurred in the printing production cluster, the target text recognition result is obtained from the cache of the printing disaster recovery cluster based on the target printing serial number information; the target text recognition result is set as the printing task result; based on a preset printing output device, the printing task result is printed to the target display device, completing the text printing. By caching the text recognition results in the printing production cluster and the printing disaster recovery cluster respectively, the printing task results can be set using the printing production cluster when it is in normal operation, and the printing task results can be set using the printing disaster recovery cluster when the printing production cluster is in failure. This improves the disaster recovery capability of the printing platform and can minimize the company's economic losses when dealing with critical business operations that require high real-time performance or a correct response on the first attempt.

[0116] This application also provides another embodiment, namely, providing a computer-readable storage medium storing computer-readable instructions that can be executed by a processor to cause the processor to perform the steps of the text printing method described above.

[0117] The computer-readable storage medium proposed in this embodiment belongs to the field of financial technology and is applied in the application scenario of printing financial data content. This application identifies the data content in the text to be printed using a preset text recognition technology and obtains the text recognition result; the text recognition result is cached in both the printing production cluster and the printing disaster recovery cluster, and the same printing serial number information is generated during caching, the printing serial number information is stored, and a printing serial number reference set is constructed; a printing request information is received, wherein the printing request information includes target printing serial number information, which is at least any element in the printing serial number reference set; the target printing serial number information is obtained by parsing the printing request information; a preset fault monitoring component determines whether a printing fault has occurred in the printing production cluster; if no printing fault has occurred in the printing production cluster, the target text recognition result is obtained from the cache of the printing production cluster based on the target printing serial number information; if a printing fault has occurred in the printing production cluster, the target text recognition result is obtained from the cache of the printing disaster recovery cluster based on the target printing serial number information; the target text recognition result is set as the printing task result; based on a preset printing output device, the printing task result is printed to the target display device, completing the text printing. By caching the text recognition results in the printing production cluster and the printing disaster recovery cluster respectively, the printing task results can be set using the printing production cluster when it is in normal operation, and the printing task results can be set using the printing disaster recovery cluster when the printing production cluster is in failure. This improves the disaster recovery capability of the printing platform and can minimize the company's economic losses when dealing with critical business operations that require high real-time performance or a correct response on the first attempt.

[0118] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0119] Obviously, the embodiments described above are only some embodiments of this application, not all embodiments. The accompanying drawings show preferred embodiments of this application, but do not limit the patent scope of this application. This application can be implemented in many different forms; rather, the purpose of providing these embodiments is to provide a more thorough and comprehensive understanding of the disclosure of this application. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing specific embodiments, or make equivalent substitutions for some of the technical features. Any equivalent structures made using the content of this application's specification and drawings, directly or indirectly applied to other related technical fields, are similarly within the scope of patent protection of this application.

Claims

1. A text printing method, characterized in that, Includes the following steps: The system identifies the data content in the text to be printed using a preset character recognition technology and obtains the text recognition results. The text recognition results are cached in both the print production cluster and the print disaster recovery cluster. During caching, identical print serial number information is generated and stored. A print serial number reference set is constructed. Pre-set to use the print production cluster to set print task results under normal conditions, and to use the print disaster recovery cluster to set print task results in case of print production cluster failure. The step of caching the text recognition results in the printing production cluster and the printing disaster recovery cluster respectively, and generating the same printing serial number information during caching, specifically includes: Generate a printable serial number based on the text recognition results; The text recognition result is cached through the caching service provided by the caching middleware in the printing production cluster, and the storage location information of the text recognition result in the caching middleware is recorded. A one-to-one correspondence between the storage location information and the printing serial number information is constructed. The caching middleware includes Redis caching middleware or NAS caching middleware. Based on the local caching service of the print disaster recovery cluster, the text recognition result is cached, and the storage address of the text recognition result in the local cache is recorded, thus establishing a one-to-one correspondence between the storage address and the print serial number information; Receive print request information, wherein the print request information includes target print serial number information; Based on the print request information, obtain the target print serial number information; Based on the preset fault monitoring components, determine whether the printing production cluster has experienced a printing fault; If no printing failure occurs in the printing production cluster, the first target text recognition result is obtained from the cache of the printing production cluster according to the target print serial number information, and the first target text recognition result is set as the print task result. If the printing production cluster experiences a printing failure, the second target text recognition result is obtained from the cache of the printing disaster recovery cluster based on the target print serial number information, and the second target text recognition result is set as the print task result. Based on a preset printing output device, the printing task results are printed onto the target display to complete the text printing.

2. The text printing method according to claim 1, characterized in that, The step of recognizing the data content in the text to be printed according to a preset character recognition technology and obtaining the text recognition result specifically includes: The data content in the text to be printed is identified using OCR text recognition technology; Determine whether the text to be printed exists in a bound text output template; If the text to be printed does not have a bound text output template, the data content in the text to be printed is directly used as the text recognition result; If the text to be printed has a bound text output template, the bound text output template is called, and formatted text data content is generated based on the bound text output template and the data content in the text to be printed. The formatted text data content is then used as the text recognition result.

3. The text printing method according to claim 2, characterized in that, Before performing the step of caching the text recognition results into the print production cluster and the print disaster recovery cluster respectively, and generating the same print serial number information during caching, the method further includes: The preset printing platform is divided into service clusters according to the preset partitioning rules, resulting in a printing production cluster and a printing disaster recovery cluster.

4. The text printing method according to claim 3, characterized in that, The step of calling the bound text output template and organizing the formatted text data content according to the bound text output template and the data content in the text to be printed specifically includes: According to the transmission middleware in the printing production cluster, the bound text output template and the data content in the text to be printed are read asynchronously, and formatted text data content is generated according to the bound text output template and the data content in the text to be printed. The transmission middleware is an MQ transmission middleware; or According to the multi-threaded processing method in the print disaster recovery cluster, the bound text output template and the data content in the text to be printed are read asynchronously, and formatted text data content is generated according to the bound text output template and the data content in the text to be printed.

5. The text printing method according to any one of claims 1 to 4, characterized in that, The step of determining whether a printing failure has occurred in the printing production cluster based on a preset fault monitoring component specifically includes: Obtain the service performance monitoring results for all middleware in the printing production cluster; If the service performance monitoring results identify that there is a middleware in the printing production cluster that is experiencing service anomalies or is unable to provide corresponding services, then the printing production cluster will experience a printing failure. If the service performance monitoring results indicate that all middleware in the printing production cluster can provide the corresponding services normally, then the printing production cluster has not experienced any printing failures.

6. The text printing method according to claim 3, characterized in that, The step of obtaining the first target text recognition result from the cache of the printing production cluster based on the target print serial number information specifically includes: Based on the one-to-one correspondence between the printed serial number information and the storage location information in the cache middleware, the storage location information corresponding to the target printed serial number information in the target cache middleware is identified. The first target text recognition result is obtained from the target cache middleware by using the storage location information corresponding to the target print serial number information in the target cache middleware.

7. The text printing method according to claim 3, characterized in that, The step of obtaining the second target text recognition result from the cache of the printing disaster recovery cluster based on the target print serial number information specifically includes: Based on the one-to-one correspondence between the printed serial number information and the storage address in the local cache, the storage address of the target printed serial number information in the local cache is identified; The second target text recognition result is obtained from the local cache by using the storage address of the target printed serial number information in the local cache.

8. A text printing device, characterized in that, The text printing device implements the steps of the text printing method as described in any one of claims 1 to 7, wherein the text printing device comprises: The text recognition and acquisition module is used to recognize the data content in the text to be printed according to the preset text recognition technology and obtain the text recognition result; The distinguishing caching module is used to cache the text recognition results in the printing production cluster and the printing disaster recovery cluster respectively. When caching, the same printing serial number information is generated, the printing serial number information is stored, and a printing serial number reference set is constructed. A print request receiving module is used to receive print request information, wherein the print request information includes target print serial number information; The print request parsing module is used to obtain the target print serial number information based on the print request information; The printing fault detection module is used to determine whether a printing fault has occurred in the printing production cluster based on a preset fault monitoring component. The first branch processing module is used to, if no printing failure occurs in the printing production cluster, obtain the first target text recognition result from the cache of the printing production cluster according to the target printing serial number information, and set the first target text recognition result as the printing task result. The second branch processing module is used to obtain the second target text recognition result from the cache of the printing disaster recovery cluster according to the target print serial number information if the printing production cluster experiences a printing failure, and set the second target text recognition result as the printing task result. The printing output module is used to print the printing task results onto the target display based on a preset printing output device, thereby completing text printing.

9. A computer device comprising a memory and a processor, the memory storing computer-readable instructions, wherein the processor, when executing the computer-readable instructions, implements the steps of the text printing method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the text printing method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Distributed print processing system

    JP1998340164A