Instruction conversion method, apparatus, device, and medium

CN122903579APending Publication Date: 2026-10-13CHINA PING AN LIFE INSURANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611281165.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-21
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

[0004]本申请提供一种指令转换方法、装置、设备及介质,以解决如何缩短业务系统跨平台改造迁移的时间成本的技术问题,旨在自动转换业务系统的指令以实现跨平台运行,以降低业务系统跨平台改造迁移的时间成本

Benefits of technology

[0009]上述指令转换方法、装置、设备及介质所实现的方案中,可以通过在接收到用户对部署于目标平台的业务系统的操作指令时,获取操作指令的原始指令代码,原始指令代码包括对原始平台的第一文件处理程序的原始接口的接口调用信息。这样可以获取需要转换的指令及其依赖的原始接口。根据接口调用信息进行语义分析,得到接口调用语义描述符。这样可以提取出操作指令的语义,形成与平台无关的语义描述,以便后续跨平台转换。根据接口调用语义描述符,对部署于目标平台的第二文件处理程序的原生编程接口进行查找,得到编程接口查找结果。在编程接口查找结果表征存在与原始接口对应的原生编程接口的情况下,调用第二文件处理程序的原生编程接口,以运行操作指令。这样可以直接调用目标平台已有的、与原始接口的功能相同或相似的接口。若编程接口查找结果表征不存在与原始接口对应的原生编程接口,根据接口调用语义描述符对操作指令进行解析转换,得到指令转换数据,并通过第二文件处理程序处理指令转换数据,以运行操作指令。这样能够针对目标平台缺失的接口,利用语义映射自动转换业务系统的指令以实现跨平台运行,无需依赖人工逐行重写指令代码以适应不同平台,从而降低业务系统跨平台改造迁移的时间成本。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122903579A_ABST
    Figure CN122903579A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of data processing, is suitable for a cross-platform file processing scene of financial technology and medical health, and discloses an instruction conversion method and device, equipment and a medium, comprising the following steps: in response to receiving an operation instruction of a user on a business system deployed on a target platform, obtaining original instruction code of the operation instruction; obtaining an interface calling semantic descriptor according to interface calling information analysis; searching a native programming interface of a second file processing program deployed on the target platform according to the interface calling semantic descriptor; in response to the existence of the native programming interface corresponding to the original interface, calling the native programming interface of the second file processing program to run the operation instruction; otherwise, analyzing and converting the operation instruction according to the interface calling semantic descriptor to obtain instruction conversion data, and processing the instruction conversion data by the second file processing program to run the operation instruction. The application can reduce the time cost of cross-platform reconstruction and migration of the business system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and is applicable to the fields of financial technology and healthcare, and particularly to an instruction conversion method, apparatus, device and medium. Background Technology

[0002] In the application of business systems, it is often necessary to migrate systems that originally relied on a specific platform to different platforms. For example, in the application scenario of financial and accounting systems in fintech, the original financial and accounting system is deployed on a specific operating system platform (such as Windows). The business instructions of the financial and accounting system, such as automated report generation and batch document processing, rely on the interfaces (such as Application Programming Interfaces, APIs) provided by the file processing program (such as Office in Windows) on that operating system platform. Similarly, in the application scenario of medical insurance business systems in healthcare, the medical insurance report generation instructions rely on the interfaces provided by the file processing program on its deployed operating system platform. If the business system is migrated to another operating system platform (such as Linux), the business instructions of the migrated business system often cannot function properly because the other operating system platform does not support the aforementioned interfaces. For example, the automated report generation instructions of the financial and accounting system on the original platform can function normally, but the report generation instructions of the financial and accounting system migrated to the new platform often exhibit runtime errors such as incorrect formula calculations and abnormal document formatting.

[0003] Currently, the main method is to manually rewrite the system code. For example, based on the new interface provided by the file processing program of the new platform (such as WPS in Linux), the code corresponding to the instructions of the business system is rewritten line by line manually so that the instructions of the business system can run normally on the new platform. This results in a large time cost for cross-platform transformation and migration of business systems. Summary of the Invention

[0004] This application provides an instruction conversion method, apparatus, device, and medium to solve the technical problem of how to shorten the time cost of cross-platform transformation and migration of business systems. It aims to automatically convert the instructions of business systems to achieve cross-platform operation, thereby reducing the time cost of cross-platform transformation and migration of business systems.

[0005] Firstly, an instruction conversion method is provided, including: In response to receiving an operation instruction from a user on a business system deployed on a target platform, the original instruction code of the operation instruction is obtained; wherein, the original instruction code includes interface call information of the original interface of the first file processing program of the original platform, and the target platform is different from the original platform; Semantic analysis is performed based on the interface call information to obtain the interface call semantic descriptor; Based on the interface call semantic descriptor, the native programming interface of the second file processing program deployed on the target platform is searched to obtain the programming interface search result; In response to the programming interface lookup result indicating the existence of the native programming interface corresponding to the original interface, the native programming interface of the second file processing program is invoked to execute the operation instruction; In response to the programming interface lookup result indicating that there is no native programming interface corresponding to the original interface, the operation instruction is parsed and converted according to the interface call semantic descriptor to obtain instruction conversion data, and the instruction conversion data is processed by the second file processing program to run the operation instruction.

[0006] Secondly, an instruction conversion device is provided, comprising: The code acquisition module is used to acquire the original instruction code of the operation instruction in response to receiving an operation instruction from a user on a business system deployed on a target platform; wherein the original instruction code includes interface call information of the original interface of the first file processing program of the original platform, and the target platform is different from the original platform; The semantic analysis module is used to perform semantic analysis based on the interface call information to obtain the interface call semantic descriptor; The interface lookup module is used to search for the native programming interface of the second file processing program deployed on the target platform based on the interface call semantic descriptor, and obtain the programming interface lookup result; The interface calling module is used to call the native programming interface of the second file processing program in response to the programming interface lookup result indicating the existence of the native programming interface corresponding to the original interface, so as to run the operation instruction; The instruction conversion module is used to respond to the programming interface lookup result indicating that there is no native programming interface corresponding to the original interface, to parse and convert the operation instruction according to the interface call semantic descriptor to obtain instruction conversion data, and to process the instruction conversion data through the second file processing program to run the operation instruction.

[0007] Thirdly, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described method.

[0008] Fourthly, a computer-readable storage medium is provided, which stores a computer program that, when executed by a processor, implements the steps of the above-described method.

[0009] In the scheme implemented by the above-mentioned instruction conversion method, apparatus, device, and medium, the original instruction code of the operation instruction can be obtained upon receiving an operation instruction from a user to a business system deployed on the target platform. The original instruction code includes interface call information for the original interface of the first file processing program on the original platform. This allows the acquisition of the instruction to be converted and its dependent original interface. Semantic analysis is performed based on the interface call information to obtain an interface call semantic descriptor. This allows the extraction of the semantics of the operation instruction, forming a platform-independent semantic description for subsequent cross-platform conversion. Based on the interface call semantic descriptor, the native programming interface of the second file processing program deployed on the target platform is searched to obtain the programming interface search result. If the programming interface search result indicates the existence of a native programming interface corresponding to the original interface, the native programming interface of the second file processing program is called to execute the operation instruction. This allows direct invocation of existing interfaces on the target platform that have the same or similar functions as the original interface. If the programming interface search result indicates the absence of a native programming interface corresponding to the original interface, the operation instruction is parsed and converted based on the interface call semantic descriptor to obtain instruction conversion data, which is then processed by the second file processing program to execute the operation instruction. This approach enables the automatic conversion of business system instructions for missing interfaces on the target platform using semantic mapping, achieving cross-platform operation without relying on manual rewriting of instruction code line by line to adapt to different platforms, thereby reducing the time cost of cross-platform transformation and migration of business systems. Attached Figure Description

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

[0011] Figure 1 This is a schematic diagram of an application environment for an instruction conversion method according to an embodiment of this application; Figure 2 This is a flowchart illustrating an instruction conversion method in one embodiment of this application; Figure 3 yes Figure 2 A schematic diagram of a specific implementation method for step S102; Figure 4 yes Figure 3 A schematic diagram of a specific implementation method for step S203; Figure 5 yes Figure 2 A schematic diagram of a specific implementation of step S105; Figure 6 This is another flowchart illustrating the instruction conversion method in one embodiment of this application; Figure 7 This is another flowchart illustrating the instruction conversion method in one embodiment of this application; Figure 8 This is another flowchart illustrating the instruction conversion method in one embodiment of this application; Figure 9 This is a schematic diagram of the structure of an instruction conversion device in one embodiment of this application; Figure 10 This is a schematic diagram of the structure of a computer device according to one embodiment of this application; Figure 11 This is another structural schematic diagram of a computer device in one embodiment of this application. Detailed Implementation

[0012] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0013] The instruction conversion method provided in this application can be applied to, for example, Figure 1 In this application environment, the client communicates with the server via a network. The server can receive user operation instructions from the client for a business system deployed on a target platform (such as the server's Linux platform), obtain the original instruction code, and perform instruction conversion based on the original instruction code to obtain the corresponding instructions that can run normally on the target platform. Then, the server can feed back the result of the instruction execution (such as whether it runs normally) to the client. The client can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The server can be implemented using a standalone server or a server cluster consisting of multiple servers. The following detailed description of specific embodiments further illustrates this application.

[0014] Please see Figure 2 As shown, Figure 2 A flowchart illustrating the instruction conversion method provided in this application embodiment includes the following steps: S101: In response to receiving an operation instruction from a user on a business system deployed on the target platform, obtain the original instruction code of the operation instruction; wherein, the original instruction code includes interface call information of the original interface of the first file processing program of the original platform, and the target platform is different from the original platform; S102: Perform semantic analysis based on the interface call information to obtain the interface call semantic descriptor; S103: Based on the interface call semantic descriptor, search for the native programming interface of the second file processing program deployed on the target platform to obtain the programming interface search result; S104: In response to the programming interface lookup result indicating the existence of a native programming interface corresponding to the original interface, the native programming interface of the second file processing program is called to run the operation instructions; S105: In response to the programming interface lookup result indicating that there is no native programming interface corresponding to the original interface, the operation instruction is parsed and converted according to the interface call semantic descriptor to obtain instruction conversion data, and the instruction conversion data is processed by the second file processing program to run the operation instruction.

[0015] The beneficial effects of this application's embodiments include, but are not limited to: Upon receiving a user's operation instruction for a business system deployed on the target platform, the original instruction code of the operation instruction is obtained. This original instruction code includes interface call information for the original interface of the first file processing program on the original platform. This allows for the acquisition of the instruction to be converted and its dependent original interface. Semantic analysis is performed based on the interface call information to obtain an interface call semantic descriptor. This allows the extraction of the semantics of the operation instruction, forming a platform-independent semantic description for subsequent cross-platform conversion. Based on the interface call semantic descriptor, the native programming interface of the second file processing program deployed on the target platform is searched to obtain the programming interface search result. If the programming interface search result indicates the existence of a native programming interface corresponding to the original interface, the native programming interface of the second file processing program is called to execute the operation instruction. This allows direct calling of existing interfaces on the target platform that have the same or similar functions as the original interface. If the programming interface search result indicates the absence of a native programming interface corresponding to the original interface, the operation instruction is parsed and converted based on the interface call semantic descriptor to obtain instruction conversion data. This instruction conversion data is then processed by the second file processing program to execute the operation instruction. This approach enables the automatic conversion of business system instructions for missing interfaces on the target platform using semantic mapping, achieving cross-platform operation without relying on manual rewriting of instruction code line by line to adapt to different platforms, thereby reducing the time cost of cross-platform transformation and migration of business systems.

[0016] In step S101 of some embodiments, the target platform refers to the operating system platform currently deployed on the business system. Specifically, the target platform may be a Linux platform. In some embodiments, for example, in the financial and accounting system application scenario of fintech, the business system may be a financial and accounting system. As another example, in the medical insurance business system application scenario of healthcare, the business system may be a medical insurance business system.

[0017] In some embodiments, the instruction conversion method provided in this application can be applied to business systems such as financial systems and medical information systems in various application scenarios. These business systems are typically implemented through a server-side architecture, which can receive user interface call requests in real time. For example, in the insurance application field, users often use automated report generation instructions from financial systems to automatically generate financial statements. Specifically, the server-side architecture can be a financial company's server.

[0018] It's important to note that operation instructions refer to commands that the business system can execute. Since the business system is migrated from the original platform to the target platform, its original code relies on the original interface (such as an Application Programming Interface, API) of the original platform's first file processing program to execute these operation instructions. For example, in the financial and accounting system application scenario of fintech, operation instructions might include automated report generation, batch document processing, etc.

[0019] It should be noted that the interface call information is the information used by the business system to call the original interface of the first file processing program to execute operation instructions. The target platform and the original platform are two different platforms. Specifically, the original platform can be a Windows platform. In some embodiments, the original platform may also include other operating system platforms, which is not limited in this embodiment.

[0020] In some embodiments, the target platform may not provide the original interface of the first file processing program of the original platform, causing the operation instructions of the business system deployed on the target platform to malfunction. For example, the second file processing program of the target platform (such as the Linux version of WPS) and the first file processing program of the original platform (such as the Windows version of Office) may provide inconsistent interfaces in terms of table formula calculation engine, PPT animation timing rendering, and cell format rendering. This can cause the same instruction code to run normally on the original platform, but when migrated to the target platform, runtime errors such as formula calculation errors, animation failures, and abnormal document layout will frequently occur.

[0021] In step S102 of some embodiments, the interface call semantic descriptor refers to a semantic descriptor obtained by semantic analysis of the interface call information. In some embodiments, a pre-built global mapping dictionary can be used to map the interface call information to the interface call semantic descriptor. Specifically, the global mapping dictionary can be used to indicate the mapping relationship between the interface call information and the interface call semantic descriptor. In another embodiment, the interface call information can also be semantically analyzed using a neural network-based semantic analysis model to obtain the interface call semantic descriptor.

[0022] In some embodiments, for example, the semantic analysis model can be a Large Language Model (LLM). It should be noted that the LLM includes embedding layers and Transformer layers, and is trained in a supervised manner on a financial instruction sample dataset and a semantic similarity dataset. The LLM learns sentence-level semantic representations through contrastive learning. Its training objective is to maximize the similarity of positive sample pairs (sentences that are semantically similar or inferentially related) and minimize the similarity of negative sample pairs (sentences that are semantically unrelated), that is, to ensure that semantically similar sentences are close in distance in the vector space, while semantically dissimilar sentences are far apart.

[0023] In step S103 of some embodiments, the programming interface lookup result is used to indicate whether a native programming interface corresponding to the original interface exists. For example, the programming interface lookup result may indicate the existence of a native programming interface corresponding to the original interface, or it may indicate that no native programming interface corresponding to the original interface exists. It should be noted that the native programming interface corresponding to the original interface refers to an interface that is functionally equivalent to the original interface. In another embodiment, the native programming interface corresponding to the original interface may also satisfy requirements such as syntax compatibility between the two, and is not limited thereto.

[0024] In some embodiments, the second file processing program is a file processing program deployed on the target platform. For example, both the first and second file processing programs can be used to process text files, spreadsheet files, etc. For example, the first file processing program can be an Office program deployed on Windows, and the second file processing program can be a WPS program deployed on Linux. The native programming interface refers to the programming interface (such as an API) possessed by the second file processing program.

[0025] In step S104 of some embodiments, there exists a native programming interface corresponding to the original interface, that is, there exists a native programming interface with the same function as the original interface or with a similarity higher than a preset similarity threshold.

[0026] In step S105 of some embodiments, the instruction conversion data is data obtained by parsing and converting the operation instructions. The instruction conversion data is used to run in the second file processing program of the target platform. As for the specific process of parsing and converting the operation instructions according to the interface call semantic descriptor, please refer to the explanation of steps S401 to S404 below, which will not be repeated here.

[0027] In some embodiments, such as Figure 3 As shown, the interface call information includes the operation object identifier, the interface function, and the business data corresponding to the original interface; Step S102, which involves semantic analysis based on the interface call information to obtain the interface call semantic descriptor, includes the following steps: S201: Identify the operation subject based on the operation object identifier to obtain the operation subject; S202: Determine the type of the operation instruction based on the interface function to obtain the behavior type; S203: Perform operational business analysis based on business data to obtain business tags; S204: Determine the operation subject, behavior type, and business label as the interface call semantic descriptor.

[0028] The advantage of this embodiment lies in its ability to identify the operation subject of operation instructions based on the operation object identifier, thus clearly defining the specific business object (such as a cell range in a report) targeted by the operation instruction. By determining the type of the operation instruction based on the interface function, the behavior type is obtained, allowing for the semantic abstraction of the essential action performed by the instruction (such as "generate," "open," "save," etc.), rather than being limited to the interface name of the original platform. Furthermore, by performing business data analysis, business tags are obtained, enabling the extraction of specific business content carried in the instruction (such as report type, field parameters, etc.), providing fine-grained contextual information for subsequent interface lookup or conversion. Finally, the operation subject, behavior type, and business tags are determined as the interface call semantic descriptor. This decomposes the interface call information in the original platform into a platform-independent three-element semantic description, enabling subsequent lookup or instruction parsing and conversion of the target platform's native programming interface to no longer rely on the specific syntax of the original interface, but rather on intelligent matching based on functional equivalence, rather than manually rewriting the instruction code line by line to adapt to the interface signatures of different platforms as in the background technology. Therefore, this approach can automatically convert the instructions of the business system to achieve cross-platform operation, thereby reducing the time cost of cross-platform transformation and migration of business systems.

[0029] In step S201 of some embodiments, the operation subject refers to the specific business object on which the operation instruction acts. In some embodiments, the operation subject may be, for example, a cell range in a table, a paragraph in a document, or a data field in a report.

[0030] In step S202 of some embodiments, the behavior type refers to the category of action to be performed by the operation instruction. For example, the behavior type may include data copying, format painter, formula calculation, etc.

[0031] In step S203 of some embodiments, the business tag refers to the specific business scenario related to the operation instruction. For example, the business tag may include tags such as financial business and medical business.

[0032] In step S204 of some embodiments, specifically, the interface call semantic descriptor may include the operation subject of the operation instruction, the behavior type, operation parameters (such as a skip empty cell flag), the context (such as the current worksheet state), and the business tag. In some embodiments, the interface call information can be uniformly transformed into an interface call semantic descriptor through a semantic abstraction engine.

[0033] In some embodiments, such as Figure 4 As shown, step S203, which involves performing operational business analysis based on business data to obtain business tags, specifically includes the following steps: S301: Data lookup is performed on business data using a pre-built global mapping dictionary; whereby the global mapping dictionary is used to characterize the association between candidate data and candidate business tags; S302: If there is candidate data in the global mapping dictionary that is the same as the business data, the candidate business label corresponding to the candidate data shall be determined as the business label; S303: If there is no candidate data label that is the same as the business data in the global mapping dictionary, the business data is identified by the business identification model to obtain the business label.

[0034] The advantage of this embodiment lies in its use of a pre-built global mapping dictionary to search for business data. If candidate data matching the business data exists in the global mapping dictionary, the corresponding candidate business tag is identified as the business tag. This allows for rapid matching of known business data using pre-established mapping relationships, directly obtaining the corresponding business tag. If no candidate data tag matching the business data exists in the global mapping dictionary, a business identification model is used to identify the business data and obtain the business tag. This enables semantic recognition of unknown business data not covered by the dictionary, automatically generating business tags, thus ensuring the comprehensiveness and accuracy of business tag extraction, and consequently improving the accuracy of instruction conversion.

[0035] In step S301 of some embodiments, the global mapping dictionary refers to a predefined mapping table used to characterize the association between candidate data and candidate business tags. For example, the global mapping dictionary can map financial statement fields in business data to financial business tags. As another example, the global mapping dictionary can map medical insurance settlement statement fields to medical business tags.

[0036] In step S302 of some embodiments, when the business data can be accurately matched in the dictionary, the business tags defined in the dictionary can be used directly without additional calculations or model inference.

[0037] In step S303 of some embodiments, it should be noted that the global mapping dictionary cannot cover all possible business data. In this case, a business identification model is needed to perform semantic recognition on the business data and automatically generate business tags. Specifically, the business identification model can be a neural network-based classification model (such as a Transformer-based text classifier) ​​or a pre-trained Large Language Model (LLM).

[0038] In some embodiments, such as Figure 5 As shown, the interface call semantic descriptor includes the business type of the operation instruction; In step S105, that is, in response to the programming interface lookup result indicating that there is no native programming interface corresponding to the original interface, the operation instruction is parsed and transformed according to the interface call semantic descriptor to obtain instruction transformation data, which specifically includes the following steps: S401: In response to the programming interface lookup result indicating that there is no native programming interface corresponding to the original interface, and the business type of the operation instruction belongs to the preset report operation type, obtain the target report corresponding to the operation instruction; S402: Compare the target report type and the preset key report types based on the target report type; S403: If the target report type belongs to the preset key report type, the original instruction code is converted into a file according to the preset first file format and interface call semantic descriptor to obtain the first instruction temporary file; wherein, the first file format is a file format that the second file processing program supports parsing; S404: The first instruction temporary file is executed through the second file handler to run the operation instructions.

[0039] The advantage of this embodiment lies in that, when the search results for the programming interface indicate that no native programming interface corresponding to the original interface exists and the business type of the operation instruction belongs to a preset report operation type, the target report corresponding to the operation instruction is obtained. Then, the target report type of the target report is compared with a preset key report type. If the target report type belongs to a preset key report type, the original instruction code is converted into a first instruction temporary file according to the first file format supported by the second file processing program and the interface call semantic descriptor. This automatically converts report instructions that originally depended on the proprietary interface of the original platform into a temporary file format that can be parsed by the target platform. The first instruction temporary file is executed by the second file processing program to run the operation instruction. This automatically converts the instructions of the business system to achieve cross-platform operation, thereby reducing the time cost of cross-platform transformation and migration of the business system.

[0040] In step S401 of some embodiments, specifically, the preset key report type can be a highly sensitive regulatory reporting report type, such as quarterly reports or monthly reports related to banking and insurance supervision.

[0041] In step S402 of some embodiments, the target report type of the target report is compared with a preset key report type to determine whether the target report type belongs to a key report type.

[0042] In step S403 of some embodiments, the original instruction code is converted into a file only when the business type belongs to a critical report type (i.e., a highly sensitive regulatory reporting report type). This avoids using other insecure operations (such as generating Python scripts) to convert the original instruction code, avoids the risk of scripts tampering with confidential financial data, and thus dynamically adjusts the instruction conversion strategy according to the business type of the report and the sensitivity of the data.

[0043] In some embodiments, the preset first file format may be an XML file format. The first file format may also be another file format that the second file processing program supports parsing, and is not limited thereto.

[0044] In step S404 of some embodiments, since the first instruction temporary file is in a format that can be parsed by the second file processing program of the target platform, the operation instructions can be run based on the functions provided by the second file processing program (such as interfaces, macro instructions, etc.).

[0045] In some embodiments, such as Figure 6 As shown, after step S402, the instruction conversion method may further include the following steps: S501: If the target report type does not belong to the preset key report type, perform script conversion judgment based on the original instruction code to obtain the script conversion judgment result; S502: If the script conversion judgment result indicates that the original instruction code supports being converted into a script, the operation instruction will be converted into the target script; S503: Execute the target script through the second file handler to run the operation instructions.

[0046] The advantage of this embodiment lies in that, when the target report type does not belong to a preset key report type, a script conversion judgment is performed based on the original instruction code to obtain a script conversion judgment result. If the script conversion judgment result indicates that the original instruction code supports conversion into a script, the operation instruction is converted into a target script, and the target script is executed through a second file processing program to run the operation instruction. This allows the target platform's script execution capability to replace direct calls to the original interface, thereby achieving instruction compatibility without relying on file format conversion. Therefore, it can automatically convert the instructions of the business system to achieve cross-platform operation, thereby reducing the time cost of cross-platform transformation and migration of the business system.

[0047] In step S501 of some embodiments, the target report type is not a preset critical report type, that is, the target report type is a low-sensitivity report type. For example, in the banking application scenario of fintech, the target report type may include the bank's internal daily ledger or daily monthly closing report. In some embodiments, static code analysis technology can be used to check whether the original instruction code contains complex logic such as recursive calls and dynamic object creation, and whether the target platform's second file processing program supports the corresponding script runtime environment, in order to obtain the script conversion judgment result. The script conversion judgment result can be used to characterize whether the original instruction code supports being converted into a script.

[0048] In step S502 of some embodiments, the target script may be a Python script. In another embodiment, the target script may also be other types of script code, and is not limited thereto.

[0049] In step S503 of some embodiments, the target script may call an internal interface provided by a second file handler to execute operation instructions. For example, a hidden internal interface of a second file handler (such as WPS) may be called through a binary patch to implement instructions for modifying the format of animations or tables.

[0050] In some embodiments, such as Figure 7 As shown, after step S501, the instruction conversion method may further include the following steps: S601: If the script conversion judgment result indicates that the original instruction code does not support being converted into a script, the original instruction code is converted into a file according to the preset second temporary file format to obtain a second instruction temporary file; wherein, the second temporary file format is a file format that the second file processing program supports parsing; S602: Execute the second instruction temporary file through the second file handler to run the operation instructions.

[0051] The advantage of this embodiment lies in that, when the script conversion judgment result indicates that the original instruction code does not support conversion into a script, the original instruction code is converted into a file according to the second temporary file format supported by the second file processing program, resulting in a second temporary instruction file. This allows instructions that cannot be called through native interfaces or simulated through scripts to be automatically converted into a temporary file format parsable by the target platform, thereby indirectly realizing the semantic function of the original instruction through a file. The second temporary instruction file is then executed by the second file processing program to run the operation instructions. This directly utilizes the target platform's native file processing capabilities to achieve cross-platform operation, thereby reducing the time cost of cross-platform transformation and migration of business systems.

[0052] In step S601 of some embodiments, the second temporary file format may include CSV format. In another embodiment, the second temporary file format may also include other formats, such as XML format, but is not limited thereto.

[0053] In step S602 of some embodiments, the business system can call the second file processing program to open and execute the file to realize the function of the operation instruction.

[0054] In some embodiments, such as Figure 8 As shown, before step S103, the instruction conversion method may further include the following steps: S701: Obtain the instruction sequence of at least two operation instructions; S702: If the instruction sequence conforms to the preset business sequence, at least two operation instructions are fused to obtain a composite semantic instruction; S703: Perform semantic analysis based on the compound semantic instructions to obtain the interface call semantic descriptor.

[0055] The advantage of this embodiment lies in its ability to pre-identify the execution order relationship between multiple operation instructions by acquiring their order. If the instruction order conforms to a preset business order, at least two operation instructions are fused to obtain a composite semantic instruction. This merges multiple operation instructions that were originally processed independently into a composite semantic unit with complete business logic, thus avoiding semantic deviations caused by losing contextual associations due to individual instruction conversions. Semantic analysis is then performed based on the composite semantic instruction to obtain an interface call semantic descriptor. This allows for the generation of a more accurate and complete interface call semantic descriptor based on the fused overall semantics, providing a more precise semantic basis for subsequent native programming interface lookup or instruction parsing and conversion, thereby improving the accuracy of instruction conversion across business systems across platforms.

[0056] In step S701 of some embodiments, the instruction order refers to the order in which multiple operation instructions are triggered during execution.

[0057] In step S702 of some embodiments, the preset business sequence refers to the order of instructions predefined by the system that can reflect the complete business logic. For example, the business sequence may be to execute the following instructions in sequence: subject data reading, cell filling, tax amount formula calculation, report format locking, and PDF submission and export.

[0058] In step S703 of some embodiments, semantic analysis is performed on the composite instruction and composite semantic instruction as a whole, which can extract a more complete and accurate interface call semantic descriptor from the fused instruction.

[0059] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0060] In one embodiment, an instruction conversion device is provided, which corresponds one-to-one with the instruction conversion method in the above embodiments. For example... Figure 9 As shown, the instruction conversion device includes a code acquisition module 801, a semantic analysis module 802, an interface lookup module 803, an interface call module 804, and an instruction conversion module 805. Detailed descriptions of each functional module are as follows: The code acquisition module 801 is used to receive an operation instruction from a user on a business system deployed on a target platform and acquire the original instruction code of the operation instruction; wherein, the original instruction code includes interface call information of the original interface of the first file processing program of the original platform, and the target platform is different from the original platform; The semantic analysis module 802 is used to perform semantic analysis based on the interface call information to obtain the interface call semantic descriptor. The interface lookup module 803 is used to look up the native programming interface of the second file processing program deployed on the target platform based on the interface call semantic descriptor, and obtain the programming interface lookup result. The interface call module 804 is used to call the native programming interface of the second file processing program in response to the programming interface lookup result indicating the existence of a native programming interface corresponding to the original interface, so as to run the operation instructions. The instruction conversion module 805 is used to respond to the programming interface lookup result indicating that there is no native programming interface corresponding to the original interface, to parse and convert the operation instruction according to the interface call semantic descriptor, to obtain instruction conversion data, and to process the instruction conversion data through the second file processing program to run the operation instruction.

[0061] This application provides an instruction conversion device. Upon receiving an operation instruction from a user to a business system deployed on a target platform, the device obtains the original instruction code of the operation instruction. The original instruction code includes interface call information for the original interface of a first file processing program on the original platform. This allows the device to obtain the instruction to be converted and its dependent original interface. Semantic analysis is performed based on the interface call information to obtain an interface call semantic descriptor. This extracts the semantics of the operation instruction, forming a platform-independent semantic description for subsequent cross-platform conversion. Based on the interface call semantic descriptor, the device searches for the native programming interface of a second file processing program deployed on the target platform to obtain the programming interface search result. If the programming interface search result indicates the existence of a native programming interface corresponding to the original interface, the native programming interface of the second file processing program is called to execute the operation instruction. This allows direct invocation of existing interfaces on the target platform that have the same or similar functions as the original interface. If the programming interface search result indicates the absence of a native programming interface corresponding to the original interface, the operation instruction is parsed and converted based on the interface call semantic descriptor to obtain instruction conversion data. The instruction conversion data is then processed by the second file processing program to execute the operation instruction. This approach enables the automatic conversion of business system instructions for missing interfaces on the target platform using semantic mapping, achieving cross-platform operation without relying on manual rewriting of instruction code line by line to adapt to different platforms, thereby reducing the time cost of cross-platform transformation and migration of business systems.

[0062] Specific limitations regarding the instruction conversion device can be found in the limitations on the instruction conversion method above, and will not be repeated here. Each module in the aforementioned instruction conversion device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in hardware within or independently of the processor in the computer device, or stored in software in the memory of the computer device, so that the processor can call and execute the operations corresponding to each module.

[0063] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 10 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external clients via a network connection. When the computer program is executed by the processor, it implements the functions or steps of an instruction translation method on the server side.

[0064] In one embodiment, a computer device is provided, which may be a client, and its internal structure diagram may be as follows: Figure 11 As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with an external server via a network connection. When executed by the processor, the computer program implements the client-side functions or steps of an instruction translation method.

[0065] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the instruction translation method.

[0066] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the instruction translation method.

[0067] It should be noted that the functions or steps that can be implemented by the computer-readable storage medium or computer device described above can be referred to the relevant descriptions on the server side and client side in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.

[0068] 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 a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0069] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0070] It should be noted that any AI models, software tools, or components not belonging to this company appearing in the embodiments of this application are merely illustrative examples and do not represent actual use. All user personal information involved in the embodiments of this application has been authorized (with the knowledge and consent) by the relevant parties or has been fully authorized by all parties, and the executing entity may obtain it through various legal and compliant means. The collection, storage, use, processing, transmission, provision, and disclosure of the information, data, and signals involved all comply with relevant laws and regulations and do not violate public order and good morals.

[0071] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. An instruction conversion method, characterized in that, include: In response to receiving an operation instruction from a user on a business system deployed on a target platform, the original instruction code of the operation instruction is obtained; wherein, the original instruction code includes interface call information of the original interface of the first file processing program of the original platform, and the target platform is different from the original platform; Semantic analysis is performed based on the interface call information to obtain the interface call semantic descriptor; Based on the interface call semantic descriptor, the native programming interface of the second file processing program deployed on the target platform is searched to obtain the programming interface search result; In response to the programming interface lookup result indicating the existence of the native programming interface corresponding to the original interface, the native programming interface of the second file processing program is invoked to execute the operation instruction; In response to the programming interface lookup result indicating that there is no native programming interface corresponding to the original interface, the operation instruction is parsed and converted according to the interface call semantic descriptor to obtain instruction conversion data, and the instruction conversion data is processed by the second file processing program to run the operation instruction.

2. The method according to claim 1, characterized in that, The interface call semantic descriptor includes the business type of the operation instruction; The response to the programming interface lookup result indicating that no native programming interface corresponding to the original interface exists, the operation instruction is parsed and transformed according to the interface call semantic descriptor to obtain instruction transformation data, including: In response to the programming interface lookup result indicating that the original programming interface corresponding to the original interface does not exist, and the business type of the operation instruction belongs to the preset report operation type, the target report corresponding to the operation instruction is obtained; The target report type and the preset key report types are compared based on the target report type. If the target report type belongs to a preset key report type, the original instruction code is converted into a file according to the preset first file format and the interface call semantic descriptor to obtain a first instruction temporary file; wherein, the first file format is a file format supported by the second file processing program for parsing; The first instruction temporary file is executed by the second file processing program to run the operation instructions.

3. The method according to claim 2, characterized in that, After comparing the target report type with the preset key report type based on the target report, the method further includes: If the target report type does not belong to the preset key report type, a script conversion judgment is performed based on the original instruction code to obtain the script conversion judgment result; If the script conversion judgment result indicates that the original instruction code supports being converted into a script, the operation instruction is converted into the target script; The target script is executed by the second file processing program to run the operation instructions.

4. The method according to claim 3, characterized in that, After determining whether the target report type does not belong to a preset key report type, and performing a script conversion judgment based on the original instruction code to obtain the script conversion judgment result, the method further includes: If the script conversion judgment result indicates that the original instruction code does not support being converted into a script, the original instruction code is converted into a file according to a preset second temporary file format to obtain a second instruction temporary file; wherein, the second temporary file format is a file format that the second file processing program supports parsing; The second instruction temporary file is executed by the second file processing program to run the operation instructions.

5. The method according to any one of claims 1 to 4, characterized in that, Before the step of searching for the native programming interface of the second file processing program deployed on the target platform according to the interface call semantic descriptor and obtaining the programming interface search result, the method further includes: Obtain the instruction sequence of at least two of the operation instructions; If the order of the instructions conforms to the preset business order, at least two of the operation instructions are fused to obtain a composite semantic instruction. Semantic analysis is performed based on the composite semantic instructions to obtain the interface call semantic descriptor.

6. The method according to any one of claims 1 to 4, characterized in that, The interface call information includes the operation object identifier, the interface function, and the business data corresponding to the original interface; The step of performing semantic analysis based on the interface call information to obtain an interface call semantic descriptor includes: The operation subject is identified by the operation object identifier; The operation instruction is typed according to the interface function to obtain the behavior type; Based on the business data, operational business analysis is performed to obtain business tags; The operation subject, the behavior type, and the business tag are determined as the interface call semantic descriptor.

7. The method as described in claim 6, characterized in that, The step of performing operational business analysis based on the business data to obtain business tags includes: The business data is searched using a pre-built global mapping dictionary; wherein the global mapping dictionary is used to characterize the association between candidate data and candidate business tags; If there is candidate data in the global mapping dictionary that is the same as the business data, the candidate business label corresponding to the candidate data shall be determined as the business label. If there is no candidate data label that is the same as the business data in the global mapping dictionary, the business data is identified by the business identification model to obtain the business label.

8. An instruction conversion device, characterized in that, include: The code acquisition module is used to acquire the original instruction code of the operation instruction in response to receiving an operation instruction from a user on a business system deployed on a target platform; wherein the original instruction code includes interface call information of the original interface of the first file processing program of the original platform, and the target platform is different from the original platform; The semantic analysis module is used to perform semantic analysis based on the interface call information to obtain the interface call semantic descriptor; The interface lookup module is used to search for the native programming interface of the second file processing program deployed on the target platform based on the interface call semantic descriptor, and obtain the programming interface lookup result; The interface calling module is used to call the native programming interface of the second file processing program in response to the programming interface lookup result indicating the existence of the native programming interface corresponding to the original interface, so as to run the operation instruction; The instruction conversion module is used to respond to the programming interface lookup result indicating that there is no native programming interface corresponding to the original interface, to parse and convert the operation instruction according to the interface call semantic descriptor to obtain instruction conversion data, and to process the instruction conversion data through the second file processing program to run the operation instruction.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 7.