CN114416116A - Multi-activity method and system for software unit deployment - Google Patents

Multi-activity method and system for software unit deployment Download PDF

Info

Publication number
CN114416116A
CN114416116A CN202210066083.9A CN202210066083A CN114416116A CN 114416116 A CN114416116 A CN 114416116A CN 202210066083 A CN202210066083 A CN 202210066083A CN 114416116 A CN114416116 A CN 114416116A
Authority
CN
China
Prior art keywords
processing unit
application program
task
timeliness
processed
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.)
Pending
Application number
CN202210066083.9A
Other languages
Chinese (zh)
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.)
Southern Power Grid Digital Grid Research Institute Co Ltd
Original Assignee
Southern Power Grid Digital Grid Research Institute 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 Southern Power Grid Digital Grid Research Institute Co Ltd filed Critical Southern Power Grid Digital Grid Research Institute Co Ltd
Priority to CN202210066083.9A priority Critical patent/CN114416116A/en
Publication of CN114416116A publication Critical patent/CN114416116A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the application provides a multi-activity method and a multi-activity system for software unit deployment, and belongs to the field of software design. The multi-activity method comprises the following steps: the method comprises the steps that a first processing unit obtains a request task, and determines the running state of a current application program which is used for executing the request task currently in the process of executing the request task; if the current application program is down, the first processing unit calls a target application program corresponding to the current application program from the second processing unit; under the condition that the target application program is called successfully, the first processing unit sends the subtasks processed by the current application program in the request task to the target application program; the second processing unit executes the subtasks through the target application program and sends the result of executing the subtasks to the first processing unit; the first processing unit receives the result of the subtask, and calls the corresponding application program to complete the unfinished subtask based on the remaining unfinished subtasks in the request task. The present application aims to improve resource utilization.

Description

Multi-activity method and system for software unit deployment
Technical Field
The embodiment of the application relates to the field of software design, in particular to a multi-activity method and a system for software unit deployment.
Background
The current common unit deployment scheme is used for deploying the distributed software system; the principle is that a plurality of applications supporting complete business logic form a unit, then a request is divided into a plurality of parts according to a certain rule, and each part is handled by a plurality of applications in the unit.
For example, one transaction unit is composed of five software systems, in the integrated software system, according to the region division request, all the transaction requests of the west-ampere region are processed by one transaction unit deployed in the west-ampere region, and all the transactions of the beijing region are processed by the other transaction unit deployed in the beijing region. In this way, even if a certain transaction unit fails, the influence degree is only one region corresponding to the certain transaction unit, and the user in the whole country cannot be influenced. The idea of the unit deployment is to divide and treat users of the service, and in general, in order to ensure high availability of one unit, the unit responsible for one data partition is deployed into another set in different regions, and when one unit is unavailable, the other unit is adopted to take over processing.
However, in actual use, if the application a in one of the units goes down, it may be determined that the unit is out of order, and then the request is handed over to another unit, which may result in low resource utilization.
Disclosure of Invention
The embodiment of the application provides a multi-activity method and a multi-activity system for software unit deployment, and aims to improve the resource utilization rate in a distributed system for software unit deployment.
In a first aspect, an embodiment of the present application provides a multi-activity method for software unit deployment, including: the method is applied to a first processing unit and a second processing unit which is in communication connection with the first processing unit, wherein the first processing unit comprises a database and a plurality of application programs, the second processing unit comprises a database and a plurality of application programs, the database of the first processing unit periodically synchronizes data to the database of the second processing unit, and the method comprises the following steps;
the first processing unit acquires a request task and determines the running state of a current application program currently used for executing the request task in the process of executing the request task;
if the current application program is down, the first processing unit calls a target application program corresponding to the current application program from the second processing unit;
under the condition that the target application program is successfully called, the first processing unit sends the subtasks processed by the current application program in the request task to the target application program;
the second processing unit executes the subtask through the target application program and sends a result of executing the subtask to the first processing unit;
and the first processing unit receives the result of the subtask, and calls a corresponding application program from the plurality of application programs based on the remaining uncompleted subtasks in the request task to complete the uncompleted subtasks.
Optionally, the first processing unit and the second processing unit are communicatively connected through a gateway, and the method further includes:
when the gateway transmits the subtask, writing a unit identifier for processing the first processing unit into the subtask;
sending a result of executing the subtask to the first processing unit, including:
and the second processing unit sends the result of the subtask to the first processing unit based on the unit identifier of the first processing unit.
Optionally, the second processing unit executes the subtasks through the target application, including:
and when the target application program processes the subtasks, calling related data from the database, and executing the subtasks based on the called data.
Optionally, the method further comprises the step of,
acquiring timeliness marks of a task to be processed, wherein the timeliness marks comprise strong timeliness marks and weak timeliness marks, and the timeliness marks are preset in the task to be processed;
judging the timeliness of the adjusting task based on the timeliness identification;
and distributing the task to be processed to a first processing unit or a second processing unit based on the timeliness of the task to be processed.
Optionally, the allocating the to-be-processed task to the first processing unit or the second processing unit based on the timeliness of the to-be-processed task includes:
if the timeliness of the task to be processed is the first timeliness, the task to be processed is distributed to a first processing unit;
and if the timeliness of the task to be processed is the second timeliness, distributing the task to be processed to the first processing unit and the second processing unit based on a fixed proportion value.
Optionally, the method further comprises the step of,
if all the application programs in the first processing unit are down, the first processing unit sends the request task to the second processing unit, the second processing unit processes the request task sent by the first processing unit, and the second processing unit calls the database of the first processing unit.
In a second aspect, a software unitized deployment multi-active system in an embodiment of the present application includes an operating state obtaining module, a calling module, a subtask sending module, a result returning module, a remaining task executing module, a timeliness allocating module, and an overall calling module;
the running state acquisition module is used for acquiring a request task at the first processing unit and determining the running state of a current application program currently used for executing the request task in the process of executing the request task;
the calling module is used for calling a target application program corresponding to the current application program from the second processing unit by the first processing unit when the current application program is down;
the subtask sending module is used for sending the subtask processed by the current application program in the request task to the target application program by the first processing unit under the condition that the target application program is called successfully;
a result returning module, configured to execute the subtask by the second processing unit through the target application program, and send a result of executing the subtask to the first processing unit;
the first processing unit receives the result of the subtask, and calls a corresponding application program from the plurality of application programs to complete the uncompleted subtask based on the remaining uncompleted subtask in the request task;
the timeliness allocation module is used for acquiring timeliness marks of the tasks to be processed, wherein the timeliness marks comprise strong timeliness marks and weak timeliness marks, and the timeliness marks are preset in the tasks to be processed; judging the timeliness of the adjusting task based on the timeliness identification; and distributing the task to be processed to a first processing unit or a second processing unit based on the timeliness of the task to be processed.
And the integral calling module is used for sending the request task of the first processing unit to the second processing unit, the second processing unit processes the request task sent by the first processing unit, and the second processing unit calls the database of the first processing unit.
Has the advantages that: according to the method, after the first processing unit acquires the request task, the running state of the current application program for executing the request task is determined, and if the running state of the current application program is in a problem, the first processing unit cannot process the request task; then the first processing unit calls a target application program corresponding to the current application program from the second processing unit, and sends the subtasks processed by the first processing unit to the target application program for processing, the target application program in the second processing unit returns the result obtained by processing the subtasks to the first processing unit, and the first processing unit can continue processing based on the result to complete the uncompleted subtasks to complete the request task; when a problem occurs in a current application program in a first processing unit, a request task is divided into a plurality of subtasks, and a target application program corresponding to the current application program in a second processing unit is called to process a part of subtasks, in the process of processing the request task, the first processing unit only calls a part of application programs in the second processing unit, and the application program which does not have the problem in the first processing unit does not run empty, so that the continuity of the request task is ensured, and the effect of improving the resource utilization rate in a distributed system deployed in a software unitization mode is achieved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments of the present application will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive exercise.
FIG. 1 is a flow chart illustrating steps of a multi-activity method according to an embodiment of the present application;
FIG. 2 is a schematic structural diagram of a distributed system of a unitized deployment proposed by an embodiment of the present application;
fig. 3 is a functional block diagram of a multi-active system according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Example one
Referring to fig. 1, a flowchart illustrating steps of a multi-activity method for software unit deployment in an embodiment of the present invention is shown, where, as shown in fig. 1, the multi-activity method is applied to a first processing unit and a second processing unit communicatively connected to the first processing unit, the first processing unit includes a database and a plurality of applications, the second processing unit includes a database and a plurality of applications, and the database of the first processing unit periodically synchronizes data to the database of the second processing unit;
the first processing unit and the second processing unit are distributed software systems, and a plurality of application programs in the first processing unit and the second processing unit are consistent, can complete the same processing logic, and have high availability; and the database of the second processing unit is regarded as a backup of the database of the first processing unit, and the database of the first processing unit synchronizes data to the database of the second processing unit periodically.
The multi-activity method may specifically include the following steps;
s101, the first processing unit acquires a request task and determines the running state of a current application program currently used for executing the request task in the process of executing the request task;
the first processing unit is a main processing unit in the distributed software system, under normal conditions, the request tasks are processed by the first processing unit, and the second processing unit is generally regarded as a standby processing unit in the distributed software system; when processing a request task, firstly, a first processing unit is considered to be adopted to process the request task; in the processing process, it is necessary to determine whether the application program in the first processing unit has a problem when executing the request task, and if the running state of the current application program in the first processing unit for executing the request task has a problem, further processing is necessary.
S102, if the current application program is down, the first processing unit calls a target application program corresponding to the current application program from the second processing unit;
through the application state obtained in step S101, if the current application program is down, the first processing unit cannot continue to execute the request task, and in order to complete the request task, the target application program corresponding to the current application program in the second processing unit needs to be called for processing.
S103, under the condition that the target application program is successfully called, the first processing unit sends the subtasks processed by the current application program in the request task to the target application program;
by dividing the request task into a plurality of subtasks, when the target application program in the second processing unit is called to process the request task, the whole request task does not need to be transferred to the second processing unit, but only the subtask which is in the process of being executed by the current application program and has a problem in the first processing unit needs to be sent to the target application program in the second processing unit.
S104, the second processing unit executes the subtasks through the target application program and sends the result of executing the subtasks to the first processing unit;
and after receiving the subtasks which cannot be processed in the first processing unit, the second processing program calls the target application program to execute the subtasks, only calls the target application program corresponding to the subtasks in the second processing unit in the process of executing the subtasks, and simultaneously connects the database of the first processing unit with the target application program to call corresponding data so as to prevent no data call caused by data synchronization delay.
S105, the first processing unit receives the result of the subtasks, and calls corresponding application programs from the plurality of application programs based on the remaining uncompleted subtasks in the request task to complete the uncompleted subtasks.
After the second processing unit calls the target application program to complete the subtasks, the first processing unit can call the corresponding application program from the plurality of application programs to continue to complete the unfinished subtasks in the request task through the received result of the subtasks so as to complete the processing of the request task.
In this embodiment, after the first processing unit obtains the request task, the running state of the current application program for executing the request task is determined first, and if the running state of the current application program is in a problem, the first processing unit cannot process the request task; then the first processing unit calls a target application program corresponding to the current application program from the second processing unit, and sends the subtasks processed by the first processing unit to the target application program for processing, the target application program in the second processing unit returns the result obtained by processing the subtasks to the first processing unit, and the first processing unit can continue processing based on the result to complete the uncompleted subtasks to complete the request task; when the current application program in the first processing unit has a problem, the request task is divided into a plurality of subtasks, and a target application program corresponding to the current application program in the second processing unit is called to process a part of subtasks.
In the process of processing the request task, the first processing unit only calls part of the application programs in the second processing unit, and the application programs which have no problem in the first processing unit do not run empty, so that the continuity of the request task is ensured, and the effect of improving the resource utilization rate in the software unit-based deployed distributed system is achieved.
Example two
The embodiment provides a multi-activity method for software unit deployment, which is applied to a distributed software system for software unit deployment.
Software unitization deployment is a high-availability scheme of a commonly used distributed software system at present, and the principle of the software unitization deployment is that a plurality of application programs supporting complete business logic form a unit, then a request task is divided into a plurality of parts according to a certain rule, and each part is handled by one unit.
For example, if a trading system includes a plurality of trading units, each trading unit is composed of five application programs; when the transaction system is deployed in a unitized mode, dividing according to regions; all transaction request tasks of the Xian area are handed to one transaction unit deployed in the Xian area for processing, and all transactions of the Beijing area are processed by the other unit deployed in the background area. In this way, even if a certain unit fails, the influence degree is only one region corresponding to the unit, and the user in the whole country cannot be influenced.
As shown in fig. 2, fig. 2 illustrates a structure of a distributed system deployed by software unitization according to an embodiment of the present application; the system comprises a first processing unit, a second processing unit and a gateway; the first processing unit and the second processing unit are in communication connection through a gateway, the first processing unit comprises a database, an application program A, an application program B, an application program C and an application program D, the second processing unit also comprises a database, an application program A, an application program B, an application program C and an application program D, the first processing unit and the second processing unit are consistent in structure, and the combined request tasks of the application program A, the application program B, the application program C and the application program D can be consistent; however, the first processing unit and the second processing unit are deployed in different regions, and the processing request tasks are different during the use process, so that the data in the databases of the first processing unit and the second processing unit are different. The gateway is used in the system to complete communication, access and distribute the request tasks.
Referring to fig. 1, a flowchart illustrating steps of a multi-activity method for software unit deployment according to an embodiment of the present application is shown, and as shown in fig. 1, the multi-activity method may specifically include the following steps:
s101, the first processing unit acquires a request task and determines the running state of a current application program currently used for executing the request task in the process of executing the request task;
when the request task is obtained, the request task firstly enters the system through the gateway and then enters the distribution through the gateway; after the first processing unit receives the task, the first processing unit processes the request task through an application program A, an application program B, an application program C and an application program D in the first processing unit, in the processing process, the running states of a plurality of application programs in the first processing unit in the processing process need to be continuously determined, and in the determining process, the state of the application program needs to be determined according to where the request task is processed.
S102, if the current application program is down, the first processing unit calls a target application program corresponding to the current application program from the second processing unit;
if the request task is processed in the application program B, the application program B is the current application program; if the application program B can be determined to be down through the step S101, the down of the application program B may cause that the requested task cannot be completed only by the first processing unit, and at this time, the application program B in the second processing unit needs to be called to process the requested task; the application program B in the second processing unit corresponds to the application program B in the first processing unit, and in the process of processing the request task, the work that the application program B in the first processing unit and the application program B in the second processing unit can complete is the same, and at this time, the application program B in the second processing unit is the target application program.
S103, under the condition that the target application program is successfully called, the first processing unit sends the subtasks processed by the current application program in the request task to the target application program;
in the first processing unit, dividing the request task into a plurality of sub-tasks for processing, and when an application program B in the first processing unit is down, the first processing unit calls the application program B in the second processing unit to process the sub-tasks; when the application program B is called, the first processing unit directly sends the subtask which is being processed by the application program B in the first processing unit to the second processing unit, and the subtask is processed by the target application program in the second processing unit.
S104, the second processing unit executes the subtasks through the target application program and sends the result of executing the subtasks to the first processing unit;
and after the second processing unit receives the subtasks sent by the first processing unit, the second processing unit executes the subtasks through the target application program in the second processing unit, and sends the execution result to the first processing unit after the execution is finished.
And when the target application program processes the subtasks, related data are called from the database, and the subtasks are executed based on the called data.
The subtask processed by the second processing unit is separated from the request task processed by the first processing unit, and at this time, the second processing unit does not have data for processing the request task, and at this time, the second processing unit needs to be connected to the database of the first processing unit, and the gateway calls the relevant data in the first processing unit to complete the execution of the subtask.
S105, the first processing unit receives the result of the subtasks, and calls corresponding application programs from the plurality of application programs based on the remaining uncompleted subtasks in the request task to complete the uncompleted subtasks.
In the whole process of processing the request task, because only the application program B in the first processing unit is down, other application programs may be still in a live state at this time, and after the result of calling the application program in the second processing unit to process the sub-task is obtained through the above scheme, the application program in the first processing unit that is still in the live state can continue to process the request task following the result of calling the application program in the second processing unit to process the sub-task; the application programs in the first processing unit which are still in the survival state can not be wasted, and therefore the resource utilization rate of the distributed system deployed in the software unitization mode is improved.
In this implementation, the multi-activity method further comprises:
when the gateway transmits the subtask, writing a unit identifier for processing the first processing unit into the subtask;
sending a result of executing the subtask to the first processing unit, including:
and the second processing unit sends the result of the subtask to the first processing unit based on the unit identifier of the first processing unit.
By writing the unit identifier of the first processing unit into the subtask, the application program in the second processing unit can determine the source of the subtask when processing the subtask, determine that the requested task that is separated from the subtask is processed in the first processing unit, and return the result generated by processing the subtask to the first processing unit.
Acquiring timeliness marks of a task to be processed, wherein the timeliness marks comprise strong timeliness marks and weak timeliness marks, and the timeliness marks are preset in the task to be processed;
in this embodiment, the task to be processed is a request task; in a distributed system deployed in software unitization, because the required data of each task to be processed is different, the data in the first processing unit is updated more than the data in the second processing unit most of the time; therefore, when the timeliness identification of the tasks to be processed is preset, the timeliness of each task to be processed is set.
Judging the timeliness of the adjusting task based on the timeliness identification;
the timeliness of the tasks to be processed is divided into two types, the first type is the task to be processed with extremely strong timeliness, and the task to be processed can be processed only when updated data is needed, and is preset as the first timeliness; the second is a task to be processed with a low timeliness, and data that is a little bit behind can be processed compared with the first. But as long as the database update frequency between the first processing unit and the second processing unit is high, the data difference between the databases of the first processing unit and the second processing unit is not too large, and even the second processing unit can process most of the tasks to be processed.
Distributing the task to be processed to a first processing unit or a second processing unit based on the timeliness of the task to be processed; the method comprises the following steps:
if the timeliness of the task to be processed is the first timeliness, the task to be processed is distributed to a first processing unit;
and if the timeliness of the task to be processed is the second timeliness, distributing the task to be processed to the first processing unit and the second processing unit based on a fixed proportion value.
The first timeliness is a task to be processed with extremely strong timeliness in the embodiment, corresponds to a strong timeliness identifier, and needs to be processed in a shorter time; the first processing unit is preset as a processing unit with stronger processing capacity in the embodiment, and can process more request tasks in shorter time compared with the second processing unit; the second timeliness corresponds to the weak timeliness identification, and the processing time is longer; the first time-efficient tasks to be processed are all allocated to the first processing unit and the second time-efficient tasks to be processed are allocated to the second processing unit.
The fixed proportion value can be a proportion preset by maintenance personnel and is judged according to actual conditions; for example, if the first timeliness task to be processed is less in the area where the first processing unit is deployed within a period of time, the fixed proportion value is set to be larger, and the second timeliness task is allocated to the first processing unit and the second processing unit for processing according to the fixed proportion value of 2: 1; if the first timeliness tasks to be processed are more in the area where the first processing unit is deployed within a period of time, the fixed proportion value is set to be smaller, and the second timeliness tasks are distributed to the first processing unit and the second processing unit according to the fixed proportion value of 1: 2; by performing allocation in this manner, the computational resources in the first processing unit can be utilized to the maximum extent, and the resource utilization rate can be improved.
The multi-activity method further includes that if all the applications in the first processing unit are down, the first processing unit sends the request task to the second processing unit, the second processing unit processes the request task sent by the first processing unit, and the second processing unit calls the database of the first processing unit.
When all the application programs in the first processing unit are down, and the first processing unit cannot process the request tasks distributed to the first processing unit at the moment, the request tasks are wholly transferred to the second processing unit for processing, and the processing of the request tasks cannot be influenced.
If the database of the first processing unit cannot be used at the same time, the second processing unit calls the database of the second processing unit to execute the query operation, and because the database of the second processing unit is used as the backup database of the first processing unit and the content of the database is backward than that of the database of the first processing unit, the adding, deleting and changing operations are prohibited from being executed.
In this embodiment, after the first processing unit obtains the request task, the running state of the current application program for executing the request task is determined first, and if the running state of the current application program is in a problem, the first processing unit cannot process the request task; then the first processing unit calls a target application program corresponding to the current application program from the second processing unit, and sends the subtasks processed by the first processing unit to the target application program for processing, the target application program in the second processing unit returns the result obtained by processing the subtasks to the first processing unit, and the first processing unit can continue processing based on the result to complete the uncompleted subtasks to complete the request task; when the current application program in the first processing unit has a problem, the request task is divided into a plurality of subtasks, and a target application program corresponding to the current application program in the second processing unit is called to process a part of subtasks.
In the process of processing the request task, the first processing unit only calls part of the application programs in the second processing unit, and the application programs which have no problem in the first processing unit do not run empty, so that the continuity of the request task is ensured, and the effect of improving the resource utilization rate in the software unit-based deployed distributed system is achieved.
EXAMPLE III
Based on the same inventive concept, fig. 3 is a schematic diagram of a multi-active system deployed by software unitization, and referring to fig. 3, the multi-active system may include:
the system comprises a running state acquisition module, a calling module, a subtask sending module, a result returning module, a residual task execution module, a timeliness distribution module and an overall calling module;
the running state acquisition module is used for acquiring a request task at the first processing unit and determining the running state of a current application program currently used for executing the request task in the process of executing the request task;
the calling module is used for calling a target application program corresponding to the current application program from the second processing unit by the first processing unit when the current application program is down;
the subtask sending module is used for sending the subtask processed by the current application program in the request task to the target application program by the first processing unit under the condition that the target application program is called successfully;
a result returning module, configured to execute the subtask by the second processing unit through the target application program, and send a result of executing the subtask to the first processing unit;
the first processing unit receives the result of the subtask, and calls a corresponding application program from the plurality of application programs to complete the uncompleted subtask based on the remaining uncompleted subtask in the request task;
the timeliness allocation module is used for acquiring timeliness marks of the tasks to be processed, wherein the timeliness marks comprise strong timeliness marks and weak timeliness marks, and the timeliness marks are preset in the tasks to be processed; judging the timeliness of the adjusting task based on the timeliness identification; and distributing the task to be processed to a first processing unit or a second processing unit based on the timeliness of the task to be processed.
And if all the application programs in the first processing unit are down, the first processing unit sends the request task to the second processing unit, the second processing unit processes the request task sent by the first processing unit, and the second processing unit calls the database of the first processing unit.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one of skill in the art, embodiments of the present application may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present application have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including the preferred embodiment and all such alterations and modifications as fall within the true scope of the embodiments of the application.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The principle and the implementation of the present application are explained herein by applying specific examples, and the above description of the embodiments is only used to help understand the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (7)

1. A multi-live method of software unitization deployment applied to a first processing unit and a second processing unit communicatively connected to the first processing unit, the first processing unit including a database and a number of applications, the second processing unit including a database and a number of applications, the database of the first processing unit periodically synchronizing data to the database of the second processing unit, the method comprising;
the first processing unit acquires a request task and determines the running state of a current application program currently used for executing the request task in the process of executing the request task;
if the current application program is down, the first processing unit calls a target application program corresponding to the current application program from the second processing unit;
under the condition that the target application program is successfully called, the first processing unit sends the subtasks processed by the current application program in the request task to the target application program;
the second processing unit executes the subtask through the target application program and sends a result of executing the subtask to the first processing unit;
and the first processing unit receives the result of the subtask, and calls a corresponding application program from the plurality of application programs based on the remaining uncompleted subtasks in the request task to complete the uncompleted subtasks.
2. The multi-active method of claim 1, wherein the first processing unit and the second processing unit are communicatively coupled via a gateway, the method further comprising:
when the gateway transmits the subtask, writing a unit identifier for processing the first processing unit into the subtask;
sending a result of executing the subtask to the first processing unit, including:
and the second processing unit sends the result of the subtask to the first processing unit based on the unit identifier of the first processing unit.
3. A multi-live method according to any one of claims 1-2, wherein the second processing unit executes the sub-tasks by the target application, comprising:
and when the target application program processes the subtasks, calling related data from the database, and executing the subtasks based on the called data.
4. A multi-activity method according to claim 3, further comprising,
acquiring timeliness marks of a task to be processed, wherein the timeliness marks comprise strong timeliness marks and weak timeliness marks, and the timeliness marks are preset in the task to be processed;
judging the timeliness of the adjusting task based on the timeliness identification;
and distributing the task to be processed to a first processing unit or a second processing unit based on the timeliness of the task to be processed.
5. The multi-activity method as claimed in claim 4, wherein the assigning the task to be processed to the first processing unit or the second processing unit based on the timeliness of the task to be processed comprises:
if the timeliness of the task to be processed is the first timeliness, the task to be processed is distributed to a first processing unit;
and if the timeliness of the task to be processed is the second timeliness, distributing the task to be processed to the first processing unit and the second processing unit based on a fixed proportion value.
6. A multi-activity method according to claim 1, further comprising,
if all the application programs in the first processing unit are down, the first processing unit sends the request task to the second processing unit, the second processing unit processes the request task sent by the first processing unit, and the second processing unit calls the database of the first processing unit.
7. A software unit deployed multi-active system is characterized by comprising a running state acquisition module, a calling module, a subtask sending module, a result returning module, a residual task execution module, a timeliness distribution module and an overall calling module;
the running state acquisition module is used for acquiring a request task at the first processing unit and determining the running state of a current application program currently used for executing the request task in the process of executing the request task;
the calling module is used for calling a target application program corresponding to the current application program from the second processing unit by the first processing unit when the current application program is down;
the subtask sending module is used for sending the subtask processed by the current application program in the request task to the target application program by the first processing unit under the condition that the target application program is called successfully;
a result returning module, configured to execute the subtask by the second processing unit through the target application program, and send a result of executing the subtask to the first processing unit;
the first processing unit receives the result of the subtask, and calls a corresponding application program from the plurality of application programs to complete the uncompleted subtask based on the remaining uncompleted subtask in the request task;
the timeliness allocation module is used for acquiring timeliness marks of the tasks to be processed, wherein the timeliness marks comprise strong timeliness marks and weak timeliness marks, and the timeliness marks are preset in the tasks to be processed; judging the timeliness of the adjusting task based on the timeliness identification; and distributing the task to be processed to a first processing unit or a second processing unit based on the timeliness of the task to be processed.
And the integral calling module is used for sending the request task of the first processing unit to the second processing unit, the second processing unit processes the request task sent by the first processing unit, and the second processing unit calls the database of the first processing unit.
CN202210066083.9A 2022-01-20 2022-01-20 Multi-activity method and system for software unit deployment Pending CN114416116A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210066083.9A CN114416116A (en) 2022-01-20 2022-01-20 Multi-activity method and system for software unit deployment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210066083.9A CN114416116A (en) 2022-01-20 2022-01-20 Multi-activity method and system for software unit deployment

Publications (1)

Publication Number Publication Date
CN114416116A true CN114416116A (en) 2022-04-29

Family

ID=81275366

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210066083.9A Pending CN114416116A (en) 2022-01-20 2022-01-20 Multi-activity method and system for software unit deployment

Country Status (1)

Country Link
CN (1) CN114416116A (en)

Similar Documents

Publication Publication Date Title
CN107360206B (en) Block chain consensus method, equipment and system
CN110647394B (en) Resource allocation method, device and equipment
CN110096336B (en) Data monitoring method, device, equipment and medium
CN108462656B (en) Container-based resource scheduling method and device for service convergence deployment
CN108881512B (en) CTDB virtual IP balance distribution method, device, equipment and medium
CN110389843B (en) Service scheduling method, device, equipment and readable storage medium
CN109525410B (en) Distributed storage system upgrading management method and device and distributed storage system
CN103810045A (en) Resource allocation method, resource manager, resource server and system
CN107168777B (en) Method and device for scheduling resources in distributed system
CN110750343B (en) Cluster system timing task scheduling control method and cluster system
US20230037293A1 (en) Systems and methods of hybrid centralized distributive scheduling on shared physical hosts
CN114625500A (en) Method and application for scheduling micro-service application based on topology perception in cloud environment
CN107025257B (en) Transaction processing method and device
CN114489985A (en) Data processing method, device and storage medium
CN111240824A (en) CPU resource scheduling method and electronic equipment
CN112866025B (en) Intelligent contract fragmentation processing method
CN110113217B (en) Micro-service management method, device, management platform and storage medium
KR19990043986A (en) Business take over system
CN112631756A (en) Distributed regulation and control method and device applied to space flight measurement and control software
CN110933196B (en) ID distribution method, system and storage medium for global uniform framework
CN111143063B (en) Task resource reservation method and device
CN116954863A (en) Database scheduling method, device, equipment and storage medium
CN114416116A (en) Multi-activity method and system for software unit deployment
KR102124897B1 (en) Distributed Messaging System and Method for Dynamic Partitioning in Distributed Messaging System
CN115438021A (en) Resource allocation method and device for database server

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
CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Chen Qiang

Inventor after: Yang Yang

Inventor after: Ao Zhiqi

Inventor after: Jiang Wei

Inventor after: Kang Yi

Inventor after: Liang Zijian

Inventor after: Liu Mingwei

Inventor after: Liu Zhuqing

Inventor after: Wang Jinhe

Inventor after: Zhang Lingzhi

Inventor before: Ao Zhiqi

Inventor before: Jiang Wei

Inventor before: Kang Yi

Inventor before: Liang Zijian

Inventor before: Liu Mingwei

Inventor before: Liu Zhuqing

Inventor before: Wang Jinhe

Inventor before: Zhang Lingzhi