An optimization method for multiple offline tool invocation to generate temporary files

By splitting the input file and importing the logic code of tool C into tool A, and generating and storing the intermediate file result2, the problems of large computational load and version control impact in multi-level tool calls are solved, and the running and release efficiency of tool A is improved.

CN115437999BActive Publication Date: 2025-12-12卡斯柯信号(成都)有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210993237.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-18
Publication Date
2025-12-12
Estimated Expiration
2042-08-18

AI Technical Summary

Technical Problem

In existing technologies, when multi-level offline tools call to generate temporary files, there are problems such as large computational load and version control affecting release efficiency. Especially when the input file data volume is large or the structure is complex, the computational load increases when tool C obtains data content from tool B, and the need to upgrade when the version of the lower-level tool does not meet the requirements of the upper-level tool affects release efficiency.

Method used

The input files of offline data preparation tool I are split into independent part1 and part2. The key logic code of tool C is introduced into tool A. After generating the intermediate file result2, it is stored in the directory of tool B. By disguising tool C, result2 is copied to a temporary folder when tool B runs, avoiding direct calling of tool C and keeping the processing flow of tool B unaffected.

Benefits of technology

This reduces the amount of computation required for parsing input files by tool C, decreases the dependency on tool A, improves the release efficiency and development progress of tool A, and maintains the independence of tool B and the integrity of the processing flow.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115437999B_ABST
    Figure CN115437999B_ABST
Patent Text Reader

Abstract

The application discloses an optimization method for generating temporary files by multiple offline tools, and relates to the technical field of urban rail transit signal processing. The application splits the input file corresponding to tool B by tool A, splits the input file into two independent part1 and part2 input, the part1 is still processed by the original processing logic of tool B, the part2 is processed by function C in tool A, and the intermediate data required by tool B generated by function C is stored in a certain fixed folder of tool B; the internal processing logic of function C is changed, the function of generating the intermediate file by the parsed data of function C before tool C is modified to copy the intermediate data file generated by function C and stored in tool B to the output file storage path provided by tool B when calling "function C". The application can effectively improve the running efficiency and release progress of the data preparation tool.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of urban rail transit signal processing technology, and more particularly to an optimization method for generating temporary files by calling multiple offline tools. BACKGROUND

[0002] The normal operation of the CBTC signal system of urban rail transit relies on real-time data obtained by the online software of the signal system. In order to reduce the calculation amount of the online software of the CBTC signal system and improve the operation efficiency of the online software, static data required by the online software during operation needs to be generated by offline data preparation tools (referred to as "offline tools"). Most online software has corresponding offline tools to generate static data for them. The calling and application of offline tools among offline tools are applied to various scenarios, including: an offline data preparation tool (tool A) needs to call an offline data preparation tool (tool B) to process the input file of tool A to generate the data file required by tool A (the output file of tool B in Figure 1 ), and tool B needs to call tool C to process part of the data (Part2 in Figure 2 ) in the input file to generate an intermediate temporary data file (result2 in Figure 2 ) required by tool B.

[0003] The conventional solution for the scenario that tool A calls tool B and tool B generates an intermediate file by calling tool C is shown in Figure 1 and Figure 2 .

[0004] In this scheme, tool A copies its input file File to the input directory corresponding to tool B as the input file File1 of tool B. The File1 input file in tool B contains both the part1 part that needs to be processed by tool B itself and the part2 part that needs to be processed by tool C. Tool B creates a temporary folder Temp to store the intermediate file (result2) generated by tool C during operation. After the output result2 of tool C is generated to the Temp folder, tool B performs logical operations on the data result2 in the Temp folder and the data result1 generated by processing the part1 input of tool B itself, generates the output file of tool B after the operation is completed, and clears all files in the Temp folder.

[0005] Among them, tool C generates the temporary intermediate data file result2 to the Temp folder by providing tool C with two input parameters by tool B:

[0006] 1, input file File1 full path, facilitate the tool C to the input file parsing, extraction tool C needs data (Part2);

[0007] 2, tool C generated file (tool B needs intermediate data result2) output path (tool B Temp folder).

[0008] Tool C is integrated in the form of executable program (exe file) in the executable tool folder of tool B, and tool B exists in the form of executable package in the code structure of tool A. Tool A calls tool B through the exe file of tool B, and tool B automatically calls the exe file of tool C to call tool C during running, so as to complete the multi-level calling of tools.

[0009] The above scheme has the following advantages: tool B and tool C are called by the upper tool as independent function software, the processing process is simple and clear, and the implementation is convenient.

[0010] Disadvantages:

[0011] 1. When the input file data amount increases or the structure is too complex, tool C will increase the operation amount and increase the running time when parsing the data content (Part2) needed by itself from the input file obtained from tool B;

[0012] 2. Each offline data preparation tool strictly executes the version control requirement, when the lower tool in tool A generates logic that does not meet the requirement of the upper tool, the corresponding development personnel of the lower tool needs to be upgraded and released, so that tool A can be used, which will greatly affect the release efficiency of tool A. Therefore, how to improve the operation efficiency and release efficiency of tool A integrated with data preparation tools B and C has become a key problem. SUMMARY

[0013] In order to overcome the defects and deficiencies in the prior art, the present application provides an optimization method for generating temporary files by multiple offline tools, and the purpose of the present application is to overcome the deficiencies of the prior art, and to provide an optimization method for generating temporary files by multiple offline tools, which improves the operation efficiency and release progress of the data preparation tool.

[0014] In order to solve the problems in the prior art, the present application is realized by the following technical scheme.

[0015] The present application provides an optimization method for generating temporary files by multiple offline tools, which comprises the following steps:

[0016] S1, split the input file of offline data preparation tool I, split the input file of offline data preparation tool I into independent part1 data part and part2 data part;

[0017] S2, introduce the key logic code for processing part2 data part in offline data preparation tool III into offline data preparation tool I, and the introduced key logic code is called function module I in offline data preparation tool I;

[0018] S3, during the running of offline data preparation tool I and before offline data preparation tool I calls offline data preparation tool II, part2 data part is processed by function module I to generate intermediate temporary data file result2 for calling offline data preparation tool II during the running of offline data preparation tool II, and the intermediate temporary data file result2 generated by function module I is stored in a certain directory in offline data preparation tool II which will not be modified;

[0019] S4, rewrite the function of offline data preparation tool III, keep its external interface parameters unchanged, and modify its internal function as follows: when offline data preparation tool III is called by offline data preparation tool II, offline data preparation tool III will copy intermediate temporary data file result2 from its storage directory in offline data preparation tool II to the output directory of offline data preparation tool III as the output data of the disguised offline data preparation tool III;

[0020] S5, take part1 data part as the input file of offline data preparation tool II, process it by the processing logic of offline data preparation tool II itself to generate processing result data result1;

[0021] S6, during the running of offline data preparation tool II, when offline data preparation tool II calls offline data preparation tool III, generate the same calling instruction and transmit it to the disguised offline data preparation tool III; the disguised offline data preparation tool III transmits the intermediate temporary data file result2 to the output directory of the disguised offline data preparation tool III;

[0022] S7, offline data preparation tool II performs logical operation on intermediate temporary data file result2 and data result1 generated by processing part1 part itself, and generates the output file of offline data preparation tool II after the operation is completed.

[0023] Further, in the S1 step, specifically according to the input data requirements of the offline data preparation tool II to be called by the offline data preparation tool I during runtime, and the input data requirements of the offline data preparation tool III to be called by the offline data preparation tool II during file generation, the input file of the offline data preparation tool I is split into independent part1 data part and part2 data part; wherein the part1 data part corresponds to the offline data preparation tool II, and the part2 data part corresponds to the functional module I.

[0024] Further, in the S6 step, during the runtime of the offline data preparation tool II, the offline data preparation tool II creates a temporary folder in the offline data preparation tool II, and when the offline data preparation tool II calls the offline data preparation tool III, the same calling instruction is transmitted to the disguised offline data preparation tool III; in this process, the output path parameter obtained by the disguised offline data preparation tool III is the path of the temporary folder of the offline data preparation tool II; the disguised offline data preparation tool III copies the intermediate temporary data file result2 to the temporary folder of the offline data preparation tool II.

[0025] Further, in the S7 step, after the offline data preparation tool II is operated, the offline data preparation tool II generates the output file of the offline data preparation tool II and clears all files in the temporary folder.

[0026] Further, in the S7 step, the output file generated by the offline data preparation tool II is the output of the offline data preparation tool I.

[0027] Compared with the prior art, the beneficial technical effects brought by the present application are as follows:

[0028] 1. In order to reduce the operation amount of the offline data preparation tool III (tool C) for extracting the content of part 2 in the input file, when the input file is easy to split into independent part 1 and part 2, the input file is split into two separate input files of part 1 and part 2. In order to improve the publishing efficiency of the offline data preparation tool I (tool A), when the code amount of the offline data preparation tool II (tool B) is large and not convenient to transplant, and the code amount of the offline data preparation tool III (tool C) is small and convenient to transplant, the key logic code of tool C for processing part 2 is introduced into tool A. In this process, the function of tool C moved into tool A (corresponding to the processing data part, referred to as function C) does not need to depend on the tool C corresponding to the development group of tool C. This process separates the functions of tools B and C, does not need to use intermediate calls (tool B calls tool C), and also facilitates tool A to maintain function C according to its own needs. The key point in this process is how to put the data generated by the C function into the temporary folder of tool B at the correct time point in the running of tool B without affecting the processing process of tool B itself. In order to solve this problem, in the entire processing process of tool B, the corresponding time point is still retained to call "tool C", and this "tool C" does not refer to a certain version of tool C that has been published, but a pseudo "tool C" that retains the external interface of tool C and changes the internal processing logic.

[0029] 2, The method of the scheme utilizes splitting input files to form corresponding functionally independent input files, which reduces the parsing difficulty of lower-level tools when reading required input data in the input files; the function of tool C is introduced into the code logic processing of tool A, so that tool A integrates the function of tool C and is easy to maintain tool C without relying on the function of released tool C, thereby improving the release efficiency of tool A. Meanwhile, the intermediate file (result2) is generated to the required temporary folder at the correct time point without affecting the operation of tool B, and tool B adopts the form of calling "fake tool C" to copy the generated intermediate data file to the required temporary folder output directory, so that the processing flow of tool B in calling "tool C" to generate the required intermediate file has no effect. In this scheme, tool A only depends on tool B without relying on tool C, which reduces the dependency of tool A and greatly helps the development and release progress of tool A. The scheme also improves the versatility of the use scenario of tool A: for the input file with the intermediate data (result2) prepared in the input file, the scheme is still applicable. Tool A can decide whether to call function C according to whether the input file is part1 and part2 or part1 and result2, and when the input file type is part1 and result2, tool A does not call function C, and tool B can still copy the provided and input "intermediate data file" result2 to the required output directory (temporary folder of tool B) when calling "fake tool C". BRIEF DESCRIPTION OF DRAWINGS

[0030] Figure 1 A processing flowchart of an offline data preparation tool A (tool A) in the background art of the present application;

[0031] Figure 2 A processing flowchart of an offline data preparation tool C (tool C) called by an offline data preparation tool B (tool B) in the background art of the present application;

[0032] Figure 3 A processing flowchart of an offline data preparation tool I. DETAILED DESCRIPTION

[0033] The technical solutions in the embodiments of the present application will be described clearly and completely in combination with the drawings in the specification of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.

[0034] As Figure 1 and Figure 2The processing flow shown has certain disadvantages in the data processing and data preparation tool publishing process, mainly for the following two reasons:

[0035] 1. When the input file data volume is large or the structure is too complex, the offline data preparation tool C increases the operation amount and running time when parsing the data content (Part2) needed by itself from the input file;

[0036] 2. Each offline data preparation tool strictly implements its own version control requirement, when the generation logic of the subordinate tool (tool B or tool C) in the offline data preparation tool A does not meet the requirement of the upper tool A, the corresponding development personnel of the subordinate tool needs to be upgraded and published, and then the offline data preparation tool A can be used, which greatly affects the publishing efficiency of the offline data preparation tool A.

[0037] In view of the above reasons, it is urgent to design a software optimization method for multiple offline tool calling to generate temporary files, and to improve the running efficiency of tool A and the publishing efficiency of tool A. The purpose of the present application is to solve the problems of the prior art, and to provide a data preparation tool software optimization method for multi-level calling and parsing part of the content of an input file to generate a temporary file, so as to improve the running efficiency and publishing progress of the data preparation tool. The present application is shown in Figure 3 .

[0038] In order to reduce the operation amount of the offline data preparation tool III (hereinafter referred to as tool C) for extracting the part2 content in the input file, when the input file is easy to split into independent part1 and part2, the input file is split into two separate part1 and part2 input files; in order to improve the publishing efficiency of the offline data preparation tool I (hereinafter referred to as tool A), when the tool code amount of the offline data preparation tool II (hereinafter referred to as tool B) is large and not convenient to transplant, and the tool code amount of tool C is small and convenient to transplant, the key logic code of tool C for processing part2 is introduced into tool A. In this process, the function of tool C moved into tool A (referred to as function C) does not need to depend on the tool C published by the corresponding development team of tool C, this process separates the functions of tool B and tool C, does not need to use intermediate calling (tool B calling tool C), and facilitates tool A to maintain function C according to its own needs. The key point in this process is how to put the data generated by the C function into the temporary folder of tool B at the correct time point without affecting the processing process of tool B. In order to solve this problem, in the entire processing flow of tool B, the corresponding time calling "tool C" is still retained, this "tool C" does not refer to a certain version of tool C that has been published, but a pseudo "tool C" that retains the external interface of tool C and changes the internal processing logic of tool C.

[0039] The overall flow of the method is as shown in Figure 3 The specific steps include:

[0040] Step S1, split the input file of tool A into two independent parts, part1 and part2, the part1 is still processed by the processing logic of tool B itself, and the part2 is processed by function C in tool A, and result2 is generated in advance in tool A and stored in a certain folder under the executable folder of tool B.

[0041] Step S2, change the internal processing logic of "tool C", modify the function of generating intermediate files from parsed data to copy result2 in the storage location of intermediate data generated by function C in step S1 to the output file path provided by tool B when calling "tool C" (temporary folder of tool B).

[0042] More specifically, an optimization method for generating temporary files by multiple offline tools, the optimization method comprising the following steps:

[0043] S1, split the input file of offline data preparation tool I into part1 and part2 data parts;

[0044] S2, introduce the key logic code for processing part2 data part in offline data preparation tool III into offline data preparation tool I, and the introduced key logic code is called function module I in offline data preparation tool I;

[0045] It should be noted that when the code amount of offline data preparation tool III for processing part2 data part is small and convenient for transplantation, the key logic code can be introduced into offline data preparation tool I. This method is suitable for the case when the code amount of offline data preparation tool III is small and convenient for transplantation.

[0046] S3, when offline data preparation tool I is running and offline data preparation tool II is not called, part2 data part is processed by function module I to generate intermediate temporary data file result2 for calling offline data preparation tool II when running; and store the intermediate temporary data file result2 generated by function module I in a certain directory in offline data preparation tool II which will not be modified;

[0047] S4, rewrite the function of offline data preparation tool III, keep its external interface parameters unchanged, modify its internal function as follows: when offline data preparation tool III is called by offline data preparation tool II, offline data preparation tool III copies the intermediate temporary data file result2 from its storage directory in offline data preparation tool II to the output directory of offline data preparation tool III as the output data of offline data preparation tool III;

[0048] S5, take part1 data part as the input file of offline data preparation tool II, process it by the processing logic of offline data preparation tool II itself to generate processing result data result1;

[0049] S6, during the running of offline data preparation tool II, when offline data preparation tool II calls offline data preparation tool III, generate the same calling instruction and transmit it to offline data preparation tool III; offline data preparation tool III transmits the intermediate temporary data file result2 to the output directory of offline data preparation tool III;

[0050] S7, offline data preparation tool II performs logical operation on intermediate temporary data file result2 and data result1 generated by offline data preparation tool II after processing part1 part, and generates the output file of offline data preparation tool II after operation.

[0051] Further, in S1, according to the input data requirements of offline data preparation tool II called by offline data preparation tool I during running, and the input data requirements of offline data preparation tool III called by offline data preparation tool II during generating files, the input file of offline data preparation tool I is split into independent part1 data part and part2 data part; wherein part1 data part corresponds to offline data preparation tool II, and part2 data part corresponds to function module I.

[0052] Further, in S6, during the running of offline data preparation tool II, offline data preparation tool II creates a temporary folder, when offline data preparation tool II calls offline data preparation tool III, generates the same calling instruction and transmits it to offline data preparation tool III; during this process, the output parameter path obtained by offline data preparation tool III is the path of the temporary folder in offline data preparation tool II; offline data preparation tool III copies the intermediate temporary data file result2 to the temporary folder of offline data preparation tool II.

[0053] Further, in S7, after the operation of offline data preparation tool II is completed, the output file of offline data preparation tool II is generated and all files in the temporary folder are emptied.

[0054] Further, the output file generated by the offline data preparation tool II in step S7 is the output of the offline data preparation tool I.

[0055] The method of splitting the input file to form corresponding function independent input files reduces the difficulty of the lower level tool in reading the required input data in the input file. The function of tool C is introduced into the logical processing of tool A code, and tool A thus integrates the function of tool C, which is easy to maintain tool A without relying on the function of the released tool C, thereby improving the release efficiency of tool A. Meanwhile, the intermediate file (result2) is generated to the required temporary folder at the correct time point without affecting the running of tool B. Tool B adopts the form of calling "fake tool C" to copy the generated intermediate data file to the required intermediate file output directory, so that the processing flow of tool B in calling "tool C" to generate the required intermediate file of tool B is not affected. In this scheme, tool A only depends on tool B without relying on tool C, which reduces the dependency of tool A and greatly facilitates the development and release progress of tool A. This scheme also improves the versatility of the use scenario of tool A. For the input file in which the intermediate data (result2) is prepared, this scheme is still applicable. Tool A can decide whether to call function C according to whether the input file is part1 and part2 or part1 and result2. When the input file type is part1 and result2, tool A does not call function C, and tool B can still copy the provided and input "intermediate data file" result2 to the required output directory (temporary folder of tool B) when calling "fake tool C".

Claims

1. An optimization method for multiple offline tool invocation generating temporary files, characterized in that, The optimization method comprises the following steps: S1, split the input file of the offline data preparation tool I, split the input file of the offline data preparation tool I into independent part1 data part and part2 data part; S2, introduce the key logic code for processing the part2 data part in the offline data preparation tool III for processing the part2 data part into the offline data preparation tool I, and the introduced key logic code is called function module I in the offline data preparation tool I; S3, during the running of the offline data preparation tool I and before the offline data preparation tool I calls the offline data preparation tool II, the part2 data part is processed by the function module I to generate an intermediate temporary data file result2 for calling the offline data preparation tool II during running, and the intermediate temporary data file result2 generated by the function module I is stored in a certain directory in the offline data preparation tool II which will not be modified; S4, rewrite the function of the offline data preparation tool III, keep its external interface parameters unchanged, and modify its internal function as follows: when the offline data preparation tool III is called by the offline data preparation tool II, the offline data preparation tool III copies the intermediate temporary data file result2 from the storage directory of the offline data preparation tool II to the output directory of the offline data preparation tool III as the output data of the disguised offline data preparation tool III; S5, the part1 data part is taken as the input file of the offline data preparation tool II, and is processed by the processing logic of the offline data preparation tool II itself to generate the processing result data result1; S6, during the running of the offline data preparation tool II, when the offline data preparation tool II calls the offline data preparation tool III, the same calling instruction is transmitted to the disguised offline data preparation tool III; the disguised offline data preparation tool III transmits the intermediate temporary data file result2 to the output directory of the disguised offline data preparation tool III; S7, the offline data preparation tool II performs logical operation on the intermediate temporary data file result2 and the data result1 generated by processing the part1 part itself, and generates the output file of the offline data preparation tool II after the operation is completed.

2. The method of claim 1, wherein: In the S1 step, the input file of the offline data preparation tool I is split into independent part1 data part and part2 data part according to the input data requirements of the offline data preparation tool II called by the offline data preparation tool I during running, and the input data requirements of the offline data preparation tool III called by the offline data preparation tool II during generating the file; wherein the part1 data part corresponds to the offline data preparation tool II, and the part2 data part corresponds to the function module I.

3. The method of claim 1 or 2, wherein: In the S6 step, a temporary folder is created during the running of the offline data preparation tool II, and the same calling instruction is transmitted to the disguised offline data preparation tool III when the offline data preparation tool II calls the offline data preparation tool III; The output parameter path acquired by the camouflage offline data preparation tool III in the process is the path of the temporary folder of the offline data preparation tool II; The camouflage offline data preparation tool III copies the intermediate temporary data file result2 to the temporary folder of the offline data preparation tool II.

4. The method of claim 3, wherein: In the S7 step, the offline data preparation tool II generates the output file of the offline data preparation tool II after the operation is completed and clears all files in the temporary folder.

5. The method of claim 1, wherein: the plurality of offline tools are invoked to generate the temporary file. The output file generated by the offline data preparation tool II in the S7 step is the output of the offline data preparation tool I. ​

Citation Information

Patent Citations

  • Multi-module scheduling method, device and system

    CN109960571A

  • Task data storage and recovery method and device, server and storage medium

    CN112486639A