CN113094158B - Service drive calling method, calling device, electronic equipment and storage medium - Google Patents
Service drive calling method, calling device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN113094158B CN113094158B CN202110275067.6A CN202110275067A CN113094158B CN 113094158 B CN113094158 B CN 113094158B CN 202110275067 A CN202110275067 A CN 202110275067A CN 113094158 B CN113094158 B CN 113094158B
- Authority
- CN
- China
- Prior art keywords
- drive
- period
- calling
- online
- real
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 51
- 238000001514 detection method Methods 0.000 claims description 27
- 238000004590 computer program Methods 0.000 claims description 8
- 238000012795 verification Methods 0.000 description 5
- 238000004891 communication Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000007726 management method Methods 0.000 description 2
- 230000008520 organization Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000000802 evaporation-induced self-assembly Methods 0.000 description 1
- 230000003203 everyday effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 230000008439 repair process Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/48—Indexing scheme relating to G06F9/48
- G06F2209/484—Precedence
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The application discloses a service drive calling method, a service drive calling device, electronic equipment and a storage medium. The method comprises the following steps: setting the priority of each drive of the service according to a preset rule to obtain a default priority sequence; periodically detecting the real-time state of each drive in a first period, and marking each drive as online drive or offline drive according to the real-time state; according to the default priority order, periodically setting the calling priority of each online drive in a second period to obtain an online drive calling priority order; wherein the second period is greater than or equal to the first period; and calling the online drive according to the order of calling the priority of the online drive. The method of the application can effectively realize the optimized call of the service drive, improve the utilization efficiency of the service drive, effectively utilize the application program resource, improve the service drive call rate, improve the operation efficiency and save the operation time.
Description
Technical Field
The present application relates to the field of computer technologies, and in particular, to a service driver calling method, a service driver calling device, an electronic device, and a storage medium.
Background
With the development of internet technology and intelligent terminal technology, various application programs are increasingly applied to various fields, so that convenient operation service is provided for people, and great convenience is brought to people's work and life. More and more applications with the same function take enterprise information query applications as examples, and there are multiple types of APPs such as enterprise search, day search, etc. For example, when domain name registration is performed, query verification needs to be performed on enterprise information provided by the applicant, and at this time, a service for querying enterprise information needs to be invoked. A service refers to a combination of a set of drivers with similar functionality. A driver is an application program interface for accessing an application program. How to effectively use multiple application programs with the same function to realize corresponding operation and efficiently use application program resources is one of the technical problems of the hot spot in the current technical field. In the prior art, the optimization calling of the service drive cannot be effectively realized, the utilization efficiency of multiple application programs with the same function is affected, the operation efficiency is affected, and the operation time is wasted.
Disclosure of Invention
The application aims to provide a service drive calling method, a service drive calling device, electronic equipment and a storage medium. The following presents a simplified summary in order to provide a basic understanding of some aspects of the disclosed embodiments. This summary is not an extensive overview and is intended to neither identify key/critical elements nor delineate the scope of such embodiments. Its sole purpose is to present some concepts in a simplified form as a prelude to the more detailed description that is presented later.
According to an aspect of an embodiment of the present application, there is provided a service driver invocation method including:
Setting the priority of each drive of the service according to a preset rule to obtain a default priority sequence;
Periodically detecting the real-time state of each drive in a first period, and marking each drive as online drive or offline drive according to the real-time state;
According to the default priority order, periodically setting the calling priority of each online drive in a second period to obtain an online drive calling priority order; wherein the second period is greater than or equal to the first period;
and calling the online drive according to the order of calling the priority of the online drive.
Further, before the periodically setting the call priority of each of the online drives in the second period according to the default priority order, the method further includes:
periodically counting the offline times of each drive according to a third period, and marking the drive with the offline times exceeding a preset offline time threshold value in the last third period as a failure drive;
Setting that the failed drive does not accept real-time status detection within a first preset duration from when the failed drive is marked; wherein the third period is greater than or equal to the second period.
Further, the drive calling method further comprises:
And counting the number of the current online drives in real time, and adjusting the period adopted for periodically detecting the real-time state of each drive according to the counted result.
Further, the adjusting the period adopted to periodically detect the real-time state of each drive according to the statistical result includes:
Comparing the current number of the online drives in the statistical result with a preset number threshold;
If the current number of the online drives is smaller than the preset number threshold, and the current detection period of the real-time state of each drive is the first period, replacing the first period with a fourth period;
if the current number of the online drives is greater than the preset number threshold and the current detection period of the real-time state of each drive is the fourth period, replacing the fourth period with the first period; wherein the fourth period is less than the first period.
Further, the drive calling method further comprises:
and when the real-time state of each drive is periodically detected in the fourth period, detecting the current real-time state of each off-line drive, and then detecting the current real-time state of each on-line drive.
Further, the drive calling method further comprises:
Periodically counting the calling fault times of each driver, and marking the driver with the calling fault times exceeding a preset fault time threshold value in the latest counting period as a fault driver;
The faulty drive is set to not accept real-time status detection for a second preset time period from when the faulty drive is marked.
Further, the method further comprises: and sending an early warning message containing the fault driving information.
According to another aspect of an embodiment of the present application, there is provided a service driver invocation apparatus including:
the first setting module is used for setting the priority of each drive of the service according to a preset rule to obtain a default priority sequence;
the detection marking module is used for periodically detecting the real-time state of each drive in a first period and marking each drive as online drive or offline drive according to the real-time state;
the second setting module is used for periodically setting the calling priority of each online driver according to the default priority order and obtaining the online driver calling priority order; wherein the second period is greater than or equal to the first period;
And the calling module is used for calling the online drive according to the order of the calling priorities of the online drives.
According to another aspect of the embodiment of the present application, there is provided an electronic device including a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor executing the program to implement the method for driving and calling the service described above.
According to another aspect of the embodiments of the present application, there is provided a computer-readable storage medium having stored thereon a computer program that is executed by a processor to implement the above-described service driver invocation method.
One of the technical solutions provided in one aspect of the embodiments of the present application may include the following beneficial effects:
According to the method for calling the service driver, which is provided by the embodiment of the application, each driver is marked as the online driver or the offline driver according to the real-time state of each driver, the calling priority of each online driver is periodically set according to the default priority order, and the online driver is called according to the online driver calling priority order, so that the optimized calling of the service driver can be effectively realized, the utilization efficiency of the service driver is improved, the application program resource can be effectively utilized, the service driver calling rate is improved, the operation efficiency is improved, and the operation time is saved.
Additional features and advantages of the application 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 embodiments of the application. The objectives and other advantages of the application will be realized and attained by the structure particularly pointed out in the written description and claims thereof as well as the appended drawings.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings may be obtained according to the drawings without inventive effort to those skilled in the art.
FIG. 1 illustrates a driver invocation method flow diagram of a service of one embodiment of the application;
FIG. 2 shows a drive invocation method flow chart of a service of another embodiment of the application;
FIG. 3 shows a drive invocation method flow chart of a service of another embodiment of the application;
FIG. 4 is a flow chart illustrating the adjustment of the period of detecting the real-time status of each drive based on the statistical results in the embodiment of FIG. 3;
FIG. 5 shows a drive invocation method flowchart of a service of another embodiment of the present application;
FIG. 6 shows a drive invocation method flowchart of a service of another embodiment of the present application;
FIG. 7 is a block diagram showing a structure of a drive calling device of a service according to an embodiment of the present application;
fig. 8 shows a block diagram of an electronic device according to an embodiment of the application.
Detailed Description
The present application will be further described with reference to the drawings and the specific embodiments in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
It will be understood by those skilled in the art that all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs unless defined otherwise. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
A service refers to a combination of a set of drivers with similar functionality. The driver refers to an application program interface for accessing an application program. The offline state refers to an unavailable state of the drive. The online state refers to the available state of the drive.
As shown in fig. 1, one embodiment of the present application provides a service driver invocation method, including:
And S10, setting the priority of each drive of the service according to a preset rule, and obtaining a default priority sequence.
The preset rule may set the priority of each driver, for example, according to the network score of the application program corresponding to each driver.
Take domain name registration service as an example. Domain name registration is a service used in the Internet to solve address correspondence problems. According to the internet domain name management method, the domain name registration service organization and the domain name registration management organization need to check whether the domain name proposed by the applicant violates the right of a third party and the true identity of the applicant. The registration of the secondary domain name in each of the same top-level domain names is unique and not repeatable, but the secondary domain names in different top-level domain names may be identical. Thus, domain names are a relatively limited resource on the network, and their value is increasingly appreciated as registered businesses and individual users increase. Verification is a service. For maximum service efficiency, the service for verification includes several drivers, each for accessing an application to complete verification of information provided by the applicant.
For example, querying enterprise information may be implemented by accessing enterprise query APP (an enterprise information query tool), and then a driver of enterprise query APP is included in the service. Querying enterprise information may be accomplished by accessing a query APP (an enterprise information query tool), which then includes a driver of the query APP within the service. And obtaining scores of various application programs according to the network information big data, and setting the priority of corresponding driving according to the scores. For example, a service for verification includes five drivers of application programs A, B, C, D, E, scores of the five application programs are obtained according to the network information big data, the scores are B, D, E, C, A in sequence from high to low, and a default priority order of the five drivers is set to be B, D, E, C, A according to the order of the scores in the network big data.
S20, periodically detecting the real-time state of each drive in a first period, and marking each drive as online drive or offline drive according to the real-time state.
The real-time state of the drive includes whether the corresponding drive is currently in an online state or an offline state. If the drive corresponding to the real-time state display is in an on-line state, the drive corresponding to the mark is currently in an on-line drive, and if the drive corresponding to the real-time state display is in an off-line state, the drive corresponding to the mark is currently in an off-line drive.
The first period can be set according to actual application requirements. For example, the first period may be preset to 5 minutes, and real-time status detection may be performed on each drive within the service every 5 minutes to determine which of the current drives are available and which are not available.
And S40, periodically setting the calling priority of each online driver according to the default priority order and obtaining the calling priority order of the online drivers. The second period is greater than or equal to the first period.
For each online drive determined by S20, the call priority of each online drive is set according to the default priority order obtained by S10. For example, assuming that A, C, D, E is online drive and C is offline drive in the drives of five applications A, B, C, D, E, the call priority of A, B, D, E is set, and the online drive call priority is B, D, E, A according to the relative order of A, B, D, E in the default priority order B, D, E, C, A. The length of the second period may be set according to actual needs, and is greater than or equal to the first period, for example, if the first period is set to 5 minutes, the second period may be set to 5 minutes or 6 minutes, or the like.
S50, calling the online drive according to the order of the calling priorities of the online drives.
Taking a preset rule as an example of setting the priority of each driver according to the network score of the application program corresponding to each driver, if the online driver calling priority order is B, D, E, A, then the driver B is preferentially called when the service is realized, and then D, E, A is sequentially carried out. This ensures that the online driver with the highest network score is preferentially invoked, thereby ensuring the best implementation of the service.
As shown in fig. 2, in some embodiments, prior to step S40, the method further comprises:
And S30, periodically counting the offline times of each drive in a third period, marking the drive with the offline times exceeding a preset offline time threshold value in the last third period as the invalid drive, and setting that the invalid drive does not receive real-time state detection in a first preset time period from the time marked as the invalid drive. The third period is greater than or equal to the second period. The offline number of drives, i.e., the number of times the drive is marked as offline.
For various reasons, such as current application program access congestion, the offline frequency of the failed driver in the current period of time is high, if the real-time state of the failed driver is still periodically detected, the detection of the failed driver results in time waste, so that the real-time state of the failed driver is not detected in the first preset time period, and the detection time of the real-time state of the driver can be saved. The first preset duration may be set according to actual needs, for example, may be set to 10 minutes. After the first preset period of time, the reason for the failure driving may be eliminated, for example, the application program access congestion is relieved, and the offline frequency of the failure driving is reduced, and at this time, the real-time state is detected again. In particular, for an application program sensitive to a time period, the access amount is large in a certain fixed time period every day, and the problem of access congestion is extremely easy to occur, so that the application program can be marked that the application program is not in failure driving in the fixed time period, the application program is not subjected to real-time state detection in the fixed time period, and the real-time state is detected after the fixed time period is passed. Therefore, the detection efficiency can be improved, the efficiency of finding on-line driving can be improved, and the time is saved.
As shown in fig. 3, in certain embodiments, the method further comprises:
and S60, counting the number of the current online drives in real time, and adjusting the period adopted for periodically detecting the real-time state of each drive according to the counted result.
As shown in fig. 4, in some embodiments, the step S60 of adjusting the period of detecting the real-time status of each drive according to the statistical result includes:
S601, comparing the current number of the online drives in the statistical result with a preset number threshold.
S602, if the current number of the online drivers is smaller than the preset number threshold, and the period of currently detecting the real-time state of each driver is the first period, replacing the first period with a fourth period.
S603, if the current number of the online drives is greater than the preset number threshold, and the period of currently detecting the real-time state of each drive is the fourth period, replacing the fourth period with the first period; wherein the fourth period is less than the first period.
Specifically, if the number of current online drives is smaller than a preset number threshold and the current detection period of the real-time state of each drive is a first period, replacing the first period with a fourth period, and replacing the fourth period with the first period until statistics is made that the number of current online drives is larger than the preset number threshold, wherein the fourth period is smaller than the first period.
If the number of the current online drives is smaller than the preset number threshold, the situation that the online drives are insufficient when the service call is online driven may be caused, so that the fourth period smaller than the first period is replaced by the first period, the detection frequency of the real-time state of each drive can be improved, the drive which is separated from the offline state is favorably timely brought into the online drive call priority order to accept the service call, and the problem that the current online drive is insufficient is solved.
As shown in fig. 5, in some embodiments, the method further comprises:
And S70, when the real-time state of each drive is periodically detected in the fourth period, the real-time state of each off-line drive is detected at first, and then the real-time state of each on-line drive is detected at present.
The real-time state of each offline driver is detected firstly to find out the driver which is separated from the offline state in time, so that the driver which is separated from the offline state is brought into the priority order of the online driver call in time to receive the service call.
As shown in fig. 6, in some embodiments, the method further comprises:
S80, periodically counting the calling fault times of each drive, marking the drive with the calling fault times exceeding a preset fault time threshold value in the last counting period as a fault drive, setting that the fault drive does not accept real-time state detection within a second preset time period from the time marked as the fault drive, and sending an early warning message containing information of the fault drive.
The cause of the calling failure of the driver is many, for example, the cause may be caused by the failure of the corresponding application program, and the problem of the failure of the application program may need a long time to be solved, so that the failure driver is set to not accept the real-time state detection within the second preset time period from the time of being marked as the failure driver, so as to avoid wasting the time of carrying out the real-time state detection on the failure driver. In addition, sending the early warning message can remind the staff to take corresponding treatment measures in time, such as measures of fault detection, repair and the like. The second preset time period may be set according to actual needs, for example, may be set to 20 minutes, 30 minutes, or the like.
According to the method for calling the service driver, which is provided by the embodiment of the application, each driver is marked as the online driver or the offline driver according to the real-time state of each driver, the calling priority of each online driver is periodically set according to the default priority order, and the online driver is called according to the online driver calling priority order, so that the optimized calling of the service driver can be effectively realized, the utilization efficiency of the service driver is improved, the application program resource can be effectively utilized, the service driver calling rate is improved, the operation efficiency is improved, and the operation time is saved.
As shown in fig. 7, another embodiment of the present application provides a service driver invocation apparatus, including:
the first setting module is used for setting the priority of each drive of the service according to a preset rule to obtain a default priority sequence;
the detection marking module is used for periodically detecting the real-time state of each drive in a first period and marking each drive as online drive or offline drive according to the real-time state;
the second setting module is used for periodically setting the calling priority of each online driver according to the default priority order and obtaining the online driver calling priority order; wherein the second period is greater than or equal to the first period;
And the calling module is used for calling the online drive according to the order of the calling priorities of the online drives.
In some embodiments, the service driver calling device further includes a first statistics marking module, where the first statistics marking module is configured to periodically set, by the second setting module according to the default priority order, a calling priority of each online driver in a second period, and periodically count, by a third period, offline times of each driver before obtaining the online driver calling priority order, mark, as a failure driver, a driver whose offline times in a last third period exceeds a preset offline times threshold, and set that the failure driver does not accept real-time status detection in a first preset duration from when the driver is marked as the failure driver. The third period is greater than or equal to the second period. The offline number of drives, i.e., the number of times the drive is marked as offline.
In some embodiments, the driver invocation means of the service further comprises:
and the statistics adjustment module is used for counting the current number of the online drivers in real time, and adjusting the period adopted for periodically detecting the real-time state of each driver according to the counted result.
In some embodiments, the statistics adjustment module includes a sub-module for adjusting a period of detecting a real-time state of each drive based on a result of the statistics, the sub-module including:
The comparison unit is used for comparing the current on-line driving quantity in the statistical result with a preset quantity threshold value;
And the replacing unit is used for replacing the first period with a fourth period if the current number of the online drivers is smaller than the preset number threshold and the period for detecting the real-time state of each driver is the first period.
The replacing unit is further configured to replace the fourth period with the first period if the current number of on-line drives is greater than the preset number threshold and the period for currently detecting the real-time status of each drive is the fourth period; wherein the fourth period is less than the first period.
In some embodiments, the detection marking module is further configured to detect the current real-time status of each offline drive first and then detect the current real-time status of each online drive when the real-time status of each drive is periodically detected in the fourth period.
In some embodiments, the driver calling device of the service further includes a second statistics marking module, where the second statistics marking module is configured to periodically count the number of call failures of each driver, mark a driver whose number of call failures in a last statistics period exceeds a preset failure number threshold as a failure driver, set that the failure driver does not accept real-time state detection within a second preset time period from when the driver is marked as the failure driver, and send an early warning message including information of the failure driver.
Another embodiment of the present application provides an electronic device including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the program to implement the method for driving invocation of the service of any of the above embodiments. As shown in fig. 8, the electronic device 10 of an embodiment may include: a processor 100, a memory 101, a bus 102 and a communication interface 103, the processor 100, the communication interface 103 and the memory 101 being connected by the bus 102; the memory 101 stores a computer program executable on the processor 100, and the processor 100 executes the method according to any of the foregoing embodiments of the present application when the computer program is executed.
The memory 101 may include a high-speed random access memory (RAM: random Access Memory), and may further include a non-volatile memory (non-volatile memory), such as at least one disk memory. The communication connection between the system network element and the at least one other network element is implemented via at least one communication interface 103 (which may be wired or wireless), the internet, a wide area network, a local network, a metropolitan area network, etc. may be used.
Bus 102 may be an ISA bus, a PCI bus, an EISA bus, or the like. The buses may be classified as address buses, data buses, control buses, etc. The memory 101 is configured to store a program, and the processor 100 executes the program after receiving an execution instruction, and the method disclosed in any of the foregoing embodiments of the present application may be applied to the processor 100 or implemented by the processor 100.
The processor 100 may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in the processor 100 or by instructions in the form of software. The processor 100 may be a general-purpose processor, and may include a central processing unit (Central Processing Unit, abbreviated as CPU), a network processor (Network Processor, abbreviated as NP), and the like; but may also be a Digital Signal Processor (DSP), application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The disclosed methods, steps, and logic blocks in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be embodied directly in the execution of a hardware decoding processor, or in the execution of a combination of hardware and software modules in a decoding processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in the memory 101, and the processor 100 reads the information in the memory 101 and, in combination with its hardware, performs the steps of the method described above.
The electronic device provided by the embodiment of the application and the method provided by the embodiment of the application have the same beneficial effects as the method adopted, operated or realized by the electronic device and the method provided by the embodiment of the application due to the same inventive concept.
Another embodiment of the present application provides a computer-readable storage medium having stored thereon a computer program that is executed by a processor to implement the method for driving invocation of a service according to any of the above embodiments. Examples of computer readable storage media may include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory, or other optical, magnetic storage media, which are not described in detail herein.
It should be noted that:
the term "module" is not intended to be limited to a particular physical form. Depending on the particular application, modules may be implemented as hardware, firmware, software, and/or combinations thereof. Furthermore, different modules may share common components or even be implemented by the same components. There may or may not be clear boundaries between different modules. In addition, the present application is not limited to any particular programming language, as the teachings of the present application described herein may be implemented in a variety of programming languages.
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited in order and may be performed in other orders, unless explicitly stated herein. Moreover, at least some of the steps in the flowcharts of the figures may include a plurality of sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, the order of their execution not necessarily being sequential, but may be performed in turn or alternately with other steps or at least a portion of the other steps or stages.
The foregoing examples merely illustrate embodiments of the application and are described in more detail and are not to be construed as limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.
Claims (9)
1. A method for driving and calling a service, comprising:
Setting the priority of each drive of the service according to a preset rule to obtain a default priority sequence; the service is a combination of a set of drivers;
Periodically detecting the real-time state of each drive in a first period, and marking each drive as online drive or offline drive according to the real-time state;
According to the default priority order, periodically setting the calling priority of each online drive in a second period to obtain an online drive calling priority order; wherein the second period is greater than or equal to the first period;
calling the online drive according to the order of calling the priority of the online drive;
before said periodically setting the call priority of each of said online drives in a second period according to said default priority order, said method further comprises:
periodically counting the offline times of each drive according to a third period, and marking the drive with the offline times exceeding a preset offline time threshold value in the last third period as a failure drive;
Setting that the failed drive does not accept real-time status detection within a first preset duration from when the failed drive is marked; wherein the third period is greater than or equal to the second period.
2. The drive calling method according to claim 1, characterized in that the drive calling method further comprises:
And counting the number of the current online drives in real time, and adjusting the period adopted for periodically detecting the real-time state of each drive according to the counted result.
3. The drive calling method according to claim 2, wherein the adjusting of the period employed to periodically detect the real-time status of each of the drives based on the statistical result includes:
Comparing the current number of the online drives in the statistical result with a preset number threshold;
If the current number of the online drives is smaller than the preset number threshold, and the current detection period of the real-time state of each drive is the first period, replacing the first period with a fourth period;
if the current number of the online drives is greater than the preset number threshold and the current detection period of the real-time state of each drive is the fourth period, replacing the fourth period with the first period; wherein the fourth period is less than the first period.
4. The drive calling method according to claim 3, characterized in that the drive calling method further comprises:
and when the real-time state of each drive is periodically detected in the fourth period, detecting the current real-time state of each off-line drive, and then detecting the current real-time state of each on-line drive.
5. The drive calling method according to claim 1, characterized in that the drive calling method further comprises:
Periodically counting the calling fault times of each driver, and marking the driver with the calling fault times exceeding a preset fault time threshold value in the latest counting period as a fault driver;
The faulty drive is set to not accept real-time status detection for a second preset time period from when the faulty drive is marked.
6. The drive invocation method of claim 5, wherein the method further comprises: and sending an early warning message containing the fault driving information.
7. A service driver invocation apparatus, comprising:
the first setting module is used for setting the priority of each drive of the service according to a preset rule to obtain a default priority sequence; the service is a combination of a set of drivers;
the detection marking module is used for periodically detecting the real-time state of each drive in a first period and marking each drive as online drive or offline drive according to the real-time state;
the second setting module is used for periodically setting the calling priority of each online driver according to the default priority order and obtaining the online driver calling priority order; wherein the second period is greater than or equal to the first period;
The calling module is used for calling the online drive according to the order of the priority of the online drive;
The first statistics marking module is used for periodically setting the calling priority of each online driver in a second period according to the default priority sequence by the second setting module, and periodically counting the offline times of each driver in a third period before the online driver calling priority sequence is obtained, and marking the driver with the offline times exceeding a preset offline times threshold value in the last third period as invalid driver; setting that the failed drive does not accept real-time status detection within a first preset duration from when the failed drive is marked; wherein the third period is greater than or equal to the second period.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor executing the program to implement the method of driver invocation of the service of any of claims 1-6.
9. A computer-readable storage medium having stored thereon a computer program, characterized in that the program is executed by a processor to implement the drive invocation method of a service as claimed in any one of claims 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110275067.6A CN113094158B (en) | 2021-03-15 | 2021-03-15 | Service drive calling method, calling device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110275067.6A CN113094158B (en) | 2021-03-15 | 2021-03-15 | Service drive calling method, calling device, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113094158A CN113094158A (en) | 2021-07-09 |
CN113094158B true CN113094158B (en) | 2024-07-02 |
Family
ID=76667208
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110275067.6A Active CN113094158B (en) | 2021-03-15 | 2021-03-15 | Service drive calling method, calling device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113094158B (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020133408A1 (en) * | 2018-12-29 | 2020-07-02 | 深圳市欢太科技有限公司 | Application program priority level adjustment method and apparatus, and storage medium and electronic device |
Family Cites Families (36)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US3409877A (en) * | 1964-11-27 | 1968-11-05 | Bell Telephone Labor Inc | Automatic maintenance arrangement for data processing systems |
US4538138A (en) * | 1982-12-17 | 1985-08-27 | American District Telegraph Company | Integrated security system having a multiprogrammed controller |
JPS6024647A (en) * | 1983-07-20 | 1985-02-07 | Hitachi Ltd | Autonomous resource managing system of system |
US5369767A (en) * | 1989-05-17 | 1994-11-29 | International Business Machines Corp. | Servicing interrupt requests in a data processing system without using the services of an operating system |
US5113522A (en) * | 1989-05-17 | 1992-05-12 | International Business Machines Corporation | Data processing system with system resource management for itself and for an associated alien processor |
CA2021826A1 (en) * | 1989-10-23 | 1991-04-24 | Darryl Edmond Judice | Delay logic for preventing cpu lockout from bus ownership |
GB8923874D0 (en) * | 1989-10-24 | 1989-12-13 | Ibm | Servicing interrupt requests in a data processing system without using the services of an operating system |
DE4417424A1 (en) * | 1994-05-18 | 1995-11-23 | Siemens Ag | Step drive control e.g for motor driven machine parts |
US5940610A (en) * | 1995-10-05 | 1999-08-17 | Brooktree Corporation | Using prioritized interrupt callback routines to process different types of multimedia information |
US7451447B1 (en) * | 1998-08-07 | 2008-11-11 | Arc International Ip, Inc. | Method, computer program and apparatus for operating system dynamic event management and task scheduling using function calls |
US6323882B1 (en) * | 1998-10-26 | 2001-11-27 | Simulation Sciences, Inc. | Method and systems for a graphical real time flow task scheduler |
US7103874B2 (en) * | 2003-10-23 | 2006-09-05 | Microsoft Corporation | Model-based management of computer systems and distributed applications |
US20050165881A1 (en) * | 2004-01-23 | 2005-07-28 | Pipelinefx, L.L.C. | Event-driven queuing system and method |
US8756605B2 (en) * | 2004-12-17 | 2014-06-17 | Oracle America, Inc. | Method and apparatus for scheduling multiple threads for execution in a shared microprocessor pipeline |
EP1724684A1 (en) * | 2005-05-17 | 2006-11-22 | BUSI Incubateur d'entreprises d'AUVEFGNE | System and method for task scheduling, signal analysis and remote sensor |
US9027027B2 (en) * | 2008-06-09 | 2015-05-05 | Microsoft Technology Licensing, Llc | Thread management based on device power state |
CN101441580B (en) * | 2008-12-09 | 2012-01-11 | 华北电网有限公司 | Distributed paralleling calculation platform system and calculation task allocating method thereof |
US10248996B2 (en) * | 2009-01-28 | 2019-04-02 | Headwater Research Llc | Method for operating a wireless end-user device mobile payment agent |
CN101499019B (en) * | 2009-03-24 | 2011-01-12 | 武汉烽火网络有限责任公司 | Carrier-grade Ethernet system and real-time task scheduling method used for the same |
CN101807159B (en) * | 2010-03-18 | 2013-01-02 | 西北工业大学 | Self-adapting task scheduling method |
WO2013048986A1 (en) * | 2011-09-26 | 2013-04-04 | Knoa Software, Inc. | Method, system and program product for allocation and/or prioritization of electronic resources |
CN103164269B (en) * | 2011-12-08 | 2017-05-03 | 中兴通讯股份有限公司 | Method and terminal achieving multi-window display of application programs |
CN103365708B (en) * | 2012-04-06 | 2017-03-22 | 阿里巴巴集团控股有限公司 | Method and device for scheduling tasks |
US10430391B2 (en) * | 2012-09-28 | 2019-10-01 | Oracle International Corporation | Techniques for activity tracking, data classification, and in database archiving |
US9826058B2 (en) * | 2013-02-27 | 2017-11-21 | Nec Corporation | Method for operating a network |
CN106339268B (en) * | 2016-09-12 | 2018-01-16 | 广东欧珀移动通信有限公司 | application control method and intelligent terminal |
CN107102894A (en) * | 2017-04-07 | 2017-08-29 | 百度在线网络技术(北京)有限公司 | Method for scheduling task, device and system |
US10514951B2 (en) * | 2017-05-04 | 2019-12-24 | Salesforce.Com, Inc. | Systems, methods, and apparatuses for implementing a stateless, deterministic scheduler and work discovery system with interruption recovery |
CN108632365B (en) * | 2018-04-13 | 2020-11-27 | 腾讯科技(深圳)有限公司 | Service resource adjusting method, related device and equipment |
CN110955501B (en) * | 2018-09-27 | 2024-06-14 | 北京京东尚科信息技术有限公司 | Service request processing method, device, electronic equipment and readable medium |
CN109347974B (en) * | 2018-11-16 | 2020-10-13 | 北京航空航天大学 | Hybrid scheduling system for improving online service quality and cluster resource utilization rate |
CN110324417B (en) * | 2019-06-29 | 2020-10-27 | 河南信大网御科技有限公司 | Cloud service execution body dynamic reconstruction method based on mimicry defense |
CN110554921B (en) * | 2019-08-30 | 2024-02-09 | 腾讯科技(深圳)有限公司 | Time slice distribution method, device, storage medium and computer equipment |
CN112130963A (en) * | 2020-09-30 | 2020-12-25 | 腾讯科技(深圳)有限公司 | Virtual machine task scheduling method and device, computer equipment and storage medium |
CN112199194B (en) * | 2020-10-14 | 2024-04-19 | 广州虎牙科技有限公司 | Resource scheduling method, device, equipment and storage medium based on container cluster |
CN112306939A (en) * | 2020-10-29 | 2021-02-02 | 山东云海国创云计算装备产业创新中心有限公司 | Bus calling method, device, equipment and storage medium |
-
2021
- 2021-03-15 CN CN202110275067.6A patent/CN113094158B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020133408A1 (en) * | 2018-12-29 | 2020-07-02 | 深圳市欢太科技有限公司 | Application program priority level adjustment method and apparatus, and storage medium and electronic device |
Also Published As
Publication number | Publication date |
---|---|
CN113094158A (en) | 2021-07-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8977905B2 (en) | Method and system for detecting abnormality of network processor | |
CN114138098B (en) | Power consumption adjusting method and device, storage device and readable storage medium | |
CN113220483A (en) | Switching method and system for block chain consensus main node | |
CN110806971A (en) | Version testing method and device and electronic equipment | |
CN113760658A (en) | Monitoring method, device and equipment | |
CN115168088A (en) | Method and device for repairing uncorrectable errors of memory | |
CN113094158B (en) | Service drive calling method, calling device, electronic equipment and storage medium | |
CN110647463B (en) | Method and device for restoring test breakpoint and electronic equipment | |
CN110855529B (en) | Network information security monitoring method, device, server and readable storage medium | |
WO2019148657A1 (en) | Method for testing associated environments, electronic device and computer readable storage medium | |
CN112825050A (en) | Method and system for accessing optical module register | |
CN115705261A (en) | Memory fault repairing method, CPU, OS, BIOS and server | |
CN111680293A (en) | Information monitoring management method and device based on Internet and server | |
CN112634964B (en) | Data writing method, device, equipment and storage medium of electronic control unit | |
CN112559565B (en) | Abnormality detection method, system and device | |
CN110740062B (en) | Breakpoint resume method and device | |
CN115543759A (en) | Log lookup method and device for operating system, electronic device and storage medium | |
CN115185724A (en) | Fault processing method, device, electronic equipment and storage medium | |
CN110096416B (en) | Abnormity warning method and device, computer device and readable storage medium | |
CN109726032B (en) | SSD exception handling method and device, computer equipment and storage medium | |
CN115002000B (en) | Fault tolerance method, device, equipment and storage medium for abnormal interface | |
CN116433197B (en) | Information reporting method, device, reporting end and storage medium | |
CN117041172B (en) | White box switch interface request processing method and device | |
CN117014393A (en) | Data forwarding method and data forwarding system | |
CN115929600A (en) | Method and device for controlling peristaltic pump to switch and electronic equipment |
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 |