Summary of the invention
The embodiment of the present application technical problem to be solved is, provides a kind of task processing method and server, can mention
The efficiency of high task processing
In order to solve the above-mentioned technical problem, the embodiment of the present application provides a kind of task processing method, comprising:
When current task treating capacity is not up to the first preset threshold, if there are at least one task in queue queue,
Then extract the waiting task in the queue queue, the waiting task is that processing priority is most in the queue queue
High task;
If the waiting task is being translated for task, translation processing is carried out to the waiting task;
When the current amount of summarizing is not up to the second preset threshold, to the translation, treated that waiting task converges
Total processing, pushes to financial platform for the waiting task.
Wherein, the method also includes: when receiving task, it is pre- to judge whether current task treating capacity reaches first
If threshold value;If current task treating capacity reaches first preset threshold, received task is added to arrangement queue
In.
Wherein, if the current task treating capacity reaches first preset threshold, received task is added
Into arrangement queue, comprising:
If current task treating capacity reaches first preset threshold, judgement currently whether there is queue queue;
Received task is then added in the arrangement queue by queue queue if it exists;
Queue queue if it does not exist then carries out initialization creation to the queue queue, and received task is added
Into the arrangement queue.
Wherein, if the waiting task is being translated for task, the waiting task is translated
Processing, comprising:
Extract the task identification of the waiting task;
If the task identification of the waiting task is first identifier, it is determined that the waiting task is to be turned over
Translating for task;
Translation processing is carried out to the waiting task.
Wherein, the method also includes:
If the task identification of the waiting task is second identifier, it is determined that it is pre- whether the current amount of summarizing reaches second
If threshold value;
If the current amount of summarizing is not up to second preset threshold, aggregation process is carried out to the waiting task.
Correspondingly, the embodiment of the present application also provides a kind of servers, comprising:
Extraction module, for when current task treating capacity is not up to the first preset threshold, if existing in queue queue
At least one task, then extract the waiting task in the queue queue, and the waiting task is in the queue queue
The middle highest task of processing priority;
Translation module, if being being translated for task for the waiting task, to the waiting task
Carry out translation processing;
Summarizing module, for when the current amount of summarizing is not up to the second preset threshold, to the translation treated to
Processing task carries out aggregation process, and the waiting task is pushed to financial platform.
Wherein, the server further include:
Whether judgment module, the task treating capacity for when receiving task, judging current reach the first preset threshold;
Module is added, if reaching first preset threshold for current task treating capacity, by received task
It is added in arrangement queue.
Wherein, the addition module is sentenced if reaching first preset threshold specifically for current task treating capacity
It is disconnected currently to whether there is queue queue;Received task is then added in the arrangement queue by queue queue if it exists;If
There is no queue queues, then carry out initialization creation to the queue queue, and received task is added to the arrangement
In queue.
Wherein, the translation module, specifically for extracting the task identification of the waiting task;If described to be processed
The task identification of business is first identifier, it is determined that the waiting task is being translated for task;To described to be processed
Task carries out translation processing.
Wherein, the server further include:
Determining module, if the task identification for the waiting task is second identifier, it is determined that the current amount of summarizing
Whether second preset threshold is reached;
Wherein, the summarizing module, if being also used to the current amount of summarizing is not up to second preset threshold, to described
Waiting task carries out aggregation process.
Implement the embodiment of the present application, has the following beneficial effects:
When current task treating capacity is not up to the first preset threshold, if there are at least one task in queue queue,
The waiting task in the queue queue is then extracted, if the waiting task is being translated for task, this is waited for
Processing task is translated, and when the current amount of summarizing is not up to the second preset threshold, to translation treated to be processed
Business carries out aggregation process, which is pushed to financial platform, can liberate the time to be processed such as financial staff,
Also, any time section can be handled task, improve the efficiency of task processing.
Specific embodiment
With reference to the accompanying drawing, embodiments herein is described.Based on the embodiment in the application, this field is common
Technical staff's every other embodiment obtained without creative efforts belongs to the model of the application protection
It encloses.
Finance need to be propped up according to current system hardware environment when carrying out data translation or summarizing function treatment
The limit held carrys out operation task, and need it is purely manual click, wait a batch or more batches of tasks handled and then
Carry out the processing of next group task.In time, the work hours is than relatively limited, and translates with summarizing batch number to be treated
Amount is very big, and the most idle time, such as after coming off duty, such free time cannot make full use of, and task is caused to handle
Efficiency it is relatively low.
To solve the above-mentioned problems, this application provides a kind of task processing method and servers, can be arranged by increasing
The mode of team's queue, untreated task is put into queue queue, and carries out translation or aggregation process automatically.In this way,
At arbitrary period (such as midnight), system can still automatically process task, and not need manually to wait, thus liberation
Manpower increases the efficiency of task processing.
Below referring to Fig. 1, for a kind of scene schematic diagram of task processing provided by the present application.
In 101, server can receive the clicking operation of user.Specifically, user can be to task to be treated
It is clicked, so that system carries out translation processing or aggregation process to it.
In 102, server may determine that whether current task reaches saturation.For example, the server judges whether to satisfy
Judged with can be according to whether current task treating capacity reaches the first preset threshold this condition.If reaching first
Preset threshold, it is determined that current task reaches saturation, if not up to the first preset threshold, can determine current task
Not up to it is saturated.
In 103, if reaching saturation, task to be treated can be added in queue queue.In 104,
If be not up to saturated, may determine that whether the task to be treated is the needing to translate of the task;If it is, can be
In 105, translation processing is carried out to the task to be treated;If it is not, translation processing after the completion of, can be 106
In, judge current system summarizes whether task reaches saturation;If reaching saturation, can will translation complete task or
Not the needing to be translated of the task is added in the queue queue and is waited;It, can be by the translation if be not up to saturated
The task of completion does not need being translated for task progress aggregation process.
It in one embodiment, can be refering to Fig. 2 for the processing of being added in queue queue for task.
Specifically, in step 201, server can star autopolling task, and in 202, judge queue queue
In whether with the presence of task.If existed without task, in 203, autopolling task terminates;If there is task exists,
Then it can check whether system task is saturated in 204;If saturation, autopolling task terminate.
If system task is unsaturated, it is highest to be processed that processing priority in queue queue can be taken out in 205
Task, and in 206, judge whether the waiting task is being translated for task.If the waiting task is to need
Being translated for task, then can be in 207, and server carries out translation processing to the waiting task;If it is not,
, can be in 208 after the completion of translation processing, judge current system summarizes whether task reaches saturation;If reaching saturation,
Then the task of translation completion or not the needing to translate of the task can be added in the queue queue and be waited;If
It is not up to saturated, then by task that the translation is completed or translating for task can not needed carries out aggregation process.
As it can be seen that by one queue queue of setting, as soon as financial staff only need to click task to be treated time, system
The processing of autopolling can be carried out to task, until the task in queue queue is handled and completed, reduce the artificial waiting time,
The efficiency of task processing is also improved simultaneously.
For clearer explanation, the present processes embodiment is described below.It should be noted that the present processes
Embodiment can be executed by server, which can for example have computer, the server of biggish data-handling capacity
Etc., the application is not intended to be limited in any this.
Referring to Fig. 3, being a kind of flow diagram of task processing method provided by the present application.Method as shown in Figure 3
Can include:
S301, when current task treating capacity is not up to the first preset threshold, if there are at least one in queue queue
Task then extracts the waiting task in the queue queue.
Wherein, the waiting task is the highest task of processing priority in the queue queue.
For example, which, which can be pushed on the server for other platforms, carries out appointing for financial settlement
Business, each task can be the form of inventory (such as charge slip, request slip, also capital are single).
In one embodiment, judge the highest task of the processing priority, can be by entering the queue queue
Time judges.For example, if task a to enter queue queue earliest, task a can be highest for processing priority
Task.
Alternatively, judging the highest task of the processing priority, it is also possible to corresponding flat by the task in queue queue
The priority of platform judges.For example, if the corresponding platform of task b is technical support platform, and the technical support platform is excellent
First grade is greater than the priority of an any other platform, then can determine that task b is the highest task of processing priority.When
So, the above method is only illustrated, and non exhaustive, including but not limited to above-mentioned optional way.
In one embodiment, the limit which can be supported by server according to System Hardware Environment
It is configured, can also be voluntarily configured by user, the application is not intended to be limited in any this.
It should be noted that the task treating capacity may include the task amount and progress aggregation process for carrying out translation processing
Task amount, that is to say, that the first preset threshold may include translation processing task amount threshold value and aggregation process task
Measure threshold value.
In one embodiment, server can be according to weighted value to the task amount threshold value and aggregation process of translation processing
Task amount threshold value be allocated.For example, it is assumed that the first preset threshold is 100, the task amount of systemic presupposition translation processing is accounted for
0.3, the task amount of aggregation process accounts for 0.7, then the task amount threshold value of translation processing can be 30, the task of the aggregation process
Measuring threshold value can be 70.Certainly, aforesaid way is only illustrated, and non exhaustive, including but not limited to above-mentioned optional way.
Wherein, the task amount threshold value of the aggregation process can be the second preset threshold.
In one embodiment, when receiving task, server can also judge whether current task treating capacity reaches
To the first preset threshold;If current task treating capacity reaches first preset threshold, received task is added to
It arranges in queue.
For example, financial staff can first click task to be treated one by one, so that server is to it
Carry out translation processing or aggregation process.If task treating capacity at this time reaches the first preset threshold, can will need to locate
The task of reason is added in queue queue.If task treating capacity at this time is not up to the first preset threshold, this can be needed
Task to be processed carries out translation or aggregation process.
In one embodiment, it if the current task treating capacity reaches first preset threshold, will receive
Task be added in arrangement queue, comprising: if current task treating capacity reaches first preset threshold, judgement is current
With the presence or absence of queue queue;Received task is then added in the arrangement queue by queue queue if it exists;If it does not exist
Queue queue then carries out initialization creation to the queue queue, and received task is added in the arrangement queue.
For example, when there is task to enter in the server, server may determine that current task treating capacity is
It is no to reach the first preset threshold, if reaching first preset threshold, which can be added in queue queue, if
The not queue queue can then carry out the initialization creation of queue queue.
It may include task amount threshold value, the setting of setting translation processing specifically, carrying out the initialization creation of queue queue
The task amount threshold value of aggregation process, setting need the information of entering in queue queue for the task stored (such as to may include
Platform identification belonging to task identification, task, size of batch, task belonging to task etc., the application do not make this any
Limitation) etc. contents.
In one embodiment, which can also establish a scanning thread, which can scan the row
Team's queue, if there are task in the queue queue, can when current task treating capacity is not up to the first preset threshold,
The highest task of processing priority is extracted and is handled, until the task in queue queue is disposed.
If S302, the waiting task are being translated for task, the waiting task is translated
Processing.
It should be noted that server can first determine whether the waiting task is being translated for task,
If it is, translation processing can be carried out to the waiting task, so that the waiting task matches with financial platform, so as to
Financial settlement is carried out to the waiting task in subsequent.
S303, when the current amount of summarizing is not up to the second preset threshold, to translation treated the waiting task
Aggregation process is carried out, the waiting task is pushed into financial platform.
It should be noted that the task amount threshold value of the aggregation process can be the second preset threshold, second preset threshold
It can be configured in advance by server, it can also be by user's self-setting.The application is not intended to be limited in any this.
Wherein, financial platform can be a whole set of note that normal handling is carried out for the business performance and financial situation of enterprise
Record, program and facility may include the industry recorded, analyzed, classified, reported for the economic data in each task etc.
Business activity and the methods and procedures established.
It should also be noted that, the first preset threshold can be greater than second preset threshold.
If the current amount of summarizing does not reach the second preset threshold, in translation after treatment, which can
To carry out aggregation process to translation treated the waiting task, by the translation treated waiting task and other
Task after summarizing is pushed to financial platform together.
For example, server can be waited be disposed with a batch of all tasks after, will be with a batch of all
Task is uniformly pushed to financial platform and is further processed.If the batch of waiting task is batch a, this is to be processed
Task can be all with other batch a task together with summarized after, be pushed to financial platform.
As it can be seen that by the embodiment of the present application, when current task treating capacity is not up to the first preset threshold, if being lined up team
There are at least one tasks in column, then extract the waiting task in the queue queue, if the waiting task be need into
The task of row translation, then translate the waiting task, and when the current amount of summarizing is not up to the second preset threshold, right
Translation treated waiting task carries out aggregation process, which is pushed to financial platform, can liberate wealth
The time to be processed such as business personnel, also, any time section can be handled task, improve the effect of task processing
Rate.
Below referring to Fig. 4, being the flow diagram of another task processing method provided by the embodiments of the present application.Such as figure
Method shown in 4 can include:
S401, when current task treating capacity is not up to the first preset threshold, if there are at least one in queue queue
Task then extracts the waiting task in the queue queue.
Wherein, the waiting task is the highest task of processing priority in the queue queue.
The platform identification of S402, the identification waiting task.
It should be noted that the platform identification of the waiting task, such as can be platform belonging to the waiting task
Account, platform code, ID number, hardware number, network address etc., the application is not intended to be limited in any this.
For example, some essential informations can be arranged for the platform of each transmission task in user, which can
To include whether task under the platform can be with automatic translation, if can summarize automatically etc., the application does not make this any
Limitation.Server can determine whether the task can summarize with automatic translation and/or automatically by the platform identification of identification mission.
If the platform identification of S403, the waiting task is first identifier, it is determined that the waiting task is to need
Being translated for task.
In one embodiment, which can be used to indicate that the task under corresponding platform supports automatic translation.Such as
The fruit server identify the waiting task platform identification be first identifier, then can determine the waiting task be need into
The task of row translation.
S404, translation processing is carried out to the waiting task.
In one embodiment, server can be by the data typesetting of the waiting task, data format, data content etc.
Converted so that the waiting task matches with financial platform, convenient for financial platform to the waiting task at
Reason.
In one embodiment, if the platform identification of waiting task is first identifier, but the waiting task is
Through carrying out the task of translation, which can not carry out translation processing to the waiting task.That is, the waiting task
Platform identification be first identifier, and the waiting task is handled without translation, then, which can be to be processed to this
Task carries out translation processing.
S405, when the current amount of summarizing is not up to the second preset threshold, to translation treated the waiting task
Aggregation process is carried out, the waiting task is pushed into financial platform.
In one embodiment, if the platform identification of the waiting task is second identifier, it is determined that current task
Whether the amount of summarizing reaches the second preset threshold;If the current task amount of summarizing is not up to second preset threshold, to described
Waiting task carries out aggregation process.
Wherein, which can be used to indicate that the task under corresponding platform does not support automatic translation.
If the platform identification of the waiting task is second identifier, which may determine that the current task amount of summarizing
Whether reach the second preset threshold, if the current task amount of summarizing does not reach the second preset threshold, this can be waited locating
Reason task carries out aggregation process, and the waiting task and the task of same batch are pooled together.
It, can be by the waiting task row of being added to again if the current task amount of summarizing reaches the second preset threshold
It is waited in team's queue.When the current task amount of summarizing is not up to the second preset threshold, which can be according to queuing
Processing priority in queue successively carries out aggregation process to being lined up for task.
As it can be seen that by the embodiment of the present application, which can be not up to the first default threshold in current task treating capacity
When value, if can be there are at least one task in queue queue by the platform identification of waiting task, if should be wait locate
The platform identification of reason task is first identifier, then can determine that the waiting task is the needing to translate of the task, and wait locating to this
Reason task carries out translation processing, when the current amount of summarizing is not up to the second preset threshold, to translation treated to be processed
Business carries out aggregation process, which is pushed to financial platform, can be by identifying the affiliated platform of waiting task
Mark just can determine whether the waiting task can summarize with automatic translation and/or automatically, without financial staff to each task
It is configured, reduces the burden of financial staff, liberated the time to be processed such as financial staff, also, any time section is all
Task can be handled, improve the efficiency of task processing.
The following is an embodiment of the apparatus of the present invention, and apparatus of the present invention embodiment is for executing institute in the present processes embodiment
The method of realization illustrates only the relevant part of the embodiment of the present application for ease of description, and the part that do not disclose specifically please join
According to the description of embodiment of the present invention method.
Referring to Fig. 5, being a kind of structural schematic diagram of server provided by the embodiments of the present application.The clothes of the embodiment of the present invention
Business device can be all kinds of servers having data processing function, such as text server, database server etc..Such as Fig. 5
Shown in server include:
Extraction module 501, for when current task treating capacity is not up to the first preset threshold, if being deposited in queue queue
In at least one task, then the waiting task in the queue queue is extracted, which is in queue queue Zhong Chu
Manage the task of highest priority.
Translation module 502, if being being translated for task for the waiting task, to the waiting task into
Row translation processing.
Summarizing module 503, for when the current amount of summarizing is not up to the second preset threshold, to the translation treated to
Processing task carries out aggregation process, which is pushed to financial platform.
In one embodiment, the server further include: judgment module 504, for when receiving task, judgement to be current
Task treating capacity whether reach the first preset threshold.
Module 505 is added, if reaching first preset threshold for current task treating capacity, by received task
It is added in arrangement queue.
In one embodiment, addition module 505, if it is first default to reach this specifically for current task treating capacity
Threshold value, then judgement currently whether there is queue queue;Received task is then added to the arrangement team by queue queue if it exists
In column;Queue queue if it does not exist then carries out initialization creation to the queue queue, and received task is added to the row
In rank queue.
In one embodiment, translation module 502, specifically for identifying the task identification of the waiting task;If should
The task identification of waiting task is first identifier, it is determined that the waiting task is being translated for task;This is waited for
Processing task carries out translation processing.
In one embodiment, the server further include: determining module 506, if the task mark for the waiting task
Knowing is second identifier, it is determined that whether the current amount of summarizing reaches the second preset threshold.
Wherein, the summarizing module 503 waits for this if being also used to the current amount of summarizing is not up to second preset threshold
Processing task carries out aggregation process.
As it can be seen that by the embodiment of the present application, when current task treating capacity is not up to the first preset threshold, if being lined up team
There are at least one tasks in column, then extract the waiting task in the queue queue, if the waiting task be need into
The task of row translation, then translate the waiting task, and when the current amount of summarizing is not up to the second preset threshold, right
Translation treated waiting task carries out aggregation process, which is pushed to financial platform, can liberate wealth
The time to be processed such as business personnel, also, any time section can be handled task, improve the effect of task processing
Rate.
Referring to Fig. 6, be a kind of another structural schematic diagram of server provided by the embodiments of the present application, which can be with
It is the computer or server with biggish data-handling capacity, for example, text server, database server etc..Such as Fig. 6
Shown, the server in the embodiment of the present invention includes: at least one communication interface 601;At least one processor 602, such as
CPU;At least one processor 603;At least one output equipment 604, above-mentioned communication interface 601, processor 602, memory 603
It is connected with output equipment 604 by bus.Wherein, bus is for realizing the connection communication between these components.Wherein, of the invention
The communication interface 601 of device and output equipment 604 can be wired sending port in embodiment, or wireless device, example
It such as include antenna assembly, for carrying out the communication of signaling or data with other node devices.
The processor 602 can be central processing unit (central processing unit, CPU), network processing unit
The combination of (network processor, NP) or CPU and NP.
The processor 602 can further include hardware chip.Above-mentioned hardware chip can be specific integrated circuit
(application-specific integrated circuit, ASIC), programmable logic device (programmable
Logic device, PLD) or combinations thereof.Above-mentioned PLD can be Complex Programmable Logic Devices (complex
Programmable logic device, CPLD), field programmable gate array (field-programmable gate
Array, FPGA), Universal Array Logic (generic array logic, GAL) or any combination thereof.
The memory 603 may include volatile memory (volatile memory), such as random access memory
(random-access memory, RAM);Memory also may include nonvolatile memory (non-volatile
), such as flash memory (flash memory), hard disk (hard disk drive, HDD) or solid state hard disk memory
(solid-state drive, SSD);Memory 603 can also include the combination of the memory of mentioned kind.
Optionally, which is also used to store program instruction.The processor 602 can call the memory 603 to deposit
The program instruction of storage realizes the method as shown in embodiment of the present invention method.
The bus can be Peripheral Component Interconnect standard (peripheral component interconnect, abbreviation
PCI) bus or expanding the industrial standard structure (extended industry standard architecture, abbreviation EISA)
Bus etc..The bus can be divided into address bus, data/address bus, control bus etc..For convenient for indicating, in Fig. 6 only with one slightly
Line indicates, it is not intended that an only bus or a type of bus.
Specifically, the program instruction that the processor 602 can call memory 603 to be stored, is realized:
When current task treating capacity is not up to the first preset threshold, if there are at least one task in queue queue,
The waiting task in the queue queue is then extracted, which is highest of processing priority in the queue queue
Business;
If the waiting task is being translated for task, translation processing is carried out to the waiting task;
When the current amount of summarizing is not up to the second preset threshold, to the translation, treated that waiting task summarizes
Processing, pushes to financial platform for the waiting task.
In one embodiment, which is also used to when receiving task, judges that current task treating capacity is
It is no to reach the first preset threshold;If current task treating capacity reaches first preset threshold, received task is added
Into arrangement queue.
In one embodiment, if the processor 602 reaches first preset threshold for current task treating capacity,
Received task is added in arrangement queue, is specifically used for: if current task treating capacity reaches first preset threshold,
Then judgement currently whether there is queue queue;Received task is then added in the arrangement queue by queue queue if it exists;
Queue queue if it does not exist then carries out initialization creation to the queue queue, and received task is added to the arrangement team
In column.
In one embodiment, right if it is being translated for task that the processor 602, which is used for the waiting task,
The waiting task carries out translation processing, is specifically used for: identifying the platform identification of the waiting task;If the waiting task
Platform identification is first identifier, it is determined that the waiting task is being translated for task;The waiting task is carried out
Translation processing.
In one embodiment, if the platform identification that the processor 602 is also used to the waiting task is second identifier,
Determine whether the current task amount of summarizing reaches the second preset threshold;If the current task amount of summarizing is not up to the second default threshold
Value then carries out aggregation process to the waiting task.
A kind of computer readable storage medium is provided in another embodiment of the application, the computer readable storage medium
It is stored with program, when which is executed by processor, method shown in server in the application may be implemented.This is computer-readable
The detailed process that storage medium is executed by processor can be found in method described in above method embodiment, no longer superfluous herein
It states.
A kind of computer program product comprising instruction is additionally provided in another embodiment of the present invention, when it is in computer
When upper operation, so that computer executes method described in above method embodiment.
The computer readable storage medium can be the internal storage unit of terminal described in aforementioned any embodiment, example
Such as the hard disk or memory of server.The computer readable storage medium can also both include the storage inside list of the server
Member also includes External memory equipment.The computer readable storage medium is for needed for storing said program and the server
Other programs and data.The computer readable storage medium, which can be also used for temporarily storing, have been exported or will be defeated
Data out.
Based on the same inventive concept, the principle and the method for the present invention that the computer provided in the embodiment of the present invention solves the problems, such as
Embodiment is similar, therefore the implementation of the computer may refer to the implementation of method, for succinct description, repeats no more herein.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with
Relevant hardware is instructed to complete by program, above-mentioned program can be stored in a computer-readable storage medium, should
Program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, above-mentioned storage medium can be magnetic disk, light
Disk, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access Memory,
RAM) etc..
Above disclosed is only a kind of embodiment of the application, cannot limit the right model of the application with this certainly
It encloses, those skilled in the art can understand all or part of the processes for realizing the above embodiment, and wants according to the application right
Made equivalent variations is sought, the range that the application is covered is still fallen within.