CN111104167A - Calculation result submitting method and device - Google Patents

Calculation result submitting method and device Download PDF

Info

Publication number
CN111104167A
CN111104167A CN201811251597.1A CN201811251597A CN111104167A CN 111104167 A CN111104167 A CN 111104167A CN 201811251597 A CN201811251597 A CN 201811251597A CN 111104167 A CN111104167 A CN 111104167A
Authority
CN
China
Prior art keywords
target
cache pool
task
exhaustive
exhaustive task
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.)
Granted
Application number
CN201811251597.1A
Other languages
Chinese (zh)
Other versions
CN111104167B (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
Hangzhou Canaan Creative Information Technology 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 Hangzhou Canaan Creative Information Technology Ltd filed Critical Hangzhou Canaan Creative Information Technology Ltd
Priority to CN201811251597.1A priority Critical patent/CN111104167B/en
Publication of CN111104167A publication Critical patent/CN111104167A/en
Application granted granted Critical
Publication of CN111104167B publication Critical patent/CN111104167B/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)
  • Memory System Of A Hierarchy Structure (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses a method and a device for submitting a calculation result, which are used for avoiding the loss of the calculation result caused by the scheme and reducing the waste of the calculation power of equipment. The method comprises the following steps: when a first target exhaustive task is received, judging whether a second target exhaustive task which is being processed exists locally; when a second target exhaustion task exists, establishing a corresponding relation between the first target exhaustion task and the first cache pool in the idle state, so that the first target exhaustion task is stored in the first cache pool in the idle state when a calculation result is generated; when the time interval between the current time and the latest polling operation reaches a preset time interval, polling calculation results in a first cache pool and a second cache pool for storing a second target exhaustion task; and submitting all the calculation results in the first cache pool and the second cache pool to a target server. By adopting the scheme provided by the invention, the loss of the calculation result can be avoided, and the waste of the calculation power of the 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 ore excavation is a process that the ore excavation software sends the exhaustive task data sent by the server to the ore machine control panel for calculation, and then submits a correct calculation result to the server through the ore excavation software so as to obtain a corresponding reward.
In an existing calculation result submitting scheme, when an ore machine control board receives an exhaustive task, the ore machine control board allocates the exhaustive task to an idle calculation unit for processing, then detects whether a calculation result of the exhaustive task appears in a cache pool used for storing the calculation unit, and if the calculation result appears, submits the calculation result to a server. For whether the calculation result of the exhaustive task appears in the cache pool, the conventional detection mode is to poll whether the calculation result appears in the cache pool storing the calculation result of the exhaustive task according to a fixed period, and if the calculation result appears, the calculation result is submitted to the server. When the ore machine control board receives a new exhaustive task issued by the server, task data of the old exhaustive task being processed can be deleted, the calculation result of the old exhaustive task stored in the cache pool is emptied, and then the calculation result of the new exhaustive task is cached through the cache pool.
However, such a processing method has the following problems:
the detection of the calculation result is realized by polling the cache pool at a fixed period, for example, the fixed period is set to 20 seconds, the cache pool is polled every 20 seconds, when a new exhaustion task is received, if the time interval between the current time and the last time for polling the cache pool is 15 seconds, within the 15 seconds, one or more calculation results of the old exhaustion task may be stored in the cache pool, and the calculation results of the old exhaustion task generated within the 15 seconds are emptied when the cache pool is emptied, so that the calculation results of the old exhaustion task generated within the 15 seconds are all lost, which results in the waste of the calculation power of the device.
Therefore, it is an urgent technical problem to provide a method for submitting a calculation result to avoid the loss of the calculation result caused by the above scheme and reduce the waste of the calculation power of the device.
Disclosure of Invention
The invention provides a method and a device for submitting a calculation result, which are used for avoiding the loss of the calculation result and reducing the waste of the calculation power of equipment.
The invention provides a calculation result submitting method, which comprises the following steps:
when a first target exhaustive task is received, judging whether a second target exhaustive task which is being processed exists locally;
when a second target exhaustion task exists, establishing a corresponding relation between the first target exhaustion task and a first cache pool in an idle state, so that the first target exhaustion task is stored in the first cache pool in the idle state when generating a calculation result;
when the time interval between the current time and the latest polling operation reaches a preset time interval, polling the calculation results in the first cache pool and a second cache pool used for storing the second target exhaustive task;
and submitting all the calculation results in the first cache pool and the second cache pool to a target server.
The invention has the beneficial effects that: setting two cache pools, so that when a first target exhaustion task is received, a calculation result generated by the first target exhaustion task can be stored in the first cache pool in an idle state without clearing a second cache pool storing a calculation result of a second target exhaustion task, and when the time interval between the current time and the latest polling operation reaches a preset time interval, polling the calculation results in the first cache pool and the second cache pool for storing the second target exhaustion task; and then all the calculation results in the first cache pool and the second cache pool are submitted to the target server together, so that the calculation results generated in the second cache pool are prevented from being lost, and the waste of the calculation power of the equipment is reduced.
In one embodiment, establishing a correspondence between the first target exhaustive task and the first cache pool in an idle state includes:
acquiring state identifiers of the first cache pool and the second cache pool;
and after determining that the first cache pool is in an idle state according to the state identifier, establishing a corresponding relation between the first target exhaustive task and the first cache pool.
The beneficial effect of this embodiment lies in: the method and the device can determine which cache pool is in the idle state according to the state identifiers of the first cache pool and the second cache pool without traversing the cache pools, and the determination process for determining the cache pools in the idle state is simplified.
In an embodiment, the establishing a correspondence between the first target exhaustive task and the first cache pool includes:
distributing the first target exhaustive task to a first target computing unit which is in an idle state at present;
and establishing communication connection between the first target computing unit and the first cache pool.
In one embodiment, after submitting all the computation results in the first cache pool and the second cache pool to a target server, the method further comprises:
stopping processing the second target exhaustive task;
clearing the task data corresponding to the second target exhaustive task and the calculation result in the second cache pool;
and deleting the task data corresponding to the second target exhaustive task.
The beneficial effect of this embodiment lies in: and emptying the task data corresponding to the second target exhaustive task and the calculation results in the second cache pool after submitting all the calculation results in the first cache pool and the second cache pool to the target server, thereby avoiding the loss of the calculation results generated in the second cache pool and reducing the waste of the calculation power of equipment.
In one embodiment, after deleting the task data corresponding to the second target exhaustive task, the method further includes:
cutting off the communication connection between the second cache pool and the currently connected second target computing unit;
and modifying the state identifiers of the second cache pool and the second target computing unit into identifiers representing idle states.
The beneficial effect of this embodiment lies in: after task data corresponding to a second target exhaustive task is deleted and communication connection between the second cache pool and a second target computing unit which is connected currently is cut off, state identification of the second cache pool and the second target computing unit is modified into identification representing an idle state, so that the cache pool in the idle state is determined according to the state identification, and the determination process of the cache pool in the idle state is simplified.
The invention also provides a device for submitting the calculation result, which comprises:
the judging module is used for judging whether a second target exhaustive task which is being processed exists locally or not when the first target exhaustive task is received;
the establishing module is used for establishing a corresponding relation between the first target exhaustive task and a first cache pool in an idle state when a second target exhaustive task exists, so that the first target exhaustive task is stored in the first cache pool in the idle state when a calculation result is generated;
the polling module is used for polling the calculation results in the first cache pool and the second cache pool for storing the second target exhaustive task when the time interval between the current time and the latest polling operation reaches a preset time interval;
and the submitting module is used for submitting all the calculation results in the first cache pool and the second cache pool to a target server.
In one embodiment, the establishing module includes:
the obtaining submodule is used for obtaining the state identifiers of the first cache pool and the second cache pool;
and the establishing submodule is used for establishing the corresponding relation between the first target exhaustive task and the first cache pool after the first cache pool is determined to be in an idle state according to the state identification.
In one embodiment, the establishing submodule includes:
distributing the first target exhaustive task to a first target computing unit which is in an idle state at present;
and establishing communication connection between the first target computing unit and the first cache pool.
In one embodiment, the apparatus further comprises:
a stopping module, configured to stop processing the second target exhaustive task after all computation results in the first cache pool and the second cache pool are submitted to a target server;
an emptying module, configured to empty task data corresponding to the second target exhaustive task and a calculation result in the second cache pool;
and the deleting module is used for deleting the task data corresponding to the second target exhaustive task.
In one embodiment, the apparatus further comprises:
the cutting-off module is used for cutting off the communication connection between the second cache pool and the second target computing unit which is connected currently after the task data corresponding to the second target exhaustive task is deleted;
and the modification module is used for modifying the state identifiers of the second cache pool and the second target computing unit into identifiers representing idle states.
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 hereof as well as the appended drawings.
The technical solution of the present invention is further described in detail by the accompanying drawings and embodiments.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the principles of the invention and not to limit the invention. In the drawings:
FIG. 1 is a flow chart of a method for submitting computation results according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method for submitting computation results according to an embodiment of the present invention;
FIG. 3 is a flowchart of a calculation result submission method according to an embodiment of the present invention;
FIG. 4 is a flowchart of a calculation result submission method according to a second embodiment of the present invention;
FIG. 5 is a block diagram of a device for submitting calculation results according to an embodiment of the present invention;
FIG. 6 is a block diagram of a device for submitting computation results according to an embodiment of the present invention.
Detailed Description
The preferred embodiments of the present invention will be described in conjunction with the accompanying drawings, and it will be understood that they are described herein for the purpose of illustration and explanation and not limitation.
Fig. 1 is a flowchart of a calculation result submitting method according to an embodiment of the present invention, as shown in fig. 1, the method can be implemented as the following steps S101-S104:
in step S101, when a first target exhaustive task is received, determining whether a second target exhaustive task currently being processed exists locally;
in step S102, when a second target exhaustive task exists, establishing a corresponding relationship between the first target exhaustive task and the first cache pool in the idle state, so that the first target exhaustive task is stored in the first cache pool in the idle state when generating a calculation result;
in step S103, when the time interval between the current time and the latest polling operation reaches a preset time interval, polling the calculation results in the first cache pool and the second cache pool for storing the second target exhaustive task;
in step S104, all the calculation results in the first cache pool and the second cache pool are submitted to the target server.
In the prior art, only one cache pool for storing the calculation result of the exhaustive task is provided, in the reading scheme of the calculation result, the calculation result corresponding to the currently processed old exhaustive task generated in the cache pool is polled locally based on a fixed period, and when a new exhaustive task issued by a server is received, the cache pool is emptied. Because the time for issuing the new exhaustive task is usually between two polling periods, when the new exhaustive task is issued, some calculation results corresponding to the old exhaustive task are likely to be emptied before being submitted to the server in the cache pool.
In order to solve the above problem, in this embodiment, two cache pools are provided, and when a first target exhaustive task is received, it is determined whether a second target exhaustive task that is being processed exists locally; when a second target exhaustion task exists, establishing a corresponding relation between the first target exhaustion task and the first cache pool in the idle state, so that the first target exhaustion task is stored in the first cache pool in the idle state when a calculation result is generated; when the time interval between the current time and the latest polling operation reaches a preset time interval, polling calculation results in a first cache pool and a second cache pool for storing a second target exhaustion task; and submitting all the calculation results in the first cache pool and the second cache pool to a target server.
It should be noted that, when there is no second target exhaustive task being processed, it is stated that when the first target exhaustive task is locally received, both the two cache pools are in an idle state, and at this time, the first target exhaustive task may establish a corresponding relationship with any one of the two cache pools.
In addition, it is to be appreciated that in the above example, the first target exhaustive task and the second target exhaustive task are used to identify the exhaustive task currently received and the exhaustive task being processed, and that over time the first target exhaustive task may be converted to the second target exhaustive task. For example, when the current time is the first time, the first target exhaustive task is an exhaustive task received at the first time, and the second target exhaustive task is an exhaustive task being processed at the first time. And when the current time reaches a second time, the second target exhaustive task which is being processed at the first time is deleted locally, the first target exhaustive task received at the first time becomes the second target exhaustive task which is being processed at the second time, and the exhaustive task received at the second time becomes a new first target exhaustive task.
For example, two cache pools, namely a first cache pool and a second cache pool, are locally provided, and when a first target exhaustion task is received, a second target exhaustion task received before is locally processed, and a calculation result generated by the second target exhaustion task is stored in the second cache pool, that is, the second cache pool is currently in a working state, and the first cache pool is in an idle state. Due to the fact that the idle first cache pool exists, the result of the first target exhaustive task is placed in the first cache pool, and the second cache pool does not need to be emptied, so that the calculation result corresponding to the second target exhaustive task received before is reserved. Specifically, a corresponding relationship is established between the received first target exhaustive task and the first cache pool in the idle state, that is, when a calculation result corresponding to the first target exhaustive task is generated, the calculation result corresponding to the first target exhaustive task is stored in the first cache pool. At the moment, polling the calculation results of the two cache pools according to a preset period, and submitting the calculation result of the first cache pool and the result of the second cache pool to the target server when polling to the first cache pool and the second cache pool generates the calculation results; and when the first cache pool does not generate the calculation result and the second cache pool generates the calculation result, only sending the calculation result generated in the second cache pool to the target server. When the task is submitted, the calculation result of the second target exhaustive task can be submitted to the target server, so that the calculation result generated in the second cache pool is prevented from being lost. When the calculation results of the two exhaustive tasks are submitted, the identifications of the exhaustive tasks corresponding to the calculation results can be submitted to the target server together for distinguishing.
The scheme solves the problem that the detection scheme for polling the calculation result according to the preset period is easy to cause the loss of the calculation result.
The invention has the beneficial effects that: setting two cache pools, so that when a first target exhaustion task is received, a calculation result generated by the first target exhaustion task can be stored in the first cache pool in an idle state without clearing a second cache pool storing a calculation result of a second target exhaustion task, and when the time interval between the current time and the latest polling operation reaches a preset time interval, polling the calculation results in the first cache pool and the second cache pool for storing the second target exhaustion task; and then all the calculation results generated in the first cache pool and the second cache pool are submitted to the target server together, so that the calculation results generated in the second cache pool are prevented from being lost, and the waste of the calculation power of the equipment is reduced.
In one embodiment, the above step S102 can be implemented as the following steps A1-A2:
in step a1, state identifiers of a first cache pool and a second cache pool are obtained;
in step a2, after determining that the first cache pool is in an idle state according to the state identifier, establishing a corresponding relationship between the first target exhaustive task and the first cache pool.
When the cache pool does not store the calculation result and is not connected to any calculation unit, the state identifier of the cache pool is set as an identifier representing an idle state, and thus, in this embodiment, the first cache pool in the idle state may be determined based on the state identifier of the cache pool, and the corresponding relationship between the first target exhaustive task and the first cache pool is established.
The beneficial effect of this embodiment lies in: the method and the device can determine which cache pool is in the idle state according to the state identifiers of the first cache pool and the second cache pool without traversing the cache pools, and the determination process for determining the cache pools in the idle state is simplified.
In one embodiment, the above step A2 may be implemented as the following steps B1-B2:
in step B1, distributing the first target exhaustive task to a first target computing unit currently in an idle state;
in step B2, a communication connection is established between the first target computing unit and the first cache pool.
In the embodiment, a first target exhaustive task is distributed to a first target computing unit which is in an idle state at present; and establishing communication connection between the first target computing unit and the first cache pool. Therefore, when the first calculation unit calculates the calculation result of the first target exhaustive task, the calculation result of the first target exhaustive task can be sent to the first cache pool to be stored.
In one embodiment, as shown in fig. 2, after the above step S104, the method may further be implemented as the following steps S201 to S203:
in step S201, the processing of the second target exhaustive task is stopped;
in step S202, task data corresponding to the second target exhaustive task and a calculation result in the second cache pool are cleared;
in step S203, the task data corresponding to the second target exhaustive task is deleted.
In this embodiment, after submitting the calculation result in the first cache pool and the calculation result in the second cache pool for storing the second target exhaustive task to the target server, stopping processing the second target exhaustive task; task data corresponding to the second target exhaustive task and a calculation result in the second cache pool are emptied; and deleting the task data corresponding to the second target exhaustive task. Therefore, all data related to the second target exhaustive task are removed, and waste of storage resources is reduced. And the data related to the second target exhaustive task is cleared after the calculation result in the second cache pool is submitted to the target server, so that the calculation result generated in the second cache pool is prevented from being lost, and the waste of the calculation power of the equipment is reduced.
The beneficial effect of this embodiment lies in: and emptying the task data corresponding to the second target exhaustive task and the calculation result in the second cache pool after submitting the calculation result in the first cache pool and the calculation result in the second cache pool for storing the second target exhaustive task to the target server, so that the loss of the calculation result generated in the second cache pool is avoided, and the waste of the calculation power of equipment is reduced.
In one embodiment, after the above step S203, the method may further be implemented as the following steps C1-C2:
in step C1, the communication connection between the second cache pool and the currently connected second target computing unit is cut off;
in step C2, the status identifications of the second cache pool and the second target computing unit are modified to identifications characterizing an idle status.
In this embodiment, after the task data corresponding to the second target exhaustive task is deleted, the communication connection between the second cache pool and the currently connected second target computing unit is cut off, and then the status identifier of the second cache pool and the second target computing unit is modified to the identifier representing the idle status. The state identification may be a word, for example, the word "free" characterizes an idle state and the word "busy" characterizes a non-idle state. Binary digits 0 and 1 are also possible, e.g., 0 representing an idle state and 1 representing a non-idle state.
The beneficial effect of this embodiment lies in: after task data corresponding to the second target exhaustive task is deleted and communication connection between the second cache pool and a currently connected second target computing unit is cut off, the state identifiers of the second cache pool and the second target computing unit are modified into identifiers representing an idle state, so that the cache pool in the idle state is determined according to the state identifiers, and the determination process of the cache pool in the idle state is simplified.
Example one
Fig. 3 is a flowchart of a calculation result submitting method according to an embodiment of the present invention. As shown in fig. 3, the method comprises the following steps S301-S306:
in step S301, when the first target exhaustive task is received, determining whether a second target exhaustive task currently being processed exists locally;
in step S302, when a second target exhaustive task exists, state identifiers of the first cache pool and the second cache pool are obtained;
in step S303, after determining that the first cache pool is in an idle state according to the state identifier, distributing the first target exhaustive task to the first target computing unit currently in the idle state;
in step S304, a communication connection between the first target computing unit and the first cache pool is established;
in step S305, when the time interval between the current time and the latest polling operation reaches a preset time interval, polling the calculation results in the first cache pool and the second cache pool for storing the second target exhaustive task;
in step S306, all the calculation results in the first cache pool and the second cache pool are submitted to the target server.
Example two
Fig. 4 is a flowchart of a calculation result submission method in the second embodiment of the present invention. As shown in fig. 4, the method includes the following steps S401 to S409:
in step S401, when the first target exhaustive task is received, determining whether a second target exhaustive task currently being processed exists locally;
in step S402, when a second target exhaustive task exists, establishing a corresponding relationship between the first target exhaustive task and the first cache pool in the idle state, so that the first target exhaustive task is stored in the first cache pool in the idle state when generating a calculation result;
in step S403, when the time interval between the current time and the latest polling operation reaches a preset time interval, polling the calculation results in the first cache pool and the second cache pool for storing the second target exhaustive task;
in step S404, all calculation results in the first cache pool and the second cache pool are submitted to the target server;
in step S405, the processing of the second target exhaustive task is stopped;
in step S406, emptying the task data corresponding to the second target exhaustive task and the calculation result in the second cache pool;
in step S407, deleting task data corresponding to the second target exhaustive task;
in step S408, the communication connection between the second cache pool and the currently connected second target computing unit is cut off;
in step S409, the status identifiers of the second cache pool and the second target computing unit are modified to identifiers representing an idle status.
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 can be implemented as the following steps S51-S54:
a judging module 51, configured to, when the first target exhaustive task is received, judge whether a second target exhaustive task currently being processed exists locally;
the establishing module 52 is configured to, when a second target exhaustive task exists, establish a corresponding relationship between the first target exhaustive task and the first cache pool in the idle state, so that the first target exhaustive task is stored in the first cache pool in the idle state when a calculation result is generated by the first target exhaustive task;
a polling module 53, configured to poll the calculation results in the first cache pool and the second cache pool for storing the second target exhaustion task when a time interval between the current time and the latest polling operation reaches a preset time interval;
and a submitting module 54, configured to submit all the calculation results in the first cache pool and the second cache pool to the target server.
In one embodiment, as shown in FIG. 6, the setup module 52 includes:
the obtaining submodule 61 is configured to obtain state identifiers of the first cache pool and the second cache pool;
and the establishing submodule 62 is configured to establish a corresponding relationship between the first target exhaustive task and the first cache pool after determining that the first cache pool is in an idle state according to the state identifier.
In one embodiment, the building submodule includes:
distributing the first target exhaustive task to a first target computing unit which is in an idle state at present;
and establishing communication connection between the first target computing unit and the first cache pool.
In one embodiment, the apparatus further comprises:
the stopping module is used for stopping processing the second target exhaustive task after all the calculation results in the first cache pool and the second cache pool are submitted to the target server;
the clearing module is used for clearing task data corresponding to the second target exhaustion task and the calculation result in the second cache pool;
and the deleting module is used for deleting the task data corresponding to the second target exhaustive task.
In one embodiment, the apparatus further comprises:
the cutting-off module is used for cutting off the communication connection between the second cache pool and the currently connected second target computing unit after the task data corresponding to the second target exhaustive task is deleted;
and the modification module is used for modifying the state identifiers of the second cache pool and the second target computing unit into identifiers representing idle states.
As will be appreciated by one skilled in the art, 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, 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 flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams 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 changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (10)

1. A method for submitting computation results, comprising:
when a first target exhaustive task is received, judging whether a second target exhaustive task which is being processed exists locally;
when a second target exhaustion task exists, establishing a corresponding relation between the first target exhaustion task and a first cache pool in an idle state, so that the first target exhaustion task is stored in the first cache pool in the idle state when generating a calculation result;
when the time interval between the current time and the latest polling operation reaches a preset time interval, polling the calculation results in the first cache pool and a second cache pool used for storing the second target exhaustive task;
and submitting all the calculation results in the first cache pool and the second cache pool to a target server.
2. The method of claim 1, wherein establishing a correspondence between the first target exhaustive task and a first cache pool in an idle state comprises:
acquiring state identifiers of the first cache pool and the second cache pool;
and after determining that the first cache pool is in an idle state according to the state identifier, establishing a corresponding relation between the first target exhaustive task and the first cache pool.
3. The method of claim 2, wherein said establishing a correspondence of the first target exhaustive task to the first cache pool comprises:
distributing the first target exhaustive task to a first target computing unit which is in an idle state at present;
and establishing communication connection between the first target computing unit and the first cache pool.
4. The method of claim 1, wherein after submitting all computation results in the first cache pool and the second cache pool to a target server, the method further comprises:
stopping processing the second target exhaustive task;
clearing the task data corresponding to the second target exhaustive task and the calculation result in the second cache pool;
and deleting the task data corresponding to the second target exhaustive task.
5. The method of claim 4, wherein after deleting task data corresponding to the second target exhaustive task, the method further comprises:
cutting off the communication connection between the second cache pool and the currently connected second target computing unit;
and modifying the state identifiers of the second cache pool and the second target computing unit into identifiers representing idle states.
6. A calculation result submission apparatus, comprising:
the judging module is used for judging whether a second target exhaustive task which is being processed exists locally or not when the first target exhaustive task is received;
the establishing module is used for establishing a corresponding relation between the first target exhaustive task and a first cache pool in an idle state when a second target exhaustive task exists, so that the first target exhaustive task is stored in the first cache pool in the idle state when a calculation result is generated;
the polling module is used for polling the calculation results in the first cache pool and the second cache pool for storing the second target exhaustive task when the time interval between the current time and the latest polling operation reaches a preset time interval;
and the submitting module is used for submitting all the calculation results in the first cache pool and the second cache pool to a target server.
7. The apparatus of claim 6, wherein the establishing module comprises:
the obtaining submodule is used for obtaining the state identifiers of the first cache pool and the second cache pool;
and the establishing submodule is used for establishing the corresponding relation between the first target exhaustive task and the first cache pool after the first cache pool is determined to be in an idle state according to the state identification.
8. The apparatus of claim 7, wherein the build submodule comprises:
distributing the first target exhaustive task to a first target computing unit which is in an idle state at present;
and establishing communication connection between the first target computing unit and the first cache pool.
9. The apparatus of claim 6, wherein the apparatus further comprises:
a stopping module, configured to stop processing the second target exhaustive task after all computation results in the first cache pool and the second cache pool are submitted to a target server;
an emptying module, configured to empty task data corresponding to the second target exhaustive task and a calculation result in the second cache pool;
and the deleting module is used for deleting the task data corresponding to the second target exhaustive task.
10. The apparatus of claim 9, wherein the apparatus further comprises:
the cutting-off module is used for cutting off the communication connection between the second cache pool and the second target computing unit which is connected currently after the task data corresponding to the second target exhaustive task is deleted;
and the modification module is used for modifying the state identifiers of the second cache pool and the second target computing unit into identifiers representing idle states.
CN201811251597.1A 2018-10-25 2018-10-25 Calculation result submitting method and device Active CN111104167B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811251597.1A CN111104167B (en) 2018-10-25 2018-10-25 Calculation result submitting method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811251597.1A CN111104167B (en) 2018-10-25 2018-10-25 Calculation result submitting method and device

Publications (2)

Publication Number Publication Date
CN111104167A true CN111104167A (en) 2020-05-05
CN111104167B CN111104167B (en) 2023-07-21

Family

ID=70417898

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811251597.1A Active CN111104167B (en) 2018-10-25 2018-10-25 Calculation result submitting method and device

Country Status (1)

Country Link
CN (1) CN111104167B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070195099A1 (en) * 2006-02-21 2007-08-23 Nvidia Corporation Asymmetric multi-GPU processing
CN103294531A (en) * 2012-03-05 2013-09-11 阿里巴巴集团控股有限公司 Method and system for task distribution
CN106095589A (en) * 2016-06-30 2016-11-09 浪潮软件集团有限公司 Partition allocation method, device and system
CN106547620A (en) * 2016-10-21 2017-03-29 杭州嘉楠耘智信息科技有限公司 Task processing method and device
WO2017070900A1 (en) * 2015-10-29 2017-05-04 华为技术有限公司 Method and apparatus for processing task in a multi-core digital signal processing system
CN106776015A (en) * 2016-11-29 2017-05-31 郑州云海信息技术有限公司 A kind of concurrent program task processing method and its device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070195099A1 (en) * 2006-02-21 2007-08-23 Nvidia Corporation Asymmetric multi-GPU processing
CN103294531A (en) * 2012-03-05 2013-09-11 阿里巴巴集团控股有限公司 Method and system for task distribution
WO2017070900A1 (en) * 2015-10-29 2017-05-04 华为技术有限公司 Method and apparatus for processing task in a multi-core digital signal processing system
CN106095589A (en) * 2016-06-30 2016-11-09 浪潮软件集团有限公司 Partition allocation method, device and system
CN106547620A (en) * 2016-10-21 2017-03-29 杭州嘉楠耘智信息科技有限公司 Task processing method and device
CN106776015A (en) * 2016-11-29 2017-05-31 郑州云海信息技术有限公司 A kind of concurrent program task processing method and its device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
肖建芳;林东岱;姜中华;: "密码计算网格的计算节点控制系统设计与实现", 计算机工程与设计 *

Also Published As

Publication number Publication date
CN111104167B (en) 2023-07-21

Similar Documents

Publication Publication Date Title
CN104714835A (en) Data access processing method and device
CN106250207A (en) A kind of virtual machine dilatation processing method and processing device
CN110134490B (en) Virtual machine dynamic migration method, device and storage medium
CN110751458B (en) Business approval method, device and system
CN110109741B (en) Method and device for managing circular tasks, electronic equipment and storage medium
US7434204B1 (en) Method and apparatus for managing software processes
CN106250254B (en) A kind of task processing method and system
CN114201458B (en) Information updating method, micro-service system and computer readable storage medium
CN114201197A (en) Firmware upgrading method and device, electronic equipment and readable storage medium
CN107277188B (en) Method, client, server and service system for determining IP address attribution information
CN111813518A (en) Robot early warning method and device, computer equipment and storage medium
CN108924096B (en) Information synchronization method and device
CN112954008B (en) Distributed task processing method and device, electronic equipment and storage medium
CN111104167B (en) Calculation result submitting method and device
CN105512091A (en) Memory allocation method and device
CN107783826B (en) Virtual machine migration method, device and system
CN109286672B (en) User request processing method and device and server
CN108628901A (en) A kind of data-updating method and device
CN115454599A (en) Task processing method, system, device, storage medium and electronic equipment
CN112596924B (en) Internet of things middlebox server application remote procedure calling method and system
CN114840238A (en) Software upgrading method and device, electronic equipment and computer readable storage medium
CN114780270A (en) Memory fault processing method and device, electronic equipment and computer readable storage medium
CN113721938A (en) Edge-edge cooperative task processing method, device and system suitable for power Internet of things
CN108920628B (en) Distributed file system access method and device adaptive to big data platform
CN113592594A (en) Order processing method, information query method and device

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

Effective date of registration: 20211020

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.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant