Online purchasing method, device and system for fresh vegetables
By acquiring supplier data, implementing multi-threaded procurement, and using blockchain monitoring, the online procurement process for fresh vegetables has been optimized, solving the problems of low efficiency and insufficient transparency in multi-supplier supply and achieving efficient and transparent procurement and delivery of fresh vegetables.
Patent Information
- Application Number
- CN202411519831.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-01-10
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing online procurement methods for fresh produce are inefficient when there are multiple suppliers, cannot effectively utilize multi-threaded processing technology, resulting in long order response times and low supply chain transparency and user trust.
By acquiring product data from a supplier pool, purchasing orders are sent to multiple target suppliers using multi-threading, and blockchain nodes are deployed at each stage of the supply chain to monitor inventory and the environment in real time. QR codes are generated to trace the purchasing process, thereby optimizing supply chain management and inventory control.
It improved the efficiency of fresh vegetable procurement, enhanced user trust and supply chain transparency, ensured the freshness and timely delivery of fresh vegetables, and reduced the loss rate and untimely replenishment issues.
Smart Images

Figure CN119294981A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of online purchase of fresh seasonal vegetables, and specifically to a method, device and system for online purchase of fresh seasonal vegetables. Background Art
[0002] With the rapid development of e-commerce and mobile Internet, online procurement of fresh vegetables has become a new retail model, providing users with purchase and delivery services of fresh vegetables, fruits and other fresh products through the Internet platform.
[0003] In related technologies, users can order fresh vegetables online through electronic devices anytime and anywhere. Online platforms can integrate products from multiple suppliers to provide a wider range of choices to meet the needs of different users.
[0004] However, the existing methods for purchasing fresh vegetables have certain shortcomings, especially when dealing with multiple suppliers supplying goods at the same time, the efficiency is not high, and the multi-threaded processing technology cannot be effectively used to improve the order processing speed, resulting in a long order response time. Summary of the invention
[0005] The present application provides a method, device and system for online purchasing of fresh seasonal vegetables, which are used for online purchasing of fresh seasonal vegetables, monitoring the real-time status of the fresh seasonal vegetables, and improving the user's trust in online purchasing of fresh seasonal vegetables.
[0006] In a first aspect, the present application provides a method for online purchasing of fresh seasonal vegetables, which is applied to an online purchasing platform for fresh seasonal vegetables. The method comprises the following steps: Obtain a supplier set and collect product data of all suppliers in the supplier set. The product data includes the variety, quantity, price, freshness, and temperature and humidity data of the environment of fresh vegetables to obtain a product database; In response to receiving a purchase request from a user, a purchase order is generated according to the purchase request and the commodity database, and a target supplier is determined according to the purchase order. The purchase request includes the variety, quantity, price, freshness, delivery address and delivery time of the required fresh vegetables; Corresponding purchase orders are sent to multiple target suppliers in the supplier set through multi-threading to carry out procurement.
[0007] Optionally, determine the target supplier based on the purchase order, including: Obtain a list of suppliers that meet the purchase order requirements; Calculate the delivery distance from all suppliers in the supplier list to the user's delivery address; Rating the suppliers in the supplier list according to the delivery distance to obtain the rating results, which are A, B, and C. The delivery distances of A, B, and C increase gradually; Divide the suppliers in the supplier list into regions according to the rating results to obtain corresponding supplier regions, which are region A, region B, and region C; Identify target suppliers based on supplier region.
[0008] Optionally, target suppliers are determined based on supplier regions, including: Select supplier region according to user needs; A supplier network is constructed according to the supplier region, in which suppliers are set as endpoints and delivery paths are set as edges; in the supplier network, a first target supplier selection scheme is determined according to the freshness of the product, and the first target supplier is any supplier in the first target supplier selection scheme, and the first target supplier can provide all the goods in the purchase order; the purchase order is split to obtain multiple sub-purchase data; Determine a second target supplier selection scheme for multiple sub-purchase data according to product freshness, the second target supplier combination is any supplier combination in the second target supplier selection scheme, the second target supplier is any supplier in the second target supplier combination, and the second target supplier can provide the goods corresponding to the sub-purchase data; A first delivery time efficiency is determined according to a first target supplier, a second delivery time efficiency is determined according to multiple second target suppliers, and the first delivery time efficiency is compared with the second delivery time efficiency to determine a target supplier from the first target supplier selection plan or the second target supplier selection plan according to user needs.
[0009] Optionally, before obtaining the supplier set and collecting the product data of all suppliers in the supplier set, the method further includes: Collect supplier IoT sensor data, including temperature data and humidity data; Upload sensor data to the cloud server; Compare and analyze the sensor data with the preset preservation parameters to obtain the analysis results; Generate an environmental adjustment plan based on the analysis results, which includes temperature adjustment and humidity adjustment; Adjust temperature and humidity according to the environmental conditioning plan.
[0010] Optionally, in response to the user's purchase request, generating a purchase order according to the purchase request and the commodity database, and determining the target supplier according to the purchase order, the method further includes: Deploy blockchain nodes in the supply chain. The supply chain includes multiple sub-links, including planting, picking, processing and packaging, transportation, warehousing, distribution, and user receipt. Multiple sub-links are arranged in order of execution; Record the operation information of each sub-link to obtain the corresponding block of the sub-link; The corresponding block is linked with the corresponding block of the sub-link arranged in the previous order according to the execution order to form a traceability chain; a unique blockchain identification code is generated for each batch of fresh vegetables according to the traceability chain, and a QR code is generated according to the blockchain identification code.
[0011] Optionally, after sending corresponding purchase orders to multiple target suppliers in the supplier set through multiple threads for purchasing, the method further includes: Update inventory data based on purchase orders; Update inventory data based on purchase orders, including: Analyze purchase orders and extract purchase data and supplier information from purchase orders; Carry out pre-occupied inventory operations based on purchasing data and supplier information; Update the inventory data and synchronize the updated inventory data to all data nodes.
[0012] Optionally, set a monitoring threshold for the available inventory quantity, the monitoring threshold including a minimum inventory quantity and a maximum inventory quantity to obtain a preset range; When the available inventory quantity is outside the preset range, an early warning is triggered to generate early warning information, which includes the fresh vegetable variety, available inventory quantity, and monitoring threshold; Generate a replenishment notification based on the warning information. The replenishment notification includes the fresh vegetable varieties that need to be replenished, the available inventory quantity, and the recommended replenishment quantity; Send restocking notifications to suppliers to replenish stocks in time.
[0013] In a second aspect of the present application, a fresh vegetable online purchasing system is provided, comprising: The acquisition module acquires the supplier set and collects the commodity data of all suppliers in the supplier set, the commodity data including the variety, quantity, price, freshness of fresh vegetables and the temperature and humidity data of the environment in which they are located, so as to obtain a commodity database; the response module generates a purchase order according to the purchase request and the commodity database in response to receiving the purchase request from the user, and determines the target supplier according to the purchase order, the purchase request including the variety, quantity, price, freshness and delivery address of the required fresh vegetables; The procurement module sends corresponding purchase orders to multiple target suppliers in the supplier set through multi-threading for procurement.
[0014] In the third aspect of the present application, an electronic device is provided, including a processor, a memory, a user interface and a network interface, the memory is used to store instructions, the user interface and the network interface are both used to communicate with other devices, and the processor is used to execute the instructions stored in the memory so that the electronic device executes any one of the methods described above.
[0015] In a fourth aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores instructions, and when the instructions are executed, any of the methods described above is executed.
[0016] In summary, one or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: 1. A method for online procurement of fresh vegetables is adopted. The target supplier is determined according to the supplier's commodity data and the user's procurement request to ensure the freshness and delivery time of fresh vegetables. After the target supplier is determined, the corresponding purchase order is sent to the target supplier for delivery, and the inventory data is updated according to the purchase order. This method effectively solves the problems of untimely information update and low delivery time of fresh vegetables in the existing online procurement method of fresh vegetables, realizes the comprehensive optimization of the procurement process, and significantly improves the procurement efficiency and user satisfaction of fresh vegetables.
[0017] 2. Divide the area according to the delivery distance from the supplier to the user's delivery address, select the supplier area according to user needs, build a supplier network in each supplier area, and determine the target supplier selection plan according to the freshness of fresh vegetables in the supplier network to determine the target supplier. This effectively solves the problem of a single selection plan that is difficult to meet the diverse needs of different users, increases user selectivity, and optimizes supply chain management.
[0018] 3. Use IoT sensor data to monitor and adjust the environment of fresh vegetables in real time to ensure that fresh vegetables are in the best environment for preservation. This solves the problem of fresh vegetables being low in freshness due to poor storage environment of suppliers, improves product quality, reduces loss rate, and enhances supply chain transparency.
[0019] 4. Blockchain nodes are deployed in every link of the supply chain. Starting from the planting base, through packaging and transportation until it reaches the hands of users, each flow is recorded and a QR code containing all flow information is generated. Users can view all information by scanning the QR code, which solves the problems of low transparency and user trust in the procurement process, and improves the transparency and user trust in the procurement process.
[0020] 5. Real-time monitoring of available inventory quantity is carried out. When the available inventory quantity is outside the preset range, an early warning is triggered and the early warning information is sent to suppliers to remind them to replenish stocks in time. This solves the problem of untimely replenishment affecting delivery and improves the procurement efficiency of fresh vegetables. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 This is a flow chart of a method for online purchasing of fresh seasonal vegetables in an embodiment of the present application; Figure 2 This is another flow chart of a method for online purchasing of fresh seasonal vegetables in an embodiment of the present application; Figure 3 This is another flow chart of a method for online purchasing of fresh seasonal vegetables in an embodiment of the present application; Figure 4 This is a structural diagram of an online purchasing system for fresh seasonal vegetables in an embodiment of the present application; Figure 5 It is a schematic diagram of the structure of an electronic device in an embodiment of the present application.
[0022] Explanation of the accompanying drawings: 401, acquisition module; 402, response module; 403, procurement module; 404, determination module; 405, adjustment module; 406, tracing module; 407, update module; 408, monitoring module; 501, processor; 502, communication bus; 503, user interface; 504, network interface; 505, memory. DETAILED DESCRIPTION
[0023] In order to enable technicians in this field to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments.
[0024] In the description of the embodiments of the present application, words such as "for example" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "for example" or "for example" is intended to present related concepts in a specific way.
[0025] In the description of the embodiments of the present application, the meaning of the term "multiple" refers to two or more. For example, multiple systems refer to two or more systems, and multiple screen terminals refer to two or more screen terminals. In addition, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. The terms "include", "comprise", "have" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.
[0026] Figure 1 It is a flow chart of a method for online purchasing of fresh seasonal vegetables in an embodiment of the present application.
[0027] See also Figure 1 In the embodiment of the present application, a method for online purchasing of fresh seasonal vegetables is applied to an online purchasing platform of fresh seasonal vegetables, and the method comprises: S101, obtain a supplier set, collect commodity data of all suppliers in the supplier set, the commodity data includes the variety, quantity, price, freshness of fresh vegetables, and the temperature and humidity data of the environment, so as to obtain a commodity database; obtain all supplier sets in the community, collect commodity data of all suppliers in the supplier set, the commodity data includes the variety, quantity, price, freshness of fresh vegetables, and the temperature and humidity data of the environment. The variety, quantity and price of fresh vegetables are provided by the supplier management personnel, and the temperature and humidity data of the environment are collected by the temperature and humidity sensor. When collecting the freshness of fresh vegetables, image analysis technology is used for analysis, and the camera is used to collect images of fresh vegetables from multiple angles. Preprocessing of the collected images, this step includes image correction and background removal. Image correction ensures that the size and direction of all images are consistent, and adjusts the brightness and contrast to reduce the impact of lighting changes. Background removal uses image segmentation technology to retain only the part of the detected fresh vegetables and remove irrelevant background information.
[0028] The preprocessed images are batch processed to improve processing efficiency, and the batch size is determined according to the required processing speed. Run the trained deep learning model, which is specifically used to evaluate the freshness of fresh vegetables, to obtain the original results. For example, for a specific fresh vegetable sample, the model may output the following results: [2.5, 1.8, -0.3, -1.5]. These four values correspond to the original results of the four categories of "very fresh", "fresh", "acceptable" and "not fresh". These raw results are usually called logits or unnormalized log probabilities. The raw results are converted into probability distributions, usually using the softmax function. The mathematical expression is: Where (x_i) is the original result of the ith category, exp(x_i) represents the exponential value of the original result of the ith category, (x_j) represents the original result of all categories, exp(x_j) represents the exponential value of the original results of all categories, Σ(exp(x_j)) represents the sum of the exponential values of the original results of the category, and the probability distribution obtained in the example of the softmax function is: "very fresh" ≈ 0.6346 (63.46%); "fresh" ≈ 0.3151 (31.51%); "acceptable" ≈ 0.0386 (3.86%); "not fresh" ≈ 0.0116 (1.16%). Select the category with the highest probability as the rating result to obtain the freshness of fresh vegetables. Set the image acquisition frequency, such as collecting images every 8 hours, analyze the freshness of fresh vegetables, update the freshness data, and upload the updated freshness data to the product database.
[0029] In this way, we can obtain the variety, quantity, price, freshness and temperature and humidity data of the environment of fresh vegetables of all suppliers in the supplier set.
[0030] S102, in response to receiving a purchase request from a user, generating a purchase order according to the purchase request and the commodity database, and determining a target supplier according to the purchase order, wherein the purchase request includes the variety, quantity, price, freshness, delivery address, and delivery time of the required fresh vegetables; The user's purchase request includes: the variety, quantity, price, freshness, delivery address and delivery time of fresh vegetables. The product database is queried to obtain all suppliers that can meet the user's purchase request, a purchase order is generated, and the target supplier is determined based on the purchase order.
[0031] The detailed steps of determining the target supplier are described in detail in steps S202 to S211 and will not be elaborated here.
[0032] S103. Send corresponding purchase orders to multiple target suppliers in the supplier set through multiple threads to carry out procurement.
[0033] Create a mapping relationship between each order and supplier. This mapping may be a one-to-one relationship (one order corresponds to one supplier) or a one-to-many relationship (one order corresponds to multiple suppliers). For example, order A may only correspond to supplier 1, while order B may correspond to both supplier 2 and supplier 3. Configure the thread pool based on the system's processing power, expected concurrency, and available system resources. Create a sending task for each order-supplier pair. If an order corresponds to multiple suppliers, the system will create multiple tasks for this order. After creation, the system submits these tasks to the configured thread pool for execution. The thread pool will execute the submitted tasks concurrently and send order information to different suppliers at the same time. Each thread handles its own tasks independently, including preparing order data, establishing connections with suppliers, and sending order information. Use a thread-safe collection (such as ConcurrentHashMap in Java) to collect the execution results of each task. These results may include information such as successfully sent orders and corresponding suppliers, failed orders and reasons for failure, and orders that need to be retried. When all tasks are completed, the system begins to process the collected execution results, including recording successfully sent orders, analyzing the reasons for failure, and resending orders that need to be retried.
[0034] Optional, in Figure 1 The following steps may be performed before step S101 of the illustrated embodiment: Collect supplier IoT sensor data, including temperature data and humidity data; Upload sensor data to the cloud server; Compare and analyze the sensor data with the preset preservation parameters to obtain the analysis results; Generate an environmental adjustment plan based on the analysis results, which includes temperature adjustment and humidity adjustment; Adjust temperature and humidity according to the environmental conditioning plan.
[0035] Among them, when collecting data from the supplier's IoT sensor, each sensor needs to be initially configured. First, a unique sensor ID is set. The unique sensor ID allows the system to identify each independent sensor device. Through the unique ID, the system can accurately know the source of each piece of data. At the same time, the sensor is calibrated to ensure accuracy, the data collection frequency is set, such as collecting data every 5 minutes or every 10 minutes, and the network connection parameters are configured, such as Wi-Fi settings or cellular network settings, so that the sensor data can be uploaded to the cloud server in a timely manner. After the initial configuration is completed, the sensor will automatically collect environmental data according to the preset data collection frequency. Each collection will record the current temperature and humidity values, and generate a timestamp to mark the collection time of the data. These raw environmental data are usually stored in the sensor's own format. The collected raw environmental data is formatted and converted into a standard format that is easy to transmit and process, such as CSV (Comma-Separated Values) or XML (eXtensible Markup Language) formats. The formatted data structure includes the following fields: timestamp (accurate to seconds), sensor unique ID, sensor type (temperature or humidity), measurement value, measurement unit (such as degrees Celsius, relative humidity percentage), which is the sensor data.
[0036] After obtaining the sensor data, the sensor data is compressed, and multiple data points are packaged into batches and uploaded to the cloud server to improve transmission efficiency. In the case of limited bandwidth or the need to save energy, compressed data can significantly reduce the amount of transmission. Common compression methods include gzip or LZ4. The cloud server performs data cleaning and outlier removal on the sensor data. Data cleaning mainly includes processing missing values, duplicate data, and inconsistent formats. Statistical methods such as IQR method or Z-score method are used to identify outliers. Data is filtered according to a predefined reasonable range. The identified outliers are processed, which may be deleted, replaced, or marked. The predefined reasonable range includes the reasonable temperature range and reasonable humidity range of each fresh vegetable. The optimal preservation parameters of different types of fresh vegetables are read from the database: the ideal temperature range of each fresh food, and the ideal humidity range of each fresh food. The sensor data is compared and analyzed in detail with the preset preservation parameters: the deviation between the current temperature and the ideal temperature is calculated, the deviation between the current humidity and the ideal humidity is calculated, and the duration of the deviation is determined, that is, the duration of continuous deviation beyond the ideal range. When calculating the deviation, if the current value is within the ideal range, the deviation is 0. If the current value is lower than the lower limit of the ideal range, the deviation is the difference between the current value and the lower limit; if the current value is higher than the upper limit of the ideal range, the deviation is the difference between the current value and the upper limit. The deviation between the current temperature and the ideal temperature, the deviation between the current humidity and the ideal humidity, and the duration of the deviation are the analysis results. Generate an environmental adjustment plan based on the analysis results, summarize the current environmental status in the environmental adjustment plan, including key indicators such as real-time temperature and humidity, list the deviations of various parameters from the ideal value, including the size and duration of the deviation, and the temperature and humidity adjustment plan, and automatically adjust the temperature and humidity according to the adjustment plan to ensure that fresh vegetables are in the best preservation environment.
[0037] Optional, in Figure 1 After step S102 of the illustrated embodiment, the following steps may be performed: Deploy blockchain nodes in the supply chain. The supply chain includes multiple sub-links, including planting, picking, processing and packaging, transportation, warehousing, distribution, and user receipt. Multiple sub-links are arranged in order of execution; Record the operation information of each sub-link to obtain the corresponding block of the sub-link; The corresponding block is linked with the corresponding block of the sub-link arranged in the previous order according to the execution order to form a traceability chain; a unique blockchain identification code is generated for each batch of fresh vegetables according to the traceability chain, and a QR code is generated according to the blockchain identification code.
[0038] Among them, blockchain nodes are deployed in each major link of the supply chain. These links include, in order of execution: planting, picking, processing and packaging, transportation, warehousing, distribution, and user receipt. Each link will have a dedicated blockchain node to record the relevant information of that link. In each sub-link, the system records the key operation information of that link. For example: planting link: record the planting location, fertilizers and pesticides used, etc.; picking link: record the picking time, picking personnel, weather conditions, etc.; processing and packaging link: record processing methods, packaging materials, preservation treatment, etc.; transportation link: record transportation vehicle information, route, temperature and humidity control, etc.; warehousing link: record storage location, storage conditions, storage and outbound time, etc.; distribution link: record distribution personnel, distribution route, distribution time, etc.; user receipt link: record receipt time, consignee information, etc. This information is integrated into a data block, that is, the corresponding block of the sub-link. The blocks generated by each sub-link will be arranged in the order of execution and linked to the blocks of the previous sub-link. For example, the block of the picking stage will be linked to the block of the planting stage, the block of the processing and packaging stage will be linked to the block of the picking stage, and so on, to ensure the integrity and immutability of the entire supply chain information. Through this continuous block linking, a complete traceability chain is eventually formed, and for each batch of fresh vegetables, the system will generate a unique blockchain identification code based on its complete traceability chain information. This identification code is the unique identifier of the batch of products on the blockchain, and contains a summary of all key information of the product from source to terminal.
[0039] Based on the generated blockchain identification code, the system generates a corresponding QR code. This QR code can be printed on the product packaging or attached to the product label. Users or any participant in the supply chain can quickly access the complete traceability information of the batch of products by scanning this QR code. When the QR code is scanned, the user will be directed to a dedicated page where they can view detailed information about the batch of products. As the product circulates in the supply chain, new information at each link will be added to the corresponding block and updated to the blockchain in real time, making the entire supply chain process of fresh vegetables transparent and traceable.
[0040] Figure 2 This is another flow chart of a method for online purchasing of fresh seasonal vegetables in an embodiment of the present application.
[0041] See also Figure 2 In the embodiment of the present application, a method for online purchasing of fresh seasonal vegetables is applied to an online purchasing platform of fresh seasonal vegetables, and the method comprises: S201, collect commodity data; The details of step S201 may refer to step S101, which will not be described again here.
[0042] S202, obtaining a list of suppliers that meet the purchase order requirements; Suppliers that meet the purchase order requirements are screened out based on the purchase order requirements and the supplier's product data, and it is determined whether the supplier can provide all the types of goods required in the purchase order and whether the order quantity requirements can be met. Suppliers that can provide all the types of goods required in the purchase order and can meet the order quantity requirements are listed in the supplier list, which includes the supplier's geographic location information.
[0043] S203, calculating the delivery distances from all suppliers in the supplier list to the user's delivery address; Get the geographic location information of the user's delivery address and all suppliers in the supplier list, geocode the user's delivery address and all supplier addresses, use the Google Maps Geocoding API to convert the address into longitude and latitude coordinates, traverse the supplier list, and calculate the delivery distance through the map service API.
[0044] S204, rating the suppliers in the supplier list according to the delivery distance to obtain rating results, the rating results are A, B, and C, wherein the delivery distances of A, B, and C increase gradually; Suppliers are rated based on the delivery distance, and the rating results are defined according to the distribution of suppliers in the community. For example, in a community, when the delivery distance is 0-5 kilometers, the rating result is A, when it is 5-10 kilometers, the rating result is B, and when it is greater than 10 kilometers, the rating result is C.
[0045] S205. Divide the suppliers in the supplier list into regions according to the rating results to obtain corresponding supplier regions, where the supplier regions are region A, region B, and region C; The supplier areas are divided according to the rating results to obtain the corresponding supplier areas, where the area where the A-level suppliers are located is Area A, and similarly Area B and Area C are obtained. Grouping suppliers into different areas makes management more systematic.
[0046] S206. Select a supplier region according to user needs; If the user chooses to prioritize delivery time, select suppliers in Area A. If the user chooses to prioritize freshness, compare the freshness of all fresh vegetables in Area A, Area B, and Area C orders, calculate the weighted average of the original results of each variety of fresh vegetables based on the purchase weight, and select the area with the highest weighted average. Weighted average calculation formula: in, is the weighted average of freshness, x i is the value of the “very fresh” category in the original freshness result of product i, m i is the purchase weight of commodity i (kg), It is the sum of the product of the "very fresh" category values of all products in the order and the purchase weight (kg) of fresh vegetables. The total weight of all items in the purchase order.
[0047] For example: Assume the order list: 4 kg of tomatoes, 2 kg of greens, and 3 kg of cucumbers; Freshness evaluation raw results: Area A: Tomato: [2.5, 1.8, -0.3, -1.5]; Green vegetables: [2.3, 1.9, -0.2, -1.6]; Cucumber: [2.1, 1.7, -0.4, -1.4]; Get the weighted average of the original freshness results of area A:
[0048] Zone B: Tomato: [2.4, 1.7, -0.4, -1.6]; Green vegetables: [2.6, 1.8, -0.3, -1.5]; Cucumber: [2.3, 1.9, -0.2, -1.4]; Get the weighted average of the original freshness results of area B:
[0049] Zone C: Tomato: [2.2, 1.6, -0.5, -1.7]; Green vegetables: [2.1, 1.7, -0.4, -1.6]; Cucumber: [2.0, 1.5, -0.6, -1.8]; Get the weighted average of the original freshness results of area B:
[0050] According to the above calculation results, the area with the highest weighted average is selected: Area B.
[0051] S207, constructing a supplier network according to the supplier regions, wherein suppliers are set as endpoints and delivery paths are set as edges in the supplier network; In the selected supplier area, a supplier network is constructed. In this network, each supplier is an endpoint, and the delivery paths between suppliers are set as edges.
[0052] S208. In the supplier network, a first target supplier selection scheme is determined according to the freshness of the products. The first target supplier is any supplier in the first target supplier selection scheme. The first target supplier can provide all the goods in the purchase order. The freshness data of the purchased goods in the goods database is obtained, and the suppliers are sorted in descending order according to the freshness data to obtain the first target supplier for selection.
[0053] S209, splitting the purchase order to obtain multiple sub-purchase data; The goods in the purchase order are grouped according to the type of fresh vegetables, such as fruits, vegetables, meat, seafood, etc., and a sub-purchase data is created for each group, which contains all the relevant information of the group. Ensure that the sum of all sub-purchase data is equal to the content of the original purchase order. Each sub-purchase data contains the variety, quantity, freshness and delivery address.
[0054] S210, determining a second target supplier selection scheme for the plurality of sub-purchase data according to the freshness of the products, the second target supplier combination being any one of the supplier combinations in the second target supplier selection scheme, the second target supplier being any one of the suppliers in the second target supplier combination, and the second target supplier being able to provide the commodities corresponding to the sub-purchase data; Get the original freshness results of the products in each sub-purchase data, sort the corresponding suppliers of each sub-purchase data according to the freshness, and select the supplier combination with the best freshness to obtain the second target supplier combination. If the purchase data contains multiple categories, calculate the average of the original freshness results.
[0055] S211, determining a first delivery time efficiency according to a first target supplier, determining a second delivery time efficiency according to a plurality of second target suppliers, comparing the first delivery time efficiency with the second delivery time efficiency, and determining a target supplier from the first target supplier selection scheme or the second target supplier selection scheme according to user needs; The first delivery time is determined based on the supplier's location and delivery address, and the best delivery route for the product is selected in the supplier network to obtain the second delivery time. If the user chooses to prioritize delivery time, the first delivery time is compared with the second delivery time, and the plan with a shorter delivery time is selected. If the user chooses to prioritize freshness, the second target supplier selection plan is selected to determine the supplier.
[0056] S212. Send corresponding purchase orders to multiple target suppliers in the supplier set through multi-threading to carry out procurement.
[0057] For details of step S212, please refer to step S103, which will not be described again here.
[0058] Figure 3 This is another flow chart of a method for online purchasing of fresh seasonal vegetables in an embodiment of the present application.
[0059] See also Figure 3In the embodiment of the present application, a method for online purchasing of fresh seasonal vegetables is applied to an online purchasing platform of fresh seasonal vegetables, and the method comprises: S301, collecting inventory data; S302. Determine supplier targets based on the purchase order; S303, sending corresponding purchase orders to multiple target suppliers in the supplier set through multi-threading to carry out procurement; steps S301 to S303 can be specifically referred to steps S101 to S103 and S201 to S212, which will not be repeated here.
[0060] S304, analyzing the purchase order, and extracting the purchase data and supplier information in the purchase order; The system extracts purchase order information, including but not limited to the purchased fresh vegetable varieties, specific quantities, expected arrival dates, and other purchase data. It also collects detailed supplier information, such as the supplier's unique identifier, company name, contact information, etc.
[0061] S305, pre-occupying inventory operations according to procurement data and supplier information; Based on the data extracted from the purchase order, the system performs a pre-emption operation in the inventory management module, marking the corresponding purchase quantity of the purchased fresh vegetable varieties as "sold" in the system. The pre-emption quantity is equal to the purchase quantity, avoiding duplicate orders and providing accurate and timely data support for inventory planning. The system creates a pre-emption operation record in the inventory management module. This record contains: supplier, pre-emption quantity, pre-emption reason (for example: "purchase order #12345"), pre-emption timestamp, and associated purchase order number.
[0062] S306: Update the inventory data and synchronize the updated inventory data to all data nodes; Inventory data includes actual inventory quantity, reserved inventory quantity and available inventory quantity. The actual inventory quantity refers to the quantity of fresh vegetables physically existing in the supplier's warehouse, the reserved inventory quantity refers to the inventory quantity that has been planned for allocation but has not yet been actually used, and the available inventory refers to the inventory quantity that can be immediately used for sales or distribution. When the system performs the reservation operation, the system reads the current reserved inventory quantity, adds the purchase quantity extracted from the purchase order to the current reserved inventory quantity, and obtains the updated reserved inventory quantity. Then read the current actual inventory quantity, and calculate the available inventory quantity based on the updated reserved inventory quantity and actual inventory quantity: available inventory quantity = actual inventory quantity - reserved inventory quantity, and obtain the updated available inventory quantity. The updated inventory data is synchronized to all data nodes by updating the "reserved inventory quantity" and "available inventory quantity" fields in the database.
[0063] S307, setting a monitoring threshold of the available inventory quantity, the monitoring threshold including a minimum inventory quantity and a maximum inventory quantity, to obtain a preset range; Define an inventory item for each fresh vegetable. Each inventory item contains the following information: fresh vegetable name, minimum inventory quantity, maximum inventory quantity, and current available inventory quantity. The minimum and maximum inventory quantities constitute the preset ranges for monitoring inventory status. For each fresh vegetable, specific minimum and maximum inventory quantities need to be set. These thresholds should be based on multiple factors, such as the shelf life of the product, average sales velocity, replenishment cycle, etc.
[0064] S308, when the available inventory quantity is outside the preset range, triggering an early warning to generate early warning information, the early warning information includes the variety of fresh vegetables, the available inventory quantity, and the monitoring threshold; Run the check mechanism regularly, for example, run the check mechanism at 22:00 Beijing time every day, compare the current available inventory quantity of each product with the preset range, and the comparison results are as follows: the current available inventory quantity is lower than the minimum inventory quantity, the current available inventory quantity is higher than the maximum inventory quantity, and the current available inventory quantity is within the preset range. When the available inventory quantity is outside the preset range, an early warning is triggered and the system generates an early warning message. The early warning information includes the variety of fresh vegetables, the available inventory quantity, the monitoring threshold, and the inventory status (lower than the minimum threshold or higher than the maximum threshold).
[0065] S309: Generate a replenishment notification based on the warning information, where the replenishment notification includes the variety of fresh vegetables that need to be replenished, the available inventory quantity, and the recommended replenishment quantity; A replenishment notification is generated based on the early warning information. The replenishment notification includes the types of fresh vegetables that need to be replenished, the available inventory quantity and the recommended replenishment quantity.
[0066] S310. Send a replenishment notification to the supplier to replenish the goods in time.
[0067] Send replenishment notifications to suppliers so that they can replenish the goods in time.
[0068] A method for online purchasing of fresh vegetables in an embodiment of the present application is described above. Now, in combination with the above method for online purchasing of fresh vegetables, a system 400 for online purchasing of fresh vegetables in an embodiment of the present application will be described in detail.
[0069] See also Figure 4 , is a structural diagram of a fresh vegetable online purchasing system provided in an embodiment of the present application, and a fresh vegetable online purchasing system 400 specifically includes: The acquisition module 401 is used to acquire a supplier set and collect commodity data of all suppliers in the supplier set, wherein the commodity data includes the variety, quantity, price, freshness, and temperature and humidity data of the environment of fresh vegetables, so as to obtain a commodity database; The response module 402 is used to respond to the purchase request received from the user, generate a purchase order according to the purchase request and the commodity database, and determine the target supplier according to the purchase order. The purchase request includes the variety, quantity, price, freshness, delivery address and delivery time of the required fresh vegetables; The purchasing module 403 is used to send corresponding purchase orders to multiple target suppliers in the supplier set through multiple threads to carry out the purchase; Optionally, the response module 402 is specifically configured to: Obtain a list of suppliers that meet the purchase order requirements; Calculate the delivery distance from all suppliers in the supplier list to the user's delivery address; Rating the suppliers in the supplier list according to the delivery distance to obtain the rating results, which are A, B, and C. The delivery distances of A, B, and C increase gradually; Divide the suppliers in the supplier list into regions according to the rating results to obtain corresponding supplier regions, which are region A, region B, and region C; Identify target suppliers based on supplier region.
[0070] Optionally, the system further includes a determination module 404, wherein the determination module 404 is specifically configured to: Select supplier region according to user needs; A supplier network is constructed according to the supplier region, in which suppliers are set as endpoints and delivery paths are set as edges; in the supplier network, a first target supplier selection scheme is determined according to the freshness of the product, and the first target supplier is any supplier in the first target supplier selection scheme, and the first target supplier can provide all the goods in the purchase order; the purchase order is split to obtain multiple sub-purchase data; Determine a second target supplier selection scheme for multiple sub-purchase data according to product freshness, the second target supplier combination is any supplier combination in the second target supplier selection scheme, the second target supplier is any supplier in the second target supplier combination, and the second target supplier can provide the goods corresponding to the sub-purchase data; A first delivery time efficiency is determined according to a first target supplier, a second delivery time efficiency is determined according to multiple second target suppliers, and the first delivery time efficiency is compared with the second delivery time efficiency to determine a target supplier from the first target supplier selection plan or the second target supplier selection plan according to user needs.
[0071] Optionally, the system further includes an adjustment module 405, wherein the adjustment module 405 is specifically configured to: Collect supplier IoT sensor data, including temperature data and humidity data; Upload sensor data to the cloud server; Compare and analyze the sensor data with the preset preservation parameters to obtain the analysis results; Generate an environmental adjustment plan based on the analysis results, which includes temperature adjustment and humidity adjustment; Adjust temperature and humidity according to the environmental conditioning plan.
[0072] Optionally, the system further includes a traceability module 406, which is specifically used to: Deploy blockchain nodes in the supply chain. The supply chain includes multiple sub-links, including planting, picking, processing and packaging, transportation, warehousing, distribution, and user receipt. Multiple sub-links are arranged in order of execution; Record the operation information of each sub-link to obtain the corresponding block of the sub-link; The corresponding block is linked with the corresponding block of the sub-link arranged in the previous order according to the execution order to form a traceability chain; a unique blockchain identification code is generated for each batch of fresh vegetables according to the traceability chain, and a QR code is generated according to the blockchain identification code.
[0073] Optionally, the system further includes an updating module 407, wherein the updating module 407 is specifically configured to: Update inventory data based on purchase orders, including: Analyze purchase orders and extract purchase data and supplier information from purchase orders; Carry out pre-occupied inventory operations based on purchasing data and supplier information; Update the inventory data and synchronize the updated inventory data to all data nodes.
[0074] Optionally, the system further includes a monitoring module 408, which is specifically used to: Set the monitoring threshold of available inventory quantity, which includes the minimum inventory quantity and the maximum inventory quantity to obtain the preset range; when the available inventory quantity is outside the preset range, trigger an alarm to generate an alarm information, which includes the fresh vegetable variety, available inventory quantity, and monitoring threshold; Generate a replenishment notification based on the warning information. The replenishment notification includes the fresh vegetable varieties that need to be replenished, the available inventory quantity, and the recommended replenishment quantity; Send restocking notifications to suppliers to replenish stocks in time.
[0075] It should be noted that: when the device provided in the above embodiment realizes its function, only the division of the above functional modules is used as an example. In actual application, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0076] This embodiment also discloses an electronic device, referring to Figure 5 The electronic device may include: at least one processor 501 , at least one communication bus 502 , a user interface 503 , a network interface 504 , and at least one memory 505 .
[0077] The communication bus 502 is used to realize the connection and communication between these components.
[0078] The user interface 503 may include a display screen (Display) and a camera (Camera), and the optional user interface 503 may also include a standard wired interface and a wireless interface.
[0079] The network interface 504 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).
[0080] Among them, the processor 501 may include one or more processing cores. The processor 501 uses various interfaces and lines to connect various parts in the entire server, and executes various functions of the server and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 505, and calling data stored in the memory 505. Optionally, the processor 501 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 501 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 501, and it can be implemented separately through a chip.
[0081] Among them, the memory 505 may include a random access memory (RAM) or a read-only memory (Read-Only Memory). Optionally, the memory 505 includes a non-transitory computer-readable storage medium. The memory 505 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 505 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 505 may also be at least one storage device located away from the aforementioned processor 501. As shown in the figure, the memory 505 as a computer storage medium may include an operating system, a network communication module, a user interface module, and an application program for an online purchase method of fresh vegetables.
[0082] exist Figure 5 In the electronic device shown, the user interface 503 is mainly used to provide an input interface for the user and obtain data input by the user; and the processor 501 can be used to call an application program storing a method for online purchasing of fresh vegetables in the memory 505. When executed by one or more processors 501, the electronic device executes one or more methods in the above embodiments.
[0083] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required for the present application.
[0084] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0085] In the several embodiments provided in this application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some service interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.
[0086] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0087] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0088] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory 505. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a memory 505 and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned memory 505 includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk.
[0089] The above is only an exemplary embodiment of the present disclosure and cannot be used to limit the scope of the present disclosure. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the disclosure of the specification, those skilled in the art will easily think of other embodiments of the present disclosure. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the technical field that are not recorded in the present disclosure. The description and examples are only regarded as exemplary, and the scope and spirit of the present disclosure are defined by the claims.
Claims
1. A method for online purchasing of fresh seasonal vegetables, characterized in that: Applied to an online purchasing platform for fresh seasonal vegetables, the method comprises: Acquire a supplier set, collect commodity data of all suppliers in the supplier set, the commodity data including the variety, quantity, price, freshness, and temperature and humidity data of the environment of fresh vegetables, so as to obtain a commodity database; In response to receiving a purchase request from a user, generating a purchase order according to the purchase request and the commodity database, and determining a target supplier according to the purchase order, wherein the purchase request includes the variety, quantity, price, freshness, delivery address and delivery time of the required fresh vegetables; Corresponding purchase orders are sent to multiple target suppliers in the supplier set through multi-threading to carry out procurement.
2. The method according to claim 1, characterized in that Determining the target supplier according to the purchase order specifically includes: Obtain a list of suppliers that meet the requirements of the purchase order; Calculate the delivery distances from all suppliers in the supplier list to the user's delivery address; Rating the suppliers in the supplier list according to the delivery distance to obtain rating results, wherein the rating results are grade A, grade B, and grade C, wherein the delivery distances of grade A, grade B, and grade C increase step by step; Divide the suppliers in the supplier list into regions according to the rating results to obtain corresponding supplier regions, wherein the supplier regions are region A, region B, and region C; Target suppliers are determined based on the supplier region.
3. The method according to claim 2, characterized in that The determining of the target supplier according to the supplier region specifically includes: Select the supplier area according to user needs; Building a supplier network according to the supplier area, wherein suppliers are set as endpoints and delivery paths are set as edges in the supplier network; In the supplier network, a first target supplier selection scheme is determined according to the freshness of the products, the first target supplier is any supplier in the first target supplier selection scheme, and the first target supplier can provide all the commodities in the purchase order; Splitting the purchase order to obtain multiple sub-purchase data; Determine a second target supplier selection scheme for the plurality of sub-purchase data according to the freshness of the products, the second target supplier combination is any supplier combination in the second target supplier selection scheme, the second target supplier is any supplier in the second target supplier combination, and the second target supplier can provide the goods corresponding to the sub-purchase data; A first delivery time limit is determined according to the first target supplier, and a second delivery time limit is determined according to multiple second target suppliers. The first delivery time limit is compared with the second delivery time limit to determine a target supplier from the first target supplier selection plan or the second target supplier selection plan according to the user demand.
4. The method according to claim 1, characterized in that: Before obtaining the supplier set and collecting the commodity data of all suppliers in the supplier set, the method further includes: Collect supplier IoT sensor data, including temperature data and humidity data; Uploading the sensor data to a cloud server; Comparing and analyzing the sensor data with preset preservation parameters to obtain analysis results; Generate an environmental adjustment plan according to the analysis results, wherein the environmental adjustment plan includes temperature adjustment and humidity adjustment; The temperature and humidity are adjusted according to the environmental adjustment scheme.
5. The method according to claim 1, characterized in that After responding to the user's purchase request, generating a purchase order according to the purchase request and the commodity database, and determining a target supplier according to the purchase order, the method further includes: Deploy blockchain nodes in the supply chain link, the supply chain link includes multiple sub-links, including planting link, picking link, processing and packaging link, transportation link, warehousing link, distribution link, and user receipt link, and the multiple sub-links are arranged in execution order; Recording the operation information of each sub-link to obtain the corresponding block of the sub-link; Linking the corresponding block with the corresponding block of the sub-link arranged in the previous order according to the execution order to form a traceability chain; A unique blockchain identification code is generated for each batch of fresh vegetables based on the traceability chain, and a QR code is generated based on the blockchain identification code.
6. The method according to claim 1, characterized in that After sending corresponding purchase orders to multiple target suppliers in the supplier set through multiple threads for purchasing, the method further includes: Update inventory data according to the purchase order, the inventory data including: actual inventory quantity, reserved inventory quantity and available inventory quantity; The updating of the inventory data according to the purchase order specifically includes: Analyze the purchase order and extract the purchase data and supplier information in the purchase order; Performing pre-occupied inventory operations according to the purchase data and the supplier information; Update the inventory data and synchronize the updated inventory data to all data nodes.
7. The method according to claim 6, characterized in that After updating the inventory data according to the purchase order, the method further includes: Setting a monitoring threshold for the available inventory quantity, wherein the monitoring threshold includes a minimum inventory quantity and a maximum inventory quantity to obtain a preset range; When the available inventory quantity is outside the preset range, an early warning is triggered to generate early warning information, wherein the early warning information includes the variety of fresh vegetables, the available inventory quantity, and the monitoring threshold; Generate a replenishment notice according to the warning information, wherein the replenishment notice includes the variety of fresh vegetables that need to be replenished, the available inventory quantity and the recommended replenishment quantity; Send the replenishment notification to the supplier for timely replenishment.
8. A fresh vegetable online purchasing system, characterized in that: include: An acquisition module acquires a supplier set and collects commodity data of all suppliers in the supplier set, wherein the commodity data includes the variety, quantity, price, freshness, and temperature and humidity data of the environment of fresh vegetables, so as to obtain a commodity database; a response module, in response to receiving a purchase request from a user, generating a purchase order according to the purchase request and the commodity database, and determining a target supplier according to the purchase order, wherein the purchase request includes the variety, quantity, price, freshness and delivery address of the required fresh vegetables; The purchasing module sends corresponding purchase orders to multiple target suppliers in the supplier set through multi-threading to carry out purchasing.
9. A fresh vegetable online purchasing system, characterized in that: include: one or more processors and memory; The memory is coupled to the one or more processors, and the memory is used to store computer program codes, wherein the computer program codes include computer instructions, and the one or more processors call the computer instructions to enable the online fresh vegetable purchasing system to execute the method as described in any one of claims 1-7.
10. A computer-readable storage medium comprising instructions, characterized in that: When the instruction is executed on the online fresh vegetable purchasing system, the online fresh vegetable purchasing system is caused to execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
On-line purchasing method and device for fresh vegetables
CN109064242A
Multi-supplier intelligent filtering and combination matching method based on multi-sku project order
CN115375390A
Order management and control method and system for supply chain collaboration platform
CN115797022A
Fresh product information processing method and device, computer equipment and storage medium
CN116205688A
On-line, on-line, off-line and off-line goods taking system and method for unmanned wine vending machine
CN117132366A