CN110098918B - Decryption scheduling method and device, readable storage medium and computer equipment - Google Patents

Decryption scheduling method and device, readable storage medium and computer equipment Download PDF

Info

Publication number
CN110098918B
CN110098918B CN201910245746.1A CN201910245746A CN110098918B CN 110098918 B CN110098918 B CN 110098918B CN 201910245746 A CN201910245746 A CN 201910245746A CN 110098918 B CN110098918 B CN 110098918B
Authority
CN
China
Prior art keywords
maintainer
idle state
decryption
decryptor
acquiring
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
CN201910245746.1A
Other languages
Chinese (zh)
Other versions
CN110098918A (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.)
Zonst Data Group Co ltd
Original Assignee
Zonst Data Group 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 Zonst Data Group Co ltd filed Critical Zonst Data Group Co ltd
Priority to CN201910245746.1A priority Critical patent/CN110098918B/en
Publication of CN110098918A publication Critical patent/CN110098918A/en
Application granted granted Critical
Publication of CN110098918B publication Critical patent/CN110098918B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/12Details relating to cryptographic hardware or logic circuitry
    • H04L2209/125Parallelization or pipelining, e.g. for accelerating processing of cryptographic operations

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Storage Device Security (AREA)

Abstract

The invention discloses a decryption scheduling method, a decryption scheduling device, a readable storage medium and computer equipment, wherein the method comprises the following steps: receiving a decryption request initiated by a caller, wherein the decryption request carries a ciphertext; acquiring all maintainers in an idle state from a maintainer queue, wherein the maintainers are used for maintaining data interaction between a scheduler and a decryptor, and each maintainer corresponds to one decryptor; if the number of the maintainers in the idle state is at least two, acquiring the maintainer with the shortest processing time consumption as a designated maintainer; and calling a corresponding decryptor through the specified maintainer to decrypt the ciphertext so as to obtain a plaintext. The invention can send the decryption task to the decryptor with the optimal performance for execution, so that the decryption time consumption is shortest, and the decryption efficiency is effectively improved.

Description

Decryption scheduling method and device, readable storage medium and computer equipment
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a decryption scheduling method and apparatus, a readable storage medium, and a computer device.
Background
In the transmission process of network information, in order to ensure the security of data, data generally needs to be encrypted and decrypted, where encryption is a process of processing data into ciphertext and decryption is a process of analyzing the ciphertext to obtain plaintext.
At present, in the process of decrypting ciphertext transmitted by a network, a plurality of decryptors are usually used for processing a decryption request, when a scheduler receives a decryption request, an idle decryptor is selected to process the request, and the problem exists that the scheduler often selects a decryptor with poor performance to process the request, so that the decryption efficiency is low.
Disclosure of Invention
Therefore, an object of the present invention is to provide a decryption scheduling method to improve decryption efficiency.
A decryption scheduling method, the method comprising:
receiving a decryption request initiated by a caller, wherein the decryption request carries a ciphertext;
acquiring all maintainers in an idle state from a maintainer queue, wherein the maintainers are used for maintaining data interaction between a scheduler and a decryptor, and each maintainer corresponds to one decryptor;
if the number of the maintainers in the idle state is at least two, acquiring the maintainer with the shortest processing time consumption, and taking the maintainer as a specified maintainer;
and calling a corresponding decryptor through the specified maintainer to decrypt the ciphertext so as to obtain a plaintext.
According to the decryption scheduling method provided by the invention, the maintainers are used for maintaining data interaction between the scheduler and the decryptors, when the number of the maintainers in the idle state is at least two, the maintainer with the shortest processing time consumption is obtained and is used as the designated maintainer, then the designated maintainer calls the corresponding decryptor to decrypt the ciphertext, and each maintainer corresponds to one decryptor, so that the decryptor corresponding to the designated maintainer has the strongest processing capability compared with other decryptors when processing the decryption task, namely the decryption task is executed by the decryptor with the best performance, so that the decryption time consumption is shortest, and the decryption efficiency can be effectively improved finally.
In addition, the decryption scheduling method according to the present invention may further have the following additional technical features:
further, the step of obtaining the maintainer with the shortest decryption time as the designated maintainer includes:
acquiring the historical processing record of each maintainer in an idle state within a preset time range;
calculating the processing capacity of each maintainer in the idle state according to the historical processing record of each maintainer in the idle state;
and calculating the time of the decryption request of each maintainer in the idle state according to the processing capacity of each maintainer in the idle state and the task amount to be decrypted, and further acquiring the maintainer with the shortest processing time consumption as a specified maintainer.
Further, the step of obtaining the maintainer with the shortest decryption time as the designated maintainer includes:
acquiring all processing records of each maintainer in an idle state within a preset time range;
calculating the average consumed time of each maintainer in an idle state, and taking the average consumed time as a weight value of the maintainer;
and taking the maintainer with the highest weight value as the maintainer with the shortest processing time consumption, and taking the maintainer as a specified maintainer.
Further, the step of decrypting the ciphertext by calling the corresponding decryptor through the specified maintainer includes:
the appointed maintainer remotely calls a decryption command of a corresponding decryptor through conditional compilation so as to decrypt the ciphertext through the corresponding decryptor to obtain a decrypted text character string;
and the appointed maintainer acquires the decrypted text character string through an adb command.
Further, after the step of obtaining the decrypted text string by the designated maintainer via an adb command, the method further includes:
returning the decrypted text character string to a caller in a function callback mode;
the time it takes to store or update this time;
resetting the working state of the specified maintainer to an idle state;
and informing the scheduler that the designated maintainer completes the work in a channel mode.
Further, the method further comprises:
if no maintainer is in an idle state, ending the decryption process;
if the number of the maintainers in the idle state is one, the maintainer is directly used as a designated maintainer.
Another objective of the present invention is to provide a decryption scheduling apparatus to improve decryption efficiency.
A decryption scheduling apparatus, the apparatus comprising:
the request receiving module is used for receiving a decryption request initiated by a caller, wherein the decryption request carries a ciphertext;
the device comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring all maintainers in an idle state from a maintainer queue, the maintainers are used for maintaining data interaction between a scheduler and a decryptor, and each maintainer corresponds to one decryptor;
the second acquisition module is used for acquiring the maintainer with the shortest processing time consumption as a designated maintainer if the number of the maintainers in the idle state is at least two;
and the calling decryption module is used for calling the corresponding decryptor through the specified maintainer to decrypt the ciphertext so as to obtain a plaintext.
According to the decryption scheduling device provided by the invention, the maintainers are used for maintaining data interaction between the scheduler and the decryptors, when the number of the maintainers in the idle state is at least two, the maintainer with the shortest processing time consumption is obtained and is used as the designated maintainer, then the corresponding decryptor is called by the designated maintainer to decrypt the ciphertext, and each maintainer corresponds to one decryptor, so that the decryptor corresponding to the designated maintainer has the strongest processing capability compared with other decryptors when processing the decryption task, namely the decryption task is executed by the decryptor with the best performance, the decryption time consumption is shortest, and the decryption efficiency can be effectively improved finally.
In addition, the decryption scheduling apparatus according to the present invention may further have the following additional features:
further, the second obtaining module is specifically configured to:
acquiring a historical processing record of each maintainer in an idle state within a preset time range;
calculating the processing capacity of each maintainer in the idle state according to the historical processing record of each maintainer in the idle state;
according to the processing capacity of each maintainer in the idle state and the task amount to be decrypted, calculating the time of the decryption request of each maintainer in the idle state, further acquiring the maintainer with the shortest processing time consumption, and taking the maintainer as a specified maintainer
Further, the second obtaining module is further configured to:
acquiring all processing records of each maintainer in an idle state within a preset time range;
calculating the average consumed time of each maintainer in an idle state, and taking the average consumed time as a weight value of the maintainer;
and taking the maintainer with the highest weight value as the maintainer with the shortest processing time consumption, and taking the maintainer as a designated maintainer.
Further, the call decryption module is specifically configured to:
the specified maintainer remotely calls a decryption command of a corresponding decryptor through conditional compilation so as to decrypt the ciphertext through the corresponding decryptor to obtain a decrypted text character string;
and the appointed maintainer acquires the decrypted text character string through an adb command.
Further, the apparatus further comprises:
the return module is used for returning the decrypted text character string to the caller in a function callback mode;
the recording module is used for storing or updating the time consumed at this time;
the reset module is used for resetting the working state of the specified maintainer to an idle state;
and the notification module is used for notifying the scheduler that the specified maintainer completes the work in a channel mode.
Further, the apparatus further comprises:
the end module is used for ending the decryption process if no maintainer is in an idle state;
and the designating module is used for directly taking the maintainer as the designated maintainer if the number of the maintainers in the idle state is one.
Another embodiment of the invention also proposes a readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the steps of the above-mentioned method.
Another embodiment of the present invention also proposes a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the above method when executing the program.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
The above and/or additional aspects and advantages of embodiments of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a flowchart of a decryption scheduling method according to a first embodiment of the present invention;
FIG. 2 is a flow chart of a decryption scheduling method according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a decryption scheduling apparatus according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a decryption scheduling apparatus according to a fourth embodiment of the present invention;
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
In the prior art, in the process of decrypting a ciphertext transmitted by a network, a plurality of decryptors are usually used for processing a decryption request, and when a scheduler receives a decryption request, an idle decryptor is selected to process the request. In order to solve the problem of low decryption efficiency, the present invention provides a decryption scheduling method to improve the decryption efficiency, and in order to better understand the present invention, the following description is made for the terms and components of the decryption system related to the present invention:
ciphertext: an encrypted text string;
the caller: decryption systems are usually provided in the form of functions (methods) (in the object-oriented development concept, instead of functions), where the place where the function (method) is called is the caller, usually the business system;
and (3) decrypting the request: a call, called for short a request, initiated by a caller;
a decryptor: the cipher text decryption module is responsible for the specific implementation of the cipher text decryption;
maintainer (worker): the system is responsible for maintaining data interaction between the decryptors and the scheduler, if the number of the decryptors is M, the number of the maintainers is also M, each maintainer corresponds to one decryptor, and one maintainer maintains the data interaction between one decryptor and the scheduler.
A scheduler: is responsible for the scheduling of a maintainer (worker);
waiting for the queue: storing the requested array;
maintainer queue (worker queue): array of maintainers (worker)
Based on this, referring to fig. 1, the decryption scheduling method according to the first embodiment of the present invention includes steps S101 to S104:
s101, receiving a decryption request initiated by a caller, wherein the decryption request carries a ciphertext;
the decryption scheduling method provided by this embodiment is applied to a scheduler in a decryption system, that is, an execution main body is the scheduler, and the scheduler receives a decryption request initiated by a caller.
In specific implementation, before the scheduler receives a decryption request initiated by a caller, the decryption system needs to be initialized, which specifically includes the following steps:
1) A scheduler is created.
2) A wait queue is created.
3) A maintainer queue is created.
4) And creating maintainers, and storing the maintainers into a maintainer queue according to the number of decryptors.
5) A channel for the maintainer to complete the event is created and associated with all maintainers.
6) And starting a completion event channel monitor, and monitoring the completion event of the maintainer in real time, wherein the completion event is essentially a coroutine or thread for circulation.
After the decryption system is initialized, the scheduler receives a decryption request task initiated by a caller, and the specific steps are as follows:
1) The caller initiates a decryption request through a function (method) provided by the decryption system;
2) The request is first received by the scheduler;
3) The scheduler puts the request into a wait queue (typically a save function that calls the wait queue);
4) And waiting for a queue to store requests (the queue needs to make a synchronous lock, lock the array, request the array to be input, and then unlock), and finishing receiving the decryption request.
S102, acquiring all maintainers in an idle state from a maintainer queue, wherein the maintainers are used for maintaining data interaction between a scheduler and a decryptor, and each maintainer corresponds to one decryptor;
wherein, the maintainer usually has two states, namely an idle state and a working state, and the scheduler will obtain all maintainers in the idle state from the maintainer queue.
S103, if the number of the maintainers in the idle state is at least two, acquiring the maintainer with the shortest processing time consumption as a designated maintainer;
the scheduler obtains the maintainer with the shortest decryption time from at least two maintainers in an idle state, and at least two implementation manners can be provided as follows:
the first method comprises the following steps:
acquiring the historical processing record of each maintainer in an idle state within a preset time range;
calculating the processing capacity of each maintainer in an idle state according to the historical processing record of each maintainer in the idle state, wherein the processing capacity can be specifically quantized, and the higher the value of the processing capacity is, the better the performance of the maintainer is;
and calculating the time of the decryption request of each maintainer in the idle state according to the processing capacity of each maintainer in the idle state and the task amount to be decrypted, and further acquiring the maintainer with the shortest processing time consumption as a specified maintainer.
And the second method comprises the following steps:
acquiring all processing records of each maintainer in an idle state within a preset time range;
calculating the average consumed time of each maintainer in an idle state, and taking the average consumed time as a weight value of the maintainer, wherein the higher the weight value is, the better the performance of the maintainer is;
and taking the maintainer with the highest weight value as the maintainer with the shortest processing time consumption, and taking the maintainer as a designated maintainer.
After the maintainer with the shortest processing time consumption is obtained, the state of the designated maintainer is set to be a working state so as to prevent the designated maintainer from being used for multiple times in one-time idle state, enter specific decryption work in a coroutine (thread) mode, and then monitor the completion condition of the designated maintainer.
It should be noted that if there is no maintainer in the idle state, the decryption process is ended.
If the number of the maintainers in the idle state is one, only one maintainer in the idle state exists, and thus the maintainer is directly used as the designated maintainer.
And S104, calling a corresponding decrypter through the specified maintainer to decrypt the ciphertext to obtain a plaintext.
The appointed maintainer remotely calls a decryption command of a corresponding decryptor through conditional compilation so as to decrypt the ciphertext through the corresponding decryptor to obtain a decrypted text character string;
the specified maintainer then obtains the decrypted text string via an adb command.
Although the script execution mode of different systems is different, different operating systems, such as linux, windows, macOX systems and the like, can be adapted through conditional compilation.
Because the maintainers are in one-to-one correspondence with the decryptors, the decryptor corresponding to the designated maintainer has the strongest processing capability compared with other decryptors when processing a decryption task, and the designated maintainer calls the corresponding decryptor to decrypt a ciphertext, so that the decryption efficiency can be improved.
In summary, according to the decryption scheduling method of the embodiment of the present invention, data interaction between the scheduler and the decryptors is maintained through the maintainers, when the number of the maintainers in the idle state is at least two, the maintainer with the shortest processing time consumption is obtained and is used as the designated maintainer, and then the corresponding decryptor is called through the designated maintainer to decrypt the ciphertext, because each maintainer corresponds to one decryptor, when the decryptor corresponding to the designated maintainer processes a decryption task, compared with other decryptors, the decryptor has the strongest processing capability, that is, the decryption task is executed by the decryptor with the best performance, so that the decryption time consumption is the shortest, and finally, the decryption efficiency can be effectively improved.
Referring to fig. 2, a decryption scheduling method according to a second embodiment of the present invention includes steps S201 to S208:
s201, receiving a decryption request initiated by a caller, wherein the decryption request carries a ciphertext;
specifically, when the scheduler extracts the request task, the method specifically includes the following steps:
1) A lock wait queue;
2) Taking a request task in a first-in first-out (or first-in last-out) mode;
3) Unlocking;
4) And returning to the scheduler.
S202, acquiring all maintainers in an idle state from a maintainer queue, wherein the maintainers are used for maintaining data interaction between a scheduler and a decryptor, and each maintainer corresponds to one decryptor;
s203, if the number of the maintainers in the idle state is at least two, acquiring the maintainer with the shortest processing time consumption as a designated maintainer;
s204, calling a corresponding decrypter through the specified maintainer to decrypt the ciphertext to obtain a plaintext;
s205, the decrypted text character string is returned to the caller through a function callback mode;
s206, storing or updating the time consumed at this time;
s207, resetting the working state of the specified maintainer to an idle state;
s208, the scheduler is informed that the designated maintainer completes the work in a channel mode.
In addition, after the scheduler monitors the completion event, it will scan the outstanding requests in the waiting queue again to perform the next task.
The method provided by this embodiment, based on the first embodiment, can update or store the time consumption of the specified maintainer at this time, and use the updated or stored time consumption as a history of the specified maintainer, so that a subsequent scheduler can perform comparative analysis, thereby selecting the maintainer with the best performance.
It should be noted that the present embodiment focuses on differences from the previous embodiment, and the same and similar parts between the embodiments are not described repeatedly, and may be referred to each other.
Referring to fig. 3, based on the same inventive concept, a decryption scheduling apparatus according to a third embodiment of the present invention includes:
a request receiving module 11, configured to receive a decryption request initiated by a caller, where the decryption request carries a ciphertext;
a first obtaining module 12, configured to obtain all maintainers in an idle state from a maintainer queue, where the maintainers are used to maintain data interaction between a scheduler and a decryptor, and each maintainer corresponds to one decryptor;
a second obtaining module 13, configured to obtain, if the number of the maintainers in the idle state is at least two, the maintainer with the shortest processing time consumption as an assigned maintainer;
and the calling decryption module 14 is configured to call the corresponding decryptor through the specified maintainer to decrypt the ciphertext to obtain a plaintext.
The second obtaining module 13 is specifically configured to:
acquiring the historical processing record of each maintainer in an idle state within a preset time range;
calculating the processing capacity of each maintainer in the idle state according to the historical processing record of each maintainer in the idle state;
according to the processing capacity of each maintainer in the idle state and the task amount to be decrypted, calculating the time of the decryption request of each maintainer in the idle state, further acquiring the maintainer with the shortest processing time consumption, and taking the maintainer as a specified maintainer
Wherein, the second obtaining module 13 may be further configured to:
acquiring all processing records of each maintainer in an idle state within a preset time range;
calculating the average consumed time of each maintainer in an idle state, and taking the average consumed time as a weight value of the maintainer;
and taking the maintainer with the highest weight value as the maintainer with the shortest processing time consumption, and taking the maintainer as a designated maintainer.
The call decryption module 14 is specifically configured to:
the appointed maintainer remotely calls a decryption command of a corresponding decryptor through conditional compilation so as to decrypt the ciphertext through the corresponding decryptor to obtain a decrypted text character string;
and the appointed maintainer acquires the decrypted text character string through an adb command.
Further, the apparatus further comprises:
an ending module 15, configured to end the decryption process if there is no maintainer in an idle state;
and the specifying module 16 is configured to, if the number of the maintainers in the idle state is one, directly use the maintainer as a specified maintainer.
According to the decryption scheduling device and the decryption scheduling device provided by the embodiment, data interaction between the scheduler and the decryptors is maintained through the maintainers, when the number of the maintainers in the idle state is at least two, the maintainer with the shortest processing time consumption is obtained and serves as the designated maintainer, then the corresponding decryptor is called through the designated maintainer to decrypt the ciphertext, and each maintainer corresponds to one decryptor, so that when the decryptor corresponding to the designated maintainer processes a decryption task, compared with other decryptors, the decryptor has the strongest processing capacity, namely, the decryption task can be executed by the decryptor with the best performance, the decryption time consumption is shortest, and the decryption efficiency can be effectively improved finally.
Referring to fig. 4, based on the same inventive concept, a decryption scheduling apparatus according to a fourth embodiment of the present invention includes:
a request receiving module 21, configured to receive a decryption request initiated by a caller, where the decryption request carries a ciphertext;
a first obtaining module 22, configured to obtain all maintainers in an idle state from a maintainer queue, where the maintainers are used to maintain data interaction between a scheduler and a decryptor, and each maintainer corresponds to one decryptor;
a second obtaining module 23, configured to obtain, if the number of the maintainers in the idle state is at least two, the maintainer with the shortest processing time consumption as a designated maintainer;
and the calling decryption module 24 is configured to call the corresponding decryptor through the specified maintainer to decrypt the ciphertext to obtain a plaintext.
Wherein the apparatus further comprises:
a returning module 25, configured to return the decrypted text string to the caller in a function callback manner;
a recording module 26 for storing or updating the time elapsed this time;
a reset module 27, configured to reset the working state of the specified maintainer to an idle state;
and a notification module 28, configured to notify the scheduler that the designated maintainer has completed the task in a channel manner.
The technical features and technical effects of the decryption scheduling apparatus provided in the embodiment of the present invention are the same as those of the method provided in the second embodiment of the present invention, and are not described herein again.
Furthermore, an embodiment of the present invention also proposes a readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps of the above-mentioned method.
Furthermore, an embodiment of the present invention also provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor executes the program to implement the method described above.
The logic and/or steps represented in the flowcharts or otherwise described herein, such as an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Further, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
While embodiments of the present invention have been shown and described, it will be understood by those of ordinary skill in the art that: various changes, modifications, substitutions and alterations can be made to the embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

Claims (5)

1. A decryption scheduling method, the method comprising:
receiving a decryption request initiated by a caller, wherein the decryption request carries a ciphertext;
acquiring all maintainers in an idle state from a maintainer queue, wherein the maintainers are used for maintaining data interaction between a scheduler and a decryptor, and each maintainer corresponds to one decryptor;
if the number of the maintainers in the idle state is at least two, acquiring the maintainer with the shortest processing time consumption as a designated maintainer;
calling a corresponding decryptor through the designated maintainer to decrypt the ciphertext to obtain a plaintext;
the step of decrypting the ciphertext by calling the corresponding decryptor through the specified maintainer comprises the following steps:
the appointed maintainer remotely calls a decryption command of a corresponding decryptor through conditional compilation so as to decrypt the ciphertext through the corresponding decryptor to obtain a decrypted text character string;
the appointed maintainer acquires the decrypted text character string through an adb command;
after the step of obtaining the decrypted text string by the designated maintainer via an adb command, the method further includes:
returning the decrypted text character string to a caller in a function callback mode;
storing or updating the time taken this time;
resetting the working state of the specified maintainer to an idle state;
informing the dispatcher that the designated maintainer finishes the work in a channel mode;
the step of acquiring the maintainer with the shortest processing time as the designated maintainer comprises the following steps:
acquiring a historical processing record of each maintainer in an idle state within a preset time range;
calculating the processing capacity of each maintainer in the idle state according to the historical processing record of each maintainer in the idle state;
calculating the time for each maintainer in the idle state to execute the decryption request according to the processing capacity of each maintainer in the idle state and the task amount to be decrypted, and further acquiring the maintainer with the shortest processing time consumption as a specified maintainer;
or;
the step of acquiring the maintainer with the shortest processing time as the designated maintainer comprises the following steps:
acquiring all processing records of each maintainer in an idle state within a preset time range;
calculating the average consumed time of each maintainer in an idle state, and taking the average consumed time as a weight value of the maintainer;
and taking the maintainer with the highest weight value as the maintainer with the shortest processing time consumption, and taking the maintainer as a designated maintainer.
2. The decryption scheduling method of claim 1, wherein the method further comprises:
if no maintainer is in an idle state, ending the decryption process;
if the number of the maintainers in the idle state is one, the maintainer is directly used as a designated maintainer.
3. An apparatus for decryption scheduling, the apparatus comprising:
the request receiving module is used for receiving a decryption request initiated by a caller, wherein the decryption request carries a ciphertext;
the device comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring all maintainers in an idle state from a maintainer queue, the maintainers are used for maintaining data interaction between a scheduler and a decryptor, and each maintainer corresponds to one decryptor;
the second acquisition module is used for acquiring the maintainer with the shortest processing time consumption as a designated maintainer if the number of the maintainers in the idle state is at least two;
the calling decryption module is used for calling a corresponding decryptor through the specified maintainer to decrypt the ciphertext so as to obtain a plaintext;
the calling decryption module is specifically configured to:
the specified maintainer remotely calls a decryption command of a corresponding decryptor through conditional compilation so as to decrypt the ciphertext through the corresponding decryptor to obtain a decrypted text character string;
the appointed maintainer acquires the decrypted text character string through an adb command;
the device further comprises:
the return module is used for returning the decrypted text character string to the caller in a function callback mode;
the recording module is used for storing or updating the time consumed at this time;
the reset module is used for resetting the working state of the specified maintainer to an idle state;
the notification module is used for notifying the dispatcher that the appointed maintainer finishes the work in a channel mode;
the second obtaining module is specifically configured to:
acquiring the historical processing record of each maintainer in an idle state within a preset time range;
calculating the processing capacity of each maintainer in the idle state according to the historical processing record of each maintainer in the idle state;
calculating the time for each maintainer in the idle state to execute the decryption request according to the processing capacity of each maintainer in the idle state and the task amount to be decrypted, and further acquiring the maintainer with the shortest processing time consumption as a specified maintainer;
the second obtaining module is further configured to:
acquiring all processing records of each maintainer in an idle state within a preset time range;
calculating the average consumed time of each maintainer in an idle state, and taking the average consumed time as a weight value of the maintainer;
and taking the maintainer with the highest weight value as the maintainer with the shortest processing time consumption, and taking the maintainer as a designated maintainer.
4. A readable storage medium having stored thereon computer instructions, which when executed by a processor, perform the steps of the method of any one of claims 1 to 2.
5. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1 to 2 when executing the program.
CN201910245746.1A 2019-03-28 2019-03-28 Decryption scheduling method and device, readable storage medium and computer equipment Active CN110098918B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910245746.1A CN110098918B (en) 2019-03-28 2019-03-28 Decryption scheduling method and device, readable storage medium and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910245746.1A CN110098918B (en) 2019-03-28 2019-03-28 Decryption scheduling method and device, readable storage medium and computer equipment

Publications (2)

Publication Number Publication Date
CN110098918A CN110098918A (en) 2019-08-06
CN110098918B true CN110098918B (en) 2022-11-22

Family

ID=67444107

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910245746.1A Active CN110098918B (en) 2019-03-28 2019-03-28 Decryption scheduling method and device, readable storage medium and computer equipment

Country Status (1)

Country Link
CN (1) CN110098918B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111460504B (en) * 2020-03-31 2021-11-05 腾讯科技(深圳)有限公司 Service processing method, device, node equipment and storage medium

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8726039B2 (en) * 2012-06-14 2014-05-13 International Business Machines Corporation Reducing decryption latency for encryption processing
CN103530929B (en) * 2012-07-02 2015-11-18 航天信息股份有限公司 A kind of method of dispatching deciphering machine
CN103605568B (en) * 2013-10-29 2017-10-31 北京奇虎科技有限公司 A kind of Multithread management method and device
CN104503833A (en) * 2014-12-22 2015-04-08 广州唯品会网络技术有限公司 Task scheduling optimization method and device
CN105809323A (en) * 2016-02-23 2016-07-27 平安科技(深圳)有限公司 Task allocation method and system
CN106302699B (en) * 2016-08-11 2019-12-27 广州慧睿思通信息科技有限公司 Method for processing decryption tasks of PC (personal computer) ends of multiple decryptors
CN106454402B (en) * 2016-08-31 2018-11-23 腾讯科技(深圳)有限公司 Transcoding method for scheduling task and device
CN109241157B (en) * 2018-08-02 2021-09-07 中央电视台 Data calling method and device, communication equipment and storage medium

Also Published As

Publication number Publication date
CN110098918A (en) 2019-08-06

Similar Documents

Publication Publication Date Title
US6904597B2 (en) Inter-thread communications between different components using double buffer
CN107729139B (en) Method and device for concurrently acquiring resources
CN102456185B (en) Distributed workflow processing method and distributed workflow engine system
CN108319495B (en) Task processing method and device
US9547536B2 (en) Connection handler and method for providing applications with heterogeneous connection objects
CN108595282A (en) A kind of implementation method of high concurrent message queue
CN111258565B (en) Method, system, server and storage medium for generating applet
CN110990142A (en) Concurrent task processing method and device, computer equipment and storage medium
CN106250246A (en) A kind of method and system of event transmission
CN110098918B (en) Decryption scheduling method and device, readable storage medium and computer equipment
CN111240864A (en) Asynchronous task processing method, device, equipment and computer readable storage medium
CN103810420A (en) Application uninstall preventing method and system
CN115185697A (en) Cluster resource scheduling method, system, equipment and storage medium based on kubernets
CN114461385A (en) Thread pool scheduling method, device and equipment and readable storage medium
CN107959890B (en) Detection method, device, terminal and storage medium for reserved recording
CN103810419A (en) Application uninstall preventing method and equipment
CN115794356B (en) Multithread synchronous connection processing method based on SSH server
JP2684993B2 (en) Processor system and control method thereof
JP2005182787A (en) Key cache management through multiple localities
JP6962142B2 (en) Programs and information processing equipment
CN115328664A (en) Message consumption method, device, equipment and medium
JP6823257B2 (en) Job monitoring program, job monitoring device and job monitoring method
KR100646853B1 (en) Apparatus and method for generating satellite mission scheduling
CN104573484A (en) Highly safe password input box
CN109426563A (en) A kind of process management 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
GR01 Patent grant
GR01 Patent grant