CN109345159A - A kind of method for writing data and device, equipment, storage medium - Google Patents

A kind of method for writing data and device, equipment, storage medium Download PDF

Info

Publication number
CN109345159A
CN109345159A CN201810951860.1A CN201810951860A CN109345159A CN 109345159 A CN109345159 A CN 109345159A CN 201810951860 A CN201810951860 A CN 201810951860A CN 109345159 A CN109345159 A CN 109345159A
Authority
CN
China
Prior art keywords
cargo
goods
block chain
goods information
address
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
CN201810951860.1A
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.)
Shenzhen Pocket Network Technology Co Ltd
Original Assignee
Shenzhen Pocket Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Pocket Network Technology Co Ltd filed Critical Shenzhen Pocket Network Technology Co Ltd
Priority to CN201810951860.1A priority Critical patent/CN109345159A/en
Publication of CN109345159A publication Critical patent/CN109345159A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/08Logistics, e.g. warehousing, loading or distribution; Inventory or stock management
    • G06Q10/083Shipping
    • G06Q10/0833Tracking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/08Logistics, e.g. warehousing, loading or distribution; Inventory or stock management
    • G06Q10/087Inventory or stock management, e.g. order filling, procurement or balancing against orders

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Economics (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • Human Resources & Organizations (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Development Economics (AREA)
  • Strategic Management (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the invention discloses a kind of method for writing data, which comprises obtains the goods information in detailed list of goods;The address of the corresponding block chain of the goods information is obtained from preconfigured address base according to the goods information;The block chain is written into the goods information according to the address of the block chain.In addition, the embodiment of the invention also discloses a kind of data transfer apparatus, equipment and storage mediums.

Description

A kind of method for writing data and device, equipment, storage medium
Technical field
The present embodiments relate to field of computer technology, relates to, but are not limited to a kind of method for writing data and device, sets Standby, storage medium.
Background technique
Currently, JXC System is increasingly becoming business administration goods information as a kind of typical database application Indispensable tool in the process.The system is the demand according to enterprise, and to solve enterprise's confused account, inventory is inaccurate, information It the problems such as feeding back not in time, is developed using advanced computer technology, integrates and stock up, sell, storing multiple links Information system.
In general, cargo is related to producer, transporter, sale from production, transport, storage and sale whole process The multi-party interests such as side.And there is respective JXC System in enterprise of each side, the data standard that each side records goods information is different, respectively Family's data account book there are Heterogeneity, cooperate with intercommunication there are at high cost, low efficiencys the problems such as.
Summary of the invention
In view of this, the embodiment of the present invention is to solve the problems, such as present in the relevant technologies at least one and provide a kind of data Wiring method and device, equipment, storage medium, it is intended to by the way that block chain is written in goods information, to realize each ring of cargo The traceable of joint number evidence, verification, it is multi-party between unification and transparent.
The technical solution of the embodiment of the present invention is achieved in that
In a first aspect, the embodiment of the present invention provides a kind of method for writing data, which comprises
Obtain the goods information in detailed list of goods;
The ground of the corresponding block chain of the goods information is obtained from preconfigured address base according to the goods information Location;
The block chain is written into the goods information according to the address of the block chain.
Second aspect, the embodiment of the present invention provide a kind of data transfer apparatus, described device include: the first acquisition module, Second obtains module and Data write. module;Wherein:
Described first obtains module, is configured to obtain the goods information in detailed list of goods;
Described second obtains module, is configured to obtain the goods from preconfigured address base according to the goods information The address of the corresponding block chain of object information;
The Data write. module is configured to that the block is written in the goods information according to the address of the block chain Chain.
The third aspect, the embodiment of the present invention provide a kind of computer equipment, including memory and processor, the memory It is stored with the computer program that can be run on a processor, the processor realizes above-mentioned data write-in side when executing described program Step in method.
Fourth aspect, the embodiment of the present invention provide a kind of computer readable storage medium, are stored thereon with computer program, The computer program realizes the step in above-mentioned method for writing data when being executed by processor.
In the embodiment of the present invention, a kind of method for writing data is provided, firstly, obtaining the goods information in detailed list of goods; Then, the address of the corresponding block chain of the goods information is obtained from preconfigured address base according to the goods information; Finally, the block chain is written in the goods information according to the address of the block chain.In this way, by the way that the cargo of cargo is believed Breath write-in block chain, enables enterprise of each side relevant to cargo by unified data standard come Care for Cargo information, from And realize cargo in links circulation, the traceable of goods information, verification, it is multi-party between unification and transparent.
Detailed description of the invention
Fig. 1 is a kind of implementation process schematic diagram of method for writing data of the embodiment of the present invention;
Fig. 2 is the implementation process schematic diagram of another method for writing data of the embodiment of the present invention;
Fig. 3 A is a kind of structural schematic diagram of JXC System of the embodiment of the present invention;
Fig. 3 B is that a kind of code of block chain support module of the embodiment of the present invention realizes structural schematic diagram;
Fig. 3 C is a kind of function implementation process schematic diagram of block chain support module of the embodiment of the present invention;
Fig. 3 D is a kind of composed structure schematic diagram of the super account book framework of block chain of the embodiment of the present invention;
Fig. 4 is a kind of usage scenario flow chart of JXC System of the embodiment of the present invention;
Fig. 5 is the usage scenario flow chart of another JXC System of the embodiment of the present invention;
Fig. 6 is the usage scenario flow chart of another JXC System of the embodiment of the present invention;
Fig. 7 is the usage scenario flow chart of another JXC System of the embodiment of the present invention;
Fig. 8 is the implementation process schematic diagram of another method for writing data of the embodiment of the present invention;
Fig. 9 is a kind of composed structure schematic diagram of data transfer apparatus of the embodiment of the present invention;
Figure 10 is a kind of hardware entities schematic diagram of computer equipment of the embodiment of the present invention.
Specific embodiment
The technical solution of the present invention is further elaborated with reference to the accompanying drawings and examples.
The present embodiment provides a kind of method for writing data, this method is applied to computer equipment, the function that this method is realized It can be realized by the processor caller code in computer equipment, certain program code can be stored in computer In storage medium, it is seen then that the computer equipment includes at least pocessor and storage media.
Fig. 1 is a kind of implementation process schematic diagram of method for writing data of the embodiment of the present invention, as shown in Figure 1, this method It may include steps of:
Goods information in S11, acquisition detailed list of goods;
In other embodiments, the detailed list of goods includes following one: storage bill, outbound list, stock allotment list, inventory It makes an inventory list;Wherein, the storage bill can be any documents such as buying storage bill, initial storage bill, sale return of goods storage bill, institute Stating outbound list can be any documents such as sale outbound list, buying return of goods outbound list.It is to be appreciated that the goods information and institute The type for stating detailed list of goods is related, for example, the detailed list of goods is storage bill, then the goods information in the storage bill can be with Including information such as cargo type, entry time, storage place, quantity of goods, cargo sources.For another example, the detailed list of goods is Library is single, then the goods information in the outbound list may include: cargo type, the outbound time, outbound place, quantity of goods, The information such as cargo whereabouts.
S12, the corresponding block chain of the goods information is obtained from preconfigured address base according to the goods information Address;
In general, generally included in the preconfigured address base block chain address and with the block chain Address is corresponding to be linked into key, and storage address of the different cargos in block chain is different, and therefore, is configuring describedly When the library of location, the address of different block chains usually is distributed to the cargo of different cargo types and is linked into key.For example, to being apple The cargo distribution address A and key A of fruit, distributes address B and key B to the cargo for being banana, to be the cargo of orange distributively Location C and ciphering key, to the cargo distribution address D and key D for being TV.
S13, the goods information is written by the block chain according to the address of the block chain.
In embodiments of the present invention, a kind of method for writing data is provided, firstly, obtaining the cargo letter in detailed list of goods Breath;Then, the ground of the corresponding block chain of the goods information is obtained from preconfigured address base according to the goods information Location;Finally, the block chain is written in the goods information according to the address of the block chain.In this way, by by the goods of cargo Block chain is written in object information, enables enterprise of each side relevant to cargo by unified data standard come Care for Cargo letter Breath, thus realize cargo in links circulation, the traceable of goods information, verification, it is multi-party between unification and transparent.
In other embodiments, the method can also include: to verify to the write-in permission of the goods information, school After testing successfully, the goods information is written by the block chain according to the address of the block chain.
It is to be appreciated that illegal user from malicious accesses block chain in order to prevent, block chain is written into the goods information of forgery, So also needing to verify the write-in permission of the goods information, after verifying successfully, just allow according to the block chain Address the block chain is written into the goods information.
In other embodiments, for step S11, the goods information obtained in detailed list of goods, may include as follows Step:
S111, it receives cargo and executes instruction, wherein the cargo, which executes instruction, is used to indicate that execute detailed list of goods institute right The cargo event answered;
When S112, the response cargo execute instruction, the shipment identifier by scanning cargo is determined in the detailed list of goods Goods information.
It is to be appreciated that if the detailed list of goods is storage bill, the corresponding cargo event of the storage bill is by goods Object is put in storage, at this point, can determine the detailed list of goods by scanning the shipment identifier of cargo when cargo to be put in storage In goods information;If the detailed list of goods is outbound list, the corresponding cargo event of the outbound list is to transport cargo Warehouse, at this point, can determine the goods in the detailed list of goods by scanning the shipment identifier of cargo when cargo is transported warehouse Object information, different with the goods information in storage bill, the cargo event that the goods information in outbound list is included is Cargo whereabouts.Similarly, the cargo requisition slip refers to that the cargo between warehouse is alloted, for example, by the cargo A tune in warehouse A To warehouse B, cargo event corresponding to the cargo requisition slip is that cargo is alloted at this time, and determining goods information includes by warehouse A is alloted to information such as warehouse B.In addition, the shipment identifier can be two dimensional code, bar code etc. can be scanned by scanning device Obtain the mark of goods information.
In other embodiments, by scan cargo shipment identifier determine the goods information in the detailed list of goods it Afterwards, the method also includes: according in the detailed list of goods goods information update inventory information.
It is to be appreciated that being needed at this time after completing the corresponding cargo event of the detailed list of goods according to the cargo Goods information in inventory updates inventory information.
The embodiment of the present invention provides another method for writing data, and Fig. 2 is that another data of the embodiment of the present invention are written The implementation process schematic diagram of method, as shown in Fig. 2, this method may include steps of:
S201, the user information according to acquisition, read and are shown from the address base and belong to the N number of of the user right Cargo type;Wherein, N is the integer more than or equal to 1;
S202, a selected cargo type is determined from N number of cargo type according to the selection instruction of user's input;
S203, the goods information for belonging to the selected cargo type is obtained from the detailed list of goods;
S204, obtain that the goods information is corresponding to be linked into key;
In general, the key storage that is linked into is in the address base, therefore, can according to the goods information from Cargo is corresponding with the goods information in the address base is linked into key.
Key is linked into described in S205, verification whether in the address base;If thening follow the steps S206;Otherwise, Terminate;
Here it is possible to ground be understood, if the key that is linked into verifies success in the address base.
S206, the corresponding block chain of the goods information is obtained from preconfigured address base according to the goods information Address;
S207, the goods information is mapped as by block data according to preset data shadowing agreement;
It is to be appreciated that the goods information recorded in the data type of the block data in block chain and detailed list of goods Data type is different, for example, the data type stored in block chain is binary data, is recorded in detailed list of goods The data type of goods information is Chinese character, at this time, it may be necessary to by detailed list of goods with the goods information of Chinese record be mapped as two into Then block chain is written using the binary data after mapping as block data in data processed.
S208, the block data is written by the block chain according to the address of the block chain.
In other embodiments, the block data may include following one: cargo event executes the cargo event Time, execute the cargo event place, cargo state.It is to be appreciated that if the cargo event is to transport cargo Warehouse out, then cargo state is outbound state at this time;If the cargo event is that cargo is transported into warehouse, at this time goods Object state is binning state.
JXC System is the big important module of mobile office pocket assistant upper one.Block chain represents present and future, It is believed that block chain is popularized as internet at last, become infrastructure.JXC System belongs to the ring in supply chain. And block chain technology is natively suitble to apply to the management of supply chain as a kind of large-scale collaborative tools.In order to adapt to skill Art trend, correspondingly, JXC System should also support block chain application.
So providing for a rainy day to closely follow epoch technology trend, in embodiments of the present invention, one kind is provided with pocket Based on JXC System in assistant, the scheme of the block chain application access interface of constituting criterion, i.e., in above-described embodiment The method for writing data.This method has the advantage that first compared with traditional JXC System, passes through pocket assistant The JXC System of formula, may be implemented mobile office, that is, energize for traditional JXC System;Second, this method provides standardization Block chain application access interface, that is, provide it is a kind of by goods information write-in block chain implementation method, to facilitate area The access of block chain application.
It is with that in mind it should be noted that providing a kind of method for writing data of the embodiment of the present invention: the One, traditional JXC System can be made full of vitality in mobile office, for example, by mobile phone application (Aplication, APP) version, which assigns JXC System, has the function of pocket assistant;Second, it can be mentioned for the JXC System in mobile office For block chain application extension ability, for universal the preparing of the following block chain;Third, the supply chain based on block chain solve the problems, such as Thinking, firstly, goods information can be made open and clear between Trading parties by block chain technology, thus in entire supply chain A complete and smooth information flow is formed on item, this can ensure that Trading parties find to deposit in supply chain system operational process in time The problem of, and pointedly find solution to the problem, and then promote the whole efficiency of supply chain management;Secondly, block Data possessed by chain can not distort the speciality with the existence proof of timestamp, can apply to solve supply serobila well Each dispute participated between main body in system, realizes and easily puts to the proof and call to account;Finally, data can not distort and trade traceable two greatly Characteristic combines, and can eradicate product in supply chain and flow through fake and forged problem in journey.
It should also be noted that, being not meant to replace the interaction shape of existing effective supply chain using block chain Formula, wherein existing effective supply chain, for example, can be realized the electronic data interchange of generally acknowledged business value (Electronic Data Interchange, EDI);And it is also not meant to replace using block chain to be integrated into enterprise and answer With the form of system, wherein enterprise application system is integrated into, for example, Enterprise Resources Plan (Enterprise Resource Planning, ERP) system.On the contrary, the supply chain new when enterprise implement, for example, utilizing Internet of Things (Internet of Things, IoT) technological improvement logistics progress monitoring when, block chain can be used to provide the composite traces of information flow.This water Flat shared visuality enables the enterprise to the supply chains process for having an opportunity to optimize multi-party.
Based on this, the embodiment of the present invention provides a kind of method for writing data, it is intended to can adapt to the following block chain as base Infrastructure, the note of acceptable " commodity (i.e. cargo described in above-described embodiment) for having the application of block chain " in JXC System It records and traces to the source.
Method for writing data described in above-described embodiment is applied to JXC System, which has WWW | (World Wide Web, Web) version and apply (Application, APP) version.As shown in Figure 3A, which mainly includes inventory Module 31, procurement module 32, Sales module 33 and block chain support module 34;Wherein,
The stock model 31 includes warehouse unit 311, stock-keeping unit 312, stock-taking unit 313, inventory's early warning list Member 314, stock allotment unit 315 and status reporting unit 316;Wherein, the warehouse unit 311 is used for storehouse management, for example, Increase warehouse, delete warehouse, modification warehouse, inquiry warehouse;The stock-keeping unit 312 is inquired for inventory information and inventory information Export;The stock-taking unit 313 is used for stock-taking management, for example, increase, delete, modification, inquiry inventory information, institute Stock-taking unit 313 is stated to be also used to print list of making an inventory;Inventory's prewarning unit 314 is arranged for inventory's early warning, for example, Increase, delete, modification, inquiry inventory's early warning;The stock allotment unit 315 is used to allot menu manager, for example, increase, delete, Modification, inquiry stock allotment list, the stock allotment unit 315 are also used to the setting of requisition slip attribute, requisition slip export, print and adjust Transfer slip;The status reporting unit 316 is for storing out storage detail and going out storage statistics;
The procurement module 32 includes supplier's unit 321, buying single unit 322, storage single unit 323 and buying report Unit 324;Wherein, supplier's unit 321 is used for supplier management, for example, increasing, deleting, modification, inquiry supplier letter Breath, supplier's unit 321 are also used to supplier information importing, supplier information export;The buying single unit 322 is used for Menu manager is purchased, for example, increasing, deleting, modification, inquiry buying order, the buying single unit 322 is also used to buying order attribute and sets It sets, buying order export;The storage single unit 323 is for being put in storage menu manager, for example, increase, delete, modification, inquiry storage bill, The storage single unit 323 is also used to the setting of storage bill attribute, storage bill export, printing storage bill;The buying report unit 324 for storing buying detail and buying statistics;
The Sales module 33 includes sale single unit 331, outbound single unit 332, Sales Reports unit 333;Wherein, institute Sale single unit 331 is stated for selling menu manager, for example, increase, delete, modification, inquiry sales slip, the sale single unit 331 are also used to the setting of sales slip attribute, sales slip export and printing sales slip;The outbound single unit 332 is used for outbound single tube Reason, for example, increasing, deleting, modification, inquiry outbound list, the outbound single unit 331 is also used to the setting of outbound list attribute, outbound Single export and printing outbound list;The Sales Reports unit 333 is for storing sales slip detail and sale result;
The block chain support module 34 is used for the list in the stock model 31, procurement module 32, Sales module 33 Block chain is written according to the goods information recorded.
In other embodiments, as shown in Figure 3B, the block chain support module 34 may include: from code realization Initialization interface init (), authentication interface auth (), data Map Interface dataMap (), chain data-interface read () is read With write-in chain data-interface write ();Accordingly, as shown in Figure 3 C, the function implementation process of the module 34, as shown in Figure 3 C, It may include steps of:
S301, it obtains chain address blockChainAddr and is linked into private key authKey;
Here, it should be noted that the chain address blockChainAddr is block chain described in above-described embodiment Address, the private key authKey that is linked into is to be linked into key described in above-described embodiment.
S302, two parameters of blockChainAddr and authKey are input in initialization interface init (), by adding The initialization that initialization interface init (blockChainAddr, authKey) realizes block chain basic information is carried, subsequently into step Rapid S302;
S303, authKey is input to authentication interface auth (), is realized by load authentication interface auth (authKey) Purview certification after purview certification passes through, enters step S304;
Here, it should be noted that each operation to block chain requires verification permission, that is to say, that every time by industry When business data businessData (i.e. goods information described in above-described embodiment) write-in block chain, require to carry out permission school It tests.
S304, business datum businessData is read from detailed list of goods by reading chain data-interface read ();
Here, it should be noted that the business datum businessData is the letter of cargo described in above-described embodiment Breath.
S305, business datum businessData is input to data Map Interface dataMap (blockChainData, BusinessData), by loading data Map Interface dataMap (blockChainData, businessData), industry is realized The mapping of business data businessData to block chain data blockChainData, the data after being mapped newBlockChainData;
Here, it should be noted that the data newBlockChainData after the mapping is described in above-described embodiment Block data.
S306, the data newBlockChainData after mapping is input to write-in chain data-interface write (), passed through Load write-in chain data-interface write (newBlockChainData), the data newBlockChainData after mapping is write Enter block chain.
In addition, it should also be noted that, the block chain support module 34 of initial version, can refer to current more prevalence The super account book of block chain (Hyperledger) framework, it is subsequent that more supports can be added in block chain support module 34, alternatively, After block chain formation standard, make 34 support standard of block chain support module;Wherein, the composition of Hyperledger framework Structure is as shown in Figure 3D, which includes member management module 35, block service module 36, page package module 37 and account chain generation Code module 38;Wherein, the member management module 35 has the following characteristics that first, provides member registration, identity protection, content The functions such as secrecy, transaction audit;Second, all members of open source block chain (Open Block Chain, OBC) have to pass through perhaps It can just initiate to trade, this point is different from publicly-owned chain (the i.e. described participant does not need to log in, and can directly submit);Third, When OBC member initiates transaction, if starting certificate of fair issuing organization (Transaction certificate authority, TCA) function, then certificate of fair can protect member identities (Identification, ID) not seen by unrelated side;
The block service module 36 has the following characteristics that first, for safeguarding that the consistent distributed account of the whole network is thin;The Two, based on the communication network of reciprocity (Peer to Peer, P2P) agreement, for example, remote procedure call (Remote Procedure Call, gRPC) system, by hypertext transfer protocol (Hyper Text Transport Protocol, HTTP message) realizes the message transmission between node;Third, height optimization design, makes state synchronized high efficient and reliable;4th, Common recognition algoritic module, it is pluggable, wherein common recognition algorithm, for example, Byzantine failure tolerance (Practical Byzantine Fault Tolerance, PBFT) algorithm, Raft algorithm, Wa Kuang (Proof of Work, PoW) algorithm, equity prove (Proof of Stake, PoS) algorithm etc.;
The page package module 37 has the following characteristics that first, OBC provides declarative state transmitting (Representational State Transfer, REST) application programming interface (Application Programming Interface, API) access various services;Second, OBC also provide Command Line Interface (Command- Line Interface, CLI) client utility, so that developer is quickly tested account chain code (Chaincode), or Inquire trading situation.CLI tool can be write by Go language, current support section REST API;
The account chain code module 38 has the following characteristics that first, for constituting intelligent contract (Smart Contract); Second, for the module in transaction, all confirmation nodes all have to carry out the module 38 when confirming transaction;Third executes ring Border is one " sandbox (Docker) ";It supports Go language to write at present, can support the language such as Java, Node.js in the future.
In order to further illustrate the specifically used scene of the JXC System 30, Fig. 4 is the JXC System 30 A kind of usage scenario flow chart, as shown in figure 4, the usage scenario flow chart of the system 30 may include:
S401, buying order is created according to the goods information stocked up from suppliers;
S402, judge whether buying order passes through examination & approval;If so, thening follow the steps S403;Otherwise, terminate;
S403, storage bill is created according to the buying order;
S404, judge whether the storage bill passes through examination & approval;If so, thening follow the steps S405;Otherwise, terminate;
S405, buying storage is executed according to the storage bill, check the storage bill;
S406, warehouse inventory information is updated according to the storage bill;
S407, judge whether block chain is opened using support;If so, thening follow the steps S408;Otherwise, terminate;
S408, the goods information in the storage bill is written by block chain by block chain support module.
Fig. 5 is another usage scenario flow chart of the JXC System 30, as shown in figure 5, the use of the system 30 Scene flow chart may include:
Cargo instruction is alloted between S501, reception warehouse, creates stock allotment list;
S502, judge whether stock allotment list passes through examination & approval;If so, thening follow the steps S503;Otherwise, terminate;
S503, stock allotment is executed according to the stock allotment list, checks the stock allotment list;
S504, warehouse inventory information is updated according to the stock allotment list;
S505, judge whether block chain is opened using support;If so, thening follow the steps S506;Otherwise, terminate;
S506, the goods information in the stock allotment list is written by block chain by block chain support module.
Fig. 6 is another usage scenario flow chart of the JXC System 30, as shown in fig. 6, the use of the system 30 Scene flow chart may include:
S601, it is made an inventory according to cargo in periodic review warehouse as a result, creating stock-taking list;
S602, stock-taking is executed according to the stock-taking list, checks the stock-taking list;
S603, warehouse inventory information is updated according to the stock-taking list;
S604, judge whether block chain is opened using support;If so, thening follow the steps S605;Otherwise, terminate;
S605, the goods information in the stock-taking list is written by block chain by block chain support module.
Fig. 7 is another usage scenario flow chart of the JXC System 30, as shown in fig. 7, the use of the system 30 Scene flow chart may include:
The order that S701, basis are taken from customers' place, creates sales order;
S702, judge whether sales order passes through examination & approval;If so, thening follow the steps S703;Otherwise, terminate;
S703, outbound list is created according to the sales order;
S704, judge whether the outbound list passes through examination & approval;If so, executing step S705;Otherwise, terminate;
S705, cargo delivery is executed according to the stock allotment list, check the outbound list;
S706, warehouse inventory information is updated according to the outbound list;
S707, judge whether block chain is opened using support;If so, thening follow the steps S708;Otherwise, terminate;
S708, the goods information in the outbound list is written by block chain by block chain support module.
Usage scenario process based on JXC System described in Fig. 4 to Fig. 7, Fig. 8 provide one kind and are supported by block chain Module realizes the method flow schematic diagram of data write-in, as shown in figure 8, the method may include following steps:
S801, the user information inputted according to user, read from preconfigured [chain address, key] library and show institute The option within the scope of user right is stated, is selected for the user;
Wherein, [chain address, key] library is address base described in above-described embodiment, and [chain address, key] library includes chain Address, key, cargo type and user information;The option includes the corresponding N number of cargo type of N number of chain address;Institute State the address that chain address is block chain described in above-described embodiment;The key be linked into described in above-described embodiment it is close Key.
S802, the selection instruction for receiving user's input;
S803, selected cargo type is determined from the option according to the selection instruction;
S804, to obtain the selected cargo type institute from [chain address, key] library according to the selected cargo type right The chain address and key answered;
S805, initialization block chain basic information;
Whether key corresponding to S806, the verifying selected cargo type is in [chain address, key] library;If so, Execute step S807;Otherwise, terminate;
S807, according to the selected cargo type, read from current cargo inventory and belong to the selected cargo type Goods information;
It should be noted that the detailed list of goods, for example, storage bill, stock allotment list, stock-taking list, outbound list etc. The document of relationship cargo whereabouts.
S808, the goods information is mapped as by block data according to preset data shadowing agreement;
S809, the block data is written by block chain according to the chain address.
Wherein, the block data includes cargo event, the time for executing the cargo event, executes the cargo event Place, cargo state etc..
Based on embodiment above-mentioned, the embodiment of the present invention provides a kind of data transfer apparatus, which includes included Each unit included by each module and each module can be realized by the processor in computer equipment;Certainly can also lead to Specific logic circuit is crossed to realize;In the process of implementation, processor can be central processing unit (CPU), microprocessor (MPU), digital signal processor (DSP) or field programmable gate array (FPGA) etc..
Fig. 9 is a kind of composed structure schematic diagram of data transfer apparatus of the embodiment of the present invention, as shown in figure 9, the dress Setting 90 includes that the first acquisition module 91, second obtains module 92 and Data write. module 93;Wherein:
Described first obtains module 91, is configured to obtain the goods information in detailed list of goods;
Described second obtains module 92, be configured to be obtained from preconfigured address base according to the goods information described in The address of the corresponding block chain of goods information;
The Data write. module 93 is configured to that the area is written in the goods information according to the address of the block chain Block chain.
In other embodiments, described device 90 further includes correction verification module 94, and the correction verification module 94 is configured to described The write-in permission of goods information is verified, and after verifying successfully, the goods information is written according to the address of the block chain The block chain.
In other embodiments, the correction verification module 94 includes:
First acquisition unit, is configured to obtain that the goods information is corresponding to be linked into key;
Verification unit is configured to be linked into key whether in the address base described in verification;
First determination unit verifies success if being configured to the key that is linked into the address base.
In other embodiments, the first acquisition module 91 includes:
Receiving unit, is configured to receive cargo and executes instruction, wherein the cargo, which executes instruction, is used to indicate execution goods Cargo event corresponding to object inventory;
Second determination unit is configured to respond the cargo when executing instruction, and the shipment identifier for passing through scanning cargo determines Goods information in the detailed list of goods.
In other embodiments, the first acquisition module 91 includes:
Reading unit is configured to the user information according to acquisition, reads from the address base and belongs to the user right N number of cargo type;
Display unit is configured to show N number of cargo type;
Third determination unit, the selection instruction for being configured to be inputted according to user determine one from N number of cargo type Selected cargo type;
Second acquisition unit is configured to obtain the cargo letter for belonging to the selected cargo type from the detailed list of goods Breath.
In other embodiments, the write module 93 includes:
The map unit is configured to that the goods information is mapped as block counts according to preset data shadowing agreement According to;
Said write unit is configured to that the block chain is written in the block data according to the address of the block chain.
In other embodiments, the block data includes following one: cargo event, execute the cargo event when Between, the place that executes the cargo event, cargo state.
In other embodiments, the detailed list of goods includes following one: storage bill, outbound list, stock allotment list, inventory It makes an inventory list.
The description of apparatus above embodiment, be with the description of above method embodiment it is similar, have same embodiment of the method Similar beneficial effect.For undisclosed technical detail in apparatus of the present invention embodiment, embodiment of the present invention method is please referred to Description and understand.
It should be noted that in the embodiment of the present invention, if realizing that above-mentioned data are write in the form of software function module Enter method, and when sold or used as an independent product, also can store in a computer readable storage medium.Base In such understanding, part that the technical solution of the embodiment of the present invention substantially in other words contributes to the relevant technologies can be with The form of software product embodies, which is stored in a storage medium, including some instructions to So that a computer equipment (can be personal computer, server or network equipment etc.) executes each implementation of the present invention The all or part of example the method.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (Read Only Memory, ROM), the various media that can store program code such as magnetic or disk.In this way, the embodiment of the present invention does not limit It is combined in any specific hardware and software.
Accordingly, the embodiment of the present invention provides a kind of computer equipment, including memory and processor, and the memory is deposited The computer program that can be run on a processor is contained, the processor is realized in above-described embodiment when executing described program and provided Method for writing data in step.
Accordingly, the embodiment of the present invention provides a kind of computer readable storage medium, is stored thereon with computer program, should Step in the method for writing data provided in above-described embodiment is provided when computer program is executed by processor.
It need to be noted that: the description of medium stored above and apparatus embodiments, with retouching for above method embodiment It is similar for stating, and has with embodiment of the method similar beneficial effect.For in storage medium of the present invention and apparatus embodiments not The technical detail of disclosure please refers to the description of embodiment of the present invention method and understands.
It should be noted that Figure 10 is a kind of hardware entities schematic diagram of computer equipment of the embodiment of the present invention, such as Figure 10 Shown, the hardware entities of the computer equipment 100 include: processor 101, communication interface 102 and memory 103, wherein
The overall operation of the usually control computer equipment 100 of processor 101.
Communication interface 102 can make computer equipment pass through network and other terminals or server communication.
Memory 103 is configured to store the instruction and application that can be performed by processor 101, can also cache device to be processed 101 and computer equipment 100 in each module it is to be processed or processed data (for example, image data, audio data, language Sound communication data and video communication data), flash memory (FLASH) or random access storage device (Random Access can be passed through Memory, RAM) it realizes.
It should be understood that " one embodiment " or " embodiment " that specification is mentioned in the whole text mean it is related with embodiment A particular feature, structure, or characteristic is included at least one embodiment of the present invention.Therefore, occur everywhere in the whole instruction " in one embodiment " or " in one embodiment " not necessarily refer to identical embodiment.In addition, these specific features, knot Structure or characteristic can combine in any suitable manner in one or more embodiments.It should be understood that in various implementations of the invention In example, magnitude of the sequence numbers of the above procedures are not meant that the order of the execution order, and the execution sequence of each process should be with its function It can determine that the implementation process of the embodiments of the invention shall not be constituted with any limitation with internal logic.The embodiments of the present invention Serial number is for illustration only, does not represent the advantages or disadvantages of the embodiments.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the device that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or device institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or device.
In several embodiments provided herein, it should be understood that disclosed device and method can pass through it Its mode is realized.Apparatus embodiments described above are merely indicative, for example, the division of the unit, only A kind of logical function partition, there may be another division manner in actual implementation, such as: multiple units or components can combine, or It is desirably integrated into another system, or some features can be ignored or not executed.In addition, shown or discussed each composition portion Mutual coupling or direct-coupling or communication connection is divided to can be through some interfaces, the INDIRECT COUPLING of equipment or unit Or communication connection, it can be electrical, mechanical or other forms.
Above-mentioned unit as illustrated by the separation member, which can be or may not be, to be physically separated, aobvious as unit The component shown can be or may not be physical unit;Both it can be located in one place, and may be distributed over multiple network lists In member;Some or all of units can be selected to achieve the purpose of the solution of this embodiment according to the actual needs.
In addition, each functional unit in various embodiments of the present invention can be fully integrated in one processing unit, it can also To be each unit individually as a unit, can also be integrated in one unit with two or more units;It is above-mentioned Integrated unit both can take the form of hardware realization, can also realize in the form of hardware adds SFU software functional unit.
Those of ordinary skill in the art will appreciate that: realize that all or part of the steps of above method embodiment can pass through The relevant hardware of program instruction is completed, and program above-mentioned can store in computer-readable storage medium, which exists When execution, step including the steps of the foregoing method embodiments is executed;And storage medium above-mentioned includes: movable storage device, read-only deposits The various media that can store program code such as reservoir (Read Only Memory, ROM), magnetic or disk.
If alternatively, the above-mentioned integrated unit of the present invention is realized in the form of software function module and as independent product When selling or using, it also can store in a computer readable storage medium.Based on this understanding, the present invention is implemented The technical solution of example substantially in other words can be embodied in the form of software products the part that the relevant technologies contribute, The computer software product is stored in a storage medium, including some instructions are used so that computer equipment (can be with It is personal computer, server or network equipment etc.) execute all or part of each embodiment the method for the present invention. And storage medium above-mentioned includes: various Jie that can store program code such as movable storage device, ROM, magnetic or disk Matter.
The above, only embodiments of the present invention, but scope of protection of the present invention is not limited thereto, it is any to be familiar with Those skilled in the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, and should all cover Within protection scope of the present invention.Therefore, protection scope of the present invention should be based on the protection scope of the described claims.

Claims (10)

1. a kind of method for writing data, which is characterized in that the described method includes:
Obtain the goods information in detailed list of goods;
The address of the corresponding block chain of the goods information is obtained from preconfigured address base according to the goods information;
The block chain is written into the goods information according to the address of the block chain.
2. the method according to claim 1, wherein the method also includes:
The write-in permission of the goods information is verified, after verifying successfully, according to the address of the block chain by the goods The block chain is written in object information.
3. according to the method described in claim 2, it is characterized in that, the write-in permission to the goods information carries out school It tests, comprising:
Obtain that the goods information is corresponding to be linked into key;
Key is linked into described in verification whether in the address base;
If the key that is linked into verifies success in the address base.
4. the method according to claim 1, wherein the goods information obtained in detailed list of goods, comprising:
It receives cargo to execute instruction, wherein the cargo, which executes instruction to be used to indicate, executes cargo corresponding to detailed list of goods Event;
When responding the cargo and executing instruction, the shipment identifier by scanning cargo determines that the cargo in the detailed list of goods is believed Breath.
5. the method according to claim 1, wherein the goods information obtained in detailed list of goods, comprising:
According to the user information of acquisition, is read from the address base and show the N number of cargo type for belonging to the user right;
A selected cargo type is determined from N number of cargo type according to the selection instruction of user's input;
The goods information for belonging to the selected cargo type is obtained from the detailed list of goods.
6. method according to any one of claims 1 to 5, which is characterized in that described to be incited somebody to action according to the address of the block chain The block chain is written in the goods information, comprising:
The goods information is mapped as block data according to preset data shadowing agreement;
The block chain is written into the block data according to the address of the block chain.
7. according to the method described in claim 6, it is characterized in that, the block data includes following one: cargo event is held The time of the row cargo event, the place for executing the cargo event, cargo state.
8. the method according to the description of claim 7 is characterized in that the detailed list of goods includes following one: storage bill, outbound List, stock allotment list, stock-taking list.
9. a kind of computer equipment, including memory and processor, the memory are stored with the meter that can be run on a processor Calculation machine program, which is characterized in that realize that any one of claim 1 to 8 data are write when the processor executes described program Enter the step in method.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program quilt The step in any one of claim 1 to 8 method for writing data is realized when processor executes.
CN201810951860.1A 2018-08-21 2018-08-21 A kind of method for writing data and device, equipment, storage medium Pending CN109345159A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810951860.1A CN109345159A (en) 2018-08-21 2018-08-21 A kind of method for writing data and device, equipment, storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810951860.1A CN109345159A (en) 2018-08-21 2018-08-21 A kind of method for writing data and device, equipment, storage medium

Publications (1)

Publication Number Publication Date
CN109345159A true CN109345159A (en) 2019-02-15

Family

ID=65296991

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810951860.1A Pending CN109345159A (en) 2018-08-21 2018-08-21 A kind of method for writing data and device, equipment, storage medium

Country Status (1)

Country Link
CN (1) CN109345159A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110503373A (en) * 2019-08-21 2019-11-26 腾讯云计算(北京)有限责任公司 A kind of material-flow method and device based on block chain network
CN111858603A (en) * 2020-07-23 2020-10-30 浙江永旗区块链科技有限公司 Data writing method and system for block chain
CN113139775A (en) * 2021-05-12 2021-07-20 北京京东乾石科技有限公司 Cargo allocation information processing method, device, equipment and storage medium
US11201727B2 (en) 2019-03-27 2021-12-14 Advanced New Technologies Co., Ltd. System and method for managing user interactions with a blockchain

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107135661A (en) * 2016-12-26 2017-09-05 深圳前海达闼云端智能科技有限公司 Data processing method, device, system and information collecting device
CN107247749A (en) * 2017-05-25 2017-10-13 阿里巴巴集团控股有限公司 A kind of database positioning determines method, consistency verification method and device
CN107301522A (en) * 2017-06-26 2017-10-27 深圳前海华深安信物联技术有限公司 A kind of warehouse receipt system and application method based on block chain
CN107330026A (en) * 2017-06-22 2017-11-07 物链(北京)科技有限公司 A kind of method and system of compatible isomery block platform chain

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107135661A (en) * 2016-12-26 2017-09-05 深圳前海达闼云端智能科技有限公司 Data processing method, device, system and information collecting device
CN107247749A (en) * 2017-05-25 2017-10-13 阿里巴巴集团控股有限公司 A kind of database positioning determines method, consistency verification method and device
CN107330026A (en) * 2017-06-22 2017-11-07 物链(北京)科技有限公司 A kind of method and system of compatible isomery block platform chain
CN107301522A (en) * 2017-06-26 2017-10-27 深圳前海华深安信物联技术有限公司 A kind of warehouse receipt system and application method based on block chain

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11201727B2 (en) 2019-03-27 2021-12-14 Advanced New Technologies Co., Ltd. System and method for managing user interactions with a blockchain
CN110503373A (en) * 2019-08-21 2019-11-26 腾讯云计算(北京)有限责任公司 A kind of material-flow method and device based on block chain network
CN111858603A (en) * 2020-07-23 2020-10-30 浙江永旗区块链科技有限公司 Data writing method and system for block chain
CN111858603B (en) * 2020-07-23 2023-05-26 浙江永旗区块链科技有限公司 Block chain data writing method and system
CN113139775A (en) * 2021-05-12 2021-07-20 北京京东乾石科技有限公司 Cargo allocation information processing method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
Liu et al. A blockchain-based framework of cross-border e-commerce supply chain
Banerjee Blockchain technology: supply chain insights from ERP
Rejeb et al. Leveraging the internet of things and blockchain technology in supply chain management
US11139954B2 (en) Blockchain proof of custody, proof against tampering, proof of chain of custody
Agarwal et al. Blockchain technology for secure supply chain management: A comprehensive review
KR102502247B1 (en) Safe and Traceable Manufacturing Parts
US9641342B2 (en) Tracking unitization occurring in a supply chain
US20160164884A1 (en) Cryptographic verification of provenance in a supply chain
US20220094549A1 (en) Digital asset management
Suhail et al. Orchestrating product provenance story: When IOTA ecosystem meets electronics supply chain space
CN109345159A (en) A kind of method for writing data and device, equipment, storage medium
CN110503373A (en) A kind of material-flow method and device based on block chain network
WO2020098824A2 (en) Smart logistics management using blockchain
CN111383020B (en) Block chain-based article anti-counterfeiting management method, device, equipment and storage medium
WO2021208762A1 (en) Data storage and query
WO2022237385A1 (en) Goods transfer information processing method and apparatus, device, and storage medium
WO2020228576A1 (en) Information processing method and device
Schapranow et al. Costs of authentic pharmaceuticals: research on qualitative and quantitative aspects of enabling anti-counterfeiting in RFID-aided supply chains
Bapatla et al. PharmaChain: A blockchain to ensure counterfeit‐free pharmaceutical supply chain
CN113886883A (en) Internet of things data management method and device
Szewczyk Application of blockchain technology in supply chain management
Barenji et al. Open logistics: blockchain-enabled trusted hyperconnected logistics platform
WALES Using blockchain to enable untrusted business process monitoring and execution
CN110796457A (en) Central kitchen product traceability system
Lorenz et al. Discovery services in the EPC network

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190215