8,000. That's the number of 24-hour pharmacies operating normally in China last year (according to the "2021 China Nighttime Medication Annual Observation Report"). Although this supply has grown significantly over the past year, it is still far from sufficient compared to the huge demand for nighttime medication among residents. Among all retail products, pharmaceuticals are an extremely special category with stricter sales thresholds. People suffering from discomfort and pain have extended expectations beyond just "buying" medication, including anytime access, safety, speed, and privacy protection. But the reality is that, limited by operating costs and staff energy, the number of pharmacies that can truly provide nighttime services is very limited. Some pharmaceutical retail practitioners believe that the high operating costs of 24-hour pharmacies, uncertain demand, and staff safety are the three major "roadblocks." A clever solution is to follow the example of banks using ATMs after hours, introducing automated equipment to extend pharmacy nighttime operations. Currently, multiple pharmaceutical retail companies, including Guoda Pharmacy and Haiwang Xingchen, are working closely with tech companies like Meituan to overcome the challenge of operating costs through breakthroughs in underlying technology. But entering the "deep water" of automated retail presents even tougher technical challenges: although there are various unmanned medicine dispensers and automated pharmacies in the industry, there is no precedent for solutions that meet pharmaceutical retail compliance requirements, ensure packaging safety and privacy protection, and provide fully automated processes for restocking, sorting, and packaging in as small a space as possible. For example, deploying as much automated equipment as possible within a 10-square-meter area in a pharmacy and completing the automatic sorting and restocking of over 2,000 daily medications—this kind of customized innovation based on pharmacy retail scenarios requires close collaboration and investment from multiple engineering R&D departments, including hardware, vision, and algorithms. Yet, pioneers are still striving to make breakthroughs. 01

****Finding the Real Demand for "Smart Medicine Sales"

In the pharmaceutical retail industry, from 11 PM to 2 AM every night is the period of greatest supply-demand imbalance. The number of people buying medicine at night surges, but the number of pharmacies offering nighttime sales is extremely limited. Public data shows that as of the end of September 2021, there were 606,500 enterprises with "Drug Distribution Licenses" nationwide. It is estimated that only about 1.3% of pharmacies provide nighttime services, and even counting quasi-24-hour pharmacies (operating 20 hours), only 4.2% offer nighttime services. The "2021 China Nighttime Medication Annual Observation Report" shows that based on monitoring data from early 2021 to the end of 2021, the number of 24-hour pharmacies in China expanded from 2,000 to nearly 8,000, and the number of quasi-24-hour pharmacies exceeded 17,000. Why are there so few 24-hour convenience pharmacies? A market team once conducted a survey and got a unanimous answer: the biggest problem with 24-hour operation is that it's too hard to recruit night shift staff. The head of a large chain pharmacy in Beijing said that most experienced staff in the industry are aged 35-50, with few young people. Due to health and family care reasons, it's not easy to find staff willing to be woken up at any time to work night shifts. According to company feedback, nighttime labor costs are generally 20-25% higher than daytime, yet many applicants back out when they hear about night shifts, and existing staff turnover due to night shifts remains high, making 24-hour operation difficult to sustain. Some merchants have also tried placing automated medicine vending machines outside their stores, but for patients in urgent need, this solution is somewhat "useless": 1) The size of the vending machine limits how many products it can display, and it's difficult to verify prescriptions, so the medicines available for purchase are even more limited; 2) Consumers have a strong urgency for nighttime medication, and the most common scenario is being able to order via mobile phone and have someone deliver the medicine immediately, rather than searching the streets for a pharmacy. Therefore, there is a need for a complete solution that provides a rich supply of medicines, helps pharmacies solve the problems of high nighttime costs and labor pressure through automated equipment, and is highly digitized, coordinating with online ordering and offline fulfillment for medicine purchases. 02

****Exploring the "Deep Water" of Pharmacy Digitalization

In May of this year, Haiwang Xingchen (Xingda Store) in the Jiuxianqiao area of Beijing, with the help of Meituan's medicine buying team, completed the first 24-hour smart pharmacy in Beijing. After partial renovation of the original store, the smart pharmacy, covering only about 10 square meters, saw busy couriers shuttling outside, taking packaged medicines from the compartments of the self-service medicine pickup cabinet, which were packed by an automated robotic arm. The small enclosed space is quite compact. On a shelf cabinet about 5 meters wide and 3 meters high, shelves of different specifications are neatly arranged. An automated sorting device drives a picking bin, moving flexibly in front of the shelves. After precisely locating the medicine lane that the consumer ordered on their phone, a small robotic arm swings to pick the medicine into the bin, which is then transported by conveyor belt to the automatic packaging device. Soon, the packaged and sealed parcel appears in the self-service pickup cabinet outside the store, waiting for a courier to pick it up for delivery. After introducing the new technology, the workload of the staff has been effectively reduced. Store manager Wen Yu said that in the past, when online orders came in at night, staff had to get up to pick and pack the medicines, but now it can be done automatically by the machine, making night shifts much easier. Consumers simply place an order on their phone, and the automated equipment in the pharmacy responds synchronously, accurately identifying and sorting the items in the order. After verification, it automatically packages them and waits for courier delivery. The entire process takes no more than 3 minutes. Currently, the average sorting efficiency of the 24-hour smart pharmacy is 30 seconds per order, and it can sort more than 150 orders per hour, nearly 50% more efficient than traditional manual labor. This new tech-driven consumer experience has already become routine for staff and couriers. Wen Yu said that since the 24-hour smart pharmacy began operation, residents from the surrounding community have visited out of curiosity, and sometimes even place an order on the spot to experience it. Technology entering people's daily lives not only solves the problem of nighttime operations but also brings higher economic benefits to physical pharmacies. It is understood that a traditional 100-square-meter retail pharmacy can display 1,800 to 2,200 SKUs, while the smart pharmacy occupies only 10 square meters but can store 1,000 to 1,500 SKUs, with a drug inventory of up to 5,000 to 8,000 boxes. Under the same area, it can significantly increase the variety of medicines on sale. Before this, there were already specialized companies developing and manufacturing automated sorting and dispensing equipment, and some hospital pharmacies had started using related equipment to improve dispensing efficiency. However, these large devices, which often occupy hundreds of square meters and cost an average of over one million yuan, are clearly not suitable for ordinary pharmacies where rent accounts for a large proportion of costs. With no precedent to follow, they had to "invent" it themselves. To this end, Meituan's medicine buying R&D team, in collaboration with the company's internal visual intelligence department and external universities, conducted technical research and led the introduction of upstream and downstream enterprises in the industry chain. They developed an automated device that occupies just over 10 square meters, has sufficiently low costs, and integrates modules for high-density storage, automatic sorting, automatic packaging, and self-service handover, tailored to the 24-hour medicine sales needs of pharmacies like Haiwang Xingchen. Facing real-life scenarios, solving real problems with technology. This kind of research is more like an exploration launched by Meituan in the "deep sea" without benchmarks or references. In the goal of Meituan's medicine buying team, they aim to open this solution to as many offline physical pharmacies as possible, support pharmacy merchants with 24-hour operations through technology, and achieve the goal of cooperating with a thousand pharmacies nationwide within a year. Wang Fuzhong, Senior Vice President of Meituan, once said, "We don't produce any medicine, nor do we operate our own physical pharmacies, but we help the industry better embrace the wave of digitalization." 03

****Algorithm Challenges Under 5x Volume Rate

No matter how advanced the technology, it must be repeatedly verified in application. For small pharmacies, the first step is to find a way to achieve large-capacity storage in a small space. Only by storing more types of medicines can this automated device avoid the fate of being "useless." On a shelf only 3 meters high, to accommodate enough variety and quantity of medicines, the storage module must achieve maximum density and volume utilization. Wei Kai, the technical expert responsible for Meituan's smart pharmacy hardware solutions, explained that because sorting and restocking are fully automated by machines, the shelves in the storage unit can be made tall and dense enough. Currently, the "volume rate" of the 3-meter-high shelves can reach 5 times that of ordinary pharmacy shelves. Small but complete. To further solve the sorting problem of multiple categories and specifications of medicines, Meituan's engineers also innovatively adopted a fusion lane. It is understood that most equipment in the industry previously used a single lane, which limited the types of products that could be supported. The smart pharmacy, however, uses a fusion solution combining inclined lanes and track lanes, paired with an XY-axis robotic arm, to automatically sort over 90% of medicines. In pharmaceutical retail, medication safety is even more important. In the smart pharmacy system, after each order is sorted into the picking bin, it must undergo multiple verifications, including visual and high-precision weight checks, to "verify the identity" of the medicine. Considering the special nature of medicines, Meituan's visual intelligence team adopted a "dual" visual verification of quantity recognition and content recognition . Quantity recognition mainly verifies whether the dispensed quantity matches the order quantity, while content recognition confirms whether the medicine category matches the user's order requirements. In practice, visual verification poses significant challenges. For example, the orientation of medicine boxes scattered on the conveyor belt facing the camera is random, the image quality varies due to complex in-store lighting conditions, and the large number of SKUs (thousands) combined with frequent medicine updates all cause difficulties for recognition. Ultimately, the technical experts adopted multiple dynamic and static camera capture solutions, combining technologies such as target detection and tracking, barcode recognition, OCR, and image recognition to extract key information from each medicine box, such as generic name, brand name, manufacturer, specification, approval number, and indications, and compare it with the information in the order and the pharmacy's standard product database, thereby ensuring the accuracy of medicine order fulfillment. To ensure absolute safety, orders identified by visual algorithms must also pass a third check: weight recognition. Each sorted order is weighed with high precision on a tray and compared with the weight recorded in the system. Only after multiple intelligent verifications can the medicine proceed to the packaging stage. 04 Automatic Packaging Breaking Through the "Last Meter" of Fully Automated Fulfillment With the continuous improvement of urban instant delivery infrastructure, ordering medicine on food delivery platforms and having it delivered to your door within half an hour has become the mainstream choice for more and more people. Based on this special instant retail scenario of medicine sales, to avoid issues such as loss, contamination, and privacy leakage during delivery, sealed packaging of medicine orders has become a necessity. For the smart pharmacy to truly create practical value in the pharmacy scenario, automatic packaging becomes a challenge that must be overcome. But it's not easy to make a machine mimic the human hand in completing the entire set of sealing and packaging actions. For example, the bag-taking step is a major difficulty. To ensure the suction cup can successfully pick up a bag every time, a special mechanical device and limiting device are needed to automatically organize the bags after each take, ensuring the bags in the bag compartment remain neat. After testing more than 20 solutions, the R&D team finally solved the bag-taking problem. Additionally, in the logistics industry, ordinary automatic packaging machines typically occupy 2-3 meters in size and are limited to standard products with uniform appearance and specifications. However, a typical medicine order may contain multiple boxes of medicine, each with different specifications. In this context, no one in the industry has yet achieved automatic packaging of such orders. Technical expert Wei Kai said that there is no industry benchmark for automatic packaging devices specifically for medicine purchasing scenarios, and the entire device's actions need to be "condensed" into a small space of less than one square meter, which together increases the difficulty of R&D. "But precisely because it's difficult to implement technology around application scenarios, innovation becomes more valuable," Wei Kai said. At the beginning of 2021, Meituan's smart pharmacy hardware product team invested heavily in tackling this challenge. In less than a year, an industry-first integrated hardware and software solution for automatic packaging was born and applied for as a core hardware invention patent. This device simulates the manual packaging process, completing the entire process of bag taking, bag opening, bag filling, sealing, label application, and handover. It is understood that from the end of 2021 to now, Meituan's "smart pharmacy" with fully automated sales has been implemented in pharmacies across multiple regions nationwide. It is foreseeable that with increasing policy support and continuous advancement of cutting-edge technology, the level of intelligence in pharmaceutical retail will further deepen. Whether it can closely focus on real market demand and whether hard technology can be efficiently implemented into practical applications will become a mandatory question for all industry participants.