System and method for translating first encoded language to second encoded language
By training a natural language model to iteratively convert COBOL code into a modern language, the efficiency and accuracy issues of modernizing traditional programming languages are solved, achieving an efficient and low-risk conversion process.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- THE BANK OF NEW YORK MELLON
- Filing Date
- 2024-07-31
- Publication Date
- 2026-05-05
AI Technical Summary
Existing technologies are insufficient for efficiently modernizing traditional programming languages such as COBOL into modern programming languages. Manual conversion is prone to errors, consumes a lot of resources, and carries high risks due to a lack of expert knowledge.
By training machine learning models, COBOL code can be iteratively converted into modern languages such as Java, Golang, Python, or C++ using Natural Language Models (NLM), and processing efficiency can be optimized through test-driven development and containerized microservice architecture.
It achieves efficient and accurate programming language conversion, reduces the risks and resource consumption of modernizing traditional systems, and improves processing efficiency and consistency.
Smart Images

Figure CN121986323A_ABST
Abstract
Description
[0001] Cross-reference to related applications
[0002] This application claims priority to U.S. Provisional Application No. 63 / 531,189, filed August 7, 2023, the entire contents of which are incorporated herein by reference. Background Technology
[0003] Mainframe systems have been used in the financial industry for decades, and general-purpose business-oriented languages (often referred to as COBOL) have been the dominant programming language since the 1960s. Thanks to decades of development and technological advancements, both mainframes and COBOL have become indispensable parts of business functions, providing efficient daytime and nighttime processing operations. However, with the advent of distributed systems, modern programming languages, and public cloud services, subject matter experts within both mainframe technology and COBOL are becoming increasingly difficult to find, and for many large organizations, core institutional knowledge of existing implementations and business logic is rapidly diminishing.
[0004] Current mainframe modernization techniques typically involve manually analyzing COBOL code and rewriting it individually into a modern code language. This can be error-prone and resource-intensive in terms of the subject matter expertise and time required to achieve an acceptable transformation / outcome.
[0005] Despite decades of development in machine learning (ML) and artificial intelligence (AI), existing technological systems struggle to produce meaningful results and sufficient accuracy in interpreting programming languages, converting them into different programming languages, and achieving processing parity.
[0006] Therefore, there is a need for systems and methods that can modernize COBOL (and other computer languages) applications and their business logic in a programmatic manner into modern programming languages and optimize processing efficiency so that large organizations can reduce the risks associated with operating core business functions on traditional systems. Summary of the Invention
[0007] This disclosure relates to methods, apparatus, and / or systems for translating a first coded language into a second coded language.
[0008] In some aspects, the techniques described herein relate to a method for translating a first encoded language into a second encoded language, comprising: training a first machine learning (ML) model, at least partially by a processor, on a first encoded language-specific dataset associated with the first encoded language, wherein the first ML model is trained to translate one or more code sets of the first encoded language into corresponding one or more code sets of the second encoded language; generating at least one unit test case by the processor using the first ML model, wherein the at least one unit test case runs one or more code sets of the second encoded language in parallel with one or more code sets of the first encoded language; iteratively testing and refining the first ML model, at least partially based on a maturity level of the first ML model, until a maturity threshold is reached; and, upon reaching the maturity threshold, containerizing one or more code sets of the second encoded language into an application by the processor.
[0009] In some respects, the techniques described herein relate to a method in which a first-encoding-language-specific dataset includes one or more of the following: at least one language reference document, library, historical input file, historical output file, runtime log, parameter set, or control point associated with the first-encoding-language.
[0010] In some respects, the techniques described in this paper involve a method in which the first coding language is a general business-oriented language (COBOL).
[0011] In some respects, the techniques described in this paper involve a method in which the second encoding language is one of Java, Golang, Python, Angular, or C++.
[0012] In some respects, the techniques described in this paper involve a method in which the first machine learning model is a natural language model (NLM).
[0013] In some respects, the techniques described herein relate to a method in which iteratively testing a first ML model comprises: performing multiple iterative regression tests based on historical input data from at least one code set in one or more code sets of a first coding language, and comparing corresponding output data of the first ML model with historical outputs from said at least one code set in one or more code sets of the first coding language.
[0014] In some respects, the techniques described herein relate to a method in which iteratively refining a first ML model includes: executing one or more debugging techniques by a processor; and updating the first ML model based on one or more executed debugging techniques.
[0015] In some respects, the techniques described herein relate to a method that also includes: dynamically scaling one or more containerized applications by a processor based at least in part on one or more of the following: a second ML model that has reached a maturity threshold or at least one second unit test case.
[0016] In some respects, the techniques described herein relate to a method that also includes: having a processor track the progress of at least one test case based at least in part on the maturity of a first ML model.
[0017] In some aspects, the technology described herein relates to a system for translating a first encoded language into a second encoded language, comprising: a computer having a processor and a memory; one or more code sets stored in the memory and executed by the processor, wherein the one or more code sets, when executed, configure the processor to: train a first machine learning (ML) model at least partially on a first encoded language-specific dataset associated with the first encoded language, wherein the first ML model is trained to translate one or more code sets of the first encoded language into corresponding one or more code sets of the second encoded language; generate at least one unit test case using the first ML model, wherein the at least one unit test case runs one or more code sets of the second encoded language in parallel with one or more code sets of the first encoded language; iteratively test and refine the first ML model, at least partially based on a maturity level of the first ML model, until a maturity threshold is reached; and, upon reaching the maturity threshold, containerize one or more code sets of the second encoded language into an application.
[0018] In some respects, the techniques described herein relate to a system in which a first-encoding-language-specific dataset includes one or more of the following: at least one language reference document, library, historical input file, historical output file, runtime log, parameter set, or control point associated with the first-encoding-language.
[0019] In some respects, the technology described in this paper relates to a system in which the first coding language is a general business-oriented language (COBOL).
[0020] In some respects, the technology described in this paper relates to a system in which the second encoding language is one of Java, Golang, Python, Angular, or C++.
[0021] In some respects, the techniques described in this paper relate to a system in which the first machine learning model is a natural language model (NLM).
[0022] In some respects, the technique described herein relates to a system in which, when a first ML model is iteratively tested, the processor is further configured to: perform multiple iterative regression tests based on historical input data from at least one code set in one or more code sets of a first coding language, and compare corresponding output data of the first ML model with the historical output of said at least one code set in one or more code sets of the first coding language.
[0023] In some respects, the techniques described herein relate to a system in which, while iteratively refining a first ML model, the processor is also configured to: execute one or more debugging techniques; and update the first ML model based on one or more executed debugging techniques.
[0024] In some respects, the technology described herein relates to a system in which a processor is also configured to dynamically scale one or more containerized applications based at least in part on one or more of the following: a second ML model that has reached a maturity threshold or at least one second unit test case.
[0025] In some respects, the technology described herein relates to a system in which the processor is also configured to: track the progress of at least one test case based at least in part on the maturity of a first ML model.
[0026] In some aspects, the techniques described herein relate to a non-transitory computer-readable medium storing computer program instructions that, when executed by one or more processors, cause one or more processors to perform operations including: training a first machine learning (ML) model, at least in part, on a first coding language-specific dataset associated with a first coding language, wherein the first ML model is trained to translate one or more code sets of the first coding language into corresponding one or more code sets of a second coding language; generating at least one unit test case using the first ML model, wherein the at least one unit test case runs one or more code sets of the second coding language in parallel with one or more code sets of the first coding language; iteratively testing and refining the first ML model, at least in part, based on a maturity level of the first ML model, until a maturity threshold is reached; and, upon reaching the maturity threshold, containerizing one or more code sets of the second coding language into an application.
[0027] In some respects, the techniques described herein relate to a non-transitory computer-readable medium, wherein the first encoding language is a general business-oriented language (COBOL), and wherein the second encoding language is one of Java, Golang, Python, Angular, or C++.
[0028] Various other aspects, features, and advantages will become apparent from the detailed description and accompanying drawings. It should also be understood that the foregoing general description and the following detailed description are exemplary and not intended to limit the scope of this disclosure. Attached Figure Description
[0029] Figure 1 An illustrative system for translating a first encoded language into a second encoded language, according to at least one embodiment, is described;
[0030] Figure 2 An example code translation application according to at least one embodiment is shown;
[0031] Figure 3 An example method for translating a first encoded language into a second encoded language, according to at least one embodiment, is described;
[0032] Figure 4 Examples of popular summaries based on code sets, according to some embodiments, are shown; and
[0033] Figure 5 Examples of traditional code sets and translated modern code sets according to some embodiments are shown.
[0034] Although this technology is readily available in various modifications and alternatives, specific embodiments thereof are illustrated by way of example in the accompanying drawings and will be described in detail herein. The drawings may not be drawn to scale. However, it should be understood that the drawings and their detailed description are not intended to limit the technology to the specific forms disclosed, but rather are intended to cover all modifications, equivalents, and alternatives falling within the spirit and scope of the technology as defined by the appended claims. Detailed Implementation
[0035] In the following description, numerous specific details are set forth for purposes of explanation to provide a thorough understanding of various embodiments. However, those skilled in the art will understand that embodiments may be practiced without these specific details or with equivalent arrangements. In other instances, well-known structures and devices are illustrated in block diagram form to avoid unnecessarily obscuring embodiments of the invention.
[0036] The systems and methods described herein can be implemented in numerous practical applications. For example, the advantages of using machine learning models to translate mainframe code into modern code and / or microservices, as described herein, are also applicable to other environments, system configurations, and sets of programming languages. For instance, while the systems and methods described herein generally refer to translating the COBOL language into other computer programming languages such as Java, those skilled in the art will understand that the same or similar techniques can be used to achieve translation between any two computer programming languages.
[0037] To alleviate the problems described herein, the inventors must propose solutions, and in some cases, it is equally important to recognize problems in the identification, assessment, and repair of disruptions that have been overlooked (or not yet foreseen) by others. In fact, the inventors intend to emphasize the difficulty of recognizing those emerging problems that will become more apparent in the future, should industry trends continue as the inventors anticipate. Furthermore, because multiple problems are addressed, it should be understood that some embodiments are problem-specific, and not all embodiments solve every problem of the conventional systems described herein or provide every benefit described herein. That is, improvements to various permutations of solutions to these problems are described below.
[0038] The embodiments use ML / AI tools to train a code (e.g., COBOL) translation model based on historical processing datasets and use parallel runtime processing channels to compare input / output data. Embodiments of the systems and methods described herein provide a technical solution for accurately translating code from one computer language to another (e.g., from COBOL to Java) and iteratively ensuring consistent data quality and processing. Further embodiments provide a containerized microservice architecture that achieves processing efficiency and scalability in terms of performance and resource consumption.
[0039] As used in this article, a mainframe computer (informally referred to as a mainframe or a behemoth) is a computer primarily used by large organizations for core applications, such as big data processing for tasks like census, industry and consumer statistics, enterprise resource planning, and large-scale transaction processing. The term mainframe originates from the large cabinets that housed the central processing unit and main memory of early computers, known as the main frame.
[0040] COBOL (Common Business Oriented Language) is a programming language for mainframe computing. It is a compiled, English-like programming language designed for business applications. It is an imperative, procedural language, and since 2002, it has also been an object-oriented language. COBOL is widely used in applications deployed on mainframes, such as large-scale batch and transaction processing jobs.
[0041] As used in this article, machine learning is a subfield of artificial intelligence that focuses on systems that can acquire their own “knowledge” by extracting patterns from raw data rather than hard-coding that knowledge.
[0042] As used in this article, artificial intelligence (AI) is the intelligence exhibited by machines—the ability to perceive, synthesize, and / or infer information—rather than the intelligence exhibited by non-human animals or humans. Example tasks that do this include speech recognition, computer vision, translation between (natural) languages, and other input mappings.
[0043] As used in this article, microservice architecture (“microservices”) is a variation of the service-oriented architectural style. It is an architectural pattern that arranges an application as a collection of loosely coupled, fine-grained services that communicate via lightweight protocols.
[0044] As used in this article, Test-Driven Development (TTD) is a software development process that relies on translating software requirements into test cases before the software is fully developed and then tracking all software development by iteratively testing the software against all test cases.
[0045] Those skilled in the art will understand that the inventive concepts described herein are applicable to a variety of system configurations. Furthermore, various embodiments of this disclosure can be implemented in hardware, firmware, software, or any suitable combination thereof. Some aspects of this disclosure can also be implemented as instructions stored on a machine-readable medium that can be read and executed by one or more processors. The machine-readable medium can include any mechanism (e.g., a computing device or signal transmission medium) that stores or transmits information in a machine-readable form, and can include machine-readable transmission media or machine-readable storage media. For example, a machine-readable storage medium can include read-only memory, random access memory, disk storage media, optical storage media, flash memory devices, etc. Moreover, the firmware, software, routines, or instructions may be described herein in the form of specific exemplary embodiments capable of performing certain actions. However, it will be apparent that this description is merely for convenience, and that such actions are actually produced by a computing device, processor, controller, or other device executing the firmware, software, routines, or instructions.
[0046] As described in more detail herein, to generate an accurate COBOL-to-modern language translation natural language model (NLM), a foundational COBOL language knowledge set can be constructed. This information can be based on various COBOL language reference documents, examples, code, and / or other sources. Similarly, a foundational knowledge set for the target modern language can be constructed. Once the foundational language knowledge set has been established, the NLM can process raw mainframe COBOL code, their libraries, and / or any other documentation and structures. This phase of ML training allows each NLM to be exposed to specific COBOL applications and relevant datasets to build its own understanding of functionality and logic. In some embodiments, as described herein, to test the maturity of the NLM, it can be queried to produce a popular summary of the application, functionality, and / or specific parts of its logic. This phase can be beneficial for documenting institutional knowledge and laying the foundation for version-controlled code enhancement.
[0047] It should be noted that, in addition to and / or as an alternative to NLM, other types of models capable of handling large datasets can be used in various embodiments. For example, Large Language Models (LLMs) are machine learning models characterized by massive numbers of parameters and requiring significant computational resources for training and inference. These models are typically designed to handle complex and high-dimensional data, enabling them to capture complex patterns and relationships within the data. LLMs are often based on deep learning architectures such as deep neural networks, convolutional neural networks (CNNs), or Transformer models. Other models can include, for example, rule-based Natural Language Processing (NLP) systems, template-based systems, bag-of-words algorithms, N-Gram models, Latent Semantic Analysis (LSA) models, etc. These complementary / alternative solutions to natural language models have their specific use cases and limitations. Therefore, in various embodiments, the systems and methods described herein can be configured to implement various models to achieve different results based on the requested translation.
[0048] In the next phase of NLM training, examples include, for instance, progressively translating COBOL code into a modern language such as Java, Golang, or Angular. In some embodiments, the system can be configured to recommend the best modern language based on anticipated use cases and architectural requirements or other criteria. For example, if the anticipated use cases include mobile devices (e.g., Apple® or Android®), the system can be configured to translate a first coding language into the most suitable second coding language based on its capabilities, performance, environment, and / or experience. In some embodiments, as part of the initial transformation, NLM can be instructed to generate unit test cases to follow a test-driven development approach. This approach can help build progressively accurate outputs of the data processed by the translated code. In various embodiments, the translated modern code can undergo rigorous regression testing, for example, based on historical input data and by comparing the output data with the output of the original COBOL code. The translated code may include additional (or similar) logging, parameters, and / or control points to be used by NLM to debug any discrepancies in the output dataset. Progressive debugging and refinement of the translated modern code can produce output data processing fidelity at both the granular and functional module levels.
[0049] In some embodiments, once the modernization code has reached high fidelity (e.g., based on a predetermined threshold or testing), a pre-production parallel environment can be established to allow simultaneous processing of production input data. Two channels can be designed to record intermediate data points, variables, values, etc., which, in some embodiments, can be used for post-processing to enhance debugging. Parallel execution can produce multiple (e.g., two) output data / results, wherein these multiple output data / results can be coordinated and any discrepancies can be identified. In some embodiments, the NLM can be continuously enhanced while the modernization code is continuously updated to achieve threshold consistency (e.g., 100% consistency) until the output data / results are identical or sufficiently similar to reach a predefined similarity threshold. In some embodiments, the enhanced modernization code can also be retested on historical data to ensure reasonable backward compatibility and processing results.
[0050] In some embodiments, once the modernized code achieves acceptable data accuracy and performance (e.g., based on predefined thresholds), it can be further segmented into microservice code. The functionality of the modernized code and / or its sub-parts can be measured based on frequency and runtime duration. Various logging, parameters, and / or variables can be deployed to measure and track usage. This information can be collected into a separate performance database to record and analyze operational metric trends.
[0051] In some embodiments, as part of developing modern code and data processing flows, the systems and methods described herein can determine whether input data is processed serially / sequentially, rather than using indexable values. The anticipated modern processing logic can then determine whether modernized microservice functionality can be horizontally scaled (e.g., multithreaded) and / or have increased resource capacity, thereby enabling optimized processing service level agreements (SLAs).
[0052] In some embodiments, the performance database can also be configured to record data volume, transactions, size, and / or processing speed, enabling horizontal and / or dynamic scaling of multiple (e.g., each) layers of modernized code and / or microservice code for each stage of daytime or nighttime processing, based on known transaction volumes from the upstream system and anticipated upcoming transaction volumes. Additionally, dynamic scaling can calculate and determine the additional resources required to meet upcoming SLAs and proactively allocate additional resources as needed. These and other features are described in detail herein.
[0053] Figure 1 An illustrative system for translating a first encoded language into a second encoded language, according to at least one embodiment, is described. For example... Figure 1As shown, system 100 may include user equipment 122, user equipment 124, mainframe 160, and / or other components. Each user equipment and / or mainframe 160 may include any type of mobile terminal, fixed terminal, or other device. Each of these devices may receive content and data via an input / output (hereinafter referred to as "I / O") path and may also include a processor and / or control circuitry to send and receive commands, requests, and other suitable data using the I / O path. The control circuitry may include any suitable processing circuitry. Each of these devices may also include a user input interface and / or display for receiving and displaying data. For example, user equipment 122 and / or user equipment 124 may be any computer or computing device including a processor (e.g., processor 112), including but not limited to laptop computers, tablet computers, handheld computers / computing devices, other computer devices (e.g., servers), including "smart," wireless, wearable, and / or mobile devices. Processor 112 may include one or more of the following: a digital processor, an analog processor, digital circuitry designed to process information, analog circuitry designed to process information, a state machine, and / or other mechanisms for electronically processing information. Although processor 112 is Figure 1 The processor 112 is shown as a single entity, but this is for illustrative purposes only. In some embodiments, the processor 112 may include multiple processing units. These processing units may be physically located within the same device, or the processor 112 may represent the processing functions of multiple devices operating in cooperation.
[0054] Processor 112 can be configured to execute or implement code translation application 114 via the following (e.g.) Figure 2 One or more features (as detailed shown): software; hardware; firmware; a combination of software, hardware, and / or firmware; and / or other mechanisms for configuring the processing capabilities on processor 112. It should be understood that, although Figure 2The features of the code translation application 114 shown below are commonly located within the user device 124, but one or more components or features of the code translation application 114 may be located remotely from other components or features. The following description of the functionality provided by the different components or features of the code translation application 114 is for illustrative purposes only and is not intended to be limiting, as any component or feature of the code translation application 114 may provide more or less functionality than described, and this does not mean that the other descriptions are limiting. For example, one or more components or features of the code translation application 114 may be removed, and some or all of their functionality may be provided by other components or features of the code translation application 114, but this does not mean that the other descriptions are limiting. For example, the processor 112 may include one or more additional components that can perform some or all of the functionality attributed to one of the components or features of the code translation application 114 below.
[0055] In some embodiments, processor 112 may be programmed to execute one or more computer program components. The computer program components or features may include software programs and / or algorithms encoded and / or otherwise embedded in processor 112. One or more computer program components or features may include features of code translation application 114.
[0056] Users can, for example, utilize one or more user devices to interact with each other, with one or more servers, or with other components of system 100. It should be noted that while one or more operations are described herein as being performed by a specific component of system 100, in some embodiments, these operations may be performed by other components of system 100. As an example, while one or more operations are described herein as being performed by components of user device 124 (including processor 112), in some embodiments, those operations may be performed by components of user device 122 and / or mainframe 160. System 100 may also include a cloud-based component 110, including a cloud server 102, which may have services implemented on user device 122, user device 124, or mainframe 160 and / or accessible via communication paths 128, 130, 132, 134, or 136, respectively. Conversely, user equipment 122, user equipment 124, and / or mainframe 160 can access cloud-based component 110 via communication paths 128, 130, 132, 134, and / or 136. System 100 can receive data from remote servers (e.g., server 108) and / or databases (e.g., databases 104, 106). It should also be noted that... Figure 1The cloud-based components may alternatively and / or additionally be non-cloud-based components. Alternatively or additionally, one or more components may be combined, replaced, and / or changed. For example, system 100 may include databases 104 and 106 and server 108 capable of providing data to cloud server 102.
[0057] System 100 may also include a dedicated network server (e.g., network server 150) capable of acting as a network gateway, router, and / or switch. Network server 150 may additionally or alternatively include one or more components of cloud-based components 110 for translating a first encoding language into a second encoding language. Network server 150 may include network hardware for allowing data to flow from one discrete domain to another. Network server 150 may use more than one protocol to connect multiple networks and / or domains (instead of routers or switches) and may operate at any of the seven layers of the Open Systems Interconnection (OSI) model. It should also be noted that the functionality and / or features of network server 150 may be incorporated into one or more other components of system 100, and the functionality and / or features of system 100 may be incorporated into network server 150.
[0058] System 100 may also include a mainframe (e.g., mainframe 160). As described herein, a mainframe is a high-performance, large-scale computer system designed to handle massive workloads and process large amounts of data simultaneously. It typically serves as a central backbone for core applications and services in industries such as banking, finance, government, and large enterprise environments. Mainframes typically use a symmetric multiprocessing (SMP) architecture, where multiple processors work in parallel to execute instructions. They also employ dedicated hardware components such as channel subsystems, I / O processors, and channel pathways to efficiently manage input / output operations. Mainframes are primarily used by large organizations for core applications such as big data processing for tasks such as census, industry and consumer statistics, enterprise resource planning, and large-scale transaction processing. Mainframes are used as record-keeping systems for many organizations. Batch and online transactions processed by mainframes are typically handled by core systems (both online and offline core systems of the mainframe) for day-to-day business processes and transactions. Mainframe 160 can run enterprise software that may be difficult to integrate directly with other modern computer code (e.g., modern computer code running in a distributed environment, such as Java) and / or other computer operating system code such as COBOL (collectively referred to as legacy code set 116). Therefore, embodiments can enable the translation of a first encoding language into a second encoding language, as described herein.
[0059] Server 108 can run modern computer code (e.g., Java) that can be programmed to run in a distributed environment, such as modern code set 118. Databases 104 and 106 can contain coding language-specific datasets 144 and 146, respectively. As detailed herein, embodiments can be used to train one or more machine learning and / or AI models, at least in part, based on various coding language-specific datasets.
[0060] Each device in System 100 may also include a memory in the form of an electronic storage device. An electronic storage device may include a non-transitory storage medium that stores information electronically. An electronic storage device may include (i) a system storage device integrally (e.g., substantially non-removable) with a server or client device and / or (ii) a removable storage device detachably connected to a server or client device via, for example, a port (e.g., a USB port, a FireWire port, etc.) or a drive (e.g., a disk drive, etc.). Electronic storage devices may include optically readable storage media (e.g., optical discs, etc.), magnetically readable storage media (e.g., magnetic tape, magnetic hard disk drives, floppy disk drives, etc.), charge-based storage media (e.g., EEPROM, RAM, etc.), solid-state storage media (e.g., flash drives, etc.), and / or other electronically readable storage media. Electronic storage devices may include virtual storage resources (e.g., cloud storage devices, virtual private networks, and / or other virtual storage resources). Electronic storage devices may store software algorithms, information determined by a processor, information obtained from a server, information obtained from a client device, or other information that implements the functions described herein.
[0061] Figure 1 It may also include communication paths 128, 130, 132, 134, and / or 136. Communication paths 128, 130, 132, 134, and / or 136 may include the Internet, mobile phone networks, mobile voice or data networks (e.g., 5G or LTE networks), wired networks, public switched telephone networks, or other types of communication networks or combinations of communication networks. Communication paths 128, 130, 132, 134, and / or 136 may include one or more communication paths, such as satellite paths, fiber optic paths, cable paths, paths supporting Internet communication (e.g., IPTV), free-space connections (e.g., for broadcasting or other wireless signals), or any other suitable wired or wireless communication path or combinations of such paths. The computing device may include additional communication paths linking multiple hardware, software, and / or firmware components that operate together. For example, the computing device may be implemented by a computing platform cloud that operates together as a computing device.
[0062] Figure 2An example code translation application according to at least one embodiment is shown, such as code translation application 114 of user device 124. Figure 1 In some embodiments, the code translation application 114 may include components such as historical input / output data 202, runtime logs / parameter control 204, AI / ML training model 206, test case module 208, comparison / refinement module 210, and / or granularization module 212. While these components are shown as being included in the user device 124, in various embodiments, one or more of these components may reside on other elements of the system 100 and / or be accessible via other elements of the system 100. In some embodiments, input / output data 202 may be historical data input as prompts into the code translation application 114 and / or historical data output as results from the code translation application 114. Input may include prompts and / or other codes input into the system to elicit a response from the system. In some embodiments, runtime logs / parameter control 204 may include various details and information about legacy code (e.g., legacy code set 116) and / or about modernized code (e.g., modernized code set 118), including runtime information, metadata, settings, and other parameters associated with various code sets. This information can be analyzed, or used in other ways to extract additional information about various code sets, thereby improving training, etc.
[0063] In some embodiments, the AI / ML training model 206 may represent one or more training models developed using AI and / or ML technologies and / or tools. For example, in some embodiments, the AI / ML training model 206 may be one or more natural language models (NLMs) capable of being trained to accurately generate new modern code based on old legacy code, as described herein. In some embodiments, the test case module 208 may implement test-driven development (TDD) on the newly generated software code. Thus, the test case module 208 may transform predefined software requirements into test cases before the software is fully developed, and / or may track software development by iteratively testing the software against other (e.g., all) test cases. A threshold may be set to define an initial fidelity level for the generated code. The test case module 208 may then detect when the generated code reaches the threshold and, for example, send an alert to the user of user device 124.
[0064] In some embodiments, the comparison / refinement module 210 may be configured to enable the code translation application 114 to refine the generated code for production use. As described herein, once the modernized code has reached a threshold fidelity, embodiments may be configured to run the modernized code as pre-production code in parallel with the production input code. The results of each code set may be compared, and the pre-production code may be iteratively refined, e.g., until it is ready for production (e.g., until the translated modernized code can replace the legacy code). In some embodiments, a granularization module 212 may then be implemented to granulate a subset of the modernized code into one or more containerized applications or programs (hereinafter referred to as “microservices”). Additionally or alternatively, the granularization module 212 may enable the code translation application 114 to scale the modernized code horizontally and / or vertically, as described herein. These and other features are described in more detail herein.
[0065] Figure 3 An example method 300 for translating a first encoded language into a second encoded language according to at least one embodiment is described. In various embodiments, method 300 may be implemented by system 100 to execute code in one or more processors in the system. For example, in some embodiments, method 300 may be executed on a computer (e.g., user device 124) having one or more processors and memory (not shown), and one or more code sets, applications, programs, modules, and / or other software (e.g., such as...) Figure 2 The code translation application (as shown in 114) is stored in this memory and executed in the processor or by the processor.
[0066] Method 300 begins at step 310, where the processor is configured to train a first machine learning (ML) model, at least in part, based on a first coding language-specific dataset associated with the first coding language. To generate an accurate natural language model (NLM) for a legacy code set (e.g., COBOL), embodiments train or otherwise access a legacy language knowledge set. This information may be based on various language reference documents, samples, examples, code, and / or other sources (e.g., internal and / or external databases and resources), historical input files, historical output files, runtime logs, parameter sets, and / or control points associated with the first coding language. Similarly, in some embodiments, the processor may be configured to train a second ML model using a modernized language knowledge set of the target modernized language (e.g., Java, Golang, Python, Angular, and / or C++, etc.). In some embodiments, developing separate models for each language can also enhance translation between coding languages, for example, enabling back-translation to test accuracy, parallel execution for comparison purposes, etc.
[0067] In some embodiments, before processing the first coding language into a first ML model, any variables, subfunctions, and / or any other source code (e.g., dead code and / or unreachable code) that are not required or need to be referenced in the programming can be excluded and / or commented out. Similarly, in some embodiments, before processing the second coding language into a second ML model, any variables, subfunctions, and / or any other source code (e.g., dead code and / or unreachable code) that are not required or need to be referenced in the programming can be excluded and / or commented out.
[0068] In some embodiments, any source code may be merged and / or all relevant copies, libraries, header files, etc., referenced in the source code may be expanded before the first encoding language is processed into the first ML model. Similarly, in some embodiments, any source code may be merged and / or all relevant copies, libraries, header files, etc., referenced in the source code may be expanded before the second encoding language is processed into the second ML model.
[0069] In various embodiments, one or more of a variety of machine learning and / or AI techniques may be used to train the ML model. For example, embodiments may train one or more word embeddings based on language-specific data, for example, by using existing tools (e.g., algorithms that learn word embeddings by predicting context words based on a target word (Continuous Bag-of-Words, CBOW) or by predicting a target word based on its context (Skip-gram); unsupervised learning algorithms that combine global matrix factorization techniques with local context window-based methods to learn word embeddings; algorithms that use sub-word information (character n-gram) to handle out-of-vocabulary words; etc.). As understood herein, word embeddings are a collective term in Natural Language Processing (NLP) for a set of language modeling and feature learning techniques in which words or phrases from a given vocabulary are mapped to vectors of real numbers. Conceptually, this involves mathematical embeddings from a one-dimensional space for each word to a continuous vector space with much lower dimensions. In some embodiments, one or more of these NLP techniques may be implemented to create word embeddings that can inform the ML model of method 300. Those skilled in the art will recognize that many different ML / AI training tools can be used to train ML models. For example, in various embodiments, sentiment analysis, named entity recognition, generalization, topic modeling, text classification, keyword extraction, lemmatization and stemming, and / or one or more of other NLP, ML and / or AI techniques can be applied to train the ML model.
[0070] In some embodiments, once a base language knowledge set has been established for a given language, the processor can enable the NLM to process the first coding language (e.g., a legacy code set such as mainframe COBOL code), their libraries, and any other documentation and structures. This phase of ML training can allow the NLM to be exposed to specific legacy applications (e.g., the COBOL code set) and related datasets to build its own understanding of the functionality and logic of the legacy code set. In some embodiments, to test the maturity of the NLM (e.g., relative to a predefined maturity threshold), the processor can be configured to generate or otherwise produce popular summaries of specific parts of the legacy code set (e.g., COBOL applications), including, for example, functions, logic, etc. This process can be beneficial for archiving institutional knowledge and lay the foundation for version-controlled code enhancement. Figure 4 Example 400 of a popular summary 410 based on COBOL code set 420 is shown.
[0071] At step 320, in some embodiments, the processor may translate one or more code sets of a first encoding language into one or more code sets of a second encoding language. For example, in some embodiments, the processor may be configured to receive or retrieve a legacy code set (e.g., a COBOL code set) and translate the legacy code set into a modern code set (e.g., Java, Go-lang, Angular, etc.) by employing one or more ML models. As previously described, embodiments may employ one or more AI / ML trained models to identify text, functions, logic, and other information from the first code set and translate the first code set into a second code set with the aim of making the newly generated code set as similar as possible to the original code set in function and logic. In some embodiments, the processor may be configured to perform a gradual and / or iterative transformation of the legacy code set into a modern encoding language and monitor the process, as described herein. Figure 5 Example 500 shows a conventional code set 510 and a translated modern code set 520 according to some embodiments.
[0072] At step 330, in some embodiments, the processor may use a first ML model to generate at least one unit test case. As part of the translation / conversion process, in some embodiments, the processor may employ NLM to generate one or more unit test cases in accordance with a test-driven development approach. This approach can help build progressive and accurate outputs of data processed by the translated code. In some embodiments, the translated modernized code may undergo rigorous testing, including regression testing based on historical input data and comparing the output data with the output of the original code set.
[0073] In some embodiments, the processor may track the progress of at least one test case based at least in part on the maturity level of a first ML model. Various metrics related to, for example, processing time, processing power usage, processing efficiency, output accuracy, memory consumption, etc., may be tracked and compared to predefined thresholds. In some embodiments, the translated model may include additional logging, parameters, and control points and / or similar logging, parameters, and control points as a legacy model, and the processor may utilize NLM to debug any discrepancies in the output dataset. Progressive debugging and refinement of the translated modern code can produce output data processing fidelity at both the granular and functional levels.
[0074] At step 340, in some embodiments, the processor may run one or more code sets of a second coding language in parallel with one or more code sets of a first coding language. In some embodiments, once the modernized code set has reached a high fidelity, for example, relative to one or more predefined thresholds, the processor may execute or otherwise establish a pre-production parallel environment to allow processing in parallel with production input data. By analyzing the output of the legacy code set (in the production environment) and its translated modernized code set (in the pre-production environment) in parallel and substantially in real time, the system may be able to identify and / or resolve problems in the translated code set and further modify the corresponding training model. In some embodiments, the two channels may be designed to record intermediate data points, variables, values, etc., which can be used for post-processing to enhance debugging. In some embodiments, a user interface may be provided that displays the two code sets running in parallel and provides the user with the ability to edit (e.g., in real time) the pre-production code, thereby providing input, correction, or otherwise marking errors or problems to be addressed (in the code and / or in the ML model).
[0075] At step 350, in some embodiments, the processor may iteratively test and refine the first ML model, at least in part, based on its maturity level, until a maturity threshold is reached. In some embodiments, the processor may perform multiple iterative regression tests on a new translated and modernized codebase running in a pre-production environment based on historical input data from at least one codebase in one or more codebases of the first coding language (e.g., COBOL), and compare the corresponding output data of the first ML model with the historical output of the at least one codebase in one or more codebases of the first coding language.
[0076] In some embodiments, the processor may execute one or more debugging techniques and update the first ML model based on one or more executed debugging techniques. In some embodiments, parallel execution may produce corresponding output data / result sets, wherein these corresponding output data / result sets may be reconciled and any discrepancies may be identified. In some embodiments, the NLM may be continuously enhanced and the modernized code set may be continuously updated to achieve, for example, 100% consistency (or predefined consistency / accuracy) until the output data / results are identical or within a predefined error margin. In some embodiments, the enhanced modernized code may be retested on historical data, for example, periodically or regularly, to ensure reasonable backward compatibility and processing results. In some embodiments, one or more debugging techniques may be implemented in the first coding language to construct and / or model the typical sequence of operations in the program execution flow.
[0077] At step 360, in some embodiments, upon reaching a maturity threshold, the processor may containerize one or more code sets of the second coding language into the application. For example, in some embodiments, once the processor has determined that the modernized code set has achieved acceptable data accuracy and / or performance (e.g., accuracy and / or performance meets predefined criteria, metrics, and / or thresholds), the modernized code set may be further segmented into one or more programs, applications, or other containerized code sets, collectively referred to as microservice code. In some embodiments, the modernized code set and / or sub-components of its functionality may be measured against key metrics such as frequency and runtime duration. In some embodiments, various logging, parameters, variables, etc., may be deployed to measure and track usage, for example, for quality control purposes. This information may be collected, for example, in a separate performance database for logging and analyzing operational metric trends. Additionally or alternatively, this information may also be fed back to the ML model to further optimize the model and the resulting output.
[0078] In some embodiments, as part of developing a modernized codebase and data processing flow, the processor can be configured to determine whether the input data for the code is processed serially / sequentially or using indexable values. The anticipated modernized processing logic can then determine whether the microservice functionality generated from the modernized codebase can be horizontally scaled (e.g., multithreaded) and / or have increased resource capacity, thereby enabling optimized processing SLAs. In some embodiments, the processor can be configured to identify and / or suggest additional implementations of containerized microservices generated from the modernized codebase, e.g., across various platforms and / or for different services.
[0079] In some embodiments, the processor may be configured (e.g., in a performance database) to record the data volume, transactions, size, and / or processing speed of various microservices and applications generated from the modernization codeset. Therefore, for each stage of daytime or nighttime processing, each layer of the modernization codeset and / or microservice codeset can be horizontally and / or dynamically scaled based on the known transaction volume of the upstream system and the anticipated upcoming transaction volume. In some embodiments, dynamic scaling may also compute and determine the additional resources required to meet upcoming SLAs. In some embodiments, the processor may implement an ML model to determine the dynamic scaling algorithm based on how the original processing is performed (e.g., top-down (FIFO) or multithreaded or some key dataset index).
[0080] In some embodiments, the processor may employ ML models to measure the processing throughput performance of dynamically scalable logic and / or aggressively scale downstream processes based on upstream quantity signals. As new modern codebases are developed, in some embodiments, the processor may be configured to (e.g., in a library database) archive, tag, or otherwise reference the functionality and / or other details of the modern codebase and / or containerized microservices created from it. Therefore, in some embodiments, when a new service or feature is needed or requested, the processor may be configured to search for relevant codebases that can be deployed.
[0081] In some embodiments, the processor can be configured to provide translation suggestions. For example, in some embodiments, a trained ML model can be configured to suggest a target language for a given legacy language based on desired use cases, target systems / platforms, required functionalities, etc. For example, the processor can identify segments in the COBOL mainframe code that may be suitable for translation and implementation as Java applications or microservices, and can suggest the implementation of the systems and methods described herein for the purpose of creating modern code sets.
[0082] In some embodiments, the processor may dynamically scale one or more containerized applications, for example, based at least in part on one or more of the following: a second ML model that has reached a maturity threshold (e.g., a second ML model of a second modernized coding language, an ML model for prioritizing containerized code sets, etc.) or at least one second unit test case. As described above, in some embodiments, the processor may be configured to implement additional AI and / or ML tools learned from the results of previous translations, for example, to perform additional tests via additional unit test cases, and generate additional suggestions and / or improvements. Such suggestions and / or improvements may be automatically integrated into any of the above processes to further improve the system described herein.
[0083] Although the systems and methods described herein have been generally described in relation to the translation of a single traditional language into a modern coded language (e.g., translating a first language one-to-one into a second language), in various embodiments, the same process can be implemented in a one-to-many framework. For example, in some embodiments, a user may indicate one or more second languages to be translated from the first language. Additionally or alternatively, in some embodiments, one or more translation suggestions may be provided (as described herein) for multiple translations. In any case, embodiments of the systems and methods described herein may be configured to process multiple translations, for example, in parallel and / or serially (e.g., based on identified priorities), as described herein.
[0084] This written description uses examples to disclose implementation methods, including best practices, and enables those skilled in the art to practice these methods, including making and using any device or system and performing any incorporated methods. The patentable scope of this disclosure is defined by the claims, but may include other examples that would occur to those skilled in the art. Such other examples are intended to fall within the scope of the claims if they have structural elements that are indistinguishable from the literal language of the claims, or if they include equivalent structural elements that are not substantially different from the literal language of the claims.
[0085] Clause 1. A method for translating a first encoded language into a second encoded language, comprising: training a first machine learning (ML) model, at least partially by a processor, on a first encoded language-specific dataset associated with the first encoded language, wherein the first ML model is trained to translate one or more code sets of the first encoded language into corresponding one or more code sets of the second encoded language; generating at least one unit test case by the processor using the first ML model, wherein the at least one unit test case runs one or more code sets of the second encoded language in parallel with one or more code sets of the first encoded language; iteratively testing and refining the first ML model, at least partially based on a maturity level of the first ML model, until a maturity threshold is reached; and, upon reaching the maturity threshold, containerizing one or more code sets of the second encoded language into an application by the processor.
[0086] Clause 2. The method according to Clause 1, wherein the first encoding language-specific dataset includes one or more of the following: at least one language reference document, library, historical input file, historical output file, runtime log, parameter set, or control point associated with the first encoding language.
[0087] Clause 3. The method described in Clause 1, wherein the first coding language is a general business-oriented language (COBOL).
[0088] Clause 4. The method described in Clause 1, wherein the second encoding language is one of Java, Golang, Python, Angular, or C++.
[0089] Clause 5. The method described in Clause 1, wherein the first machine learning model is a natural language model (NLM).
[0090] Clause 6. The method according to Clause 1, wherein iteratively testing the first ML model comprises: performing multiple iterative regression tests based on historical input data of at least one code set in one or more code sets of the first coding language, and comparing the corresponding output data of the first ML model with the historical output of said at least one code set in one or more code sets of the first coding language.
[0091] Clause 7. The method according to Clause 6, wherein iteratively refining the first ML model comprises: executing one or more debugging techniques by the processor; and updating the first ML model based on one or more executed debugging techniques.
[0092] Clause 8. The method described in Clause 1 further includes: dynamically scaling one or more containerized applications by the processor based at least in part on one or more of the following: a second ML model that has reached a maturity threshold or at least one second unit test case.
[0093] Clause 9. The method described in Clause 1 further includes: the processor tracking the progress of at least one test case based at least in part on the maturity level of the first ML model.
[0094] Clause 10. A system for translating a first encoded language into a second encoded language, comprising: a computer having a processor and a memory; one or more code sets stored in the memory and executed by the processor, wherein, when executed, the one or more code sets configure the processor to: train a first machine learning (ML) model at least partially on a first encoded language-specific dataset associated with the first encoded language, wherein the first ML model is trained to translate one or more code sets of the first encoded language into corresponding one or more code sets of the second encoded language; generate at least one unit test case using the first ML model, wherein the at least one unit test case runs one or more code sets of the second encoded language in parallel with the one or more code sets of the first encoded language; iteratively test and refine the first ML model, at least partially based on a maturity level of the first ML model, until a maturity threshold is reached; and, upon reaching the maturity threshold, containerize one or more code sets of the second encoded language into an application.
[0095] Clause 11. The system according to Clause 10, wherein the first encoding language-specific dataset includes one or more of the following: at least one language reference document, library, historical input file, historical output file, runtime log, parameter set, or control point associated with the first encoding language.
[0096] Clause 12. The system described in Clause 10, wherein the first coding language is a general business-oriented language (COBOL).
[0097] Clause 13. The system described in Clause 10, wherein the second encoding language is one of Java, Golang, Python, Angular, or C++.
[0098] Clause 14. The system described in Clause 10, wherein the first ML model is a natural language model (NLM).
[0099] Clause 15. The system according to Clause 10, wherein, when iteratively testing the first ML model, the processor is further configured to: perform multiple iterative regression tests based on historical input data of at least one code set in one or more code sets of the first coding language, and compare the corresponding output data of the first ML model with the historical output of said at least one code set in one or more code sets of the first coding language.
[0100] Clause 16. The system according to Clause 15, wherein, during iterative refinement of the first ML model, the processor is further configured to: execute one or more debugging techniques; and update the first ML model based on one or more executed debugging techniques.
[0101] Clause 17. The system according to Clause 10, wherein the processor is further configured to dynamically scale one or more containerized applications based at least in part on one or more of the following: a second ML model that has reached a maturity threshold or at least one second unit test case.
[0102] Clause 18. The system pursuant to Clause 10, wherein the processor is further configured to: track the progress of at least one test case based at least in part on the maturity level of the first ML model.
[0103] Clause 19. A non-transitory computer-readable medium storing computer program instructions that, when executed by one or more processors, cause one or more processors to perform operations comprising: training a first machine learning (ML) model on a first coding language-specific dataset associated with a first coding language, wherein the first ML model is trained to translate one or more code sets of the first coding language into corresponding one or more code sets of a second coding language; generating at least one unit test case using the first ML model, wherein the at least one unit test case runs one or more code sets of the second coding language in parallel with the one or more code sets of the first coding language; iteratively testing and refining the first ML model, at least in part, based on a maturity level of the first ML model, until a maturity threshold is reached; and, upon reaching the maturity threshold, containerizing one or more code sets of the second coding language into an application.
[0104] Clause 20. The non-transitory computer-readable medium as described in Clause 19, wherein the first encoding language is a general business-oriented language (COBOL), and wherein the second encoding language is one of Java, Golang, Python, Angular, or C++.
Claims
1. A method for translating a first encoded language into a second encoded language, comprising: The processor at least partially trains a first machine learning (ML) model on a first encoding language-specific dataset associated with the first encoding language. Wherein, the first ML model is trained to translate one or more code sets of the first encoding language into one or more corresponding code sets of the second encoding language; By using the first ML model, the processor generates at least one unit test case. The at least one unit test case is executed in parallel with one or more code sets of the second encoding language; The processor iteratively tests and refines the first ML model, at least in part, based on the maturity level of the first ML model, until a maturity threshold is reached. as well as When the maturity threshold is reached, the processor containers one or more code sets of the second encoding language into the application.
2. The method according to claim 1, wherein, The first encoding language-specific dataset includes one or more of the following: at least one language reference document, library, historical input file, historical output file, runtime log, parameter set, or control point related to the first encoding language.
3. The method according to claim 1, wherein, The first encoding language is COBOL, a general-purpose business-oriented language.
4. The method according to claim 1, wherein, The second encoding language is one of Java, Golang, Python, Angular, or C++.
5. The method according to claim 1, wherein, The first machine learning model is a natural language model (NLM).
6. The method according to claim 1, wherein, Iterative testing of the first ML model includes: Multiple iterative regression tests are performed based on historical input data from at least one code set in one or more code sets of the first encoding language, and the corresponding output data of the first ML model is compared with the historical output of the at least one code set in one or more code sets of the first encoding language.
7. The method according to claim 6, wherein, Iteratively refining the first ML model includes: The processor performs one or more debugging techniques; and The first ML model is updated based on one or more implemented debugging techniques.
8. The method according to claim 1, further comprising: The processor dynamically scales one or more containerized applications based at least in part on one or more of the following: a second ML model that has reached the maturity threshold or at least one second unit test case.
9. The method according to claim 1, further comprising: The processor tracks the progress of the at least one test case based at least in part on the maturity level of the first ML model.
10. A system for translating a first encoded language into a second encoded language, comprising: A computer has a processor and memory; One or more code sets, stored in the memory and executed by the processor, wherein, when executed, the one or more code sets configure the processor to: The first machine learning (ML) model is trained, at least partially, on a first language-specific dataset associated with the first encoding language. Wherein, the first ML model is trained to translate one or more code sets of the first encoding language into one or more corresponding code sets of the second encoding language; By using the first ML model, at least one unit test case is generated. The at least one unit test case is executed in parallel with one or more code sets of the second encoding language; Based at least in part on the maturity level of the first ML model, the first ML model is iteratively tested and refined until a maturity threshold is reached; as well as When the maturity threshold is reached, one or more code sets of the second encoding language are containerized into the application.
11. The system according to claim 10, wherein, The first encoding language-specific dataset includes one or more of the following: at least one language reference document, library, historical input file, historical output file, runtime log, parameter set, or control point related to the first encoding language.
12. The system according to claim 10, wherein, The first encoding language is COBOL, a general-purpose business-oriented language.
13. The system according to claim 10, wherein, The second encoding language is one of Java, Golang, Python, Angular, or C++.
14. The system according to claim 10, wherein, The first ML model is a Natural Language Model (NLM).
15. The system according to claim 10, wherein, When iteratively testing the first ML model, the processor is also configured to: Multiple iterative regression tests are performed based on historical input data from at least one code set in one or more code sets of the first encoding language, and the corresponding output data of the first ML model is compared with the historical output of the at least one code set in one or more code sets of the first encoding language.
16. The system according to claim 15, wherein, When iteratively refining the first ML model, the processor is also configured to: Perform one or more debugging techniques; and The first ML model is updated based on one or more implemented debugging techniques.
17. The system according to claim 10, wherein, The processor is also configured to: One or more containerized applications may be dynamically scaled based at least in part on one or more of the following: a second ML model that has reached the maturity threshold or at least one second unit test case.
18. The system according to claim 10, wherein, The processor is also configured to: The progress of the at least one test case is tracked at least in part based on the maturity level of the first ML model.
19. A non-transitory computer-readable medium storing computer program instructions that, when executed by one or more processors, cause the one or more processors to perform operations, the operations including: The first machine learning (ML) model is trained, at least partially, on a first-language-specific dataset associated with the first coding language. Wherein, the first ML model is trained to translate one or more code sets of the first encoding language into one or more corresponding code sets of the second encoding language; By using the first ML model, at least one unit test case is generated. The at least one unit test case is executed in parallel with one or more code sets of the second encoding language; Based at least in part on the maturity level of the first ML model, the first ML model is iteratively tested and refined until a maturity threshold is reached; and When the maturity threshold is reached, one or more code sets of the second encoding language are containerized into the application.
20. The non-transitory computer-readable medium according to claim 19, wherein, The first encoding language is COBOL, a general-purpose, business-oriented language, and The second encoding language is one of Java, Golang, Python, Angular, or C++.