Task processing method and task processing device
By using mapping relationship tables and JAVA reflection technology to construct task data in task processing, the problems of low reusability and poor code maintenance caused by task processing operation coupling in the prior art are solved, and the flexibility of task processing is achieved. Efficiency.
Patent Information
- Application Number
- CN202010769278.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-03
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2040-08-03
AI Technical Summary
The three-step operation of task processing in the prior art is coupled together, resulting in a decrease in reusability of the class file. Each new task requires the development of the function of scanning the database for querying data. As the task types increase, the initial description in the configuration file is initialized. Exponentially growing, code flexibility and maintainability decline.
Record the mapping relationship between business types and task types through mapping relationship tables, construct task data using JAVA reflection technology, and store it in task data tables, and use predefined class scanning task data tables to obtain and process task data to be executed .
It improves the flexibility and maintainability of the code, solves the problem of low reusability of class files and the need to develop the function of scanning databases for querying data in new tasks, and realizes dynamic task processing and process orchestration.
Smart Images

Figure CN113760486B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a task processing method and a task processing device. Background Art
[0002] The system can support different types of businesses. Each business has its own process orchestration algorithm, which is used to process specific tasks corresponding to the business. In the process orchestration algorithm, no human intervention is required. As long as the time conditions are met, the tasks that need to be processed will be automatically triggered. Task processing is mainly divided into three steps: 1. Scan the database to query data that meets the conditions; 2. Execute specific logic; 3. Update the data content and write it back to the database.
[0003] At present, there are mainly two ways to handle tasks: Method 1, the three-step operation of task processing is not decoupled, and each time a new task is added, the above functions are developed to complete the three-step operation; Method 2, the operation of scanning the database and the operation of executing specific logic are decoupled, and the scanning class files and the interface class files for executing logic are defined.
[0004] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art: 1. For the above-mentioned method 1, the three-step operation is coupled together, the reusability of the class file is reduced, and each time a new task is added, it is necessary to develop a function of scanning the database to query data; 2. For the above-mentioned method 2, as the number of task types increases, the initialization description added in the configuration file increases exponentially, and the flexibility and maintainability of the code will drop sharply. Summary of the invention
[0005] In view of this, an embodiment of the present invention provides a task processing method and a task processing device, which can solve the technical problem of reduced reusability of class files in the prior art by using a mapping relationship table, and improve the flexibility and maintainability of the code.
[0006] To achieve the above objective, according to a first aspect of an embodiment of the present invention, a task processing method is provided.
[0007] A task processing method according to an embodiment of the present invention includes: querying a mapping relationship table with business type as a query condition to obtain a mapping record corresponding to the business type, wherein the mapping relationship table records the mapping relationship between the business type and the task type; constructing task data corresponding to the mapping record based on JAVA reflection technology, and storing the task data in a task data table; using a predefined class to scan the task data table, obtain the task data to be executed, and process the task data to be executed.
[0008] Optionally, the mapping relationship table includes: a mapping identification field, a business data source field, a task type field, a task initial status field, and a business type field; the method also includes: obtaining input data through a visual interface, generating a mapping record between the business type and the task type corresponding to the input data, and storing the generated mapping record in the mapping relationship table; and after receiving a task cancellation request, deleting the mapping record corresponding to the task cancellation request from the mapping relationship table.
[0009] Optionally, constructing the task data corresponding to the mapping record based on JAVA reflection technology includes: obtaining the task type in the mapping record; traversing the mapping record to determine the dynamic fields in the mapping record; based on JAVA reflection technology, obtaining the business data corresponding to the mapping record according to the dynamic fields; constructing the task data corresponding to the mapping record according to the business data corresponding to the mapping record and the task type in the mapping record; wherein the task data includes: task type, current status of the task, and an identifier of associated business data.
[0010] Optionally, the method also includes: defining an abstract class, defining a compilation task model method, a compilation task distribution method and a scanning method in the abstract class, defining a first global variable and a second global variable, wherein the first global variable is a task model type and the second global variable is a task distribution type; defining a task model class, defining a task type variable and a task execution logic in the task model class; defining a task distribution interface class, defining a task distribution method in the task distribution interface class, and defining a task operation global variable of a task operation type; defining a task operation class, defining a locking task method, an executing operation method and an unlocking task method in the task operation class; defining a task execution class, wherein the task execution class inherits the abstract class, and defining a timed execution method in the task execution class.
[0011] Optionally, the use of a predefined class to scan the task data table, obtain the task data to be executed, and process the task data to be executed includes: calling the compilation task model method and the compilation task distribution method defined in the abstract class through the task execution class to assign values to the first global variable and the second global variable defined; calling the scanning method defined in the abstract class to read the task type variable defined in the task model class, scanning the task data table according to the task type variable to obtain the task data to be executed; calling the task distribution method defined in the task distribution interface class to process the task data to be executed according to the task execution logic defined in the task model class.
[0012] Optionally, scanning the task data table according to the task type variable to obtain the task data to be executed includes: querying the task data table with the task type variable as the query condition to determine whether there is optional task data corresponding to the task type variable in the task data table; if so, determining whether the task status of the optional task data is waiting for processing, and if so, determining that the optional task data is the task data to be executed.
[0013] Optionally, the task distribution method defined in the task distribution interface class is called to process the task data to be executed according to the task execution logic defined in the task model class, including: determining the target task type corresponding to the task data to be executed, calling the task distribution method to check whether there is a thread pool corresponding to the target task type in the thread pool container; if so, using the thread pool corresponding to the target task type to process the task data to be executed according to the task execution logic; if not, constructing a thread pool corresponding to the target task type, placing the thread pool corresponding to the target task type into the thread pool container, and using the thread pool corresponding to the target task type to process the task data to be executed according to the task execution logic.
[0014] Optionally, the use of the thread pool corresponding to the target task type to process the task data to be executed according to the task execution logic includes: reading an empty thread in the thread pool corresponding to the target task type, and instantiating the task operation class through the empty thread according to the task data to be executed and the task execution logic; calling the lock task method defined in the task operation class to update the task status of the task data to be executed stored in the task data table to a locked state; calling the execute operation method defined in the task operation class to process the task data to be executed according to the task execution logic to obtain a processing result; calling the unlock task method defined in the task operation class to update the task status of the task data to be executed stored in the task data table to complete unlocking.
[0015] Optionally, calling the scanning method defined in the abstract class includes: calling a timed execution method defined in the task execution class, and regularly calling the scanning method defined in the abstract class within the timed execution method.
[0016] To achieve the above objective, according to a second aspect of an embodiment of the present invention, a task processing device is provided.
[0017] A task processing device according to an embodiment of the present invention includes: a query module, which is used to query a mapping relationship table with a business type as a query condition, and obtain a mapping record corresponding to the business type, wherein the mapping relationship table records the mapping relationship between the business type and the task type; a construction module, which is used to construct task data corresponding to the mapping record based on JAVA reflection technology, and store the task data in a task data table; and a processing module, which is used to use a predefined class to scan the task data table, obtain the task data to be executed, and process the task data to be executed.
[0018] Optionally, the mapping relationship table includes: a mapping identification field, a business data source field, a task type field, a task initial status field, and a business type field; the device also includes a generation module, which is used to: obtain input data through a visual interface, generate a mapping record between the business type and the task type corresponding to the input data, and store the generated mapping record in the mapping relationship table; and after receiving a task cancellation request, delete the mapping record corresponding to the task cancellation request from the mapping relationship table.
[0019] Optionally, the construction module is also used to: obtain the task type in the mapping record; traverse the mapping record to determine the dynamic fields in the mapping record; based on JAVA reflection technology, obtain the business data corresponding to the mapping record according to the dynamic fields; construct the task data corresponding to the mapping record according to the business data corresponding to the mapping record and the task type in the mapping record; wherein the task data includes: task type, current status of the task, and an identifier of associated business data.
[0020] Optionally, the device also includes a definition module, which is used to: define an abstract class, define a compilation task model method, a compilation task distribution method and a scanning method in the abstract class, define a first global variable and a second global variable, wherein the first global variable is a task model type and the second global variable is a task distribution type; define a task model class, define a task type variable and a task execution logic in the task model class; define a task distribution interface class, define a task distribution method in the task distribution interface class, and define a task operation global variable of a task operation type; define a task operation class, define a locking task method, an executing operation method and an unlocking task method in the task operation class; define a task execution class, the task execution class inherits the abstract class, and defines a timed execution method in the task execution class.
[0021] Optionally, the processing module is also used to: call the compilation task model method and the compilation task distribution method defined in the abstract class through the task execution class to assign values to the first global variable and the second global variable defined; call the scanning method defined in the abstract class to read the task type variable defined in the task model class, scan the task data table according to the task type variable, and obtain the task data to be executed; call the task distribution method defined in the task distribution interface class to process the task data to be executed according to the task execution logic defined in the task model class.
[0022] Optionally, the processing module is also used to: query the task data table with the task type variable as the query condition, and determine whether there is optional task data corresponding to the task type variable in the task data table; if so, determine whether the task status of the optional task data is waiting for processing, and if so, determine that the optional task data is the task data to be executed.
[0023] Optionally, the processing module is also used to: determine the target task type corresponding to the task data to be executed, call the task distribution method to check whether there is a thread pool corresponding to the target task type in the thread pool container; if so, use the thread pool corresponding to the target task type to process the task data to be executed according to the task execution logic; if not, build a thread pool corresponding to the target task type, put the thread pool corresponding to the target task type into the thread pool container, and use the thread pool corresponding to the target task type to process the task data to be executed according to the task execution logic.
[0024] Optionally, the processing module is also used to: read an empty thread in the thread pool corresponding to the target task type, and instantiate the task operation class through the empty thread according to the task data to be executed and the task execution logic; call the lock task method defined in the task operation class to update the task status of the task data to be executed stored in the task data table to a locked state; call the execution operation method defined in the task operation class to process the task data to be executed according to the task execution logic to obtain a processing result; call the unlock task method defined in the task operation class to update the task status of the task data to be executed stored in the task data table to complete unlocking.
[0025] Optionally, the processing module is further used to: call the scheduled execution method defined in the task execution class, and regularly call the scanning method defined in the abstract class within the scheduled execution method.
[0026] To achieve the above objective, according to a third aspect of an embodiment of the present invention, an electronic device is provided.
[0027] An electronic device according to an embodiment of the present invention includes: one or more processors; a storage device for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the task processing method according to the embodiment of the present invention.
[0028] To achieve the above objective, according to a fourth aspect of an embodiment of the present invention, a computer-readable medium is provided.
[0029] A computer-readable medium according to an embodiment of the present invention stores a computer program, and when the program is executed by a processor, the task processing method according to the embodiment of the present invention is implemented.
[0030] An embodiment of the above invention has the following advantages or beneficial effects: the mapping relationship table can be queried by business type, and the mapping relationship between the business type and the task type is recorded in the mapping relationship table. Therefore, after the mapping record is generated, the task data corresponding to the mapping record can be constructed according to the generated mapping record, and then the task data can be added to the task data table. In this way, the data corresponding to the task to be executed can be obtained by scanning the task data table, and then the task data table can be scanned using a predefined class to obtain and process the task data to be executed, which solves the technical problems of the reduced reusability of the class file caused by the coupling of the three steps in the prior art, and the need to develop a function to scan the database to query data each time a new task is added. The flexibility and maintainability of the code can also be improved.
[0031] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with specific implementation examples. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0033] Figure 1 is a schematic diagram of main steps of a task processing method according to an embodiment of the present invention;
[0034] Figure 2 is a predefined class structure diagram according to an embodiment of the present invention;
[0035] Figure 3 is a schematic diagram of main modules of a task processing device according to an embodiment of the present invention;
[0036] Figure 4 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;
[0037] Figure 5It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0038] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0039] The system can support many different types of businesses, each of which has its own process orchestration algorithm, and the process orchestration algorithms for different types of businesses also vary greatly. For example, for virtual businesses such as phone recharge and traffic recharge for ordinary users, after the user pays successfully, the system will automatically call the agent service for recharge; for physical businesses such as household appliances and digital products for ordinary users, after the user pays successfully, the system will automatically send the data to the warehouse; for businesses such as court auctions and corporate procurement for corporate users, after the user completes the payment, due to the large amount, it needs to be manually reviewed by the staff before entering the next production link; for businesses such as corporate settlement for corporate users, after the settlement order is generated, it needs to be jointly reviewed and approved by the staff of both companies A and B before the payment link can be carried out. How the system can support different types of process orchestration while allowing different types of businesses to build, share and develop rapidly has become the key to system construction. In the process orchestration algorithm mentioned above, automatically calling the agent service for recharge, automatically sending data to the warehouse, and automatically entering the next link after manual review are all business processes that are automatically initiated by the system and do not require manual triggering. They can be regarded as pending tasks. These pending tasks do not require human intervention and will be automatically triggered for execution as long as the time conditions are met.
[0040] The existing task processing method has the problem that the reusability of class files is reduced. Every time a new task is added, it is necessary to develop a function to scan the database and query data. The flexibility and maintainability of the code will drop sharply as the number of task types increases. In addition, in the process scheduling link, it is impossible to dynamically end or add new tasks. In order to solve the above problems, an embodiment of the present invention provides a task processing method. Figure 1 FIG. 1 is a schematic diagram of the main steps of the task processing method according to an embodiment of the present invention. Figure 1 As shown, the main steps of the task processing method may include:
[0041] Step S101, querying the mapping relationship table with the business type as the query condition to obtain the mapping record corresponding to the business type;
[0042] Step S102, constructing task data corresponding to the mapping record based on JAVA reflection technology, and storing the task data in a task data table;
[0043] Step S103, using the predefined class, scanning the task data table, obtaining the task data to be executed, and processing the task data to be executed.
[0044] The mapping relationship table records the mapping relationship between the business type and the task type, which may include: mapping identification field, business data source field, task type field, task initial status field, and business type field, as shown in the structure of the mapping relationship table in Table 1. Among them, Id represents the mapping identification field, which represents the unique identification of the mapping record; rfFiledName represents the business data source field, which is a dynamic field. Through this field, the source of the business data required to execute the task can be queried. For example, in the link of driving the call of the agent service for recharge in the virtual business, an order number is required, and the corresponding rfFiledName can be the order number. For another example, when the recharge fails and a refund is required to the user, a refund order number is required, and the corresponding rfFiledName can be the refund order number; workerType represents the task type field, such as the recharge task; Init_tatus represents the initial status field of the task, such as the virtual business's expense recharge business. After the user recharges successfully, the initial state is waiting for recharge; Biz_type represents the business type field, such as the phone charge recharge business in the virtual business.
[0045] Field Name type Notes Is it a dynamic field? Id String Mapping ID no rfFiledName String Required business data source field name yes workerType Integer Task Type no Init_tatus Integer Initial state of the task no Biz_type String Corresponding business type no
[0046] Table 1 Structure of the mapping relationship table
[0047] In the task processing method of the embodiment of the present invention, when the system is running, at the reserved extension point, the business type is used as the query condition to query data from the mapping relationship table. Among them, the reserved extension point refers to the extension interface reserved in the main node when the system is designed. For example, when a user purchases an item on an e-commerce platform, after the payment is successful, the item is in a waiting state for shipment, and the shipment state can be regarded as a reserved extension point. If the queried data is empty, it means that there is no mapping record corresponding to the business type, that is, there is no task corresponding to the business that needs to be executed. At this time, there is no need to proceed to the next link and the process is terminated. Otherwise, a task data can be constructed through JAVA reflection technology and saved in the task data table. For example, for offline businesses such as refueling, after the user pays successfully, he goes to the designated offline store to refuel. He only needs to show the order information to the other party's staff, and there is no need to drive the system to call the agent service interface, so the corresponding task cannot be read. If it is a virtual business such as phone recharge, traffic recharge, etc., after the user completes the payment, it is necessary to drive the system to call the agent's service interface. The mapping record can be read from the mapping relationship table according to the business type. In addition, services such as phone recharge, traffic recharge, etc. need to save a task data to drive the system to execute the task. Therefore, after generating the mapping record, it is necessary to construct the task data corresponding to the mapping record.
[0048] Since the business data source field in the mapping relationship table is a dynamic field, the queried mapping record contains a dynamic field. Therefore, the specific business data can be dynamically obtained through JAVA reflection technology, and then the task data corresponding to the mapping record is constructed according to the specific business data obtained, and the constructed task data is added to the task data table. Table 2 is the structure of the task data table. The task data may include: task type, current state of the task, and the identifier of the associated business data, and may also include the task identifier. As shown in Table 2, id represents the task identifier, which represents the unique identifier of the task, such as the task sequence number; rfId represents the identifier of the associated business data, that is, the business data required to execute the task can be obtained through rfId, such as the link of driving the call to the agent service for recharge in the virtual business. When executing the recharge task, the required business data are all in the order table. Through rfId and business data are associated, rfId can be the order number corresponding to the specific business data or other identifiers that can be associated with the business data; workerType represents the task type; status represents the current status of the task, such as the waiting recharge status, the recharge status, the recharge success status, and the recharge failure status in the recharge task.
[0049] Field Name type Remark id Integer Task ID rfId Integer Identifier of related business data workerType Integer Task Type status Integer Current status of the task
[0050] Table 2 Structure of the task data table
[0051] The task data may include: the task type, the current state of the task, and the identifier of the associated business data, and the generated task data is stored in the task data table, so the task data table can be scanned, and whether the task needs to be executed can be determined by the task type and the current state of the task, and then the data required for executing the task can be obtained by the identifier of the associated business data, so that the task can be executed. In the embodiment of the present invention, the predefined class can be used to scan the task data table, obtain the task data to be executed, and process the task data to be executed. The class is a prototype that defines variables and methods for a certain type of object. It represents the abstraction of a class of things with common characteristics in real life and is the basis of object-oriented programming. In the embodiment of the present invention, the class for executing the task is predefined, and then the predefined class is used to obtain the task data to be executed and process the task data to be executed.
[0052] In the task processing technical solution of the embodiment of the present invention, the mapping relationship table can be queried by business type, and the mapping relationship between the business type and the task type is recorded in the mapping relationship table. Therefore, after the mapping record is generated, the task data corresponding to the mapping record can be constructed according to the generated mapping record, and then the task data can be added to the task data table. In this way, the data corresponding to the task to be executed can be obtained by scanning the task data table, and then the task data table can be scanned using a predefined class to obtain and process the task data to be executed. This solves the technical problems of the reduced reusability of the class file caused by the coupling of the three steps in the prior art, and the need to develop a function of scanning the database to query data each time a new task is added. It can also improve the flexibility and maintainability of the code.
[0053] The mapping relationship table is an important part of the task processing method of the embodiment of the present invention. With the help of the mapping relationship table, task data can be constructed to execute tasks. In the reference embodiment of the present invention, the task processing method may also include: obtaining input data through a visual interface, generating a mapping record between the business type corresponding to the input data and the task type, and storing the generated mapping record in the mapping relationship table.
[0054] Users can input data through the visual interface. For example, for user recharge services, they can input the recharge amount and recharge number in the visual interface, and then generate a mapping record between the service type and the task type corresponding to the input data. Finally, the generated mapping record is stored in the mapping relationship table. For example, for the phone charge recharge service, after the user successfully pays, a mapping record is added to the mapping relationship table. Table 3 is the mapping record between the service type and the task type. In Table 3, the mapping identifier Id of this mapping record is 1001; the service data source rfFiledName is Order.orderId, and the specific service data can be obtained from the field orderId of the table Order through JAVA reflection technology; the task type workerType is 1, indicating a recharge task; the initial state of the task Init_tatus is 1, indicating waiting for recharge; the service type Biz_type is Recharge, indicating a recharge service.
[0055]
[0056] Table 3 Mapping records between business type and task type
[0057] In addition to adding mapping records to the mapping relationship table, mapping records can also be deleted from the mapping relationship table as required. Therefore, in the reference embodiment of the present invention, the task processing method can also include: after receiving the task cancellation request, deleting the mapping record corresponding to the task cancellation request from the mapping relationship table. The task cancellation request is a specific task cancellation request that includes a specific task to be canceled. According to the task cancellation request, the mapping record to be deleted can be obtained, and then the mapping record is deleted from the mapping relationship table.
[0058] It can be seen that in the embodiment of the present invention, a mapping record can be dynamically added or deleted through the mapping relationship table, so that the task data corresponding to the mapping record can be dynamically added or cancelled, thereby solving the technical problem that the prior art cannot dynamically terminate or add tasks during the process orchestration.
[0059] After querying the mapping relationship table with the business type as the query condition and obtaining the mapping record corresponding to the business type, the task data corresponding to the mapping record can be constructed. Therefore, in a reference embodiment of the present invention, constructing the task data corresponding to the mapping record based on JAVA reflection technology can include: obtaining the task type in the mapping record; traversing the mapping record to determine the dynamic field in the mapping record; based on JAVA reflection technology, obtaining the business data corresponding to the mapping record according to the dynamic field; constructing the task data corresponding to the mapping record according to the business data corresponding to the mapping record and the task type in the mapping record.
[0060] Since there are dynamic fields configured in the mapping record, when constructing task data, it is necessary to use JAVA reflection technology to obtain specific business data based on the dynamic field. In the running state, for any entity class, all properties and methods of this class can be known; for any object, any method and property of it can be called; this function of dynamically obtaining information and dynamically calling object methods is called JAVA language reflection technology. Specifically, after querying the mapping record corresponding to business type A from the mapping relationship table, obtain the task type B in the mapping record; traverse the mapping record, determine the dynamic fields in the mapping record, and read the dynamic field value fieldValue; since the dynamic field value can be expressed in the form of a separator, such as Order.orderId, parse Order.orderId through JAVA reflection technology, and get the source of the business data as the field orderId of the table Order, and then parse the business data, such as the business data: recharge 50 yuan for number 130XXXX; finally, according to the parsed business data and the task type in the mapping record, the task data corresponding to the mapping record can be constructed.
[0061] In the embodiment of the present invention, a predefined class can be used to scan the task data table, obtain the task data to be executed, and process the task data to be executed. Therefore, it is necessary to predefine the class and define a specific execution method in the class, call the defined specific execution method, scan the task data table to obtain the task data to be executed, and finally process the task data to be executed. Therefore, in the reference embodiment of the present invention, the method of task processing can also include: defining an abstract class, defining a compilation task model method, a compilation task distribution method and a scanning method in the abstract class, defining a first global variable and a second global variable, wherein the first global variable is a task model type, and the second global variable is a task distribution type; defining a task model class, defining a task type variable and a task execution logic in the task model class; defining a task distribution interface class, defining a task distribution method in the task distribution interface class, and defining a task operation global variable of a task operation type; defining a task operation class, defining a locking task method, an execution operation method and an unlocking task method in the task operation class; defining a task execution class, wherein the task execution class inherits the abstract class, and defining a timing execution method in the task execution class.
[0062] Figure 2 is a predefined class structure diagram according to an embodiment of the present invention. Figure 2 It can be seen that the predefined classes in the embodiment of the present invention include: task model class, abstract class, task execution class, task distribution interface class and task operation class. The variables and methods defined in each class are described in detail below.
[0063] To define a task model class, you can use WorkerModel to represent it, or you can use a POJO class (i.e. a simple entity class, which is convenient for programmers to use the data table in the database, and can conveniently use the POJO class as an object, and of course, you can also conveniently call its get and set methods) to define WorkerModel. In WorkerModel, define two member variables: the task type variable, i.e. workerType of Integer type; and the task execution logic, i.e. workerHandler of String type. Among them, workerType represents the task type variable to be scanned, such as workerType is 1, which represents a recharge task; workerHandler represents the execution of the task logic, such as the class instance that executes the recharge task logic.
[0064] Defining an abstract class can be represented by AbstractScanWorker, which is equivalent to loading the driver of the task to be executed. In AbstractScanWorker, the following abstract methods are defined: the compilation task model method can be represented by buildWorkerModel; the compilation task distribution method can be represented by buildWorkerDispatcher; the scanning method with specific logic can be represented by start Scan. In addition, in AbstractScanWorker, two global member variables are also defined: the first global variable is the variable workerModel of the WorkerModel type; the second global variable is the variable workerDispatcher of the IworkerDispatcher type.
[0065] Define the task execution class, which can be represented by Worker, such as Rec hargeWorker that executes the phone charge recharge logic. It should be noted that the task execution class Worker inherits and loads the abstract class AbstractScanWorker, and implements the abstract methods buildWorkerModel and buildWorkerDispatcher defined in AbstractScanWorker. Worker can also define its own methods: scheduled execution method, represented by doWorker.
[0066] Considering that the abstract class is a class that cannot be instantiated, the abstract methods defined in the abstract class only need to be declared and do not need to be implemented. Therefore, it is necessary to inherit the subclass of the abstract class to implement the method of the abstract class. In the embodiment of the present invention, Worker inherits AbstractScanWorker, and constructs a WorkerModel instance representing a specific task class inside the implemented abstract method buildWorkerModel. For example, for the recharge task type, a rechargeWorkerModel instance is constructed, and the workerType of the instance is set to rechargeWorkerType, and the execution identifier handlerBeanId is set to rechargeHandlerBean. In addition, a timer annotation jd-task-annotation can be added to the doWorker method to trigger the execution of doWorker at a fixed time. In the doWorker method, the method startScan of the parent class (i.e., AbstractScanWorker) is called to load the task to be executed. Therefore, in the reference embodiment of the present invention, calling the scanning method defined in the abstract class may include: calling the timed execution method defined in the task execution class, and calling the scanning method defined in the abstract class at a fixed time inside the timed execution method.
[0067] Define the task dispatch interface class, which can be represented by IworkerDispatcher. In IworkerDispatcher, define the task dispatch method, which is represented by workerDispatcher. Provide a default implementation class, represented by MultiThreadWorkerDispatcher, which is used to provide multi-threaded concurrent execution of task data based on thread pool. In IworkerDispatcher, also define a global variable: WorkerProcessor type variable workerProcessor.
[0068] Define a task operation class, which can be represented by WorkerProcessor. In WorkerProcessor, define three implementation methods: lock task method, represented by lockWorker; execute operation method, represented by doProcessor; unlock task method, represented by unLockWorker.
[0069] In addition, in the embodiment of the present invention, a task record class can also be defined, represented by Task, and member variables are defined in T ask: workerType of Integer type, indicating the task type to which Task belongs; and status of Integer type, indicating the Task status. For example, in a recharge task, workerType is 1, indicating a recharge task; status is 1, indicating waiting for recharge. When the Worker is running, it scans the task data table based on workerType and status as conditions.
[0070] In a reference embodiment of the present invention, a predefined class is used to scan a task data table, obtain data of tasks to be executed, and process the data of tasks to be executed, which may include: calling a compilation task model method and a compilation task distribution method defined in an abstract class through a task execution class to assign values to the defined first global variable and the second global variable; calling a scanning method defined in the abstract class to read a task type variable defined in the task model class, scanning the task data table according to the task type variable, and obtaining data of tasks to be executed; calling a task distribution method defined in a task distribution interface class to process the data of tasks to be executed according to the task execution logic defined in the task model class.
[0071] When AbstractScanWorker is started, the Worker that inherits AbstractScanWorker can call the buildWorkerModel method defined in AbstractScanWorker and assign it to the global variable workerModel, so that a specific workerModel object can be obtained, which includes workerType and workerHandler. For example, the specific class RechargeWorker that performs the phone charge recharge task inherits AbstractScanWorker and can implement the buildWorkerModel method to obtain the corresponding RechargeworkerModel object, that is, assign the recharge task type and recharge task logic corresponding to the recharge task. The Worker can also call the buildWorkerDispatcher method defined in AbstractScanWorker and assign it to the global variable workerDispatcher.
[0072] Worker can call the startScan method defined in AbstractScanWorker to read the workerType in the workerMode object, and use it as a query condition to query the task data that meets this task type from the task data table, that is, the task data to be executed. In the reference embodiment of the present invention, scanning the task data table according to the task type variable to obtain the task data to be executed can include: querying the task data table with the task type variable as the query condition, and judging whether there is optional task data corresponding to the task type variable in the task data table; if so, judging whether the task status of the optional task data is waiting for processing, and if so, determining that the optional task data is the task data to be executed.
[0073] After determining the task data to be executed, the workerDispatcher method defined in the task distribution interface class can be called to process the task data to be executed according to the task execution logic in the workerMode object. In the reference embodiment of the present invention, the task distribution method defined in the task distribution interface class is called to process the task data to be executed according to the task execution logic defined in the task model class, which may include: determining the target task type corresponding to the task data to be executed, calling the task distribution method to check whether there is a thread pool corresponding to the target task type in the thread pool container; if so, using the thread pool corresponding to the target task type, processing the task data to be executed according to the task execution logic; if not, constructing a thread pool corresponding to the target task type, placing the thread pool corresponding to the target task type in the thread pool container, and using the thread pool corresponding to the target task type, processing the task data to be executed according to the task execution logic.
[0074] Specifically, the queried task data to be executed and the workerMode object are sent to the workerDispatcher. The workerDispatcher first checks whether there is a thread pool corresponding to the target task type in the thread pool container ThreadPoolMap, that is, whether there is a thread pool with workerType as the key in ThreadPoolMap. If it does not exist, a thread pool will be created and put into ThreadPoolMap with workerType as the key, and then the created thread pool will be used to execute data asynchronously; if it exists, the thread pool will be used to execute data asynchronously.
[0075] In a reference embodiment of the present invention, the thread pool corresponding to the target task type is used to process the task data to be executed according to the task execution logic, which may include: reading the empty thread in the thread pool corresponding to the target task type, and instantiating the task operation class according to the task data to be executed and the task execution logic through the empty thread; calling the lock task method defined in the task operation class to update the task status of the task data to be executed stored in the task data table to a locked state; calling the execute operation method defined in the task operation class to process the task data to be executed according to the task execution logic and obtain the processing result; calling the unlock task method defined in the task operation class to update the task status of the task data to be executed stored in the task data table to complete the unlocking.
[0076] The thread pool will first read out the idle threads, and the execution logic of the threads is to send the data to be executed and the workerModel object to the WorkerProcess. After the WorkerProcess obtains the data, it will perform the following steps: call the lockWorker method defined in the WorkerProcess to update the task status of the task data to be executed stored in the task data table to the locked state, that is, lock the task data to be executed, and update the task status of the task data to be executed in the task data table to the locked state, indicating that the task data to be executed is being executed; call the doProcessor method defined in the WorkerProcess to process the task data to be executed according to the workerHandler, obtain the processing result, and obtain the workerHandle from the workerModel object. The processing structure can include successful processing and failed processing; call the unLockWorker method defined in the WorkerProcess to update the task status of the task data to be executed stored in the task data table and unlock it.
[0077] According to the task processing technical solution of the embodiment of the present invention, the mapping relationship table can be queried by business type, and the mapping relationship between the business type and the task type is recorded in the mapping relationship table. Therefore, after the mapping record is generated, the task data corresponding to the mapping record can be constructed according to the generated mapping record, and then the task data can be added to the task data table. In this way, the data corresponding to the task to be executed can be obtained by scanning the task data table, and then the task data table can be scanned by using a predefined class to obtain and process the task data to be executed. This solves the technical problems of the reduced reusability of the class file caused by the coupling of the three steps in the prior art, and the need to develop a function of scanning the database to query data each time a new task is added. It can also improve the flexibility and maintainability of the code.
[0078] Figure 3Schematic diagram of the main modules of the task processing device according to an embodiment of the present invention. Figure 3 As shown, the main modules of the task processing device 300 may include: a query module 301 , a construction module 302 and a processing module 303 .
[0079] Among them, the query module 301 can be used to query the mapping relationship table with the business type as the query condition, and obtain the mapping record corresponding to the business type; the construction module 302 can be used to construct the task data corresponding to the mapping record based on the JAVA reflection technology, and store the task data in the task data table; the processing module 303 can be used to use the predefined class to scan the task data table, obtain the task data to be executed, and process the task data to be executed. The mapping relationship table records the mapping relationship between the business type and the task type.
[0080] In the embodiment of the present invention, the mapping relationship table may include: a mapping identification field, a business data source field, a task type field, a task initial state field, and a business type field. The task processing device 300 may also include: a generation module (not shown in the figure), which may be used to: obtain input data through a visual interface, generate a mapping record between the business type and the task type corresponding to the input data, and store the generated mapping record in the mapping relationship table; and, after receiving a task cancellation request, delete the mapping record corresponding to the task cancellation request from the mapping relationship table.
[0081] In the embodiment of the present invention, the construction module 302 can also be used to: obtain the task type in the mapping record; traverse the mapping record to determine the dynamic field in the mapping record; based on the JAVA reflection technology, obtain the business data corresponding to the mapping record according to the dynamic field; construct the task data corresponding to the mapping record according to the business data corresponding to the mapping record and the task type in the mapping record. The task data may include: the task type, the current state of the task, and the identifier of the associated business data.
[0082] Optionally, the task processing device 300 may also include: a definition module (not shown in the figure), which can be used to: define an abstract class, define a compilation task model method, a compilation task distribution method and a scanning method in the abstract class, define a first global variable and a second global variable, wherein the first global variable is a task model type and the second global variable is a task distribution type; define a task model class, define a task type variable and a task execution logic in the task model class; define a task distribution interface class, define a task distribution method in the task distribution interface class, define a task operation global variable of a task operation type; define a task operation class, define a locking task method, an executing operation method and an unlocking task method in the task operation class; define a task execution class, the task execution class inherits the abstract class, and defines a timed execution method in the task execution class.
[0083] In an embodiment of the present invention, the processing module 303 can also be used to: call the compilation task model method and the compilation task distribution method defined in the abstract class through the task execution class to assign values to the defined first global variable and the second global variable; call the scanning method defined in the abstract class to read the task type variable defined in the task model class, scan the task data table according to the task type variable, and obtain the task data to be executed; call the task distribution method defined in the task distribution interface class to process the task data to be executed according to the task execution logic defined in the task model class.
[0084] In an embodiment of the present invention, the processing module 303 can also be used to: query the task data table with the task type variable as the query condition, and determine whether there is optional task data corresponding to the task type variable in the task data table; if so, determine whether the task status of the optional task data is waiting for processing, and if so, determine that the optional task data is task data to be executed.
[0085] In an embodiment of the present invention, the processing module 303 can also be used to: determine the target task type corresponding to the task data to be executed, call the task distribution method to check whether there is a thread pool corresponding to the target task type in the thread pool container; if so, use the thread pool corresponding to the target task type to process the task data to be executed according to the task execution logic; if not, build a thread pool corresponding to the target task type, put the thread pool corresponding to the target task type into the thread pool container, and use the thread pool corresponding to the target task type to process the task data to be executed according to the task execution logic.
[0086] In an embodiment of the present invention, the processing module 303 can also be used to: read an empty thread in the thread pool corresponding to the target task type, and instantiate a task operation class through the empty thread according to the task data to be executed and the task execution logic; call the lock task method defined in the task operation class to update the task status of the task data to be executed stored in the task data table to a locked state; call the execute operation method defined in the task operation class to process the task data to be executed according to the task execution logic and obtain the processing result; call the unlock task method defined in the task operation class to update the task status of the task data to be executed stored in the task data table to complete the unlocking.
[0087] In the embodiment of the present invention, the processing module 303 may also be used to: call the scheduled execution method defined in the task execution class, and regularly call the scanning method defined in the abstract class within the scheduled execution method.
[0088] From the above description, it can be seen that the task processing device of the embodiment of the present invention can query the mapping relationship table through the business type, and the mapping relationship between the business type and the task type is recorded in the mapping relationship table. Therefore, after generating the mapping record, the task data corresponding to the mapping record can be constructed according to the generated mapping record, and then the task data can be added to the task data table. In this way, the data corresponding to the task to be executed can be obtained by scanning the task data table, and then the task data table can be scanned using a predefined class to obtain and process the task data to be executed. This solves the technical problems of the prior art that the three steps of operation are coupled together, resulting in reduced reusability of the class file, and the need to develop a function of scanning the database to query data each time a new task is added. It can also improve the flexibility and maintainability of the code.
[0089] Figure 4 An exemplary system architecture 400 is shown to which the task processing method or task processing apparatus according to the embodiment of the present invention can be applied.
[0090] like Figure 4 As shown, system architecture 400 may include terminal devices 401, 402, 403, network 404 and server 405. Network 404 is used to provide a medium for communication links between terminal devices 401, 402, 403 and server 405. Network 404 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0091] Users can use terminal devices 401, 402, 403 to interact with server 405 through network 404 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 401, 402, 403, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).
[0092] The terminal devices 401 , 402 , and 403 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.
[0093] The server 405 may be a server that provides various services, such as a backend management server (only an example) that provides support for shopping websites browsed by users using the terminal devices 401, 402, and 403. The backend management server may analyze and process the received data such as product information query requests, and feed back the processing results (such as target push information, product information - only an example) to the terminal device.
[0094] It should be noted that the task processing method provided in the embodiment of the present invention is generally executed by the server 405 , and accordingly, the task processing device is generally disposed in the server 405 .
[0095] It should be understood that Figure 4 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0096] Reference below Figure 5 , which shows a schematic diagram of the structure of a computer system 500 of a terminal device suitable for implementing an embodiment of the present invention. Figure 5 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0097] like Figure 5 As shown, the computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage part 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the system 500 are also stored. The CPU 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0098] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed, so that a computer program read therefrom is installed into the storage section 508 as needed.
[0099] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 509, and / or installed from the removable medium 511. When the computer program is executed by the central processing unit (CPU) 501, the above-mentioned functions defined in the system of the present invention are executed.
[0100] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, 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 portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0101] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0102] The modules involved in the embodiments of the present invention may be implemented by software or hardware. The modules described may also be set in a processor, for example, it may be described as: a processor includes a query module, a construction module and a processing module. The names of these modules do not constitute a limitation on the modules themselves in some cases. For example, the query module may also be described as "a module for querying a mapping relationship table with a business type as a query condition and obtaining a mapping record corresponding to the business type".
[0103] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently and not be assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes: querying the mapping relationship table with the business type as the query condition, obtaining the mapping record corresponding to the business type, and the mapping relationship table records the mapping relationship between the business type and the task type; constructing the task data corresponding to the mapping record based on JAVA reflection technology, and storing the task data in the task data table; using the predefined class, scanning the task data table, obtaining the task data to be executed, and processing the task data to be executed.
[0104] According to the technical solution of the embodiment of the present invention, the mapping relationship table can be queried by business type, and the mapping relationship between the business type and the task type is recorded in the mapping relationship table. Therefore, after the mapping record is generated, the task data corresponding to the mapping record can be constructed according to the generated mapping record, and then the task data can be added to the task data table. In this way, the data corresponding to the task to be executed can be obtained by scanning the task data table, and then the task data table can be scanned by using a predefined class to obtain and process the task data to be executed. This solves the technical problems of the reduced reusability of the class file caused by the coupling of the three steps in the prior art, and the need to develop a function of scanning the database to query data each time a new task is added. It can also improve the flexibility and maintainability of the code.
[0105] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A task processing method, It is characterized in that include: Querying a mapping relationship table with the business type as a query condition to obtain a mapping record corresponding to the business type, wherein the mapping relationship table records the mapping relationship between the business type and the task type; Constructing the task data corresponding to the mapping record based on JAVA reflection technology, and storing the task data in the task data table; The task data table is scanned by using a predefined class to obtain the task data to be executed, and the task data to be executed is processed.
2. The method according to claim 1, It is characterized in that The mapping relationship table includes: a mapping identification field, a business data source field, a task type field, a task initial status field, and a business type field; the method further includes: Acquiring input data through a visual interface, generating a mapping record between a business type and a task type corresponding to the input data, and storing the generated mapping record in the mapping relationship table; and After receiving the task cancellation request, the mapping record corresponding to the task cancellation request is deleted from the mapping relationship table.
3. The method according to claim 1, It is characterized in that The step of constructing the task data corresponding to the mapping record based on JAVA reflection technology includes: Obtaining the task type in the mapping record; Traversing the mapping record to determine the dynamic fields in the mapping record; Based on JAVA reflection technology, obtain the business data corresponding to the mapping record according to the dynamic field; According to the business data corresponding to the mapping record and the task type in the mapping record, the task data corresponding to the mapping record is constructed; wherein the task data includes: the task type, the current state of the task, and an identifier of the associated business data.
4. The method according to claim 1, It is characterized in that The method further comprises: An abstract class is defined, in which a compilation task model method, a compilation task distribution method and a scanning method are defined, and a first global variable and a second global variable are defined, wherein the first global variable is a task model type and the second global variable is a task distribution type; Defining a task model class, in which task type variables and task execution logic are defined; Define a task distribution interface class, define a task distribution method in the task distribution interface class, and define a task operation global variable of a task operation type; Define a task operation class, in which a locking task method, an execution operation method, and an unlocking task method are defined; A task execution class is defined, the task execution class inherits the abstract class, and a timed execution method is defined in the task execution class.
5. The method according to claim 4, It is characterized in that The method of using a predefined class to scan the task data table, obtain the task data to be executed, and process the task data to be executed includes: Calling the compiling task model method and the compiling task distribution method defined in the abstract class through the task execution class to assign values to the defined first global variable and the second global variable; Calling the scanning method defined in the abstract class, reading the task type variable defined in the task model class, scanning the task data table according to the task type variable, and acquiring the task data to be executed; The task distribution method defined in the task distribution interface class is called, and the to-be-executed task data is processed according to the task execution logic defined in the task model class.
6. The method according to claim 5, It is characterized in that The step of scanning the task data table according to the task type variable to obtain the task data to be executed includes: The task data table is queried using the task type variable as a query condition to determine whether there is optional task data corresponding to the task type variable in the task data table; If so, it is determined whether the task status of the optional task data is waiting for processing. If so, it is determined that the optional task data is the task data to be executed.
7. The method according to claim 5, It is characterized in that The calling of the task distribution method defined in the task distribution interface class and processing the task data to be executed according to the task execution logic defined in the task model class include: Determine the target task type corresponding to the task data to be executed, and call the task distribution method to check whether there is a thread pool corresponding to the target task type in the thread pool container; If so, using the thread pool corresponding to the target task type, the to-be-executed task data is processed according to the task execution logic; If it does not exist, construct a thread pool corresponding to the target task type, put the thread pool corresponding to the target task type into the thread pool container, and use the thread pool corresponding to the target task type to process the task data to be executed according to the task execution logic.
8. The method according to claim 7, It is characterized in that The utilizing the thread pool corresponding to the target task type to process the task data to be executed according to the task execution logic includes: Read an empty thread in a thread pool corresponding to the target task type, and instantiate the task operation class through the empty thread according to the task data to be executed and the task execution logic; Calling the locking task method defined in the task operation class to update the task status of the to-be-executed task data stored in the task data table to a locking status; Calling the execution operation method defined in the task operation class, processing the task data to be executed according to the task execution logic, and obtaining the processing result; The unlocking task method defined in the task operation class is called to update the task status of the to-be-executed task data stored in the task data table to complete unlocking.
9. The method according to claim 5, It is characterized in that The calling of the scanning method defined in the abstract class comprises: The timed execution method defined in the task execution class is called, and the scanning method defined in the abstract class is called periodically within the timed execution method.
10. A task processing device, It is characterized in that include: A query module is used to query a mapping relationship table based on a business type as a query condition to obtain a mapping record corresponding to the business type, wherein the mapping relationship table records a mapping relationship between a business type and a task type; A construction module, used for constructing the task data corresponding to the mapping record based on JAVA reflection technology, and storing the task data in a task data table; The processing module is used to use a predefined class to scan the task data table, obtain the task data to be executed, and process the task data to be executed.
11. An electronic device, It is characterized in that include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 9.
12. A computer readable medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.
