CN113986577A - Data processing method, device and equipment based on timer - Google Patents

Data processing method, device and equipment based on timer Download PDF

Info

Publication number
CN113986577A
CN113986577A CN202111243738.7A CN202111243738A CN113986577A CN 113986577 A CN113986577 A CN 113986577A CN 202111243738 A CN202111243738 A CN 202111243738A CN 113986577 A CN113986577 A CN 113986577A
Authority
CN
China
Prior art keywords
timing task
result information
execution result
timing
preset
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
CN202111243738.7A
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.)
China United Network Communications Group Co Ltd
Original Assignee
China United Network Communications Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China United Network Communications Group Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN202111243738.7A priority Critical patent/CN113986577A/en
Publication of CN113986577A publication Critical patent/CN113986577A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • 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/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24552Database cache management
    • 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/4812Task transfer initiation or dispatching by interrupt, e.g. masked
    • G06F9/4831Task transfer initiation or dispatching by interrupt, e.g. masked with variable priority
    • G06F9/4837Task transfer initiation or dispatching by interrupt, e.g. masked with variable priority time dependent
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/548Queue

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application provides a data processing method, a device and equipment based on a timer, which relate to the data processing technology, and the method comprises the following steps: when a timed task identifier exists in a preset timed task message queue through Java program inquiry, acquiring preset attribute information corresponding to the timed task identifier, starting and executing a timed task corresponding to the timed task identifier according to the preset attribute information, and acquiring execution result information related to the timed task; the execution result information comprises a timing task identifier corresponding to the timing task; and auditing the execution result information corresponding to the timing task identifier to obtain the auditing result information. According to the method, after the timing task is started and executed, the execution result information of the timing task can be acquired, and the execution result information is audited, so that the integrated management of the timing task execution flow is realized, the processing efficiency of executing the timing task is improved, and the technical problem that the manual processing of the timing task is slow is solved.

Description

Data processing method, device and equipment based on timer
Technical Field
The present application relates to data processing technologies, and in particular, to a data processing method, apparatus, and device based on a timer.
Background
At present, in the background of huge information amount and complex tasks, in order to reduce the labor cost and the resource cost, the tasks to be done at specific time tend to be programmed more and more, so a timing device is required to execute the timing task.
In the prior art, the timing device comprises a timer of an operating system, an open source timing task plug-in and the like, and when the timing task is executed by both of the timing devices, the timing task is automatically executed when the execution time of the timing task is reached.
However, in the prior art, after the timing device automatically executes the timing task, no subsequent step is required to acquire result data, so that the execution result of the timing task cannot be determined, and only the execution result of the timing task can be manually checked and manually audited, so that the completion condition of the timing task is determined, and the efficiency of manually processing the timing task is low.
Disclosure of Invention
The application provides a data processing method, a data processing device and data processing equipment based on a timer, which are used for solving the technical problem that the efficiency of manual processing of timing tasks is low.
In a first aspect, the present application provides a timer-based data processing method, which is applied to a data structure server, and includes:
when a timed task identifier exists in a preset timed task message queue through a Java program, acquiring preset attribute information corresponding to the timed task identifier, starting and executing a timed task corresponding to the timed task identifier according to the preset attribute information, and acquiring execution result information about the timed task; the execution result information comprises a timing task identifier corresponding to the timing task;
and auditing the execution result information corresponding to the timing task identifier to obtain the auditing result information.
Further, when a timed task identifier exists in a preset timed task message queue through a Java program, acquiring preset attribute information corresponding to the timed task identifier, including:
when a timed task identifier exists in a preset timed task message queue through Java program inquiry, the preset attribute information corresponding to the timed task identifier is determined according to the corresponding relation between the timed task identifier and the preset attribute information.
Further, before auditing the execution result information corresponding to the timing task identifier to obtain the auditing result information, the method further includes: storing the timing task identification in the execution result information in a result information message queue;
auditing the execution result information corresponding to the timing task identifier to obtain auditing result information, wherein the auditing result information comprises:
querying the timing task identifier in the result information message queue through the Java program, and determining execution result information corresponding to the timing task identifier;
and auditing the execution result information corresponding to the timing task identifier to obtain the auditing result information.
Further, the execution result information includes execution result data of the timing task; auditing treatment is carried out on the auditing result information corresponding to the timing task identification to obtain the auditing result information, which comprises the following steps:
if the fact that the execution result information represents that the timing task corresponding to the execution result information is successfully executed is determined, the execution result information and the timing task are correspondingly stored in a preset storage medium, wherein the preset storage medium is a storage medium except a data structure server;
if the fact that the execution result information represents that the timing task corresponding to the execution result information fails to be executed is determined, whether the execution result data is larger than a preset audit value is determined;
if the execution result data is determined to be larger than the preset audit value, correspondingly storing the execution result information and the timing task into a preset storage medium;
and if the execution result data is determined to be less than or equal to the preset audit value, storing the timing task identifier of the timing task corresponding to the execution result information in the timing task message queue.
Further, the method further comprises:
and deleting the timing task identifier of the timing task which is audited and processed in the result information message queue.
Further, the method further comprises:
inquiring the execution time of the read timing task through a Java program;
when the timing task reaches the execution time, generating a timing task identifier corresponding to the timing task according to preset rule information stored in the Java program;
and establishing and storing a corresponding relation between the timing task identifier and preset attribute information, and storing the timing task identifier in the timing task message queue, wherein the timing task identifier is used for representing a timing task. In a second aspect, the present application provides a timer-based data processing apparatus, which is applied to a data structure server, the apparatus comprising:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring preset attribute information corresponding to a timing task identifier when the timing task identifier exists in a preset timing task message queue through Java program inquiry;
the execution unit is used for starting and executing the timing task corresponding to the timing task identifier according to the preset attribute information to obtain execution result information about the timing task; the execution result information comprises a timing task identifier corresponding to the timing task;
and the auditing unit is used for auditing the execution result information corresponding to the timing task identifier to obtain the auditing result information.
Further, the obtaining unit is specifically configured to:
when a timed task identifier exists in a preset timed task message queue through Java program inquiry, the preset attribute information corresponding to the timed task identifier is determined according to the corresponding relation between the timed task identifier and the preset attribute information.
Further, the auditing unit specifically includes:
the determining module is used for querying the timing task identifier in the result information message queue through the Java program after the timing task identifier in the execution result information is stored in the result information message queue, and determining the execution result information corresponding to the timing task identifier;
and the auditing module is used for auditing the execution result information corresponding to the timing task identifier to obtain the auditing result information.
Further, the execution result information includes execution result data of the timing task; the auditing module comprises:
the first determining submodule is used for correspondingly storing the execution result information and the timing task into a preset storage medium if the execution result information represents that the timing task corresponding to the execution result information is successfully executed, wherein the preset storage medium is a storage medium except a data structure server;
the second determining submodule is used for determining whether the execution result data is greater than a preset audit value or not if the execution result information represents that the timing task corresponding to the execution result information fails to be executed;
a third determining submodule, configured to, if it is determined that the execution result data is greater than the preset audit value, correspondingly store the execution result information and the timed task in a preset storage medium;
and the fourth determining submodule is used for storing the timing task identifier of the timing task corresponding to the execution result information in the timing task message queue if the execution result data is determined to be less than or equal to the preset audit value.
Further, the apparatus further comprises:
and the deleting unit is used for deleting the timing task identifier of the timing task which is audited and processed in the result information message queue.
Further, the apparatus further comprises:
the query unit is used for querying the execution time of the read timing task through a Java program;
the generating unit is used for generating a timing task identifier corresponding to the timing task according to preset rule information stored in the Java program when the timing task reaches the execution time;
and the establishing unit is used for establishing and storing the corresponding relation between the timed task identifier and preset attribute information, and storing the timed task identifier in the timed task message queue, wherein the timed task identifier is used for representing a timed task.
In a third aspect, the present application provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program operable on the processor, and the processor implements the method of the first aspect when executing the computer program.
In a fourth aspect, the present application provides a computer-readable storage medium having stored thereon computer-executable instructions for implementing the method of the first aspect when executed by a processor.
In a fifth aspect, the present application provides a computer program product comprising a computer program which, when executed by a processor, implements the method of the first aspect.
According to the data processing method, device and equipment based on the timer, when a timed task identifier exists in a preset timed task message queue through a Java program, preset attribute information corresponding to the timed task identifier is obtained, a timed task corresponding to the timed task identifier is started and executed according to the preset attribute information, and execution result information about the timed task is obtained; the execution result information comprises a timing task identifier corresponding to the timing task; and auditing the execution result information corresponding to the timing task identifier to obtain the auditing result information. In the scheme, a preset timing task message queue is used for storing a timing task identifier, the timing task identifier represents a timing task, when the timing task identifier exists in the preset timing task message queue is inquired through a Java program, the timing task needing to be started is determined, therefore, the preset attribute information corresponding to the timing task identifier is required to be obtained, the timing task corresponding to the timing task identifier is started and executed according to the preset attribute information, the execution result information related to the timing task is obtained, then the execution result information corresponding to the timing task identifier is audited, the execution condition of the timing task corresponding to the execution result information is judged, the timing task is reprocessed according to the execution condition, and the audit result information is obtained. Therefore, after the timing task is started and executed, the execution result information of the timing task can be acquired, and the execution result information is audited, so that the integrated management of the timing task execution flow is realized, the processing efficiency of executing the timing task is improved, and the technical problem of slow efficiency in manual processing of the timing task is solved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a schematic flowchart of a data processing method based on a timer according to an embodiment of the present application;
fig. 2 is a schematic flowchart of another timer-based data processing method according to an embodiment of the present application;
fig. 3 is a scene schematic diagram of execution result information according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a timer-based data processing apparatus according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of another timer-based data processing apparatus according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
fig. 7 is a block diagram of an electronic device according to an embodiment of the present application.
With the foregoing drawings in mind, certain embodiments of the disclosure have been shown and described in more detail below. These drawings and written description are not intended to limit the scope of the disclosed concepts in any way, but rather to illustrate the concepts of the disclosure to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure.
In one example, in a context of huge amount of information and complex tasks, in order to reduce labor cost and resource cost, tasks to be done at a specific time tend to be programmed more and more, so a timing device is required to perform timing tasks. In the prior art, the timing device comprises a timer of an operating system, an open source timing task plug-in and the like, and when the timing task is executed by both of the timing devices, the timing task is automatically executed when the execution time of the timing task is reached. However, in the prior art, after the timing device automatically executes the timing task, no subsequent step is required to acquire result data, so that the execution result of the timing task cannot be determined, and only the execution result of the timing task can be manually checked and manually audited, so that the completion condition of the timing task is determined, and the efficiency of manually processing the timing task is low.
The application provides a data processing method, a data processing device and data processing equipment based on a timer, and aims to solve the technical problems in the prior art.
The following describes the technical solutions of the present application and how to solve the above technical problems with specific embodiments. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 1 is a schematic flowchart of a timer-based data processing method, which is applied to a data structure server according to an embodiment of the present application; as shown in fig. 1, the method includes:
101. when a timed task identifier exists in a preset timed task message queue through Java program inquiry, preset attribute information corresponding to the timed task identifier is obtained.
For example, the execution subject of this embodiment may be a data structure Server, where the data structure Server has a Remote Dictionary service (Redis) list and a Java program, the Redis list is a timed task message queue, the timed task message queue includes a plurality of nodes, and a plurality of timed task identifiers may be stored in the timed task message queue.
Firstly, a data structure server stores a plurality of timing tasks related to a timer in advance through a Java program, each timing task comprises timing task data, at least one timing task identifier is stored in a preset timing task message queue, each timing task identifier represents one timing task, the data structure server can inquire whether the timing task identifier exists in the timing task message queue in real time through the Java program, if the timing task identifier exists in the preset timing task message queue through the Java program, preset attribute information corresponding to the timed task identifier can be acquired, wherein the preset attribute information refers to pre-stored execution rule information corresponding to the timed task identifier, therefore, the timing task is also the execution rule information corresponding to the timing task, and the timing task can be executed according to the preset attribute information.
Illustratively, the timing task data corresponding to the timing task includes: the method comprises the following steps of timer name, timer group name, timing CRON expression, time zone where a timing task is located, timing task class name, timing task last execution time, timing task next execution time, timer state, timing task result, timing task data, timing task flow direction and timing task description. The timing task result can specify the latest execution result information of the timing task, the timing task description can specify the preset attribute information, and the timing task data except the preset attribute information can be updated along with the latest executed timing task. The timing task identifier is composed of a timing task ID value and a timestamp, wherein the timing task ID value can be represented as a unique identity identifier of the timing task, and the timestamp can represent the execution time of the timing task.
102. Starting and executing the timing task corresponding to the timing task identifier according to the preset attribute information to obtain execution result information about the timing task; the execution result information comprises a timing task identifier corresponding to the timing task.
Illustratively, because the preset attribute information and the timing task identifier have a corresponding relationship, the data structure server may determine the preset attribute information corresponding to the timing task identifier according to the current timing task identifier, and then start and execute the timing task corresponding to the timing task identifier according to the determined preset attribute information, to obtain execution result information about the timing task, where the execution result information includes the timing task identifier corresponding to the timing task. Therefore, when a plurality of timing tasks are executed simultaneously, a plurality of execution result information can be distinguished according to the timing task identifier corresponding to each timing task, and confusion is avoided.
103. And auditing the execution result information corresponding to the timing task identifier to obtain the auditing result information.
For example, the data structure server may determine corresponding execution result information according to the timed task identifier, and then perform auditing processing on the execution result information according to pre-stored auditing rule information to obtain auditing result information, where the auditing result information includes operation processing information for the timed task according to the execution result information, and for example, the operation processing information includes re-processing the timed task, and the like. For example, when auditing the execution result information, if the obtained execution result information indicates that the timing task corresponding to the execution result information is successfully executed, the execution of the timing task is completed, and the execution result information and the timing task need to be stored in a preset storage medium, where the preset storage medium is a storage medium other than the data structure server; if the execution result information is determined to indicate that the timing task corresponding to the execution result information fails to be executed, further judging whether execution result data in the execution result information is greater than a preset audit value, and if the execution result data is determined to be greater than the preset audit value, correspondingly storing the execution result information and the timing task into a preset storage medium; and if the execution result data is determined to be less than or equal to the preset audit value, storing the timing task identifier of the timing task corresponding to the execution result information in a timing task message queue, and further reprocessing the timing task.
In the embodiment of the application, when the timed task identifier exists in the preset timed task message queue through the Java program, the preset attribute information corresponding to the timed task identifier is obtained. Starting and executing the timing task corresponding to the timing task identifier according to the preset attribute information to obtain execution result information about the timing task; and the result information comprises a timing task identifier corresponding to the timing task. And auditing the execution result information corresponding to the timing task identifier to obtain the auditing result information. In the scheme, a preset timing task message queue is used for storing a timing task identifier, the timing task identifier represents a timing task, when the timing task identifier exists in the preset timing task message queue is inquired through a Java program, the timing task needing to be started is determined, therefore, the preset attribute information corresponding to the timing task identifier is required to be obtained, the timing task corresponding to the timing task identifier is started and executed according to the preset attribute information, the execution result information related to the timing task is obtained, then the execution result information corresponding to the timing task identifier is audited, the execution condition of the timing task corresponding to the execution result information is judged, the timing task is reprocessed according to the execution condition, and the audit result information is obtained. Therefore, after the timing task is started and executed, the execution result information of the timing task can be acquired, and the execution result information is audited, so that the integrated management of the timing task execution flow is realized, the processing efficiency of the timing task is improved, and the technical problem that the efficiency of manual processing of the timing task is slow is solved.
Fig. 2 is a schematic flowchart of another timer-based data processing method provided in the embodiment of the present application, and the method is applied to a data structure server; as shown in fig. 2, the method includes:
201. and inquiring the execution time of the read timing task through a Java program.
Illustratively, the data structure server may read, in advance through a Java program, a plurality of timing tasks related to the timer in a preset storage medium other than the data structure server, and then store the plurality of timing tasks in a cache of the Java program, where the cached storage structure may be a Concurrent HashMap (current HashMap) data structure, the HashMap represents a hash table based Map interface implementing the HashMap, the structure is in a Key-Value format, and the Value is also a current HashMap data structure, the Value is a Value of an attribute corresponding to the Key, that is, preset attribute information corresponding to the timing task identifier, and each timing task includes timing task data, so that the data structure server may query each timing task in the cache at preset time intervals, for example, query timing task data corresponding to each timing task at time intervals of every second/time, and further, the execution time in the timing task data is determined, and the query efficiency is improved. The preset storage medium except the data structure server includes a relational Database, such as an Oracle (Oracle Database, Oracle) Database, a relational Database management system (MySQL) Database, or a non-relational Database (Not Only SQL, NoSql), such as Hbase, etc., and is Not limited to the type of the timing task, supports timing tasks of various languages, and supports flexible configuration of preset attribute information of the timing task and audit rule information for audit processing.
202. And when the timing task reaches the execution time, generating a timing task identifier corresponding to the timing task according to preset rule information stored in the Java program.
Illustratively, the data structure server queries the execution time corresponding to each timing task at time intervals of every second/time, when any timing task reaches the execution time, the timing task reaching the execution time can be processed according to preset rule information pre-stored in a Java program, and a timing task identifier corresponding to the timing task is generated, wherein the timing task identifier is composed of a timing task ID Value and a timestamp, the timing task ID Value can be represented as a unique identity identifier of the timing task, the timestamp can be represented as the execution time of the timing task, and the timing task identifier and the preset attribute information are correspondingly stored in a Key-Value String type storage structure according to a Key-Value format.
For example, 2 timed tasks are stored in the cache of the Java program, and the execution time 1 of the timed task 1 is 08 in the morning: 00, the execution time 2 of the timing task 2 is 20 at night: 00, the data structure server inquires the execution time 1 corresponding to the timing task 1 and the execution time 2 corresponding to the timing task 2 according to the time interval of every second/time, and when the time reaches morning 08: when 00, the timed task 1 reaches the execution time 1, and at this time, the timed task identifier 1 corresponding to the timed task 1 may be generated, and the timed task identifier 1 includes the ID value and the execution time 1 of the timed task 1.
203. And establishing and storing a corresponding relation between a timing task identifier and preset attribute information, and storing the timing task identifier in a timing task message queue, wherein the timing task identifier is used for representing a timing task.
Illustratively, since the data structure server stores the read multiple timed tasks in a cache of the Java program in advance through the Java program, each timed task includes timed task data, and the timed task data includes preset attribute information, a corresponding relationship between a timed task identifier and preset attribute information may be established and stored according to the preset attribute information corresponding to each timed task and a corresponding relationship between the timed task and the timed task identifier, and the timed task identifier is stored in a timed task message queue, the timed task identifier is used for representing the timed task, and the timed task identifier located in the timed task message queue is used for representing the timed task reaching the execution time.
204. When a timed task identifier exists in a preset timed task message queue through Java program inquiry, the preset attribute information corresponding to the timed task identifier is determined according to the corresponding relation between the timed task identifier and the preset attribute information.
Illustratively, the data structure server may query in real time, through the Java program, whether a timed task identifier exists in the timed task message queue, and if the timed task identifier exists in the timed task message queue, the data structure server may determine the preset attribute information corresponding to the timed task identifier according to the correspondence between the timed task identifier and the preset attribute information in step 203.
205. Starting and executing the timing task corresponding to the timing task identifier according to the preset attribute information to obtain execution result information about the timing task; and the result information comprises a timing task identifier corresponding to the timing task.
For example, this step can be referred to as step 102 in fig. 1, and is not described again.
206. And storing the timing task identification in the execution result information in a result information message queue.
Illustratively, the data structure server further includes a result information message queue, where the result information message queue is used to store the timing task identifier corresponding to the executed timing task. The data structure server obtains the execution result information about the timed task, and the execution result information comprises a timed task identifier corresponding to the timed task, so that the timed task identifier can be stored in a result information message queue.
207. And querying a timing task identifier in the result information message queue through the Java program, and determining execution result information corresponding to the timing task identifier.
Illustratively, the data structure server monitors and queries the result information message queue in real time through a Java program, and when a timed task identifier exists in the result information message queue queried through the Java program, the data structure server determines execution result information corresponding to the timed task identifier according to the corresponding relation between the timed task identifier and the execution result information.
208. And auditing the execution result information corresponding to the timing task identifier to obtain the auditing result information.
In one example, the execution result information includes execution result data of the timing task; if the fact that the execution result information represents that the timing task corresponding to the execution result information is successfully executed is determined, the execution result information and the timing task are correspondingly stored in a preset storage medium, wherein the preset storage medium is a storage medium except for a data structure server; if the fact that the execution result information represents that the timing task corresponding to the execution result information fails to be executed is determined, whether the execution result data is larger than a preset audit value is determined; if the execution result data is larger than the preset audit value, correspondingly storing the execution result information and the timing task into a preset storage medium; and if the execution result data is determined to be less than or equal to the preset audit value, storing the timing task identifier of the timing task corresponding to the execution result information in a timing task message queue.
Illustratively, the execution result information includes execution result data of the timing task, and the execution result data includes a plurality of values in JSON format, wherein a first value is used for comparing with the audit value. When the execution result information corresponding to the timing task identification is audited, if the execution result information representing the timing task corresponding to the execution result information is determined to be successfully executed, the execution result information and the timing task are correspondingly stored in a preset storage medium, the preset storage medium is a storage medium except a data structure server, as a plurality of timing tasks are stored in the preset storage medium in advance, the timing tasks comprise timing task data, and the execution result information corresponding to the timing task successfully executed is stored in the timing task data corresponding to the timing task; if the fact that the execution result information represents that the execution of the timing task corresponding to the execution result information fails is determined, whether the execution result data is larger than a preset audit value or not is continuously judged; if the execution result data is determined to be larger than the preset audit value, correspondingly storing the execution result information and the timing task into a preset storage medium; and if the execution result data is determined to be less than or equal to the preset audit value, storing the timing task identifier of the timing task corresponding to the execution result information in the timing task message queue, and further reprocessing the timing task failed to be executed.
For example, when the obtained execution result information is success and the execution result data0, it may be determined that the execution result information represents that the execution of the timing task corresponding to the execution result information is successful according to the success, and the execution result information and the timing task are correspondingly stored in a preset storage medium, where the preset storage medium is a storage medium other than the data structure server. As shown in fig. 3, fig. 3 is a scene schematic diagram of execution result information provided in the embodiment of the present application, and it can be seen that fig. 3 includes: when the obtained execution result information is fail, execution result data1, data2 and data3, determining that the execution result information represents the execution failure of the timing task corresponding to the execution result information according to the fail, and continuously judging whether the execution result data1 is greater than a preset audit value 1; if the execution result data1 is determined to be greater than the preset audit value 1, storing the execution result information and the timing task into a preset storage medium correspondingly; if the execution result data1 is determined to be less than or equal to the preset audit value 1, the timed task identifier of the timed task corresponding to the execution result information is stored in the timed task message queue, and the timed task failed to be executed is reprocessed.
209. And deleting the timing task identifier of the audited timing task in the result information message queue.
Illustratively, the data structure server deletes the timed task identifier of the timed task after the timed task identifier of the timed task in the result information message queue has been audited.
In the embodiment of the application, the execution time of the read timing task is queried through a Java program. And when the timing task reaches the execution time, generating a timing task identifier corresponding to the timing task according to preset rule information stored in the Java program. And establishing and storing a corresponding relation between a timing task identifier and preset attribute information, and storing the timing task identifier in a timing task message queue, wherein the timing task identifier is used for representing a timing task. When a timed task identifier exists in a preset timed task message queue through Java program inquiry, the preset attribute information corresponding to the timed task identifier is determined according to the corresponding relation between the timed task identifier and the preset attribute information. Starting and executing the timing task corresponding to the timing task identifier according to the preset attribute information to obtain execution result information about the timing task; and the result information comprises a timing task identifier corresponding to the timing task. And storing the timing task identification in the execution result information in a result information message queue. And querying a timing task identifier in the result information message queue through the Java program, and determining execution result information corresponding to the timing task identifier. And auditing the execution result information corresponding to the timing task identifier to obtain the auditing result information. And deleting the timing task identifier of the audited timing task in the result information message queue. Therefore, after the timing task is started and executed, the execution result information of the timing task can be acquired, and the execution result information is audited, so that the integrated management of the timing task execution flow is realized, the processing efficiency of the timing task is improved, and the technical problem of low efficiency of manual processing of the timing task is solved.
Fig. 4 is a schematic structural diagram of a timer-based data processing apparatus according to an embodiment of the present application, where the apparatus is applied to a data structure server, and as shown in fig. 4, the apparatus includes:
the obtaining unit 41 is configured to obtain preset attribute information corresponding to a timing task identifier when the timing task identifier exists in a preset timing task message queue through a Java program.
The execution unit 42 is configured to start and execute the timing task corresponding to the timing task identifier according to the preset attribute information, and obtain execution result information about the timing task; the execution result information comprises a timing task identifier corresponding to the timing task.
The auditing unit 43 is configured to audit the execution result information corresponding to the timing task identifier to obtain audit result information.
The apparatus of this embodiment may execute the technical solution in the method, and the specific implementation process and the technical principle are the same, which are not described herein again.
Fig. 5 is a schematic structural diagram of another timer-based data processing apparatus according to an embodiment of the present application, and based on the embodiment shown in fig. 4, as shown in fig. 5, the obtaining unit 41 is specifically configured to:
when a timed task identifier exists in a preset timed task message queue through Java program inquiry, the preset attribute information corresponding to the timed task identifier is determined according to the corresponding relation between the timed task identifier and the preset attribute information.
In an example, the auditing unit 43 specifically includes:
and the determining module 431 is configured to, after the timing task identifier in the execution result information is stored in the result information message queue, query the timing task identifier in the result information message queue through a Java program, and determine the execution result information corresponding to the timing task identifier.
The auditing module 432 is used for auditing the execution result information corresponding to the timing task identifier to obtain the auditing result information.
In one example, the execution result information includes execution result data of the timing task; the audit module 432 includes:
the first determining sub-module 4321 is configured to, if it is determined that the execution result information represents that the execution of the timing task corresponding to the execution result information is successful, correspondingly store the execution result information and the timing task in a preset storage medium, where the preset storage medium is a storage medium other than the data structure server.
The second determining sub-module 4322 is configured to determine whether the execution result data is greater than the preset audit value if it is determined that the execution result information represents that the execution of the timing task corresponding to the execution result information fails.
The third determining sub-module 4323 is configured to, if it is determined that the execution result data is greater than the preset audit value, store the execution result information and the timing task into a preset storage medium correspondingly.
A fourth determining sub-module 4324, configured to store the timed task identifier of the timed task corresponding to the execution result information in the timed task message queue if it is determined that the execution result data is less than or equal to the preset audit value.
In one example, the apparatus further comprises:
and the deleting unit 51 is used for deleting the timing task identifier of the audited timing task in the result information message queue.
In one example, the apparatus further comprises:
and a query unit 52 for querying the execution time of the read timed task through the Java program.
And the generating unit 53 is configured to generate a timing task identifier corresponding to the timing task according to preset rule information stored in the Java program when the timing task reaches the execution time.
The establishing unit 54 is configured to establish and store a corresponding relationship between a timing task identifier and preset attribute information, and store the timing task identifier in a timing task message queue, where the timing task identifier is used to represent a timing task.
The apparatus of this embodiment may execute the technical solution in the method, and the specific implementation process and the technical principle are the same, which are not described herein again.
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application, and as shown in fig. 6, the electronic device includes: memory 61, processor 62.
The memory 61 has stored therein a computer program that is executable on the processor 62.
The processor 62 is configured to perform the methods provided in the embodiments described above.
The electronic device further comprises a receiver 63 and a transmitter 64. The receiver 63 is used for receiving commands and data sent by an external device, and the transmitter 64 is used for sending commands and data to the external device.
Fig. 7 is a block diagram of an electronic device, which may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, etc., according to an embodiment of the present application.
The apparatus 700 may include one or more of the following components: processing component 702, memory 704, power component 707, multimedia component 708, audio component 710, input/output (I/O) interface 712, sensor component 714, and communication component 717.
The processing component 702 generally controls overall operation of the device 700, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 702 may include one or more processors 720 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 702 may include one or more modules that facilitate interaction between the processing component 702 and other components. For example, the processing component 702 may include a multimedia module to facilitate interaction between the multimedia component 708 and the processing component 702.
The memory 704 is configured to store various types of data to support operations at the apparatus 700. Examples of such data include instructions for any application or method operating on device 700, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 704 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
A power supply component 707 provides power to the various components of the device 700. The power components 707 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the apparatus 700.
The multimedia component 708 includes a screen that provides an output interface between the device 700 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 708 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 700 is in an operation mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 710 is configured to output and/or input audio signals. For example, audio component 710 includes a Microphone (MIC) configured to receive external audio signals when apparatus 700 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 704 or transmitted via the communication component 717. In some embodiments, audio component 710 also includes a speaker for outputting audio signals.
The I/O interface 712 provides an interface between the processing component 702 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 714 includes one or more sensors for providing status assessment of various aspects of the apparatus 700. For example, sensor assembly 714 may detect an open/closed state of device 700, the relative positioning of components, such as a display and keypad of device 700, the change in position of device 700 or a component of device 700, the presence or absence of user contact with device 700, the orientation or acceleration/deceleration of device 700, and the change in temperature of device 700. The sensor assembly 714 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 714 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 714 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 717 is configured to facilitate communications between the apparatus 700 and other devices in a wired or wireless manner. The apparatus 700 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 717 receives a broadcast signal or broadcast associated information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 717 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 700 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer readable storage medium comprising instructions, such as the memory 704 comprising instructions, executable by the processor 720 of the device 700 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Embodiments of the present application also provide a non-transitory computer-readable storage medium, where instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the method provided by the above embodiments.
An embodiment of the present application further provides a computer program product, where the computer program product includes: a computer program, stored in a readable storage medium, from which at least one processor of the electronic device can read the computer program, the at least one processor executing the computer program causing the electronic device to perform the solution provided by any of the embodiments described above.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (15)

1. A timer-based data processing method, applied to a data structure server, the method comprising:
when a timed task identifier exists in a preset timed task message queue through a Java program, acquiring preset attribute information corresponding to the timed task identifier, starting and executing a timed task corresponding to the timed task identifier according to the preset attribute information, and acquiring execution result information about the timed task; the execution result information comprises a timing task identifier corresponding to the timing task;
and auditing the execution result information corresponding to the timing task identifier to obtain the auditing result information.
2. The method according to claim 1, wherein when a timed task identifier exists in a preset timed task message queue, which is queried through a Java program, acquiring preset attribute information corresponding to the timed task identifier, including:
when a timed task identifier exists in a preset timed task message queue through Java program inquiry, the preset attribute information corresponding to the timed task identifier is determined according to the corresponding relation between the timed task identifier and the preset attribute information.
3. The method of claim 1, wherein before auditing the execution result information corresponding to the timing task identifier to obtain audit result information, the method further comprises:
storing the timing task identification in the execution result information in a result information message queue;
auditing the execution result information corresponding to the timing task identifier to obtain auditing result information, wherein the auditing result information comprises:
querying the timing task identifier in the result information message queue through the Java program, and determining execution result information corresponding to the timing task identifier;
and auditing the execution result information corresponding to the timing task identifier to obtain the auditing result information.
4. The method according to claim 3, wherein the execution result information includes execution result data of the timed task; auditing treatment is carried out on the auditing result information corresponding to the timing task identification to obtain the auditing result information, which comprises the following steps:
if the fact that the execution result information represents that the timing task corresponding to the execution result information is successfully executed is determined, the execution result information and the timing task are correspondingly stored in a preset storage medium, wherein the preset storage medium is a storage medium except a data structure server;
if the fact that the execution result information represents that the timing task corresponding to the execution result information fails to be executed is determined, whether the execution result data is larger than a preset audit value is determined;
if the execution result data is determined to be larger than the preset audit value, correspondingly storing the execution result information and the timing task into a preset storage medium;
and if the execution result data is determined to be less than or equal to the preset audit value, storing the timing task identifier of the timing task corresponding to the execution result information in the timing task message queue.
5. The method of claim 3, further comprising:
and deleting the timing task identifier of the timing task which is audited and processed in the result information message queue.
6. The method according to any one of claims 1-5, further comprising:
inquiring the execution time of the read timing task through a Java program;
when the timing task reaches the execution time, generating a timing task identifier corresponding to the timing task according to preset rule information stored in the Java program;
and establishing and storing a corresponding relation between the timing task identifier and preset attribute information, and storing the timing task identifier in the timing task message queue, wherein the timing task identifier is used for representing a timing task.
7. A timer-based data processing apparatus, the apparatus being applied to a data structure server, the apparatus comprising:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring preset attribute information corresponding to a timing task identifier when the timing task identifier exists in a preset timing task message queue through Java program inquiry;
the execution unit is used for starting and executing the timing task corresponding to the timing task identifier according to the preset attribute information to obtain execution result information about the timing task; the execution result information comprises a timing task identifier corresponding to the timing task;
and the auditing unit is used for auditing the execution result information corresponding to the timing task identifier to obtain the auditing result information.
8. The apparatus according to claim 7, wherein the obtaining unit is specifically configured to:
when a timed task identifier exists in a preset timed task message queue through Java program inquiry, the preset attribute information corresponding to the timed task identifier is determined according to the corresponding relation between the timed task identifier and the preset attribute information.
9. The apparatus of claim 7, wherein the audit unit specifically comprises:
the determining module is used for querying the timing task identifier in the result information message queue through the Java program after the timing task identifier in the execution result information is stored in the result information message queue, and determining the execution result information corresponding to the timing task identifier;
and the auditing module is used for auditing the execution result information corresponding to the timing task identifier to obtain the auditing result information.
10. The apparatus according to claim 9, wherein the execution result information includes execution result data of the timed task; the auditing module comprises:
the first determining submodule is used for correspondingly storing the execution result information and the timing task into a preset storage medium if the execution result information represents that the timing task corresponding to the execution result information is successfully executed, wherein the preset storage medium is a storage medium except a data structure server;
the second determining submodule is used for determining whether the execution result data is greater than a preset audit value or not if the execution result information represents that the timing task corresponding to the execution result information fails to be executed;
a third determining submodule, configured to, if it is determined that the execution result data is greater than the preset audit value, correspondingly store the execution result information and the timed task in a preset storage medium;
and the fourth determining submodule is used for storing the timing task identifier of the timing task corresponding to the execution result information in the timing task message queue if the execution result data is determined to be less than or equal to the preset audit value.
11. The apparatus of claim 9, further comprising:
and the deleting unit is used for deleting the timing task identifier of the timing task which is audited and processed in the result information message queue.
12. The apparatus according to any one of claims 7-11, further comprising:
the query unit is used for querying the execution time of the read timing task through a Java program;
the generating unit is used for generating a timing task identifier corresponding to the timing task according to preset rule information stored in the Java program when the timing task reaches the execution time;
and the establishing unit is used for establishing and storing the corresponding relation between the timed task identifier and preset attribute information, and storing the timed task identifier in the timed task message queue, wherein the timed task identifier is used for representing a timed task.
13. An electronic device, comprising a memory, a processor, a computer program being stored in the memory and being executable on the processor, the processor implementing the method of any of the preceding claims 1-6 when executing the computer program.
14. A computer-readable storage medium having computer-executable instructions stored thereon, which when executed by a processor, perform the method of any one of claims 1-6.
15. A computer program product, characterized in that it comprises a computer program which, when being executed by a processor, carries out the method of any one of claims 1-6.
CN202111243738.7A 2021-10-25 2021-10-25 Data processing method, device and equipment based on timer Pending CN113986577A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111243738.7A CN113986577A (en) 2021-10-25 2021-10-25 Data processing method, device and equipment based on timer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111243738.7A CN113986577A (en) 2021-10-25 2021-10-25 Data processing method, device and equipment based on timer

Publications (1)

Publication Number Publication Date
CN113986577A true CN113986577A (en) 2022-01-28

Family

ID=79741260

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111243738.7A Pending CN113986577A (en) 2021-10-25 2021-10-25 Data processing method, device and equipment based on timer

Country Status (1)

Country Link
CN (1) CN113986577A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103473672A (en) * 2013-09-30 2013-12-25 国家电网公司 System, method and platform for auditing metadata quality of enterprise-level data center
CN110706088A (en) * 2019-09-26 2020-01-17 中电万维信息技术有限责任公司 Charging system and method
EP3693904A1 (en) * 2019-02-06 2020-08-12 Primeconcept S.r.l. Check system of a process subject to execution rules
CN112508526A (en) * 2020-12-15 2021-03-16 中国联合网络通信集团有限公司 Data auditing method and device
CN112596885A (en) * 2020-12-25 2021-04-02 网易(杭州)网络有限公司 Task scheduling method, device, equipment and storage medium
CN113381893A (en) * 2021-06-08 2021-09-10 中国联合网络通信集团有限公司 Method and system for auditing communication service data

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103473672A (en) * 2013-09-30 2013-12-25 国家电网公司 System, method and platform for auditing metadata quality of enterprise-level data center
EP3693904A1 (en) * 2019-02-06 2020-08-12 Primeconcept S.r.l. Check system of a process subject to execution rules
CN110706088A (en) * 2019-09-26 2020-01-17 中电万维信息技术有限责任公司 Charging system and method
CN112508526A (en) * 2020-12-15 2021-03-16 中国联合网络通信集团有限公司 Data auditing method and device
CN112596885A (en) * 2020-12-25 2021-04-02 网易(杭州)网络有限公司 Task scheduling method, device, equipment and storage medium
CN113381893A (en) * 2021-06-08 2021-09-10 中国联合网络通信集团有限公司 Method and system for auditing communication service data

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
郭鹏;纪青莹;: "电信行业自动稽核***的研究与实现", 科技信息, no. 31, 5 November 2011 (2011-11-05), pages 119 - 120 *

Similar Documents

Publication Publication Date Title
EP3041204A1 (en) Method for prompting calling request and device for the same
CN109388625B (en) Method and device for processing configuration file in multi-distributed file system
CN104462296B (en) File management method and device and terminal
CN112003893A (en) Resource downloading method and device
CN115185717B (en) Interface calling method and device, electronic equipment and storage medium
CN107395624B (en) Information processing method and device
CN104951522B (en) Method and device for searching
CN107463419B (en) Application restarting method and device and computer readable storage medium
CN106506808B (en) Method and device for prompting communication message
CN106933111B (en) Method and device for controlling equipment
CN110764847A (en) User information processing method and device, electronic equipment and storage medium
CN106161808B (en) Method and device for updating information of telephone number, terminal equipment and server
CN106658412B (en) Positioning method and device
CN106155696B (en) Method and device for deleting information
CN111241134B (en) Data processing method and device
CN112333233B (en) Event information reporting method and device, electronic equipment and storage medium
CN113986577A (en) Data processing method, device and equipment based on timer
CN116437240A (en) Data information transmission method, device and equipment
CN109067959B (en) Address book management method and device
CN108419119B (en) Cache data clearing method and device
CN114238728B (en) Vehicle data processing method, device and equipment
CN113191792B (en) Task processing method, device, electronic equipment, storage medium and program product
CN110995767B (en) Request processing method and device
CN111601301B (en) Network type display method, storage method, device and storage medium
CN112685061B (en) Access method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination