Oral liquid raw material tracing method and system based on block chain
By collecting and encrypting supply chain data on the blockchain, generating unique identifiers, extracting key features by combining category templates and search algorithms, and signing legally binding contracts, the problems of data tampering and information silos in oral liquid traceability are solved, achieving full-process traceability and accountability, and protecting trade secrets.
Patent Information
- Application Number
- CN202511653286.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-12
- Publication Date
- 2026-02-27
AI Technical Summary
In the existing process of tracing the source of oral liquid raw materials, the data is easily tampered with, the data is incomplete, and there are serious information silos between various nodes in the supply chain, making it impossible to provide a complete and legally effective responsibility relationship.
By collecting and encrypting data from each node of the supply chain on the blockchain, generating unique identifiers, extracting key features by combining category templates and search algorithms, and generating digital identities on the inside of the bottle and cap, efficient and accurate traceability is achieved. Furthermore, by signing legally binding cooperation contracts, the connections between nodes are improved, and different levels of access control are defined.
It achieves highly reliable traceability, covering the entire process of oral liquid data recording and traceability, solving the problem of incomplete information, and can quickly locate the responsible party, protect trade secrets, and provide refined access control.
Smart Images

Figure CN121581883A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of blockchain technology, specifically to a blockchain-based method and system for tracing the source of raw materials for oral liquids. Background Technology
[0002] Oral liquids, as a common pharmaceutical dosage form, have their quality and safety directly impacting consumer health. However, current traceability systems for oral liquid raw materials face numerous challenges. Traditional traceability systems primarily rely on centralized databases for data storage and management. This means data is controlled by a few stakeholders, making data tampering costly and compromising reliability.
[0003] The reference patent, titled "Anti-counterfeiting and Traceability Method and System for Oral Liquids Based on Blockchain" (Patent Publication No.: CN116976919A, Patent Publication Date: 2023-10-31), describes a method that generates a unique identifier on each bottle of oral liquid; extracts and structures key information from each stage of the oral liquid production process to obtain a production data matrix and a circulation data matrix; obtains production controllability indicators from the production data matrix; obtains circulation adjustment-related indicators from the circulation data matrix; and constructs a key generation function based on the production controllability indicators and circulation adjustment-related indicators to generate a key. Users can decrypt the encrypted data in the blockchain using the oral liquid's identifier, enabling anti-counterfeiting and traceability of the oral liquid. By analyzing data from different stages and writing it into the key generation function, the method achieves privacy protection, tamper-proofing, and legality verification of production and circulation data.
[0004] Based on the above-mentioned documents, the existing oral liquid raw material traceability process is prone to problems such as data tampering or incomplete data. At the same time, the information silos between various links are serious, the relationship between various nodes in the supply chain is fragile, and a complete and legally effective liability relationship is not provided. Therefore, this invention provides an oral liquid raw material traceability method and system based on blockchain. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides a blockchain-based method and system for tracing the source of oral liquid raw materials. This solves the problems of data tampering or incompleteness in the existing oral liquid raw material data tracing process, as well as the serious information silos in each link, the fragile relationship between nodes in the supply chain, and the failure to provide a complete and legally effective liability relationship.
[0006] To achieve the above objectives, the present invention provides the following technical solution: a blockchain-based method for tracing the source of oral liquid raw materials, specifically comprising the following steps:
[0007] A1. To collect real-time relevant data on oral liquid raw materials at various nodes in the supply chain, and to transmit and store the collected data to the data storage terminal;
[0008] A2. Set category templates for data extraction. By setting a search algorithm that combines the category content in the category templates, the key features in the collected data are extracted. The related data between various nodes in the supply chain are also extracted. The extracted key features and related data are encrypted at different levels and written into the blockchain. The encrypted data generates a unique identifier code on the inside of the bottle and cap of the oral liquid as a digital identity.
[0009] A3. Users can scan the identification code of the oral liquid to obtain encrypted data in the blockchain and decrypt it to achieve anti-counterfeiting and traceability of the raw material-related data of the oral liquid.
[0010] Preferably, the operation in A1 that collects real-time relevant data on oral liquid raw materials at various nodes in the supply chain is as follows:
[0011] a11. Complete the receiving operation of digital information and record the timestamp of data reception;
[0012] a12. Complete the data recognition of paper documents. Convert paper documents into image data by scanning or taking pictures. Use optical character recognition technology to recognize and extract text information in the image. After extracting the text, use a natural language processing model to perform structured parsing of key fields, convert them into standardized digital information, and record the timestamp of data reception.
[0013] Preferably, the category template set in A2 for data extraction is:
[0014] a21. Establish a general title for multiple nodes in the current category template based on the node categories of the supply chain;
[0015] a22. Set different raw material name categories as secondary column headers below the main title of each node, and set the information categories that need to be known for different raw materials as row headers. The column position of the row header is located in the table column preceding the first secondary column header.
[0016] a23. A table-style category template is formed by combining the main title of the nodes, the secondary column titles, and the row titles.
[0017] Preferably, in step A2, the key feature extraction operation in the collected data is performed by setting a search algorithm that combines the category content in the category template:
[0018] B1. Extract the secondary column headers from the category template as reference content for the search function, and associate them by determining other scientific names of the raw material content in the current secondary column header to form name items containing both the raw material name and other scientific names.
[0019] B2. Set the first-level extraction window based on the longest character length in the name item, and then use the first-level extraction window to traverse the collected data content. When the first-level extraction window is paused, the content extracted in the window is compared with the content in the name item for similarity. The paragraph containing the content with the required similarity is extracted.
[0020] B3. After completing the paragraph extraction, set the second-level extraction window based on the longest character length of the line title. Use the second-level extraction window to compare character features in the extracted paragraph. After determining the key features that are the same as the character features of the line title, extract the numerical values or results related to the key features from the paragraph content.
[0021] B4. Fill the extracted values or results into the category template. Based on the currently determined secondary column headers and row headers, fill the values or results into the table column where the vertical column of the secondary column header and the horizontal row of the row header intersect. Also, fill in the timestamps of the data records synchronously.
[0022] Preferably, the operation of comparing the content extracted from the window and the content in the name item when the first-level extraction window in B2 is paused is as follows:
[0023] b21. Select the contents in the name item and compare them with the contents extracted from the window to perform character feature comparison operations;
[0024] b22. Determine if the content extracted from the window matches the first character feature of the content in the name item. If it does, determine if the first character feature is the last or second character in the extracted content matches the content in the corresponding name item. If they match, continue matching character features. If the number of character features in the extracted content is 70% of the number of character features in the corresponding name item, and they have connected character features, then it is related to the content in the name item. Extract the paragraph content containing the content that meets the requirements. If the matching process has the same character features and the content extracted from the window is insufficient, automatically expand the window to supplement the content.
[0025] b23. Conversely, if the extracted content does not match the content in the name item, a new first-level extraction window will be opened from the character feature after the last character of the current first-level extraction window to continue traversing and extracting. If the matching continues to fail, an instruction will be generated and fed back to the corresponding supply chain node for data compensation.
[0026] Preferably, the operation of comparing character features in the extracted paragraph using a two-level extraction window in B3 is as follows:
[0027] b31. Compare the extracted character features with the content of the line title in turn. The content that is the same as the character features of the line title is the key feature.
[0028] b32. When the extracted character features are not completely consistent with the content of the line title, it is determined whether the extracted content has the same part as the preceding character features of the line title. If so, the secondary extraction window is moved to the same character feature in the extracted content to complete the extraction of key features.
[0029] b33. Conversely, if the extracted character features are completely inconsistent with the content of the line title, the secondary extraction window will skip the current extraction content length and form a new extraction operation.
[0030] Preferably, the operation of extracting the correlation data between various nodes in the supply chain in A2 is as follows:
[0031] C1. Cooperation contracts are signed between various nodes in the supply chain, and the cooperation contracts bear legally binding seals or signatures.
[0032] C2. Extract personnel information and corresponding timestamps from each node of the supply chain to improve the information association between each node of the supply chain.
[0033] Preferably, the operation in A2 involving different levels of encryption processing of the extracted key features and related data before writing them into the blockchain is as follows:
[0034] D1. Divide the extracted key features and related data into three levels according to the sensitivity of the data, and set viewing permissions for roles based on the level;
[0035] D2, the three levels are high-confidentiality level, medium-confidentiality level and public level respectively. The high-confidentiality level involves commercial secrets and key intellectual property data related to oral liquid, the medium-confidentiality level involves the correlation data between supply chain nodes and raw material related data that needs to be protected from tampering, and the public level is the data of the oral liquid's basic parameters that are completely public.
[0036] D3. High-security data is encrypted using a symmetric encryption algorithm, and decompression requires a dynamic key that is used to decompress the data. Medium-security data is encrypted by converting it into an immutable hash value, while public-security data can be viewed directly.
[0037] Preferably, the operation of setting viewing permissions for roles based on level is as follows:
[0038] d11. When a viewer needs to view a high-secret level, the requester needs to provide corresponding decryption permission proof. First, the identity is verified through digital signature. After successful verification, the system will provide the real-time dynamic private key corresponding to the requester to decrypt and obtain the working key. Finally, the data content is decrypted after the dynamic working key is entered.
[0039] d12. When a viewer needs to view the medium-level security level, the hash value on the chain is compared with the corresponding binding hash value of the oral liquid to verify whether the data has been tampered with. If it has not been tampered with, the data can be traced and verified.
[0040] d13. When a viewer needs to view the public level, they can directly display the public data by scanning the QR code.
[0041] This invention also discloses a blockchain-based traceability system for oral liquid raw materials, including:
[0042] The data acquisition module collects and stores data on oral liquid raw materials at various nodes in the supply chain;
[0043] The data processing module extracts the required data, performs different levels of encryption based on the data's sensitivity, and generates an identification code.
[0044] The data traceability module allows users to access data from the blockchain by scanning the identification code of the oral liquid and to trace the data based on the viewer's permission level.
[0045] This invention provides a blockchain-based method and system for tracing the origin of oral liquid raw materials. Compared with existing technologies, it has the following advantages:
[0046] 1. This blockchain-based method and system for tracing the raw materials of oral liquids extracts key features from collected data by setting a search algorithm that incorporates category content from category templates. By creating tabular category templates containing main node titles, secondary column titles, and row titles, and combining traversal and similarity comparison algorithms for primary and secondary extraction windows, it efficiently and accurately extracts key feature values related to specific raw materials and attributes from unstructured raw data. This overcomes the problems of large data errors and low efficiency caused by traditional methods relying on manual input or simple keyword matching, laying a solid data foundation for highly reliable traceability. Furthermore, it covers the entire process of oral liquids from raw material collection and production to distribution, ensuring that data at each stage is truthfully recorded and traceable, thus solving the problem of incomplete information in traditional traceability systems.
[0047] 2. This blockchain-based method and system for tracing the raw materials of oral liquids, through the signing of cooperation contracts between various nodes in the supply chain, and the legally binding seals or signatures on the cooperation contracts, enables the extraction of personnel information and corresponding timestamps at each node in the supply chain. This improves the information association between various nodes in the supply chain. These related data, along with the key characteristics of the raw materials, are uploaded to the blockchain, forming an interlocking and tamper-proof chain of evidence. This effectively solves the problem of "information silos" in traditional traceability. Even if a problem occurs at a certain node, the responsible party can be quickly and accurately located.
[0048] 3. This blockchain-based method and system for tracing the raw materials of oral liquids achieves refined access control by dividing extracted key features and related data into three levels according to their sensitivity and setting viewing permissions for roles based on these levels. Ordinary consumers can verify the authenticity of publicly available information and medium-secret information, while regulators or authorized parties can access highly confidential information after strict identity verification. This ensures data transparency and traceability while protecting the company's core trade secrets, resolving the dilemma of balancing disclosure and confidentiality under a single access policy. Attached Figure Description
[0049] Figure 1 This is a flowchart illustrating the operation of the oral liquid raw material traceability method of the present invention;
[0050] Figure 2 This is a schematic diagram of the oral liquid raw material traceability system of the present invention. Detailed Implementation
[0051] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0052] Please see Figures 1-2 This invention provides two technical solutions:
[0053] Example 1: A blockchain-based method for tracing the source of oral liquid raw materials, specifically including the following steps:
[0054] A1. To collect real-time relevant data on oral liquid raw materials at various nodes in the supply chain, and to transmit and store the collected data to the data storage terminal;
[0055] A2. Set category templates for data extraction. By setting a search algorithm that combines the category content in the category templates, the key features in the collected data are extracted. The related data between various nodes in the supply chain are also extracted. The extracted key features and related data are encrypted at different levels and written into the blockchain. The encrypted data generates a unique identifier code on the inside of the bottle and cap of the oral liquid as a digital identity.
[0056] A3. Users can scan the identification code of the oral liquid to obtain encrypted data in the blockchain and decrypt it to achieve anti-counterfeiting and traceability of the raw material-related data of the oral liquid.
[0057] The system receives digital information in real time from various links in the supply chain (such as raw material procurement, production and processing, and logistics and transportation) through API interfaces, message queues, or database triggers. This information may include raw material batch numbers, production dates, quality inspection reports, etc. After receiving the information, the system immediately records the current time as a timestamp to ensure the timeliness and traceability of the data.
[0058] By setting up a search algorithm that combines category content from category templates, key features in the collected data can be extracted. By creating a tabular category template containing a main node title, secondary column titles, and row titles, and combining the traversal and similarity comparison algorithms of the first and second level extraction windows, key feature values related to specific raw materials and attributes can be extracted efficiently and accurately from unstructured raw data. This overcomes the problems of large data errors and low efficiency caused by traditional methods that rely on manual input or simple keyword matching. It lays a solid data foundation for highly reliable traceability and covers the entire process of oral liquid from raw material collection, production to distribution, ensuring that the data at each stage is truthfully recorded and traceable, thus solving the problem of incomplete information in traditional traceability systems.
[0059] In this embodiment of the invention, the operation of collecting real-time relevant data on oral liquid raw materials at various nodes of the supply chain in A1 is as follows:
[0060] a11. Complete the receiving operation of digital information and record the timestamp of data reception;
[0061] a12. Complete the data recognition of paper documents. Convert paper documents into image data by scanning or taking pictures. Use optical character recognition technology to recognize and extract text information in the image. After extracting the text, use a natural language processing model to perform structured parsing of key fields, convert them into standardized digital information, and record the timestamp of data reception.
[0062] In this embodiment of the invention, the category template for data extraction is set in A2 as follows:
[0063] a21. Establish a general title for multiple nodes in the current category template based on the node categories of the supply chain;
[0064] a22. Set different raw material name categories as secondary column headers below the main title of each node, and set the information categories that need to be known for different raw materials as row headers. The column position of the row header is located in the table column preceding the first secondary column header.
[0065] a23. A table-style category template is formed by combining the main title of the nodes, the secondary column titles, and the row titles.
[0066] The category template is a hierarchical table structure used to organize and store data collected from various stages of the supply chain. The top level is the main node title, representing different stages of the supply chain (such as procurement, production, logistics, etc.). Each main node title has multiple sub-column titles, representing the names of the raw materials involved in that stage. Each raw material name has a row title, representing the specific information related to that raw material that needs to be extracted (such as quantity, batch number, quality inspection results, etc.), making data extraction more organized and facilitating subsequent processing and analysis.
[0067] In this embodiment of the invention, A2 uses a search algorithm that combines category content from category templates to extract key features from the collected data as follows:
[0068] B1. Extract the secondary column headers from the category template as reference content for the search function, and associate them by determining other scientific names of the raw material content in the current secondary column header to form name items containing both the raw material name and other scientific names.
[0069] B2. Set the first-level extraction window based on the longest character length in the name item, and then use the first-level extraction window to traverse the collected data content. When the first-level extraction window is paused, the content extracted in the window is compared with the content in the name item for similarity. The paragraph containing the content with the required similarity is extracted.
[0070] B3. After completing the paragraph extraction, set the second-level extraction window based on the longest character length of the line title. Use the second-level extraction window to compare character features in the extracted paragraph. After determining the key features that are the same as the character features of the line title, extract the numerical values or results related to the key features from the paragraph content.
[0071] B4. Fill the extracted values or results into the category template. Based on the currently determined secondary column headers and row headers, fill the values or results into the table column where the vertical column of the secondary column header and the horizontal row of the row header intersect. Also, fill in the timestamps of the data records synchronously.
[0072] In this embodiment of the invention, the operation of comparing the similarity between the content extracted from the window and the content in the name item when the first-level extraction window in B2 is paused is as follows:
[0073] b21. Select the contents in the name item and compare them with the contents extracted from the window to perform character feature comparison operations;
[0074] b22. Determine if the content extracted from the window matches the first character feature of the content in the name item. If it does, determine if the first character feature is the last or second character in the extracted content matches the content in the corresponding name item. If they match, continue matching character features. If the number of character features in the extracted content is 70% of the number of character features in the corresponding name item, and they have connected character features, then it is related to the content in the name item. Extract the paragraph content containing the content that meets the requirements. If the matching process has the same character features and the content extracted from the window is insufficient, automatically expand the window to supplement the content.
[0075] b23. Conversely, if the extracted content does not match the content in the name item, a new first-level extraction window will be opened from the character feature after the last character of the current first-level extraction window to continue traversing and extracting. If the matching continues to fail, an instruction will be generated and fed back to the corresponding supply chain node for data compensation.
[0076] In this embodiment of the invention, the operation of comparing character features in the extracted paragraph using a two-level extraction window in B3 is as follows:
[0077] b31. Compare the extracted character features with the content of the line title in turn. The content that is the same as the character features of the line title is the key feature.
[0078] b32. When the extracted character features are not completely consistent with the content of the line title, it is determined whether the extracted content has the same part as the preceding character features of the line title. If so, the secondary extraction window is moved to the same character feature in the extracted content to complete the extraction of key features.
[0079] b33. Conversely, if the extracted character features are completely inconsistent with the content of the line title, the secondary extraction window will skip the current extraction content length and form a new extraction operation.
[0080] In this embodiment of the invention, the operation of extracting the correlation data between various nodes in the supply chain in A2 is as follows:
[0081] C1. Cooperation contracts are signed between various nodes in the supply chain, and the cooperation contracts bear legally binding seals or signatures.
[0082] C2. Extract personnel information and corresponding timestamps from each node of the supply chain to improve the information association between each node of the supply chain.
[0083] The transition between different links in the supply chain is often accompanied by the signing of cooperation contracts. These contracts bear legally binding official seals or signatures, which serve as important evidence of the relationship between the links. The system improves the information association between different links in the supply chain by extracting key information from the contracts (such as the names of the contracting parties, a summary of the contract content, and the signing date), as well as information on the personnel involved in each link (such as the operator's name, position, and operation time) and timestamps.
[0084] By signing cooperation contracts at various nodes in the supply chain, and with legally binding seals or signatures on these contracts, information on personnel involved at each node and their corresponding timestamps can be extracted. This improves the information linking between nodes in the supply chain. By uploading this linked data along with key characteristics of raw materials to the blockchain, an interlocking and tamper-proof chain of evidence is formed. This effectively solves the "information silo" problem in traditional traceability. Even if a problem occurs at a certain node, the responsible party can be quickly and accurately located.
[0085] In this embodiment of the invention, the operation of writing the extracted key features and related data into the blockchain by performing different levels of encryption processing in A2 is as follows:
[0086] D1. Divide the extracted key features and related data into three levels according to the sensitivity of the data, and set viewing permissions for roles based on the level;
[0087] D2, the three levels are high-confidentiality level, medium-confidentiality level and public level respectively. The high-confidentiality level involves commercial secrets and key intellectual property data related to oral liquid, the medium-confidentiality level involves the correlation data between supply chain nodes and raw material related data that needs to be protected from tampering, and the public level is the data of the oral liquid's basic parameters that are completely public.
[0088] D3. High-security data is encrypted using a symmetric encryption algorithm, and decompression requires a dynamic key that is used to decompress the data. Medium-security data is encrypted by converting it into an immutable hash value, while public-security data can be viewed directly.
[0089] In this embodiment of the invention, the viewing permission operation based on the level setting of the role is as follows:
[0090] d11. When a viewer needs to view a high-secret level, the requester needs to provide corresponding decryption permission proof. First, the identity is verified through digital signature. After successful verification, the system will provide the real-time dynamic private key corresponding to the requester to decrypt and obtain the working key. Finally, the data content is decrypted after the dynamic working key is entered.
[0091] d12. When a viewer needs to view the medium-level security level, the hash value on the chain is compared with the corresponding binding hash value of the oral liquid to verify whether the data has been tampered with. If it has not been tampered with, the data can be traced and verified.
[0092] d13. When a viewer needs to view the public level, they can directly display the public data by scanning the QR code.
[0093] The system categorizes extracted key features and related data into three levels based on their sensitivity: high-secrecy, medium-secrecy, and public. High-secrecy data involves trade secrets and critical intellectual property information related to the oral liquid, such as formulas and production processes. This data is encrypted using a symmetric encryption algorithm and requires a dynamic key for decompression. Medium-secrecy data involves data related to supply chain nodes and raw materials that require tamper-proof protection, such as contract details and quality inspection reports. This data is converted into immutable hash values for storage and verification. Public-secrecy data consists of completely public basic parameters of the oral liquid, such as product name and specifications. This data can be viewed directly without encryption. Through this tiered encryption process, the system ensures both data transparency and traceability while protecting the company's core trade secrets.
[0094] By categorizing extracted key features and related data into three levels based on their sensitivity, and setting viewing permissions for roles according to these levels, fine-grained access control is achieved. Ordinary consumers can verify the authenticity of publicly available information and medium-to-high-secret information, while regulators or authorized parties can access highly confidential information after passing strict identity verification. This ensures data transparency and traceability while protecting core business secrets, resolving the dilemma of balancing disclosure and confidentiality under a single access policy.
[0095] Example 2 differs from Example 1 in that: the present invention also discloses a blockchain-based oral liquid raw material traceability system, including:
[0096] The data acquisition module collects and stores data on oral liquid raw materials at various nodes in the supply chain;
[0097] The data processing module extracts the required data, performs different levels of encryption based on the data's sensitivity, and generates an identification code.
[0098] The data traceability module allows users to access data from the blockchain by scanning the identification code of the oral liquid and to trace the data based on the viewer's permission level.
[0099] Furthermore, any content not described in detail in this specification is existing technology known to those skilled in the art.
[0100] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0101] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A blockchain-based method for tracing the raw materials of oral liquid, characterized in that: Specifically comprising the following steps: A1, realize the real-time related data of the oral liquid raw materials at each node of the supply chain is collected, and the collected data is transmitted and stored to the data storage end; A2, set a category template for data extraction, realize the extraction operation of the key features in the collected data by setting a search algorithm combined with the category content in the category template, and extract the associated data between each node of the supply chain, and perform different levels of encryption processing operation on the extracted key features and associated data and write them into the blockchain, and the encrypted data generates a unique identification code as a digital identity in the inside of the bottle body and the bottle cap of the oral liquid; A3, the user decrypts the encrypted data in the blockchain by scanning the identification code of the oral liquid, realizes the anti-counterfeiting traceability of the raw material related data of the oral liquid.
2. The blockchain based traceability method of oral liquid raw material as claimed in claim 1, wherein: The operation of collecting the real-time related data of the oral liquid raw materials at each node of the supply chain in A1 is: a11, complete the receiving operation of digital information, and record the timestamp of data receiving; a12, complete the data recognition of paper files, convert paper files into image data by scanning or photographing, identify and extract the text information in the image by using optical character recognition technology, and after extracting the text, structure the key fields by using a natural language processing model, and convert them into standardized digital information, and record the timestamp of data receiving.
3. The blockchain based traceability method of oral liquid raw material as claimed in claim 1 wherein: The category template for data extraction in A2 is: a21, establish a plurality of node total titles of the current category template according to the node categories of the supply chain; a22, set different raw material name categories as secondary column titles based on each node total title, and set the information categories required to be known by different raw materials as row titles, and the column position of the row title is located in the presequence table column of the first secondary column title; a23, form a table format category template by integrating the node total title, the secondary column title and the row title.
4. The blockchain based traceability method of oral liquid raw material as claimed in claim 3 wherein: The extraction operation of the key features in the collected data by setting a search algorithm combined with the category content in the category template in A2 is: B1, extract the secondary column title in the category template as the reference content of the search function, and associate the other scientific names of the raw material content in the current secondary column title to form a name item containing the raw material name and the other scientific names; B2, set a first extraction window with the longest character length in the name item, and then use the first extraction window to traverse the collected data content, and compare the content extracted in the window with the content in the name item when the first extraction window stops, and the paragraph content where the content meeting the similarity requirement is extracted; B3, after completing the paragraph extraction, set a second extraction window with the longest character length of the row title, and use the second extraction window to compare the character features in the extracted paragraph, and after determining the key features with the same character features as the row title, extract the numerical value or result content related to the key features in the paragraph content; B4, filling the extracted numerical value or result content into the category template, taking the currently determined secondary column title and row title as the basis, filling the numerical value or result content into the table column intersected by the column in which the secondary column title is located and the row in which the row title is located, and synchronously filling the time stamp of the data record.
5. The blockchain based traceability method of oral liquid raw material as claimed in claim 4 wherein: The operation of comparing the content extracted in the window with the content in the name item in the B2 primary extraction window stay is: b21, sequentially selecting the content in the name item and the content extracted in the window for character feature comparison operation; b22, by determining whether the content extracted in the window has the same first character feature as the content in the name item, if so, determining whether the first character feature after the first or second character feature in the extracted content is consistent with the content in the corresponding name item, if so, continue matching the character feature, and meet the 70% of the number of character features of the extracted content and the character features of the corresponding name item, and have the connected character features, then the content in the name item is relevant, the paragraph content meeting the demand is extracted, and when the matching process has the same character feature and the content extracted in the window is insufficient, the window is automatically expanded to supplement the content; b23, otherwise, if the extracted content does not match the content in the name item, a new primary extraction window is started from the character feature after the last character feature in the current primary extraction window to continue to extract, and if the matching is not successful, an instruction is generated to feedback to the corresponding supply chain node for data compensation.
6. The blockchain based traceability method of oral liquid raw material as claimed in claim 4 wherein: The operation of comparing the character features extracted in the B3 secondary extraction window with the content of the row title is: b31, sequentially comparing the extracted character features with the content of the row title, and needing to meet the condition that the content of the row title is contained in the extracted character features, then the content with the same character features as the row title is the key feature; b32, when the extracted character features are not completely consistent with the content of the row title, it is judged whether the extracted content has the same part as the previous character features of the row title, if so, the secondary extraction window is moved to the same character feature in the extracted content to complete the extraction of the key feature; b33, otherwise, when the extracted character features are completely inconsistent with the content of the row title, the secondary extraction window skips the length of the current extracted content to form a new extraction operation.
7. The blockchain based traceability method of oral liquid raw material as claimed in claim 1 wherein: The operation of extracting the associated data between the nodes of the supply chain in A2 is: C1, the conversion between the nodes of the supply chain signs a cooperation contract, and the cooperation contract has a legal effect seal or signature; C2, the personnel information and corresponding time stamp of the personnel handling the supply chain nodes are extracted to perfect the information association between the nodes of the supply chain.
8. The blockchain based traceability method of oral liquid raw material as claimed in claim 1 wherein: The operation of writing the extracted key features and associated data into the blockchain after different levels of encryption processing in A2 is: D1, dividing the extracted key features and associated data into three levels according to the sensitivity of the data, and setting the viewing permission of the role based on the level; D2, three levels are high, medium and public levels, and the high level involves commercial secrets and key intellectual property data related to oral liquid, the medium level involves related data between supply chain nodes and raw material related data that needs to be tamper-proof, and the public level is fully public data of oral liquid basic parameters; D3, and the high level data is encrypted by symmetric encryption algorithm, and the dynamic key feedback for viewing high level data is required for decryption, the medium level data is converted into tamper-proof hash value, and the public level data can be directly viewed.
9. The blockchain based traceability method of oral liquid raw material as claimed in claim 8, wherein: The viewing permission operation based on level setting role is: d11, when the viewer needs to view the high level, the requester needs to provide the corresponding decryption permission proof, first verify the identity through digital signature, after successful verification, the system feedbacks the real-time dynamic requester corresponding private key decryption to obtain the working key, and finally inputs the dynamic working key to decrypt the data content; d12, when the viewer needs to view the medium level, the data is verified whether it is tampered by comparing the hash value on the chain with the corresponding oral liquid binding hash value, and the data can be traced and checked if it is not tampered; d13, when the viewer needs to view the public level, the public data can be directly displayed by directly scanning the code.
10. A blockchain-based raw material traceability system for oral liquid, adopting the blockchain-based raw material traceability method according to any one of claims 1-9, characterized in that: It includes: Data acquisition module, collecting and storing the data of oral liquid raw materials at each node of the supply chain; Data processing module, completes the extraction of the required data, and completes the encryption operation of different levels of data based on the sensitivity of the data, and generates an identification code; Data traceability module, users obtain data in the block chain by scanning the identification code of oral liquid, and realize data traceability according to the permission level of the viewer.
Citation Information
Patent Citations
Oral liquid anti-counterfeiting traceability method and system based on block chain
CN116976919A