CN114500571A - Task synchronization method and device, computer equipment and storage medium - Google Patents

Task synchronization method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN114500571A
CN114500571A CN202210140484.4A CN202210140484A CN114500571A CN 114500571 A CN114500571 A CN 114500571A CN 202210140484 A CN202210140484 A CN 202210140484A CN 114500571 A CN114500571 A CN 114500571A
Authority
CN
China
Prior art keywords
task
target
parent
center
state
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
CN202210140484.4A
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.)
Kelai Network Technology Co ltd
Original Assignee
Kelai Network Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kelai Network Technology Co ltd filed Critical Kelai Network Technology Co ltd
Priority to CN202210140484.4A priority Critical patent/CN114500571A/en
Publication of CN114500571A publication Critical patent/CN114500571A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions

Abstract

The application provides a task synchronization method, a task synchronization device, computer equipment and a storage medium, and relates to the technical field of communication. The method comprises the following steps: the sub-level audit center sends a task obtaining instruction to the parent-level audit center, so that the parent-level audit center obtains task data of a target task from a task record to be synchronized according to the task obtaining instruction, receives the task data of the target task sent by the parent-level audit center, executes the target task according to the task data, obtains a task state of the target task, and returns a task updating request to the parent-level audit center, wherein the task updating request comprises: and the task state of the target task is set to enable the parent audit center to update the state of the target task to be a synchronized state according to the task state of the target task. The method and the device can improve the network communication performance and the task distribution efficiency.

Description

Task synchronization method and device, computer equipment and storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a task synchronization method and apparatus, a computer device, and a storage medium.
Background
In the field of security audit, a plurality of sub-level audit centers are usually arranged under a parent level audit center, and the parent level audit center distributes audit tasks to the sub-level audit centers so as to improve the audit efficiency.
The existing modes of sending the audit task from the parent-level audit center to the child-level audit center are divided into active polling blocking distribution and active polling asynchronous distribution.
The active polling blocking distribution and the active polling asynchronous distribution are both tasks actively distributed to the sub-level audit centers by the parent-level audit centers, but the active polling blocking distribution needs to wait for the completion of the distribution of one sub-level audit center before distributing the tasks to the next sub-level audit center, and the mode can block network channels and has slow distribution efficiency; the active polling asynchronous distribution solves the problem of active polling blocking distribution by directly distributing tasks to a plurality of sub-level auditing centers at the same time, but after a parent auditing center distributes the tasks to the plurality of sub-level auditing centers, a transmission channel between the parent auditing center and the sub-level auditing centers must be maintained to obtain the task state of the sub-level auditing centers, and when the number of the sub-level auditing centers is large, the network communication performance is sharply reduced.
Disclosure of Invention
The present invention is directed to provide a task synchronization method, device, computer device and storage medium, so as to improve network communication performance and task distribution efficiency.
In order to achieve the above purpose, the technical solutions adopted in the embodiments of the present application are as follows:
in a first aspect, an embodiment of the present application provides a task synchronization method, which is applied to a sub-level audit center in a security audit system, where the security audit system further includes a parent level audit center in communication connection with the sub-level audit center, and the method includes:
sending a task obtaining instruction to the parent audit center so that the parent audit center obtains task data of a target task from a task record to be synchronized according to the task obtaining instruction;
receiving task data of the target task sent by the parent audit center;
executing the target task according to the task data to obtain a task state of the target task;
returning a task updating request to the parent-level auditing center, wherein the task updating request comprises: and the task state of the target task enables the parent-level audit center to update the state of the target task to be a synchronized state according to the task state of the target task.
Optionally, the executing the target task according to the task data to obtain the task state of the target task includes:
performing local persistent storage on the task data;
and executing the target task through asynchronous triggering.
Optionally, the executing the target task by asynchronous triggering includes:
and after monitoring the completion event of the local persistent storage, notifying a logic code for asynchronously triggering the execution task, and asynchronously executing the target task.
Optionally, the method further includes:
and updating the state of the target task to be an executed state according to the task state of the target task.
In a second aspect, an embodiment of the present application further provides a task synchronization method, which is applied to a parent audit center in a security audit system, where the security audit system further includes a child audit center in communication connection with the parent audit center, and the method includes:
receiving a task acquisition instruction sent by the sub-level audit center;
acquiring task data of a target task from a task record to be synchronized according to the task acquisition instruction;
sending task data of the target task to the sub-level auditing center;
receiving a task updating request returned by the sub-level auditing center;
and updating the state of the target task to be a synchronized state according to the task state of the target task.
Optionally, the task obtaining instruction includes: the task type obtaining task data of the target task from the task record to be synchronized according to the task obtaining instruction comprises the following steps:
and acquiring task data of the target task from the task record to be synchronized according to the task type.
In a third aspect, an embodiment of the present application further provides a task synchronization apparatus, which is applied to a sub-level audit center in a security audit system, where the security audit system further includes a parent level audit center in communication connection with the sub-level audit center, and the apparatus includes:
the instruction sending module is used for sending a task obtaining instruction to the parent audit center so that the parent audit center obtains task data of a target task from a task record to be synchronized according to the task obtaining instruction;
the task data receiving module is used for receiving the task data of the target task sent by the parent audit center;
the task execution module is used for executing the target task according to the task data to obtain a task state of the target task;
an update request sending module, configured to return a task update request to the parent audit center, where the task update request includes: and the task state of the target task enables the parent-level audit center to update the state of the target task to be a synchronized state according to the task state of the target task.
Optionally, the task execution module includes:
the task data storage unit is used for performing local persistent storage on the task data;
and the task execution unit is used for executing the target task through asynchronous triggering.
Optionally, the task execution unit is specifically configured to notify the logic code that asynchronously triggers execution of the task after monitoring the completion event of the local persistent storage, and asynchronously execute the target task.
Optionally, the apparatus further comprises:
and the completion state updating module is used for updating the state of the target task into an executed completion state according to the task state of the target task.
In a fourth aspect, an embodiment of the present application further provides a task synchronization apparatus, which is applied to a parent audit center in a security audit system, the security audit system further includes a child audit center in communication connection with the parent audit center, and the apparatus includes:
the instruction receiving module is used for receiving a task obtaining instruction sent by the sub-level auditing center;
the task data acquisition module is used for acquiring task data of a target task from a task record to be synchronized according to the task acquisition instruction;
the task data sending module is used for sending the task data of the target task to the sub-level auditing center;
the updating request receiving module is used for receiving a task updating request returned by the sub-level auditing center;
and the task state updating module is used for updating the state of the target task to be a synchronized state according to the task state of the target task.
Optionally, the task obtaining instruction includes: and the task data acquisition module is specifically used for acquiring task data of a target task from a task record to be synchronized according to the task type.
In a fifth aspect, an embodiment of the present application further provides a computer device, including: a processor, a storage medium and a bus, wherein the storage medium stores program instructions executable by the processor, when the computer device runs, the processor communicates with the storage medium through the bus, and the processor executes the program instructions to execute the steps of the task synchronization method according to any one of the above embodiments.
In a sixth aspect, the present application further provides a computer-readable storage medium, where a computer program is stored on the storage medium, and the computer program is executed by a processor to perform the steps of the task synchronization method according to any of the foregoing embodiments.
The beneficial effect of this application is:
the application provides a task synchronization method, a device, computer equipment and a storage medium, wherein a sub-level audit center sends a task acquisition instruction to a parent-level audit center, so that the parent-level audit center acquires task data of a target task from a task record to be synchronized according to the task acquisition instruction, receives the task data of the target task sent by the parent-level audit center, executes the target task according to the task data, obtains a task state of the target task, and returns a task update request to the parent-level audit center, wherein the task update request comprises: and the task state of the target task is set to enable the parent audit center to update the state of the target task to be a synchronized state according to the task state of the target task. According to the method and the device, the sub-level audit center actively sends the task obtaining instruction, the parent-level audit center passively distributes the tasks, network channel blocking is avoided, task distribution efficiency is improved, the sub-level audit center actively reports the task state of the target task to the parent-level audit center, the parent-level audit center is prevented from keeping a transmission channel for a long time, and network communication performance is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a schematic flowchart of a task synchronization method according to an embodiment of the present application;
fig. 2 is a schematic flowchart of another task synchronization method provided in an embodiment of the present application;
fig. 3 is a schematic flowchart of another task synchronization method provided in an embodiment of the present application;
fig. 4 is an interaction diagram of a task synchronization method according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a task synchronization apparatus according to an embodiment of the present application;
FIG. 6 is a schematic structural diagram of another task synchronization apparatus according to an embodiment of the present disclosure;
fig. 7 is a schematic diagram of a computer device provided in an embodiment of the present application.
Detailed Description
The drawings in the embodiments clearly and completely describe the technical solutions in the embodiments of the present invention, and obviously, the described embodiments are a part of the embodiments of the present invention, but not all of the embodiments.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. 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 invention.
In the description of the present invention, it should be noted that the terms "first", "second", and the like in the description and in the claims, and in the drawings described above, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Moreover, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that the features of the embodiments of the present invention may be combined with each other without conflict.
Before explaining the task synchronization method provided by the present application in detail, a security audit system applied by the present application is explained.
The security audit system that this application embodiment provided includes: the system comprises a main center, a parent-level audit center and a child-level audit center, wherein the main center, the parent-level audit center and the child-level audit center are positioned in different computer equipment, the main center is in communication connection with the parent-level audit center to send a task to be synchronized to the parent-level audit center, the parent-level audit center generates a task record to be synchronized according to the received task to be synchronized, and the parent-level audit center is also in communication connection with the child-level audit center to send a task acquisition instruction to the parent-level audit center, so that the parent-level audit center acquires task data of a target task from the task record to be synchronized according to the task acquisition instruction and sends the task data to the child-level audit center.
Based on the security audit system, the embodiment of the application provides a task synchronization method applied to a sub-level audit system in the security audit system. Referring to fig. 1, a schematic flowchart of a task synchronization method according to an embodiment of the present application is shown in fig. 1, where the method includes:
s11: and sending a task acquisition instruction to the parent audit center so that the parent audit center acquires the task data of the target task from the task record to be synchronized according to the task acquisition instruction.
In this embodiment, the child audit center establishes a communication connection with the parent audit center, for example, the child audit center may be TCP (Transmission Control Protocol) long connection network communication, and the child audit center actively sends a task obtaining instruction to the parent audit center, where the task obtaining instruction includes a unique identifier of the child audit center, so that the parent audit center obtains task data of a target task matched with the task obtaining instruction from a task record to be synchronized according to the task obtaining instruction. For example, a task acquisition instruction can be sent to the parent audit center at regular time through a timing task triggered by a timer Spring Scheduler in the child audit center.
In an optional implementation manner, the parent-level audit center acquires the task data of the target task from the task record to be synchronized according to a preset rule according to the task acquisition instruction. For example, if the preset rule is that the task data of all tasks in the to-be-synchronized task record is sent to the sub-level audit center, the task data of the target task is the task data of all tasks; and if the preset rule is that the task data of the plurality of tasks received earliest are sent to the sub-level audit center according to the task receiving time in the task record to be synchronized, the task data of the target task is the task data of the plurality of tasks received earliest.
In another optional implementation manner, the task obtaining instruction further includes a task type, and the parent-level audit center obtains task data of a target task corresponding to the task type from the task record to be synchronized according to the task type in the task obtaining instruction.
S12: and receiving task data of the target task sent by the parent level audit center.
In this embodiment, after receiving the task obtaining instruction sent by the multiple child audit centers, the parent audit center sends the obtained task data of the target task to the child audit center corresponding to the unique identifier according to the unique identifier of the child audit center, so that the corresponding child audit center receives the task data of the target task sent by the parent audit center.
S13: and executing the target task according to the task data to obtain the task state of the target task.
In this embodiment, after receiving task data of a target task, a sub-level audit center executes the target task according to the task data to obtain a task state of the target task, where the task state of the target task is: the target task has started to execute.
S14: returning a task updating request to the parent level audit center, wherein the task updating request comprises: and the task state of the target task is set to enable the parent audit center to update the state of the target task to be a synchronized state according to the task state of the target task.
In this embodiment, after the sub-level audit center starts to execute the target task, the sub-level audit center returns a task update request to the parent audit center, where the task update request includes: and the task state of the target task is that the target task is started to be executed, the parent audit center determines that the child audit center starts to execute the target task according to the task state of the target task, updates the state of the target task to be in a synchronized state, and deletes task data of the target task from the task record to be synchronized. In an example, task data of a target task sent by a parent audit center has a unique primary key, the primary key remains unchanged in the process of sending the task data of the target task and in the process of executing the target task, and a task update request sent by a child audit center has the primary key, so that the parent audit center updates the state of the target task to a synchronized state according to the primary key.
In an alternative embodiment, the method further comprises:
and updating the state of the target task to be an executed state according to the task state of the target task.
In this embodiment, after the sub-level audit center executes the target task, the task state of the target task is acquired as the completed state by a callback method (StatusCallBack), and the state of the target task is updated to the executed state. And after the sub-level audit center determines that the target task is completed, the sub-level audit center can start to execute the next target task.
In the task synchronization method provided by the embodiment of the application, the sub-level audit center sends a task obtaining instruction to the parent-level audit center, so that the parent-level audit center obtains task data of a target task from a to-be-synchronized task record according to the task obtaining instruction, receives the task data of the target task sent by the parent-level audit center, executes the target task according to the task data, obtains a task state of the target task, and returns a task update request to the parent-level audit center, wherein the task update request includes: and the task state of the target task is set to enable the parent audit center to update the state of the target task to be a synchronized state according to the task state of the target task. According to the method and the device, the sub-level audit center actively sends the task obtaining instruction to obtain the task, network channel blocking is avoided, task distribution efficiency is improved, the sub-level audit center actively reports the task state of the target task to the parent-level audit center, the parent-level audit center is prevented from keeping a transmission channel for a long time, and network communication performance is improved.
On the basis of the above embodiments, the embodiments of the present application further provide a task synchronization method. Referring to fig. 2, a schematic flowchart of another task synchronization method according to an embodiment of the present application is shown in fig. 2, where the step S13 includes:
s131: and performing local persistent storage on the task data.
In this embodiment, if the sub-level audit center is executing the current task, in order to avoid that the sub-level audit center cannot receive task data of the target task, so that a transmission channel between the sub-level audit center and the parent-level audit center is maintained all the time, and thus network communication performance is reduced, the sub-level audit center may perform local persistent storage on the task data after receiving the task data of the target task. By way of example, task data may be persisted through local MySQL.
S132: the target task is executed by asynchronous triggering.
In this embodiment, the asynchronous trigger is used to indicate that the target task is not directly executed after receiving the task data of the target task, but the acquired task data of the target task is stored or written into a queue to be executed, so that the target task is executed after the current task is executed.
In an alternative embodiment, the step S132 includes:
and after monitoring a completion event of the local persistent storage, notifying the logic code for asynchronously triggering the execution task to asynchronously execute the target task.
In this embodiment, a monitor (ApplicationListener) in the sub-level audit center monitors the progress of the local persistent storage, and after the local persistent storage is monitored to be completed, the logic code for executing the target task is asynchronously triggered to execute the target task.
According to the task synchronization method provided by the embodiment of the application, the task data is locally stored persistently, and the target task is executed through asynchronous triggering. According to the embodiment of the application, the task data is locally and persistently stored, so that a transmission channel between the sub-level audit center and the parent-level audit center can be timely released, and the network communication performance is improved.
Based on the security audit system, the embodiment of the application provides a task synchronization method applied to a parent level audit system in the security audit system. Referring to fig. 3, a schematic flowchart of another task synchronization method provided in an embodiment of the present application is shown, as shown in fig. 3, the method includes:
s21: and receiving a task acquisition instruction sent by the sub-level audit center.
In this embodiment, the parent-level audit center and the child-level audit center establish a communication connection, for example, a long connection TCP network communication may be used. And the parent-level auditing center receives the task acquisition instruction sent by the child-level auditing center through a transmission channel with the child-level auditing center.
S22: and acquiring task data of the target task from the task record to be synchronized according to the task acquisition instruction.
In this embodiment, after a listener (supervisory receive handle) of the parent audit center monitors a task acquisition instruction, task data of a target task matched with the task acquisition instruction is acquired from a task record to be synchronized according to the task acquisition instruction.
In an optional implementation manner, the parent-level audit center acquires the task data of the target task from the task record to be synchronized according to a preset rule and a task acquisition instruction. For example, if the preset rule is that the task data of all tasks in the to-be-synchronized task record is sent to the sub-level audit center, the task data of the target task is the task data of all tasks; and if the preset rule is that the task data of the plurality of tasks received earliest are sent to the sub-level audit center according to the task receiving time in the task record to be synchronized, the task data of the target task is the task data of the plurality of tasks received earliest.
In another alternative real-time approach, the task fetch instruction includes: the task type, S22 above includes: and acquiring task data of the target task from the task record to be synchronized according to the task type.
In this embodiment, the parent-level audit center acquires task data of a target task corresponding to a task type from the to-be-synchronized task record according to the task type in the task acquisition instruction.
S23: and sending the task data of the target task to the sub-level auditing center.
In this embodiment, the task obtaining instruction includes a unique identifier of a sub-level audit center, and after receiving the task obtaining instructions sent by the plurality of sub-level audit centers, the parent audit center sends the obtained task data of the target task to the sub-level audit center corresponding to the unique identifier according to the unique identifier of each sub-level audit center.
S24: and receiving a task updating request returned by the sub-level auditing center.
In this embodiment, after the sub-level audit center executes the target task according to the task data, the sub-level audit center actively sends a task update request to the parent-level audit center.
S25: and updating the state of the target task to be a synchronized state according to the task state of the target task.
In this embodiment, the parent audit center determines that the child audit center has started to execute the target task according to the task state of the target task, updates the state of the target task to a synchronized state, and deletes task data of the target task from the task record to be synchronized. In an example, task data of a target task sent by a parent audit center has a unique primary key, the primary key remains unchanged in the process of sending the task data of the target task and in the process of executing the target task, and a task update request sent by a child audit center has the primary key, so that the parent audit center updates the state of the target task to a synchronized state according to the primary key.
Based on the above embodiment, the embodiment of the present application further provides a task synchronization method. Referring to fig. 4, an interaction diagram of a task synchronization method according to an embodiment of the present application is shown in fig. 4, where the method includes:
s10: and the sub-level audit center sends a task acquisition instruction to the parent-level audit center.
S20: and the parent-level audit center acquires the task data of the target task from the task record to be synchronized according to the task acquisition instruction.
S30: and the parent-level auditing center sends the task data of the target task to the child-level auditing center.
S40: and the sub-level auditing center performs local persistent storage on the task data.
S50: and the sub-level auditing center informs the logic code of the asynchronous trigger execution task to execute the target task asynchronously.
S60: and the child audit center returns a task update request to the parent audit center, wherein the task update request comprises: task state of the target task.
S70: and the parent-level audit center updates the state of the target task to be a synchronized state according to the task state of the target task.
S80: and the sub-level auditing center updates the state of the target task to be an executed state according to the task state of the target task.
The specific implementation manner of the above-mentioned S10-S80 is the same as that of the foregoing embodiment, and is not described herein again.
On the basis of the above embodiment, the embodiment of the present application further provides a task synchronization device, which is applied to a sub-level audit center in a security audit system, and the security audit system further includes a parent level audit center in communication connection with the sub-level audit center. Referring to fig. 5, a schematic structural diagram of a task synchronization apparatus according to an embodiment of the present application is shown in fig. 5, where the apparatus includes:
the instruction sending module 11 is configured to send a task obtaining instruction to the parent audit center, so that the parent audit center obtains task data of a target task from the to-be-synchronized task record according to the task obtaining instruction;
the task data receiving module 12 is configured to receive task data of a target task sent by a parent audit center;
the task execution module 13 is configured to execute the target task according to the task data to obtain a task state of the target task;
an update request sending module 14, configured to return a task update request to the parent-level audit center, where the task update request includes: and the task state of the target task is set to enable the parent audit center to update the state of the target task to be a synchronized state according to the task state of the target task.
Optionally, the task execution module 13 includes:
the task data storage unit is used for performing local persistent storage on the task data;
and the task execution unit is used for executing the target task through asynchronous triggering.
Optionally, the task execution unit is specifically configured to notify the logic code that asynchronously triggers the execution task after monitoring the completion event of the local persistent storage, and asynchronously execute the target task.
Optionally, the apparatus further comprises:
and the completion state updating module is used for updating the state of the target task into an executed completion state according to the task state of the target task.
On the basis of the above embodiment, the embodiment of the present application further provides a task synchronization device, which is applied to a parent audit center in a security audit system, and the security audit system further includes a child audit center in communication connection with the parent audit center. Referring to fig. 6, a schematic structural diagram of another task synchronization apparatus provided in an embodiment of the present application is shown in fig. 6, where the apparatus includes:
the instruction receiving module 21 is configured to receive a task obtaining instruction sent by the sub-level audit center;
the task data acquisition module 22 is configured to acquire task data of a target task from a task record to be synchronized according to a task acquisition instruction;
the task data sending module 23 is configured to send task data of a target task to the sub-level audit center;
the update request receiving module 24 is configured to receive a task update request returned by the sub-level audit center;
and the task state updating module 25 is configured to update the state of the target task to be the synchronized state according to the task state of the target task.
Optionally, the task obtaining instruction includes: the task type, task data obtaining module 22 is specifically configured to obtain task data of the target task from the task record to be synchronized according to the task type.
The above-mentioned apparatus is used for executing the method provided by the foregoing embodiment, and the implementation principle and technical effect are similar, which are not described herein again.
These above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more Application Specific Integrated Circuits (ASICs), or one or more microprocessors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs), among others. For another example, when one of the above modules is implemented in the form of a Processing element scheduler code, the Processing element may be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
Referring to fig. 7, a schematic diagram of a computer device provided in an embodiment of the present application is shown, where the computer device 100 includes: a processor 101, a storage medium 102 and a bus, the storage medium 102 storing program instructions executable by the processor 101, the processor 101 communicating with the storage medium 102 via the bus when the computer device 100 is running, the processor 101 executing the program instructions to perform the above-mentioned method embodiments. The specific implementation and technical effects are similar, and are not described herein again.
Optionally, the present invention further provides a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, is adapted to perform the above-mentioned method embodiments.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and shall be covered by the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A task synchronization method is applied to a sub-level audit center in a security audit system, the security audit system further comprises a parent level audit center in communication connection with the sub-level audit center, and the method comprises the following steps:
sending a task obtaining instruction to the parent audit center so that the parent audit center obtains task data of a target task from a task record to be synchronized according to the task obtaining instruction;
receiving task data of the target task sent by the parent audit center;
executing the target task according to the task data to obtain a task state of the target task;
returning a task updating request to the parent-level auditing center, wherein the task updating request comprises: and the task state of the target task enables the parent-level audit center to update the state of the target task to be a synchronized state according to the task state of the target task.
2. The method of claim 1, wherein the executing the target task according to the task data to obtain the task state of the target task comprises:
performing local persistent storage on the task data;
and executing the target task through asynchronous triggering.
3. The method of claim 2, wherein the executing the target task through asynchronous triggering comprises:
and after monitoring the completion event of the local persistent storage, notifying a logic code for asynchronously triggering the execution task, and asynchronously executing the target task.
4. The method of claim 1, wherein the method further comprises:
and updating the state of the target task to be an executed state according to the task state of the target task.
5. A task synchronization method is applied to a parent-level audit center in a security audit system, the security audit system further comprises a child-level audit center in communication connection with the parent-level audit center, and the method comprises the following steps:
receiving a task acquisition instruction sent by the sub-level audit center;
acquiring task data of a target task from a task record to be synchronized according to the task acquisition instruction;
sending task data of the target task to the sub-level auditing center;
receiving a task updating request returned by the sub-level auditing center;
and updating the state of the target task to be a synchronized state according to the task state of the target task.
6. The method of claim 5, wherein the task fetch instruction comprises: the task type obtaining task data of the target task from the task record to be synchronized according to the task obtaining instruction comprises the following steps:
and acquiring task data of the target task from the task record to be synchronized according to the task type.
7. The task synchronization device is applied to a sub-level audit center in a security audit system, the security audit system further comprises a parent level audit center in communication connection with the sub-level audit center, and the device comprises:
the instruction sending module is used for sending a task obtaining instruction to the parent audit center so that the parent audit center obtains task data of a target task from a task record to be synchronized according to the task obtaining instruction;
the task data receiving module is used for receiving the task data of the target task sent by the parent audit center;
the task execution module is used for executing the target task according to the task data to obtain a task state of the target task;
an update request sending module, configured to return a task update request to the parent audit center, where the task update request includes: and the task state of the target task enables the parent-level audit center to update the state of the target task to be a synchronized state according to the task state of the target task.
8. The task synchronization device is applied to a parent-level audit center in a security audit system, the security audit system further comprises a child-level audit center in communication connection with the parent-level audit center, and the device comprises:
the instruction receiving module is used for receiving a task obtaining instruction sent by the sub-level auditing center;
the task data acquisition module is used for acquiring task data of a target task from a task record to be synchronized according to the task acquisition instruction;
the task data sending module is used for sending the task data of the target task to the sub-level auditing center;
the updating request receiving module is used for receiving a task updating request returned by the sub-level auditing center;
and the task state updating module is used for updating the state of the target task to be a synchronized state according to the task state of the target task.
9. A computer device, comprising: a processor, a storage medium and a bus, the storage medium storing program instructions executable by the processor, the processor and the storage medium communicating via the bus when the computer apparatus is running, the processor executing the program instructions to perform the steps of the task synchronization method according to any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that the storage medium has stored thereon a computer program which, when being executed by a processor, carries out the steps of the task synchronization method according to one of claims 1 to 6.
CN202210140484.4A 2022-02-16 2022-02-16 Task synchronization method and device, computer equipment and storage medium Pending CN114500571A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210140484.4A CN114500571A (en) 2022-02-16 2022-02-16 Task synchronization method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210140484.4A CN114500571A (en) 2022-02-16 2022-02-16 Task synchronization method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114500571A true CN114500571A (en) 2022-05-13

Family

ID=81481417

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210140484.4A Pending CN114500571A (en) 2022-02-16 2022-02-16 Task synchronization method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114500571A (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2594639A1 (en) * 2007-07-24 2009-01-24 Constellation Homebuilder Systems Inc. System and method of real-time homebuilding scheduling
CN104077701A (en) * 2014-06-09 2014-10-01 中国建设银行股份有限公司 Task processing method and device used for e-business platform
CN104318381A (en) * 2014-10-21 2015-01-28 中国建设银行股份有限公司 Background audit task distributing method and device
US20150120349A1 (en) * 2013-10-25 2015-04-30 Wavemarket, Inc. Task management system and method
EP2924952A1 (en) * 2012-12-31 2015-09-30 Huawei Technologies Co., Ltd. Data synchronization method and device
CN108809701A (en) * 2018-05-23 2018-11-13 郑州云海信息技术有限公司 A kind of data center's wisdom data platform and its implementation
CN109685353A (en) * 2018-12-18 2019-04-26 口碑(上海)信息技术有限公司 Data audit task processing method and device
CN110895486A (en) * 2018-09-12 2020-03-20 北京奇虎科技有限公司 Distributed task scheduling system
CN112416542A (en) * 2020-09-07 2021-02-26 上海哔哩哔哩科技有限公司 Distributed task system, management method and device and computer equipment
CN112988356A (en) * 2021-03-30 2021-06-18 北京大米科技有限公司 Asynchronous calling method and device, storage medium and electronic equipment
CN113230661A (en) * 2021-06-16 2021-08-10 腾讯科技(深圳)有限公司 Data synchronization method and device, computer readable medium and electronic equipment

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2594639A1 (en) * 2007-07-24 2009-01-24 Constellation Homebuilder Systems Inc. System and method of real-time homebuilding scheduling
EP2924952A1 (en) * 2012-12-31 2015-09-30 Huawei Technologies Co., Ltd. Data synchronization method and device
US20150120349A1 (en) * 2013-10-25 2015-04-30 Wavemarket, Inc. Task management system and method
CN104077701A (en) * 2014-06-09 2014-10-01 中国建设银行股份有限公司 Task processing method and device used for e-business platform
CN104318381A (en) * 2014-10-21 2015-01-28 中国建设银行股份有限公司 Background audit task distributing method and device
CN108809701A (en) * 2018-05-23 2018-11-13 郑州云海信息技术有限公司 A kind of data center's wisdom data platform and its implementation
CN110895486A (en) * 2018-09-12 2020-03-20 北京奇虎科技有限公司 Distributed task scheduling system
CN109685353A (en) * 2018-12-18 2019-04-26 口碑(上海)信息技术有限公司 Data audit task processing method and device
CN112416542A (en) * 2020-09-07 2021-02-26 上海哔哩哔哩科技有限公司 Distributed task system, management method and device and computer equipment
CN112988356A (en) * 2021-03-30 2021-06-18 北京大米科技有限公司 Asynchronous calling method and device, storage medium and electronic equipment
CN113230661A (en) * 2021-06-16 2021-08-10 腾讯科技(深圳)有限公司 Data synchronization method and device, computer readable medium and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
杨正洪: "SQL Server 7 关系数据库系统管理与开发指南", pages: 314 - 316 *

Similar Documents

Publication Publication Date Title
CN108388479A (en) Postpone information push method, device, computer equipment and storage medium
EP0165934B1 (en) Control for a multiprocessing system program process
CN110830608B (en) Global unique identifier generation method, device, equipment and storage medium
CN110532077B (en) Task processing method and device and storage medium
CN110651256B (en) System and method for preventing service interruption during software update
RU2749339C1 (en) Equipment control method, cluster system, electronic device and readable data media
CN111225029A (en) Dynamic message pushing method and system and automobile diagnosis server
CN112099935B (en) Task processing method and device
CN111580990A (en) Task scheduling method, scheduling node, centralized configuration server and system
CN113347257A (en) Communication method, communication device, server and storage medium
CN112598529B (en) Data processing method and device, computer readable storage medium and electronic equipment
CN108509264B (en) Overtime task scheduling system and method
CN114500571A (en) Task synchronization method and device, computer equipment and storage medium
CN111488373B (en) Method and system for processing request
CN112600842A (en) Cluster shell method and device, electronic equipment and computer readable storage medium
CN115951986A (en) Task scheduling method, node equipment and remote server
CN111835809A (en) Work order message distribution method, work order message distribution device, server and storage medium
CN115220891A (en) Method for processing high-concurrency batch tasks and related product
CN113778744A (en) Task processing method, device, system and storage medium
CN113965563A (en) Model-based business processing method and device and server
CN113268324A (en) Task scheduling method and device, storage medium and computer equipment
CN117593172B (en) Process management method, device, medium and equipment
CN115269161B (en) Abnormal process reverse rollback method and system
CN113726871B (en) Scheduling method and system for automatic code release
CN110825529B (en) Service message management system and method

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