CN116595017A - Data processing method, device, computer equipment and storage medium - Google Patents

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

Info

Publication number
CN116595017A
CN116595017A CN202310396777.3A CN202310396777A CN116595017A CN 116595017 A CN116595017 A CN 116595017A CN 202310396777 A CN202310396777 A CN 202310396777A CN 116595017 A CN116595017 A CN 116595017A
Authority
CN
China
Prior art keywords
target
data
transaction
current
inventory
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
CN202310396777.3A
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 Deeking Cloud Computing Co ltd
Original Assignee
Kingdee Deeking Cloud Computing 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 Deeking Cloud Computing Co ltd filed Critical Kingdee Deeking Cloud Computing Co ltd
Priority to CN202310396777.3A priority Critical patent/CN116595017A/en
Publication of CN116595017A publication Critical patent/CN116595017A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2365Ensuring data consistency and integrity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2471Distributed queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Computational Linguistics (AREA)
  • Computing Systems (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application relates to a data processing method, a data processing device, computer equipment and a storage medium. The method comprises the following steps: receiving and determining at least two branch transactions based on the business transaction request; acquiring and determining preset data based on target service information; selecting a current checking transaction from the branch transactions in sequence, determining a target stock of a target stock identification of the current checking transaction from a target database, taking current stock data from the target stock based on target business information as current test data, fusing the current test data and preset data to obtain intermediate stock data, and generating a target checking state; when the target checking state is that the test passes, returning to the step of selecting the current checking transaction to obtain intermediate stock data of each branch transaction; and selecting the current execution transaction from the branch transactions in turn, and storing the intermediate stock data of the current execution transaction as target stock data into the corresponding target stock until the operation of each branch transaction is completed. By adopting the method, the execution efficiency of the system service can be improved.

Description

Data processing method, device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a data processing method, apparatus, computer device, and storage medium.
Background
With the development of computer technology, technology in the aspect of inventory data management has emerged. For this aspect of the technology, most of the inventory management systems on the market only manage the inventory access situation of the home enterprise, and the inventory management of the clients is not involved, that is, after the sales business is completed, the clients must take the articles away, that is, the money and goods are cleared. For the case of customer inventory management, a relatively general technical solution is now available in the market: when the customer purchases the article without picking up the article, the sales occupation mode is adopted. The number of customer orders is the occupied system stock quantity, and the occupation is released when the customer extracts the articles.
However, the above prior art cannot realize data isolation and consistency modification between the inventories with data association relationship, so that the execution efficiency of the system business is low.
Disclosure of Invention
Based on the foregoing, it is necessary to provide a data processing method, apparatus, computer device and storage medium capable of implementing different inventory data isolation and consistency modification, so as to improve the execution efficiency of system service.
A method of data processing, the method comprising:
receiving a service handling request, and determining at least two branch transactions based on the service handling request;
acquiring target service information, and determining preset data based on the target service information;
sequentially selecting a current checking transaction from the branch transactions, acquiring a target inventory identification corresponding to the current checking transaction, determining a target inventory corresponding to the target inventory identification from a target database, and reading current inventory data from the target inventory based on the target business information;
taking the current inventory data as current test data, fusing the current test data with the preset data to obtain intermediate inventory data, and generating a target inspection state corresponding to the current inspection transaction;
returning to the step of sequentially selecting the current checking transaction from the branch transactions when the target checking state is the passing of the test, and obtaining intermediate stock data corresponding to each branch transaction;
and sequentially selecting a current execution transaction from the branch transactions, taking intermediate stock data corresponding to the current execution transaction as target stock data, and storing the target stock data into target stock corresponding to the current execution transaction until the operation corresponding to each branch transaction is completed.
In one embodiment, generating the target check state corresponding to the current check transaction includes:
acquiring an execution process state;
when the execution process state is that equipment type problems occur, setting the target checking state as that the test is not passed; when the execution process state is that the data type problem occurs, setting the target checking state as that the test is not passed; when the executing process state is that the network type problem occurs, setting the target checking state as that the test is not passed;
and setting the target checking state as test passing when the executing process state is safe execution.
In one embodiment, the method includes fusing the current inventory data as current test data and the preset data to obtain intermediate inventory data, and generating a target inspection state corresponding to the current inspection transaction, and then further includes:
when the target checking state is that the test fails, taking the selected current checking transaction as a transaction to be rolled back;
sequentially selecting a current rollback transaction from the transactions to be rolled back, and fusing intermediate stock data corresponding to the current rollback transaction with preset data to obtain rollback stock data corresponding to the current rollback transaction;
And returning the step of sequentially selecting the current rollback transaction from the to-be-rolled back transactions to obtain rollback inventory data corresponding to each to-be-rolled back transaction, and completing the recovery operation of each to-be-rolled back transaction.
In one embodiment, fusing the current test data and the preset data to obtain intermediate inventory data includes:
acquiring target inventory change information corresponding to the current check transaction from the service handling request;
determining a target fusion operation from candidate fusion operations based on the target inventory change information, the candidate fusion operations including an increase operation and a decrease operation;
and carrying out the target fusion operation on the current test data and the preset data to obtain the intermediate inventory data.
In one embodiment, a current execution transaction is sequentially selected from the branch transactions, intermediate inventory data corresponding to the current execution transaction is used as target inventory data, the target inventory data is stored in a target inventory corresponding to the current execution transaction, and after operations corresponding to each branch transaction are completed, the method further includes:
generating a target service completion notification, and adding the target service completion notification into a message queue;
Acquiring a target client identifier from the target service information;
based on the target client identifier, a corresponding target service completion notification is obtained from the message queue, and the target service completion notification is sent to a client corresponding to the target client identifier.
In one embodiment, the method further comprises:
receiving an unassociated extraction service handling request, and determining a target extraction transaction based on the unassociated extraction service handling request;
acquiring a target extraction inventory identifier corresponding to the target extraction transaction, and acquiring target extraction business information;
determining a target extraction inventory corresponding to the target extraction inventory identification from the target database;
performing extraction business modification operation on the target extraction inventory based on the target extraction business information to finish operation corresponding to the target extraction business, and generating an extraction completion notification;
and acquiring a target extraction client identifier from the target extraction service information, and sending the extraction completion notification to a client corresponding to the target extraction client identifier.
In one embodiment, the method further comprises:
receiving a query service handling request, and determining a target query transaction based on the query service handling request;
Acquiring a target inquiry inventory identifier corresponding to the target inquiry transaction, and acquiring target inquiry service information;
determining a target query inventory corresponding to the target query inventory identification from the target database;
inquiring the target inquiry inventory based on the target inquiry service information to obtain target inquiry information, and generating a target inquiry notification based on the target inquiry information;
and determining a target query client identifier based on the target query service information, and sending the target query notification to a client corresponding to the target query client identifier.
A data processing apparatus, the apparatus comprising:
the receiving module is used for receiving a service handling request and determining at least two branch transactions based on the service handling request;
the acquisition module is used for acquiring target service information and determining preset data based on the target service information;
the reading module is used for sequentially selecting a current checking transaction from the branch transactions, acquiring a target inventory identification corresponding to the current checking transaction, determining a target inventory corresponding to the target inventory identification from a target database, and reading current inventory data from the target inventory based on the target business information;
The calculation module is used for taking the current inventory data as current test data, fusing the current test data with the preset data to obtain intermediate inventory data, and generating a target inspection state corresponding to the current inspection transaction;
the circulation module is used for returning the step of sequentially selecting the current checking transaction from the branch transactions when the target checking state is the passing of the test, so as to obtain intermediate stock data corresponding to each branch transaction;
the storage module is used for sequentially selecting the current execution transaction from the branch transactions, taking the intermediate stock data corresponding to the current execution transaction as target stock data, storing the target stock data into the target stock corresponding to the current execution transaction, and completing the operation corresponding to each branch transaction.
A computer device comprising a memory storing a computer program and a processor which when executing the computer program performs the steps of:
receiving a service handling request, and determining at least two branch transactions based on the service handling request;
acquiring target service information, and determining preset data based on the target service information;
Sequentially selecting a current checking transaction from the branch transactions, acquiring a target inventory identification corresponding to the current checking transaction, determining a target inventory corresponding to the target inventory identification from a target database, and reading current inventory data from the target inventory based on the target business information;
taking the current inventory data as current test data, fusing the current test data with the preset data to obtain intermediate inventory data, and generating a target inspection state corresponding to the current inspection transaction;
returning to the step of sequentially selecting the current checking transaction from the branch transactions when the target checking state is the passing of the test, and obtaining intermediate stock data corresponding to each branch transaction;
and sequentially selecting a current execution transaction from the branch transactions, taking intermediate stock data corresponding to the current execution transaction as target stock data, and storing the target stock data into target stock corresponding to the current execution transaction until the operation corresponding to each branch transaction is completed.
A computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
Receiving a service handling request, and determining at least two branch transactions based on the service handling request;
acquiring target service information, and determining preset data based on the target service information;
sequentially selecting a current checking transaction from the branch transactions, acquiring a target inventory identification corresponding to the current checking transaction, determining a target inventory corresponding to the target inventory identification from a target database, and reading current inventory data from the target inventory based on the target business information;
taking the current inventory data as current test data, fusing the current test data with the preset data to obtain intermediate inventory data, and generating a target inspection state corresponding to the current inspection transaction;
returning to the step of sequentially selecting the current checking transaction from the branch transactions when the target checking state is the passing of the test, and obtaining intermediate stock data corresponding to each branch transaction;
and sequentially selecting a current execution transaction from the branch transactions, taking intermediate stock data corresponding to the current execution transaction as target stock data, and storing the target stock data into target stock corresponding to the current execution transaction until the operation corresponding to each branch transaction is completed.
The data processing method, the data processing device, the computer equipment and the storage medium are used for determining at least two branch transactions based on a business handling request by receiving the business handling request; acquiring target service information, and determining preset data based on the target service information; sequentially selecting a current checking transaction from the branch transactions, acquiring a target inventory identification corresponding to the current checking transaction, determining a target inventory corresponding to the target inventory identification from a target database, and reading current inventory data from the target inventory based on the target business information; taking the current inventory data as current test data, fusing the current test data with the preset data to obtain intermediate inventory data, and generating a target inspection state corresponding to the current inspection transaction; returning to the step of sequentially selecting the current checking transaction from the branch transactions when the target checking state is the passing of the test, and obtaining intermediate stock data corresponding to each branch transaction; and sequentially selecting a current execution transaction from the branch transactions, taking intermediate stock data corresponding to the current execution transaction as target stock data, and storing the target stock data into target stock corresponding to the current execution transaction until the operation corresponding to each branch transaction is completed. The method comprises the steps of receiving a business handling request, determining at least two corresponding branch matters, acquiring and determining preset data based on target business information, sequentially selecting a current check matter from the branch matters, acquiring target stock identifications corresponding to the current check matter, determining corresponding target stock from a target database based on the target stock identifications, reading current stock data corresponding to the target business information from the target stock, taking the current stock data as current test data, fusing the current test data with the preset data to obtain intermediate stock data, generating a target check state corresponding to the current check matter, when the target check state is a test pass, sequentially selecting the current check matter from the branch matters until each branch matter obtains corresponding intermediate stock data, sequentially taking the intermediate stock data corresponding to each branch matter as the target stock data, storing the intermediate stock data in the corresponding target stock until the operation corresponding to each branch matter is completed, controlling the corresponding branch matters to be either successful or failed simultaneously through distributed control of the branch matters, realizing consistency modification on the corresponding data amount of the target stock data corresponding to different matters, further carrying out the step of selecting the current check matter from the branch matters in sequence, and further, carrying out different inventory data corresponding to different branch matters according to different automatic points, and carrying out different inventory data distribution and good and different object isolation, thereby realizing the realization of the high-efficient inventory-based on the different object-isolation performance of the corresponding object data.
Drawings
FIG. 1 is a diagram of an application environment for a data processing method in one embodiment;
FIG. 2 is a flow diagram of a data processing method in one embodiment;
FIG. 3 is a flow chart illustrating status determination in one embodiment;
FIG. 4 is a schematic flow chart of test failed in one embodiment;
FIG. 5 is a flow diagram of data fusion in one embodiment;
FIG. 6 is a flow diagram of completion notification feedback in one embodiment;
FIG. 7 is a flow diagram of extraction business execution in one embodiment;
FIG. 8 is a flow diagram of query service execution in one embodiment;
FIG. 9 is a schematic diagram of sales and extraction business execution in one embodiment;
FIG. 10 is a schematic diagram of different inventory data interactions in one embodiment;
FIG. 11 is a schematic diagram of data interaction completion in one embodiment;
FIG. 12 is a schematic diagram of an inventory pick-up service in one embodiment;
FIG. 13 is a block diagram of a data processing apparatus in one embodiment;
FIG. 14 is an internal block diagram of a computer device in one embodiment;
fig. 15 is an internal structural view of a computer device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The data processing method provided by the embodiment of the application can be applied to an application environment shown in figure 1. Wherein the terminal 102 communicates with the server 104 via a network. The data storage system may store data that the server 104 needs to process. The data storage system may be integrated on the server 104 or may be located on a cloud or other network server. The terminal 102 is used for inputting and presenting relevant data during execution. The server 104 is configured to receive a service handling request, and determine at least two branch transactions based on the service handling request; acquiring target service information, and determining preset data based on the target service information; sequentially selecting a current checking transaction from the branch transactions, acquiring a target stock identification corresponding to the current checking transaction, determining a target stock corresponding to the target stock identification from a target database, and reading current stock data from the target stock based on target business information; taking the current inventory data as current test data, fusing the current test data with preset data to obtain intermediate inventory data, and generating a target inspection state corresponding to the current inspection transaction; when the target checking state is that the test passes, the step of selecting the current checking transaction from the branch transactions is returned to obtain intermediate stock data corresponding to each branch transaction; and sequentially selecting the current execution transaction from the branch transactions, taking intermediate stock data corresponding to the current execution transaction as target stock data, and storing the target stock data into target stock corresponding to the current execution transaction until the operation corresponding to each branch transaction is completed. The terminal 102 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, internet of things devices, and portable wearable devices. The portable wearable device may be a smart watch, smart bracelet, headset, or the like. The server 104 may be implemented as a stand-alone server or as a server cluster of multiple servers.
In one embodiment, as shown in fig. 2, a data processing method is provided, and the method is applied to the server in fig. 1 for illustration, and includes the following steps:
step S200, a service handling request is received, and at least two branch transactions are determined based on the service handling request.
Wherein the business transaction request refers to a request sent from the terminal to transact a related business, the request relates to modification of a plurality of different inventory data information, such as sales business, and the number of system inventory needs to be deducted and the number of client inventory needs to be increased so as to complete consistency in the deduction of the number of system inventory and the increase of the number of client inventory. The branch transaction refers to inventory data modification operations corresponding to the inventory with association relation in the service handling request, and may refer to the branch transaction in the TCC (acronym of Try, confirm, cancel) distributed transaction, where each branch transaction is required to implement three operations: preprocessing Try, confirming Confirms, canceling Cancel, performing service check and resource reservation by Try operation, performing service confirmation operation by Confirms, and performing rollback operation by Cancel, which is the reverse operation of Try.
Specifically, when the business handled by the user relates to data information of a plurality of different inventories, corresponding branch business is determined according to the business handling request, different branch business corresponds to modification of data information corresponding to different inventories, for example, branch business A realizes modification of data information of inventory A, and branch business B realizes modification of data information of inventory B.
Step S202, obtaining target service information, and determining preset data based on the target service information.
The target business information refers to information related to transacted business, and can include customer identification, commodity change quantity and the like. The preset data refers to the change data corresponding to different branch transactions, the data is used as an intermediate transition value to check whether each branch transaction has an execution problem in the process of completing the corresponding operation, the operations corresponding to different branch transactions are different and can be deduction or addition, but the data change amounts are all data amounts corresponding to the preset data, so that the consistency in the change of the inventory data amounts corresponding to different branch transactions is realized.
In one embodiment, the inventory information corresponding to the store (which may be a commodity) is the only store combined in the inventory table by SKU (Stock Keeping Unit), which may avoid database storage pressure from expansion of the inventory table data in a promotional scenario. The target service information may include information described according to SKU combinations corresponding to the service. The SKU is a coding classification method after product warehousing, and is also the minimum unit of inventory control, for example, the SKU for commodities can contain information on commodity id, commodity brand, commodity code number, commodity color and the like.
Specifically, the target service information includes commodity change data corresponding to the service, and the service is handled, so that corresponding quantity change is required for different inventories corresponding to the service, so as to ensure correct modification of different inventory quantities and better provide other diversified services. The commodity change data is used as preset data, and the preset data is used in the checking operation process of different branch transactions, so that the change of consistency in data quantity corresponding to different branch transactions in the checking process is realized. The checking operation may be a Try operation corresponding to the TCC.
Step S204, selecting current checking transaction from the branch transactions in turn, obtaining a target stock identification corresponding to the current checking transaction, determining a target stock corresponding to the target stock identification from a target database, and reading current stock data from the target stock based on target business information.
Wherein the current checking transaction refers to a branch transaction executed in the current checking process. The target inventory identification refers to a unique identification of the inventory to be modified for the current inspection transaction. The target database refers to a database for storing data information corresponding to different inventories, and realizes the separation of the different inventories. The target inventory refers to the inventory corresponding to the target inventory identification in the target database. The current inventory data refers to inventory data corresponding to target business information currently stored in the target inventory, for example, if the target business information contains the identification of the commodity A, the inventory quantity corresponding to the identification of the commodity A in the target inventory is the corresponding current inventory data.
Specifically, the inventory of the operation corresponding to each branch transaction is different, the execution of different branch transactions has the corresponding sequence, the corresponding sequence is provided to sequentially select the current check transaction from the branch transactions, and the target inventory identification of the inventory to be operated corresponding to the current check transaction is obtained; according to the target inventory identification, determining a target inventory corresponding to the target inventory identification from a target database which divides different inventories, acquiring corresponding commodity identification information from target business information, and determining current inventory data corresponding to the commodity identification information from the target inventory, thereby realizing reading of the corresponding inventory data.
Step S206, the current stock data is used as current test data, the current test data and preset data are fused to obtain intermediate stock data, and a target inspection state corresponding to the current inspection transaction is generated.
The current test data refers to real inventory data used in the current checking transaction checking execution process, and the operation performed on the data is not directly saved in the target database. The fusion refers to the operation of adding, subtracting and the like on the current test data and the preset data. The intermediate stock data refers to data obtained after fusion of the current test data and the preset data, and the fusion operation corresponding to different current inspection transactions is different, and the corresponding current test data is also different, and the corresponding intermediate stock data is also different. The target checking state refers to the execution state of the current checking transaction in the execution process.
Specifically, when the branch transaction is checked, the actual data modification operation is not really executed in the corresponding target database, the current inventory data can be used as the current test data, then the fusion operation corresponding to the current check transaction is performed based on the current test data and the preset data to obtain corresponding intermediate inventory data, for example, the corresponding data in the inventory A is subtracted corresponding to the current check transaction A, the preset data is subtracted from the current test data, and the obtained result is used as the intermediate inventory data; in addition, for the current checking transaction B in the subsequent process, if the data in the inventory B for the current checking transaction B is increased, adding the current testing data corresponding to the current checking transaction B and the preset data to obtain the intermediate inventory data corresponding to the current checking transaction B. And generating a target checking state corresponding to the current checking transaction according to the corresponding executing state of the current checking transaction in the executing process, wherein the target checking state is used for judging whether the checking operation corresponding to the subsequent current checking transaction can be continued or not.
And step S208, returning to the step of sequentially selecting the current checking transaction from the branch transactions when the target checking state is the passing of the test, and obtaining the intermediate stock data corresponding to each branch transaction.
Wherein, the test passing means that the current check transaction has no execution problem in the check execution process.
Specifically, the target checking state corresponding to each current checking transaction may be used to determine whether to perform the checking operation of the corresponding subsequent checking transaction, and once there is a problem in the execution process of the current checking transaction, the execution of the subsequent branch transaction checking operation is stopped, and the data corresponding to the current checking transaction for which the corresponding checking operation has been performed is recovered to the condition before any operation is performed. If the target checking state corresponding to the current checking transaction is the passing of the test, executing the checking operation corresponding to the next branch transaction until the target checking state corresponding to each branch transaction is the passing, obtaining the intermediate stock data corresponding to each branch transaction, and preparing data for actually modifying the data information of the corresponding target stock in the target database. In addition, the corresponding data in the corresponding target database is still the data when the corresponding data is not modified, the data information of the corresponding commodity in the target business information is queried from the target database and is still the original data, and the modified data is not really stored in the target database, so that the queried data is not updated.
Step S210, selecting the current execution transaction from the branch transactions in turn, taking the intermediate stock data corresponding to the current execution transaction as target stock data, and storing the target stock data into the target stock corresponding to the current execution transaction until the operation corresponding to each branch transaction is completed.
The current executing transaction refers to a branch transaction of storing corresponding target inventory data into a target inventory corresponding to a target database, that is, a branch transaction of realizing modification of the corresponding target inventory data in the target database. The target stock data refers to data to be modified corresponding to the target stock corresponding to the current executing transaction, and the modification of the data realizes the record of the data corresponding to the target business in the target stock.
Specifically, when the checking and erasing corresponding to each branch transaction are passed, the modification operation actually performed on the data corresponding to the target stock corresponding to each branch transaction can be executed, so that the operation corresponding to each branch transaction is actually realized, the consistency modification of the data corresponding to different stocks is completed, the modified data actually exist in the target database, at this time, the data in the corresponding different stocks in the target database can be queried, and the queried data is updated.
According to the data processing method, through receiving a service handling request, at least two branch transactions are determined based on the service handling request; acquiring target service information, and determining preset data based on the target service information; sequentially selecting a current checking transaction from the branch transactions, acquiring a target stock identification corresponding to the current checking transaction, determining a target stock corresponding to the target stock identification from a target database, and reading current stock data from the target stock based on target business information; taking the current inventory data as current test data, fusing the current test data with preset data to obtain intermediate inventory data, and generating a target inspection state corresponding to the current inspection transaction; when the target checking state is that the test passes, returning to the step of selecting the current checking transaction from the branch transactions in sequence to obtain intermediate stock data corresponding to each branch transaction; the method comprises the steps of sequentially selecting a current execution transaction from branch transactions, taking intermediate inventory data corresponding to the current execution transaction as target inventory data, storing the target inventory data into target inventory corresponding to the current execution transaction until operations corresponding to all branch transactions are completed, controlling all branch transactions to be successful or failed simultaneously through distributed control of the branch transactions, realizing consistency modification on data quantity corresponding to the target inventory data corresponding to different branch things, and automatically distinguishing the same target database by inventory, namely distinguishing different inventories through inventory identifications corresponding to different inventories, realizing data isolation of different inventories, and efficiently realizing consistency modification of the target inventory data corresponding to different branch things according to data isolation of different inventories when distributed execution is performed, so that the execution efficiency of system business is improved.
In one embodiment, as shown in fig. 3, step S206 includes:
step S300, obtain the status of the execution process.
Wherein, the execution process state refers to the state sum of the execution processes occurring in the process of executing the corresponding checking operation of the current checking transaction.
Specifically, when the checking operation corresponding to the current checking transaction is executed, a corresponding execution condition/execution state record is provided, and a data basis is provided for whether to execute the backward branch transaction corresponding to the current checking transaction by acquiring the corresponding execution process state.
Step S302, when the execution process state is that the equipment type problem occurs, setting the target checking state as that the test is not passed; when the execution process state is that the data type problem occurs, setting the target checking state as that the test is not passed; when the execution process state is that a network type problem occurs, the target checking state is set to be that the test fails.
The device type problem refers to a problem that a corresponding current check transaction cannot be normally executed and a service handling request cannot be realized because of a problem in the aspect of the device, such as a fault of an infrastructure. The data type problem refers to the problem that the current checking transaction cannot be normally executed due to the fact that the data is related in the executing process, such as insufficient stock, abnormal data and the like. The network type problem refers to a problem that the current checking transaction cannot be normally performed due to the network communication problem.
Specifically, various problems may exist in the execution process of each branch transaction, in order to ensure that each branch transaction either modifies corresponding inventory information simultaneously or fails to modify simultaneously, a corresponding checking operation needs to be executed before a corresponding database information modifying operation is actually executed, so that problems in aspects of infrastructure faults such as database downtime, redis, elasticsearch, MQ and the like or insufficient resources and the like are avoided, that is, problems in aspects of equipment types, data types, network types and the like are avoided, and when corresponding abnormal execution conditions occur, a target checking state corresponding to a current checking transaction is set to be not passed, so that consistency of whether inventory corresponding to each branch transaction is modified or not is ensured.
In step S304, when the execution process state is safe execution, the target inspection state is set to pass the test.
Specifically, when no abnormal state occurs in the execution process corresponding to the current checking transaction, i.e. when the current checking transaction is executed safely, the operation corresponding to the current checking transaction can be executed normally, the modification of the inventory information corresponding to the current checking transaction is realized, the corresponding target checking state is set to pass the test, and judgment data is provided for whether the checking operation of the subsequent branch transaction is started or not.
In this embodiment, by acquiring the execution process state, when the execution process state is that a problem such as a device type, a data type, or a network type occurs, the target inspection state is set to be failed in the test, and when the execution process state is that the execution process is safe, the target inspection state is set to be passed in the test, and a judgment basis is provided for whether the subsequent branch transaction can perform the corresponding inspection operation or not through the target inspection state corresponding to the current inspection transaction, so that it is ensured that each branch transaction finally realizes the consistent modification of the corresponding inventory data, and the security of executing the corresponding operation by each branch transaction is improved.
In one embodiment, as shown in fig. 4, after step S206, the method further includes:
step S400, when the target checking state is that the test fails, the selected current checking transaction is used as the transaction to be rolled back.
The to-be-rolled-back transaction refers to a branch transaction with abnormal execution when the checking operation is executed, and the rolling-back transaction refers to the operation of releasing the reserved resource or the operation of restoring the changed data to the original state.
Specifically, when the target checking state corresponding to the current checking transaction is that the test fails, it is indicated that the execution of the current checking transaction has an abnormal problem, and the simultaneous successful execution of each branch transaction cannot be realized, and the continuous execution of the checking operation of the subsequent branch transaction can be terminated, and the current checking transaction which has undergone the checking operation is taken as a transaction to be rolled back, so that reserved resources corresponding to the transactions to be rolled back are released, and each transaction to be rolled back is rolled back to the original state according to the logic of the previous checking operation. The rollback operation may be a cancer operation corresponding to a TCC.
Step S402, selecting the current rollback transaction from the transactions to be rolled back in sequence, and fusing the intermediate stock data corresponding to the current rollback transaction with preset data to obtain the rollback stock data corresponding to the current rollback transaction.
Where the current rollback transaction refers to a branch transaction that is currently undergoing a rollback operation. The rollback inventory data refers to inventory data obtained after the rollback operation is performed, which is consistent with the corresponding data size when the inspection operation is not performed at the original time.
Specifically, when performing a rollback operation on a to-be-rolled transaction, a current rollback transaction may be sequentially selected from the to-be-rolled transactions according to an order corresponding to a branch transaction when performing an inspection operation, where the current rollback transaction performs data rollback according to reverse logic of the corresponding current inspection transaction, that is, data recovery, for example, if the intermediate inventory data 1900 is obtained by subtracting the preset data 10 from the current test data 1910 in the inspection process, the rollback inventory data 1910 is obtained by adding the preset data 10 to the intermediate inventory data 1900 in the rollback process, and at this time, the preset data is also changed to 0 in the initial stage, so that release of reserved resources is realized, reset of preset data that needs to be changed is illustrated, corresponding inventory freezing is released, and rollback operation corresponding to the corresponding current rollback transaction is implemented.
Step S404, returning to the step of selecting the current rollback transaction from the to-be-rolled back transactions in turn, obtaining rollback inventory data corresponding to each to-be-rolled back transaction, and completing the recovery operation of each to-be-rolled back transaction.
Specifically, in order to ensure that each branch transaction having performed the checking operation can complete the corresponding rollback operation, the reserved resources of the corresponding transaction to be rolled back need to be released in sequence according to the corresponding sequence when the checking operation is performed, so as to implement the data recovery operation corresponding to each transaction to be rolled back. After the recovery operation of each to-be-rolled-back transaction is completed, an execution failure notification can be generated based on the target checking state corresponding to the to-be-rolled-back transaction, namely when an abnormal condition occurs in the process of executing the checking operation by one branch transaction, the follow-up execution of the checking operation of the subsequent branch transaction is terminated, the transaction which has already undergone the checking operation is rolled back, then the notification information containing the abnormal problem is generated according to the execution to obtain the target checking state, so as to inform relevant technicians of the abnormal execution, and analysis is performed according to clues provided in the execution failure notification, so that the corresponding problem is solved.
In this embodiment, when the target inspection status is that the test fails, the selected current inspection transaction is used as a to-be-rolled transaction, the current rolling transaction is sequentially selected from the to-be-rolled transactions, the intermediate inventory data corresponding to the current rolling transaction and the preset data are fused to obtain the rolling inventory data corresponding to the current rolling transaction, the step of sequentially selecting the current rolling transaction from the to-be-rolled transactions is returned to obtain the rolling inventory data corresponding to each to-be-rolled transaction, the recovery operation of each to-be-rolled transaction is completed, the failure together of each branch transaction is realized, and the balance among the data corresponding to the associated service in different inventories corresponding to each branch transaction is ensured.
In one embodiment, as shown in fig. 5, after step S404, the method further includes:
step S500, obtaining target inventory change information corresponding to the current check transaction from the business handling request.
Wherein the target inventory change information refers to information indicating whether to increase or decrease the related data in the target inventory.
Specifically, the service handling request includes information of fusion operation of increasing or decreasing data of the inventory corresponding to each branch transaction under the current service, that is, target inventory change information. The current checking transaction can determine the corresponding fusion operation according to the corresponding target inventory change information, so that the modification of the data in the inventory corresponding to the current checking transaction is realized. The target stock change information corresponding to different current inspection transactions may be the same or different, for example, the target stock change information corresponding to the current inspection transaction a is stock reduction; the target stock change information corresponding to the current checking transaction B is an added stock; the target inventory change information corresponding to the current check transaction C is a reduced inventory.
Step S502, determining a target fusion operation from candidate fusion operations based on the target inventory change information, the candidate fusion operations including an increasing operation and a decreasing operation.
Wherein the candidate fusion operation refers to an alternative way of performing the fusion operation. The target fusion operation refers to the fusion operation of related data in the target inventory corresponding to the current checking transaction. The adding operation refers to an operation of adding data so as to increase inventory data. The reducing operation refers to an operation of subtracting data so as to reduce inventory data.
Specifically, different current checking transactions correspond to different target inventory change information, and specific operations of fusing current test data and preset data can be determined according to the target inventory change information. The candidate fusion operation comprises an increasing operation and a decreasing operation, and the current test data corresponding to the current checking transaction and the target fusion operation corresponding to the preset data are determined from the candidate fusion operation according to the target inventory change information, so that the increase or decrease of related data in different inventories corresponding to different current checking transactions is realized.
Step S504, performing target fusion operation on the current test data and the preset data to obtain intermediate inventory data.
Specifically, the target fusion operation can realize the increase and decrease of relevant data in the inventory corresponding to the current inspection transaction, and the target fusion operation determines whether to increase or decrease the operation according to the requirement to be realized by the current inspection transaction, that is, the target fusion operation corresponding to different current inspection transactions may be different or the same, and the target fusion operation can be performed on the current test data and the preset data, so as to obtain intermediate inventory data corresponding to the current inspection transaction.
In this embodiment, the target inventory change information corresponding to the current inspection transaction is obtained from the service handling request, the target fusion operation is determined from the candidate fusion operations based on the target inventory change information, the candidate fusion operations include an increasing operation and a decreasing operation, the current test data and the preset data are subjected to the target fusion operation, and the intermediate inventory data are obtained, so that different fusion operations corresponding to different current inspection transactions are realized, that is, a consistent operation of increasing inventory data and reducing inventory data in one service is realized, thereby being beneficial to promoting the improvement of the service execution efficiency of the system.
In one embodiment, as shown in fig. 6, after step S210, the method further includes:
step S600, generating a target service completion notice, and adding the target service completion notice into a message queue.
The target service completion notification refers to notification information generated after the service handling request is completed. The message queue is a first-in first-out queue type data structure, which may be an internal linked list in the system kernel.
Specifically, when the business handling request is completed, a target business completion notification corresponding to the business handling request is generated for a corresponding client, for example, the business handling request corresponds to a sales business, and when corresponding changes are performed on data corresponding to the system inventory and the client inventory, the corresponding target business completion notification is generated according to corresponding data change information, so that the corresponding inventory condition is convenient and clear for enterprises. In addition, due to the expansion of the number of the clients, the target service completion notifications corresponding to the clients can be sequentially inserted into the message queue and added to the tail end of the message queue, so that the simultaneous transmission of the target service completion notifications corresponding to multiple clients is realized.
Step S602, obtaining the target customer identifier from the target service information.
The target client identifier refers to a unique identifier corresponding to the client identity, and may be an account ID of the client or a mobile phone number of the client.
Specifically, the target service information includes a target client identifier of a client corresponding to the service handling request, and when a corresponding target service completion notification needs to be sent to a client corresponding to the client, the corresponding sending of the message can be performed according to the target client identifier capable of identifying the client identity, where the client can be a WeChat terminal.
Step S604, based on the target customer identification, the corresponding target service completion notification is obtained from the message queue, and the target service completion notification is sent to the client corresponding to the target customer identification.
Specifically, after the corresponding service handling request is completed, asynchronous pushing can be performed through the message queue in order to improve user experience, and simultaneous pushing of a plurality of clients in the message queue is achieved according to the target client identifier corresponding to the client, so that the sending efficiency of notification information is improved. In addition, asynchronous pushing of notification information corresponding to different clients is realized through the message queue, separation of a business handling system corresponding to the clients and an information pushing system is facilitated, and therefore decoupling of different application services is realized.
In this embodiment, the target service completion notification is generated and added to the message queue, the target client identifier is acquired from the target service information, the corresponding target service completion notification is acquired from the message queue based on the target client identifier, and the target service completion notification is sent to the client corresponding to the target client identifier, so that asynchronous pushing of different clients is realized, and thus the pushing efficiency of the service completion notification message is improved.
In one embodiment, as shown in fig. 7, further comprising:
step S700, receiving an unassociated extraction service handling request, and determining a target extraction transaction based on the unassociated extraction service handling request.
The unassociated extraction service handling request refers to a service handling request for modifying data of a corresponding single stock when the corresponding extraction service is completed, for example, a customer a extracts an original purchased but not yet extracted commodity a, and if the stock quantity of the commodity a corresponding to the customer a in the current customer stock is 5, the relevant quantity of the customer a and the commodity a corresponding to the customer a in the customer stock is only required to be changed when the number of the extracted commodity a is 1, and the request for modifying the data in the system stock or other stocks is not required. The target extraction transaction refers to an extraction transaction which only carries out corresponding modification on data in a corresponding single stock and does not need to carry out modification on data in other stocks when the corresponding extraction business is executed.
Specifically, when the client needs to transact the extraction service, a corresponding unassociated extraction service transacting request is received, and a corresponding target extraction transaction can be determined according to the unassociated extraction service transacting request. For example, when the number of commodities corresponding to the customer in the customer inventory is not cleared, the customer can conduct corresponding unassociated extraction business, and when the corresponding unassociated extraction business is conducted, only the data information corresponding to the customer in the customer inventory is modified, and the modification of the business data is irrelevant to other inventories.
Step S702, a target extraction inventory identifier corresponding to a target extraction transaction is acquired, and target extraction business information is acquired.
The target extraction inventory identification refers to a unique identification of an inventory corresponding to the target extraction transaction. The target extraction service information refers to information which can be used for determining the extract, and can be information including client identification, extract identification, extraction quantity and the like.
Specifically, for implementation of the unassociated extraction service, a target extraction inventory identifier corresponding to the target extraction service needs to be acquired, then a corresponding target inventory is determined from a target database according to the target extraction inventory identifier, then target extraction service information is acquired, which customer specifically extracts the article according to the target extraction service information, what article is specifically extracted, what amount of the article needs to be specifically extracted, and the like.
Step S704, determining a target extraction inventory corresponding to the target extraction inventory identification from the target database.
The target extraction inventory refers to an inventory corresponding to a specific extraction service.
Specifically, the target database includes data information after data consistency modification of a plurality of different inventories, and when an operation corresponding to a target extraction transaction is performed, the queried data is also the data after the data consistency modification operation of the different inventories. At this time, the corresponding target extraction inventory can be determined in the target database according to the target extraction inventory identification, and then the data information in the target extraction inventory can be modified according to the data information corresponding to the target extraction transaction, so as to complete the data record corresponding to the unassociated extraction business handling request.
Step S706, based on the target extraction business information, the extraction business modification operation is carried out on the target extraction inventory, the operation corresponding to the target extraction business is completed, and the extraction completion notification is generated.
The extraction completion notification refers to the generated customer notification information after the target extraction transaction corresponding to the unassociated extraction service handling request is completed, and the generated customer notification information may include the stock quantity of the corresponding extract in the stock after the extraction, the corresponding item information, and the like.
Specifically, the target extraction service information includes information such as a client identifier, an extract identifier, an extraction number and the like, and the current inventory of the extract corresponding to the extraction service can be determined in the target extraction inventory according to the client identifier and the extract identifier, then the current inventory is deducted and modified according to the extraction number, and the current inventory corresponding to the client identifier and the extract identifier in the target extraction inventory is updated. After the extraction operation corresponding to the target extraction transaction is completed, a corresponding completion extraction notification can be generated according to the corresponding extraction quantity and the stock quantity corresponding to the updated extract, and the client is informed of the information such as the quantity extracted by the client, the quantity of the residual stock quantity and the like, so that the user experience is improved, the data of different stocks in different scenes are isolated, and the diversity of the data isolation in multiple scenes is realized.
Step S708, the target extraction client identification is obtained from the target extraction service information, and the extraction completion notification is sent to the client corresponding to the target extraction client identification.
The target extraction client identifier refers to a unique identifier of a client handling the extraction service, and may be an account ID or a mobile phone number corresponding to the client.
Specifically, after the operation corresponding to the corresponding target extraction transaction is completed, an extraction completion notification containing information of which client, what is extracted, how many extraction amounts are and the like is generated, and at this time, the extraction completion notification is also sent to a corresponding message queue, and asynchronous pushing of the extraction completion notification is realized based on the target extraction client identifier through the message queue, so that the notification efficiency of the extraction service is improved.
In this embodiment, by receiving an unassociated extraction service handling request, determining a target extraction transaction based on the unassociated extraction service handling request, acquiring a target extraction inventory identifier corresponding to the target extraction transaction, acquiring target extraction service information, determining a target extraction inventory corresponding to the target extraction inventory identifier from a target database, performing extraction service modification operation on the target extraction inventory based on the target extraction service information, completing operation corresponding to the target extraction transaction, generating an extraction completion notification, realizing unassociated extraction service with single inventory data change and asynchronous pushing of the extraction service notification, realizing data isolation of single inventory, embodying diversity of realization services, automatically dividing different inventory data, and improving execution efficiency of various services.
In one embodiment, as shown in fig. 8, further comprising:
step S800, receiving a query service handling request, and determining a target query transaction based on the query service handling request.
Wherein, the inquiry business handling request refers to a business request for a client to inquire inventory. The target query transaction refers to a transaction corresponding to the realization of the query request.
Specifically, due to the inventory partition of the target database, the business for inquiring different inventories can be realized, when a client or an enterprise needs to perform corresponding inquiry business, an inquiry business handling request of poison can be received, then a corresponding target inquiry transaction is determined according to the inquiry business handling request, and the data information inquiry of the corresponding inventory is realized through the operation corresponding to the target inquiry transaction.
Step S802, a target query inventory identification corresponding to a target query transaction is acquired, and target query business information is acquired.
The target query inventory identification refers to a unique identification of an inventory corresponding to the data information to be queried. The target query service information refers to information required for querying the corresponding inventory, and can be information such as customer identification, article identification and the like.
Specifically, due to the inventory partition of the target database, data isolation of different inventories is realized, when corresponding data information inquiry is performed, a target inquiry inventory identifier corresponding to a target inquiry transaction can be obtained and used for determining a corresponding target inquiry inventory from the target database according to the target inquiry inventory identifier, then a corresponding target inquiry service is obtained, and corresponding inventory information in the target inquiry inventory is determined according to information with unique identification identities such as a client identifier or an article identifier in the target service.
Step S804, determining the target query inventory corresponding to the target query inventory identification from the target database.
The target query inventory refers to an inventory storing data information to be queried in a query service.
Specifically, the target database is provided with data information in different inventories, each inventory is divided into areas according to corresponding identifiers, and corresponding inventory information is stored. For data consistency modification updated information with associations between different inventories, queries may also be made in corresponding individual inventories. And determining the target query inventory from the target database through the target query inventory identification so as to facilitate the subsequent query of corresponding data information, thereby improving the corresponding query efficiency.
Step S806, inquiring the target inquiry inventory based on the target inquiry service information to obtain target inquiry information, and generating a target inquiry notification based on the target inquiry information.
The target query information refers to data information to be queried in the query service handling request. The target query notification refers to a notification containing target query information for notifying the corresponding client.
Specifically, the target query service information includes various types of identification information corresponding to the query service, the identification information may be information such as a customer identification, a query object identification, etc., corresponding inventory information may be determined in a target query library according to the identification information, the corresponding target query information may be obtained by reading the corresponding inventory information, for example, inventory information of a commodity a corresponding to a customer a in the customer inventory needs to be queried, at this time, inventory information of a commodity a in the customer inventory may be determined according to the identification corresponding to the customer a and the identification corresponding to the commodity a, the corresponding target query information may be obtained by reading the inventory information of the commodity a (for example, 3 pieces of non-extracted commodity a still exist) and then a query notification including 3 pieces of non-extracted commodity a of the customer a is generated according to the read query information, and in addition, inventory information of other commodities may be added in the query notification.
Step S808, determining a target query client identifier based on the target query service information, and sending a target query notification to the client corresponding to the target query client identifier.
The target query client identifier refers to a unique identifier of a client corresponding to a query service handling request, and may be an account ID or a mobile phone number of the client.
Specifically, the target query client identifier of the client corresponding to the query service exists in the target query service information, the target query notification can be sent to the message queue, and then the corresponding target query notification is sent to the corresponding client through the message queue based on the target query client identifier, so that asynchronous pushing of the target query notification corresponding to multiple clients is realized, and the client can be a WeChat end.
In this embodiment, by receiving a query service handling request, determining a target query transaction based on the query service handling request, acquiring a target query inventory identifier corresponding to the target query transaction, acquiring target query service information, determining a target query inventory corresponding to the target query inventory identifier from a target database, querying the target query inventory based on the target query service information to obtain target query information, and generating a target query notification based on the target query information, separate querying of different inventories is realized, data corresponding to different service types is stored in different inventories, and complicated application situations of data are avoided, so that effective application and isolation of data are realized, and execution efficiency of query services is improved.
In one embodiment, as shown in fig. 9, a transaction schematic is provided in which the enterprise inventory and the customer inventory are correspondingly modified when the sales service is performed, and the corresponding customer inventory is correspondingly modified when the customer performs the corresponding extraction service. The sales business corresponding to the user can be used as a corresponding business handling request, the enterprise inventory is modified, the client inventory is modified to be used as two branch transactions, then the current checking transaction is sequentially selected from the two branch transactions, the target inventory identification corresponding to the current checking transaction is obtained, the target inventory corresponding to the target inventory identification is determined from a target database, and the current inventory data is read from the target inventory based on the target business information; taking the current inventory data as current test data, fusing the current test data with preset data to obtain intermediate inventory data, and generating a target inspection state corresponding to the current inspection transaction; when the target checking state is that the test passes, returning to the step of sequentially selecting the current checking transaction from the branch transactions to obtain intermediate stock data corresponding to the two branch transactions; the method comprises the steps of sequentially selecting a current execution transaction from the two branch transactions, taking intermediate stock data corresponding to the current execution transaction as target stock data, and storing the target stock data into target stock corresponding to the current execution transaction until operations corresponding to the two branch transactions are completed, namely, deduction of enterprise stock and increase of client stock are completed, so that consistency of enterprise stock deduction and client stock increase is realized. In addition, when the customer only carries out the extraction business of the articles, the customer only needs to deduct the corresponding articles in the customer stock, thereby realizing the transaction of the customer corresponding extraction business, without changing the data in the enterprise stock, avoiding the disorder on the data record and greatly improving the execution efficiency of various businesses. Fig. 10 and 11 are diagrams showing a change process of data information corresponding to customer inventory and enterprise inventory in a database in a sales business handling process, wherein a customer ID in an inventory table refers to an inventory ID (i.e., inventory identifier), a customer ID is 0-time representative of a system inventory, a customer ID is 1-time representative of a customer inventory identifier, and data consistency modification between different inventories and data isolation between different inventories can be intuitively shown through fig. 10 and 11; in addition, fig. 12 is a change process of the corresponding client inventory data information when extracting the service, and the service is implemented without consistent change of other inventory data, so that the problems of data disorder and the like occurring when the original inventory is not checked and distinguished are solved to a great extent. The data in different inventories are controlled to be successfully modified or failed simultaneously, and the data isolation is realized through inventory checking distinction, so that the efficient handling of various businesses is realized, the execution efficiency of the various businesses is improved to a great extent, and the handling efficiency of enterprises and the experience of clients are improved.
Based on the same inventive concept, the embodiment of the application also provides a data processing device for realizing the above related data processing method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation of one or more embodiments of the data processing device provided below may refer to the limitation of the data processing method hereinabove, and will not be repeated herein.
In one embodiment, as shown in fig. 13, there is provided a data processing apparatus including: a receiving module 1300, an obtaining module 1302, a reading module 1304, a calculating module 1306, a cycling module 1308, and a storing module 1310, wherein:
a receiving module 1300, configured to receive a service transaction request, and determine at least two branch transactions based on the service transaction request.
The obtaining module 1302 is configured to obtain target service information, and determine preset data based on the target service information.
The reading module 1304 is configured to sequentially select a current checking transaction from the branch transactions, obtain a target inventory identifier corresponding to the current checking transaction, determine a target inventory corresponding to the target inventory identifier from a target database, and read current inventory data from the target inventory based on the target business information.
The calculating module 1306 is configured to use the current inventory data as current test data, fuse the current test data with the preset data to obtain intermediate inventory data, and generate a target inspection state corresponding to the current inspection transaction.
And a circulation module 1308, configured to return to the step of sequentially selecting the current checking transaction from the branch transactions when the target checking state is that the test passes, so as to obtain intermediate inventory data corresponding to each branch transaction.
The storage module 1310 is configured to sequentially select a current execution transaction from the branch transactions, take intermediate inventory data corresponding to the current execution transaction as target inventory data, store the target inventory data into a target inventory corresponding to the current execution transaction, and complete operations corresponding to each branch transaction.
In one embodiment, the computing module 1306 is further configured to obtain an execution process state; when the execution process state is that equipment type problems occur, setting the target checking state as that the test is not passed; when the execution process state is that the data type problem occurs, setting the target checking state as that the test is not passed; when the executing process state is that the network type problem occurs, setting the target checking state as that the test is not passed; and setting the target checking state as test passing when the executing process state is safe execution.
In one embodiment, the data processing apparatus further includes a detect failed module 1312 for regarding the selected current check transaction as a to-be-rolled-back transaction when the target check state is that the test fails; sequentially selecting a current rollback transaction from the transactions to be rolled back, and fusing intermediate stock data corresponding to the current rollback transaction with preset data to obtain rollback stock data corresponding to the current rollback transaction; and returning the step of sequentially selecting the current rollback transaction from the to-be-rolled back transactions to obtain rollback inventory data corresponding to each to-be-rolled back transaction, and completing the recovery operation of each to-be-rolled back transaction.
In one embodiment, the data processing apparatus further includes a fusion module 1314, configured to obtain, from the service transaction request, target inventory change information corresponding to the current inspection transaction; determining a target fusion operation from candidate fusion operations based on the target inventory change information, the candidate fusion operations including an increase operation and a decrease operation; and carrying out the target fusion operation on the current test data and the preset data to obtain the intermediate inventory data.
In one embodiment, the data processing apparatus further includes a feedback module 1316 configured to generate a target service completion notification, and add the target service completion notification to the message queue; acquiring a target client identifier from the target service information; based on the target client identifier, a corresponding target service completion notification is obtained from the message queue, and the target service completion notification is sent to a client corresponding to the target client identifier.
In one embodiment, the data processing apparatus further includes an extraction module 1318 to receive an unassociated extracted business transaction request, determine a target extracted transaction based on the unassociated extracted business transaction request; acquiring a target extraction inventory identifier corresponding to the target extraction transaction, and acquiring target extraction business information; determining a target extraction inventory corresponding to the target extraction inventory identification from the target database; performing extraction business modification operation on the target extraction inventory based on the target extraction business information to finish operation corresponding to the target extraction business, and generating an extraction completion notification; and acquiring a target extraction client identifier from the target extraction service information, and sending the extraction completion notification to a client corresponding to the target extraction client identifier.
In one embodiment, the data processing apparatus further includes a query module 1320 for receiving a query transaction request, determining a target query transaction based on the query transaction request; acquiring a target inquiry inventory identifier corresponding to the target inquiry transaction, and acquiring target inquiry service information; determining a target query inventory corresponding to the target query inventory identification from the target database; inquiring the target inquiry inventory based on the target inquiry service information to obtain target inquiry information, and generating a target inquiry notification based on the target inquiry information; and determining a target query client identifier based on the target query service information, and sending the target query notification to a client corresponding to the target query client identifier.
Each of the modules in the above-described data processing apparatus may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, and the internal structure of which may be as shown in fig. 14. The computer device includes a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. 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, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used to store inventory data and data needed or generated during execution. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a data processing method.
In one embodiment, a computer device is provided, which may be a terminal, and an internal structure diagram thereof may be as shown in fig. 15. The computer device includes a processor, a memory, an input/output interface, a communication interface, a display unit, and an input means. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input/output interface. 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 and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a data processing method. The display unit of the computer device is used for forming a visual picture, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be a key, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structures shown in fig. 14 or 15 are merely block diagrams of portions of structures associated with aspects of the application and are not intended to limit the computer device to which aspects of the application may be applied, and that a particular computer device may include more or fewer components than those shown, or may combine certain components, or may have a different arrangement of components.
In one embodiment, a computer device is provided that includes a memory having a computer program stored therein and a processor that when executed implements the steps of the method examples described above.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, implements the steps of the method embodiments described above.
In one embodiment, a computer program product or computer program is provided that includes computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps in the above-described method embodiments.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data need to comply with the related laws and regulations and standards of the related country and region.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in 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 (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.

Claims (10)

1. A method of data processing, the method comprising:
receiving a service handling request, and determining at least two branch transactions based on the service handling request;
acquiring target service information, and determining preset data based on the target service information;
sequentially selecting a current checking transaction from the branch transactions, acquiring a target inventory identification corresponding to the current checking transaction, determining a target inventory corresponding to the target inventory identification from a target database, and reading current inventory data from the target inventory based on the target business information;
Taking the current inventory data as current test data, fusing the current test data with the preset data to obtain intermediate inventory data, and generating a target inspection state corresponding to the current inspection transaction;
returning to the step of sequentially selecting the current checking transaction from the branch transactions when the target checking state is the passing of the test, and obtaining intermediate stock data corresponding to each branch transaction;
and sequentially selecting a current execution transaction from the branch transactions, taking intermediate stock data corresponding to the current execution transaction as target stock data, and storing the target stock data into target stock corresponding to the current execution transaction until the operation corresponding to each branch transaction is completed.
2. The method of claim 1, wherein generating the target check state for the current check transaction comprises:
acquiring an execution process state;
when the execution process state is that equipment type problems occur, setting the target checking state as that the test is not passed; when the execution process state is that the data type problem occurs, setting the target checking state as that the test is not passed; when the executing process state is that the network type problem occurs, setting the target checking state as that the test is not passed;
And setting the target checking state as test passing when the executing process state is safe execution.
3. The method of claim 1, wherein the fusing the current test data and the preset data with the current inventory data as current test data to obtain intermediate inventory data, and generating the target inspection state corresponding to the current inspection transaction further comprises:
when the target checking state is that the test fails, taking the selected current checking transaction as a transaction to be rolled back;
sequentially selecting a current rollback transaction from the transactions to be rolled back, and fusing intermediate stock data corresponding to the current rollback transaction with preset data to obtain rollback stock data corresponding to the current rollback transaction;
and returning the step of sequentially selecting the current rollback transaction from the to-be-rolled back transactions to obtain rollback inventory data corresponding to each to-be-rolled back transaction, and completing the recovery operation of each to-be-rolled back transaction.
4. The method of claim 1, wherein fusing the current test data and the preset data to obtain intermediate inventory data comprises:
Acquiring target inventory change information corresponding to the current check transaction from the service handling request;
determining a target fusion operation from candidate fusion operations based on the target inventory change information, the candidate fusion operations including an increase operation and a decrease operation;
and carrying out the target fusion operation on the current test data and the preset data to obtain the intermediate inventory data.
5. The method according to claim 1, wherein the sequentially selecting the current execution transaction from the branch transactions, taking the intermediate inventory data corresponding to the current execution transaction as target inventory data, storing the target inventory data into the target inventory corresponding to the current execution transaction, and after completing the operation corresponding to each branch transaction, further comprises:
generating a target service completion notification, and adding the target service completion notification into a message queue;
acquiring a target client identifier from the target service information;
based on the target client identifier, a corresponding target service completion notification is obtained from the message queue, and the target service completion notification is sent to a client corresponding to the target client identifier.
6. The method according to claim 1, wherein the method further comprises:
receiving an unassociated extraction service handling request, and determining a target extraction transaction based on the unassociated extraction service handling request;
acquiring a target extraction inventory identifier corresponding to the target extraction transaction, and acquiring target extraction business information;
determining a target extraction inventory corresponding to the target extraction inventory identification from the target database;
performing extraction business modification operation on the target extraction inventory based on the target extraction business information to finish operation corresponding to the target extraction business, and generating an extraction completion notification;
and acquiring a target extraction client identifier from the target extraction service information, and sending the extraction completion notification to a client corresponding to the target extraction client identifier.
7. The method according to claim 1, wherein the method further comprises:
receiving a query service handling request, and determining a target query transaction based on the query service handling request;
acquiring a target inquiry inventory identifier corresponding to the target inquiry transaction, and acquiring target inquiry service information;
determining a target query inventory corresponding to the target query inventory identification from the target database;
Inquiring the target inquiry inventory based on the target inquiry service information to obtain target inquiry information, and generating a target inquiry notification based on the target inquiry information;
and determining a target query client identifier based on the target query service information, and sending the target query notification to a client corresponding to the target query client identifier.
8. A data processing apparatus, the apparatus comprising:
the receiving module is used for receiving a service handling request and determining at least two branch transactions based on the service handling request;
the acquisition module is used for acquiring target service information and determining preset data based on the target service information;
the reading module is used for sequentially selecting a current checking transaction from the branch transactions, acquiring a target inventory identification corresponding to the current checking transaction, determining a target inventory corresponding to the target inventory identification from a target database, and reading current inventory data from the target inventory based on the target business information;
the calculation module is used for taking the current inventory data as current test data, fusing the current test data with the preset data to obtain intermediate inventory data, and generating a target inspection state corresponding to the current inspection transaction;
The circulation module is used for returning the step of sequentially selecting the current checking transaction from the branch transactions when the target checking state is the passing of the test, so as to obtain intermediate stock data corresponding to each branch transaction;
the storage module is used for sequentially selecting the current execution transaction from the branch transactions, taking the intermediate stock data corresponding to the current execution transaction as target stock data, storing the target stock data into the target stock corresponding to the current execution transaction, and completing the operation corresponding to each branch transaction.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 7 when the computer program is executed.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.
CN202310396777.3A 2023-04-07 2023-04-07 Data processing method, device, computer equipment and storage medium Pending CN116595017A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310396777.3A CN116595017A (en) 2023-04-07 2023-04-07 Data processing method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310396777.3A CN116595017A (en) 2023-04-07 2023-04-07 Data processing method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116595017A true CN116595017A (en) 2023-08-15

Family

ID=87610603

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310396777.3A Pending CN116595017A (en) 2023-04-07 2023-04-07 Data processing method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116595017A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117056116A (en) * 2023-10-11 2023-11-14 荣耀终端有限公司 Flow management method and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117056116A (en) * 2023-10-11 2023-11-14 荣耀终端有限公司 Flow management method and electronic equipment
CN117056116B (en) * 2023-10-11 2024-04-02 荣耀终端有限公司 Flow management method and electronic equipment

Similar Documents

Publication Publication Date Title
CN116595017A (en) Data processing method, device, computer equipment and storage medium
CN113706140A (en) Cloud POS-based intelligent payment and refund method and electronic equipment
CN114693296A (en) Coupon management method and device, electronic equipment and storage medium
CN111625580A (en) Data processing method, device and equipment
CN111324622A (en) Resource first-aid-purchase processing method, device, equipment and storage medium
CN111080308A (en) Service information processing method and device and electronic equipment
CN112990871A (en) Document processing method and related equipment
US20150310437A1 (en) Avoiding transaction rollback
CN113592470A (en) Service processing method and device, electronic equipment and storage medium
CN112000746B (en) Data management method and device and server
CN107146075B (en) Request processing method and device
CN112990811B (en) Block chain-based warehouse receipt processing method and warehouse receipt processing system
CN107704557B (en) Processing method and device for operating mutually exclusive data, computer equipment and storage medium
CN111210310A (en) Information verification and cancellation system and method
CN110751237A (en) Product management method based on one-object-one-code
CN117391821B (en) E-commerce platform information data standardization processing method and system
CN112418878B (en) Rights service data processing method, device, equipment and storage medium
CN113468059B (en) Information acquisition method and device, terminal and server
US20230267513A1 (en) Ai and blockchain-based warehouse use system and method of using warehouse using the same
CN114936164A (en) Automatic abnormity testing method, device, equipment and medium for distributed transaction
CN117114864A (en) Cross-border transfer method and device for virtual resources, computer equipment and storage medium
CN117436816A (en) Data complement method, device, computer equipment and storage medium
CN116881245A (en) Service data splicing method, device, computer equipment and storage medium
CN116645146A (en) Resource accounting method, device, computer equipment and storage medium
CN117439982A (en) Resource management method, device, computer equipment and storage medium

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