Batch job status update method, system, apparatus, device, and medium
Patent Information
- Application Number
- CN202211389026.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-08
- Publication Date
- 2026-10-13
- Estimated Expiration
- 2042-11-08
AI Technical Summary
[0005]为解决上述问题,即解决批量作业状态更新过程中大量锁操作所造成的批量调度瓶颈的问题,本申请提供一种批量作业的状态更新方法、系统、装置、设备及介质
[0039]可以理解的,本申请实施例提供的批量作业的状态更新方法、系统、装置、设备及介质,通过在接收到批量作业状态的写进程时,将所述写进程分配至缓存装置,并在所述缓存装置中基于所述写进程更新对应的第一作业状态数据,并在所述第一作业状态数据更新完成后,得到第一作业状态更新数据,然后将所述第一作业状态更新数据存储至存储装置中,所述存储装置用于存储批量作业的作业状态数据或者作业状态更新数据。通过上述方法,本申请无需对状态数据进行加锁,即可实现作业状态的实时更新,有效提高状态数据的读写效率。
Smart Images

Figure CN115794425B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of financial technology, and in particular to a method, system, apparatus, device, and medium for batch operation status updates. Background Technology
[0002] As the level of informatization in the banking and other financial industries continues to improve, a large number of application systems are using batch operations to complete data interaction and synchronization.
[0003] Currently, batch jobs synchronize job status information using a database or a third-party registration and subscription platform such as ZooKeeper. To ensure consistency in job status reading across different nodes, locking of relevant records is required before updating job status, followed by status update and lock release. This locking mechanism generates numerous locking operations when dealing with a large number of jobs, significantly degrading the performance of the database or third-party registration and subscription platform, thus becoming a bottleneck for batch scheduling.
[0004] Therefore, how to effectively avoid a large number of lock operations during batch job status updates in order to improve batch scheduling efficiency is an urgent problem to be solved. Summary of the Invention
[0005] To address the aforementioned issues, namely the bottleneck in batch scheduling caused by numerous lock operations during batch job status updates, this application provides a method, system, apparatus, device, and medium for batch job status updates.
[0006] To achieve the above objectives, this application provides the following technical solution:
[0007] According to one aspect of this application, a method for updating the status of batch jobs is provided, comprising:
[0008] If a write process with a batch job status is received, the write process is allocated to the cache device;
[0009] The cache device updates the corresponding first job status data based on the write process, and after the first job status data is updated, the first job status update data is obtained.
[0010] The first job status update data is stored in a storage device, which is used to store job status data or job status update data for batch jobs.
[0011] In one embodiment, the method further includes:
[0012] If a read process with a batch job status is received, the read process is allocated to the storage device;
[0013] The corresponding second job status data or second job status update data is read from the storage device based on the read process.
[0014] In one implementation, if a read process in batch job status is received, the method further includes the following steps before allocating the read process to the storage device:
[0015] The read process is assigned to the cache device;
[0016] If the cache device does not contain the second job status update data corresponding to the read process, then the step of allocating the read process to the storage device is executed.
[0017] In one implementation, after allocating the read process to the cache device, the method further includes:
[0018] If the cache device contains the second job status update data corresponding to the read process, then the cache device reads the second job status update data based on the read process.
[0019] In one embodiment, before updating the corresponding job status data based on the write process in the cache device, the method further includes:
[0020] If the storage device contains first job status data corresponding to the write process, then the first job status data is retrieved from the storage device.
[0021] Updating the corresponding first job status data in the cache device based on the write process includes: performing a write operation on the retrieved first job status data in the cache device based on the write process.
[0022] In one embodiment, before updating the corresponding job status data based on the write process in the cache device, the method further includes:
[0023] If the storage device does not have the first job status data corresponding to the write process, the step of updating the corresponding job status data based on the write process in the cache device is skipped, and an indication message is generated. The indication message is used to instruct the write process of batch job status to be restarted.
[0024] In one embodiment, after storing the first job status update data in the storage device, the method further includes:
[0025] Delete the first job status update data from the cache device.
[0026] In one implementation, if a write process in batch job status is received, before allocating the write process to the cache device, the method further includes:
[0027] Obtain the identity information of the initiator of the write process. If the initiator's identity information has update permissions, then allocate the write process to the cache device.
[0028] According to a second aspect of this application, a batch job status update system is provided, comprising:
[0029] An allocation device is configured to allocate the write process to a cache device when a write process in a batch job state is received.
[0030] The caching device is configured to update the corresponding first job status data based on the write process, and after the first job status data is updated, obtain the first job status update data and store the first job status update data in the storage device.
[0031] A storage device configured to store job status data or job status update data for batch jobs.
[0032] According to a third aspect of this application, a caching device is provided, comprising:
[0033] The update module is configured to update the corresponding first job status data based on the write process of the batch job status, and obtain the first job status update data after the first job status data is updated.
[0034] The synchronization module is configured to store the first job status update data in a storage device, wherein the storage device is used to store job status data or job status update data of batch jobs.
[0035] According to a fourth aspect of this application, an electronic device is provided, comprising: a memory and a processor;
[0036] The memory stores computer-executed instructions;
[0037] The processor executes computer execution instructions stored in the memory, causing the electronic device to perform the batch job state update method.
[0038] According to a fifth aspect of this application, a computer-readable storage medium is provided, wherein computer-executable instructions are stored therein, which, when executed by a processor, are used to implement the batch job state update method described above.
[0039] It is understood that the batch job status update method, system, apparatus, device, and medium provided in this application, when receiving a write process for the batch job status, allocates the write process to a cache device, updates the corresponding first job status data in the cache device based on the write process, and obtains first job status update data after the first job status data update is completed. Then, the first job status update data is stored in a storage device, which is used to store the batch job status data or job status update data. Through the above method, this application can achieve real-time updates of job status without locking the status data, effectively improving the read and write efficiency of status data. Attached Figure Description
[0040] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0041] Figure 1 This is one of the possible scenario illustrations provided in related technologies;
[0042] Figure 2a This is one of the possible scenario diagrams provided for an embodiment of this application;
[0043] Figure 2b This is a second possible scenario illustration provided for an embodiment of this application;
[0044] Figure 3 A flowchart illustrating a batch job status update method provided in an embodiment of this application;
[0045] Figure 4a One of the flowcharts for another batch job status update method provided in the embodiments of this application;
[0046] Figure 4b A flowchart illustrating another batch job status update method provided in an embodiment of this application;
[0047] Figure 5 A schematic diagram of the structure of a batch job status update system provided in an embodiment of this application;
[0048] Figure 6 This is a schematic diagram of the structure of a caching device provided in an embodiment of this application;
[0049] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0050] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0051] The principle behind batch job status updates is that multiple users can simultaneously read and write to the job status, which can lead to inconsistencies. A solution in related technologies is to lock the status when a write operation occurs, preventing other users from reading or writing to it until the status change is complete. However, if many users concurrently access the status, it can lead to frequent locking, significantly impacting the overall system operation. A diagram illustrating multiple users reading and writing status data is shown below. Figure 1 As shown.
[0052] In view of this, this application provides a batch job status update scheme to address the above-mentioned technical problems. By adding a batch job status cache device before the batch job status storage device, and starting the batch job status update process in the cache device, the latest variables are written into the cache device. When a user needs to update or read the job status, they first access the job status cache device. After the variables representing the job status in the batch job status cache device are successfully written, they are then synchronized to the batch job storage device. The entire process does not require locking the relevant records, thus achieving real-time updates of the job status.
[0053] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in the embodiments of this application will be described in more detail below with reference to the accompanying drawings. In the drawings, the same or similar reference numerals denote the same or similar components or components having the same or similar functions throughout. The described embodiments are some, but not all, embodiments of this application. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0054] Figure 2a and Figure 2b The illustrations provided here are possible scenarios for embodiments of this application. It should be noted that the batch job state update method of this disclosure can be used in the fintech field or related fields. It can also be used in any field other than fintech, and the application field of the batch job state update method of this disclosure is not limited.
[0055] like Figure 2a and Figure 2b As shown, the system includes a server 210 and a first user terminal 220 and a second user terminal 230. The server 210 is electrically connected to the first user terminal 220 and the second user terminal 230, respectively. In this embodiment, the server 210 includes a cache device 211 and a storage device 212. The server 210 is used to receive update requests and read requests for batch job status from user terminals, and allocate the update requests and read requests to the corresponding cache device or storage device for processing. Optionally, the first user terminal 220 is a read request, carrying a read process to read the job status Job2_state, and the second user terminal 230 is an update request, carrying a write process to update the job status Job3_state. The server 210 can first allocate the read process and the write process to the cache device, and perform status updates and reads in the cache device. Optionally, if Job2_state is not present in the cache, the read process is allocated to the storage device for state reading. For example, the cache currently contains the updated job state Job3_state, but not Job2_state, while the storage device contains job states Job1_state, Job2_state, Job3_state, Job4_state, and Job5_state. Optionally, if Job2_state exists in the cache, it is read directly from the cache.
[0056] The first or second user terminal may include, but is not limited to, computers, smartphones, tablets, e-book readers, Moving Picture Experts Group Audio Layer III (MP3) players, Moving Picture Experts Group Audio Layer IV (MP4) players, portable computers, in-vehicle computers, wearable devices, desktop computers, set-top boxes, smart TVs, etc.
[0057] A server can be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.
[0058] Optionally, the number of servers and user terminals can be more or less, and this application embodiment does not limit this. In some embodiments, the user terminals and servers can also act as nodes in a blockchain system, synchronizing the status data of batch jobs to other nodes in the blockchain to enable the widespread application of batch jobs.
[0059] The above provides a brief illustration of the scenario of this application. The following section describes its application... Figure 1 Taking server 210 as an example, this application will explain in detail the batch job status update method provided in the embodiments.
[0060] Please refer to Figure 3 , Figure 3 This is a flowchart illustrating a batch job status update method provided in an embodiment of this application, the method including steps S301-S303.
[0061] Step S301: If a write process in batch job status is received, the write process is allocated to the cache device.
[0062] In this embodiment, the write process in the batch job state is allocated to the cache device for state update, which replaces the related technology of running the read process and write process in the storage device at the same time, and eliminates the need for frequent locking operations.
[0063] As is understandable, a process is a running activity of a program on a certain set of data in a computer, and it is the basic unit for system resource allocation and scheduling. In this embodiment, the write process and read process refer to the processes that perform write and read operations on the job status.
[0064] In one implementation, to effectively improve system security, this embodiment first performs identity verification, and processes the write process when the identity verification is successful. Specifically, if a write process in batch job status is received, before allocating the write process to the cache device (step S301), the following steps may also be included:
[0065] Obtain the identity information of the initiator of the write process. If the initiator's identity information has update permissions, then allocate the write process to the cache device.
[0066] In subsequent processing of the read process, the same method can be used to authenticate the process initiator to improve system security.
[0067] Step S302: Update the corresponding first job status data in the cache device based on the write process, and obtain the first job status update data after the first job status data is updated.
[0068] In one implementation, the cache device is equipped with a status update tool that can initiate updates to the status of batch jobs. Specifically, it updates the corresponding job status data based on the received write process. For example, if the write process is for Job3_state, then the cache device updates the status of Job3_state and obtains the updated Job3_state.
[0069] In some embodiments, if multiple users update the state of Job3_state, that is, when there are multiple write processes for Job3_state, the update process of Job3_state can be performed sequentially or simultaneously in the cache device.
[0070] Furthermore, the job status that needs to be updated in the cache device is retrieved from the storage device. Specifically, before updating the corresponding job status data based on the write process in the cache device (step S302), the following steps are also included:
[0071] If the storage device contains first job status data corresponding to the write process, then the first job status data is retrieved from the storage device.
[0072] In one implementation, after retrieving the first job status data from the storage device, the first job status data is deleted from the storage device. When the user needs to read the status data, he / she needs to wait for the first job status data to be updated and obtain the updated first job status data before reading. The reading can be performed in the cache device or in the storage device, which effectively avoids the situation of inconsistent status data reading and writing to a certain extent.
[0073] In the cache device, the corresponding first job status data is updated based on the write process (step S302), specifically: the first job status data retrieved is written to the cache device based on the write process.
[0074] Understandably, a write operation can be to write new state data and replace the current state data.
[0075] Considering that each business (job) usually has corresponding status data, if the storage device does not have the corresponding status data, it means that the received write process may be erroneous or there may be a duplicate write process. In order to avoid processing the erroneous write process, this embodiment generates an indication message to instruct the write process to be re-initiated. Specifically, if the storage device does not have the first job status data corresponding to the write process, the step of updating the corresponding job status data based on the write process in the cache device is skipped, and an indication message is generated. The indication message is used to instruct the batch job status write process to be re-initiated.
[0076] Step S303: Store the first job status update data in a storage device, wherein the storage device is used to store job status data or job status update data of batch jobs.
[0077] In this embodiment, the storage device stores job status data or job status update data. Users can read the job status based on the storage device, and the generation of each job status update data replaces the old status data accordingly.
[0078] Understandably, the job status update data stored in the storage device is the job status data that has been successfully updated. If the status data in the cache device is not successfully updated, the status update is performed again and stored in the storage device when the update is complete.
[0079] Understandably, this embodiment uses a separate update strategy by updating the state through a caching device, which effectively avoids the situation where other users cannot write or read while a job is being updated by one user. Furthermore, by using a caching device for data updates, there is no need to lock the job state, which effectively avoids lock contention issues caused by multiple users updating the same job. At the same time, all job state reading and updating can be performed directly, which effectively improves the efficiency of the system.
[0080] Please refer to Figure 4a , Figure 4a This is a flowchart illustrating another batch job status update method provided in this application embodiment. Based on the above embodiment, this embodiment provides a method for processing the job status reading process. In addition to steps S301-S303 of the above embodiment, this embodiment also includes steps S401 and S402.
[0081] Step S401: If a read process in batch job status is received, the read process is allocated to the storage device.
[0082] In one implementation, an identification tool can be set up in the server to identify whether the received process is a read process or a write process, and then the read process and write process can be assigned to the corresponding device for processing respectively.
[0083] Step S402: Read the corresponding second job status data or second job status update data in the storage device based on the read process.
[0084] In this embodiment, a caching device is added for state updates, and a storage device is used to provide read operations. By adopting a read-write separation strategy, the write and read processes of batch jobs can be performed synchronously without locking operations, and there is no need to worry about problems such as slow system operation or even crashes caused by locking operations.
[0085] Furthermore, before reading from the storage device, the data is first accessed from the cache device to improve read efficiency. Specifically, this is combined with... Figure 4b As shown, in addition to steps S301-S303 of the above embodiment, the following steps S411-S414 are also included.
[0086] Step S411: If a read process with a batch job status is received, the read process is allocated to the cache device;
[0087] Step S412: If the cache device contains the second job status update data corresponding to the reading process, then the cache device reads the second job status update data based on the reading process.
[0088] Step S413: If the second job status update data corresponding to the read process does not exist in the cache device, then the read process is allocated to the storage device.
[0089] Step S414: Read the corresponding second job status data or second job status update data in the storage device based on the read process.
[0090] Understandably, there is a time lag between the caching device completing the state data update and synchronizing the state update data. When accessing the corresponding state update data, the caching device is accessed first, which can effectively improve the efficiency of reading the data state.
[0091] It should be noted that the implementation principle of steps S301-303 has been described in detail in the above embodiments, and steps S413 and S414 correspond to steps S401 and S402 above, and will not be described again here.
[0092] In one embodiment, to improve the operating capability of the caching device, after storing the first job status update data in the storage device (step S303), the following steps are further included:
[0093] Delete the first job status update data from the cache device.
[0094] In summary, this embodiment writes the latest job status data variables into a cache device. When a user needs to read or update the job status, they first access the (job status) cache device. If the job status cache device has the variable representing the job, it directly returns the result; if the job status cache device does not have the variable representing the job, it directly reads the job status from the batch job storage device. After the variable representing the job status in the batch job status cache device is successfully written, it is synchronized to the batch job storage device. After synchronization is complete, the variable representing the job in the batch job status cache device is deleted. During this process, the storage device only provides read capabilities to users; only the cache device can update the data in the storage device. This avoids the problem of data locking when multiple users read and write the same data.
[0095] Please refer to Figure 5 , Figure 5 A batch job status update system provided in this application embodiment, such as Figure 5 As shown, it includes an allocation device 510, a cache device 520, and a storage device 530, wherein,
[0096] The allocation device 510 is configured to allocate the write process to the cache device when it receives a write process in a batch job state.
[0097] The caching device 520 is configured to update the corresponding first job status data based on the write process, and after the first job status data is updated, obtain the first job status update data and store the first job status update data in the storage device.
[0098] Storage device 530 is configured to store job status data or job status update data for batch jobs.
[0099] In one embodiment, the system further includes:
[0100] The allocation device is further configured to allocate the read process to the storage device when it receives a read process in a batch job state.
[0101] The storage device is further configured to read the corresponding second job status data or second job status update data based on the read process.
[0102] In one embodiment, the allocation device is further configured to allocate the read process to the cache device when a read process with a batch job status is received; and to allocate the read process to the storage device when there is no second job status update data corresponding to the read process in the cache device.
[0103] In one embodiment, the system further includes:
[0104] The caching device is further configured to read the second job status update data based on the reading process when the second job status update data corresponding to the reading process exists in the caching device.
[0105] In one embodiment, the system further includes:
[0106] The retrieval module is configured to retrieve the first job status data from the storage device when the storage device contains the first job status data corresponding to the write process.
[0107] The step of updating the corresponding first job status data based on the write process includes: performing a write operation on the retrieved first job status data based on the write process.
[0108] In one embodiment, the system further includes:
[0109] An indication module is configured to generate an indication message when the storage device does not contain first job status data corresponding to the write process. The indication message is used to instruct the write process to restart the batch job status.
[0110] In one embodiment, the system further includes:
[0111] The deletion module is configured to delete the first job status update data in the cache device.
[0112] In one embodiment, the system further includes:
[0113] The acquisition module is configured to acquire the identity information of the initiator of the write process when it receives a write process in batch job status, and allocate the write process to the cache device when the initiator's identity information has update permissions.
[0114] It should be noted that the system provided in this application can implement all the method steps implemented by the server in the above method embodiments and achieve the same technical effect. Therefore, the parts and beneficial effects that are the same as those in the method embodiments will not be described in detail here.
[0115] This application provides a corresponding caching device, such as... Figure 6 As shown, it includes:
[0116] The update module 521 is configured to update the corresponding first job status data based on the write process of the batch job status, and obtain the first job status update data after the first job status data is updated.
[0117] The synchronization module 522 is configured to store the first job status update data in a storage device, wherein the storage device is used to store job status data or job status update data of batch jobs.
[0118] It should be noted that the caching device provided in this application can implement all the method steps implemented by the caching device in the above method embodiment and achieve the same technical effect. Therefore, the parts and beneficial effects that are the same as those in the method embodiment will not be described in detail here.
[0119] This application also provides an electronic device, such as... Figure 7 As shown, it includes: a memory 71 and a processor 72;
[0120] The memory 71 stores computer-executed instructions;
[0121] The processor 72 executes the computer execution instructions stored in the memory 71, causing the electronic device to perform the batch job state update method.
[0122] It should be noted that the electronic device provided in this application can implement all the method steps implemented by the server in the above method embodiment and achieve the same technical effect. Therefore, the parts and beneficial effects that are the same as those in the method embodiment will not be described in detail here.
[0123] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the batch job state update method.
[0124] This application also provides a computer program product, which includes computer program code. When the computer program code is run on a computer, it causes the computer to execute the batch job state update method.
[0125] This application also provides a chip, including a memory and a processor. The memory is used to store a computer program, and the processor is used to call and run the computer program from the memory to execute the batch job state update method.
[0126] It should be noted that the computer-readable storage medium, computer program product and chip provided in this application can implement all the method steps implemented by the server in the above method embodiments and achieve the same technical effect. Therefore, the parts that are the same as those in the method embodiments and the beneficial effects will not be described in detail here.
[0127] Those skilled in the art will understand that all or some of the steps, systems, and apparatuses disclosed above, and their functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software can be distributed on a computer-readable medium, which may include computer storage media (or non-transitory media) and communication media (or transient media).
[0128] As is known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer.
[0129] Furthermore, as is known to those skilled in the art, communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0130] In the description of the embodiments of this application, the term "and / or" merely indicates a relationship describing the associated objects, meaning that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the term "at least one" indicates any combination of at least two of a plurality of options, for example, including at least one of A, B, and C, which can represent any one or more elements selected from a set including communication between A, B, and C. Furthermore, the term "multiple" means two or more, unless otherwise precisely specified.
[0131] In the description of the embodiments of this application, the terms "first," "second," "third," "fourth," etc. (if present) are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0132] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A method for updating the state of batch jobs, characterized in that, include: If a write process in batch job status is received, the identity information of the initiator of the write process is obtained. If the identity information of the initiator has update permission, the write process is allocated to the cache device. If the storage device contains the first job status data corresponding to the write process, then the first job status data is retrieved from the storage device; the retrieved first job status data is updated in the cache device based on the write process, and after the first job status data is updated, the first job status updated data is obtained. The first job status update data is stored in the storage device; After storing the first job status update data in the storage device, delete the first job status update data in the cache device; The caching device is configured to handle write processes to update job status data, and the storage device is used to store job status data and provide it to read processes. By directing write processes to the caching device, write operations on the caching device and read operations on the storage device are isolated, and the method does not require locking the job status data.
2. The method according to claim 1, characterized in that, Also includes: If a read process with a batch job status is received, the read process is allocated to the storage device; The corresponding second job status data or second job status update data is read from the storage device based on the read process.
3. The method according to claim 2, characterized in that, If a read process with a batch job status is received, before allocating the read process to the storage device, the process further includes: The read process is assigned to the cache device; If the cache device does not contain the second job status update data corresponding to the read process, then the step of allocating the read process to the storage device is executed.
4. The method according to claim 3, characterized in that, After allocating the read process to the cache device, the process further includes: If the cache device contains the second job status update data corresponding to the read process, then the cache device reads the second job status update data based on the read process.
5. The method according to claim 1, characterized in that, Before updating the retrieved first job status data based on the write process in the cache device, the method further includes: If the storage device does not have the first job status data corresponding to the write process, the step of updating the corresponding job status data based on the write process in the cache device is skipped, and an indication message is generated. The indication message is used to instruct the write process of batch job status to be restarted.
6. A batch job status update system, characterized in that, include: The allocation device is configured to, upon receiving a write process in batch job status, obtain the identity information of the initiator of the write process, and allocate the write process to the cache device when the identity information of the initiator has update permissions. The caching device is configured to, upon receiving an assigned write process, retrieve the first job status data from the storage device if the storage device contains the first job status data corresponding to the write process, update the retrieved first job status data based on the write process, obtain the first job status update data after the first job status data update is completed, store the first job status update data in the storage device, and delete the first job status update data in the caching device after storage is completed. The storage device is configured to store job status data of batch jobs and provide it to the reading process for reading; wherein, the cache device is configured to handle the writing process to update the job status data, and the writing process is directed to the cache device by the allocation device, thereby isolating the write operation on the cache device from the read operation on the storage device, and the system does not need to lock the job status data.
7. A buffer device, characterized in that, include: The update module is configured to, upon receiving the write process of the assigned batch job status, retrieve the first job status data from the storage device if the storage device contains the first job status data corresponding to the write process, update the retrieved first job status data based on the write process, and obtain the first job status update data after the first job status data is updated. The synchronization module is configured to store the first job status update data to a storage device; The deletion module is configured to delete the first job status update data in the cache device after storing the first job status update data in the storage device; The cache device is configured to handle write processes to update job status data, and the storage device is used to store job status data and provide it to read processes. By directing write processes to the cache device, write operations on the cache device are isolated from read operations on the storage device, and the cache device does not need to lock the job status data when performing the update operation.
8. An electronic device, characterized in that, include: Memory and processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the electronic device to perform the batch job status update method according to any one of claims 1-5.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the batch job state update method as described in any one of claims 1-5.
Citation Information
Patent Citations
Method for realizing consistency of Redis and MYSQL data based on distributed lock
CN106446037A
State information storage method and device
CN107643942A
Data processing method and device, equipment, storage medium and computer program product
CN115048391A