A method for tracing agricultural product trading and circulation information based on cloud computing
By classifying and calculating the similarity of agricultural product trading and circulation information, generating template information, and automatically analyzing process information, the problems of high cloud server resource usage and process redundancy are solved, and efficient compression and ease of use of agricultural product trading and circulation information are achieved.
Patent Information
- Application Number
- CN202211371872.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-03
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2042-11-03
AI Technical Summary
The existing agricultural product traceability system occupies a large amount of resources on cloud servers, resulting in high costs, redundant process information, and difficulty in efficient compression.
By obtaining node information, performing classification processing and similarity calculation, determining specimen information and its related information, generating template information, and automatically performing code analysis during the agricultural product trading and circulation process, process information is simplified.
It achieves efficient compression of agricultural product trading and circulation information, reduces cloud server resource usage, simplifies process management, and improves system usability.
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of agricultural product transaction and circulation tracing, and specifically is a method for tracing agricultural product transaction and circulation information based on cloud computing. Background Art
[0002] Patent publication number CN106127492A discloses an agricultural product traceability system that solves the problems of cumbersome and inaccurate agricultural product traceability procedures in the prior art. The key points of its technical solution are as follows: it includes electronic tags: affixed to the surface of individual agricultural products; a scanner gun for reading the information on the electronic tags; an electronic scale for weighing agricultural products and outputting a weight detection signal; a system control module for receiving the weight detection signal and information data from the scanner gun; an information magnetic card and a card reader; a GPRS module coupled to the system control module and outputting a wireless signal; and a cloud server for receiving the wireless signal. In the agricultural product traceability system of the present invention, after the agricultural products are produced, they are numbered by electronic tags, and the transaction information of the agricultural products is input into the cloud server when the agricultural products are weighed; the information magnetic card is used for settlement during the transaction, that is, the above information is automatically sent to the cloud server after the card is swiped. The cloud server has an access interface for access, which facilitates traceability.
[0003] Currently, the traceability of agricultural products is achieved with the help of cloud servers. In the process of tracing agricultural products, there will be a lot of process information, which requires a large amount of content to implement. However, the specific processes of these agricultural products are generally cultivated in batches and processes, and there are generally many similar processes. For cloud servers, the larger the cloud server, the higher the cost. So how to compress this type of content is a problem. Based on this, a solution is provided. Summary of the Invention
[0004] The present invention aims to solve at least one of the technical problems existing in the prior art; to this end, the present invention proposes a method for tracing agricultural product transaction and circulation information based on cloud computing.
[0005] A method for tracing agricultural product transaction and circulation information based on cloud computing, the method specifically comprising the following steps:
[0006] Step 1: Get all the node information, and then classify all the node information. The specific classification method is as follows:
[0007] S1: Select any node information and mark it as sample information;
[0008] S2: then comparing the remaining node information with the sample information to obtain similarity values between the remaining node information and the sample information;
[0009] S3: Obtain the sequence matching value between the node information and the sample information;
[0010] S4: Calculate similarity using the formula: Similarity = 0.75 * Similarity value + 0.25 * Sequence matching value. Here, 0.75 and 0.25 are preset weights used to highlight the different importance of different factors.
[0011] S5: Mark the node information with a similarity greater than X1 as associated information of the sample information; where X1 is a preset value;
[0012] S6: Afterwards, the specimen information and its associated information are obtained, and the specimen information and the associated information with the most content are marked as the primary information, and the number of specimen information plus associated information is marked as the primary number, where the most content refers to the largest number of characters;
[0013] S7: After obtaining the remaining node information, repeat steps S1-S6 to complete processing of all node information and obtain all local information;
[0014] S8: Get all the base information and their corresponding base numbers;
[0015] S9: Then, the standard digit is divided by the sum of the standard digits, and the obtained value is marked as the standard ratio of the standard information corresponding to the standard digit;
[0016] S10: Mark the corresponding local information whose local proportion exceeds X2 as template information, where X2 is a preset value; and obtain all template information;
[0017] Step 2: Perform naturalization processing on all template information to obtain the header information corresponding to all template information;
[0018] Step 3: During the subsequent agricultural product trading and circulation process, each step of the traceability process will automatically perform a code analysis. The specific method of code analysis is as follows:
[0019] When users are in each step of agricultural product trading, process information will be automatically generated and entered by scanning the code;
[0020] Then, the process information is automatically matched with the template information to obtain the template information with the highest similarity ratio exceeding X3. The template information is marked as the selected template, and the header information corresponding to the selected template is obtained. X3 is the preset value.
[0021] Then, the inconsistencies between the process information and the template information are automatically obtained as position representations of the differences, and the different parts of the process information are marked as replacement information, thereby obtaining replacement information formed by combining the position representation and the replacement information.
[0022] Get the replacement information and header information, and mark them as storage information.
[0023] Furthermore, before proceeding to step 1, the following steps need to be performed:
[0024] Once the target area is acquired, all traceability information of agricultural products in the target area will be collected and stored in the cloud platform;
[0025] The traceability information of past agricultural products is summarized and summarized, and the traceability information specifically includes several node information.
[0026] Furthermore, the node information is used to describe the specific content of each stage of the corresponding agricultural products.
[0027] Furthermore, the similarity value in step S2 is obtained by comparing all text contents between the node information and the specimen information one by one, obtaining the text in the node information that is consistent with the specimen information, and marking it as the number of similar texts. Here, the number of similar texts does not repeatedly count the text content, and the corresponding numerical value with fewer words in the node information and the specimen information is marked as the total number of words, and the value obtained by dividing the number of similar words by the total number of words is marked as the similarity value.
[0028] Furthermore, the specific method of obtaining the sequence matching value in step S3 is:
[0029] Compare the node information with the specimen information, retain all the text contents that are consistent between the two in the original order, obtain the retained node information and retained specimen information, and delete the rest;
[0030] Obtain the reverse sequence number. The reverse sequence number is specifically defined as when the sequence number of any retained text in the retained node information is inconsistent with the sequence number of the corresponding text in the retained specimen information, the reverse sequence number is increased by one to obtain all the reverse sequence numbers;
[0031] Divide the inverse sequence number by the number of characters in the retained node information and the retained specimen information, and then subtract the obtained value from one to obtain the sequence matching value.
[0032] Furthermore, the specific method of naturalization in step 2 is:
[0033] S01: Obtain all template information, remove all similar characters in all template information, and mark the remaining template information as template difference information;
[0034] S02: Then, the minimum number of characters in the model error information is obtained and marked as the basic number;
[0035] S03: randomly selecting characters corresponding to the basic number from each template information, and marking them as header information of the corresponding template information;
[0036] S04: Get all header information.
[0037] Furthermore, after completing step 3, the following processing is required, specifically:
[0038] Step 4: Store the template information in the cloud, and then synchronize the storage information obtained after all the process information processed in step 5 to the cloud. When you need to scan the code to retrieve it, the template information will be automatically found according to the header information in the storage information, and then the template information will be updated and replaced according to the replacement information to obtain the completed initial process information.
[0039] Compared with the prior art, the present invention has the following beneficial effects:
[0040] The present invention obtains all node information, then classifies all node information, and marks any selected node information as sample information; then compares the remaining node information with the sample information to determine the similarity value and sequence matching value, determines the similarity value based on the similarity value and sequence matching value, and then determines the association information of the sample information based on the similarity value;
[0041] According to the specimen information and the associated information, all the local information and its corresponding local numbers are obtained; according to the local numbers, the template information is confirmed from all the local information; and all the template information is normalized to obtain the header information corresponding to all the template information;
[0042] Finally, in the process of agricultural product trading and circulation information, each step of tracing the source will automatically perform code analysis to confirm the simplified storage information, thereby achieving the benefit of compressed content size; the present invention is simple, effective, and easy to use. DETAILED DESCRIPTION
[0043] The technical solutions of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0044] This application provides a method for tracing agricultural product trading and circulation information based on cloud computing;
[0045] As a first embodiment of the present invention, the method specifically includes the following steps, specifically:
[0046] Step 1: Obtain the target area, collect traceability information of all agricultural products in the target area, and store it in the cloud platform;
[0047] Step 2: Summarize the traceability information of past agricultural products. The traceability information specifically includes several node information, which is used to describe the various stages of the corresponding agricultural products, from seeds, production areas, cultivation processes, fertilization conditions and other related content;
[0048] Step 3: Get all the node information, and then classify all the node information. The specific classification method is as follows:
[0049] S1: Select any node information and mark it as sample information;
[0050] S2: then comparing the remaining node information with the sample information to obtain similarity values between the remaining node information and the sample information;
[0051] The similarity value is obtained by comparing all text contents between the node information and the specimen information one by one, obtaining the text in the node information that is consistent with the specimen information, and marking it as the number of similar texts. The number of similar texts here does not repeatedly count the text content. For example, if there is a word in the node information that is the same as any word in the specimen information, the same word is removed, and after removal, the same step is repeated for the remaining words to obtain the number of similar words. The corresponding value of the node information and the specimen information with fewer words is marked as the total number of words, and the value obtained by dividing the number of similar words by the total number of words is marked as the similarity value;
[0052] S3: Then obtain the sequence matching value between the node information and the sample information. The specific acquisition method is:
[0053] Compare the node information with the specimen information, retain all the text contents that are consistent between the two in the original order, obtain the retained node information and retained specimen information, and delete the rest;
[0054] Obtain the reverse sequence number. The reverse sequence number is specifically defined as when the sequence number of any retained text in the retained node information is inconsistent with the sequence number of the corresponding text in the retained specimen information, the reverse sequence number is increased by one to obtain all the reverse sequence numbers;
[0055] Divide the reverse sequence number by the value with fewer characters in the retained node information and the retained specimen information, and then subtract the obtained value from one to obtain the sequence matching value;
[0056] S4: Calculate similarity using the formula: Similarity = 0.75 * Similarity value + 0.25 * Sequence matching value. Here, 0.75 and 0.25 are preset weights used to highlight the different importance of different factors.
[0057] S5: Mark the node information with a similarity greater than X1 as the associated information of the sample information; here X1 is a preset value, generally 0.9;
[0058] S6: Afterwards, the specimen information and its associated information are obtained, and the specimen information and the associated information with the most content are marked as the primary information, and the number of specimen information plus associated information is marked as the primary number, where the most content refers to the largest number of characters;
[0059] S7: After obtaining the remaining node information, repeat steps S1-S6 to complete processing of all node information and obtain all local information;
[0060] S8: Get all the base information and their corresponding base numbers;
[0061] S9: Then, the standard digit is divided by the sum of the standard digits, and the obtained value is marked as the standard ratio of the standard information corresponding to the standard digit;
[0062] S10: Mark the corresponding local information whose local proportion exceeds X2 as template information, where X2 is a preset value; and obtain all template information;
[0063] Step 4: Perform naturalization processing on all template information. The specific method of naturalization processing is as follows:
[0064] S01: Obtain all template information, remove all similar characters in all template information, and mark the remaining template information as template difference information;
[0065] S02: Then, the minimum number of characters in the model error information is obtained and marked as the basic number;
[0066] S03: randomly selecting characters corresponding to the basic number from each template information, and marking them as header information of the corresponding template information;
[0067] S04: Get all header information;
[0068] Step 5: During the subsequent agricultural product trading and circulation information process, code analysis will be automatically performed at each step of traceability. The specific method of code analysis is as follows:
[0069] When users are in each step of agricultural product trading, process information will be automatically generated and entered by scanning the code;
[0070] Then, the process information is automatically matched with the template information to obtain the template information with the highest similarity ratio exceeding X3. This template information is marked as the selected template, and the header information corresponding to the selected template is obtained. X3 is a preset value, generally 0.9.
[0071] Then, the inconsistencies between the process information and the template information are automatically obtained as position representations of the differences, and the different parts of the process information are marked as replacement information, thereby obtaining replacement information formed by combining the position representation and the replacement information.
[0072] Get the replacement information and header information, and mark them as storage information;
[0073] Step 6: Store the template information in the cloud, and then synchronize the storage information obtained after all the process information processed in step 5 to the cloud. When you need to scan the code to retrieve it, the template information will be automatically found according to the header information in the storage information, and then the template information will be updated and replaced according to the replacement information to obtain the completed initial process information.
[0074] As the second embodiment of the present invention, it is different from the first embodiment in that the specific method of naturalization processing of all template information in step 4 is different. The specific method of naturalization processing provided in this embodiment is:
[0075] S01: Obtain all template information, remove all similar characters in all template information, and mark the remaining template information as template difference information;
[0076] S02: Then, the last character in the model error information is obtained and marked as header information;
[0077] S03: Get all header information;
[0078] As the third embodiment of the present invention, it is different from the first embodiment in that the specific method of naturalization processing of all template information in step 4 is different. The specific method of naturalization processing provided in this embodiment is:
[0079] S01: Obtain all template information, arrange them in order, obtain a serial number, and then mark the serial number as the corresponding header information;
[0080] There are many similar methods.
[0081] Some of the data in the above formula are calculated by removing the dimensions and taking their numerical values. The formula is a formula that is closest to the actual situation obtained by software simulation of a large amount of collected data; the preset parameters and preset thresholds in the formula are set by technical personnel in this field according to actual conditions or obtained through simulation of a large amount of data.
[0082] The above embodiments are only used to illustrate the technical method of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical method of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical method of the present invention.
Claims
1. A method for tracing agricultural product transaction and circulation information based on cloud computing, characterized in that: The method specifically comprises the following steps: Step 1: Get all the node information, and then classify all the node information. The specific classification method is as follows: S1: Select any node information and mark it as sample information; S2: Then compare the remaining node information with the sample information to obtain similar values between the remaining node information and the sample information. The acquisition method is: Compare all text contents between the node information and the specimen information one by one, obtain the text in the node information that is consistent with the specimen information, and mark it as the number of similar texts. Here, the number of similar texts does not repeat the text content. The corresponding value of the node information and the specimen information with fewer words is marked as the total number of words. The value obtained by dividing the number of similar words by the total number of words is marked as the similarity value; S3: Then obtain the sequence matching value between the node information and the sample information. The acquisition method is: Compare the node information with the specimen information, retain all the text contents that are consistent between the two in the original order, obtain the retained node information and retained specimen information, and delete the rest; Obtain the reverse sequence number. The reverse sequence number is specifically defined as when the sequence number of any retained text in the retained node information is inconsistent with the sequence number of the corresponding text in the retained specimen information, the reverse sequence number is increased by one to obtain all the reverse sequence numbers; Divide the reverse sequence number by the value with fewer characters in the retained node information and the retained specimen information, and then subtract the obtained value from one to obtain the sequence matching value; S4: Calculate similarity using the formula: Similarity = 0.75 * Similarity value + 0.25 * Sequence matching value. Here, 0.75 and 0.25 are preset weights used to highlight the different importance of different factors. S5: Mark the node information with a similarity greater than X1 as associated information of the sample information; where X1 is a preset value; S6: Afterwards, the specimen information and its associated information are obtained, and the specimen information and the associated information with the most content are marked as the primary information, and the number of specimen information plus associated information is marked as the primary number, where the most content refers to the largest number of characters; S7: After obtaining the remaining node information, repeat steps S1-S6 to complete processing of all node information and obtain all local information; S8: Get all the base information and their corresponding base numbers; S9: Then, the standard digit is divided by the sum of the standard digits, and the obtained value is marked as the standard ratio of the standard information corresponding to the standard digit; S10: Mark the corresponding local information whose local proportion exceeds X2 as template information, where X2 is a preset value; and obtain all template information; Step 2: Perform naturalization processing on all template information to obtain the header information corresponding to all template information; Step 3: During the subsequent agricultural product trading and circulation process, each step of the traceability process will automatically perform a code analysis. The specific method of code analysis is as follows: When users are in each step of agricultural product trading, process information will be automatically generated and entered by scanning the code; Then, the process information is automatically matched with the template information to obtain the template information with the highest similarity ratio exceeding X3. The template information is marked as the selected template, and the header information corresponding to the selected template is obtained. X3 is the preset value. Then, the inconsistencies between the process information and the template information are automatically obtained as position representations of the differences, and the different parts of the process information are marked as replacement information, thereby obtaining replacement information formed by combining the position representation and the replacement information. Get the replacement information and header information, and mark them as storage information.
2. The method for tracing agricultural product transaction and circulation information based on cloud computing according to claim 1, characterized in that: Before proceeding to step 1, you need to perform the following steps: Once the target area is acquired, all traceability information of agricultural products in the target area will be collected and stored in the cloud platform; The traceability information of past agricultural products is summarized and summarized, and the traceability information specifically includes several node information.
3. The method for tracing agricultural product transaction and circulation information based on cloud computing according to claim 2, characterized in that: Node information is used to describe the specific content of each stage of the corresponding agricultural products.
4. The method for tracing agricultural product transaction and circulation information based on cloud computing according to claim 1, characterized in that: The specific method of naturalization in step 2 is: S01: Obtain all template information, remove all similar characters in all template information, and mark the remaining template information as template difference information; S02: Then, the minimum number of characters in the model error information is obtained and marked as the basic number; S03: randomly selecting characters corresponding to the basic number from each template information, and marking them as header information of the corresponding template information; S04: Get all header information.
5. The method for tracing agricultural product transaction and circulation information based on cloud computing according to claim 1, characterized in that: After completing step 3, the following processing is required, specifically: Step 4: Store the template information in the cloud, and then synchronize the storage information obtained after all the process information processed in step 5 to the cloud. When you need to scan the code to retrieve it, the template information will be automatically found according to the header information in the storage information, and then the template information will be updated and replaced according to the replacement information to obtain the completed initial process information.
Citation Information
Patent Citations
Agricultural product tracing system
CN106127492A
Tracing request processing method, related device, tracing request processing system and storage medium
CN113127307A
Product traceability method and system and application thereof
CN113222623A