Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method for guaranteeing data thread safety in purchase-sale-stock software

An invoicing and data technology, applied in the computer field, can solve problems such as low operating efficiency of invoicing software, achieve the effect of improving concurrent execution and improving execution efficiency

Pending Publication Date: 2019-08-27
上海有谱网络科技有限公司
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] Aiming at the problem of low operating efficiency of the stock purchase and sales software in the existing multi-user environment, the present invention proposes a method for ensuring the thread safety of commodity inventory-related data in the purchase, sale and stock software

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method for guaranteeing data thread safety in purchase-sale-stock software

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0022] Embodiment 1: The method for ensuring data thread security in this example is based on windows or linux operating systems, relational databases, zookeeper, and purchase-sale-stock software developed based on java. Set the database transaction level to "repeatable-read". The specific implementation steps are:

[0023] Identify the atomic transaction unit in the invoicing business. If there is any illegal information, the entire transaction unit needs to be rolled back. For example, the business logic execution process of "purchase order-save" is regarded as an atomic transaction unit.

[0024] Create a tenant-level queue based on the tenant namespace. The queue is implemented using LinkedList. Since the data of different tenants is isolated, parallel execution will not generate dirty data, so the problem of parallel execution between different tenants may not be considered.

[0025] Enter the "purchase order" request, and store the entire "purchase order" business as a f...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention relates to the technical field of computers, in particular to a method for guaranteeing data thread safety in purchase-sale-stock software, which comprises the following steps: in the purchase-sale-stock software dataase repeatable-read level, one service document is used as an atomic transaction unit in the whole service process, each transaction unit is used as a feature object tobe stored in a custom queue, and handles are sequentially obtained according to a certain sequence to execute corresponding services; after service units needing to be executed are screened out from each node in the cluster, the feature information of the units is registered to zookeepers, a data queue is achieved, and the service units are executed in sequence. The method is specially used for the purchase-sale-stock service, it is guaranteed that the commodity inventory number and cost data cannot generate errors due to multi-thread concurrence, meanwhile, the concurrent execution performance of threads is improved as much as possible, and the method is different from a traditional core code single-thread execution mode, and the execution efficiency of the purchase-sale-stock service isgreatly improved.

Description

technical field [0001] The invention relates to the technical field of computers, in particular to a method for ensuring data thread safety in purchase-sale-stock software. Background technique [0002] Invoicing software is to track and manage the material flow and capital flow in the production and operation of the enterprise. It involves starting from the receipt of the order contract, entering the material procurement, warehousing, receiving until the product is completed and warehousing, delivery, recovery of payment, payment Raw material payment and all links. Invoicing software can effectively assist enterprises in solving business problems in business management, distribution management, inventory management, execution and monitoring of marketing plans, and collection of statistical information. When the invoicing software provides services for multiple users at the same time, the thread safety of core data is a problem that must be solved. Otherwise, when the same ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F9/54G06Q10/08
CPCG06F9/546G06Q10/087
Inventor 王航赵俊辉
Owner 上海有谱网络科技有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products