CN111104168B - Calculation result submitting method and device - Google Patents

Calculation result submitting method and device Download PDF

Info

Publication number
CN111104168B
CN111104168B CN201811251602.9A CN201811251602A CN111104168B CN 111104168 B CN111104168 B CN 111104168B CN 201811251602 A CN201811251602 A CN 201811251602A CN 111104168 B CN111104168 B CN 111104168B
Authority
CN
China
Prior art keywords
task
exhaustion
calculation result
calculation
exhaustive
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811251602.9A
Other languages
Chinese (zh)
Other versions
CN111104168A (en
Inventor
姜彦君
张楠赓
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Canaan Jiesi Information Technology Co ltd
Original Assignee
Shanghai Canaan Jiesi Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Canaan Jiesi Information Technology Co ltd filed Critical Shanghai Canaan Jiesi Information Technology Co ltd
Priority to CN201811251602.9A priority Critical patent/CN111104168B/en
Publication of CN111104168A publication Critical patent/CN111104168A/en
Application granted granted Critical
Publication of CN111104168B publication Critical patent/CN111104168B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline or look ahead
    • G06F9/3824Operand accessing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Supply And Distribution Of Alternating Current (AREA)

Abstract

The invention discloses a calculation result submitting method and device, which are used for solving the problem of delay of calculation result submitting time, thereby reducing the waste of calculation force of equipment. The method comprises the following steps: detecting whether a calculation result of an exhaustion task appears in a preset cache pool or not, wherein the preset cache pool is used for storing the calculation result of the exhaustion task; when the calculation result of the exhaustion task appears, the identification of the target exhaustion task corresponding to the calculation result of the exhaustion task is obtained; and submitting the calculation result and the identification of the target exhaustion task to a target server. By adopting the scheme provided by the invention, the calculation result of the current exhaustion task is not required to be submitted after a new exhaustion task is received, more calculation results can be submitted within the time of exhaustion task, the problem of time lag of the calculation result submission is solved, and the waste of the calculation force of equipment is reduced.

Description

Calculation result submitting method and device
Technical Field
The invention relates to the technical field of internet, in particular to a method and a device for submitting a calculation result.
Background
The exhaustive calculation is a process that the calculation software sends the received exhaustive task data issued by the server to the control panel to calculate, and then submits the correct calculation result to the server through the calculation software to obtain corresponding rewards. Specifically, after the control board receives the exhaustion task, the exhaustion task is distributed to different computing units for processing, and then the computing result of each computing unit is submitted to the server through computing software.
In the existing calculation result submitting scheme, the calculation result of the current exhaustion task is submitted when a new exhaustion task is received. However, in general, the task exhaustion is time-efficient, if the interval between the current task exhaustion and the new task exhaustion issue time is relatively long, the interval between the current task exhaustion receiving time and the current task exhaustion calculation result submitting time is relatively long, and therefore, the task exhaustion calculation result submitting time is delayed, so that the task exhaustion is likely to be time-efficient when the calculation result is submitted, and the calculation force of the device is wasted. Therefore, how to solve the problem of time lag of delivering the calculation result, thereby reducing the waste of the calculation force of the equipment is a technical problem to be solved urgently.
Disclosure of Invention
The invention provides a calculation result submitting method and a calculation result submitting device, which are used for solving the problem of delay of calculation result submitting time, so that the waste of calculation force of equipment is reduced.
The invention provides a calculation result submitting method, which comprises the following steps:
detecting whether a calculation result of an exhaustion task appears in a preset cache pool or not, wherein the preset cache pool is used for storing the calculation result of the exhaustion task;
when the calculation result of the exhaustion task appears, the identification of the target exhaustion task corresponding to the calculation result of the exhaustion task is obtained;
and submitting the calculation result and the identification of the target exhaustion task to a target server.
The invention has the beneficial effects that: when the calculation result of the exhaustion task appears in the preset cache pool, the calculation result and the corresponding task identification are submitted to the target server, so that the calculation result of the exhaustion task does not need to be submitted when a new exhaustion task is received, more calculation results can be submitted within the timeliness of the exhaustion task, the problem of delay of the submitting time of the calculation result is solved, and the waste of the calculation force of equipment is reduced.
In one embodiment, before the detecting whether the calculation result of the exhaustive task appears in the preset cache pool, the method further includes:
receiving a calculation result of the exhaustive task sent by the calculation unit;
and correspondingly storing the calculation result and the identification of the exhaustion task corresponding to the calculation result in the preset cache pool.
In one embodiment, the method further comprises:
when an exhaustion task issued by the target server is received, judging whether a computing unit in an idle state exists or not;
when the computing unit in the idle state exists, distributing the new exhaustive task to the computing unit in the idle state;
when there is no computing unit in an idle state, the exhaustive task is added to the tail of the exhaustive task queue.
The beneficial effects of this embodiment lie in: when the exhaustion task issued by the target server is received and the computing unit in the idle state does not exist, the exhaustion task is added to the tail end of the exhaustion task queue, so that the caching of the exhaustion task is realized.
In one embodiment, the method further comprises:
when the exhaustion task is completed, deleting the completed exhaustion task and the corresponding calculation result thereof to release a target calculation unit for completing the exhaustion task;
judging whether a new exhaustion task exists in the exhaustion task queue;
and when new exhaustion task exists in the exhaustion task queue, distributing the exhaustion task at the head of the exhaustion task queue to the target computing unit.
The beneficial effects of this embodiment lie in: because the exhaustion task can be cached through the exhaustion task queue, the next exhaustion task can be read from the exhaustion task queue and processed immediately when the calculation unit finishes the exhaustion task, and the waste of the calculation force of the equipment caused by the fact that the calculation unit is in an idle state for a long time is reduced.
In one embodiment, the detecting whether the calculation result of the exhaustive task appears in the preset buffer pool includes:
monitoring whether a calculation result of an exhaustion task appears in the preset cache pool in real time;
or alternatively
And polling whether the calculation result of the exhaustion task appears in the preset cache pool according to the preset frequency.
The beneficial effects of this embodiment lie in: and a plurality of detection modes of calculation results are provided, so that the detection modes are more diversified.
The invention also provides a calculation result submitting device, which comprises:
the detection module is used for detecting whether the calculation result of the exhaustion task appears in a preset cache pool or not, and the preset cache pool is used for storing the calculation result of the exhaustion task;
the acquisition module is used for acquiring the identification of the target exhaustion task corresponding to the calculation result of the exhaustion task when the calculation result of the exhaustion task appears;
and the submitting module is used for submitting the calculation result and the identification of the target exhaustive task to a target server.
In one embodiment, the apparatus further comprises:
the receiving module is used for receiving the calculation result of the exhaustion task sent by the calculation unit before the detection of whether the calculation result of the exhaustion task appears in the preset cache pool;
and the storage module is used for correspondingly storing the calculation result and the identification of the exhaustion task corresponding to the calculation result in the preset cache pool.
In one embodiment, the apparatus further comprises:
the first judging module is used for judging whether a computing unit in an idle state exists or not when an exhaustion task issued by the target server is received;
the first distributing module is used for distributing the new exhaustion task to the computing unit in the idle state when the computing unit in the idle state exists;
and the adding module is used for adding the exhaustion task to the tail of the exhaustion task queue when the computing unit in the idle state does not exist.
In one embodiment, the apparatus further comprises:
the deleting module is used for deleting the completed exhaustive tasks and the corresponding calculation results thereof when the exhaustive tasks are completed so as to release a target calculation unit for completing the exhaustive tasks;
the second judging module is used for judging whether new exhaustion tasks exist in the exhaustion task queue;
and the second distributing module is used for distributing the exhaustion task at the head of the exhaustion task queue to the target computing unit when the exhaustion task queue has new exhaustion tasks.
In one embodiment, the detection module comprises:
the monitoring sub-module is used for monitoring whether the calculation result of the exhaustion task appears in the preset cache pool in real time;
and the polling sub-module is used for polling whether the calculation result of the exhaustion task appears in the preset cache pool according to the preset frequency.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims thereof as well as the appended drawings.
The technical scheme of the invention is further described in detail through the drawings and the embodiments.
Drawings
The accompanying drawings are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate the invention and together with the embodiments of the invention, serve to explain the invention. In the drawings:
FIG. 1 is a flowchart of a method for submitting calculation results according to an embodiment of the invention;
FIG. 2 is a flowchart of a method for submitting calculation results according to an embodiment of the invention;
FIG. 3 is a flowchart of a method for submitting calculation results according to a first embodiment of the present invention;
FIG. 4 is a flowchart of a calculation result submitting method according to a second embodiment of the present invention;
FIG. 5 is a block diagram of a calculation result submitting apparatus according to an embodiment of the present invention;
FIG. 6 is a block diagram of a calculation result submitting apparatus according to an embodiment of the invention.
Detailed Description
The preferred embodiments of the present invention will be described below with reference to the accompanying drawings, it being understood that the preferred embodiments described herein are for illustration and explanation of the present invention only, and are not intended to limit the present invention.
FIG. 1 is a flowchart of a calculation result submitting method, which can be used for a control board, according to an embodiment of the present invention, and as shown in FIG. 1, the method can be implemented as the following steps S101-S103:
in step S101, detecting whether a calculation result of an exhaustion task appears in a preset buffer pool, where the preset buffer pool is used to store the calculation result of the exhaustion task;
in step S102, when a calculation result of an exhaustion task appears, an identification of a target exhaustion task corresponding to the calculation result of the exhaustion task is obtained;
in step S103, the calculation result and the identification of the target exhaustive task are submitted to the target server.
The exhaustion computing process is that when the computing software receives the exhaustion task issued by the server, the exhaustion task is sent to the control board, the control board sends the exhaustion task to the computing unit, the computing unit performs computing verification on massive exhaustion results in the exhaustion task, so that correct computing results are obtained, and after the computing unit obtains the correct computing results, the computing results of the exhaustion task are sent to the cache pool for storing the computing results of the exhaustion task.
In the prior art, when the next exhaustion task is received, the control panel is triggered to read the calculation result corresponding to the current exhaustion task stored in the cache pool, however, if the time interval between the two times of issuing of the exhaustion task is longer, the interval between the time of reading the calculation result corresponding to the current exhaustion task and the time of issuing of the current exhaustion task will be longer, so that when the calculation result is submitted, the current exhaustion task is likely to be aged, the calculation result corresponding to the current exhaustion task calculated before is invalid, and in this way, the calculation force of the equipment is simply wasted.
In order to solve the above technical problems, in this embodiment, the control board detects whether a calculation result of an exhaustion task appears in a preset buffer pool; when the calculation result of the exhaustion task appears, the identification of the target exhaustion task corresponding to the calculation result of the exhaustion task is obtained; and submitting the calculation result and the corresponding identification of the target exhaustion task to the target server.
The invention has the beneficial effects that: when the calculation result of the exhaustion task appears in the preset cache pool, the calculation result and the corresponding task identification are submitted to the target server, so that the calculation result of the exhaustion task does not need to be submitted when a new exhaustion task is received, more calculation results can be submitted within the timeliness of the exhaustion task, the problem of delay of the submitting time of the calculation result is solved, and the waste of the calculation force of equipment is reduced.
In one embodiment, prior to step S101 described above, the method may also be implemented as steps A1-A2 as follows:
in step A1, receiving a calculation result of an exhaustion task sent by a calculation unit;
in step A2, the calculation result and the identification of the exhaustion task corresponding to the calculation result are stored in a preset cache pool correspondingly.
For example, after the computing unit obtains the correct computing result, the computing result of the exhaustive task and the identifier of the exhaustive task corresponding to the computing result are correspondingly stored in a preset cache pool for the control board to read.
In one embodiment, as shown in FIG. 2, the method may also be implemented as the following steps S201-S203:
in step S201, when an exhaustion task issued by the target server is received, whether there is a computing unit in an idle state is determined;
in step S202, when there is a computing unit in an idle state, a new exhaustive task is distributed to the computing unit in the idle state;
in step S203, when there is no computing unit in the idle state, an exhaustive task is added to the end of the queue of the exhaustive task.
In this embodiment, when an exhaustion task issued by a target server is received, whether a computing unit in an idle state exists is determined; when the computing unit in the idle state exists, distributing a new exhaustion task to the computing unit in the idle state; when there is no computing unit in an idle state, the exhaustive task is added to the tail of the exhaustive task queue.
For example, there are two computing units a and B in the control board, when a first exhaustive task is received, the task is distributed to either computing unit a or B, when a second exhaustive task is received, the task is distributed to the remaining computing units in idle state, and when a third task is received, if computing units a and B have not processed the previous two, then there is no idle computing unit.
In the prior art, the above situation is encountered, and it is common practice to reject the third exhaustive task, which not only results in omission of the task, but also if after rejecting the third exhaustive task, there is a computing unit completing the previous exhaustive task, or the exhaustive task processed by the computing unit has failed, but the fourth exhaustive task newly issued has not yet been received, it is necessary to wait for the server to issue the exhaustive task, and in the process of waiting for the server to issue the exhaustive task, the computing unit completing the last exhaustive task is always in an idle state, which results in that the computing power of the device cannot be fully utilized.
Aiming at the problems in the prior art, in the application, a buffer queue for buffering the exhaustion task is pre-established, and when a third exhaustion task is received, the third exhaustion task is not refused, but task data corresponding to the third exhaustion task is added to the tail end of the exhaustion task queue, so that the buffering of the exhaustion task is realized.
It should be noted that, when there is no computing unit in an idle state, the timeliness of the exhaustion task currently being processed by the computing unit may be obtained, the exhaustion task with the earliest failure time in the exhaustion tasks currently being processed by the computing unit may be determined, and the task data of the exhaustion task with the earliest timeliness may be deleted, so that the computing unit processing the exhaustion task with the earliest timeliness may be in the idle state. The exhaustive tasks issued by the target server are then distributed to the computing units in an idle state.
For example, if the exhaustion task being processed by the computing unit a is disabled after another 10 seconds, and the exhaustion task being processed by the computing unit B is disabled after another 30 seconds, the task data of the exhaustion task being processed by the computing unit a is deleted, so that the computing unit a is in an idle state, and then the exhaustion task issued by the target server is distributed to the computing unit a that is already in the idle state.
Or when the computing unit in the idle state does not exist, acquiring the exhaustion task with the most elapsed time in the exhaustion task currently being processed, deleting the task data of the exhaustion task with the most elapsed time, so that the computing unit which is processing the exhaustion task with the most elapsed time is in the idle state, and transmitting the exhaustion task issued by the target server to the computing unit which is in the idle state.
For example, the exhaustion task being processed by the computing unit a takes 3 minutes, and the exhaustion task being processed by the computing unit B takes 1 minute, so that the exhaustion task being processed by the computing unit a takes the most time, the exhaustion task being processed by the computing unit a is deleted, so that the computing unit a is in an idle state, and then the exhaustion task issued by the target server is sent to the computing unit a in the idle state.
It will be appreciated that in the above example, the number of computing units in the control board is 2, and for simplicity and brevity of description of the present invention, the number of computing units in the control board may not be limited by the above example, and the number of computing units may be increased or decreased according to specific needs.
The beneficial effects of this embodiment lie in: when the exhaustion task issued by the target server is received and the computing unit in the idle state does not exist, the exhaustion task is added to the tail of the exhaustion task queue, so that the caching of the exhaustion task is realized.
In one embodiment, the method may also be implemented as steps B1-B3 as follows:
in step B1, when the exhaustion task is completed, deleting the completed exhaustion task and the corresponding calculation result thereof to release the target calculation unit for completing the exhaustion task;
in step B2, judging whether a new exhaustion task exists in the exhaustion task queue;
in step B3, when a new task exhaustion exists in the task exhaustion queue, distributing the task exhaustion at the head of the task exhaustion queue to the target computing unit.
In this embodiment, when an exhaustion task is completed, deleting the completed exhaustion task and its corresponding calculation result to release a target calculation unit for completing the exhaustion task; judging whether new exhaustion tasks exist in the exhaustion task queue; and when new exhaustion tasks exist in the exhaustion task queue, distributing the exhaustion tasks at the head of the exhaustion task queue to the target computing unit.
Still taking two computing units a and B in the control board as an example: when a first exhaustion task is received, the exhaustion task is distributed to any one of the computing units A and B, when a second exhaustion task is received, the exhaustion task is distributed to the rest computing units in an idle state, when a third exhaustion task is received, if the computing units A and B do not process the previous two exhaustion tasks yet, the idle computing units do not exist at the moment, task data corresponding to the third exhaustion task are added to the tail of an exhaustion task queue so as to realize caching of the exhaustion task, when the computing unit completes the previous exhaustion task or the exhaustion task processed by the computing unit is invalid, task data of the exhaustion task corresponding to the computing unit is deleted, and then the third exhaustion task is distributed to the computing unit. Thus, the utilization rate of the calculation force of the equipment can be improved.
The beneficial effects of this embodiment lie in: because the exhaustion task can be cached through the exhaustion task queue, the next exhaustion task can be read from the exhaustion task queue and processed immediately when the calculation unit finishes the exhaustion task, and the waste of the calculation force of the equipment caused by the fact that the calculation unit is in an idle state for a long time is reduced.
In one embodiment, the step S101 may be implemented as the following steps C1 or C2:
in the step C1, monitoring whether a calculation result of an exhaustion task appears in a preset cache pool in real time;
in step C2, the calculation result of whether the exhaustion task appears in the preset buffer pool is polled according to the preset frequency.
In this embodiment, whether the calculation result of the exhaustion task appears in the preset buffer pool can be monitored in real time, and the calculation result can be submitted to the target server at the first time when the calculation result of the exhaustion task appears in the buffer pool.
In addition, the calculation result of whether the exhaustion task appears in the preset cache pool can be polled according to the preset frequency, for example, the cache pool is polled every two seconds, so that the cache pool is not required to be monitored in real time, and the energy consumption of equipment is reduced.
The beneficial effects of this embodiment lie in: and a plurality of detection modes of calculation results are provided, so that the detection modes are more diversified.
Example 1
Fig. 3 is a flowchart of a calculation result submitting method according to a first embodiment of the present invention. As shown in fig. 3, the following steps S301 to S307 are included:
in step S301, a calculation result of the exhaustive task sent by the calculation unit is received;
in step S302, the calculation result and the identification of the exhaustion task corresponding to the calculation result are stored in a preset cache pool correspondingly;
in step S303, polling the calculation result of whether the exhaustion task appears in the preset buffer pool according to the preset frequency;
in step S304, when the calculation result of the exhaustion task appears, the identification of the target exhaustion task corresponding to the calculation result of the exhaustion task is obtained;
in step S305, submitting the calculation result and the identification of the target exhaustion task to the target server;
in step S306, when an exhaustion task issued by the target server is received, whether a computing unit in an idle state exists is determined;
in step S307, when there is a computing unit in an idle state, a new exhaustive task is distributed to the computing unit in an idle state.
Example two
Fig. 4 is a flowchart of a calculation result submitting method in the second embodiment of the present invention. As shown in fig. 4, the steps S401 to S410 are included as follows:
in step S401, a calculation result of the exhaustive task sent by the calculation unit is received;
in step S402, the calculation result and the identification of the exhaustion task corresponding to the calculation result are stored in a preset cache pool correspondingly;
in step S403, polling whether a calculation result of an exhaustion task appears in a preset buffer pool according to a preset frequency;
in step S404, when the calculation result of the exhaustion task appears, the identification of the target exhaustion task corresponding to the calculation result of the exhaustion task is obtained;
in step S405, submitting the calculation result and the identification of the target exhaustion task to the target server;
in step S406, when an exhaustion task issued by the target server is received, it is determined whether there is a computing unit in an idle state;
in step S407, when there is no computing unit in an idle state, adding an exhaustive task to the tail of the exhaustive task queue;
in step S408, when the exhaustion task is completed, deleting the completed exhaustion task and the corresponding calculation result thereof to release the target calculation unit for completing the exhaustion task;
in step S409, it is determined whether a new exhaustive task exists in the exhaustive task queue;
in step S410, when there is a new exhaustion task in the exhaustion task queue, the exhaustion task at the head of the queue in the exhaustion task queue is distributed to the target computing unit.
FIG. 5 is a block diagram of a calculation result submitting apparatus according to an embodiment of the present invention, as shown in FIG. 5, the apparatus includes the following modules:
the detection module 51 is configured to detect whether a calculation result of an exhaustion task appears in a preset buffer pool, where the preset buffer pool is used to store the calculation result of the exhaustion task;
the obtaining module 52 is configured to obtain, when a calculation result of an exhaustion task appears, an identifier of a target exhaustion task corresponding to the calculation result of the exhaustion task;
and the submitting module 53 is used for submitting the calculation result and the identification of the target exhaustion task to the target server.
In one embodiment, as shown in fig. 6, the apparatus further comprises:
the receiving module 61 is configured to receive the calculation result of the exhaustion task sent by the calculating unit before detecting whether the calculation result of the exhaustion task appears in the preset buffer pool;
and the storage module 62 is configured to store the calculation result and the identifier of the exhaustion task corresponding to the calculation result in a preset cache pool.
In one embodiment, the apparatus further comprises:
the first judging module is used for judging whether a computing unit in an idle state exists or not when an exhaustion task issued by the target server is received;
the first distributing module is used for distributing new exhaustive tasks to the computing units in the idle state when the computing units in the idle state exist;
and the adding module is used for adding the exhaustion task to the tail of the exhaustion task queue when the computing unit in the idle state does not exist.
In one embodiment, the apparatus further comprises:
the deleting module is used for deleting the completed exhaustion task and the corresponding calculation result thereof to release a target calculation unit for completing the exhaustion task when the exhaustion task is completed;
the second judging module is used for judging whether new exhaustion tasks exist in the exhaustion task queue;
and the second distributing module is used for distributing the exhaustion task at the head of the exhaustion task queue to the target computing unit when a new exhaustion task exists in the exhaustion task queue.
In one embodiment, a detection module includes:
the monitoring submodule is used for monitoring whether the calculation result of the exhaustion task appears in the preset cache pool in real time;
and the polling sub-module is used for polling whether the calculation result of the exhaustion task appears in the preset cache pool according to the preset frequency.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, magnetic disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present invention without departing from the spirit or scope of the invention. Thus, it is intended that the present invention also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (10)

1. A calculation result submitting method, characterized by comprising:
detecting whether a calculation result of an exhaustion task appears in a preset cache pool or not, wherein the preset cache pool is used for storing the calculation result of the exhaustion task;
when the calculation result of the exhaustion task appears, the identification of the target exhaustion task corresponding to the calculation result of the exhaustion task is obtained;
submitting the calculation result and the identification of the target exhaustion task to a target server;
wherein the submission of the calculation result is independent of the issuing of a new exhaustive task.
2. The method of claim 1, wherein prior to said detecting whether the result of the calculation of the exhaustive task occurs in the preset cache pool, the method further comprises:
receiving a calculation result of the exhaustive task sent by the calculation unit;
and correspondingly storing the calculation result and the identification of the exhaustion task corresponding to the calculation result in the preset cache pool.
3. The method of claim 1, wherein the method further comprises:
when an exhaustion task issued by the target server is received, judging whether a computing unit in an idle state exists or not;
when the computing unit in the idle state exists, distributing the new exhaustive task to the computing unit in the idle state;
when there is no computing unit in an idle state, the exhaustive task is added to the tail of the exhaustive task queue.
4. A method as claimed in claim 3, wherein the method further comprises:
when the exhaustion task is completed, deleting the completed exhaustion task and the corresponding calculation result thereof to release a target calculation unit for completing the exhaustion task;
judging whether a new exhaustion task exists in the exhaustion task queue;
and when new exhaustion task exists in the exhaustion task queue, distributing the exhaustion task at the head of the exhaustion task queue to the target computing unit.
5. The method of claim 1, wherein the detecting whether the calculation result of the exhaustive task appears in the preset buffer pool comprises:
monitoring whether a calculation result of an exhaustion task appears in the preset cache pool in real time;
or alternatively
And polling whether the calculation result of the exhaustion task appears in the preset cache pool according to the preset frequency.
6. A calculation result submitting device, characterized by comprising:
the detection module is used for detecting whether the calculation result of the exhaustion task appears in a preset cache pool or not, and the preset cache pool is used for storing the calculation result of the exhaustion task;
the acquisition module is used for acquiring the identification of the target exhaustion task corresponding to the calculation result of the exhaustion task when the calculation result of the exhaustion task appears;
the submitting module is used for submitting the calculation result and the identification of the target exhaustive task to a target server;
wherein the submission of the calculation result is independent of the issuing of a new exhaustive task.
7. The apparatus of claim 6, wherein the apparatus further comprises:
the receiving module is used for receiving the calculation result of the exhaustion task sent by the calculation unit before the detection of whether the calculation result of the exhaustion task appears in the preset cache pool;
and the storage module is used for correspondingly storing the calculation result and the identification of the exhaustion task corresponding to the calculation result in the preset cache pool.
8. The apparatus of claim 6, wherein the apparatus further comprises:
the first judging module is used for judging whether a computing unit in an idle state exists or not when an exhaustion task issued by the target server is received;
the first distributing module is used for distributing the new exhaustion task to the computing unit in the idle state when the computing unit in the idle state exists;
and the adding module is used for adding the exhaustion task to the tail of the exhaustion task queue when the computing unit in the idle state does not exist.
9. The apparatus of claim 8, wherein the apparatus further comprises:
the deleting module is used for deleting the completed exhaustive tasks and the corresponding calculation results thereof when the exhaustive tasks are completed so as to release a target calculation unit for completing the exhaustive tasks;
the second judging module is used for judging whether new exhaustion tasks exist in the exhaustion task queue;
and the second distributing module is used for distributing the exhaustion task at the head of the exhaustion task queue to the target computing unit when the exhaustion task queue has new exhaustion tasks.
10. The apparatus of claim 6, wherein the detection module comprises:
the monitoring sub-module is used for monitoring whether the calculation result of the exhaustion task appears in the preset cache pool in real time;
and the polling sub-module is used for polling whether the calculation result of the exhaustion task appears in the preset cache pool according to the preset frequency.
CN201811251602.9A 2018-10-25 2018-10-25 Calculation result submitting method and device Active CN111104168B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811251602.9A CN111104168B (en) 2018-10-25 2018-10-25 Calculation result submitting method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811251602.9A CN111104168B (en) 2018-10-25 2018-10-25 Calculation result submitting method and device

Publications (2)

Publication Number Publication Date
CN111104168A CN111104168A (en) 2020-05-05
CN111104168B true CN111104168B (en) 2023-05-12

Family

ID=70418253

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811251602.9A Active CN111104168B (en) 2018-10-25 2018-10-25 Calculation result submitting method and device

Country Status (1)

Country Link
CN (1) CN111104168B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017070900A1 (en) * 2015-10-29 2017-05-04 华为技术有限公司 Method and apparatus for processing task in a multi-core digital signal processing system

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7467387B2 (en) * 2002-05-31 2008-12-16 International Business Machines Corporation Method for off-loading user queries to a task manager
US8244943B2 (en) * 2009-09-30 2012-08-14 International Business Machines Corporation Administering the polling of a number of devices for device status
CN104915253B (en) * 2014-03-12 2019-05-10 中国移动通信集团河北有限公司 A kind of method and job processor of job scheduling
CN105630583A (en) * 2014-11-26 2016-06-01 阿里巴巴集团控股有限公司 Data processing method and device
US10452450B2 (en) * 2015-03-20 2019-10-22 International Business Machines Corporation Optimizing allocation of multi-tasking servers
US20160283285A1 (en) * 2015-03-23 2016-09-29 International Business Machines Corporation Synchronizing control and output of computing tasks
CN104793996A (en) * 2015-04-29 2015-07-22 中芯睿智(北京)微电子科技有限公司 Task scheduling method and device of parallel computing equipment
CN105447092A (en) * 2015-11-09 2016-03-30 联动优势科技有限公司 Caching method and apparatus
CN105912399B (en) * 2016-04-05 2020-02-07 杭州嘉楠耘智信息科技有限公司 Task processing method, device and system
CN105871857B (en) * 2016-04-13 2019-09-27 北京怡和嘉业医疗科技股份有限公司 Authentication method, device, system and therapeutic equipment
CN106375382B (en) * 2016-08-26 2019-09-17 苏州蓝海彤翔系统科技有限公司 Method, system, control server and the node client of data distribution
CN106407008B (en) * 2016-08-31 2019-12-03 北京比特大陆科技有限公司 Dig mine method for processing business, device and system
CN108228327B (en) * 2017-12-29 2021-01-15 北京奇虎科技有限公司 Task processing method and device
CN108322304B (en) * 2018-02-28 2021-12-07 海峡小鹿有限公司 Calculation method and apparatus for workload certification, electronic device, program, and medium
CN108459929A (en) * 2018-03-28 2018-08-28 成都汇智远景科技有限公司 A kind of data back up method based on cloud computing

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017070900A1 (en) * 2015-10-29 2017-05-04 华为技术有限公司 Method and apparatus for processing task in a multi-core digital signal processing system

Also Published As

Publication number Publication date
CN111104168A (en) 2020-05-05

Similar Documents

Publication Publication Date Title
US10042640B2 (en) Processing queue management
CN109033814B (en) Intelligent contract triggering method, device, equipment and storage medium
US20190050295A1 (en) Managing function level reset in an io virtualization-enabled storage device
WO2018120705A1 (en) Data processing method, apparatus and system
CN108958975B (en) Method, device and equipment for controlling data recovery speed
US10073629B2 (en) Memory transaction prioritization
US11803490B2 (en) Apparatus and method for data transmission and readable storage medium
US20150234759A1 (en) Method and apparatus using high-efficiency atomic operations
US20130117755A1 (en) Apparatuses, systems, and methods for distributed workload serialization
CN110955390B (en) Data processing method, device, electronic equipment and storage medium
CN105373563B (en) Database switching method and device
CN111831408A (en) Asynchronous task processing method and device, electronic equipment and medium
CN103475520B (en) Service processing control method and device in distribution network
CN111104168B (en) Calculation result submitting method and device
EP2801913A1 (en) Memory control apparatus and method
CN108241616B (en) Message pushing method and device
CN107102966B (en) Multi-core processor chip, interrupt control method and controller
WO2022237582A1 (en) Abort handling by host controller for storage device
CN105549911B (en) The data transmission method and device of NVRAM
EP1761856A1 (en) Computer system and method for queuing interrupt messages in a device coupled to a parallel communications bus
US12086463B2 (en) Abort handling by host controller for storage device
CN106557356B (en) Task processing method and device
CN104407960A (en) Method and device for monitoring data
CN111104167B (en) Calculation result submitting method and device
US20120047285A1 (en) Interrupt-based command processing

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20211015

Address after: 200436 room 138, No. 5 and 6, Lane 1188, Wanrong Road, Jing'an District, Shanghai

Applicant after: Shanghai Canaan Jiesi Information Technology Co.,Ltd.

Address before: Room 1203, 12 / F, building 4, No. 9, Jiuhuan Road, Jianggan District, Hangzhou City, Zhejiang Province, 310019

Applicant before: Hangzhou Canaan Creative Information Technology Ltd.

GR01 Patent grant
GR01 Patent grant