CN113723892A - Data processing method and device, electronic equipment and storage medium - Google Patents

Data processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113723892A
CN113723892A CN202111071335.9A CN202111071335A CN113723892A CN 113723892 A CN113723892 A CN 113723892A CN 202111071335 A CN202111071335 A CN 202111071335A CN 113723892 A CN113723892 A CN 113723892A
Authority
CN
China
Prior art keywords
target
task
time
target task
pointer
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
CN202111071335.9A
Other languages
Chinese (zh)
Inventor
刘维
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information 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 Beijing Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN202111071335.9A priority Critical patent/CN113723892A/en
Publication of CN113723892A publication Critical patent/CN113723892A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/08Logistics, e.g. warehousing, loading or distribution; Inventory or stock management
    • G06Q10/087Inventory or stock management, e.g. order filling, procurement or balancing against orders
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0631Resource planning, allocation, distributing or scheduling for enterprises or organisations
    • G06Q10/06316Sequencing of tasks or work

Abstract

The present disclosure provides a data processing method, which can be applied to the technical field of computers. The data processing method comprises the following steps: acquiring attribute information of a target task, wherein the attribute information comprises inventory occupation information, trigger time and an execution period corresponding to the target task; adding the target task into a target task queue of a target time wheel according to the attribute information, wherein the target task queue corresponds to the trigger time, and each task slot point in the target time wheel corresponds to one task queue; determining the cycle period of a cycle pointer in the target time wheel according to the execution period; in the event that the loop pointer reaches a task slot point corresponding to the loop period, the target task is deleted in the target task queue and the inventory occupancy associated with the inventory occupancy information is released. The present disclosure also provides a data processing apparatus, a device, a storage medium, and a program product.

Description

Data processing method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a data processing method, apparatus, device, medium, and program product.
Background
When the inventory nodes such as stores or warehouses need replenishment, the purchasing and marketing personnel can make corresponding purchasing plan lists, and the commodities in the purchasing plan lists and the purchasing quantity of the commodities can pre-occupy the inventory quantity. When the purchase planning list is not processed in time, the inventory number cannot be released in time. At present, the purchase planning list which is not processed in time is generally processed by a timing polling mode.
In carrying out the inventive concept of the present disclosure, the inventors found that at least the following problems exist in the related art: under the condition of large data volume, the processing efficiency of the timing polling mode is low, and the timeliness is poor.
Disclosure of Invention
In view of the foregoing, the present disclosure provides methods, apparatuses, devices, media and program products for improving data processing.
According to a first aspect of the present disclosure, there is provided a data processing method including:
acquiring attribute information of a target task, wherein the attribute information comprises inventory occupation information, trigger time and an execution period corresponding to the target task;
adding the target task to a target task queue of a target time wheel according to the attribute information, wherein the target task queue corresponds to the trigger time, and each task slot point in the target time wheel corresponds to one task queue;
determining the cycle period of a cycle pointer in the target time wheel according to the execution period;
and deleting the target task in the target task queue and releasing the inventory occupancy amount associated with the inventory occupancy information when the circulation pointer reaches the task slot point corresponding to the circulation period.
According to the embodiment of the disclosure, the construction method of the target time wheel comprises the following steps:
acquiring a time wheel construction request, wherein the time wheel construction request comprises an annular queue template and a preset cycle period;
responding to the time wheel construction request, and generating an initial time wheel according to the annular queue template and the preset cycle period;
acquiring the cyclic pointer generation request, wherein the cyclic pointer generation request comprises preset interval time information, and the preset interval time information comprises interval time of moving the cyclic pointer by one task slot point in the initial time round;
and responding to the cyclic pointer generation request, and generating the target time wheel according to the preset interval time information and the initial time wheel.
According to an embodiment of the present disclosure, the generating an initial time round according to the circular queue template and the preset cycle period in response to the time round construction request includes:
determining N task slot points according to the preset cycle period, wherein N is more than or equal to 1;
and adding the N task slot points to the annular queue template to generate the initial time wheel.
According to an embodiment of the present disclosure, the generating the target time round according to the preset interval time information and the initial time round in response to the cyclic pointer generation request includes:
determining the movement interval time of the circulating pointer according to the preset interval time information;
generating the cyclic pointer according to the moving interval time;
adding the loop pointer to the initial time wheel, generating the target time wheel.
According to an embodiment of the present disclosure, adding the target task to a target task queue of a target time round according to the attribute information includes:
determining the target task slot point corresponding to the target task according to the trigger time;
determining the target task queue according to the target task slot point;
and adding the target task to the target task queue.
According to an embodiment of the present disclosure, the determining a cycle period of a cycle pointer in the target time wheel according to the execution period includes:
determining the target number of the task slot points corresponding to the execution period on the target time wheel according to the execution period;
determining the cycle period of the cycle pointer according to the target number.
A second aspect of the present disclosure provides a data processing apparatus comprising:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring attribute information of a target task, and the attribute information comprises inventory occupation information, trigger time and an execution period corresponding to the target task;
the adding module is used for adding the target task to a target task queue of a target time wheel according to the attribute information, wherein the target task queue corresponds to the trigger time, and each task slot point in the target time wheel corresponds to one task queue;
the determining module is used for determining the cycle period of the cycle pointer in the target time wheel according to the execution period;
and the deleting module is used for deleting the target task from the target task queue and releasing the inventory occupation amount associated with the inventory occupation information under the condition that the circulation pointer reaches the task slot point corresponding to the circulation period.
A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the above-described data processing method.
A fourth aspect of the present disclosure also provides a computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the above-mentioned data processing method.
A fifth aspect of the present disclosure also provides a computer program product comprising a computer program which, when executed by a processor, implements the above-described data processing method.
According to the embodiment of the disclosure, the target task is added into the target task queue of the time wheel through the trigger time of the target task, the cycle period of the cycle pointer in the time wheel is determined according to the execution period of the target task, and the target task is deleted from the target task queue and the stock occupation amount of the target task is released when the cycle period is reached. Because the target task is deleted according to the delay task corresponding to the execution period in the time wheel, the processing efficiency and the timeliness of the target task can be improved, and the purpose of saving system operation resources is achieved. Therefore, the problems of low treatment efficiency and poor timeliness in the related art are at least partially solved.
Drawings
The foregoing and other objects, features and advantages of the disclosure will be apparent from the following description of embodiments of the disclosure, which proceeds with reference to the accompanying drawings, in which:
fig. 1 schematically shows an application scenario diagram of a data processing method according to an embodiment of the present disclosure.
Fig. 2 schematically shows a flow chart of a data processing method according to an embodiment of the present disclosure.
Fig. 3 schematically shows a flow chart of a method of constructing a target time wheel according to an embodiment of the present disclosure.
Fig. 4 schematically illustrates a schematic diagram of a time wheel according to an embodiment of the disclosure.
Fig. 5 schematically shows a block diagram of a data processing apparatus according to an embodiment of the present disclosure.
Fig. 6 schematically shows a block diagram of an electronic device adapted to implement a data processing method according to an embodiment of the present disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is illustrative only and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B and C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
When a store or a warehouse (hereinafter referred to as an inventory node) needs replenishment, the sales staff inputs commodities and quantity to be purchased and the inventory node needing replenishment through a foreground purchasing system and submits a purchasing plan list, and meanwhile, the total inventory quantity is pre-occupied according to the commodities and the purchasing quantity. In order to ensure the validity of the purchasing data, the purchasing plan usually needs the intervention of a BPM (business process management) approval system, a superior level or an administrator of a purchasing and selling staff is responsible for auditing the purchasing order, the purchasing order can be generated and enters the subsequent process circulation after the approval is successful, the state of the purchasing order is updated to be cancelled when the approval is failed or the approval is overtime (for example, the approval is not overtime in 24 hours), and meanwhile, the stock number occupied by the commodities is released.
At present, the purchase planning list which is not processed in time is generally processed by a timing polling mode. And starting a timing task, running the timing task once every a period of time (for example, 5 minutes), and when the task acquires the overtime purchase schedule, updating the state of the purchase schedule into a cancelled state in batch and respectively releasing the commodity inventory.
However, in the course of implementing the inventive concept of the present disclosure, the inventors found that at least the following problems exist in the related art: under the condition of large data volume, the processing efficiency of the timing polling mode is low, and the timeliness is poor.
The embodiment of the disclosure provides a data processing method, which includes acquiring attribute information of a target task, wherein the attribute information includes inventory occupation information, trigger time and an execution period corresponding to the target task; adding the target task into a target task queue of a target time wheel according to the attribute information, wherein the target task queue corresponds to the trigger time, and each task slot point in the target time wheel corresponds to one task queue; determining the cycle period of a cycle pointer in the target time wheel according to the execution period; in the event that the loop pointer reaches a task slot point corresponding to the loop period, the target task is deleted in the target task queue and the inventory occupancy associated with the inventory occupancy information is released.
Fig. 1 schematically shows an application scenario diagram of a data processing method according to an embodiment of the present disclosure.
As shown in fig. 1, the application scenario 100 according to this embodiment may include a network, a terminal device, and a server. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have installed thereon various communication client applications, such as shopping-like applications, web browser applications, search-like applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (for example only) providing support for websites browsed by users using the terminal devices 101, 102, 103. The background management server may analyze and perform other processing on the received data such as the user request, and feed back a processing result (e.g., a webpage, information, or data obtained or generated according to the user request) to the terminal device.
It should be noted that the data processing method provided by the embodiment of the present disclosure may be generally executed by the server 105. Accordingly, the data processing apparatus provided by the embodiments of the present disclosure may be generally disposed in the server 105. The data processing method provided by the embodiment of the present disclosure may also be executed by a server or a server cluster different from the server 105 and capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Accordingly, the data processing apparatus provided by the embodiment of the present disclosure may also be disposed in a server or a server cluster different from the server 105 and capable of communicating with the terminal devices 101, 102, 103 and/or the server 105.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
The data processing method of the disclosed embodiment will be described in detail below with fig. 2 to 4 based on the scenario described in fig. 1.
Fig. 2 schematically shows a flow chart of a data processing method according to an embodiment of the present disclosure.
As shown in fig. 2, the data processing method of the embodiment includes operations S201 to S204, and the data processing method may be performed by a terminal device and a server.
In operation S201, attribute information of a target task is acquired, wherein the attribute information includes inventory occupancy information, a trigger time, and an execution period corresponding to the target task.
According to embodiments of the present disclosure, the target tasks may include, for example, processing tasks of a procurement schedule, and the like. The inventory occupancy information may include, for example, the goods corresponding to the target task, the quantity, and the inventory nodes that need replenishment, which may include, for example, stores and warehouses. The execution period may include, for example, a processing time limit of the procurement planning sheet corresponding to the target task, etc., which may include, for example, 12 hours, 24 hours, 48 hours, or any other time limit. The trigger time may include, for example, the time of generation of the purchase schedule, etc.
In operation S202, the target task is added to a target task queue of the target time wheel according to the attribute information, where the target task queue corresponds to the trigger time, and each task slot in the target time wheel corresponds to one task queue.
According to embodiments of the present disclosure, the task Slot points may include, for example, Slot (perimeter element expansion Slot) Slot points. Each Slot point may correspond to a task queue, for example, or a Slot point may be an empty Slot point, for example. The content of the Slot points can be set according to the specific implementation needs.
According to embodiments of the present disclosure, the number of task slot points may be determined, for example, according to the average processing time limit of the procurement schedule and the finest time granularity, which may include, for example, the interval time between two adjacent task slot points. For example, if the average processing time limit of the purchase schedule is 12 hours and 1 second is the finest time granularity, then 60 × 60 task slot points can be set on the time round based on the finest time granularity of the average processing time limit. Since the interval time of each slot point is 1 second, and the time wheel has 3600 task slot points, the time of each cycle of the time wheel is 1 hour. When the time wheel is cycled for 12 rounds, the processing time limit of the target task which is 12 hours as the processing time limit is reached.
It should be noted that the foregoing embodiments are only exemplary embodiments, and the number of task slot points may also be determined according to other factors according to specific implementation needs, and the determination manner of the number of task slot points is not specifically limited in this disclosure.
In operation S203, a loop period of the loop pointer in the target time wheel is determined according to the execution period.
According to embodiments of the present disclosure, the cycle period of the cycle hands may include, for example, the number of turns the cycle hands cycle around the time wheel. For example, if the execution period of a certain target task is 15 hours, and the time for which the loop hand makes one turn around the time wheel is 1 hour, the loop period of the loop hand for the target task is 15 turns.
In operation S204, in the case where the loop pointer reaches the task slot point corresponding to the loop period, the target task is deleted in the target task queue, and the stock occupancy amount associated with the stock occupancy information is released.
According to the embodiment of the disclosure, the target task is added into the target task queue of the time wheel through the trigger time of the target task, the cycle period of the cycle pointer in the time wheel is determined according to the execution period of the target task, and the target task is deleted from the target task queue and the stock occupation amount of the target task is released when the cycle period is reached. Because the target task is deleted according to the delay task corresponding to the execution period in the time wheel, the processing efficiency and the timeliness of the target task can be improved, and the purpose of saving system operation resources is achieved. Therefore, the problems of low treatment efficiency and poor timeliness in the related art are at least partially solved.
Fig. 3 schematically shows a flow chart of a method of constructing a target time wheel according to an embodiment of the present disclosure.
As shown in fig. 3, the method includes operations S301 to S304.
In operation S301, a time-round construction request is obtained, wherein the time-round construction request includes a circular queue template and a preset cycle period.
According to an embodiment of the present disclosure, the preset loop period may be determined by, for example, the finest time granularity and the number of task slot points. For example, if the finest time granularity of a certain time round is 1 second and the number of task slot points is 60, the preset cycle period of the time round is 1 minute.
In operation S302, an initial time round is generated according to the circular queue template and a preset cycle period in response to a time round construction request.
According to an embodiment of the disclosure, each task slot point is filled into a circular queue template at a fixed angle, generating an initial time wheel. It should be noted that the angle between adjacent task slots may be determined by, for example, the finest time granularity and the number of task slot points. For example, if the finest time granularity of a certain time wheel is 1 second, the number of task slot points is 60, and the preset cycle period of the time wheel is 1 minute, the angle between adjacent task slot points in the time wheel is 10 degrees.
In operation S303, a circular pointer generation request is acquired, where the circular pointer generation request includes preset interval time information, where the preset interval time information includes an interval time for each movement of the circular pointer by one task slot point in the initial time round.
According to an embodiment of the present disclosure, the circular pointer may include, for example, a logo box or a pointer, or may also include being presented by way of highlighting. The preset interval time information may be, for example, the same as the finest time granularity.
In operation S304, in response to the cyclic pointer generation request, a target time round is generated according to the preset interval time information and the initial time round.
Fig. 4 schematically illustrates a schematic diagram of a time wheel according to an embodiment of the disclosure.
As shown in FIG. 4, the time wheel 400 includes a circular queue 401, task slot points 402, a circular pointer 403, and a task queue 404.
According to an embodiment of the present disclosure, the time wheel 400 has 1S as the minimum time granularity, and 1 hour as the cycle period, then the time wheel 400 includes 3600 task slot points 402. Wherein the circular pointer 403 is identified in the form of an identification box. Each task slot point 402 corresponds to a task queue 404.
According to an embodiment of the present disclosure, generating an initial time round according to a circular queue template and a preset cycle period in response to a time round construction request includes:
and determining N task slot points according to a preset cycle period, wherein N is more than or equal to 1. And adding the N task slot points to the circular queue template to generate an initial time wheel.
According to an embodiment of the present disclosure, the number of task slot points may also be determined, for example, according to a preset cycle period and a finest time granularity. For example, if the finest time granularity of a certain time round is 1 second and the preset cycle period is 1 minute, the number of task slot points of the time round is 60.
According to an embodiment of the disclosure, each task slot point is filled into a circular queue template at a fixed angle, generating an initial time wheel.
According to an embodiment of the present disclosure, generating a target time round according to preset interval time information and an initial time round in response to a cyclic pointer generation request includes:
and determining the movement interval time of the circulating pointer according to the preset interval time information. And generating a circular pointer according to the moving interval time. Adding a circular pointer to the initial time wheel to generate a target time wheel.
According to an embodiment of the present disclosure, the preset interval time information includes an interval time of each movement of the loop pointer by one task slot point in the initial time round, and specifically, the preset interval time information may be, for example, the same as the finest time granularity.
According to an embodiment of the present disclosure, adding the target task to the target task queue of the target time round according to the attribute information includes:
and determining a target task slot point corresponding to the target task according to the trigger time. And determining a target task queue according to the target task slot point. And adding the target task to the target task queue.
According to embodiments of the present disclosure, the trigger time may include, for example, a trigger time of the target task. And each target task can determine a corresponding target task slot point on the time wheel according to the triggering time. Thereby determining a target task queue according to the task slot point. For example, 3600 task slot points are included in the target time round, the minimum time granularity is 1 second, the cycle period of the target time round is 1 hour, and the trigger time of a certain target task is twelve points, zero, five minutes and five seconds. If the task slot point in the 12 o' clock direction of the time wheel is the first task slot point, the task slot point corresponding to the target task is the 305 th task slot point, and the target task queue corresponding to the target task is the task queue corresponding to the 305 th task slot point. And finally, adding the target task to a task queue corresponding to the 305 th task slot point on the target time wheel.
According to an embodiment of the present disclosure, determining a cycle period of a cycle hand in a target time round according to an execution period includes:
and determining the target number of task slot points corresponding to the execution period on the target time wheel according to the execution period. And determining the cycle period of the cycle pointer according to the target number.
According to the embodiment of the disclosure, since the interval time between adjacent task slot points on the time wheel is determined by the minimum time granularity, the target number of task slot points corresponding to the target task can be determined according to the execution period and the minimum time granularity. And because the number of task slot points on the time wheel is fixed, the cycle period of the cycle pointer can be determined according to the target number of task slot points.
For example, if the minimum time granularity of the target time wheel is 1 minute and the number of task slot points is 60, the cycle period of the target time wheel is 1 hour. If the execution period of a certain target task is two hours and fifteen minutes, the number of target task slot points corresponding to the target task is 135, and the cycle period of the cycle pointer is 2.25 cycles around the target time.
Based on the data processing method, the disclosure also provides a data processing device. The apparatus will be described in detail below with reference to fig. 5.
Fig. 5 schematically shows a block diagram of a data processing apparatus according to an embodiment of the present disclosure.
As shown in fig. 5, the data processing apparatus 500 of this embodiment includes a first acquisition module 501, an addition module 502, a determination module 503, and a deletion module 504.
The first obtaining module 501 is configured to obtain attribute information of a target task, where the attribute information includes inventory occupancy information, trigger time, and an execution period corresponding to the target task. In an embodiment, the first obtaining module 501 may be configured to perform the operation S201 described above, which is not described herein again.
An adding module 502, configured to add the target task to a target task queue of the target time wheel according to the attribute information, where the target task queue corresponds to the trigger time, and each task slot in the target time wheel corresponds to one task queue. In an embodiment, the adding module 502 may be configured to perform the operation S202 described above, which is not described herein again.
A determining module 503, configured to determine a cycle period of the cycle pointer in the target time wheel according to the execution period. In an embodiment, the determining module 503 may be configured to perform the operation S203 described above, which is not described herein again.
A deleting module 504, configured to delete the target task from the target task queue and release the inventory occupancy amount associated with the inventory occupancy information when the loop pointer reaches the task slot point corresponding to the loop period. In an embodiment, the deleting module 504 may be configured to perform the operation S204 described above, which is not described herein again.
According to the embodiment of the disclosure, the target task is added into the target task queue of the time wheel through the trigger time of the target task, the cycle period of the cycle pointer in the time wheel is determined according to the execution period of the target task, and the target task is deleted from the target task queue and the stock occupation amount of the target task is released when the cycle period is reached. Because the target task is deleted according to the delay task corresponding to the execution period in the time wheel, the processing efficiency and the timeliness of the target task can be improved, and the purpose of saving system operation resources is achieved. Therefore, the problems of low treatment efficiency and poor timeliness in the related art are at least partially solved.
According to an embodiment of the present disclosure, the data processing apparatus 500 further includes a second obtaining module, a first generating module, a third obtaining module, and a second generating module.
And the second acquisition module is used for acquiring a time wheel construction request, wherein the time wheel construction request comprises a circular queue template and a preset cycle period.
And the first generation module is used for responding to the time wheel construction request and generating an initial time wheel according to the circular queue template and a preset cycle period.
And a third obtaining module, configured to obtain a circular pointer generation request, where the circular pointer generation request includes preset interval time information, and the preset interval time information includes interval time for each time the circular pointer moves by one task slot point in the initial time round.
And the second generation module is used for responding to the cyclic pointer generation request and generating a target time wheel according to the preset interval time information and the initial time wheel.
According to an embodiment of the present disclosure, the first generation module includes a first determination unit and a first addition unit.
The first determining unit is used for determining N task slot points according to a preset cycle period, wherein N is larger than or equal to 1.
And the first adding unit is used for adding the N task slot points to the circular queue template to generate an initial time wheel.
According to an embodiment of the present disclosure, the second generating module includes a second determining unit, a first generating unit, and a second generating unit.
And the second determining unit is used for determining the moving interval time of the circulating pointer according to the preset interval time information.
And the first generation unit is used for generating the cyclic pointer according to the moving interval time.
And the second generation unit is used for adding the circular pointer to the initial time wheel to generate a target time wheel.
According to an embodiment of the present disclosure, the adding module 502 includes a third determining unit, a fourth determining unit, and a second adding unit.
And the third determining unit is used for determining a target task slot point corresponding to the target task according to the trigger time.
And the fourth determining unit is used for determining the target task queue according to the target task slot point.
And the second adding unit is used for adding the target task into the target task queue.
According to an embodiment of the present disclosure, the determining module 503 includes a fifth determining unit and a sixth determining unit.
And the fifth determining unit is used for determining the target number of the task slot points corresponding to the execution cycle on the target time wheel according to the execution cycle.
And a sixth determining unit, configured to determine a cycle period of the cyclic pointer according to the target number.
According to the embodiment of the present disclosure, any plurality of the first obtaining module 501, the adding module 502, the determining module 503, and the deleting module 504 may be combined and implemented in one module, or any one of the modules may be split into a plurality of modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of the other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the first obtaining module 501, the adding module 502, the determining module 503 and the deleting module 504 may be implemented at least partially as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented by hardware or firmware in any other reasonable manner of integrating or packaging a circuit, or implemented by any one of three implementations of software, hardware and firmware, or an appropriate combination of any several of them. Alternatively, at least one of the first obtaining module 501, the adding module 502, the determining module 503 and the deleting module 504 may be at least partially implemented as a computer program module, which when executed may perform a corresponding function.
Fig. 6 schematically shows a block diagram of an electronic device adapted to implement a data processing method according to an embodiment of the present disclosure.
As shown in fig. 6, an electronic device 600 according to an embodiment of the present disclosure includes a processor 601, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. Processor 601 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), among others. The processor 601 may also include onboard memory for caching purposes. Processor 601 may include a single processing unit or multiple processing units for performing different actions of a method flow according to embodiments of the disclosure.
In the RAM 603, various programs and data necessary for the operation of the electronic apparatus 600 are stored. The processor 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. The processor 601 performs various operations of the method flows according to the embodiments of the present disclosure by executing programs in the ROM 602 and/or RAM 603. It is to be noted that the programs may also be stored in one or more memories other than the ROM 602 and RAM 603. The processor 601 may also perform various operations of the method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
Electronic device 600 may also include input/output (I/O) interface 605, input/output (I/O) interface 605 also connected to bus 604, according to an embodiment of the disclosure. The electronic device 600 may also include one or more of the following components connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 as necessary.
The present disclosure also provides a computer-readable storage medium, which may be contained in the apparatus/device/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The computer-readable storage medium carries one or more programs which, when executed, implement the method according to an embodiment of the disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example but is not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to embodiments of the present disclosure, a computer-readable storage medium may include the ROM 602 and/or RAM 603 described above and/or one or more memories other than the ROM 602 and RAM 603.
Embodiments of the present disclosure also include a computer program product comprising a computer program containing program code for performing the method illustrated in the flow chart. When the computer program product runs in a computer system, the program code is used for causing the computer system to realize the item recommendation method provided by the embodiment of the disclosure.
The computer program performs the above-described functions defined in the system/apparatus of the embodiments of the present disclosure when executed by the processor 601. The systems, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
In one embodiment, the computer program may be hosted on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted, distributed in the form of a signal on a network medium, downloaded and installed through the communication section 609, and/or installed from the removable medium 611. The computer program containing program code may be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The computer program, when executed by the processor 601, performs the above-described functions defined in the system of the embodiments of the present disclosure. The systems, devices, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
In accordance with embodiments of the present disclosure, program code for executing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, these computer programs may be implemented using high level procedural and/or object oriented programming languages, and/or assembly/machine languages. The programming language includes, but is not limited to, programming languages such as Java, C + +, python, the "C" language, or the like. The program code may execute entirely on the user computing device, partly on the user device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments and/or claims of the present disclosure may be made without departing from the spirit or teaching of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
The embodiments of the present disclosure have been described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described separately above, this does not mean that the measures in the embodiments cannot be used in advantageous combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be devised by those skilled in the art without departing from the scope of the present disclosure, and such alternatives and modifications are intended to be within the scope of the present disclosure.

Claims (10)

1. A method of data processing, comprising:
acquiring attribute information of a target task, wherein the attribute information comprises inventory occupation information, trigger time and an execution period corresponding to the target task;
adding the target task to a target task queue of a target time wheel according to the attribute information, wherein the target task queue corresponds to the trigger time, and each task slot point in the target time wheel corresponds to one task queue;
determining the cycle period of a cycle pointer in the target time wheel according to the execution period;
and deleting the target task in the target task queue and releasing the inventory occupancy amount associated with the inventory occupancy information when the circulation pointer reaches the task slot point corresponding to the circulation period.
2. The method of claim 1, wherein the target time wheel is constructed by a method comprising:
acquiring a time wheel construction request, wherein the time wheel construction request comprises an annular queue template and a preset cycle period;
responding to the time wheel construction request, and generating an initial time wheel according to the annular queue template and the preset cycle period;
acquiring the cyclic pointer generation request, wherein the cyclic pointer generation request comprises preset interval time information, and the preset interval time information comprises interval time of moving the cyclic pointer by one task slot point in the initial time round;
and responding to the cyclic pointer generation request, and generating the target time wheel according to the preset interval time information and the initial time wheel.
3. The method of claim 2, wherein the generating an initial time round from the circular queue template and the preset loop period in response to the time round build request comprises:
determining N task slot points according to the preset cycle period, wherein N is more than or equal to 1;
and adding the N task slot points to the annular queue template to generate the initial time wheel.
4. The method of claim 2, wherein the generating the target time round according to the preset interval time information and the initial time round in response to the cyclic pointer generation request comprises:
determining the movement interval time of the circulating pointer according to the preset interval time information;
generating the cyclic pointer according to the moving interval time;
adding the loop pointer to the initial time wheel, generating the target time wheel.
5. The method of claim 1, wherein adding the target task to a target task queue of a target time round according to the attribute information comprises:
determining the target task slot point corresponding to the target task according to the trigger time;
determining the target task queue according to the target task slot point;
and adding the target task to the target task queue.
6. The method of claim 1, wherein the determining a cycle period of a cycle pointer in the target time wheel from the execution period comprises:
determining the target number of the task slot points corresponding to the execution period on the target time wheel according to the execution period;
determining the cycle period of the cycle pointer according to the target number.
7. A data processing apparatus comprising:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring attribute information of a target task, and the attribute information comprises inventory occupation information, trigger time and an execution period corresponding to the target task;
the adding module is used for adding the target task to a target task queue of a target time wheel according to the attribute information, wherein the target task queue corresponds to the trigger time, and each task slot point in the target time wheel corresponds to one task queue;
the determining module is used for determining the cycle period of the cycle pointer in the target time wheel according to the execution period;
and the deleting module is used for deleting the target task from the target task queue and releasing the inventory occupation amount associated with the inventory occupation information under the condition that the circulation pointer reaches the task slot point corresponding to the circulation period.
8. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any of claims 1-6.
9. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to perform the method of any one of claims 1 to 6.
10. A computer program product comprising a computer program which, when executed by a processor, implements a method according to any one of claims 1 to 6.
CN202111071335.9A 2021-09-13 2021-09-13 Data processing method and device, electronic equipment and storage medium Pending CN113723892A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111071335.9A CN113723892A (en) 2021-09-13 2021-09-13 Data processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111071335.9A CN113723892A (en) 2021-09-13 2021-09-13 Data processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113723892A true CN113723892A (en) 2021-11-30

Family

ID=78683719

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111071335.9A Pending CN113723892A (en) 2021-09-13 2021-09-13 Data processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113723892A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115658272A (en) * 2022-11-07 2023-01-31 南京金信通信息服务有限公司 ETL task scheduling method, storage medium and electronic device

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104123587A (en) * 2014-04-04 2014-10-29 张涛 Method for steel production contract plan and multi-level inventory matching optimization under MTO-MTS management mode
US20160210589A1 (en) * 2015-01-19 2016-07-21 Aesynt Incorporated Cycle count based inventory management
US20180137462A1 (en) * 2016-11-17 2018-05-17 Freshub Ltd System and a Method for Managing Inventory
US10275738B1 (en) * 2015-12-15 2019-04-30 Symantec Corporation Techniques for handling device inventories
US20190138976A1 (en) * 2017-11-08 2019-05-09 International Business Machines Corporation Automated inventory replenishment
WO2019223529A1 (en) * 2018-05-23 2019-11-28 菜鸟智能物流控股有限公司 Sorting document generating method and apparatus
CN110516990A (en) * 2019-07-18 2019-11-29 浙江子不语电子商务有限公司 A kind of inventory occupies in advance and management system
CN111028009A (en) * 2019-12-10 2020-04-17 中国银行股份有限公司 Method and device for processing retrievable service entity
CN111260272A (en) * 2019-12-02 2020-06-09 泰康保险集团股份有限公司 Method, device, equipment and storage medium for responding to user request based on inventory
CN111680955A (en) * 2020-08-11 2020-09-18 南京云联数科科技有限公司 Method, computing device, and computer storage medium for inventory information processing
CN112486645A (en) * 2020-11-27 2021-03-12 深圳乐信软件技术有限公司 Timed task monitoring method and device, electronic equipment and medium
CN112579263A (en) * 2019-09-29 2021-03-30 北京国双科技有限公司 Task execution method and device, storage medium and electronic equipment
CN113095769A (en) * 2021-05-08 2021-07-09 上海微盟企业发展有限公司 Service inventory management method, device, equipment and readable storage medium
CN113159680A (en) * 2021-04-19 2021-07-23 北京京东振世信息技术有限公司 Inventory pre-occupation method, device, electronic equipment and computer readable medium

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104123587A (en) * 2014-04-04 2014-10-29 张涛 Method for steel production contract plan and multi-level inventory matching optimization under MTO-MTS management mode
US20160210589A1 (en) * 2015-01-19 2016-07-21 Aesynt Incorporated Cycle count based inventory management
US10275738B1 (en) * 2015-12-15 2019-04-30 Symantec Corporation Techniques for handling device inventories
US20180137462A1 (en) * 2016-11-17 2018-05-17 Freshub Ltd System and a Method for Managing Inventory
US20190138976A1 (en) * 2017-11-08 2019-05-09 International Business Machines Corporation Automated inventory replenishment
WO2019223529A1 (en) * 2018-05-23 2019-11-28 菜鸟智能物流控股有限公司 Sorting document generating method and apparatus
CN110516990A (en) * 2019-07-18 2019-11-29 浙江子不语电子商务有限公司 A kind of inventory occupies in advance and management system
CN112579263A (en) * 2019-09-29 2021-03-30 北京国双科技有限公司 Task execution method and device, storage medium and electronic equipment
CN111260272A (en) * 2019-12-02 2020-06-09 泰康保险集团股份有限公司 Method, device, equipment and storage medium for responding to user request based on inventory
CN111028009A (en) * 2019-12-10 2020-04-17 中国银行股份有限公司 Method and device for processing retrievable service entity
CN111680955A (en) * 2020-08-11 2020-09-18 南京云联数科科技有限公司 Method, computing device, and computer storage medium for inventory information processing
CN112486645A (en) * 2020-11-27 2021-03-12 深圳乐信软件技术有限公司 Timed task monitoring method and device, electronic equipment and medium
CN113159680A (en) * 2021-04-19 2021-07-23 北京京东振世信息技术有限公司 Inventory pre-occupation method, device, electronic equipment and computer readable medium
CN113095769A (en) * 2021-05-08 2021-07-09 上海微盟企业发展有限公司 Service inventory management method, device, equipment and readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张毅;: "制造型企业的库存多态性与周转率不确定性研究", 科技致富向导, no. 20, 20 July 2014 (2014-07-20) *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115658272A (en) * 2022-11-07 2023-01-31 南京金信通信息服务有限公司 ETL task scheduling method, storage medium and electronic device
CN115658272B (en) * 2022-11-07 2023-11-21 南京金信通信息服务有限公司 ETL task scheduling method, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
US20190287117A1 (en) Automated receipt parsing to generate recall, warranty, and return notifications
CN112292707A (en) Processing event streams using pattern recognition
CN110738436A (en) method and device for determining available stock
CN113076224B (en) Data backup method, data backup system, electronic device and readable storage medium
CN113723892A (en) Data processing method and device, electronic equipment and storage medium
CN110928594A (en) Service development method and platform
CN111258988A (en) Asset management method, device, electronic device, and medium
US9059992B2 (en) Distributed mobile enterprise application platform
CN108804442B (en) Serial number generation method and device
US20180285911A1 (en) Optimizing profitability in fulfilling website-based order
CN113986258A (en) Service publishing method, device, equipment and storage medium
CN110888583B (en) Page display method, system and device and electronic equipment
CN114140091A (en) Operation record display method, device, equipment and medium
CN113378346A (en) Method and device for model simulation
CN112083945A (en) NPM installation package update prompting method and device, electronic equipment and storage medium
CN113253991A (en) Task visualization processing method and device, electronic equipment and storage medium
CN111861293A (en) Method and apparatus for transmitting information
CN110895777A (en) Method and device for processing overtime service list
CN114969059B (en) Method and device for generating order information, electronic equipment and storage medium
CN113946756A (en) Information recommendation method, device, equipment, medium and program product
US11599860B2 (en) Limit purchase price by stock keeping unit (SKU)
CN113961723A (en) Credit card rights status updating method, device, electronic equipment and storage medium
CN108831012B (en) Vending method and device of vending machine
CN114385170A (en) Form generation method, device, equipment, medium and program product
CN114418702A (en) Method and device for confirming order state to be paid based on time window

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