Order management method and system, electronic device, and storage medium
Patent Information
- Application Number
- PCT/IB2026/053158
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2025-02-24
- Filing Date
- 2026-03-31
- Publication Date
- 2026-08-27
Smart Images

Figure IB2026053158_27082026_PF_FP_ABST
Abstract
Description
ORDER MANAGEMENT METHOD AND SYSTEM, ELECTRONIC DEVICE, AND STORAGE MEDIUMTECHNICAL FIELD
[0001] This specification relates to the field of Internet technologies, and in particular, to an order management method and system, an electronic device, and a storage medium.BACKGROUND
[0002] Currently, with accelerated digitalization of modern commercial environments and rapid development of retail, catering, and other industries, there are increasingly more service conduction forms of merchants. All service conduction forms are relatively highly dependent on the Internet. This strongly network-dependent architecture also reveals many problems in complex commercial scenarios.
[0003] In commercial environments in many countries and regions, there is a significant gap in network infrastructure and the network infrastructure is uneven, and there is often network instability or even no network coverage in many regions. Therefore, in some cases, the merchants cannot be normally connected to the Internet, or network communication is slow due to a crowded condition during peak hours. This poses a severe challenge to order management solutions that are dependent on real-time communication. In particular, in offline commerce, the merchants need to process diversified payment methods and quickly complete order transactions, while giving consideration to customer experience and operation efficiency. In these environments, network interruption or instability causes problems such as orders failing to be uploaded and payment verification failures, directly affecting normal operation of the merchants and customer satisfaction. Therefore, how to reduce dependence of a service conduction process of the merchants on the Internet and enable normal service conduction even in a case of network abnormality becomes an urgent problem to be resolved currently.
[0004] Content in the background is merely information known to the inventor, and neither means that the information has entered the public domain before the application date of this disclosure, nor means that the information can become the existing technology of this disclosure.SUMMARY
[0005] This specification provides an order management method and system, an electronic device, and a storage medium. A payment method can be dynamically adjusted based on a network connection status, to reduce dependence of a service conduction process of a merchant on the Internet, so that a stable order management service can also be provided to the merchant in a case of a network fluctuation.
[0006] According to a first aspect, this specification provides an order management method, applied to an order management system. The order management system includes a POS device, a local server, and a remote server. The POS device is connected to the local server through a local area network, and the remote server is connected to the local server through a public area network. The method is performed by the local server and includes: determining a current connection status between the local server and the remote server in response to receiving order information of an offline order from the POS device, where the offline order is an order generated by an operator by using the POS device; determining, based on the current connection status, at least one candidate payment method applicable to the offline order from a payment method set supported by the order management system, and sending the at least one candidate payment method to the POS device, so that the POS device initiates a payment procedure of the offline order based on the at least onecandidate payment method; and sending the order information of the offline order to the remote server, so that the remote server stores the order information.
[0007] According to a second aspect, this specification further provides an order management method, applied to an order management system. The order management system includes a POS device, a local server, and a remote server. The local server is connected to the POS device through a local area network, and the remote server is connected to the local server through a public area network. The method is applied to the POS device and includes: generating an offline order based on an order placement operation performed by an operator in an interaction interface of the POS device, and sending order information of the offline order to the local server; receiving at least one candidate payment method applicable to the offline order from the local server, where the at least one candidate payment method is determined based on a current connection status between the local server and the remote server; and initiating a payment procedure of the offline order based on the at least one candidate payment method.
[0008] According to a third aspect, this specification further provides an electronic device, applied to an order management system. The order management system includes a POS device, a local server, and a remote server. The local server is connected to the POS device through a local area network, and the remote server is connected to the local server through a public area network. The electronic device serves as the local server and includes: at least one storage medium that stores at least one instruction set for performing order management; and at least one processor that is communicatively connected to the at least one storage medium. When the electronic device runs, the at least one processor reads the at least one instruction set, and performs the method according to the first aspect based on an indication of the at least one instruction set.
[0009] According to a fourth aspect, this specification further provides an electronic device, applied to an order management system. The order management system includes a POS device, a local server, and a remote server. The local server is connected to the POS device through a local area network, and the remote server is connected to the local server through a public area network. The electronic device serves as the POS device and includes: at least one storage medium that stores at least one instruction set for performing order management; and at least one processor that is communicatively connected to the at least one storage medium. When the electronic device runs, the at least one processor reads the at least one instruction set, and performs the method according to the second aspect based on an indication of the at least one instruction set.
[0010] According to a fifth aspect, this specification further provides a computer-readable nonvolatile storage medium. The computer-readable nonvolatile storage medium stores at least one instruction set, and when the at least one instruction set is executed by at least one processor, the order management method according to the first aspect is implemented or the order management method according to the second aspect is implemented.
[0011] According to a sixth aspect, this specification further provides an order management system, including a POS device, a local server, and a remote server. The local server is connected to the POS device through a local area network, and the remote server is connected to the local server through a public area network. The POS device is configured to: generate an offline order based on an order placement operation performed by an operator in an interaction interface of the POS device, and send the offline order to the local server through the local area network. The local server is configured to: determine a current connection status between the local server and the remote server in response to receiving order information of the offline order from the POS device, determine, based on the current connection status, at least one candidate payment method applicable to the offline order from a payment method set supported by the order management system, send the at least one candidate payment method to the POS device, and send the order information of the offline order to the remote server. The POS device is further configured to initiate a payment procedure of the offline order based on the at least one candidate payment method. The remote server is configured to store the order information.
[0012] It can be learned from the above-mentioned technical solutions that according to the order management method and system, the electronic device, and the storage medium provided inthis specification, dependence of an order management process on the Internet can be reduced, and a more stable order management solution can be provided to a target merchant. The local server can dynamically adjust a payment method based on a network connection status. On one hand, diversified payment requirements of consumers can be met as much as possible. On the other hand, a stable order management service can be provided to the merchant in a case of a network fluctuation, thereby improving use experience of the merchant. In addition, the local server further sends order information of an offline order to the remote server, so that the remote server stores the order information, to avoid loss of order data or a failure of a payment procedure, and improve system stability.
[0013] Other functions of the order management method and system, the electronic device, and the storage medium provided in this specification are partially listed in the following descriptions. Creative aspects of the order management method and system, the electronic device, and the storage medium provided in this specification can be fully explained by practice or by using the methods, apparatuses, and combinations described in the following detailed examples.BRIEF DESCRIPTION OF DRAWINGS
[0014] To describe the technical solutions in the embodiments of this specification more clearly, the following briefly describes the accompanying drawings needed for describing the embodiments. Clearly, the accompanying drawings in the following descriptions show merely some embodiments of this specification, and a person of ordinary skill in the art can still derive other drawings from these accompanying drawings without creative efforts.
[0015] FIG. 1 is a schematic diagram of an application scenario of an order management system according to an embodiment of this specification;
[0016] FIG. 2 is a schematic scenario diagram of an order management system in another application scenario according to an embodiment of this specification;
[0017] FIG. 3 is a diagram of a hardware structure of an electronic device according to an embodiment of this specification;
[0018] FIG. 4 is a flowchart of an order management method according to an embodiment of this specification;
[0019] FIG. 5 is a flowchart of an order management method in an abnormal connection state according to an embodiment of this specification; and
[0020] FIG. 6 is a flowchart of an order management method in a normal connection state according to an embodiment of this specification.DESCRIPTION OF EMBODIMENTS
[0021] Specific application scenarios and requirements of this specification are provided in the following descriptions, so that a person skilled in the art can manufacture and use content of this specification. Various local modifications to the disclosed embodiments are clear to a person skilled in the art. In addition, the general principles defined herein can be applied to other embodiments and applications without departing from the spirit and scope of this specification. Therefore, this specification is not limited to the shown embodiments, but has a widest scope consistent with that of the claims.
[0022] The terms used herein are merely intended to describe specific example embodiments, and impose no limitation. For example, unless otherwise explicitly stated in the context, the singular forms "one", "an", and "the" used herein can include plural forms. When being used in this specification, the terms "include", "comprise", and / or "have" mean existence of an associated integer, step, operation, element, and / or component, but do not preclude existence of one or more other features, integers, steps, operations, elements, components, and / or groups or addition of other features, integers, steps, operations, elements, components, and / or groups to the system / method.
[0023] In consideration of the following descriptions, these and other features of this specification, operations and functions of related components of the structure, and economy of combination and manufacturing of components can be significantly improved. With reference to the accompanying drawings, all of these form a part of this specification. However, it should be clearly understood that the accompanying drawings are merely used for the purpose of illustration and description, and are not intended to limit the scope of this specification. It should be further understood that the accompanying drawings are not drawn to scale.
[0024] The flowchart used in this specification shows operations implemented by a system according to some embodiments of this specification. It should be clearly understood that the operations in the flowchart may not be sequentially implemented. On the contrary, the operations can be implemented in a reverse sequence or simultaneously. In addition, one or more other operations can be added to the flowchart, and one or more operations can be removed from the flowchart.
[0025] It should be noted that user data obtained in this specification is authorized by the user, and does not relate to user privacy.
[0026] It should be noted that collection, storage, use, processing, transmission, provision, disclosure, and the like of related information of a user in the technical solutions in this specification all comply with related laws and regulations, and do not violate public order and good morals.
[0027] The embodiments described in this specification can be applied to an order management scenario of a merchant. The merchant can be merchants that provide various products or services, including but not limited to a catering merchant, a store, a supermarket, a fruit and vegetable store, a flower store, a bookstore, a hotel, a beauty salon, a dry cleaning store, a barbershop, and the like. The merchant can be a small / micro merchant, a large merchant, a chain merchant, or the like. This is not limited in this specification.
[0028] In some embodiments, the merchant can be a merchant that conducts a service through an offline channel (a physical store). In this case, an order of the merchant can include an offline order. In some embodiments, the merchant can alternatively be a merchant that conducts a service through an online channel (the Internet). In this case, an order of the merchant can include an online order. In some embodiments, the merchant can alternatively be a merchant that supports both an online channel and an offline channel for service conduction. In this case, an order of the merchant can include an offline order and an online order.
[0029] In this specification, the online order refers to a product or service purchase request submitted by a consumer through an online channel (for example, a website or an application). The offline order refers to a product or service purchase request submitted by a consumer through an offline channel, for example, a product or service purchase request submitted by the consumer and a cashier in a face-to-face manner.
[0030] When the merchant needs to conduct a service through the offline channel, the merchant needs to purchase a sales device and further needs to purchase a dedicated financial machine from an acquiring institution, to manage the offline order. The financial machine is communicatively connected to the acquiring institution through a dedicated network. The sales device provides an interaction function and can display a product or a service sold by the merchant. Based on a purchase requirement of a consumer, a cashier of the merchant can help the consumer select a product or a service on the sales device and submit an order. The order is an offline order. The sales device sends the offline order to the financial machine. After the consumer performs a payment operation (for example, card swiping or code scanning) on the financial machine, the financial machine generates a payment request for the offline order, and sends the payment request to the acquiring institution, so that the acquiring institution completes a payment procedure of the offline order.
[0031] In this specification, the acquiring institution is an institution that signs a contract with the merchant and is responsible for processing a payment request on a merchant side. In some embodiments, the acquiring institution can be, for example, a financial institution of a card issuingbank. In some embodiments, the acquiring institution can be, for example, a payment service provider of an electronic wallet. In some embodiments, the acquiring institution can alternatively be an aggregation service provider that aggregates a plurality of financial institutions or a plurality of payment service providers.
[0032] In an offline service conduction scenario, with diversified development of payment methods, different consumers may select different payment channels for payment. To meet payment requirements of different consumers, the merchant needs to interconnect with a plurality of acquiring institutions. In this case, the merchant needs to purchase a financial machine from each acquiring institution. During service conduction, based on a payment channel selected by a consumer, the merchant sends an order to a financial machine corresponding to the payment channel, so that the financial machine sends a payment request for the order to an acquiring institution corresponding to the payment channel. Generally, the financial machine provided by the acquiring institution has a relatively high price, and relatively high purchase costs are caused if the merchant separately purchases financial machines from a plurality of acquiring institutions. In addition, a very large quantity of financial machines need to be placed on a working counter of the merchant, resulting in a crowded problem on the counter. In addition, in face of so many financial machines, the merchant may use an incorrect financial machine for checkout, resulting in a checkout failure. This affects checkout efficiency.
[0033] When the merchant conducts a service through the online channel, the merchant can develop a store applet, and set an access entry (for example, a two-dimensional code) of the store applet in a store or at any other possible location. A consumer accesses the store applet through the access entry and submits an order on the store applet.
[0034] When the merchant conducts a service through the online channel, the merchant can further cooperate with different network platforms. The network platforms can include but are not limited to a takeout platform, a wallet platform, a social platform, and the like. The merchant may interconnect with different network platforms in different manners. For example, when cooperating with some platforms (for example, the takeout platform), the merchant can apply to open an online store on these platforms, and place a product or a service of the merchant in the online store, so that a consumer places an order in the online store. For another example, when cooperating with some other platforms (for example, the wallet platform or the social platform), the merchant can place the store applet on these platforms, so that a consumer places an order through the store applet.
[0035] In an online service conduction scenario, to attract more consumers, the merchant usually needs to cooperate with a plurality of network platforms. In this case, a great deal of energy needs to be spent for interconnection between the merchant and the network platforms. In particular, in some geographical areas, each network platform covers a small quantity of consumers, and there are a large quantity of network platforms, for example, there may be hundreds, thousands, or even tens of thousands of online platforms. In such a geographical area, the merchant needs to interconnect with a huge quantity of network platforms, and needs to spend a huge amount of energy.
[0036] The sales device used by the merchant for offline service conduction can process only the offline order, but cannot receive the online order. To implement normal order receiving on the network platform, the merchant needs to purchase a special order receiving device from the network platform. Sometimes, there are a plurality of network platforms active in the market, but no network platform is in a monopolistic position in the market, that is, the plurality of network platforms cover different consumer groups. In this case, if the merchant wants to operate normally, the merchant is forced to cooperate with each of the plurality of network platforms. When cooperating with the plurality of network platforms, the merchant needs to purchase an order receiving device from each of the plurality of network platforms. This leads to relatively high purchase costs. In particular, in a case of a relatively large quantity of interconnected network platforms, the purchase costs of the merchant are huge. In addition, a counter of the merchant is crowded if these order receiving devices are placed on the counter. Furthermore, in face of somany order receiving devices, the merchant is prone to distraction, resulting in problems such as untimely order processing, which affects consumer experience.
[0037] Further, when the merchant cooperates with a plurality of network platforms, there are a relatively large quantity of sources of orders for the merchant. Orders generated on different network platforms are stored on servers of the corresponding network platforms. When managing online orders, the merchant needs to access serving ends of different network platforms to perform order management (for example, order query and order summarization). The merchant cannot perform unified management on all orders. In addition, different network platforms may operate order management in different manners, and the merchant needs to be familiar with operation manners of different network platforms. Due to the above-mentioned factors, an order management workload of the merchant is relatively large, and order management efficiency is relatively low.
[0038] Based on at least one of the technical problems described above, this specification provides an order management system. The order management system can help merchants implement one-stop order management. To facilitate better understanding of the one-stop order management by a reader, the order management system is first described below with reference to FIG. 1.
[0039] FIG. 1 is a schematic diagram of an application scenario 100 of an order management system according to an embodiment of this specification. For ease of understanding, a catering scenario is used as an example in FIG. 1 for description. As shown in FIG. 1, the order management system can include a point of sale (POS) device 110 (or referred to as a POS device or a front-end device) and a service device 120 (or referred to as a serving end, a server, or a back-end device).
[0040] The POS device 110 is a multi-functional terminal. The POS device 110 can be considered as a client of the order management system. In some embodiments, the POS device 110 can be a mobile device, for example, a handheld device. The POS device 110 can be carried by a staff member of a merchant to different locations of a store for operation, providing relatively high convenience. In some embodiments, the POS device 110 can be a non-mobile device. In this case, the POS device 110 is usually placed on a checkout counter of an offline store of a merchant.
[0041] In this specification, the POS device 110 can receive an offline order and an online order of the merchant. The POS device 110 can further perform checkout processing on the offline order. The POS device 110 can also be referred to as a checkout device, a sales device, or an integrated sales and checkout device.
[0042] The POS device 110 is an electronic device with a specific computing capability. In some embodiments, the POS device 110 can include a hardware device with a data processing function and a necessary program needed to drive the hardware device to work. The POS device 110 can manage an order by driving the hardware device to execute the program. For example, order management software (or an order management program) can be installed in the POS device 110. The POS device 110 can manage an order by running the order management software. The order management software can correspond to an operating system installed in the POS device 110, or can correspond to an application (APP) or an instruction set installed in the POS device 110. The order management software can be software preset in the hardware device of the POS device 110 (for example, software included in the POS device 110 when the POS device 110 is delivered from a factory), or can be software subsequently installed in the POS device 110 by the staff member of the merchant. This is not limited in this specification.
[0043] In some embodiments, the POS device 110 can have a display screen, or the POS device 110 can be externally connected to a display screen. The POS device 110 can provide an interaction capability through the display screen. For example, the POS device 110 displays, through the display screen, a product or a service sold by the merchant, and generates an offline order based on a product or a service selected by an operator (the staff member of the merchant or a consumer). The POS device 110 can further display a checkout entry through the display screen, so that the operator performs a checkout operation on the offline order.
[0044] When checking out an order, the POS device 110 supports a plurality of payment methods, including but not limited to cash payment, card swiping payment, code scanning payment, biometric recognition (for example, facial recognition) -based payment, near field communication (NFC)-based payment, and the like.
[0045] In some embodiments, when the POS device 110 supports cash payment, the POS device 110 can be provided with a cash box for storing cash.
[0046] In some embodiments, when the POS device 110 supports card swiping payment, a card reading apparatus 111 can be built in or externally connected to the POS device 110. When the built-in manner is used, the card reading apparatus 111 can be disposed at any possible location of the POS device 110. This is not limited in this specification. When the external connection manner is used, the POS device 110 can be connected to the card reading apparatus 111 in a wired or wireless manner. This is not limited in this specification. The wired connection manner can include but is not limited to a universal serial bus (USB) connection, an Ethernet connection, an optical fiber connection, or the like. The wireless connection manner can include but is not limited to a Wi-Fi connection, a Bluetooth connection, or the like.
[0047] The card reading apparatus 111 is an apparatus that can read card information of a payment card (for example, a debit card or a credit card) of a consumer based on a preset payment specification. When the consumer selects card swiping payment, the POS device 110 can control the card reading apparatus 111 to enter a card reading mode. The card reading apparatus 111 can read the card information of the payment card based on the preset payment specification in response to the consumer placing the payment card close to, attaching the payment card to, or inserting the payment card into the card reading apparatus.
[0048] In some embodiments, when the POS device 110 supports code scanning payment, a code scanning apparatus 112 can be built in or externally connected to the POS device 110. When the built-in manner is used, the code scanning apparatus 112 can be disposed at any possible location of the POS device 110. This is not limited in this specification. When the external connection manner is used, the POS device 110 can be connected to the code scanning apparatus 112 in a wired or wireless manner. This is not limited in this specification. The code scanning apparatus 112 is an apparatus with a code scanning capability. For example, the code scanning apparatus 112 can include a camera module. When the consumer chooses to pay the offline order by using a payment code, the POS device 110 can control the code scanning apparatus 112 to enter a scanning mode. In response to the consumer aligning the payment code with the code scanning apparatus 112, the code scanning apparatus 112 scans code information of the payment code by using the camera module.
[0049] In some embodiments, when the POS device 110 supports biometric recognition-based payment, a camera apparatus (not shown in FIG. 1) can be built in or externally connected to the POS device 110. When the built-in manner is used, the camera apparatus can be disposed at any possible location of the POS device 110. This is not limited in this specification. When the external connection manner is used, the POS device 110 can be connected to the camera apparatus in a wired or wireless manner. This is not limited in this specification. For example, when the consumer chooses to use face scanning payment, the POS device 110 can control the camera apparatus to enter a camera mode. In response to the consumer aligning the face with the camera apparatus, the camera apparatus captures a face image of the consumer.
[0050] In some embodiments, when the POS device 110 supports near field communication-based payment, a near field communication apparatus (not shown in FIG. 1) can be built in or externally connected to the POS device 110. The near field communication apparatus can be disposed at any possible location of the POS device 110. This is not limited in this specification. When the consumer selects near field communication-based payment, the POS device 110 can control the near field communication apparatus to enter a communication mode. In response to the consumer placing a terminal device having a near field communication component close to the near field communication apparatus, the near field communication apparatuscommunicates with the near field communication component in the terminal to obtain order payment information.
[0051] In some embodiments, a printing apparatus 113 can be built in or externally connected to the POS device 110. When the built-in manner is used, the printing apparatus 113 can be disposed at any possible location of the POS device 110. This is not limited in this specification. When the external connection manner is used, the POS device 110 can be connected to the printing apparatus 113 in a wired or wireless manner. This is not limited in this specification. Printing paper or label paper can be disposed in the printing apparatus 113. After the consumer successfully pays the order, the POS device 110 can control the printing apparatus 113 to print a consumer ticket or an order label corresponding to the order.
[0052] In some embodiments, the POS device 110 can further include an audio output apparatus (not shown in FIG. 1). The audio output apparatus can be, for example, a speaker. For example, when receiving an online order, the POS device 110 can output voice information through the audio output apparatus, to remind the staff member of the merchant to process the order in a timely manner. For another example, after the consumer performs a payment operation on the offline order by using the POS device 110, in response to the POS device 110 receiving a payment result of the order, the POS device 110 can output voice information through the audio output apparatus, to indicate that payment of the order succeeds or fails.
[0053] Still with reference to FIG. 1, the service device 120 is a computing system with a specific computing capability. The service device 120 is communicatively connected to the POS device 110, and provides an order management service to the POS device 110. The service device 120 can correspond to a single computing device, or can correspond to a computing cluster including a plurality of computing devices. The service device 120 can be deployed locally, or can be deployed remotely. For example, the service device 120 can be a cloud server. In some embodiments, the service device 120 can include a hardware device with a data processing function and a necessary program needed to drive the hardware device to work. The service device 120 can provide the order management service to the POS device by driving the hardware device to execute the program. In some embodiments, the service device 120 can provide the order management service to the POS device in a software as a service (SaaS) mode.
[0054] In some embodiments, when the service device 120 is deployed remotely, the service device 120 can be connected to POS devices 110 of a plurality of merchants, and provide the order management service to the POS devices 110 of the plurality of merchants. In this case, the service device 120 can perform isolated management on orders of different merchants by using various isolation technologies, to avoid mutual interference between order data of different merchants and improve security of the order data. A person skilled in the art can understand that content of providing the order management service to POS devices 110 of different merchants by the service device 120 is similar. In the description of this specification, only an example in which the service device 120 provides the order management service to a POS device 110 of one merchant is used for description.
[0055] The service provided by the service device 120 to the POS device 110 can include an order management service for an offline order, and can further include an order management service for an online order.
[0056] A catering scenario is used as an example below to describe a working process of the order management system.
[0057] With reference to FIG. 1, a catering store can be divided into a dining area and a kitchen area. The dining area is used to receive consumers and is used by the consumers for dining. The dining area can also be referred to as a reception area. The kitchen area is an area in which chefs prepare dishes. The kitchen area can also be referred to as a preparation area. The POS device 110 is usually located in the dining area. The service device 120 can be located in the dining area or can be located in the cloud.
[0058] A process in which the order management system processes an offline order is as follows: With reference to FIG. 1, a consumer A comes to the store for a meal. The consumer Anotifies a cashier of a desired dish. The cashier selects the corresponding dish on the POS device 110 and places an order. The POS device 110 generates an offline order in response to an order placement operation performed by the cashier. The POS device 110 sends the offline order to the service device 120, so that the service device 120 stores the offline order. In an example in which the consumer A pays through card swiping, after the cashier initiates a checkout operation, the POS device 110 obtains card information of a payment card by using the card reading apparatus 111, and sends the card information to the service device 120. The service device 120 can generate a payment request for the offline order based on the card information, and send the payment request to the acquiring institution, so that the acquiring institution performs a payment procedure of the offline order. After receiving a payment result of the offline order from the acquiring institution, the service device 120 can send the payment result to the POS device 110.
[0059] The order management system can receive online orders from a plurality of online channels. Three cases are used as examples below for description.
[0060] Case 1: With reference to FIG. 1, the service device 120 can be deployed with a store applet. A two-dimensional code of the store applet is set on a dining table (or another location) of the store. A consumer B can scan the two-dimensional code by using a terminal device, to view a page of the store applet. The consumer B selects a desired dish on the applet page, places an order, and completes online payment. In this case, the service device 120 generates an online order, stores the online order, and then sends the online order to the POS device 110. Therefore, the POS device 110 receives the online order.
[0061] Case 2: With reference to FIG. 1, a merchant can place a store applet on a network platform. Placement on a wallet platform is used as an example below for description. When using the wallet platform, a consumer C accesses the store applet on the wallet platform, selects a desired dish on an applet page, places an order, and completes online payment. In this case, the wallet platform generates an online order, and sends the online order to the service device 120. The service device 120 stores the online order, and then sends the online order to the POS device 110. Therefore, the POS device 110 receives the online order.
[0062] Case 3: With reference to FIG. 1, the merchant can open an online store on a network platform. An example in which an online store is opened on a takeout platform is used below for description. When using the takeout platform, a consumer D accesses the online store of the merchant on the takeout platform, selects a desired dish, places an order, and completes online payment. In this case, the takeout platform generates an online order, and sends the online order to the service device 120. The service device 120 stores the online order, and then sends the online order to the POS device 110. Therefore, the POS device 110 receives the online order.
[0063] It can be learned from the above-mentioned descriptions that offline orders received by merchant and online orders from all channels are stored in the service device 120. Therefore, the merchant can implement unified management on all orders on the service device 120. Compared with the method in which the merchant separately manages orders on different channels, the order management system provided in this specification can improve convenience of order management by the merchant and improve order management efficiency.
[0064] The catering scenario is still used as an example. After receiving an order, the merchant needs to process and prepare a dish in the order. In actual application, after the POS device 110 receives an order (including an offline order and an online order), the POS device 110 can control the printing apparatus to print a kitchen ticket that includes dish content in the order, and the kitchen ticket is manually transferred to the kitchen area. A chef prepares a dish based on the dish content in the kitchen ticket. In this manner of manually transferring a kitchen ticket, an error in preparing a dish is prone to occur during peak dining hours, and relatively low efficiency results in an increase in dining duration of consumers.
[0065] Therefore, in some embodiments of this specification, as shown in FIG. 1, the order management system can further include one or more display devices 130. For example, in the catering scenario, the display device 130 can also be referred to as a kitchen display system (KDS). The display device 130 is disposed in the kitchen area, and is communicatively connectedto the POS device 110. The display device 130 can receive an order from the POS device 110, and display a to-be-prepared dish to the chef, to improve meal preparation efficiency of the chef and reduce the probability that the chef makes a meal preparation error. In some embodiments, after preparing a dish, the chef can further send a notification of completion of the dish to the POS device 110 by using the display device 130, so that the POS device 110 understands preparation progress of the order.
[0066] In stores of some merchants, the kitchen area can be divided into a plurality of stalls. Different stalls are equipped with different chefs responsible for preparing different types of dishes. With reference to FIG. 1, an example in which the kitchen area includes a cold dish stall and a hot dish stall is used. A chef XI is responsible for preparing a cold dish and a chef X2 is responsible for preparing a hot dish. In this case, a display device 130 can be disposed in the cold dish stall, and is configured to display a cold dish that needs to be prepared to the chef XI; and a display device 130 can be disposed in the hot dish stall, and is configured to display a hot dish that needs to be prepared to the chef X2. In this way, dish preparation in different stalls does not interfere with each other, which can further improve meal preparation efficiency.
[0067] In the application scenario shown in FIG. 1, the POS device 110 can be connected to the service device 120 and the POS device 110 can be connected to the display device 130 through a network. The network is a medium used to provide a communication connection. The network can facilitate exchange of information or data. The network can be any type of wired or wireless network or a combination thereof. For example, the network can include a cable network, a wired network, an optical fiber network, a telecommunications network, an intranet, the Internet, a local area network (LAN), a wide area network (WAN), a wireless local area network (WLAN), a metropolitan area network (MAN), a public switched telephone network (PSTN), a Bluetooth network, a ZigBee network, a near field communication (NFC) network, or a similar network. In some embodiments, the network can include one or more network access points. For example, the network can include a wired or wireless network access point, for example, a base station or an Internet switching point.
[0068] It should be noted that the catering scenario is used as an example in FIG. 1. It can be understood by a person skilled in the art that when the order management system provided in this specification is applied to another scenario, an implementation solution and technical effects thereof are similar to those of the catering scenario. Details are not described in this specification for the another scenario.
[0069] It can be learned from the above-mentioned descriptions that the merchant can implement one-stop order management by using the order management system provided in this specification. The one- stop order management is embodied in at least the following aspects: (1) The merchant can use one POS device 110 to process an offline order and process online orders from a plurality of online channels. In this way, the merchant does not need to interconnect with each of the plurality of online channels, and energy and time costs needed for interconnection are avoided. In addition, the merchant does not need to purchase an order receiving device from each of the plurality of online channels, and purchase costs of the merchant can be lowered. (2) All orders received by the POS device 110 are sent to the display device 130 in the kitchen area in real time, without a need for the merchant to manually transfer kitchen tickets. This improves order processing efficiency. (3) All orders received by the merchant are stored in the service device 120, and the merchant can implement unified management, for example, order query or summarization, on all the orders on the service device 120. In this way, the merchant does not need to separately perform decentralized order management on different network platforms, thereby improving order management efficiency. (4) By connecting one card reading apparatus 111 to the POS device 110, the merchant can cooperate with a plurality of acquiring institutions, to meet requirements of consumers for using different payment channels to perform card swiping payment. One card reading apparatus 111 can support a plurality of acquiring institutions, and the merchant does not need to separately purchase a financial machine for each acquiring institution,thereby greatly simplifying payment hardware configuration of the merchant and lowering overall costs.
[0070] Based on the order management system shown in FIG. 1, the POS device 110 is connected to the service device 120 through a network. However, in some scenarios, a communication link between the POS device 110 and the service device 120 may be unstable. For example, in some areas with poor network infrastructure, poor network coverage at a location of the merchant results in an unstable communication link between the POS device 110 and the service device 120. For another example, during peak dining hours, an excessive quantity of diners results in a relatively significant network communication delay, which may result in an unstable communication link between the POS device 110 and the service device 120. When the communication link between the POS device 110 and the service device 120 is unstable, service conduction of the merchant is affected.
[0071] In view of this, this specification provides an order management solution. In the solution, dependence of the order management system shown in FIG. 1 on the Internet can be reduced, and a stable order management solution can be provided to a merchant even when a network connection is unstable. The following provides descriptions with reference to FIG. 2.
[0072] FIG. 2 is a schematic diagram of another application scenario of an order management system according to an embodiment of this specification. Based on the order management system shown in FIG. 1, the service device 120 can include a local server 121 and a remote server 122. The local server 121 can be deployed in an offline store, and the remote server 122 can be deployed in the cloud. The POS device 110 is connected to the local server 121 through a local area network, and the remote server 122 is connected to the local server 121 through a public area network.
[0073] The following describes a payment process of an offline order with reference to FIG. 2. With reference to FIG. 2, after a cashier initiates a payment operation for an offline order, the local server 121 can determine a current connection status between the local server 121 and the remote server 122; and determine, based on the current connection status, at least one candidate payment method applicable to the offline order from a payment method set supported by the order management system, and send the at least one candidate payment method to the POS device 110. The POS device 110 initiates a payment procedure of the offline order based on the at least one candidate payment method. In addition, the local server 121 sends order information of the offline order to the remote server 122, so that the remote server 122 stores the order information. In the scenario shown in FIG. 2, the local server 121 can detect the current connection status (that is, a connection status between the local server 121 and the remote server 122 or a network status of the public area network), and select a payment method suitable for the current connection status, to provide an efficient and reliable transaction solution to a merchant in a complex network environment.
[0074] In some embodiments, the POS device 110, the local server 121, and the remote server 122 cooperate with each other to perform the order processing method provided in the embodiments of this specification. The POS device 110, the local server 121, and the remote server 122 can store data and instructions for implementing the order processing method, and can execute or be configured to execute the data and the instructions. In some embodiments, the POS device 110, the local server 121, and the remote server 122 can include a hardware device with a data information processing function and a necessary program needed to drive the hardware device to work.
[0075] In some implementations, it can be further considered to deploy the local server 121 in the POS device 110 in a pluggable manner. In some embodiments, the local server 121 can alternatively be deployed in a device other than the POS device in a pluggable manner. This flexible deployment manner allows the local server 121 to run in different hardware environments, for example, a local electronic device (a mobile phone or a tablet) of a merchant, a network router, or a background management device (a computer) of a store, based on a requirement. In thisdiversified deployment manner, the local server 121 can adapt to different scenarios to meet requirements of different merchants for performance, costs, and management.
[0076] In some embodiments, the local server 121 can serve as an independent module or component, and be flexibly installed or uninstalled based on actual requirements, without the need for large-scale modification or reconstruction of a core system of the POS device 110. For example, the local server 121 can be deployed in an operating system or an application of the POS device 110 in a form of a software plugin, and communicate with the POS device 110 through a standardized interface.
[0077] In some embodiments, the local server 121 can alternatively serve as a hardware module, and be deployed in the POS device 110 or in a device other than the POS device 110 in a form of a modular and independent device. This "pluggable" design in the form of hardware can provide high flexibility and convenience, enabling functions of the local server to be quickly deployed, upgraded, or replaced through physical plugging, without the need for large-scale changes to an existing system or device.
[0078] The local server 121 can support limited functions. Therefore, a hardware configuration requirement of the local server 121 is correspondingly lowered. During design of the local server 121, a functional module can be further removed based on a specific requirement, and only a core function actually needed by the merchant is retained. In this way, hardware costs and system complexity can be further significantly reduced. For example, when connection status diagnosis needs to be supported, only one low-power network detection module can be deployed, and network status monitoring is implemented by periodically sending and receiving a probe request, without the need for a high-performance computing processor or a complex software system. Similarly, in terms of a local storage function, the local server can use a low-cost embedded multi-media card (eMMC) or a secure digital (SD) card storage device to meet only a short-term cache requirement of order data, and does not need to be equipped with an expensive high-capacity memory. Therefore, for an offline merchant, especially for a small / micro merchant, such a local server 121 deployed on a simple hardware device is limited in functionality but highly targeted. Such a local server 121 can not only provide basic payment assurance, but also significantly reduce procurement and operation costs.
[0079] It should be noted that in some embodiments, the remote server 122 is further configured to: receive an online order of the merchant from at least one online channel through the public area network, store the online order, and provide management services of the offline order and the online order to the POS device 110. That is, in some embodiments, the remote server 122 assumes a role of the serving device 120 in FIG. 1. The POS device 110 can receive and process online orders from a plurality of online channels from the remote server 122.
[0080] FIG. 3 is a diagram of a hardware structure of an electronic device 200 according to an embodiment of this specification. In some embodiments, the electronic device 200 can serve as the POS device 110, the local server 121, or the remote server 122 in FIG. 2.
[0081] As shown in FIG. 3, the electronic device 200 can include at least one storage medium 230 and at least one processor 220. In some embodiments, the electronic device 200 can further include a communication port 250 and an internal communication bus 210. The electronic device 200 can further include an I / O component 260.
[0082] The internal communication bus 210 can be connected to different system components. For example, the internal communication bus 210 can be connected to the storage medium 230, the processor 220, the communication port 250, the I / O component 260, and the like.
[0083] The I / O component 260 supports an input / output between the electronic device 200 and another component.
[0084] The communication port 250 is used for data communication between the electronic device 200 and the outside. For example, the communication port 250 can be used for data communication between the electronic device 200 and a network 140. The communication port 250 can be a wired communication port, or can be a wireless communication port.
[0085] The storage medium 230 can include a data storage apparatus. The data storage apparatus can be a non-transitory storage medium, or can be a transitory storage medium. For example, the data storage apparatus can include one or more of a disk 232, a read-only storage medium (ROM) 234, or a random access storage medium (RAM) 235. The storage medium 230 further includes at least one instruction set stored in the data storage apparatus. The instruction set can include computer program code. The computer program code can include a program, a routine, an object, a component, a data structure, a process, a module, and the like.
[0086] The at least one processor 220 can be communicatively connected to the at least one storage medium 230. When the electronic device 200 runs, the at least one processor 220 reads the at least one instruction set, and performs, based on an indication of the at least one instruction set, the order management method provided in this specification. The processor 220 can perform the steps included in the order management method. The processor 220 can be in a form of one or more processors. In some embodiments, the processor 220 can include one or more hardware processors, for example, a microcontroller, a microprocessor, a reduced instruction set computer (RISC), an application- specific integrated circuit (ASIC), an application- specific instruction set processor (ASIP), a central processing unit (CPU), a graphics processing unit (GPU), a physical processing unit (PPU), a microcontroller unit, a digital signal processor (DSP), a field programmable gate array (FPGA), an advanced RISC machine (ARM), a programmable logic device (PLD), any circuit, processor, or the like that can perform one or more functions, or any combination thereof.
[0087] To merely describe a problem, only one processor 220 is shown in the electronic device 200 in the accompanying drawings. However, it should be noted that the electronic device 200 in this specification can further include a plurality of processors. Therefore, the operations and / or method steps disclosed in this specification can be performed by one processor or can be jointly performed by a plurality of processors. For example, if the processor 220 in the electronic device 200 described in this specification performs step A and step B, it should be understood that step A and step B can be jointly or separately performed by two different processors 220 (for example, a first processor performs step A and a second processor performs step B, or a first processor and a second processor jointly perform step A and step B).
[0088] FIG. 4 is a flowchart of an order management method P300 according to an embodiment of this specification. As shown in FIG. 4, the order management method P300 is cooperatively performed by a POS device, a local server, and a remote server. The order management method P300 can include S310 to S38O. A person skilled in the art can understand that an execution sequence of the steps in P300 is not limited in this specification. For example, S350 and S370 can be interchanged or performed in parallel.
[0089] S310: The POS device generates an offline order based on an order placement operation performed by an operator in an interaction interface of the POS device.
[0090] In some embodiments, the operator can be a staff member (for example, a cashier) of a target merchant. With reference to FIG. 1, a consumer A comes to the store for a meal, and the staff member of the target merchant selects, on the POS device based on a purchase need of the consumer, a product needed by the consumer, and performs an order placement operation. The POS device generates an offline order in response to the order placement operation.
[0091] In some embodiments, the operator can alternatively be a consumer. In this case, the POS device can serve as a self-service ordering device of a target merchant for the consumer to place an order offline in a self-service manner. For example, after coming to the store, the consumer independently selects a desired dish on the POS device, and performs an order placement operation.
[0092] S320: The POS device sends order information of the offline order to the local server.
[0093] In some embodiments, content of the order information can include basic information about the offline order, for example, an order number, a creation time, a source channel (for example, an identifier of the POS device), operator information (a merchant operation or aconsumer operation), consumer information, a product or service list, price details, discount information, and the like.
[0094] S33O: The local server determines a current connection status between the local server and the remote server.
[0095] In some embodiments, the network connection status directly affects a manner of processing the order information. A connection status between the local server and the remote server can include an abnormal state and a normal state. The abnormal state can be a state such as a "relatively high delay" or "connection interruption" caused due to an unsmooth network, or the abnormal state can be a state caused due to unavailability of the remote server or the like.
[0096] In some embodiments, the local server can determine the current connection status by using the following steps: The local server periodically sends a probe request to the remote server at a preset time interval, and receives a probe response corresponding to the probe request from the remote server; and determines a network packet loss rate based on a quantity of probe requests sent within preset duration before a current moment and a quantity of received probe responses, and determines the current connection status based on the network packet loss rate.
[0097] In some embodiments, the local server can send a probe request (for example, a ping packet or a heartbeat packet) to the remote server at the preset time interval (for example, at an interval of 5 seconds), and record a sending time of each probe request and a receiving time of a corresponding probe response. In a preset duration window (for example, last 1 minute), the local server counts a total quantity of sent probe requests and a quantity of actually received probe responses, and calculates a network packet loss rate by using the data. If the network packet loss rate is relatively low (for example, less than 20%), it can be determined that the current connection status is the normal state. If the packet loss rate is relatively high (for example, greater than 20%), it may be considered that the connection status is the abnormal state. Determining of the current connection status based on the network packet loss rate can provide real-time network quality feedback for a payment procedure.
[0098] S340: The local server determines, based on the current connection status, at least one candidate payment method applicable to the offline order from a payment method set supported by an order management system.
[0099] In some embodiments, the payment method set can include code scanning payment, cash payment, bank card payment, mobile payment, credit card payment, and the like. The payment method set is not limited to the above-mentioned payment methods. The local server selects an appropriate candidate payment method based on the current connection status, to provide maximum flexibility for the merchant and consumers. For example, when the local server detects that the current connection status is the normal state, the candidate payment method can include all applicable payment methods, for example, includes all payment methods in the payment method set. For example, when the local server detects that the current connection status is the abnormal state, the candidate payment method can include some applicable payment methods. Based on different connection statuses, different candidate payment methods may be selected and there may be different subsequent processing procedures.
[0100] S350: The local server sends the at least one candidate payment method to the POS device.
[0101] S360: The POS device initiates a payment procedure of the offline order based on the at least one candidate payment method.
[0102] In some embodiments, the payment procedure is initiated and performed in different manners for different candidate payment methods. For different connection statuses, the payment procedure of the offline order is initiated in different manners. In some embodiments, a difference in the payment procedure is also reflected in different entities initiating payment requests to the remote server. In some embodiments, the POS device can initiate a payment request for the offline order to the remote server. In some embodiments, the POS device can alternatively initiate a payment request for the offline order to the local server, and then the local server sends the payment request for the offline order to the remote server. In this specification, the paymentprocedure is initiated based on the candidate payment method, to flexibly adapt to different payment environments and customer requirements and ensure smooth payment of the offline order.
[0103] S370: The local server sends the order information of the offline order to the remote server.
[0104] In some embodiments, the local server stores the order information of the offline order in a preset storage unit. When sending the order information to the remote server, the local server obtains the order information of the offline order from the preset storage unit, and sends the order information of the offline order to the remote server. The storage unit can be a local database, a cache file system, or a memory queue of the local server. The stored order information may include crucial information such as an order number, a product list, a payment method, and customer information.
[0105] In some embodiments, when the local server is deployed in the POS device in a pluggable manner, the preset storage unit can alternatively be a storage module of the POS device.
[0106] In some embodiments, the preset storage unit can alternatively be a nonvolatile storage unit, for example, a hard disk, a solid-state disk, a flash memory, or an embedded storage chip. The nonvolatile storage unit can ensure that even if the local server is powered off or restarted or another unexpected situation occurs, the stored order information can still be completely retained and is not lost due to power off or a fault. The nonvolatile storage unit is used to store the order information. In this way, storage reliability of the order information and a risk -resistance capability of the system can be effectively improved, to ensure that the offline order can be accurately recorded and completely restored and ensure operation continuity of the merchant and service experience of customers.
[0107] In some embodiments, after the offline order information is successfully uploaded to the remote server, the remote server returns a confirmation message to the local server to indicate that the order data has been successfully received and processed. In response to the order confirmation message, the local server deletes the order information of the offline order from the preset storage unit.
[0108] In some embodiments, the order confirmation message can include information such as an order number, a synchronization status, or a processing time. When receiving the confirmation message, the local server deletes the order information of the corresponding offline order from the preset storage unit, to release storage space and avoid repeated uploading. In some embodiments, the deletion operation performed by the local server can be further combined with a logging function, and the local server records the deleted order information in a log file for subsequent tracing, to ensure transparency and traceability of a data operation. The local server performs the deletion operation on the order information. In this way, data processing efficiency of the order management system can be effectively improved, to avoid storage occupation and ensure consistency and integrity of order data.
[0109] In some embodiments, the local server can select the following deletion manner: deleting the order information of the offline order at an interval of a specified time period; or not deleting the order information of the offline order until storage space of the preset storage unit exceeds a storage threshold.
[0110] In an embodiment in which the order information of the offline order is deleted at the interval of the specified time period, the local server can set a scheduled task. After the order confirmation message is received, the corresponding order information is deleted from the preset storage unit after a delay of the specified time period (for example, 24 hours or 48 hours). In this manner, the local server is allowed to retain order data for a short time, so that the merchant quickly searches for and restores the order data when needed. In an embodiment in which the order information of the offline order is deleted when the storage threshold is exceeded, the local server monitors usage of the storage space of the preset storage unit. When detecting that the storage space of the preset storage unit exceeds the specified storage threshold (for example, 80% or 90%), the local server starts automatic cleaning, and deletes some confirmed offline orderinformation based on a specific rule (for example, an order generation time or a last access time), to release the storage space of the preset storage unit. In this manner, stable running of the local server can be ensured within limited storage resources. In addition, recent order information is preferentially retained to ensure that the order management system can access important data at any time.
[0111] In some embodiments, to further improve operation flexibility, the local server can further combine a plurality of deletion strategies. For example, after the order confirmation message is received, the order is first labeled as "deletable", and an actual deletion operation is triggered based on a storage space status or a time condition. By flexibly combining different deletion manners, the local server can efficiently manage a storage resource of the preset storage unit, and can flexibly adjust a lifecycle of data in different scenario requirements, thereby improving overall reliability and adaptability of the order management system.
[0112] S38O: The remote server stores the order information of the offline order.
[0113] In some embodiments, the content of the order information of the offline order can include basic information about the offline order, for example, an order number, a creation time, a source channel (for example, an identifier of the POS device), operator information (a merchant operation or a consumer operation), consumer information, a product or service list, price details, discount information, a payment status, a performance status, and the like.
[0114] In some embodiments, the remote server can further record dynamic information of an order, for example, an order state update record. Order information can be stored in a form of a distributed database to ensure real-time storage and access efficiency of massive order data. For example, the service device can classify and store orders (for example, a current day order and a historical order) based on a time dimension for subsequent query and analysis.
[0115] In S310 in the method shown in FIG. 4, there are two cases for the current connection status determined by the local server: the abnormal state or the normal state. In the two cases, the local server determines different candidate payment methods and subsequent order payment procedures are different. The following separately describes the two cases with reference to FIG. 5 and FIG. 6.
[0116] FIG. 5 is a schematic flowchart of another order management method according to an embodiment of this specification. FIG. 5 shows a case in which a connection status between a local server and a remote server is an abnormal state. As shown in FIG. 5, an offline order management procedure can include at least some steps in S410 to S500. In addition, a sequence of the steps is not limited in this specification.
[0117] S410: A POS device generates an offline order based on an order placement operation performed by an operator in an interaction interface of the POS device.
[0118] S420: The POS device sends order information of the offline order to the local server.
[0119] S430: The local server determines a current connection status between the local server and the remote server.
[0120] S440: When the current connection status is the abnormal state, the local server determines a payment method that is not dependent on the remote server in a payment method set as a candidate payment method.
[0121] In some embodiments, the payment method that is not dependent on the remote server can include a localized payment method such as cash payment, payment using a balance in a local account, and offline card swiping payment. In transaction processes of these payment methods, continuity of order processing and smooth payment completion can be ensured without dependence on a network or the remote server, to avoid a payment failure caused due to network abnormality. In some embodiments, smooth transaction completion can be further ensured under guidance of a staff member. For example, if a customer originally selects two-dimensional code payment, but a network connection is suddenly interrupted in a payment process, the staff member can direct the customer to switch to cash payment, to avoid transaction interruption.
[0122] S450: The local server sends at least one candidate payment method to the POS device.
[0123] S460: The POS device completes payment of the offline order based on the at least onecandidate payment method.
[0124] In some embodiments, there are different candidate payment method procedures. For example, when the candidate payment method is cash payment, the POS device can directly prompt the staff member to collect cash and make a record. When the candidate payment method is offline POS card swiping payment, the POS device can invoke a local card swiping device to read card information, and then complete offline deduction. After payment is completed, the POS device records a transaction serial number, and sends the transaction serial number to the local server for subsequent data synchronization after network restoration.
[0125] S470: The POS device sends a payment result of the offline order to the local server.
[0126] In some embodiments, the POS device can complete payment of the offline order based on selection of the at least one candidate payment method by a consumer. For example, if the consumer selects cash payment, the staff member of the POS device can collect cash and complete order settlement. In some embodiments, if an order management system further supports offline POS card swiping payment, the consumer can alternatively select offline POS card swiping payment. In some embodiments, if an order management system further supports payment using a balance in a local account of the consumer, the consumer can complete payment by using pre-deposited funds in the account on the POS device. By preferentially selecting the supported payment method in the abnormal state, the order management system can ensure stability of the payment procedure when the network fluctuates or the remote server is unavailable, and reduce a customer waiting time or an order cancellation risk caused due to a payment problem, thereby improving customer experience and service efficiency of the merchant.
[0127] S480: The local server sends the payment result to the remote server.
[0128] In some embodiments, payment result information can include a payment method, a payment amount, a transaction status, and the like. When the network connection is restored, the local server automatically uploads the payment result to the remote server for synchronization, to facilitate subsequent reconciliation, statistics collection, and order processing. It should be noted that a process in which the local server sends the payment result to the remote server is similar to a process in which the local server sends the order information. For details, refer to the following step S490 or step S490'. The local server can continuously send the payment result by using a polling mechanism, or an asynchronous sending manner in which the payment result is sent after the network is restored can be used. Details are not described herein again. In the above-mentioned embodiment, the local server transmits a payment result generated in an abnormal network condition, to ensure consistency between an order and payment data stored in the remote server, and avoid omission of a payment result of offline payment by the remote server, thereby improving overall transaction processing efficiency and reliability.
[0129] When the connection status is the abnormal state, the local server sends the order information of the offline order to the remote server by performing step S490 or step S490'.
[0130] S490: Periodically send the order information of the offline order to the remote server at a preset time interval until an order confirmation message corresponding to the offline order is received from the remote server.
[0131] In some embodiments, the local server can send the order information of the offline order to the remote server by using the polling mechanism (periodically at the preset time interval), to ensure that the order information is not lost. For example, when the connection status is the abnormal state (for example, the network connection is unstable or the remote server is temporarily unavailable), the local server starts a scheduled task and reattempts to send the order information to the remote server at a specified time interval (for example, every 20 seconds or 30 seconds). In some embodiments, each time an attempt is made to send the order information, a time and a quantity of attempts can be further recorded in a log of the local server for subsequent tracing.
[0132] In some embodiments, if a relatively large quantity of offline orders are not sent in the local server because the current connection status is abnormal for a relatively long time, the local server can process the order based on a specific priority rule. For example, the local server canfurther locally maintain an order sending queue to preferentially synchronize an order generated earlier. Based on the order sending queue, it is ensured that all unsent order information in the local server is sequentially sent in a generation time sequence of the order information, to avoid a problem of inconsistency of order data caused due to duplicate or chaotic sending logic. In some embodiments, to prevent a duplicate operation caused due to a network fluctuation or a serving end response delay, the local server can further perform duplication check on each sending operation, for example, ensure, by using an order number or an order hash value, that same order information is not sent a plurality of times within a short time. To improve efficiency, the local server can further send a plurality of pieces of order information in batches instead of separately sending the order information, thereby reducing communication overheads and a waiting time.
[0133] S490': Monitor the connection status between the local server and the remote server; and when it is detected that the connection status is switched from the abnormal state to a normal state, send the order information of the offline order to the remote server, and receive an order confirmation message corresponding to the offline order from the remote server.
[0134] In some embodiments, the local server can further send the order information in the asynchronous sending manner. The local server enters a connection status monitoring mode and periodically detects availability of communication with the remote server. Such monitoring can be implemented by using a plurality of means. For example, a heartbeat packet is periodically sent, an attempt is made to access a health check interface of the remote server, or a physical connection status (for example, a Wi-Fi or Ethernet connection status) of the network is detected, to determine a change of the connection status. When the connection status is switched to the normal state, the local server can automatically trigger a sending operation of an unsynchronized order, reliably upload order information to the remote server, and receive a confirmation message to complete data synchronization. In the above-mentioned embodiment, it can be ensured that the offline order is not lost even in a case of network interruption, and a synchronization operation can be automatically completed without manual intervention after the connection is restored, thereby improving robustness and efficiency of the system.
[0135] Based on the above-mentioned embodiment, even in a case of an abnormal network connection, the local server can ensure that the order information is finally reliably synchronized to the remote server, and avoid a risk of data loss. The local server can further automatically synchronize the order information without manual intervention after the network is restored, to ensure integrity and consistency of order data, and effectively reduce a workload and an error probability needed for manual intervention. This further enhances adaptability of the order management system and helps ensure reliability of offline order processing and synchronization.
[0136] S500: The remote server stores the order information of the offline order.
[0137] For an implementation of S500, refer to the detailed descriptions in S38O. Details are not described herein again.
[0138] FIG. 6 is a schematic flowchart of still another order management method according to an embodiment of this specification. FIG. 6 shows a case in which a connection status between a local server and a remote server is a normal state. As shown in FIG. 6, an offline order management procedure can include at least some steps in S510 to S590. In addition, a sequence of the steps is not limited in this specification.
[0139] S510: A POS device generates an offline order based on an order placement operation performed by an operator in an interaction interface of the POS device.
[0140] S520: The POS device sends order information of the offline order to the local server.
[0141] S530: The local server determines a current connection status between the local server and the remote server.
[0142] S540: When the current connection status is the normal state, the local server determines all payment methods in a payment method set as a candidate payment method.
[0143] In some embodiments, when a network connection is normal and the remote server can be normally accessed, all the payment methods can include an online payment method (for example, wallet payment, code scanning payment, or bank card payment) dependent on theremote server and a localized payment method (for example, cash payment or offline POS card swiping payment). In this case, a consumer can freely select any payment method based on a preference of the consumer, to complete a payment procedure. In a normal network condition, the local server and the POS device support all payment methods of an order management system, providing diversified payment options to consumers.
[0144] S550: The local server sends at least one candidate payment method to the POS device.
[0145] The local server can choose to send some or all candidate payment methods to the POS device.
[0146] In some embodiments, the POS device can perform steps S560 to S563 or perform steps S570 and S571 to initiate a payment procedure of the offline order.
[0147] S560: The POS device sends a payment request corresponding to the offline order to the local server.
[0148] S561: The local server sends the payment request to the remote server.
[0149] In some embodiments, the local server forwards the payment request to the remote server, and the remote server interacts with a payment platform or an acquiring institution to request the acquiring institution to process the payment request.
[0150] S562: The remote server sends a payment result corresponding to the offline order to the local server.
[0151] After processing the transaction request, the acquiring institution sends the payment result to the remote server. The remote server sends the payment result to the local server.
[0152] S563: The local server sends the payment result to the POS device.
[0153] In some embodiments, the local server returns the payment result (for example, a payment success, a payment failure, or a payment timeout) to the POS device in a timely manner, so that the POS device can update a payment interface and print a transaction credential. For example, if the payment succeeds, the local server transfers success information along with a transaction serial number to the POS device. If the payment fails, the local server can provide a specific cause (for example, a network timeout or an insufficient balance) of the failure, so that the merchant takes a subsequent measure in a timely manner.
[0154] In the above-mentioned embodiment, the local server plays a crucial central role in the payment procedure, and can implement unified processing and security assurance of the payment request. Further, the local server can serve as an important assurance mechanism in a case of an unstable network status. For example, when the POS device initiates the payment request, the current connection status is the normal state, and the payment request is successfully sent to the remote server through the local server. However, in a process in which the remote server returns the payment result, the connection status suddenly becomes abnormal. In this case, based on an information cache function performed by the local server, it can be ensured that payment data is not lost or omitted. In the above-mentioned embodiment, the order management system can further improve reliability, scalability, and user experience of the overall payment procedure while ensuring payment flexibility.
[0155] In some implementations, the POS device is connected to the remote server through a public area network, and the payment procedure is as follows:
[0156] S570: The POS device sends a payment request corresponding to the offline order to the remote server.
[0157] S571: The remote server sends a payment result to the POS device.
[0158] In the above-mentioned embodiment, the payment request from the POS device does not need to pass through the local server. The POS device can directly generate the payment request, and send the request to the remote server through the public area network. After receiving the request, the remote server forwards the payment request to a related payment institution (for example, a bank or a third-party payment platform) to complete a processing procedure of a payment transaction. The payment result is directly returned by the remote server to the POS device. The POS device updates an order status based on the received payment result, and completes the payment procedure. The payment procedure in the above-mentioned embodimentreduces a delay of an intermediate link, and is applicable to a scenario with a relatively high real-time requirement, for example, quick checkout in a high-traffic store or immediate payment confirmation of an online order.
[0159] In some embodiments, the POS device can further display corresponding processing information, for example, "a payment success" or "a payment failure", based on the payment result. In addition, the POS device can further determine a subsequent action based on the payment result, for example, complete order settlement, print a ticket, or prompt a customer to select a new payment method.
[0160] S580: The local server sends the order to the remote server.
[0161] When the current connection status is the normal state, the local server can directly send the order to the remote server through a network interface for synchronization and subsequent processing (for example, inventory update and bill record) of the offline order.
[0162] S590: The remote server stores the order information of the offline order.
[0163] For an implementation of S590, refer to the detailed descriptions in S38O. Details are not described herein again.
[0164] In some embodiments, if it is detected that the local server is faulty, a system of the local server can be further restored by performing the following steps: The local server reports the fault to the remote server; and performs fault rectification on the local server in response to a restoration procedure start instruction sent by the remote server.
[0165] In some embodiments, when the local server encounters faults such as a data reading failure, abnormal termination of a service process, or damage to a storage device, the local server can detect the abnormal state by using a health check mechanism of the local server, and immediately send fault information to the remote server. The fault information can include a fault type, a timestamp, an impact range, a related log file, and the like. The remote server determines fault severity based on the information, and determines whether to trigger a restoration procedure. After the remote server sends the restoration procedure start instruction, the local server performs a specific restoration operation based on the instruction. For example, in a case of service process interruption, the remote server can indicate the local server to restart a critical service module or load a backup configuration file to resume normal running. In addition, the remote server can provide more advanced restoration support based on a global monitoring capability, for example, synchronizing data from a cloud database to the local, or directly repairing a hardware or software fault by using a remote management tool. In the above-mentioned embodiment, the order management system can implement efficient fault monitoring and rectification in a distributed environment, to ensure service stability, so as to provide higher reliability and better service experience to a merchant and a store.
[0166] In conclusion, according to the order management method and system, the electronic device, and the storage medium provided in this specification, dependence of an order management process on the Internet can be reduced, and a more stable order management solution can be provided to a target merchant. The local server can dynamically adjust a payment method based on a network connection status. On one hand, diversified payment requirements of consumers can be met as much as possible. On the other hand, a stable order management service can be provided to the merchant in a case of a network fluctuation, thereby improving use experience of the merchant. In addition, the local server further sends order information of an offline order to the remote server, so that the remote server stores the order information, to avoid loss of order data or a failure of a payment procedure, and improve system stability.
[0167] According to another aspect of this specification, a computer-readable non-transitory storage medium is provided and stores at least one instruction set for performing order management. When the at least one instruction set is executed by a processor, the at least one instruction set instructs the processor to implement the steps in the order management method P300 in this specification. In some possible implementations, various aspects of this specification can be further implemented in a form of a program product, including program code. When the program product runs on the electronic device 200, the program code is used to enable theelectronic device 200 to perform the steps in the order management method P300 described in this specification. The program product configured to implement the above-mentioned method can use a portable compact disc read-only memory (CD-ROM) that includes program code, and can run on the electronic device 200. However, the program product in this specification is not limited thereto. In this specification, a readable storage medium can be any tangible medium that includes or stores a program, and the program can be used by or in combination with an instruction execution system. The program product can be any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. For example, the readable storage medium can be but is not limited to an electrical system, apparatus, or device, a magnetic system, apparatus, or device, an optical system, apparatus, or device, an electromagnetic system, apparatus, or device, an infrared system, apparatus, or device, or a semiconductor system, apparatus, or device, or any combination thereof. More specific examples of the readable storage medium include a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any proper combination thereof. The computer-readable storage medium can include a data signal propagated in a baseband as a part of a carrier, and carries readable program code. The propagated data signal can be in a plurality of forms, and includes but is not limited to an electromagnetic signal, an optical signal, or any proper combination thereof. The readable storage medium can alternatively be any readable medium other than the readable storage medium, and the readable medium can send, propagate, or transmit a program used by or in combination with an instruction execution system, apparatus, or device. The program code included in the readable storage medium can be transmitted by using any proper medium, including but not limited to a wireless medium, a wired medium, an optical cable, an RF medium, or any proper combination thereof. Program code for performing the operations in this specification can be written in any combination of one or more program design languages. The program design language includes an object-oriented program design language, for example, Java or C++, and further includes a conventional procedural program design language, for example, a "C" language, or a similar program design language. The program code can be completely executed on the electronic device 200, partially executed on the electronic device 200, executed as an independent software package, partially executed on the electronic device 200 and partially executed on a remote computing device, or completely executed on a remote computing device.
[0168] Specific embodiments of this specification are described above. Other embodiments fall within the scope of the appended claims. In some cases, the actions or steps described in the claims can be performed in a sequence different from that in the embodiments and desired results can still be achieved. In addition, the process depicted in the accompanying drawings does not necessarily need a particular sequence or consecutive sequence to achieve the desired results. In some implementations, multitasking and parallel processing are possible or may be advantageous.
[0169] In conclusion, after reading the detailed disclosure, a person skilled in the art can understand that the detailed disclosure can be presented only by using an example, and can impose no limitation. Although it is not explicitly stated herein, a person skilled in the art can understand that the requirements of this specification include various proper changes, improvements, and modifications to the embodiments. These changes, improvements, and modifications are intended to be provided in this specification, and fall within the spirit and scope of the example embodiments of this specification.
[0170] In addition, some terms in this specification are used to describe the embodiments of this specification. For example, "one embodiment", "embodiments", and / or "some embodiments" mean / means that specific features, structures, or characteristics described with reference to the embodiment can be included in at least one embodiment of this specification. Therefore, it can be emphasized and understood that two or more references to "embodiments", "one embodiment", or "alternative embodiments" in various parts of this specification do not necessarily refer to a sameembodiment. In addition, specific features, structures, or characteristics can be properly combined in one or more embodiments of this specification.
[0171] It should be understood that in the above-mentioned descriptions of the embodiments of this specification, to help understand a feature, for the purpose of simplifying this specification, various features are combined in a single embodiment, accompanying drawing, or description thereof in this specification. However, this does not mean that the combination of these features is necessary. It is entirely possible for a person skilled in the art to label some devices and understand the devices as separate embodiments when reading this specification. That is, the embodiments of this specification can also be understood as an integration of a plurality of secondary embodiments. Content of each secondary embodiment is also true when a quantity of features is less than a quantity of all features in one of the embodiments disclosed above.
[0172] Each patent, patent application, publication of a patent application, and other materials, for example, articles, books, instructions, publications, documents, and products, that are cited in this specification and that are other than any document that is inconsistent or conflict with this document or that imposes limiting impact on the widest scope of the claims can be incorporated herein by reference and used for all purposes now or later associated with this document. In addition, the terms in this document shall prevail if there is any inconsistency or conflict between the descriptions, definitions, and / or use of the related terms in any material and the descriptions, definitions, and / or use of the related terms in this document.
[0173] Finally, it should be understood that the principles of the implementation solutions of this specification are described in the implementation solutions of the application disclosed in this specification. Other modified embodiments also fall within the scope of this specification. Therefore, the embodiments disclosed in this specification are merely examples and not limitations. A person skilled in the art can use an alternative configuration according to the embodiments of this specification to implement the application in this specification. Therefore, the embodiments of this specification are not limited to the embodiments accurately described in the application.1
Claims
CLAIMSWhat is claimed is:
1. An order management method, applied to an order management system, wherein the order management system comprises a POS device, a local server, and a remote server, the POS device is connected to the local server through a local area network, the remote server is connected to the local server through a public area network, and the method is performed by the local server and comprises:determining a current connection status between the local server and the remote server in response to receiving order information of an offline order from the POS device, wherein the offline order is an order generated by an operator by using the POS device;determining, based on the current connection status, at least one candidate payment method applicable to the offline order from a payment method set supported by the order management system, and sending the at least one candidate payment method to the POS device, so that the POS device initiates a payment procedure of the offline order based on the at least one candidate payment method; andsending the order information of the offline order to the remote server, so that the remote server stores the order information.
2. The method according to claim 1, wherein the method further comprises: storing the order information of the offline order in a preset storage unit; andthe sending the order information of the offline order to the remote server comprises: obtaining the order information of the offline order from the preset storage unit, and sending the order information of the offline order to the remote server.
3. The method according to claim 2, wherein the method further comprises:in response to receiving an order confirmation message corresponding to the offline order from the remote server, deleting the order information of the offline order from the preset storage unit.
4. The method according to claim 2, wherein the preset storage unit is a nonvolatile storage unit.
5. The method according to claim 1, wherein the sending the order information of the offline order to the remote server comprises:when the current connection status is an abnormal state, periodically sending the order information of the offline order to the remote server at a preset time interval until an order confirmation message corresponding to the offline order is received from the remote server.
6. The method according to claim 1, wherein the sending the order information of the offline order to the remote server comprises:monitoring a connection status between the local server and the remote server when the current connection status is an abnormal state; andwhen it is detected that the connection status is switched from the abnormal state to a normal state, sending the order information of the offline order to the remote server, and receiving an order confirmation message corresponding to the offline order from the remote server.
7. The method according to claim 1, wherein the determining, based on the current connection status, at least one candidate payment method applicable to the offline order from a payment method set supported by the order management system comprises:when the current connection status is an abnormal state, determining a payment method that is not dependent on the remote server in the payment method set as the candidate payment method.
8. The method according to claim 7, wherein after the POS device completes the payment procedure, the method further comprises:receiving a payment result of the offline order from the POS device, and sending the payment result to the remote server.
9. The method according to claim 1, wherein the determining, based on the current connection status, at least one candidate payment method applicable to the offline order from a payment method set supported by the order management system comprises:when the current connection status is a normal state, determining all payment methods in the payment method set as the candidate payment method.
10. The method according to claim 9, wherein after the POS device initiates the payment procedure, the method further comprises:receiving a payment request corresponding to the offline order from the POS device, and sending the payment request to the remote server, so that the remote server requests an acquiring institution to perform the payment procedure of the offline order; andreceiving a payment result corresponding to the offline order from the remote server, and sending the payment result to the POS device.
11. The method according to claim 9, wherein the POS device is further connected to the remote server through the public area network, and the payment procedure is a payment procedure directly initiated by the POS device to the remote server.
12. An order management method, applied to an order management system, wherein the order management system comprises a POS device, a local server, and a remote server, the local server is connected to the POS device through a local area network, the remote server is connected to the local server through a public area network, and the method is applied to the POS device and comprises:generating an offline order based on an order placement operation performed by an operator in an interaction interface of the POS device, and sending order information of the offline order to the local server;receiving at least one candidate payment method applicable to the offline order from the local server, wherein the at least one candidate payment method is determined based on a current connection status between the local server and the remote server; andinitiating a payment procedure of the offline order based on the at least one candidate payment method.
13. The method according to claim 12, wherein when the current connection status is an abnormal state, the at least one candidate payment method comprises a payment method that is not dependent on the remote server in a payment method set supported by the order management system.
14. The method according to claim 13, wherein after the POS device completes the payment procedure, the method further comprises:sending a payment result of the offline order to the local server, so that the local server sends the payment result to the remote server.
15. The method according to claim 12, wherein when the current connection status is a normal state, the at least one candidate payment method comprises all payment methods in a payment method set supported by the order management system.
16. The method according to claim 15, wherein the initiating a payment procedure of the offline order based on the at least one candidate payment method comprises:sending a payment request corresponding to the offline order to the local server, so that the local server sends the payment request to the remote server, to request an acquiring institution to perform the payment procedure of the offline order; andwhen the local server receives a payment result corresponding to the offline order from the remote server, receiving the payment result corresponding to the offline order from the local server.
17. An electronic device, applied to an order management system, wherein the order management system comprises a POS device, a local server, and a remote server, the local server is connected to the POS device through a local area network, the remote server is connected to the local server through a public area network, and the electronic device serves as the local server and comprises:at least one storage medium that stores at least one instruction set for performing order management; andat least one processor that is communicatively connected to the at least one storage medium, wherein when the electronic device runs, the at least one processor reads the at least one instruction set, and performs the method according to any one of claims 1 to 11 based on an indication of the at least one instruction set.
18. An electronic device, applied to an order management system, wherein the order management system comprises a POS device, a local server, and a remote server, the local server is connected to the POS device through a local area network, the remote server is connected to the local server through a public area network, and the electronic device serves as the POS device and comprises:at least one storage medium that stores at least one instruction set for performing order management; andat least one processor that is communicatively connected to the at least one storage medium, wherein when the electronic device runs, the at least one processor reads the at least one instruction set, and performs the method according to any one of claims 12 to 16 based on an indication of the at least one instruction set.
19. A computer-readable nonvolatile storage medium, wherein the computer-readable nonvolatile storage medium stores at least one instruction set, and when the at least one instruction set is executed by at least one processor, the order management method according to any one of claims 1 to 11 is implemented or the order management method according to any one of claims 12 to 16 is implemented.
20. An order management system, comprising a POS device, a local server, and a remote server, wherein the local server is connected to the POS device through a local area network, and the remote server is connected to the local server through a public area network;the POS device is configured to: generate an offline order based on an order placement operation performed by an operator in an interaction interface of the POS device, and send the offline order to the local server through the local area network;the local server is configured to: determine a current connection status between the local server and the remote server in response to receiving order information of the offline order from the POS device, determine, based on the current connection status, at least one candidate payment method applicable to the offline order from a payment method set supported by the order management system, send the at least one candidate payment method to the POS device, and send the order information of the offline order to the remote server;the POS device is further configured to initiate a payment procedure of the offline order based on the at least one candidate payment method; andthe remote server is configured to store the order information.