Multi-source data evidence storage method for fresh cold chain compliance detection

By performing time-series processing and encrypted storage of fresh food cold chain data, the security and redundancy issues in cold chain data storage are resolved, achieving efficient and secure data storage and management.

CN121842237APending Publication Date: 2026-04-10CHINA ECOLOGICAL FOOD TECHNOLOGY (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA ECOLOGICAL FOOD TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2025-12-31
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing cold chain data storage technologies suffer from insufficient security and excessive redundant data, making cold chain data susceptible to tampering and slow to process and store.

Method used

By collecting and recording fresh food cold chain data, integrating it into time-series data based on time periods, generating security keys to encrypt the data, and using blockchain for distributed storage, redundant data is reduced and security is improved.

Benefits of technology

Significantly reduce redundant data, improve the security and storage efficiency of cold chain data, and ensure the authenticity and integrity of data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121842237A_ABST
    Figure CN121842237A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-source data evidence storage method for fresh cold chain compliance detection, and relates to the technical field of cold chain data evidence storage, and the method comprises the following steps: collecting and recording fresh cold chain data, and integrating the multi-source fresh cold chain data into fresh cold chain time sequence data based on a time period; obtaining the name of the fresh food in the cold chain, naming the fresh food as a target fresh food, and generating a security key for encryption for the fresh food cold chain time sequence data based on the target fresh food; performing encryption protection on the fresh cold chain time series data through the security key, and converting the fresh cold chain time series data into a security ciphertext; carrying out distributed evidence storage on the security ciphertext based on a block chain storage technology; the method is used for solving the problems that in an existing cold chain data evidence storage technology, safety protection on cold chain data is insufficient, too many redundant data exist in the cold chain data, consequently, the cold chain data is prone to being tampered, and processing and storage of the cold chain data are slow.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of cold chain data storage technology, specifically a multi-source data storage method for fresh food cold chain compliance testing. Background Technology

[0002] Cold chain data storage technology refers to a comprehensive technology that uses digital means to transform key data such as temperature and time in the cold chain logistics process into auditable "electronic evidence" while ensuring its authenticity.

[0003] Fresh produce requires suitable low-temperature environments for both cold chain transportation and storage; otherwise, its shelf life will not meet expectations. Therefore, ensuring the compliance and authenticity of fresh produce cold chain data is crucial. However, existing cold chain data storage technologies typically only store data in databases or blockchains for retrieval, leaving the data vulnerable to theft or tampering, compromising its security. Furthermore, current technologies often integrate cold chain data using a full-database approach, merging data from multiple sources, which can lead to data inconsistencies and compromises. Excessive redundant data and large data volume are detrimental to the processing and storage of cold chain data. For example, the patent application with publication number CN117993808A discloses a "cold chain logistics data verification method and device, electronic device and storage medium". This scheme only ensures the security of cold chain data through a single symmetric encryption, with few protection measures and insufficient security. Existing cold chain data storage technologies also have problems such as insufficient security protection for cold chain data and a lot of redundant data in cold chain data, which makes cold chain data easy to be tampered with and slow processing and storage of cold chain data. Summary of the Invention

[0004] This invention aims to at least partially solve one of the technical problems in the prior art. It involves collecting and recording fresh food cold chain data, integrating multi-source fresh food cold chain data into time-series data based on time periods, obtaining the names of fresh produce in the cold chain (designated as target fresh produce), generating an initial key encoding based on the target fresh produce, using this initial key encoding to generate a security key for encryption of the fresh food cold chain time-series data, converting the fresh food cold chain time-series data into data to be encrypted, performing encryption calculations on the data to be encrypted using the security key, outputting secure ciphertext, and finally distributing the secure ciphertext using blockchain storage technology. This addresses the shortcomings of existing cold chain data storage technologies, such as insufficient security protection for cold chain data, the presence of redundant data leading to tampering, and slow processing and storage of cold chain data.

[0005] To achieve the above objectives, this application provides a multi-source data storage method for compliance testing of fresh food cold chain, comprising the following steps:

[0006] Collect and record fresh food cold chain data, and integrate multi-source fresh food cold chain data into fresh food cold chain time series data based on time period.

[0007] Obtain the name of the fresh produce in the cold chain, name it the target fresh produce, and generate a security key for encrypting the cold chain time-series data based on the target fresh produce.

[0008] Encryption and protection of fresh cold chain time-series data is achieved by using a security key, converting the fresh cold chain time-series data into secure ciphertext;

[0009] Distributed storage of secure encrypted text based on blockchain storage technology.

[0010] Furthermore, the collection and recording of fresh food cold chain data, and the integration of multi-source fresh food cold chain data into fresh food cold chain time-series data based on time periods, includes the following sub-steps:

[0011] The fresh food cold chain data includes outbound data, transportation data, and inbound data. The outbound data includes the outbound warehouse temperature and outbound time period. The transportation data includes the vehicle compartment temperature and vehicle compartment time period. The inbound data includes the inbound warehouse temperature and inbound time period.

[0012] The outbound warehouse temperature, the vehicle compartment temperature, and the inbound warehouse time period are collectively referred to as temperature data, and the outbound warehouse time period, vehicle compartment time period, or inbound warehouse time period corresponding to the temperature data are named time data.

[0013] When collecting temperature and time data, if the temperature data changes, a time node is established at the moment the temperature data changes, and it is named the temperature change point.

[0014] Two adjacent temperature change points are labeled as TI and TM, respectively, where TI is earlier than TM. The range [TI,TM] is the time data, and the temperature data within the time data remains unchanged.

[0015] Based on time and temperature data, multi-source fresh food cold chain data is integrated into fresh food cold chain time-series data.

[0016] Furthermore, integrating multi-source fresh food cold chain data into fresh food cold chain time-series data based on time and temperature data includes the following sub-steps:

[0017] The letters a to z represent 0℃ to -25℃ respectively, and the letters A to Z represent 0℃ to 25℃ respectively. For 0℃, one letter can be randomly selected from a and A.

[0018] The temperature data is converted into letters and named the temperature code. The time data is calculated in TM-TI and the calculation result is named the time code.

[0019] Time codes are numbered according to the chronological order of the time data, using the symbol TR. n This indicates that TR will be used simultaneously. n The corresponding temperature code is marked as TE. n Where n is a non-zero natural number and n is the index of TR and TE, TR n and TE n According to TE n In the past, TR n The sequence of numbers is then combined to obtain the fresh food cold chain time sequence code. The fresh food cold chain time sequence codes are then combined in ascending order of n to obtain the fresh food cold chain time sequence data.

[0020] Further, obtaining the name of the fresh produce in the cold chain, naming it the target fresh produce, and generating a security key for encrypting the fresh produce cold chain time-series data based on the target fresh produce includes the following sub-steps:

[0021] Obtain the name of the fresh produce in the cold chain, name it the target fresh produce, and generate an initial key code based on the target fresh produce;

[0022] The initial key is used to generate a secure key for encrypting the time-series data of the fresh cold chain.

[0023] Further, obtaining the name of the fresh produce in the cold chain, naming it the target fresh produce, and generating an initial key code based on the target fresh produce includes the following sub-steps:

[0024] Obtain the name of the fresh produce in the cold chain and name it the target fresh produce;

[0025] Obtain the hexadecimal encoding of the target fresh produce in UTF-8 encoding and name it the initial key encoding.

[0026] Furthermore, generating a secure key for encryption of the fresh food cold chain time-series data using the initial key encoding includes the following sub-steps:

[0027] The initial key encoding is hashed using a hash algorithm, and the resulting hash value is named the hash key.

[0028] Convert the hash key from hexadecimal to octal to obtain the security key.

[0029] Furthermore, encrypting the fresh food cold chain time-series data with a security key and converting the fresh food cold chain time-series data into secure ciphertext includes the following sub-steps:

[0030] Convert fresh food cold chain time-series data into data to be encrypted;

[0031] The data to be encrypted is encrypted using a security key, and a secure ciphertext is output.

[0032] Furthermore, converting fresh food cold chain time-series data into data to be encrypted includes the following sub-steps:

[0033] The fresh food cold chain time-series data is converted into binary format in ASCII encoding and named the initial data encoding;

[0034] Grouping eight binary digits into a single code group, and numbering these code groups from left to right, using the symbol E. m This indicates that m is a non-zero natural number and m is the index of E;

[0035] Let M be the maximum value of m, and construct an M×8 matrix named the data matrix. The data matrix has a total of M rows and 8 columns. Let E... m The data is entered from top to bottom in the data matrix in ascending order of m to obtain the data to be encrypted.

[0036] Furthermore, the encryption computation of the data to be encrypted using a secure key, and the output of secure ciphertext, includes the following sub-steps:

[0037] The number in the i-th row and j-th column of the data to be encrypted is labeled as F(i,j), where i and j are both non-zero natural numbers and (i,j) is the index of F;

[0038] To obtain the security key, number the digits in the security key from left to right, using the symbol S. h This indicates that h is a non-zero natural number and h is the index of S;

[0039] Starting with i=1 and h=1, set S h Substitute j into F(i,j) to obtain F(i,S) h If F(i,S) h If i has already been acquired, increment i and reacquire F(i,S). h ), execute in a loop, and obtain the F(i,S) h ) Marked as K t , where t is a non-zero natural number and t is the index of K, and t is initially 1;

[0040] Reset i to 1 and increment h and t by one, then repeatedly obtain F(i,S). h And obtain K t If the maximum value of h is reached, then h is reset to 1 and K is continuously extracted. t until all F(i,j) are labeled with different K. t until;

[0041] Let H be the maximum value of h, and for any K t , obtain S t%H+1 If S t%H+1 If it is even, then K t Perform bit flipping, where S t%H+1 That is, S is h=t%H+1 h ;

[0042] Arrange K in ascending order of t. t Combine them to obtain secure ciphertext.

[0043] Furthermore, the distributed storage of secure encrypted text based on blockchain storage technology includes the following sub-steps:

[0044] Securely encrypted data is stored on each storage node of the blockchain storage platform;

[0045] When a user requests access to fresh food cold chain data, the system verifies the user's identity. Once the verification is successful, the system retrieves the secure encrypted data from the blockchain storage platform, decrypts it, restores the secure encrypted data to the fresh food cold chain data, and displays it to the user.

[0046] The beneficial effects of this invention are as follows: This invention collects and records fresh food cold chain data, and integrates multi-source fresh food cold chain data into fresh food cold chain time-series data based on time periods. The advantage is that it completes the simplified collection of fresh food cold chain data in the data collection stage, which greatly reduces redundant data. At the same time, the integration of fresh food cold chain time-series data actually performs preliminary encryption on the fresh food cold chain data, which provides more protection for the security of fresh food cold chain data, improves the security of cold chain data storage, and reduces the redundancy of cold chain data.

[0047] This invention obtains the name of fresh produce in the cold chain, designates it as the target fresh produce, generates an initial key code based on the target fresh produce, uses the initial key code to generate a security key for encrypting the fresh produce cold chain time-series data, converts the fresh produce cold chain time-series data into data to be encrypted, performs encryption calculations on the data to be encrypted using the security key, outputs secure ciphertext, and finally performs distributed storage of the secure ciphertext based on blockchain storage technology. The advantage is that different security keys are used for each type of fresh produce, and special encryption processing is performed. Moreover, the encryption processing adopts a completely new encryption process, which improves the security and effectiveness of cold chain data storage. Attached Figure Description

[0048] Figure 1 This is a flowchart illustrating the steps of the method of the present invention;

[0049] Figure 2 This is a schematic diagram of the data to be encrypted according to the present invention;

[0050] Figure 3 For the extraction of K in this invention t A schematic diagram;

[0051] Figure 4 This is a schematic diagram of the electronic device of the present invention. Detailed Implementation

[0052] 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.

[0053] Example 1, please refer to Figure 1 As shown, this application provides a multi-source data storage method for compliance testing of fresh food cold chain, including the following steps:

[0054] Step S1 involves collecting and recording fresh food cold chain data, and simultaneously integrating multi-source fresh food cold chain data into fresh food cold chain time-series data based on time periods. Step S1 includes the following sub-steps:

[0055] Step S101: Fresh food cold chain data includes outbound data, transportation data, and inbound data. Outbound data includes outbound warehouse temperature and outbound time period. Transportation data includes vehicle compartment temperature and vehicle compartment time period. Inbound data includes inbound warehouse temperature and inbound time period.

[0056] Step S102: The outbound warehouse temperature, the vehicle compartment temperature, and the inbound warehouse time period are collectively referred to as temperature data, and the outbound warehouse time period, vehicle compartment time period, or inbound warehouse time period corresponding to the temperature data are named time data.

[0057] Step S103: When collecting temperature data and time data, if the temperature data changes, a time node is established at the moment when the temperature data changes, and named the temperature change point.

[0058] Step S104: Mark two adjacent temperature change points as TI and TM respectively, where TI is earlier than TM, and the range [TI,TM] is the time data, and the temperature data within the time data remains unchanged;

[0059] In practice, for example, at 8:26:43 on December 19, 2025, the warehouse temperature was monitored to change from 3℃ to 4℃. This time, 8:26:43, is considered a temperature change point. Afterward, the warehouse temperature remained at 4℃ for 15 seconds, meaning at 8:26:58 on December 19, 2025, the warehouse temperature was monitored to change from 4℃ to 3℃. This time, 8:26:58, is considered a temperature change point. From 8:26:43 to 8:26:58 on December 19, 2025, the warehouse temperature remained at 4℃. Therefore, 8:26:43 on December 19, 2025 is marked as TI. Mark 8:26:58 as TM, and the time data will be [2025-12-19 8:26:43, 2025-12-19 8:26:58], and the corresponding temperature data will be 4℃. Continue in this way to record all time data and temperature data.

[0060] Step S105: Based on time data and temperature data, integrate multi-source fresh food cold chain data into fresh food cold chain time-series data;

[0061] Step S105 includes the following sub-steps:

[0062] Step S1051: Use letters a to z to represent 0℃ to -25℃ respectively, and use letters A to Z to represent 0℃ to 25℃ respectively. For 0℃, just randomly select a letter between a and A to represent it.

[0063] Step S1052: Convert the temperature data into letters for representation and name it as temperature code; calculate TM-TI in the time data and name the calculation result as time code.

[0064] Step S1053: Number the time codes according to the chronological order of the time data, using the symbol TR. n This indicates that TR will be used simultaneously. n The corresponding temperature code is marked as TE. n Where n is a non-zero natural number and n is the index of TR and TE, TR n and TE n According to TE n In the past, TR n The sequence of numbers is combined to obtain the fresh cold chain time sequence code. The fresh cold chain time sequence codes are combined in ascending order of n to obtain the fresh cold chain time sequence data.

[0065] In practical implementation, existing cold chain data storage technologies typically use temperature data at any given moment. Assuming data is updated every 5 seconds, extracting 30 minutes of cold chain data would yield 360 temperature and time entries, resulting in excessive redundancy. In this embodiment, if the temperature is 4°C, the temperature code is E; if it's -3°C, it's d; and so on. If the temperature is 0°C, a letter is randomly selected from a and A as the temperature code. Since the time data is [2025-12-19 8:26:43, 2025-12-19]... [8:26:58] The calculated time code is 15, with the unit uniformly in seconds. The unit is omitted in the time code. For example, if the time code here is TR1, then TE1 is E. The combined fresh food cold chain time code is E15. Similarly, all fresh food cold chain time codes are extracted. For example, the combined fresh food cold chain time codes from TR1 to TR5 are E15, D186, E298, D449 and C356 respectively. The final combined fresh food cold chain time data is E15D186E298D449C356. Under the same conditions, this embodiment can only extract less than half of the temperature data and time data, which greatly reduces the existence of redundant data and directly provides preliminary security protection for fresh food data.

[0066] Step S2: Obtain the name of the fresh produce in the cold chain, name it "target fresh produce," and generate a security key for encryption of the fresh produce cold chain time-series data based on the target fresh produce. Step S2 includes the following sub-steps:

[0067] Step S201: Obtain the name of the fresh food in the cold chain, name it the target fresh food, and generate an initial key code based on the target fresh food;

[0068] Step S201 includes the following sub-steps:

[0069] Step S2011: Obtain the name of the fresh produce in the cold chain and name it the target fresh produce;

[0070] Step S2012: Obtain the hexadecimal encoding of the target fresh produce in UTF-8 encoding and name it the initial key encoding;

[0071] In practice, if the fresh food to be stored and transported is salmon, then the target fresh food is salmon. If the types of fresh food to be stored and transported are not the same, such as salmon and tuna being stored and transported at the same time, then the combination is based on the proportion of salmon and tuna during storage and transportation. For example, if 30% is salmon and 70% is tuna, then the target fresh food is tuna and salmon. Taking salmon as the target fresh food, the hexadecimal encoding of salmon in UTF-8 encoding is obtained, and the initial key encoding is e4b889e69687e9b1bc.

[0072] Step S202: Generate a security key for encryption using the initial key encoding of the fresh cold chain time-series data;

[0073] Step S202 includes the following sub-steps:

[0074] Step S2021: Perform a hash operation on the initial key encoding using a hash algorithm, and name the calculated hash value as the hash key;

[0075] Step S2022: Convert the hash key from hexadecimal format to octal format to obtain the security key;

[0076] In practice, the hash key is calculated as 081fd8c6270cd05f412a06adcde7b981cea1a82e9277e6b1e13fb61f670e4f7d, which is converted to octal to obtain the security key as 403766143047031501372022500653346747563007165032405644473746543604775541754703447575.

[0077] Step S3 involves encrypting the fresh food cold chain time-series data using a security key, converting the data into secure ciphertext. Step S3 includes the following sub-steps:

[0078] Step S301: Convert the fresh food cold chain time-series data into data to be encrypted;

[0079] Step S301 includes the following sub-steps:

[0080] Step S3011: Convert the fresh cold chain time-series data into binary format encoding in ASCII encoding, and name it the initial data encoding;

[0081] Step S3012: Group eight binary digits into a single code group, number the code groups from left to right, and use the symbol E. m This indicates that m is a non-zero natural number and m is the index of E;

[0082] Please see Figure 2 As shown, in step S3013, the maximum value of m is marked as M, an M×8 matrix is ​​constructed and named the data matrix. The data matrix has a total of M rows and 8 columns. E m Enter the data into the data matrix from top to bottom in ascending order of m to obtain the data to be encrypted;

[0083] In practice, due to the large amount of data, it is inconvenient to demonstrate in detail in this embodiment. Therefore, this embodiment only lists a portion of the data to illustrate the encryption process. The fresh food cold chain time-series data is E15D186E298D449C356, which is converted to obtain the initial data encoding as "01000101 00110001 00110101 01000100 00110001 0011100000110110 01000101 00110010 00111001 00111000 01000100 00110100 0011010000111001 01000011 00110011 00110101 "00110110" (without quotes) uses spaces to separate eight-bit numbers. Since each byte is an eight-bit binary number, an M×8 matrix is ​​used to encode the initial data, resulting in the data matrix shown below. Figure 2 As shown, Figure 2 This refers to the data to be encrypted.

[0084] Step S302: Perform encryption calculations on the data to be encrypted using the security key, and output secure ciphertext;

[0085] Step S302 includes the following sub-steps:

[0086] Step S3021: Mark the number in the i-th row and j-th column of the data to be encrypted as F(i,j), where i and j are both non-zero natural numbers and (i,j) is the index of F;

[0087] Step S3022: Obtain the security key. Number the numbers in the security key from left to right, using the symbol S. h This indicates that h is a non-zero natural number and h is the index of S;

[0088] Please see Figure 3 As shown, in step S3023, starting with i=1 and h=1, S... h Substitute j into F(i,j) to obtain F(i,S) h If F(i,S) h If i has already been acquired, increment i and reacquire F(i,S). h ), execute in a loop, and obtain the F(i,S) h ) Marked as K t , where t is a non-zero natural number and t is the index of K, and t is initially 1;

[0089] Step S3024: Reset i to 1 and increment h and t by one, then repeat the process of obtaining F(i,S). h And obtain K tIf the maximum value of h is reached, then h is reset to 1 and K is continuously extracted. t until all F(i,j) are labeled with different K. t until;

[0090] In specific implementation, F(i,j) is obtained by labeling, where 1≤i≤19, 1≤j≤8, and the security key is 403766143047031501372022500653346747563007165032405644473746543604775541754703447575. S is obtained by numbering. h , 1≤h≤84, starting with i=1 and h=1, at this time S h Let S1 be 4, and substituting S1 into the equation yields F(i,S). h Let F(1,4) be the value of j. We label F(1,4) as K1. In the actual analysis, each column has an independent i, meaning each value of j has an independent i. When j=4, i=1, and F(1,4) has been extracted. Therefore, we increment i when j=4. In subsequent extractions, if j equals 4 again, we extract F(2,4); if j is not equal to 4, we extract F(1,j), and so on. Figure 3 This illustrates the extraction of K. t The process involves extracting F(i,j) and then rendering F(i,j) as gray. Each extraction of F(i,j)... h Extracting the value at time S h The first F(i,j) directly below the gray square in the column. Figure 3 This considers the case where F(i,j) is extracted when h=34. In this case, the first column extracts 3 F(i,1), the second column extracts 3 F(i,2), the third column extracts 6 F(i,3), the fourth column extracts 4 F(i,4), the fifth column extracts 3 F(i,5), the sixth column extracts 4 F(i,6), the seventh column extracts 4 F(i,7), and the eighth column extracts 7 F(i,8). Since S... h It is octal, therefore when S h When the value is 0, it is considered as 8. In this case, the corresponding i values ​​from the first to the eighth column are 4, 4, 7, 5, 4, 5, 5, and 8, respectively. S 35 The value is 4, meaning we extract F(i,4) from the fourth column. Since i is 5 at this point, we extract F(5,4) as K. 35 And so on, repeatedly obtaining F(i,S) h And obtain K t until all F(i,j) are labeled with different K. tSo far, if all F(i,j) in a column have been labeled, simply increment h and re-analyze to finally extract K1 to K. 152 Due to the large amount of data, this embodiment only lists the first 34 bits, i.e., K1 to K. 34 The numbers are 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1 and 0.

[0091] Step S3025: Mark the maximum value of h as H, for any K t , obtain S t%H+1 If S t%H+1 If it is even, then K t Perform bit flipping, where S t%H+1 That is, S is h=t%H+1 h ;

[0092] Step S3026: Arrange K in ascending order of t. t Combine the results to obtain secure ciphertext;

[0093] In practical implementation, taking K1 and K2 as examples, where t is 1 and 2 respectively, and the security key has a total of 84 characters, that is, H is 84. Therefore, when t=1, S t%H+1 For S 1%84+1 That is, S2, where % is the modulo operator, and S2 is 0, which is an even number. Therefore, K1 is bit-flipped from 0 to 1. When t=2, S t%H+1 S3 is 3, which is an odd number, so there is no need to flip the bits of K2. Similarly, for all K... t Analysis yields new K1 to K 34 The sequence is 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, and 1. The final combination yields the secure ciphertext 1101001100111101001110101111010111.

[0094] Step S4 involves distributed storage of secure encrypted text based on blockchain storage technology; Step S4 includes the following sub-steps:

[0095] Step S401: Store the secure encrypted text in each storage node of the blockchain storage platform;

[0096] Step S402: When a user wants to access fresh cold chain data, the user is authenticated. After successful authentication, the secure ciphertext is retrieved from the blockchain storage platform and decrypted. The secure ciphertext is then restored to fresh cold chain data and displayed to the user.

[0097] In practice, secure encrypted data is stored in each storage node of the blockchain storage platform. Blockchain storage technology can effectively prevent data from being tampered with. At the same time, existing biometric identification technology is used to verify user identity. Only verified users can access fresh food cold chain data. After retrieving the fresh food cold chain data, users can judge whether the refrigeration of this batch of fresh food is compliant by observing the temperature changes of fresh food in the warehouse and during transportation.

[0098] Example 2, please refer to Figure 4 As shown, Figure 4 A schematic diagram of an electronic device is provided, which may include a processor, a communication interface, a memory, and a communication bus. The processor, communication interface, and memory communicate with each other via the communication bus. The memory stores computer-readable instructions, which the processor can invoke. When the processor executes a computer-readable instruction, it performs steps similar to those in a multi-source data storage method for fresh food cold chain compliance testing, to achieve the following functions: collecting and recording fresh food cold chain data; integrating multi-source fresh food cold chain data into fresh food cold chain time-series data based on time periods; obtaining the name of the fresh food in the cold chain, naming it the target fresh food, and generating a security key for encryption of the fresh food cold chain time-series data based on the target fresh food; encrypting the fresh food cold chain time-series data using the security key, converting the fresh food cold chain time-series data into secure ciphertext; and distributively storing the secure ciphertext using blockchain storage technology.

[0099] Furthermore, when the logical instructions in the aforementioned memory can be implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0100] Example 3: This application also provides a computer program product, which includes a computer program stored on a computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute a multi-source data storage method for fresh food cold chain compliance detection provided by the above methods. The method includes: collecting and recording fresh food cold chain data, and integrating multi-source fresh food cold chain data into fresh food cold chain time-series data based on time periods; obtaining the name of the fresh food in the cold chain, naming it the target fresh food, and generating a security key for encryption of the fresh food cold chain time-series data based on the target fresh food; encrypting and protecting the fresh food cold chain time-series data with the security key, converting the fresh food cold chain time-series data into secure ciphertext; and distributively storing the secure ciphertext based on blockchain storage technology.

[0101] Example 4: This application also provides a computer-readable storage medium storing a computer program. When executed by a processor, the computer program performs the steps of the above-described method for multi-source data storage of fresh food cold chain compliance detection to achieve the following functions: collecting and recording fresh food cold chain data, and integrating multi-source fresh food cold chain data into fresh food cold chain time-series data based on time periods; obtaining the name of the fresh food in the cold chain, naming it the target fresh food, and generating a security key for encryption of the fresh food cold chain time-series data based on the target fresh food; encrypting and protecting the fresh food cold chain time-series data with the security key, converting the fresh food cold chain time-series data into secure ciphertext; and distributively storing the secure ciphertext based on blockchain storage technology.

[0102] Based on the above description of the embodiments, the embodiments of the present invention can be provided as methods, systems, or computer program products. Based on this understanding, the above technical solutions, in essence or in terms of their contribution to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or certain parts of the embodiments.

[0103] In the embodiments provided in this application, it should be understood that the disclosed system or method can be implemented in other ways. The embodiments described above are merely illustrative. For example, the division of modules or units is only a logical functional division, and there may be other division methods in actual implementation. Furthermore, multiple modules or units may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the coupling or direct coupling or communication connection shown or discussed may be through some communication interfaces. The indirect coupling or communication connection between systems, modules, and units may be electrical, mechanical, or other forms.

[0104] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A method for storing multi-source data for compliance testing of fresh food cold chain, characterized in that, Includes the following steps: Collect and record fresh food cold chain data, and integrate multi-source fresh food cold chain data into fresh food cold chain time series data based on time period. Obtain the name of the fresh produce in the cold chain, name it the target fresh produce, and generate a security key for encrypting the cold chain time-series data based on the target fresh produce. Encryption and protection of fresh cold chain time-series data is achieved by using a security key, converting the fresh cold chain time-series data into secure ciphertext; Distributed storage of secure encrypted text based on blockchain storage technology.

2. The multi-source data storage method for compliance testing of fresh food cold chain as described in claim 1, characterized in that, The process of collecting and recording fresh food cold chain data, and integrating multi-source fresh food cold chain data into fresh food cold chain time-series data based on time periods, includes the following sub-steps: The fresh food cold chain data includes outbound data, transportation data, and inbound data. The outbound data includes the outbound warehouse temperature and outbound time period. The transportation data includes the vehicle compartment temperature and vehicle compartment time period. The inbound data includes the inbound warehouse temperature and inbound time period. The outbound warehouse temperature, the vehicle compartment temperature, and the inbound warehouse time period are collectively referred to as temperature data, and the outbound warehouse time period, vehicle compartment time period, or inbound warehouse time period corresponding to the temperature data are named time data. When collecting temperature and time data, if the temperature data changes, a time node is established at the moment the temperature data changes, and it is named the temperature change point. Two adjacent temperature change points are labeled as TI and TM, respectively, where TI is earlier than TM. The range [TI,TM] is the time data, and the temperature data within the time data remains unchanged. Based on time and temperature data, multi-source fresh food cold chain data is integrated into fresh food cold chain time-series data.

3. The multi-source data storage method for compliance testing of fresh food cold chain as described in claim 2, characterized in that, Integrating multi-source fresh food cold chain data into fresh food cold chain time-series data based on time and temperature data includes the following sub-steps: The letters a to z represent 0℃ to -25℃ respectively, and the letters A to Z represent 0℃ to 25℃ respectively. For 0℃, one letter can be randomly selected from a and A. The temperature data is converted into letters and named the temperature code. The time data is calculated in TM-TI and the calculation result is named the time code. Time codes are numbered according to the chronological order of the time data, using the symbol TR. n This indicates that TR will be used simultaneously. n The corresponding temperature code is marked as TE. n Where n is a non-zero natural number and n is the index of TR and TE, TR n and TE n According to TE n In the past, TR n The sequence of numbers is then combined to obtain the fresh food cold chain time sequence code. The fresh food cold chain time sequence codes are then combined in ascending order of n to obtain the fresh food cold chain time sequence data.

4. The multi-source data storage method for compliance testing of fresh food cold chain as described in claim 3, characterized in that, Obtain the name of the fresh produce in the cold chain, name it "target fresh produce," and generate a security key for encrypting the cold chain time-series data based on the target fresh produce. This includes the following sub-steps: Obtain the name of the fresh produce in the cold chain, name it the target fresh produce, and generate an initial key code based on the target fresh produce; The initial key is used to generate a secure key for encrypting the time-series data of the fresh cold chain.

5. The multi-source data storage method for compliance testing of fresh food cold chain as described in claim 4, characterized in that, Obtain the name of the fresh produce in the cold chain, name it "target fresh produce," and generate an initial key encoding based on the target fresh produce, including the following sub-steps: Obtain the name of the fresh produce in the cold chain and name it the target fresh produce; Obtain the hexadecimal encoding of the target fresh produce in UTF-8 encoding and name it the initial key encoding.

6. The multi-source data storage method for compliance testing of fresh food cold chain as described in claim 5, characterized in that, Generating a secure key for encryption of fresh cold chain time-series data using an initial key encoding includes the following sub-steps: The initial key encoding is hashed using a hash algorithm, and the resulting hash value is named the hash key. Convert the hash key from hexadecimal to octal to obtain the security key.

7. A multi-source data storage method for compliance testing of fresh food cold chain as described in claim 6, characterized in that, Encrypting and protecting fresh food cold chain time-series data with a security key, and converting the fresh food cold chain time-series data into secure ciphertext, includes the following sub-steps: Convert fresh food cold chain time-series data into data to be encrypted; The data to be encrypted is encrypted using a security key, and a secure ciphertext is output.

8. A multi-source data storage method for compliance testing of fresh food cold chain as described in claim 7, characterized in that, Converting fresh food cold chain time-series data into data to be encrypted includes the following sub-steps: The fresh food cold chain time-series data is converted into binary format in ASCII encoding and named the initial data encoding; Grouping eight binary digits into a single code group, and numbering these code groups from left to right, using the symbol E. m This indicates that m is a non-zero natural number and m is the index of E; Let M be the maximum value of m, and construct an M×8 matrix named the data matrix. The data matrix has a total of M rows and 8 columns. Let E... m The data is entered from top to bottom in the data matrix in ascending order of m to obtain the data to be encrypted.

9. A multi-source data storage method for compliance testing of fresh food cold chain as described in claim 8, characterized in that, The process of performing encryption calculations on the data to be encrypted using a secure key, and outputting secure ciphertext, includes the following sub-steps: The number in the i-th row and j-th column of the data to be encrypted is labeled as F(i,j), where i and j are both non-zero natural numbers and (i,j) is the index of F; To obtain the security key, number the digits in the security key from left to right, using the symbol S. h This indicates that h is a non-zero natural number and h is the index of S; Starting with i=1 and h=1, set S h Substitute j into F(i,j) to obtain F(i,S) h If F(i,S) h If i has already been acquired, increment i and reacquire F(i,S). h ), execute in a loop, and obtain the F(i,S) h ) Marked as K t , where t is a non-zero natural number and t is the index of K, and t is initially 1; Reset i to 1 and increment h and t by one, then repeatedly obtain F(i,S). h And obtain K t If the maximum value of h is reached, then h is reset to 1 and K is continuously extracted. t until all F(i,j) are labeled with different K. t until; Let H be the maximum value of h, and for any K t , obtain S t%H+1 If S t%H+1 If it is even, then K t Perform bit flipping, where S t%H+1 That is, S is h=t%H+1 h ; Arrange K in ascending order of t. t Combine them to obtain secure ciphertext.

10. A multi-source data storage method for compliance testing of fresh food cold chain as described in claim 9, characterized in that, Distributed storage of secure encrypted text based on blockchain storage technology includes the following sub-steps: Securely encrypted data is stored on each storage node of the blockchain storage platform; When a user requests access to fresh food cold chain data, the system verifies the user's identity. Once the verification is successful, the system retrieves the secure encrypted data from the blockchain storage platform, decrypts it, restores the secure encrypted data to the fresh food cold chain data, and displays it to the user.

Citation Information

Patent Citations

  • Cold-chain logistics data verification method and device, electronic equipment and storage medium

    CN117993808A