Batch execution file generation method, device, medium and equipment
By generating and processing batch execution files in the banking system, the complex and inefficient business processes of batch file transactions in the banking system are solved, and automated processing and efficient batch file operations are realized.
Patent Information
- Application Number
- CN202211242662.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-11
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2042-10-11
AI Technical Summary
The business process of batch file transactions between multiple associated systems in the banking system is complex and relies on manual processing, which is prone to errors and inefficient.
By obtaining the target source data in a directional manner, assemble the data into batch files according to preset assembly rules, and inserting execution code into the file to generate the target batch execution file to achieve automated processing.
Improves the efficiency of batch file processing, reduces manual errors, and achieves higher automation and accuracy.
Smart Images

Figure CN115665126B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of electronic communication technology, and in particular to the field of batch execution file generation technology, and in particular to a batch execution file generation method, device, medium and equipment. Background Art
[0002] Taking the banking system as an example, the bank's intermediary business platform connects to multiple related systems inside and outside the bank. There are a large number of batch file transactions between multiple related systems. The types of batch file transactions include batch salary payment, batch deduction of water and electricity bills, batch refunds, etc. The business process is complicated. Currently, batch file processing operations mainly rely on manual labor, which is not only prone to errors but also inefficient. Summary of the invention
[0003] The embodiments of the present application provide a method, apparatus, medium and equipment for generating a batch execution file. The method for generating a batch execution file provided by the embodiments of the present application is used to obtain the target source data in a targeted manner and assemble the obtained target source data into a batch file according to a preset assembly rule, and insert a preset execution code into each long data in the batch file to obtain a target batch execution file. The entire process is automated by code, which is more efficient and less error-prone.
[0004] On the one hand, an embodiment of the present application provides a method for generating batch execution files, and the method for generating batch execution files includes:
[0005] Receive a batch execution file generation request initiated by the requesting end;
[0006] Parsing the batch execution file generation request to obtain address information and preset identifiers of target source data of each category in the batch execution file to be generated;
[0007] Calling a read function to extract target source data corresponding to the preset identifier from the Excel file corresponding to the address information;
[0008] Assembling the target source data into a batch file according to a preset assembly rule, wherein the batch file contains a plurality of long data pieces which are composed of the target source data and respectively belong to different preset identifiers;
[0009] A preset execution code is inserted into each long data in the batch file to obtain a target batch execution file, wherein the execution code is used to instruct the execution end to execute a specified batch operation based on each long data.
[0010] In the batch execution file generation method described in the embodiment of the present application, after obtaining the target batch execution file, the method further includes:
[0011] Uploading the target batch execution files to a file server, and recording the storage path of the target batch execution files in the file server;
[0012] The storage path is sent to the execution end.
[0013] In the batch execution file generation method described in the embodiment of the present application, after obtaining the target batch execution file, the method further includes:
[0014] Convert all character strings contained in the batch file into a first MD5 code through an encryption algorithm, and bind the first MD5 code to the target batch execution file;
[0015] Uploading the first MD5 code together with the target batch execution file to a file server, and recording the storage path of the target batch execution file in the file server;
[0016] The storage path is sent to the execution end.
[0017] In the batch execution file generation method described in the embodiment of the present application, the method further includes:
[0018] Receiving a batch execution file download request initiated by the execution end;
[0019] Parsing the batch execution file download request to obtain the storage path of the batch execution file to be downloaded;
[0020] Downloading the target batch execution file and the first MD5 code from the file server according to the storage path;
[0021] The execution code in the target batch execution file is loaded, and the specified batch operation is executed based on each of the long data to obtain the actual execution result.
[0022] In the batch execution file generation method described in the embodiment of the present application, before loading the execution code in the target batch execution file, the method further includes:
[0023] Convert all character strings contained in the target batch execution file into a second MD5 code through an encryption algorithm;
[0024] Compare the first MD5 code with the second MD5 code;
[0025] If the first MD5 code is inconsistent with the second MD5 code, the step of loading the execution code in the target batch execution file is rejected.
[0026] In the batch execution file generation method described in the embodiment of the present application, after obtaining the actual execution result, the method further includes:
[0027] comparing the actual execution result with the expected execution result;
[0028] If the actual execution result is inconsistent with the expected execution result, an abnormal prompt message is generated;
[0029] The abnormal prompt information is sent to the requesting end.
[0030] In the batch execution file generation method described in the embodiment of the present application, the abnormal prompt information includes the abnormal cause, wherein different abnormal causes are displayed by preset identification codes.
[0031] Correspondingly, another aspect of the embodiment of the present application further provides a batch execution file generation device, the batch execution file generation device comprising:
[0032] A receiving module, used for receiving a batch execution file generation request initiated by a requesting end;
[0033] A parsing module, used for parsing the batch execution file generation request, and obtaining the address information and preset identifiers of each category of target source data in the batch execution file to be generated;
[0034] An extraction module, used for calling a read function to extract target source data corresponding to the preset identifier from the Excel file corresponding to the address information;
[0035] An assembly module, used for assembling the target source data into a batch file according to a preset assembly rule, wherein the batch file contains a plurality of long data pieces which are composed of the target source data and respectively belong to different preset identifiers;
[0036] The generation module is used to insert a preset execution code for each long data in the batch file to obtain a target batch execution file, wherein the execution code is used to instruct the execution end to perform a specified batch operation based on each long data.
[0037] Correspondingly, another aspect of the embodiment of the present application further provides a storage medium, wherein the storage medium stores a plurality of instructions, wherein the instructions are suitable for loading by a processor to execute the batch execution file generation method as described above.
[0038] Correspondingly, on the other hand, an embodiment of the present application further provides a terminal device, including a processor and a memory, wherein the memory stores a plurality of instructions, and the processor loads the instructions to execute the batch execution file generation method as described above.
[0039] An embodiment of the present application provides a method, apparatus, medium and device for generating a batch execution file, wherein the method receives a batch execution file generation request initiated by a requesting end; parses the batch execution file generation request to obtain address information and preset identifiers of target source data of each category in the batch execution file to be generated; calls a read function to extract target source data corresponding to the preset identifier from an Excel file corresponding to the address information; assembles the target source data into a batch file according to a preset assembly rule, wherein the batch file contains a plurality of long data consisting of the target source data and respectively belonging to different preset identifiers; inserts a preset execution code into each long data in the batch file to obtain a target batch execution file, wherein the execution code is used to instruct the execution end to perform a specified batch operation based on each long data. The batch execution file generation method provided by the embodiment of the present application is used to store the batch file in an Excel file, and then use the read function to obtain the target source data from the Excel file in a targeted manner, and then assemble the obtained target source data into a batch file according to the preset assembly rules, and insert the preset execution code for each long data in the batch file, and upload the target batch execution file to the server after obtaining it, and generate a notification message to send to the subordinate system at the same time, notifying the subordinate system to obtain the target batch execution file from the server according to the given data acquisition path to perform batch processing operations. The whole process is automated with code, which is more efficient and less prone to errors. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application, and those skilled in the art can obtain other drawings based on these drawings without creative work.
[0041] Figure 1 A flowchart of a method for generating batch execution files provided in an embodiment of the present application.
[0042] Figure 2 A schematic diagram of the structure of a batch execution file generation device provided in an embodiment of the present application.
[0043] Figure 3 Another structural schematic diagram of the batch execution file generation device provided in an embodiment of the present application.
[0044] Figure 4 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0045] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.
[0046] It should be noted that this solution is mainly applicable to the application scenario of batch file processing. The following is a brief introduction to the background of this solution:
[0047] This solution is mainly developed around the technical problem of "how to improve the efficiency of batch file processing and replace the traditional manual processing method to reduce labor costs and error rates". It is understandable that, taking the banking system as an example, the bank's intermediary business platform connects multiple related systems inside and outside the bank, and there are a large number of batch file transactions between multiple related systems. The types of batch file transactions include batch salary payment, batch deduction of water and electricity bills, batch refunds, etc. The business process is complicated. At present, it mainly relies on manual batch file processing operations, which is not only prone to errors but also inefficient.
[0048] In order to solve the above technical problems, the embodiment of the present application provides a batch execution file generation method. Using the batch execution file generation method provided by the embodiment of the present application, the batch file is stored in an Excel file, and then the target source data is obtained from the Excel file by using the read function, and the obtained target source data is assembled into a batch file according to the preset assembly rules, and the preset execution code is inserted into each long data in the batch file, and the target batch execution file is obtained and uploaded to the server, and a notification message is generated and sent to the subordinate system at the same time, notifying the subordinate system to obtain the target file (batch execution file) from the server according to the given data acquisition path to perform batch processing operations. The whole process is automated with code, which is more efficient and less prone to errors.
[0049] See also Figure 1 , Figure 1A flow chart of a method for generating batch execution files provided in an embodiment of the present application. The method for generating batch execution files is applied to a terminal device. Optionally, the terminal device is a terminal or a server. Optionally, the server is an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. Optionally, the terminal is a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, an intelligent voice interaction device, a smart home appliance, and a vehicle-mounted terminal, etc., but is not limited to this.
[0050] In one embodiment, the present solution is explained by taking a bank's batch deduction as an example, and the method may include the following steps:
[0051] Step 101: receiving a batch execution file generation request initiated by a requesting end.
[0052] Among them, the requesting end refers to the requesting party who requests for batch deduction business. Taking the highway ETC system as an example, the highway ETC system can automatically (for example, set the trigger condition "automatically execute at 9:00 am every day") or manually initiate a batch execution file generation request to the terminal device running this method, and automatically generate a batch execution file through the terminal device.
[0053] Step 102, parsing the batch execution file generation request to obtain address information and preset identifiers of target source data of each category in the batch execution file to be generated.
[0054] The target source data refers to the data used to construct the batch execution file, such as the deduction account, user name, deduction amount, etc. The address information refers to the storage path where the target source data is stored. In this solution, an Excel file is used to store the source data, which is convenient for data sorting and data extraction by the associated system. The preset identifier refers to the identifier used to identify its identity characteristics from a large amount of source data, such as the ID number "xxx".
[0055] Step 103: Call a read function to extract target source data corresponding to the preset identifier from the Excel file corresponding to the address information.
[0056] The reading function uses excelDataService.getDataFromExcel, and according to the address information and preset identifier parsed in the batch execution file generation request, extracts the target source data corresponding to the preset identifier from the Excel file corresponding to the address information.
[0057] Step 104, assembling the target source data into a batch file according to a preset assembly rule, wherein the batch file contains a plurality of long data pieces which are constituted by the target source data and respectively belong to different preset identifiers.
[0058] Among them, the assembly rules are used to guide the terminal device on how to automatically assemble the target source data into batch files. The batch files specifically contain multiple long data composed of the target source data and respectively attributed to different preset identifiers, such as the long data "user name, deduction account, deduction amount, deduction items".
[0059] Step 105, inserting a preset execution code for each long data into the batch file to obtain a target batch execution file, wherein the execution code is used to instruct the execution end to execute a specified batch operation based on each long data.
[0060] The execution end refers to receiving the target batch execution file generated by the terminal device and executing the specified batch operation, such as batch deduction operation, according to the target batch execution file. In order to enable the execution end to automatically perform the specified batch operation after receiving the target batch execution file, this solution inserts a preset execution code for each long data in the batch file before generating the target batch execution file, so that the execution end can perform the specified batch operation based on each long data after loading the execution code in the target batch execution file to obtain the actual execution result.
[0061] In some embodiments, after generating the target batch execution file, the terminal device uploads the target batch execution file to the file server for storage, records the storage path of the target batch execution file in the file server, and sends the storage path to the execution end. The execution end can download the specified target batch execution file from the file server according to the storage path.
[0062] In some embodiments, since some data carried by the batch execution file involves sensitive information, such as the deduction amount, once it is intercepted and tampered with by a terminal of an illegal element, it will cause immeasurable serious consequences. Therefore, in order to prevent the data from being tampered with, this solution converts all the strings contained in the batch file through an encryption algorithm to obtain a first MD5 code, and binds the first MD5 code to the target batch execution file; uploads the first MD5 code and the target batch execution file to the file server, and records the storage path of the target batch execution file in the file server; and sends the storage path to the execution end.
[0063] When the execution end needs to obtain the target batch execution file, a batch execution file download request is initiated to the terminal device, and the target batch execution file and the first MD5 code are downloaded from the file server according to the storage path through the terminal device. After obtaining the target batch execution file and the first MD5 code, the execution end needs to convert all the strings contained in the target batch execution file through an encryption algorithm to obtain a second MD5 code, and compare the first MD5 code with the second MD5 code. If the first MD5 code is inconsistent with the second MD5 code, the execution code step of loading the target batch execution file is refused. If the first MD5 code matches the second MD5 code, the execution code in the target batch execution file is loaded, and the specified batch operation is performed based on each long data to obtain the actual execution result. Among them, the actual execution result includes one of a successful batch operation result and a failed batch operation result.
[0064] In some embodiments, since not all specified batch operations can be successful, for example, in the scenario of debiting fees, if the balance of the account to be debited is insufficient, the debiting operation cannot be completed smoothly. Therefore, it is necessary to compare the actual execution result with the expected execution result. If the actual execution result is inconsistent with the expected execution result, an abnormal prompt message is generated and sent to the requesting end to inform the batch execution result.
[0065] In some embodiments, the abnormal prompt information includes the abnormal reason, wherein different abnormal reasons are displayed by preset identification codes, for example, "insufficient balance" is displayed by "100".
[0066] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.
[0067] In specific implementation, the present application is not limited by the execution order of the various steps described. If no conflict occurs, some steps can be performed in other orders or simultaneously.
[0068] As can be seen from the above, the batch execution file generation method provided in the embodiment of the present application is through receiving a batch execution file generation request initiated by a requesting end; parsing the batch execution file generation request to obtain the address information and preset identifier of each category of target source data in the batch execution file to be generated; calling a read function to extract the target source data corresponding to the preset identifier from the Excel file corresponding to the address information; assembling the target source data into a batch file according to a preset assembly rule, the batch file containing multiple long data composed of the target source data and respectively belonging to different preset identifiers; inserting a preset execution code for each long data in the batch file to obtain a target batch execution file, wherein the execution code is used to instruct the execution end to perform a specified batch operation based on each of the long data. The batch execution file generation method provided by the embodiment of the present application is used to store the batch file in an Excel file, and then use the read function to obtain the target source data from the Excel file in a targeted manner, and then assemble the obtained target source data into a batch file according to the preset assembly rules, and insert the preset execution code for each long data in the batch file, and upload the target batch execution file to the server after obtaining it, and generate a notification message to send to the subordinate system at the same time, notifying the subordinate system to obtain the target batch execution file from the server according to the given data acquisition path to perform batch processing operations. The whole process is automated with code, which is more efficient and less prone to errors.
[0069] The embodiment of the present application also provides a batch execution file generation device, which can be integrated in a terminal device.
[0070] See also Figure 2 , Figure 2 A schematic diagram of the structure of a batch execution file generation device provided in an embodiment of the present application. The batch execution file generation device 30 may include:
[0071] The receiving module 31 is used to receive a batch execution file generation request initiated by a requesting end;
[0072] The parsing module 32 is used to parse the batch execution file generation request to obtain the address information and preset identifiers of each category of target source data in the batch execution file to be generated;
[0073] An extraction module 33 is used to call a reading function to extract target source data corresponding to the preset identifier from the Excel file corresponding to the address information;
[0074] An assembly module 34, used to assemble the target source data into a batch file according to a preset assembly rule, wherein the batch file contains a plurality of long data pieces which are composed of the target source data and respectively belong to different preset identifiers;
[0075] The generating module 35 is used to insert a preset execution code for each long data in the batch file to obtain a target batch execution file, wherein the execution code is used to instruct the execution end to execute a specified batch operation based on each long data.
[0076] In some embodiments, the device further includes a recording module for uploading the target batch execution files to a file server and recording a storage path of the target batch execution files in the file server; and sending the storage path to the execution end.
[0077] In some embodiments, the device also includes a processing module, which is used to convert all the character strings contained in the batch file through an encryption algorithm to obtain a first MD5 code, bind the first MD5 code to the target batch execution file; upload the first MD5 code and the target batch execution file together to a file server, and record the storage path of the target batch execution file in the file server; and send the storage path to the execution end.
[0078] In some embodiments, the device also includes a download module, which is used to receive a batch execution file download request initiated by the execution end; parse the batch execution file download request to obtain the storage path of the batch execution file to be downloaded; download the target batch execution file and the first MD5 code from the file server according to the storage path; load the execution code in the target batch execution file, execute the specified batch operation based on each of the long data, and obtain the actual execution result.
[0079] In some embodiments, the device also includes a verification module, which is used to convert all strings contained in the target batch execution file through an encryption algorithm to obtain a second MD5 code; compare the first MD5 code with the second MD5 code; if the first MD5 code is inconsistent with the second MD5 code, refuse to execute the execution code step of loading the target batch execution file.
[0080] In some embodiments, the device further includes a comparison module for comparing the actual execution result with the expected execution result; if the actual execution result is inconsistent with the expected execution result, generating an abnormal prompt message; and sending the abnormal prompt message to the requesting end.
[0081] In some embodiments, the abnormal prompt information includes the abnormal reason, wherein different abnormal reasons are displayed by preset identification codes.
[0082] In specific implementation, the above modules can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same entity or several entities.
[0083] As can be seen from the above, the batch execution file generation device 30 provided by the embodiment of the present application, wherein the receiving module 31 is used to receive a batch execution file generation request initiated by the requesting end; the parsing module 32 is used to parse the batch execution file generation request to obtain the address information and preset identifier of each category of target source data in the batch execution file to be generated; the extraction module 33 is used to call the reading function to extract the target source data corresponding to the preset identifier from the Excel file corresponding to the address information; the assembling module 34 is used to assemble the target source data into a batch file according to a preset assembly rule, and the batch file contains a plurality of long data composed of the target source data and respectively belonging to different preset identifiers; the generating module 35 is used to insert a preset execution code for each long data in the batch file to obtain a target batch execution file, wherein the execution code is used to instruct the execution end to perform a specified batch operation based on each of the long data.
[0084] See also Figure 3 , Figure 3 Another structural diagram of a batch execution file generation device provided in an embodiment of the present application, the batch execution file generation device 30 includes a memory 120, one or more processors 180, and one or more application programs, wherein the one or more application programs are stored in the memory 120 and configured to be executed by the processor 180; the processor 180 may include a receiving module 31, a parsing module 32, an extracting module 33, an assembling module 34, and a generating module 35. For example, the structure and connection relationship of the above components may be as follows:
[0085] The memory 120 can be used to store applications and data. The applications stored in the memory 120 include executable codes. The applications can be composed of various functional modules. The processor 180 executes various functional applications and data processing by running the applications stored in the memory 120. In addition, the memory 120 may include a high-speed random access memory and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 120 may also include a memory controller to provide the processor 180 with access to the memory 120.
[0086] The processor 180 is the control center of the device, and uses various interfaces and lines to connect various parts of the entire terminal, and executes various functions of the device and processes data by running or executing applications stored in the memory 120, and calling data stored in the memory 120, so as to monitor the device as a whole. Optionally, the processor 180 may include one or more processing cores; preferably, the processor 180 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs.
[0087] Specifically in this embodiment, the processor 180 will load the executable code corresponding to the process of one or more applications into the memory 120 according to the following instructions, and the processor 180 will run the application stored in the memory 120 to implement various functions:
[0088] A receiving instruction is used to receive a batch execution file generation request initiated by a requesting end;
[0089] A parsing instruction, used to parse the batch execution file generation request to obtain address information and preset identifiers of target source data of each category in the batch execution file to be generated;
[0090] An extraction instruction, used for calling a read function to extract target source data corresponding to the preset identifier from the Excel file corresponding to the address information;
[0091] An assembly instruction, used to assemble the target source data into a batch file according to a preset assembly rule, wherein the batch file contains a plurality of long data pieces which are composed of the target source data and respectively belong to different preset identifiers;
[0092] Generate instructions for inserting preset execution codes for each long data in the batch file to obtain a target batch execution file, wherein the execution code is used to instruct the execution end to perform a specified batch operation based on each long data.
[0093] In some embodiments, the program further includes a recording instruction for uploading the target batch execution file to a file server and recording a storage path of the target batch execution file in the file server; and sending the storage path to the execution end.
[0094] In some embodiments, the program also includes processing instructions for converting all character strings contained in the batch file through an encryption algorithm to obtain a first MD5 code, binding the first MD5 code to the target batch execution file; uploading the first MD5 code together with the target batch execution file to a file server, and recording the storage path of the target batch execution file in the file server; and sending the storage path to the execution end.
[0095] In some embodiments, the program also includes a download instruction for receiving a batch execution file download request initiated by the execution end; parsing the batch execution file download request to obtain a storage path of the batch execution file to be downloaded; downloading the target batch execution file and the first MD5 code from the file server according to the storage path; loading the execution code in the target batch execution file, performing a specified batch operation based on each of the long data, and obtaining an actual execution result.
[0096] In some embodiments, the program also includes verification instructions for converting all character strings contained in the target batch execution file through an encryption algorithm to obtain a second MD5 code; comparing the first MD5 code with the second MD5 code; if the first MD5 code is inconsistent with the second MD5 code, refusing to execute the execution code step of loading the target batch execution file.
[0097] In some embodiments, the program further includes a comparison instruction for comparing the actual execution result with the expected execution result; if the actual execution result is inconsistent with the expected execution result, an exception prompt message is generated; and the exception prompt message is sent to the requesting end.
[0098] In some embodiments, the abnormal prompt information includes the abnormal reason, wherein different abnormal reasons are displayed by preset identification codes.
[0099] The embodiment of the present application also provides a terminal device, which can be a server, a smart phone, a computer, a tablet computer, or other device.
[0100] See also Figure 4 , Figure 4 The schematic diagram of the structure of the terminal device provided in the embodiment of the present application is shown, and the terminal device can be used to implement the batch execution file generation method provided in the above embodiment. The terminal device 1200 can be a TV, a smart phone, or a tablet computer.
[0101] like Figure 4 As shown, the terminal device 1200 may include an RF (Radio Frequency) circuit 110, a memory 120 including one or more (only one is shown in the figure) computer-readable storage media, an input unit 130, a display unit 140, a sensor 150, an audio circuit 160, a transmission module 170, a processor 180 including one or more (only one is shown in the figure) processing cores, and a power supply 190. Those skilled in the art will understand that Figure 4 The structure of the terminal device 1200 shown in the figure does not constitute a limitation on the terminal device 1200, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0102] The RF circuit 110 is used to receive and send electromagnetic waves, realize the mutual conversion between electromagnetic waves and electrical signals, and thus communicate with a communication network or other devices. The RF circuit 110 may include various existing circuit elements for performing these functions, such as an antenna, a radio frequency transceiver, a digital signal processor, an encryption / decryption chip, a user identity module (SIM) card, a memory, etc. The RF circuit 110 can communicate with various networks such as the Internet, an intranet, a wireless network, or communicate with other devices through a wireless network.
[0103] The memory 120 can be used to store software programs and modules, such as the program instructions / modules corresponding to the batch execution file generation method in the above embodiment. The processor 180 executes various functional applications and data processing by running the software programs and modules stored in the memory 120. The vibration reminder mode can be automatically selected according to the current scene of the terminal device to generate batch execution files, which can not only ensure that scenes such as meetings are not disturbed, but also ensure that users can perceive incoming calls, thereby improving the intelligence of the terminal device. The memory 120 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 120 may further include a memory remotely arranged relative to the processor 180, and these remote memories may be connected to the terminal device 1200 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0104] The input unit 130 can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control. Specifically, the input unit 130 may include a touch-sensitive surface 131 and other input devices 132. The touch-sensitive surface 131, also known as a touch display screen or a touch pad, can collect the user's touch operations on or near it (such as the user's operation on or near the touch-sensitive surface 131 using any suitable object or accessory such as a finger, stylus, etc.), and drive the corresponding connection device according to a pre-set program. Optionally, the touch-sensitive surface 131 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into touch point coordinates, and then sends it to the processor 180, and can receive and execute commands sent by the processor 180. In addition, the touch-sensitive surface 131 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch-sensitive surface 131, the input unit 130 may further include other input devices 132. Specifically, the other input devices 132 may include, but are not limited to, one or more of a physical keyboard, a function key (such as a volume control key, a switch key, etc.), a trackball, a mouse, a joystick, and the like.
[0105] The display unit 140 can be used to display information input by the user or information provided to the user and various graphical user interfaces of the terminal device 1200, which can be composed of graphics, text, icons, videos and any combination thereof. The display unit 140 may include a display panel 141. Optionally, the display panel 141 may be configured in the form of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), etc. Further, the touch-sensitive surface 131 may cover the display panel 141. When the touch-sensitive surface 131 detects a touch operation on or near it, it is transmitted to the processor 180 to determine the type of touch event. Subsequently, the processor 180 provides corresponding visual output on the display panel 141 according to the type of touch event. Although in Figure 4 In the embodiment, the touch-sensitive surface 131 and the display panel 141 are implemented as two independent components to realize the input and output functions. However, in some embodiments, the touch-sensitive surface 131 and the display panel 141 can be integrated to realize the input and output functions.
[0106] The terminal device 1200 may also include at least one sensor 150, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 141 according to the brightness of the ambient light, and the proximity sensor may turn off the display panel 141 and / or the backlight when the terminal device 1200 is moved to the ear. As a type of motion sensor, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally three axes), and can detect the magnitude and direction of gravity when stationary, which can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that can also be configured in the terminal device 1200, they will not be repeated here.
[0107] The audio circuit 160, the speaker 161, and the microphone 162 can provide an audio interface between the user and the terminal device 1200. The audio circuit 160 can transmit the received audio data to the speaker 161 after converting the received audio data into an electrical signal, which is converted into a sound signal for output by the speaker 161; on the other hand, the microphone 162 converts the collected sound signal into an electrical signal, which is received by the audio circuit 160 and converted into audio data, and then the audio data is output to the processor 180 for processing, and then sent to another terminal through the RF circuit 110, or the audio data is output to the memory 120 for further processing. The audio circuit 160 may also include an earplug jack to provide communication between an external headset and the terminal device 1200.
[0108] The terminal device 1200 can help users send and receive emails, browse web pages, and access streaming media through the transmission module 170 (such as a Wi-Fi module), which provides users with wireless broadband Internet access. Figure 4 The transmission module 170 is shown, but it is understandable that it is not a necessary component of the terminal device 1200 and can be omitted as needed without changing the essence of the invention.
[0109] The processor 180 is the control center of the terminal device 1200. It uses various interfaces and lines to connect various parts of the entire mobile phone. By running or executing software programs and / or modules stored in the memory 120, and calling data stored in the memory 120, it executes various functions of the terminal device 1200 and processes data, thereby monitoring the mobile phone as a whole. Optionally, the processor 180 may include one or more processing cores; in some embodiments, the processor 180 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 180.
[0110] The terminal device 1200 also includes a power supply 190 for supplying power to various components. In some embodiments, the power supply can be logically connected to the processor 180 through a power management system, so that the power management system can realize functions such as managing discharge and power consumption. The power supply 190 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.
[0111] Although not shown, the terminal device 1200 may also include a camera (such as a front camera, a rear camera), a Bluetooth module, etc., which will not be described in detail here. Specifically in this embodiment, the display unit 140 of the terminal device 1200 is a touch screen display, and the terminal device 1200 also includes a memory 120, and one or more programs, wherein one or more programs are stored in the memory 120, and are configured to be executed by one or more processors 180. One or more programs include instructions for performing the following operations:
[0112] A receiving instruction is used to receive a batch execution file generation request initiated by a requesting end;
[0113] A parsing instruction, used to parse the batch execution file generation request to obtain address information and preset identifiers of target source data of each category in the batch execution file to be generated;
[0114] An extraction instruction, used for calling a read function to extract target source data corresponding to the preset identifier from the Excel file corresponding to the address information;
[0115] An assembly instruction, used to assemble the target source data into a batch file according to a preset assembly rule, wherein the batch file contains a plurality of long data pieces which are composed of the target source data and respectively belong to different preset identifiers;
[0116] Generate instructions for inserting preset execution codes for each long data in the batch file to obtain a target batch execution file, wherein the execution code is used to instruct the execution end to perform a specified batch operation based on each long data.
[0117] In some embodiments, the program further includes a recording instruction for uploading the target batch execution file to a file server and recording a storage path of the target batch execution file in the file server; and sending the storage path to the execution end.
[0118] In some embodiments, the program also includes processing instructions for converting all character strings contained in the batch file through an encryption algorithm to obtain a first MD5 code, binding the first MD5 code to the target batch execution file; uploading the first MD5 code together with the target batch execution file to a file server, and recording the storage path of the target batch execution file in the file server; and sending the storage path to the execution end.
[0119] In some embodiments, the program also includes a download instruction for receiving a batch execution file download request initiated by the execution end; parsing the batch execution file download request to obtain a storage path of the batch execution file to be downloaded; downloading the target batch execution file and the first MD5 code from the file server according to the storage path; loading the execution code in the target batch execution file, performing a specified batch operation based on each of the long data, and obtaining an actual execution result.
[0120] In some embodiments, the program also includes verification instructions for converting all character strings contained in the target batch execution file through an encryption algorithm to obtain a second MD5 code; comparing the first MD5 code with the second MD5 code; if the first MD5 code is inconsistent with the second MD5 code, refusing to execute the execution code step of loading the target batch execution file.
[0121] In some embodiments, the program further includes a comparison instruction for comparing the actual execution result with the expected execution result; if the actual execution result is inconsistent with the expected execution result, an exception prompt message is generated; and the exception prompt message is sent to the requesting end.
[0122] In some embodiments, the abnormal prompt information includes the abnormal reason, wherein different abnormal reasons are displayed by preset identification codes.
[0123] The embodiment of the present application also provides a terminal device, which can be a smart phone, a computer, or other device.
[0124] As can be seen from the above, the embodiment of the present application provides a terminal device 1200, and the terminal device 1200 performs the following steps:
[0125] Receive a batch execution file generation request initiated by the requesting end;
[0126] Parsing the batch execution file generation request to obtain address information and preset identifiers of target source data of each category in the batch execution file to be generated;
[0127] Calling a read function to extract target source data corresponding to the preset identifier from the Excel file corresponding to the address information;
[0128] Assembling the target source data into a batch file according to a preset assembly rule, wherein the batch file contains a plurality of long data pieces which are composed of the target source data and respectively belong to different preset identifiers;
[0129] A preset execution code is inserted into each long data in the batch file to obtain a target batch execution file, wherein the execution code is used to instruct the execution end to execute a specified batch operation based on each long data.
[0130] An embodiment of the present application further provides a storage medium, in which a computer program is stored. When the computer program runs on a computer, the computer executes the batch execution file generation method described in any of the above embodiments.
[0131] It should be noted that, for the batch execution file generation method described in the present application, ordinary testers in the field can understand that the implementation of all or part of the process of the batch execution file generation method described in the embodiment of the present application can be completed by controlling the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, such as a memory of a terminal device, and executed by at least one processor in the terminal device, and the execution process may include the process of the embodiment of the batch execution file generation method. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), etc.
[0132] For the batch execution file generation device of the embodiment of the present application, each functional module can be integrated into a processing chip, or each module can exist physically separately, or two or more modules can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium, such as a read-only memory, a disk or an optical disk.
[0133] The above is a detailed introduction to the batch execution file generation method, device, medium and equipment provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core ideas of the present application; at the same time, for those skilled in the art, according to the ideas of the present application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as limiting the present application.
Claims
1. A method for generating batch execution files, characterized in that: Applied to a terminal device, the method comprises: Receive a batch execution file generation request initiated by the requesting end; Parsing the batch execution file generation request to obtain address information and preset identifiers of target source data of each category in the batch execution file to be generated; Calling a read function to extract target source data corresponding to the preset identifier from the Excel file corresponding to the address information; Assembling the target source data into a batch file according to a preset assembly rule, wherein the batch file contains a plurality of long data pieces which are composed of the target source data and respectively belong to different preset identifiers; Inserting a preset execution code for each long data in the batch file to obtain a target batch execution file, wherein the execution code is used to instruct the execution end to perform a specified batch operation based on each long data; Uploading the target batch execution files to a file server, and recording the storage path of the target batch execution files in the file server; Sending the storage path to the execution end; The execution end is used for: Downloading the target batch execution file from the file server according to the storage path; Loading the execution code inserted for each long data in the target batch execution file; Batch operations are performed based on the execution code and the long data to obtain actual execution results.
2. The method for generating batch execution files according to claim 1, characterized in that: After obtaining the target batch execution file, the method further includes: Convert all character strings contained in the batch file into a first MD5 code through an encryption algorithm, and bind the first MD5 code to the target batch execution file; Uploading the first MD5 code together with the target batch execution file to a file server, and recording the storage path of the target batch execution file in the file server; The storage path is sent to the execution end.
3. The method for generating batch execution files according to claim 2, wherein: The method further comprises: Receiving a batch execution file download request initiated by the execution end; Parsing the batch execution file download request to obtain the storage path of the batch execution file to be downloaded; Downloading the target batch execution file and the first MD5 code from the file server according to the storage path; The execution code in the target batch execution file is loaded, and the specified batch operation is executed based on each of the long data to obtain the actual execution result.
4. The method for generating batch execution files according to claim 3, characterized in that: Before loading the execution code in the target batch execution file, the method further includes: Convert all character strings contained in the target batch execution file into a second MD5 code through an encryption algorithm; Compare the first MD5 code with the second MD5 code; If the first MD5 code is inconsistent with the second MD5 code, the step of loading the execution code in the target batch execution file is rejected.
5. The method for generating batch execution files according to claim 4, characterized in that: After obtaining the actual execution result, the method further includes: comparing the actual execution result with the expected execution result; If the actual execution result is inconsistent with the expected execution result, an abnormal prompt message is generated; The abnormal prompt information is sent to the requesting end.
6. The method for generating batch execution files according to claim 5, characterized in that: The abnormal prompt information includes the abnormal reason, wherein different abnormal reasons are displayed by preset identification codes.
7. A batch execution file generation device, characterized in that: Integrated on the terminal device, the batch execution file generation device includes: A receiving module, used for receiving a batch execution file generation request initiated by a requesting end; A parsing module, used for parsing the batch execution file generation request, and obtaining the address information and preset identifiers of each category of target source data in the batch execution file to be generated; An extraction module, used for calling a read function to extract target source data corresponding to the preset identifier from the Excel file corresponding to the address information; An assembly module, used for assembling the target source data into a batch file according to a preset assembly rule, wherein the batch file contains a plurality of long data pieces which are composed of the target source data and respectively belong to different preset identifiers; A generating module is used to insert a preset execution code for each long data in the batch file to obtain a target batch execution file, wherein the execution code is used to instruct the execution end to perform a specified batch operation based on each long data; upload the target batch execution file to a file server, and record a storage path of the target batch execution file in the file server; and send the storage path to the execution end; The execution end is used for: Downloading the target batch execution file from the file server according to the storage path; Loading the execution code inserted for each long data in the target batch execution file; Batch operations are performed based on the execution code and the long data to obtain actual execution results.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the batch execution file generation method according to any one of claims 1 to 6.
9. A terminal device, characterized in that: It comprises a processor and a memory, wherein the memory stores a plurality of instructions, and the processor loads the instructions to execute the batch execution file generation method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Batched instruction parsing method, batched instruction parsing apparatus and batched instruction parsing device
CN108804140A
File uploading and downloading method, device, equipment, system and storage medium
CN108809960A
Message analysis method and device, medium, equipment and program product
CN113329099A