CN115481090A - File processing method and device, electronic equipment and storage medium - Google Patents

File processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115481090A
CN115481090A CN202211151396.0A CN202211151396A CN115481090A CN 115481090 A CN115481090 A CN 115481090A CN 202211151396 A CN202211151396 A CN 202211151396A CN 115481090 A CN115481090 A CN 115481090A
Authority
CN
China
Prior art keywords
target
task
file
event
file processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211151396.0A
Other languages
Chinese (zh)
Inventor
石放放
李永福
胡巍
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Pudong Development Bank Co Ltd
Original Assignee
Shanghai Pudong Development Bank Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Pudong Development Bank Co Ltd filed Critical Shanghai Pudong Development Bank Co Ltd
Priority to CN202211151396.0A priority Critical patent/CN115481090A/en
Publication of CN115481090A publication Critical patent/CN115481090A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention discloses a file processing method and device, electronic equipment and a storage medium. The method can comprise the following steps: pulling up a target task to be executed, and executing the following steps by executing the target task: determining a target record from at least one preset file processing configuration record based on the task identifier of the target task, and obtaining the file type of a target file to be processed from the target record; and determining a target event for processing the target file from at least one file processing event configured in advance based on the task identifier and the file type, and processing the target file by executing the target event. According to the technical scheme of the embodiment of the invention, based on the processing architecture of the task and the file processing event, under the action of the file processing configuration record with a standardized format, the differentiated, diversified and personalized file processing process is realized in a configuration mode, and the code development process is basically not required, so that the development workload is reduced.

Description

File processing method and device, electronic equipment and storage medium
Technical Field
Embodiments of the present invention relate to the field of file processing technologies, and in particular, to a file processing method and apparatus, an electronic device, and a storage medium.
Background
With the rapid development and popularization of mobile internet and smart devices, cyber credit products (hereinafter, simply referred to as products) are rapidly developed.
In the face of the pressure of the same industry competition, the product demand is rapidly increased, and the requirement of a product manager on the delivery speed of the product is higher and higher, so that developers need to rapidly meet the development requirements of various products.
However, the processing flow of the accounting files related to various products is complicated and may be different, which means that each pair of new products needs to develop a set of unique file processing logic for the product, and a large development workload seriously affects the development efficiency.
Disclosure of Invention
The embodiment of the invention provides a file processing method and device, electronic equipment and a storage medium, which are used for reducing the development workload of file processing logic and improving the development efficiency.
According to an aspect of the present invention, there is provided a file processing method, which may include:
in response to the task execution instruction, pulling up a target task to be executed, and performing the following steps by executing the target task:
acquiring at least one file processing configuration record and at least one file processing event which are obtained by pre-configuration;
determining a target record from at least one file processing configuration record based on the task identifier of the target task, and obtaining the file type of a target file to be processed from the target record;
and determining a target event for processing the target file from the at least one file processing event based on the task identifier of the target task and the file type of the target file, and processing the target file by executing the target event.
According to another aspect of the present invention, there is provided a document processing apparatus, which may include:
the target task execution module is used for responding to the task execution instruction, pulling up a target task to be executed and executing the following steps by executing the target task;
the recording event acquisition module is used for acquiring at least one file processing configuration record and at least one file processing event which are obtained by pre-configuration;
the file type obtaining module is used for determining a target record from at least one file processing configuration record based on the task identifier of the target task and obtaining the file type of a target file to be processed from the target record;
and the target file processing module is used for determining a target event for processing the target file from at least one file processing event based on the task identifier of the target task and the file type of the target file, and processing the target file by executing the target event.
According to another aspect of the present invention, there is provided an electronic device, which may include:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to cause the at least one processor to perform a file processing method provided by any of the embodiments of the present invention when executed.
According to another aspect of the present invention, there is provided a computer-readable storage medium having stored thereon computer instructions for causing a processor to execute a method of processing a file provided by any of the embodiments of the present invention.
According to the technical scheme of the embodiment of the invention, the target task to be executed is pulled up by responding to the task execution instruction, and the following file processing logic is realized by executing the target task: based on a task identifier of a target task, determining a target record for representing a target file to be processed from at least one file processing configuration record obtained by pre-configuration, and obtaining a file type of the target file from the target record; and further, determining a target event for processing the target file from at least one file processing event obtained by pre-configuration based on the task identifier and the file type, and processing the target file by executing the target event. According to the technical scheme, when a new file processing logic is developed, the file processing logic can be realized in a configuration mode, namely, under the action of a file processing configuration record with a standardized format, a differentiated, diversified and personalized file processing process is realized through the configuration mode based on a processing framework of tasks and file processing events, so that the development workload is reduced, the development efficiency is improved, the product quality management is facilitated, and the problem of financial file requirements in a multi-modal network financial scene is effectively solved.
It should be understood that the statements in this section do not necessarily identify key or critical features of any embodiment of the present invention, nor do they necessarily limit the scope of the present invention. Other features of the present invention will become apparent from the following description.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the description below are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart of a file processing method according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating a relationship between a task and a document processing event in a document processing method according to an embodiment of the present invention;
FIG. 3 is a flow chart of another file processing method provided according to an embodiment of the invention;
FIG. 4 is a schematic diagram of a document processing configuration table in another document processing method according to an embodiment of the present invention;
FIG. 5 is a flow chart of another file processing method provided in accordance with an embodiment of the present invention;
FIG. 6 is a diagram illustrating a concurrent multitasking implementation in another document processing method according to an embodiment of the present invention;
FIG. 7 is a block diagram of a document processing apparatus according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of an electronic device implementing the file processing method according to the embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. The cases of "target", "original", etc. are similar and will not be described in detail herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Fig. 1 is a flowchart of a file processing method provided in an embodiment of the present invention. The present embodiment is applicable to a case where a file is processed by a file processing logic obtained in a configured manner, and particularly to a case where a file is generated in batch by a file generation logic obtained in a configured manner. The method can be executed by the file processing device provided by the embodiment of the invention, the device can be realized by software and/or hardware, the device can be integrated on electronic equipment, and the electronic equipment can be various user terminals or servers.
Referring to fig. 1, the method of the embodiment of the present invention specifically includes the following steps:
s110, in response to the task execution instruction, pulling up the target task to be executed, and executing the respective steps described below by executing the target task.
In the embodiment of the present invention, optionally, the task execution instruction may be generated in a variety of ways, for example, the task execution instruction may be generated when the current time is a preset time, that is, the task execution instruction may be automatically generated at a fixed time and a fixed point; if the task execution instruction is generated when a trigger operation acting on a preset entity key or a preset virtual control for generating the task execution instruction is received, the trigger operation can be a pressing operation or a clicking operation; and so on. The generation manner of the task execution instruction is related to an actual application scenario, and is not specifically limited herein.
In response to the task execution instruction, the target task to be executed is pulled up, and in the case of pre-configuring at least one task, the target task may be understood as a task with an execution requirement in the at least one task, which may be a part or all of the at least one task. In the embodiment of the present invention, optionally, each task in the at least one task corresponds to a respective file processing range, so that the task may be used to process a part of or all files in the corresponding file processing range, and a specific file processing logic may be set when the task is configured. In combination with application scenarios that may be related to embodiments of the present invention, optionally, taking an arbitrary task as an example, the task may correspond to one or more products, where any product of the products may relate to one or more files, and the files related to each product of the products may be completely the same, partially the same, or completely different, so that a file processing range corresponding to the task may be understood as a union of the files related to each product.
The target task is executed to process the corresponding file based on the file processing logic corresponding to the target task, and the specific file processing logic is described in the following steps.
S120, acquiring at least one file processing configuration record and at least one file processing event which are obtained by pre-configuration.
In an embodiment, the file processing configuration record may be understood as a record that is obtained by pre-configuration and used for representing the file content of a certain file, and in an actual application, optionally, the file processing configuration record may include at least one of the following fields: product code, collaboration platform, task identification, file type, file target path, and enable identification, among others. Specifically, in the case where the file is a file under a certain product, the product code may be understood as an identifier of the product, and the cooperation platform may be understood as a platform that needs cooperation in order to sell the product; the task identification can be understood as an identification of a task for processing the file; the file type can be understood as the type of the file, such as a deposit statement file or a payment statement file, and in general, a file type may correspond to a file processing event, in other words, the file type determines the file content of the file to some extent; the file target path may be understood as a path for storing the file; the enable flag may be used to indicate whether the file needs to be processed. On the basis, optionally, the file processing range of the product can be determined based on the cooperation platform and the file type, and the file processing range of the corresponding task or the included event range can also be determined based on the task identifier.
The method includes acquiring at least one file processing configuration record configured in advance, where products to which files respectively represented by any two file processing configuration records in the at least one file processing configuration record belong may be the same or different, and are not specifically limited herein. For example, in a case that the at least one file processing configuration record is stored in the same file processing configuration table, it may be considered that file processing configuration records of all files related to all products are stored in the file processing configuration table, that is, personalized and differentiated contents of each product may be configured through the file processing configuration table.
The file processing event may be understood as an event configured in advance for processing a file corresponding to the file processing event, and the specific processing manner may be to generate or delete the file, or add, delete, change, or check the file content of the file, which is not limited herein. At least one file processing event is acquired so that one or more file processing events are selected from the at least one file processing event to process the corresponding file in combination with the subsequent steps.
On this basis, in order to better understand the configuration process of the tasks and the file processing events and the relationship between the tasks and the file processing events, the following description is made by way of example with reference to specific examples. For example, referring to fig. 2, a task may be composed of one or more file processing events, and a file processing event may belong to only one task. A file handling event may correspond to a file handling logic, such as a file generation logic, e.g., corresponding file name, field contents, field separators, and whether compressed, etc. The task can be configured through a task parameter configuration table, and task parameters in the task parameter configuration table may include a task identifier, a task execution class, an earliest starting time, a latest starting time, a number of task processing events, an enabling identifier, and the like. The file processing event can be obtained by configuring an event parameter configuration table, and the event parameters in the event parameter configuration table may include an event identifier, an identifier of an associated task (i.e., a task identifier of the associated task), an event execution class, an execution sequence number, a file name, a file delimiter, whether a file is compressed, an enabling identifier, and the like. The event parameter of any file processing event can be understood as the entry of the file processing logic corresponding to the file processing event, so that the file processing logic determines how to process the file based on the entry. The task and one or more file processing events that make up the task may be associated by a task identifier, which architecture facilitates fast processing of batches of files.
S130, determining a target record from at least one file processing configuration record based on the task identifier of the target task, and obtaining the file type of the target file to be processed from the target record.
Wherein, based on the task identifier of the target task, a target record is determined from at least one file processing configuration record, and the file represented by the target record (i.e. the target file corresponding to the target record in all the files corresponding to the at least one file processing configuration record) can be understood as a file that can be processed by executing the target task. As can be seen from the above example, the file type may be a field in the target record, and thus the file type of the target file may be obtained from the target record.
S140, determining a target event for processing the target file from at least one file processing event based on the task identifier of the target task and the file type of the target file, and processing the target file by executing the target event.
As can be seen from the above examples, one or more file processing events (referred to as task events herein for convenience of distinction) are associated under the target task, and of course, since the obtained at least one file processing event may correspond to one or more tasks, the one or more task events may be understood as part or all of the at least one file processing event. On this basis, in order to correctly process the target file, a target event for processing the target file can be determined from the at least one file processing event based on the task identification and the file type, and the determination process can directly determine the target event from the at least one file processing event based on the two factors; or determining the one or more task events from the at least one file processing event based on the task identifier, and then determining a target event from the one or more task events based on the file type; and the like, are not specifically limited herein. Executing the target event to process the target file through the executed target event.
It should be noted that, as can be seen from the above description, all the factors involved in the file processing process, such as tasks, file processing configuration records, file processing events, etc., can be configured, which means that a developer only needs to develop a set of codes for processing files based on these factors, and the set of codes can be suitable for processing all the files. On the basis, when a certain product is newly added or a certain file is newly added for a certain existing product, the processing process of the corresponding file (namely, the file processing logic for issuing the file) can be realized by configuring one or more factors for the newly added content, and because the change of a code level is not required, the development workload is reduced, the development efficiency is improved, and the product quality management is facilitated (codes corresponding to all products are basically consistent and a redundancy phenomenon does not exist).
According to the technical scheme of the embodiment of the invention, the target task to be executed is pulled up by responding to the task execution instruction, and the following file processing logic is realized by executing the target task: determining a target record for representing a target file to be processed from at least one file processing configuration record obtained by pre-configuration based on a task identifier of a target task, and obtaining a file type of the target file from the target record; and further, determining a target event for processing the target file from at least one file processing event obtained by pre-configuration based on the task identifier and the file type, and processing the target file by executing the target event. According to the technical scheme, when a new file processing logic is developed, the file processing logic can be realized in a configuration mode, namely, under the action of a file processing configuration record with a standardized format, a differentiated, diversified and personalized file processing process is realized through the configuration mode based on a processing framework of tasks and file processing events, so that the development workload is reduced, the development efficiency is improved, the product quality management is facilitated, and the problem of financial file requirements in a multi-modal network financial scene is effectively solved.
According to an optional technical scheme, each task event related to a target task in at least one file processing event is hung under the target task; after the target task to be executed is pulled up, the file processing method may further include: setting an enabling identifier of the target task as enabling so that the target task can be executed; after performing the following steps by executing the target task, the file processing method may further include: and setting the enabling identification of each task event hung under the target task as enabling so that each task event can be executed. The target task can be used for indicating whether the target task can be executed or not, and the task event can be used for indicating whether the task event can be executed or not. Therefore, after the target task is pulled up, the task identifier of the target task may be set to be enabled, or the target task may be executed by pulling up the target task to change the task identifier of the target task to be enabled. Furthermore, because the target event is one or more of the task events suspended under the target task, when the target task is executed, the enabling identifiers of the task events can be respectively set as enabling, so that the task events can be executed, and effective execution of the subsequent target event is ensured.
Another optional technical solution, processing a target file by executing a target event, includes: acquiring a pre-configured event parameter configuration table; and acquiring the event parameters of the target event from the event parameter configuration table, and executing the target event based on the event parameters so as to process the target file through the executed target event. The relevant features of the present solution have been explained in the above examples and will not be described again here. The technical scheme ensures the correct execution of the target event, thereby ensuring the correct processing of the target file.
Fig. 3 is a flowchart of another file processing method provided in the embodiment of the present invention. The present embodiment is optimized based on the above technical solutions. In this embodiment, optionally, the obtaining of at least one file processing configuration record obtained by pre-configuration includes: and acquiring a file processing configuration table obtained by pre-configuration, and acquiring at least one file processing configuration record from the file processing configuration table. The same or corresponding terms as those in the above embodiments are not explained in detail herein.
Referring to fig. 3, the method of this embodiment may specifically include the following steps:
s210, in response to the task execution instruction, pulling up the target task to be executed, and executing the respective steps described below by executing the target task.
S220, obtaining a file processing configuration table obtained through pre-configuration, and obtaining at least one file processing configuration record from the file processing configuration table.
The file processing configuration table is obtained first, and then the at least one file processing configuration record is obtained from the file processing configuration table, so that the effective obtaining of the file processing configuration record is realized.
And S230, determining a target record from at least one file processing configuration record based on the task identifier of the target task, and obtaining the file type of the target file to be processed from the target record.
S240, acquiring at least one file processing event, determining a target event for processing the target file from the at least one file processing event based on the task identifier of the target task and the file type of the target file, and processing the target file by executing the target event.
On this basis, in order to more visually understand the role of the file processing configuration table, it is exemplified herein with reference to specific examples. Illustratively, referring to fig. 4, a middle part of the document processing configuration table shows a document processing configuration record in the document processing configuration table, which may be understood as a target record determined from at least one acquired document processing configuration record according to a task identifier of the target task, where the target record may include fields such as a task identifier, a document type, a product code, a collaboration platform, and an enabling identifier. And acquiring a file type from the target record, and determining a target event from at least one file processing event stored in an event library according to the task identifier and the file type. In other words, the accurate determination of the target record and the target event can be realized through the file processing configuration table.
According to the technical scheme of the embodiment of the invention, the target record and the target event are accurately determined by acquiring the file processing configuration table obtained by pre-configuration, acquiring at least one file processing configuration record from the file processing configuration table and combining the file processing configuration record with the subsequent steps.
An optional technical solution, where the file processing method further includes: responding to a product adding instruction, acquiring a task identifier and a file type corresponding to a product file of a newly added product, and generating a product adding record based on the task identifier and the file type corresponding to the product file; and taking the product newly added record as a newly configured file processing configuration record, and configuring the newly configured file processing configuration record into a file processing configuration table. The newly added product may be understood as a newly added product, that is, a product that has not been configured yet, and for each product file in the newly added product, the task identifier and the file type corresponding to the product file may be obtained, that is, the task identifier and the file type corresponding to the file processing event may be obtained when a file processing event that can process the product file exists in at least one file processing event, or the task identifier and the file type corresponding to the file may be obtained when a file that matches the product file exists in a file library. And generating a product new record based on the task identifier and the file type, and configuring the product new record into a file processing configuration table as a newly configured file processing configuration record. Therefore, the production and the on-line of the newly added product can be completed without code development, and the development efficiency is improved.
On this basis, optionally, at least one file processing event is stored in the file processing event library, and the file processing method may further include: and responding to the event adding instruction, acquiring a task identifier corresponding to the product file and an added event corresponding to the file type, and storing the added event into a file processing event library as a newly configured file processing event. In the case that no file processing event exists in at least one file processing event, the file processing event may be configured by a developer, and specifically, an event execution class may be developed, a corresponding file type may be added, and then the file type may be added to the event parameter library, or the file processing event may be added to the file processing event library. And in another aspect, a new event is obtained from the explanation of the response of the file processing device, and the task identifier and the file type corresponding to the new event are the same as those corresponding to the product file. And then, storing the newly added event as a newly configured file processing event in a file processing event library. On this basis, optionally, under the condition that the file processing event is associated with the task, the newly added event can be configured to the corresponding task.
On the basis of any of the above technical solutions, optionally, determining a target record from at least one file processing configuration record based on a task identifier of the target task, includes: and respectively acquiring an enabling identifier in each file processing configuration record in at least one file processing configuration record, and determining a target record from the at least one file processing configuration record based on the task identifier of the target task and the enabling identifier in each file processing configuration record. The enabling identifier may be used to indicate whether a file represented by the file processing configuration record having the enabling identifier needs to be processed currently, so that a target record may be determined from at least one file processing configuration record based on the task identifier of the target task and the enabling identifier in each file processing configuration record, where the target record may be understood as a file processing configuration record that can be processed by the target task and currently has a processing requirement. By configuring the enable identification field in the file processing configuration record, only files with processing requirements currently exist can be processed, and therefore flexibility and accuracy of file processing are improved.
On this basis, optionally, the file processing method may further include: receiving an enabling identification setting instruction input through a preset manual management service interface; and in response to the enabling identifier setting instruction, setting an enabling identifier in a file processing configuration record to be set in the at least one file processing configuration record, such as changing from enabling to non-enabling or from non-enabling to enabling. According to the technical scheme, the manual management service interface is provided, so that the individual requirements of the user can be met in real time, for example, when a certain product does not need a certain file any more, the enabling identification of the file can be closed in real time through the manual management service interface.
Fig. 5 is a flowchart of another file processing method provided in the embodiment of the present invention. The present embodiment is optimized based on the above technical solutions. In this embodiment, optionally, the pulling up the target task to be executed includes: pulling up at least two target tasks to be executed; performing the following steps by executing the target task, including: concurrently executing at least two target tasks, so that each target task of the executed at least two target tasks executes the following steps; determining a target record from at least one file processing configuration record based on a task identifier of a target task, and obtaining a file type of a target file to be processed from the target record, wherein the method comprises the following steps: determining at least two target records from at least one file processing configuration record based on the task identifier of the target task, wherein the at least two target records are applied in series; and aiming at the currently applied target record in the at least two target records, obtaining the file type of the target file to be processed corresponding to the target record from the target record. The same or corresponding terms as those in the above embodiments are not explained in detail herein.
Referring to fig. 5, the method of this embodiment may specifically include the following steps:
s310, in response to the task execution instruction, pulling up at least two target tasks to be executed, and concurrently executing the at least two target tasks, so that each target task of the executed at least two target tasks executes the following steps.
Wherein, considering that a task may be associated with one or more file handling events, these file handling events are executed serially in case of being associated with at least two file handling events. On this basis, in the case that there are at least two target tasks, it is considered that if the at least two target tasks are executed serially, taking target task 1 and target task 2 as an example, it is necessary to complete the execution of each file processing event under target task 1 before starting to execute each file processing event under target task 2. Obviously, if the execution time of any one file processing event under the target task 1 is long, the execution of the target task 2 is influenced. Therefore, in order to quickly execute each target task, the at least two target tasks may be executed concurrently, and the execution process of each target task is as follows.
S320, acquiring at least one file processing configuration record and at least one file processing event which are obtained by pre-configuration.
S330, determining at least two target records from at least one file processing configuration record based on the task identification of the target task, wherein the at least two target records are applied in series.
At least two target records are applied in series, namely, the target events corresponding to the at least two target records are executed in series. In practical applications, optionally, the target files respectively represented by the at least two target records belong to at least two existing products, in other words, the related files of the at least two existing products can be processed based on one task, which can reduce the number of tasks compared with a scheme that only the related file of one existing product is processed based on one task, thereby improving system performance and operating efficiency.
S340, aiming at the currently applied target record in the at least two target records, obtaining the file type of the target file to be processed corresponding to the target record from the target record.
S350, determining a target event for processing the target file from the at least one file processing event based on the task identification of the target task and the file type of the target file, and processing the target file by executing the target event.
On the basis, in order to understand the technical scheme more visually, the following description is given by way of example with reference to specific examples. Illustratively, as shown in fig. 6, task identifiers of 3 target tasks are obtained, and since the 3 task identifiers correspond to the same task execution class a, concurrent execution of the 3 target tasks can be implemented by 3 different instantiation objects of the task execution class a. Specifically, the task execution class A is used for finding the file processing ranges respectively corresponding to the task identifications in the file processing configuration table, and then the files are processed by executing the file processing events corresponding to the files in the file processing ranges.
According to the technical scheme of the embodiment of the invention, because each associated file processing event under any task is executed in series, at least two target tasks can be executed concurrently under the condition that at least two target tasks exist, and therefore, the rapid execution of each target task is effectively ensured.
An optional technical solution, pulling up at least two target tasks to be executed, may include: acquiring at least two task identifiers from a pre-configured task parameter table, and pulling up at least two target tasks to be executed according to at least two target tasks represented by the at least two task identifiers, wherein the at least two task identifiers and the at least two target tasks have a one-to-one correspondence relationship; the file processing method may further include: responding to a task newly-increased instruction, acquiring a task identifier of a newly-increased task and a task newly-increased record corresponding to the task identifier of the newly-increased task; and configuring the task identification of the newly added task into a task parameter table, and storing the newly added task record as a newly configured file processing configuration record. The specific meaning of the task parameter table has been set forth in the above example, and is not described herein again. For a newly added task, a task identifier of the newly added task may be configured in the task parameter table. In addition, for each file in the file processing range of the new task, a task new record configured for the file, that is, representing the file, may be obtained and stored as a newly configured file processing configuration record, for example, in a file configuration record table. In this way, tasks can be newly added in a mode of configuring parameters (such as task identification and task newly-added records) without adding any codes, and therefore development efficiency is improved.
Fig. 7 is a block diagram of a file processing apparatus according to an embodiment of the present invention, which is configured to execute a file processing method according to any of the above embodiments. The device and the file processing method of each embodiment belong to the same inventive concept, and details which are not described in detail in the embodiment of the file processing device can refer to the embodiment of the file processing method. Referring to fig. 7, the apparatus may specifically include: a target task execution module 410, a recording event acquisition module 420, a file type obtaining module 430 and a target file processing module 440.
The target task execution module 410 is configured to, in response to a task execution instruction, pull up a target task to be executed, and execute the following steps by executing the target task;
a record event acquiring module 420, configured to acquire at least one file processing configuration record and at least one file processing event that are obtained by pre-configuration;
a file type obtaining module 430, configured to determine a target record from at least one file processing configuration record based on a task identifier of a target task, and obtain a file type of a target file to be processed from the target record;
and the target file processing module 440 is configured to determine a target event for processing the target file from the at least one file processing event based on the task identifier of the target task and the file type of the target file, and process the target file by executing the target event.
Optionally, the recording event obtaining module 420 may include:
and the file processing configuration record acquisition unit is used for acquiring a file processing configuration table obtained by pre-configuration and acquiring at least one file processing configuration record from the file processing configuration table.
On this basis, optionally, the document processing apparatus may further include:
the product newly-added record generating module is used for responding to a product newly-added instruction, acquiring a task identifier and a file type corresponding to a product file of a newly-added product, and generating a product newly-added record based on the task identifier and the file type corresponding to the product file;
and the first configuration module of the file processing configuration record is used for configuring the newly added record of the product as the newly configured file processing configuration record into the file processing configuration table.
On this basis, optionally, at least one file processing event is stored in the file processing event library, and the file processing apparatus may further include:
and the file processing event storage module is used for responding to the event adding instruction, acquiring a task identifier corresponding to the product file and an added event corresponding to the file type, and storing the added event into the file processing event library as a newly configured file processing event.
Optionally, the file type obtaining module 430 may include:
and the target record first determining unit is used for respectively obtaining the enabling identifier in each file processing configuration record in at least one file processing configuration record, and determining the target record from at least one file processing configuration record based on the task identifier of the target task and the enabling identifier in each file processing configuration record.
On this basis, optionally, the document processing apparatus may further include:
the starting identifier setting instruction receiving module is used for receiving a starting identifier setting instruction input through a preset manual management service interface;
and the first setting module of the enabling identifier is used for responding to the setting instruction of the enabling identifier and setting the enabling identifier in the file processing configuration record to be set in at least one file processing configuration record.
Optionally, each task event associated with the target task in the at least one file processing event is suspended under the target task, and the file processing apparatus may further include:
the second enabling identifier setting module is used for setting the enabling identifier of the target task to be enabled after the target task to be executed is pulled up so that the target task can be executed;
and the third setting module of the enabling identifier is used for setting the enabling identifier of each task event hung under the target task as the enabling after the following steps are executed by executing the target task, so that each task event can be executed.
Optionally, the object document processing module 440 may include
An event parameter configuration table obtaining unit, configured to obtain a pre-configured event parameter configuration table;
and the target file processing unit is used for acquiring the event parameters of the target event from the event parameter configuration table and executing the target event based on the event parameters so as to process the target file through the executed target event.
Optionally, the target task execution module 410 may include:
the target task pulling unit is used for pulling at least two target tasks to be executed;
the target task concurrent execution unit is used for concurrently executing at least two target tasks, so that each target task of the executed at least two target tasks executes the following steps;
the file type obtaining module 430 may include:
the second target record determining unit is used for determining at least two target records from at least one file processing configuration record based on the task identifier of the target task, wherein the at least two target records are applied in series;
and the file type obtaining unit is used for obtaining the file type of the target file to be processed corresponding to the target record from the target record aiming at the currently applied target record in the at least two target records.
On this basis, optionally, the target task pull-up unit is specifically configured to:
acquiring at least two task identifiers from a pre-configured task parameter table, and pulling up at least two target tasks to be executed and represented by the at least two task identifiers, wherein the at least two task identifiers and the at least two target tasks have a one-to-one correspondence relationship;
the processing apparatus may further include:
the task newly-added record acquisition module is used for responding to the task newly-added instruction and acquiring a task identifier of the newly-added task and a task newly-added record corresponding to the task identifier of the newly-added task;
and the file processing configuration record storage module is used for configuring the task identifier of the newly added task into the task parameter table and storing the task newly added record as the newly configured file processing configuration record.
Optionally, the target files corresponding to the at least two target records are affiliated to at least two existing products.
The file processing device provided by the embodiment of the invention responds to the task execution instruction through the target task execution module, pulls up the target task to be executed, and realizes the following file processing logic by executing the target task: determining a target record for representing a target file to be processed from at least one preset file processing configuration record based on a task identifier of a target task through mutual cooperation of a record event acquisition module and a file type acquisition module, and acquiring a file type of the target file from the target record; and then, through mutual cooperation of the record event acquisition module and the target file processing module, determining a target event for processing the target file from at least one file processing event obtained by pre-configuration based on the task identifier and the file type, and processing the target file by executing the target event. According to the device, when a new file processing logic is developed, the processing can be realized in a configuration mode, namely, based on a processing framework of a task and a file processing event, under the action of a file processing configuration record with a standardized format, a differentiated, diversified and personalized file processing process can be realized in the configuration mode, so that the development workload is reduced, the development efficiency is improved, the product quality management is facilitated, and the problem of account file requirements in a multi-modal network financial scene is effectively solved.
The file processing device provided by the embodiment of the invention can execute the file processing method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
It should be noted that, in the embodiment of the file processing apparatus, the included units and modules are only divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be realized; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
FIG. 8 illustrates a block diagram of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 8, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, and the like, wherein the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data necessary for the operation of the electronic apparatus 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
A number of components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, or the like; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, or the like. The processor 11 performs the various methods and processes described above, such as a file processing method.
In some embodiments, the file processing method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the file processing method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the file processing method by any other suitable means (e.g. by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Computer programs for implementing the methods of the present invention can be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be performed. A computer program can execute entirely on a machine, partly on a machine, as a stand-alone software package partly on a machine and partly on a remote machine or entirely on a remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service are overcome.
It should be understood that various forms of the flows shown above, reordering, adding or deleting steps, may be used. For example, the steps described in the present invention may be executed in parallel, sequentially, or in different orders, and are not limited herein as long as the desired results of the technical solution of the present invention can be achieved.
The above-described embodiments should not be construed as limiting the scope of the invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (14)

1. A file processing method, comprising:
in response to a task execution instruction, pulling up a target task to be executed, and executing the target task to execute the following steps:
acquiring at least one file processing configuration record and at least one file processing event which are obtained by pre-configuration;
determining a target record from the at least one file processing configuration record based on the task identifier of the target task, and obtaining the file type of a target file to be processed from the target record;
and determining a target event for processing the target file from the at least one file processing event based on the task identifier of the target task and the file type of the target file, and processing the target file by executing the target event.
2. The method according to claim 1, wherein the obtaining at least one file processing configuration record obtained by pre-configuration comprises:
the method comprises the steps of obtaining a file processing configuration table obtained through pre-configuration, and obtaining at least one file processing configuration record from the file processing configuration table.
3. The method of claim 2, further comprising:
responding to a product adding instruction, acquiring a task identifier and a file type corresponding to a product file of a newly added product, and generating a product adding record based on the task identifier and the file type corresponding to the product file;
and taking the product newly added record as a newly configured file processing configuration record, and configuring the newly configured file processing configuration record into the file processing configuration table.
4. The method of claim 3, wherein the at least one file handling event is stored in a file handling event repository, the method further comprising:
and responding to an event adding instruction, acquiring a task identifier corresponding to the product file and an added event corresponding to the file type, taking the added event as a newly configured file processing event, and storing the newly configured file processing event in the file processing event library.
5. The method of claim 1, wherein determining a target record from the at least one file processing configuration record based on the task identification of the target task comprises:
respectively obtaining the enabling identification in each file processing configuration record in the at least one file processing configuration record, and determining the target record from the at least one file processing configuration record based on the task identification of the target task and the enabling identification in each file processing configuration record.
6. The method of claim 5, further comprising:
receiving an enabling identification setting instruction input through a preset manual management service interface;
and responding to the enabling identifier setting instruction, and setting the enabling identifier in the file processing configuration record to be set in the at least one file processing configuration record.
7. The method according to claim 1, wherein each task event of the at least one file processing event associated with the target task is suspended under the target task;
after the pulling up the target task to be executed, the method further comprises:
setting an enabling identifier of the target task as enabled so that the target task can be executed;
after the performing the following steps by executing the target task, the method further comprises:
and setting the enabling identification of each task event hung under the target task as enabling so that each task event can be executed.
8. The method of claim 1, wherein the processing the target file by executing the target event comprises:
acquiring a pre-configured event parameter configuration table;
and acquiring the event parameters of the target event from the event parameter configuration table, and executing the target event based on the event parameters so as to process the target file through the executed target event.
9. The method of claim 1, wherein the pulling up the target task to be performed comprises:
pulling up at least two target tasks to be executed;
performing, by executing the target task, steps comprising:
concurrently executing the at least two target tasks, so that each target task of the at least two target tasks executed executes the following steps;
the determining a target record from the at least one file processing configuration record based on the task identifier of the target task, and obtaining a file type of a target file to be processed from the target record, includes:
determining at least two target records from the at least one file processing configuration record based on the task identifier of the target task, wherein the at least two target records are applied in series;
and aiming at the currently applied target record in the at least two target records, obtaining the file type of the target file to be processed corresponding to the target record from the target record.
10. The method of claim 9, wherein the pulling up at least two target tasks to be performed comprises:
acquiring at least two task identifiers from a pre-configured task parameter table, and pulling up at least two target tasks to be executed and represented by the at least two task identifiers, wherein the at least two task identifiers and the at least two target tasks have a one-to-one correspondence relationship;
the method further comprises the following steps:
responding to a task newly-added instruction, and acquiring a task identifier of a newly-added task and a task newly-added record corresponding to the task identifier of the newly-added task;
and configuring the task identification of the newly added task into the task parameter table, and storing the task newly added record as a newly configured file processing configuration record.
11. The method of claim 9, wherein the target files corresponding to the at least two target records belong to at least two existing products.
12. A document processing apparatus, characterized by comprising:
the target task execution module is used for responding to a task execution instruction, pulling up a target task to be executed and executing the following steps by executing the target task;
the recording event acquisition module is used for acquiring at least one file processing configuration record and at least one file processing event which are obtained by pre-configuration;
a file type obtaining module, configured to determine a target record from the at least one file processing configuration record based on the task identifier of the target task, and obtain a file type of a target file to be processed from the target record;
and the target file processing module is used for determining a target event for processing the target file from the at least one file processing event based on the task identifier of the target task and the file type of the target file, and processing the target file by executing the target event.
13. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to cause the at least one processor to perform the file processing method of any one of claims 1-11.
14. A computer-readable storage medium storing computer instructions for causing a processor to perform the file processing method according to any one of claims 1 to 11 when executed.
CN202211151396.0A 2022-09-21 2022-09-21 File processing method and device, electronic equipment and storage medium Pending CN115481090A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211151396.0A CN115481090A (en) 2022-09-21 2022-09-21 File processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211151396.0A CN115481090A (en) 2022-09-21 2022-09-21 File processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115481090A true CN115481090A (en) 2022-12-16

Family

ID=84423661

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211151396.0A Pending CN115481090A (en) 2022-09-21 2022-09-21 File processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115481090A (en)

Similar Documents

Publication Publication Date Title
CN113641677A (en) Data processing method and device, electronic equipment and storage medium
CN115242731A (en) Message processing method, device, equipment and storage medium
CN115168130A (en) Chip testing method and device, electronic equipment and storage medium
CN118193389A (en) Test case generation method, device, equipment, storage medium and product
CN116301997A (en) Upgrading method, device, equipment and medium of controller
CN116245982A (en) Animation file generation method and device, electronic equipment and storage medium
CN116009847A (en) Code generation method, device, electronic equipment and storage medium
CN115454971A (en) Data migration method and device, electronic equipment and storage medium
CN115599438A (en) Method, device, equipment and medium for constructing application program publishing package
CN115934178A (en) Code running method and device, electronic equipment and storage medium
CN115481090A (en) File processing method and device, electronic equipment and storage medium
CN113592470A (en) Service processing method and device, electronic equipment and storage medium
CN113673890B (en) Cloud mobile phone resource order processing method, related device and computer program product
CN115983222A (en) EasyExcel-based file data reading method, device, equipment and medium
CN115080111A (en) Method, device and equipment for flow management of target application and storage medium
CN115686612A (en) Project delivery method and device, electronic equipment and storage medium
CN114281436A (en) Applet communication method, apparatus, device and storage medium
CN117520092A (en) Log data determining method and device, electronic equipment and medium
CN115794459A (en) Flash-back processing method, device, equipment and storage medium of native application program
CN117251196A (en) Data maintenance method, device, equipment and storage medium
CN116308713A (en) Multiplexing method and device for business transaction codes, electronic equipment and storage medium
CN115526711A (en) Data processing method, device, equipment, medium and product
CN115237561A (en) Job obtaining method, device, equipment and medium
CN115202791A (en) Method and device for determining first screen loading resource, server and storage medium
CN115567624A (en) Message processing method and device, electronic equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination