CN114217979A - Receipt processing method and device, computer equipment and storage medium - Google Patents

Receipt processing method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN114217979A
CN114217979A CN202111559957.6A CN202111559957A CN114217979A CN 114217979 A CN114217979 A CN 114217979A CN 202111559957 A CN202111559957 A CN 202111559957A CN 114217979 A CN114217979 A CN 114217979A
Authority
CN
China
Prior art keywords
processed
lock
document
target
mutual exclusion
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
CN202111559957.6A
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.)
Kingdee Software China Co Ltd
Original Assignee
Kingdee Software China 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 Kingdee Software China Co Ltd filed Critical Kingdee Software China Co Ltd
Priority to CN202111559957.6A priority Critical patent/CN114217979A/en
Publication of CN114217979A publication Critical patent/CN114217979A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores
    • G06F9/526Mutual exclusion algorithms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/176Support for shared access to files; File sharing support
    • G06F16/1767Concurrency control, e.g. optimistic or pessimistic approaches
    • G06F16/1774Locking methods, e.g. locking methods for file systems allowing shared and concurrent access to files

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application relates to a bill processing method, a bill processing device, computer equipment and a storage medium. The method comprises the following steps: acquiring lock acquisition requests corresponding to each to-be-processed data line in a target to-be-processed document; for each lock acquisition request in at least one lock acquisition request, determining whether an allocated mutual exclusion lock corresponding to the current row identifier in the current lock acquisition request exists in a mutual exclusion lock pool; if not, the unallocated mutual exclusion locks in the mutual exclusion lock pool are allocated to the to-be-processed data rows corresponding to the current row identifier in the target to-be-processed document; when each to-be-processed data line in the target to-be-processed document is obtained to obtain a mutual exclusion lock, performing business processing on the target to-be-processed document; and when the service processing is finished, releasing the mutual exclusion lock occupied by each data line in the processed document. By adopting the method, the processing efficiency of the document to be processed can be improved.

Description

Receipt processing method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for processing a document, a computer device, and a storage medium.
Background
With the development of computer technology, different users can modify the same shared data through different applications, for example, a user a can submit a receipt a through a node a in a distributed application to modify the inventory of c materials through the receipt a, and at the same time, a user B can also submit a receipt B through a node B in the distributed application to modify the inventory of c materials through the receipt B.
However, when a plurality of users modify the same shared data through different documents, modification conflicts are easily generated, which leads to modification errors of the shared data and further leads to document processing errors.
Disclosure of Invention
In view of the above, it is necessary to provide a document processing method, apparatus, computer device, computer readable storage medium and computer program product capable of improving the accuracy of document processing.
In a first aspect, the present application provides a document processing method. The method comprises the following steps:
acquiring lock acquisition requests corresponding to each to-be-processed data line in a target to-be-processed document;
for each lock acquisition request in at least one lock acquisition request, determining whether an allocated mutual exclusion lock corresponding to the current row identifier in the current lock acquisition request exists in a mutual exclusion lock pool;
if not, allocating the unallocated mutual exclusion locks in the mutual exclusion lock pool to the to-be-processed data rows corresponding to the current row identifier in the target to-be-processed document;
when each to-be-processed data line in the target to-be-processed document is obtained to obtain a mutual exclusion lock, performing business processing on the target to-be-processed document;
and when the service processing is finished, releasing the mutual exclusion lock occupied by each data line in the processed document.
In one embodiment, when a document submission request is obtained, a target to-be-processed document corresponding to the document submission request is determined; determining at least one to-be-processed data line included by the target to-be-processed document; generating a lock acquisition request corresponding to each to-be-processed data line according to the line identifier of the to-be-processed data line and the bill identifier of the target to-be-processed bill; the method further comprises the following steps: and storing the lock acquisition request into a storage queue.
In one embodiment, when at least one document submission request is acquired, a target to-be-processed document corresponding to each document submission request is determined, and an acquisition lock request corresponding to each to-be-processed data line in each target to-be-processed document is generated; the method further comprises the following steps: determining the request authority corresponding to each target to-be-processed receipt, and determining the arrangement sequence of each lock acquisition request in a storage queue according to the request authority; and storing the lock acquiring requests into a storage queue according to the arrangement sequence.
In one embodiment, traversing the lock acquisition requests in the storage queue according to the arrangement sequence of the lock acquisition requests in the storage queue; and for the current lock acquiring request traversed currently, determining whether the mutual exclusion lock which is distributed and corresponds to the current row identifier in the current lock acquiring request exists in the mutual exclusion lock pool.
In one embodiment, data content in each to-be-processed data line in the target to-be-processed document is acquired; the data content comprises at least one of a total stock value, a stock transfer amount, a total resource value and a resource transfer value; and for each data row to be processed in the multiple data rows to be processed, updating the service data in the preset service database according to at least one of the total stock numerical value, the stock transfer amount, the total resource numerical value and the resource transfer numerical value in the current data row to be processed.
In one embodiment, whether each lock acquisition request corresponding to the target to-be-processed document acquires a mutual exclusion lock within a preset timeout duration is determined; and if the lock acquisition request for not acquiring the mutual exclusion lock within the overtime time exists, releasing the mutual exclusion lock occupied by the to-be-processed data line in the target to-be-processed document.
In one embodiment, a release time point for releasing the mutex is determined; determining a time interval between a current point in time and the release point in time; and when the time interval is matched with the preset waiting time, re-responding to at least one lock acquisition request corresponding to the target document to be processed to obtain the mutual exclusion lock corresponding to each data row to be processed in the target document to be processed.
In a second aspect, the application also provides a document processing device. The device comprises:
the lock acquisition request module is used for acquiring lock acquisition requests corresponding to each to-be-processed data row in the target to-be-processed document;
a mutual exclusion lock allocation module, configured to determine, for each acquired lock request in the at least one acquired lock request, whether a mutual exclusion lock that is already allocated and corresponds to a current row identifier in a current acquired lock request exists in a mutual exclusion lock pool; if not, allocating the unallocated mutual exclusion locks in the mutual exclusion lock pool to the to-be-processed data rows corresponding to the current row identifier in the target to-be-processed document;
the business processing module is used for carrying out business processing on the target to-be-processed document when each to-be-processed data line in the target to-be-processed document obtains a mutual exclusion lock; and when the service processing is finished, releasing the mutual exclusion lock occupied by each data line in the processed document.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor implementing the following steps when executing the computer program:
acquiring lock acquisition requests corresponding to each to-be-processed data line in a target to-be-processed document;
for each lock acquisition request in at least one lock acquisition request, determining whether an allocated mutual exclusion lock corresponding to the current row identifier in the current lock acquisition request exists in a mutual exclusion lock pool;
if not, allocating the unallocated mutual exclusion locks in the mutual exclusion lock pool to the to-be-processed data rows corresponding to the current row identifier in the target to-be-processed document;
when each to-be-processed data line in the target to-be-processed document is obtained to obtain a mutual exclusion lock, performing business processing on the target to-be-processed document;
and when the service processing is finished, releasing the mutual exclusion lock occupied by each data line in the processed document.
In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium has stored thereon a computer program which, when executed by a processor, performs the steps of:
acquiring lock acquisition requests corresponding to each to-be-processed data line in a target to-be-processed document;
for each lock acquisition request in at least one lock acquisition request, determining whether an allocated mutual exclusion lock corresponding to the current row identifier in the current lock acquisition request exists in a mutual exclusion lock pool;
if not, allocating the unallocated mutual exclusion locks in the mutual exclusion lock pool to the to-be-processed data rows corresponding to the current row identifier in the target to-be-processed document;
when each to-be-processed data line in the target to-be-processed document is obtained to obtain a mutual exclusion lock, performing business processing on the target to-be-processed document;
and when the service processing is finished, releasing the mutual exclusion lock occupied by each data line in the processed document.
In a fifth aspect, the present application further provides a computer program product. The computer program product comprising a computer program which when executed by a processor performs the steps of:
acquiring lock acquisition requests corresponding to each to-be-processed data line in a target to-be-processed document;
for each lock acquisition request in at least one lock acquisition request, determining whether an allocated mutual exclusion lock corresponding to the current row identifier in the current lock acquisition request exists in a mutual exclusion lock pool;
if not, allocating the unallocated mutual exclusion locks in the mutual exclusion lock pool to the to-be-processed data rows corresponding to the current row identifier in the target to-be-processed document;
when each to-be-processed data line in the target to-be-processed document is obtained to obtain a mutual exclusion lock, performing business processing on the target to-be-processed document;
and when the service processing is finished, releasing the mutual exclusion lock occupied by each data line in the processed document.
According to the bill processing method, the bill processing device, the computer equipment, the storage medium and the computer program product, through acquiring the lock acquisition requests corresponding to each to-be-processed data row in the target to-be-processed bill, and for each lock acquisition request in at least one lock acquisition request, whether the allocated mutually exclusive lock corresponding to the current row identifier in the current lock acquisition request exists in the mutually exclusive lock pool or not is determined; and if the exclusive lock does not exist, the unallocated exclusive lock in the exclusive lock pool is allocated to the to-be-processed data line corresponding to the current line identifier in the target to-be-processed document, so that when each to-be-processed data line in the target to-be-processed document obtains the exclusive lock, the service processing is carried out on the target to-be-processed document, and the exclusive lock occupied by each data line in the processed document is released when the service processing is finished. Because the exclusive locks are distributed to the current to-be-processed data row in the target to-be-processed document, only one thread is allowed to process the shared data pointed by the current to-be-processed data row in the locking period, and the other threads are not allowed to process the shared data pointed by the current to-be-processed data row according to the other documents, so that the probability of modification conflict when the shared data is modified is greatly reduced, and the document processing accuracy is improved.
In addition, because the mutual exclusion lock is respectively distributed aiming at each data row to be processed in the target document to be processed, but not the mutual exclusion lock is distributed to the whole target document to be processed, the probability of forcibly locking the contents which do not need to be locked can be reduced, and the distribution effectiveness of the mutual exclusion lock is improved.
Drawings
FIG. 1 is a diagram of an application environment of a document processing method in one embodiment;
FIG. 2 is a schematic flow chart diagram of a document processing method in one embodiment;
FIG. 3 is a block diagram illustrating an embodiment of acquiring a mutex;
FIG. 4 is a flow diagram illustrating a process for acquiring a mutex lock on a document according to an embodiment;
FIG. 5 is a diagram illustrating the structure of a target pending document in one embodiment;
FIG. 6 is a block diagram of the structure of a document processing apparatus in one embodiment;
FIG. 7 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The document processing method provided by the embodiment of the application can be applied to the application environment shown in fig. 1. Wherein the terminal 102 may communicate with the server 104 via a network. The terminal 102 and the server 104 may be used alone to execute the document processing method provided in the embodiment of the present application, or may be used in cooperation with the document processing method provided in the embodiment of the present application. Taking an example that the terminal 102 and the server 104 are cooperatively used for executing the document processing method as an example, the terminal 102 is configured to send the lock acquisition request corresponding to each to-be-processed data line in the target to-be-processed document and the target to-be-processed document to the server 104. The server 104 is configured to allocate, according to each lock acquisition request, an unallocated mutex lock in the mutex lock pool to a to-be-processed data row corresponding to the current row identifier in the target to-be-processed document. And when each to-be-processed data line obtains the mutual exclusion lock, the server 104 performs service processing on the target to-be-processed document and returns a service processing result to the terminal 102. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the server 104 may be implemented by an independent server or a server cluster composed of a plurality of servers.
In one embodiment, as shown in fig. 2, a document processing method is provided, which is described by taking the method as an example applied to a computer device, which may be a terminal or a server in fig. 1. The document processing method comprises the following steps:
step 202, acquiring a lock acquisition request corresponding to each to-be-processed data line in the target to-be-processed document.
The acquire lock request may be used to acquire a mutex lock corresponding to a row identifier of a data row to be processed. The line identifier of the data line to be processed is generated according to the shared data pointed by the data line to be processed. For example, when the data content of the data line a in the document 1 is "stock of c materials: 100, respectively; deduction: 10 ", the shared data pointed by the data row a can be considered as" stock of c material "; when the data content of the data line b in the document 2 is "stock of d materials: 200 of a carrier; increase: 20 ", the shared data pointed to by data row b may be considered" stock of d items ". It is readily understood that when the shared data pointed to by the data lines in the two documents is consistent, the line identifications of the data lines in the two documents are also consistent.
In a multi-thread deduction scene of money or inventory, after the data line to be processed acquires the mutual exclusion lock, only one thread can execute deduction operation on shared data pointed by the data line to be processed according to data content in the data line to be processed, and other threads cannot execute deduction operation on the shared data pointed by the data line to be processed, so that the integrity of the shared data is guaranteed. For example, when a user wants to modify shared data through a certain thread, the shared data is locked through the mutex lock, and the state of the shared data is converted into "locked", and at this time, other threads cannot modify the shared data any more. Until the thread releases the mutual exclusion lock, the state of the shared data is converted into 'non-locked', and other threads can not modify the shared data at the moment.
Specifically, after the computer device obtains the target to-be-processed document, the data line in the target to-be-processed document is determined, and the data line in the target to-be-processed document is used as the to-be-processed data line. When the data line to be processed in the target document to be processed is determined, the computer equipment can generate the lock acquisition request corresponding to each data line to be processed according to the document identifier of the target document and the line identifier of the data line to be processed. The document identifier refers to information uniquely identifying a document, for example, the document identifier may be an ID of the document.
In one embodiment, the user may modify the document before submitting the document, for example, the user may modify a part of data in the document, and may obtain a modified target document. And when the user submits the modified target document, forming a document submitting request carrying the target document, wherein the target document is the target document to be processed. And the computer equipment performs business processing on the target document to be processed through the document submitting request to obtain corresponding business data, and updates the target document through the business data.
Step 204, for each acquire lock request in the at least one acquire lock request, determining whether there is an allocated mutex corresponding to the current row identifier in the current acquire lock request in the mutex pool.
When a certain unallocated mutual exclusion lock is randomly allocated to a certain data row, the computer device records the allocated mutual exclusion lock as allocated and records the lock identifier of the mutual exclusion lock and the row identifier of the data row, and obtains the corresponding relation between the allocated mutual exclusion lock and the data row of the acquired lock, so that whether the allocated mutual exclusion lock exists in the mutual exclusion lock pool and the lock corresponding to the current row identifier in the current acquired lock request can be determined subsequently based on the corresponding relation.
For example, if the second row of data in the document 2 and the first row of data in the document 1 point to the same shared data, that is, the second row of data in the document 2 and the first row of data in the document 1 have the same row identifier, the computer device may allocate the mutex lock a to the second row of data in the document 2, and at this time, the computer device records the lock identifier of the mutex lock a and the row identifier of the second row of data in the mutex document 2, so as to obtain a corresponding relationship between the allocated mutex lock and the data row of the acquired lock. When the computer device obtains the lock obtaining request corresponding to the first data row in the document 1, the computer device can determine that the allocated mutual exclusion lock a corresponding to the row identifier of the first data row in the document 1 exists in the mutual exclusion lock pool through the corresponding relation, at this time, the mutual exclusion lock a locks the shared data pointed by the first data row in the document 1, and therefore, the computer device does not allocate the unallocated mutual exclusion lock in the mutual exclusion lock pool to the first data row in the document 1 any more.
Specifically, the computer device sequentially processes the lock acquisition requests stored in the storage queue, and determines, for the current lock acquisition request stored in the storage queue, a current row identifier of a to-be-processed data row corresponding to the current lock acquisition request and a mutex lock corresponding to the current row identifier in the current lock acquisition request. And determining whether the mutual exclusion lock corresponding to the current row identifier in the current lock acquisition request is in an allocated state or not in the mutual exclusion lock pool.
In one embodiment, the computer device may generate a mutual exclusion lock corresponding to each piece of shared data in advance, and store the generated mutual exclusion lock in the mutual exclusion lock pool. The computer equipment sequentially processes the lock acquisition requests stored in the storage queue, and searches a current mutual exclusion lock matched with the current lock acquisition request in a mutual exclusion lock pool aiming at each lock acquisition request in the multiple lock acquisition requests, wherein the matched current mutual exclusion lock is a mutual exclusion lock corresponding to shared data pointed by a data row to be processed corresponding to the current lock acquisition request. Because different pending data rows in different documents may point to the same shared data, a single mutex lock may correspond to multiple acquire lock requests. And if the current mutual exclusion lock is distributed to other data rows to be processed, the current data row to be processed cannot acquire the current mutual exclusion lock matched with the current lock acquisition request.
For example, as shown in FIG. 3, FIG. 3 is a schematic diagram illustrating a structure for acquiring a mutex lock. When the computer equipment acquires the lock acquisition request 2 of the data line a to be processed in the document 2, if a mutex lock matched with the lock acquisition request 2 can be searched in the mutex lock pool, but the mutex lock at the moment is already allocated to the data line a to be processed in the document 1, the data line a to be processed in the document 2 cannot be allocated to the mutex lock matched with the lock acquisition request 2.
And step 206, if the exclusive lock does not exist, the unallocated exclusive lock in the exclusive lock pool is allocated to the to-be-processed data row corresponding to the current row identifier in the target to-be-processed document.
Specifically, when the exclusive lock pool does not have the allocated exclusive lock corresponding to the current row identifier in the current lock acquisition request, the computer device allocates the unallocated exclusive lock in the exclusive lock pool to the to-be-processed data row corresponding to the current row identifier in the target to-be-processed document.
In one embodiment, the computer device extracts the document identifier and the row identifier in the current lock acquisition request, and allocates the unallocated mutual exclusion lock to the corresponding to-be-processed data row in the target to-be-processed document according to the document identifier and the row identifier in the current lock acquisition request.
In one embodiment, when the computer device simultaneously acquires a plurality of target documents to be processed, the computer device may generate a plurality of lock acquisition requests corresponding to each target document to be processed, and store the lock acquisition requests in the storage queue according to the generation time of the lock acquisition requests. The computer equipment can generate the mutual exclusion lock corresponding to each shared data in advance and store the generated mutual exclusion lock into the mutual exclusion lock pool. Therefore, the computer device can traverse the lock acquisition requests in the storage queue according to the arrangement sequence of the lock acquisition requests in the storage queue to obtain the currently traversed current lock acquisition request, and respond to the current lock acquisition request through the mutual exclusion lock pool.
For example, referring to fig. 3, when the computer device obtains a document 1 and a document 2 at the same time, the computer device may first generate an acquiring lock request 1 for a to-be-processed data row a in the document 1, then generate an acquiring lock request 2 according to the to-be-processed data row a in the document 2, and sequentially store the acquiring lock request 1 and the acquiring lock request 2 in the storage queue. Because the lock acquiring request 1 and the lock acquiring request 2 are sequentially stored in the storage queue, the computer device firstly responds to the lock acquiring request 1, searches for a mutex lock matched with the lock acquiring request 1 in a mutex lock pool, namely searches for a mutex lock generated aiming at shared data pointed by a data line a to be processed in the document 1, and distributes the mutex lock to the data line a to be processed in the document 1. The computer device responds to the lock acquisition request 2 again, and at the moment, the mutual exclusion lock matched with the lock acquisition request 2 is distributed to the data line A to be processed in the document 1, so that the computer device does not distribute the data line A to be processed in the document 2 any more.
And step 208, when each to-be-processed data line in the target to-be-processed document obtains the mutual exclusion lock, performing service processing on the target to-be-processed document.
Specifically, the computer device determines whether each to-be-processed data line in the target to-be-processed document acquires the mutex lock. And when each to-be-processed data row in the target to-be-processed document is obtained to obtain the exclusive lock, the computer equipment obtains the data content in each to-be-processed data row in the target to-be-processed document, and updates the service data in the preset service database according to the data content in each to-be-processed data row.
It is easy to understand that, because the mutex lock is allocated to each to-be-processed data row, in the period of time of the lock, if the row identifier of the to-be-processed data row in the other target to-be-processed document is the same as the row identifier of the to-be-processed data row to which the mutex lock is allocated, the computer device cannot process the shared data pointed by the to-be-processed data row in the other target to-be-processed document, thereby reducing the probability of modification conflict when modifying the shared data. The method comprises the steps that when each to-be-processed data line in a target to-be-processed document is obtained and an obtaining lock request is obtained, business processing is carried out on the target to-be-processed document, shared data pointed by each to-be-processed data line can be locked, and therefore the shared data pointed by each to-be-processed data line can be modified when the shared data pointed by each to-be-processed data line is in a locked state. Therefore, the situation that the shared data pointed by the data line to be processed is in an unlocked state but is modified due to the fact that the mutual exclusion lock is not obtained by part of the data line to be processed in the target document to be processed can be reduced, and the probability of modification conflict caused by the fact that the shared data is not locked is further reduced.
Step 210, releasing the mutual exclusion lock occupied by each data row in the processed document when the service processing is finished.
Specifically, when the computer device finishes processing the target to-be-processed document and obtains the processed document, the computer device releases the mutex lock for each data row of the processed document, where the mutex lock is obtained, and at this time, the allocated mutex lock is updated to an unallocated state.
In one embodiment, when the mutual exclusion lock is released, the computer device obtains a corresponding relationship between the currently allocated mutual exclusion lock and the data row of the obtained lock, deletes the lock identifier record of the currently released mutual exclusion lock and the row identifier of the data row of the released mutual exclusion lock in the corresponding relationship, and updates the released mutual exclusion lock to be in an unallocated state.
In the bill processing method, by acquiring lock acquisition requests corresponding to each to-be-processed data line in a target to-be-processed bill, and for each lock acquisition request in at least one lock acquisition request, whether a distributed mutex corresponding to a current line identifier in a current lock acquisition request exists in a mutex pool or not is determined; and if the exclusive lock does not exist, the unallocated exclusive lock in the exclusive lock pool is allocated to the to-be-processed data line corresponding to the current line identifier in the target to-be-processed document, so that when each to-be-processed data line in the target to-be-processed document obtains the exclusive lock, the service processing is carried out on the target to-be-processed document, and the exclusive lock occupied by each data line in the processed document is released when the service processing is finished. Because the exclusive locks are distributed to the current to-be-processed data row in the target to-be-processed document, only one thread is allowed to process the shared data pointed by the current to-be-processed data row in the locking period, and the other threads are not allowed to process the shared data pointed by the current to-be-processed data row according to the other documents, so that the probability of modification conflict when the shared data is modified is greatly reduced, and the document processing accuracy is improved.
In one embodiment, when a document submission request is obtained, a target document to be processed corresponding to the document submission request is determined; determining at least one to-be-processed data line included by a target to-be-processed document; generating a lock acquisition request corresponding to each data line to be processed according to the line identifier of the data line to be processed and the receipt identifier of the target document to be processed; the method further comprises the following steps: and storing the lock acquisition request into a storage queue.
Specifically, when a user submits a document at the terminal, the terminal may generate a document submission request. The document submitting request carries a document submitted by a user. The server can obtain a receipt submitting request sent by the receiving terminal, extract a receipt in the receipt submitting request and take the receipt in the receipt submitting request as a target to-be-processed receipt. And the server generates a lock acquisition request corresponding to each data line to be processed according to the document identification of the target document to be processed and the line identification of each data line to be processed in the target document to be processed, and stores the generated lock acquisition request into a storage queue.
In one embodiment, the server can receive a plurality of document submission requests sent by a plurality of different terminals, extract documents in the document submission requests, and take the documents in the document submission requests as target to-be-processed documents. And for each target to-be-processed document in the multiple target to-be-processed documents, the server determines the lock acquisition request associated with each to-be-processed data line in the current target to-be-processed document according to the document identifier of the current target to-be-processed document and the line identifier of each to-be-processed data line in the current target to-be-processed document. Each pending data line has only a uniquely associated acquire lock request. The lock acquisition request corresponding to each to-be-processed data line is a thread, and the server can sequentially send the lock acquisition requests corresponding to different target to-be-processed documents to the storage queue, so that the lock acquisition requests in the storage queue can be sequentially responded subsequently.
In one embodiment, the computer device may store the acquire lock requests in the store queue according to their generation time sequence. For example, if the document 1 is submitted before the document 2, the lock acquisition requests corresponding to the data row a to be processed, the data row B to be processed, and the data row C to be processed in the document 1 are sequentially stored in the storage queue, and then the lock acquisition requests corresponding to the data row a to be processed, the data row D to be processed, and the data row E to be processed in the document 2 are sequentially stored in the storage queue. And if the document 1 and the document 2 are submitted simultaneously, respectively and randomly storing lock acquisition requests corresponding to the data rows to be processed in the document 1 and the document 2 into a storage queue.
In this embodiment, by determining the document identifier of the target document to be processed and the row identifier of the data row to be processed in the target document to be processed, the lock acquisition request associated with the data row to be processed may be generated based on the document identifier and the row identifier, and the lock acquisition request may be stored in the storage queue. By storing the acquire lock request into the store queue, the acquire lock request in the store queue can be sequentially responded to subsequently.
In one embodiment, when at least one document submission request is acquired, a target to-be-processed document corresponding to each document submission request is determined, and an acquisition lock request corresponding to each to-be-processed data line in each target to-be-processed document is generated, and the method further includes: determining the request authority corresponding to each target document to be processed, and determining the arrangement sequence of each lock acquisition request in the storage queue according to the request authority; and storing the lock acquisition requests into a storage queue according to the arrangement sequence.
Specifically, when different users submit documents at respective terminals, the terminals where the users are located respectively generate corresponding document submission requests, and the server can receive the document submission requests sent by each terminal and determine target documents to be processed corresponding to each document submission request. And the server generates a lock acquisition request corresponding to each to-be-processed data line in each target to-be-processed document according to the document identifier of each target to-be-processed document and the line identifier of each to-be-processed data line in each target to-be-processed document. For each target document to be processed in the plurality of target documents to be processed, the server determines the request permission of the current target document to be processed, and takes the request permission of the current target document to be processed as the request permission of the lock acquisition request corresponding to the current target document to be processed.
For example, if the to-be-processed data row a in the document 1, the document 2 also includes the to-be-processed data row a, and the request right of the document 2 is higher than the request right of the document 1, the order of the lock acquisition requests 2 of the to-be-processed data row a in the document 2 in the storage queue is earlier than the order of the lock acquisition requests 1 of the to-be-processed data row a in the document 1 in the storage queue, when the server simultaneously acquires the document submission requests of the documents 1 and 2, the server stores the lock acquisition requests 2 in the storage queue, and then stores the lock acquisition requests 1 in the storage queue.
In one embodiment, the request permission may be determined according to the urgency of the document submission request, for example, the request permission corresponding to the document submission request with higher urgency is higher than the request permission corresponding to the document submission request with lower urgency. The request permission can also be determined according to the user account making the document submission request, for example, the request permission of the document submission request generated by the high-level user account is higher than that generated by the low-level user account.
In the embodiment, the arrangement sequence of the lock acquisition requests in the storage queue in each target document to be processed is confirmed and determined according to the request permission size corresponding to each target document to be processed, so that the server can preferentially process the lock acquisition requests with higher request permission, and the probability of modification collision when a plurality of users modify shared data simultaneously is reduced because the lock acquisition requests can be processed in sequence according to the arrangement sequence.
In one embodiment, for each acquire lock request of at least one acquire lock request, determining whether there is an allocated mutex corresponding to a current row id in a current acquire lock request in a mutex lock pool, includes: traversing the lock acquisition requests in the storage queue according to the arrangement sequence of the lock acquisition requests in the storage queue; and for the current lock acquiring request traversed currently, determining whether the mutual exclusion lock which is distributed and corresponds to the current row identifier in the current lock acquiring request exists in the mutual exclusion lock pool.
Specifically, the computer device sequentially responds to the lock acquisition requests in the storage queue according to the arrangement sequence of the lock acquisition requests in the storage queue, and for the currently responded current lock acquisition request, the computer device searches whether the assigned mutual exclusion lock exists in the mutual exclusion lock pool and corresponds to the current row identifier in the current lock acquisition request.
In one embodiment, because there may be a plurality of lock acquisition requests of the target to-be-processed document in the storage queue, when the computer device sequentially responds to the lock acquisition requests in the storage queue and determines that there is no assigned exclusive lock corresponding to the current row identifier in the current lock acquisition request in the exclusive lock pool, the computer device determines the current target to-be-processed document corresponding to the current lock acquisition request according to the document identifier in the current lock acquisition request, and assigns the unassigned exclusive lock to the to-be-processed data row corresponding to the current row identifier in the current target to-be-processed document.
In one embodiment, when the computer device acquires a current lock acquisition request in the storage queue, other lock acquisition requests in the storage queue are in a waiting state, and if a to-be-processed data row corresponding to the current lock acquisition request is allocated to a mutex lock, a next lock acquisition request in the storage queue is processed, and the waiting state of the next lock acquisition request is released; until the waiting state of all the lock acquisition requests in the storage queue is released, and the lock acquisition requests are successfully distributed to the mutual exclusion locks corresponding to the row identifiers.
In one embodiment, the computer device obtains the arrangement order of the acquisition lock requests in the storage queue according to the arrangement order of the row identifier of each to-be-processed data row in the current to-be-processed document and the acquisition lock requests corresponding to the row identifiers of the to-be-processed data rows.
For example, referring to fig. 3, when the computer device acquires a plurality of to-be-processed data rows in the document 1, and the row identifiers of the to-be-processed data rows are sequentially arranged as a to-be-processed data row C, a to-be-processed data row B, and a to-be-processed data row a, the computer device sequentially acquires the acquisition lock request corresponding to each to-be-processed data row.
In this embodiment, by determining the arrangement order of the lock acquisition requests in the storage queue, the computer device can process the lock acquisition requests in sequence according to the arrangement order, thereby reducing the probability of missing processing of the lock acquisition requests.
In one embodiment, when each to-be-processed data line in a target to-be-processed document obtains a mutex lock, performing service processing on the target to-be-processed document, including: acquiring data content in each to-be-processed data line in a target to-be-processed document; the data content comprises at least one of a total stock numerical value, a stock transfer amount, a total resource numerical value and a resource transfer numerical value; and for each data row to be processed in the multiple data rows to be processed, updating the service data in the preset service database according to at least one of the total stock numerical value, the stock transfer amount, the total resource numerical value and the resource transfer numerical value in the current data row to be processed.
Specifically, after a user fills in a target document to be processed in the terminal and submits the target document to be processed, the terminal can generate a document submission request corresponding to the target document to be processed. The server determines the data content of each to-be-processed data line in the target to-be-processed document according to the obtained document submission request, and confirms the service data in the preset service database according to the data content of the to-be-processed data line, wherein the service data can be the shared data pointed by the to-be-processed data line. Further, the computer device updates the corresponding service data according to the data content corresponding to each to-be-processed data line, so as to implement the service processing on the target to-be-processed document.
For example, if a resource transfers a pending data action "resource: a; total value of resources: 100 ten thousand yuan; resource transfer value: at 2 ten thousand yuan, the computer equipment updates the total resource value of the service data resource A in the preset service database from 100 to 98.
For example, if the data to be processed in a certain inventory management document is "inventory: b; total number of stocks: 100 pieces; stock transfer amount: and 5 pieces ", the computer equipment updates the stock total value of the service data" stock B "in the preset service database from 100 to 95.
In one embodiment, the computer device may display the update result in the corresponding to-be-processed data row in the target to-be-processed document.
In the embodiment, when the computer equipment determines that each to-be-processed data line in the target to-be-processed document obtains the mutex lock, the data content of the target to-be-processed document is updated, so that modification conflicts generated when multiple users modify the same shared data are avoided, and the document processing accuracy can be improved.
In one embodiment, whether each lock acquisition request corresponding to a target document to be processed acquires a mutual exclusion lock within a preset timeout duration is determined; and if the lock acquisition request for not acquiring the mutual exclusion lock within the overtime time exists, releasing the mutual exclusion lock occupied by the to-be-processed data line in the target to-be-processed document.
For example, as shown in fig. 4, fig. 4 is a schematic flow chart of acquiring a mutex lock by a document. After a user submits a target to-be-processed document at a terminal, the computer equipment determines a plurality of to-be-processed data rows in the target to-be-processed document according to a submission request and determines a lock acquisition request corresponding to each to-be-processed data row, wherein each thread of the computer equipment executes one lock acquisition request, and the execution of the thread has a time-out duration limit. If the computer equipment does not obtain the mutual exclusion lock through the lock obtaining request within the preset timeout duration, namely if the execution of the thread exceeds the timeout duration, the computer equipment releases the mutual exclusion lock occupied by the data row to be processed in the target document to be processed; otherwise, when each to-be-processed data line in the target to-be-processed document acquires the mutex lock, the target to-be-processed document can be subjected to business processing. After the business processing is completed, the target to-be-processed document submitted by the user at the terminal is regarded as successful submission, and at the moment, the computer equipment releases all the mutual exclusion locks in the target to-be-processed document to the mutual exclusion lock pool so as to obtain corresponding mutual exclusion locks in the to-be-processed data rows in other documents in the following process.
In this embodiment, after the to-be-processed data line of the mutex lock is determined not to be acquired within the preset timeout period, the mutex lock occupied by the to-be-processed data line of the mutex lock is released, so that invalid occupation of the mutex lock can be effectively reduced, and each subsequent to-be-processed data line can smoothly acquire the mutex lock.
In one embodiment, a release time point for releasing the mutex is determined; determining a time interval between a current time point and a release time point; and when the time interval is matched with the preset waiting time, re-responding to at least one lock acquisition request corresponding to the target document to be processed to obtain the mutual exclusion lock corresponding to each data row to be processed in the target document to be processed.
Referring to fig. 4, after the mutex lock acquired by each row of data to be processed is released at the same time, the computer device records a release time point of the mutex lock, and waits for a preset duration. After waiting for a preset duration is executed, the computer equipment acquires lock acquisition requests corresponding to each to-be-processed data line in the target to-be-processed document again, and if the to-be-processed data lines in the target to-be-processed document acquire the mutual exclusion lock, the target to-be-processed document can be subjected to business processing; and otherwise, if the to-be-processed data line fails to acquire the mutual exclusion lock, the submission request of the target to-be-processed document is considered to fail. For example, in the above example, when the computer device acquires the lock acquisition request of each to-be-processed data line in the document 1, and no mutex is allocated to the to-be-processed data line a within 1.1 second of the timeout time of the mutex, the computer device releases the mutex occupied by the to-be-processed data line B and the to-be-processed data line C, which have acquired the mutex, in the document 1. After waiting for the preset duration of 1 second is executed, the computer equipment acquires the lock acquisition request corresponding to each to-be-processed data line in the document 1 again, and if the to-be-processed data line A is not allocated with a mutual exclusion lock, the document 1 fails to be submitted.
In one embodiment, the timeout duration for the thread in the computer device to acquire the mutex lock is determined, and the wait duration after the mutex lock is released by the computer device can be obtained by subtracting a preset time value from the timeout duration. For example, the timeout time for executing the current thread is 1.1 seconds, and the preset time value is 0.1 seconds, then the waiting time after the computer device releases the mutex lock is 1 second.
In the embodiment, after waiting for the preset duration, the computer device responds to at least one locking acquisition request corresponding to the target document to be processed again, so that the resources of the computer device can be effectively utilized, the phenomenon of dynamic deadlock is avoided, and the document processing efficiency is improved.
In one embodiment, FIG. 5 is a schematic diagram of a target pending document. As shown in fig. 5, the document 1 includes a plurality of data rows, and if a first data row and a second data row are to-be-processed data rows, other data rows do not need to perform data content processing, so that the computer device only needs to allocate the mutex lock to the first data row and the second data row respectively, and other data rows do not need to allocate the mutex lock, or even directly allocate the mutex lock to the whole target to-be-processed document. Therefore, the probability of forcibly locking the data which does not need to be locked can be reduced, and the distribution effectiveness of the mutual exclusion lock is improved.
It should be understood that, although the steps in the flowcharts related to the embodiments are shown in sequence as indicated by the arrows, the steps are not necessarily executed in sequence as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a part of the steps in the flowcharts related to the above embodiments may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of performing the steps or stages is not necessarily sequential, but may be performed alternately or alternately with other steps or at least a part of the steps or stages in other steps.
Based on the same inventive concept, the embodiment of the application also provides a document processing device for realizing the document processing method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the method, so that specific limitations in one or more embodiments of the document processing device provided below can be referred to as limitations on the document processing method in the foregoing, and details are not described herein again.
In one embodiment, as shown in FIG. 6, there is provided a document processing apparatus 600 comprising: a lock acquisition request module 602, a mutual exclusion lock allocation module 604, a service processing module 606, and a duration determination module 608, where:
the lock acquiring request module 602 is configured to acquire a lock acquiring request corresponding to each to-be-processed data row in the target to-be-processed document.
A mutex lock allocation module 604, configured to determine, for each acquire lock request in the at least one acquire lock request, whether an allocated mutex lock exists in the mutex lock pool and corresponds to a current row identifier in the current acquire lock request; and if not, allocating the unallocated mutual exclusion locks in the mutual exclusion lock pool to the to-be-processed data rows corresponding to the current row identifier in the target to-be-processed document.
The service processing module 606 is configured to perform service processing on the target to-be-processed document when each to-be-processed data line in the target to-be-processed document obtains a mutex lock; and when the service processing is finished, releasing the mutual exclusion lock occupied by each data line in the processed document.
In an embodiment, the acquiring lock request module 602 is configured to determine, when a document submission request is obtained, a target to-be-processed document corresponding to the document submission request; determining at least one to-be-processed data line included by a target to-be-processed document; generating a lock acquisition request corresponding to each data line to be processed according to the line identifier of the data line to be processed and the receipt identifier of the target document to be processed; and storing the lock acquisition request into a storage queue.
In an embodiment, the acquiring lock request module 602 is configured to, when at least one document submission request is acquired, determine a target to-be-processed document corresponding to each document submission request, and generate an acquiring lock request corresponding to each to-be-processed data line in each target to-be-processed document; determining the request authority corresponding to each target document to be processed, and determining the arrangement sequence of each lock acquisition request in the storage queue according to the request authority; and storing the lock acquisition requests into a storage queue according to the arrangement sequence.
In one embodiment, the mutually exclusive lock allocation module 604 is configured to traverse the lock acquisition requests in the storage queue according to the arrangement order of the lock acquisition requests in the storage queue; and for the current lock acquiring request traversed currently, determining whether the mutual exclusion lock which is distributed and corresponds to the current row identifier in the current lock acquiring request exists in the mutual exclusion lock pool.
In one embodiment, the business processing module 606 is configured to obtain data content in each to-be-processed data line in the target to-be-processed document; and for each data row to be processed in the multiple data rows to be processed, updating the service data in the preset service database according to the data content in the current data row to be processed.
In one embodiment, the document processing apparatus 600 further includes a duration determining module 608, configured to determine whether each lock acquisition request corresponding to the target document to be processed acquires a mutex within a preset timeout duration; and if the lock acquisition request for not acquiring the mutual exclusion lock within the overtime time exists, releasing the mutual exclusion lock occupied by the to-be-processed data line in the target to-be-processed document.
In an embodiment, the duration determining module 608 is further configured to determine a release time point for releasing the mutex; determining a time interval between a current time point and a release time point; and when the time interval is matched with the preset waiting time, re-responding to at least one lock acquisition request corresponding to the target document to be processed to obtain the mutual exclusion lock corresponding to each data row to be processed in the target document to be processed.
The modules in the document processing device can be wholly or partially realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a computer device, the internal structure of which may be as shown in fig. 7. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used to store document processing data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program when executed by a processor implements a document processing method.
Those skilled in the art will appreciate that the configuration shown in fig. 7 is a block diagram of only a portion of the configuration associated with the present application and does not constitute a limitation on the computing device to which the present application may be applied, and that a particular computing device may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is further provided, which includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of the above method embodiments when executing the computer program.
In an embodiment, a computer-readable storage medium is provided, in which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method embodiments.
In one embodiment, a computer program product or computer program is provided that includes computer instructions stored in a computer-readable storage medium. The computer instructions are read by a processor of a computer device from a computer-readable storage medium, and the computer instructions are executed by the processor to cause the computer device to perform the steps in the above-mentioned method embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware related to instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high-density embedded nonvolatile Memory, resistive Random Access Memory (ReRAM), Magnetic Random Access Memory (MRAM), Ferroelectric Random Access Memory (FRAM), Phase Change Memory (PCM), graphene Memory, and the like. Volatile Memory can include Random Access Memory (RAM), external cache Memory, and the like. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others. The databases referred to in various embodiments provided herein may include at least one of relational and non-relational databases. The non-relational database may include, but is not limited to, a block chain based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, quantum computing based data processing logic devices, etc., without limitation.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above examples only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims (10)

1. A method of document processing, the method comprising:
acquiring lock acquisition requests corresponding to each to-be-processed data line in a target to-be-processed document;
for each lock acquisition request in at least one lock acquisition request, determining whether an allocated mutual exclusion lock corresponding to the current row identifier in the current lock acquisition request exists in a mutual exclusion lock pool;
if not, allocating the unallocated mutual exclusion locks in the mutual exclusion lock pool to the to-be-processed data rows corresponding to the current row identifier in the target to-be-processed document;
when each to-be-processed data line in the target to-be-processed document is obtained to obtain a mutual exclusion lock, performing business processing on the target to-be-processed document;
and when the service processing is finished, releasing the mutual exclusion lock occupied by each data line in the processed document.
2. The method of claim 1, wherein the obtaining a lock acquisition request corresponding to each row of data to be processed in the target document to be processed comprises:
when a bill submission request is obtained, determining a target to-be-processed bill corresponding to the bill submission request;
determining at least one to-be-processed data line included by the target to-be-processed document;
generating a lock acquisition request corresponding to each to-be-processed data line according to the line identifier of the to-be-processed data line and the bill identifier of the target to-be-processed bill;
the method further comprises the following steps:
and storing the lock acquisition request into a storage queue.
3. The method of claim 1, wherein the obtaining a lock acquisition request corresponding to each row of data to be processed in the target document to be processed comprises:
when at least one document submission request is acquired, determining a target to-be-processed document corresponding to each document submission request, and generating an acquisition lock request corresponding to each to-be-processed data line in each target to-be-processed document;
the method further comprises the following steps:
determining the request authority corresponding to each target to-be-processed receipt, and determining the arrangement sequence of each lock acquisition request in a storage queue according to the request authority;
and storing the lock acquiring requests into a storage queue according to the arrangement sequence.
4. The method of claim 2, wherein determining, for each acquire lock request of the at least one acquire lock request, whether there is an allocated mutex in the mutex pool that corresponds to the current row id of the current acquire lock request comprises:
traversing the lock acquisition requests in the storage queue according to the arrangement sequence of the lock acquisition requests in the storage queue;
and for the current lock acquiring request traversed currently, determining whether the mutual exclusion lock which is distributed and corresponds to the current row identifier in the current lock acquiring request exists in the mutual exclusion lock pool.
5. The method according to claim 1, wherein when each to-be-processed data row in the target to-be-processed document obtains a mutex lock, performing service processing on the target to-be-processed document comprises:
acquiring data content in each to-be-processed data line in the target to-be-processed document;
and for each data row to be processed in the multiple data rows to be processed, updating the service data in the preset service database according to the data content in the current data row to be processed.
6. The method of claim 1, further comprising:
determining whether each lock acquisition request corresponding to the target document to be processed acquires a mutual exclusion lock within a preset timeout duration;
and if the lock acquisition request for not acquiring the mutual exclusion lock within the overtime time exists, releasing the mutual exclusion lock occupied by the to-be-processed data line in the target to-be-processed document.
7. The method of claim 6, further comprising:
determining a release time point for releasing the mutual exclusion lock;
determining a time interval between a current point in time and the release point in time;
and when the time interval is matched with the preset waiting time, re-responding to at least one lock acquisition request corresponding to the target document to be processed to obtain the mutual exclusion lock corresponding to each data row to be processed in the target document to be processed.
8. A document processing apparatus, the apparatus comprising:
the lock acquisition request module is used for acquiring lock acquisition requests corresponding to each to-be-processed data row in the target to-be-processed document;
a mutual exclusion lock allocation module, configured to determine, for each acquired lock request in the at least one acquired lock request, whether a mutual exclusion lock that is already allocated and corresponds to a current row identifier in a current acquired lock request exists in a mutual exclusion lock pool; if not, allocating the unallocated mutual exclusion locks in the mutual exclusion lock pool to the to-be-processed data rows corresponding to the current row identifier in the target to-be-processed document;
the business processing module is used for carrying out business processing on the target to-be-processed document when each to-be-processed data line in the target to-be-processed document obtains a mutual exclusion lock; and when the service processing is finished, releasing the mutual exclusion lock occupied by each data line in the processed document.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202111559957.6A 2021-12-20 2021-12-20 Receipt processing method and device, computer equipment and storage medium Pending CN114217979A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111559957.6A CN114217979A (en) 2021-12-20 2021-12-20 Receipt processing method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111559957.6A CN114217979A (en) 2021-12-20 2021-12-20 Receipt processing method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114217979A true CN114217979A (en) 2022-03-22

Family

ID=80704195

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111559957.6A Pending CN114217979A (en) 2021-12-20 2021-12-20 Receipt processing method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114217979A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117149472A (en) * 2023-10-31 2023-12-01 苏州元脑智能科技有限公司 Communication method, communication device, computer readable storage medium, and electronic apparatus
CN117271148A (en) * 2023-11-21 2023-12-22 苏州旗芯微半导体有限公司 Hardware mutual exclusion lock sharing method and device and computer equipment

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117149472A (en) * 2023-10-31 2023-12-01 苏州元脑智能科技有限公司 Communication method, communication device, computer readable storage medium, and electronic apparatus
CN117149472B (en) * 2023-10-31 2024-02-09 苏州元脑智能科技有限公司 Communication method, communication device, computer readable storage medium, and electronic apparatus
CN117271148A (en) * 2023-11-21 2023-12-22 苏州旗芯微半导体有限公司 Hardware mutual exclusion lock sharing method and device and computer equipment
CN117271148B (en) * 2023-11-21 2024-02-02 苏州旗芯微半导体有限公司 Hardware mutual exclusion lock sharing method and device and computer equipment

Similar Documents

Publication Publication Date Title
KR101959153B1 (en) System for efficient processing of transaction requests related to an account in a database
CN107608773B (en) Task concurrent processing method and device and computing equipment
CN106406983B (en) Task scheduling method and device in cluster
CN110473100B (en) Transaction processing method and device based on blockchain system
TW440769B (en) Parallel file system and method for granting byte range tokens
CN106294190B (en) Storage space management method and device
CN114217979A (en) Receipt processing method and device, computer equipment and storage medium
EP3238421B1 (en) System for high-throughput handling of transactions in data-partitioned, distributed, relational database management system
US8381230B2 (en) Message passing with queues and channels
CN110188110B (en) Method and device for constructing distributed lock
US20200183892A1 (en) Data Transaction Processing Method, Apparatus, and Electronic Device
CN110069346B (en) Method and device for sharing resources among multiple processes and electronic equipment
CN111506436A (en) Method for realizing memory sharing, electronic equipment and shared memory data management library
CN110858162A (en) Memory management method and device and server
CN110971700A (en) Method and device for realizing distributed lock
CN112688799A (en) Client number distribution method and device based on Redis cluster
US20210374583A1 (en) Qubit allocation service
CN113760513A (en) Distributed task scheduling method, device, equipment and medium
CN106936931A (en) The implementation method of distributed lock, relevant device and system
US8707318B2 (en) Partitioning system including a generic partitioning manager for partitioning resources
CN111385294A (en) Data processing method, system, computer device and storage medium
US8543722B2 (en) Message passing with queues and channels
CN114327642A (en) Data read-write control method and electronic equipment
US20180246773A1 (en) Request of an mcs lock by guests
CN110659303A (en) Read-write control method and device for database nodes

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