Consumption machine data processing method and system, electronic equipment and storage medium

By mapping the connection status between the POS terminal and the cloud backend, the processing terminal is dynamically selected, which solves the transaction problem when the POS terminal is in an unstable network, realizes more efficient and reliable consumption data processing, and improves user experience and system performance.

CN120997952APending Publication Date: 2025-11-21HESHI OFFICE EQUIP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510964211.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-14
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

Existing POS systems cannot conduct effective transactions when the network connection is unstable or interrupted, resulting in a poor user experience and low operational efficiency.

Method used

By mapping the connection status between the POS terminal and the cloud backend, the local POS terminal or the cloud backend can be dynamically selected as the POS data processing terminal to realize POS data processing.

Benefits of technology

It improves the system's availability, reliability, and security in various network environments, optimizes resource utilization efficiency, and provides a smoother and more consistent consumer experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120997952A_ABST
    Figure CN120997952A_ABST
Patent Text Reader

Abstract

The invention discloses a consumption machine data processing method and system, electronic equipment and a storage medium, and the method comprises the steps: reading a consumption amount and account information of a target account through a consumption machine in response to a reading operation for the target account; acquiring a connection state between the consumption machine and the cloud background; mapping and determining a consumption machine or a cloud background as a consumption data processing terminal according to the connection state; and based on the account information, performing consumption data processing by using the consumption data processing terminal. The consumption data processing terminal is dynamically mapped and selected according to the real-time network connection state, the contradiction among network dependence, safety, reliability and efficiency of an existing consumption system is successfully solved, on-line / off-line consumption can be achieved based on the characteristics of different consumption terminals, and in addition, the consumption data processing method and device are suitable for large-scale popularization and application. And a mobile consumption equipment scheme can be realized based on offline consumption. The method can be widely applied to the technical field of data processing.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data processing, and particularly relates to a consumption machine data processing method and system, electronic equipment and storage medium. BACKGROUND

[0002] In the existing consumption system (such as canteen, supermarket, campus card and the like), when the consumption machine (POS terminal) performs the deduction processing on the account (such as IC card, mobile phone NFC, two-dimensional code account), the data processing mode thereof usually has the following significant shortcomings:

[0003] The rigid processing mode depends on network connection: most consumption machines are designed to be connected to the cloud background in real time to complete consumption verification and deduction processing. When the network connection is unstable or completely interrupted (such as remote areas, network failure, signal shielding), the consumption machine cannot perform any effective transaction, resulting in transaction stagnation, poor user experience and low operation efficiency. Users may not be able to dine or shop, and merchants face losses. SUMMARY

[0004] The main purpose of the embodiments of the present application is to provide a consumption machine data processing method and system, electronic equipment and storage medium, which aims to solve at least one problem of the prior art.

[0005] To achieve the above-mentioned purpose, one aspect of the embodiments of the present application provides a consumption machine data processing method, which comprises:

[0006] In response to the reading operation on the target account, the consumption amount and the account information of the target account are read by the consumption machine;

[0007] The connection state of the consumption machine and the cloud background is obtained;

[0008] According to the connection state, the consumption machine or the cloud background is determined as the consumption data processing terminal through mapping;

[0009] Based on the account information, the consumption data processing terminal is used for consumption data processing.

[0010] In some embodiments, a voice unit is configured on the consumption machine, and the method further comprises the following steps:

[0011] When the account information cannot be read or the read account information is abnormal, the voice unit is used to play the prompt information of the card swiping failure.

[0012] In some embodiments, the target account includes a target card and a target code, and the consumption machine is configured with a card reading unit, a scanning unit and an input unit. In response to the reading operation on the target account, the consumption amount and the account information of the target account are read by the consumption machine, which comprises the following steps:

[0013] When the target account is a target card, the account information is read by the consumption machine in response to a card reading operation of a card reading unit on the target card;

[0014] When the target account is a target code, the account information is read by the consumption machine in response to a code scanning operation of a code scanning unit on the target code;

[0015] The consumption amount is read by the consumption machine in response to an input operation received by an input unit.

[0016] In some embodiments, according to the connection state, the mapping determines the consumption machine or the cloud background as the consumption data processing terminal, including the following steps:

[0017] When the connection state is normal, the cloud background is determined as the consumption data processing terminal;

[0018] When the connection state is abnormal, the consumption machine is determined as the consumption data processing terminal.

[0019] In some embodiments, the consumption machine is configured with a card writing unit, the account information includes an account identifier and an account balance, and the consumption machine is configured with a voice unit. When the consumption data processing terminal is the cloud background, the consumption data processing terminal is used for consumption data processing based on the account information, including the following steps:

[0020] Based on the account identifier, the customer balance corresponding to the target account is called from the cloud background;

[0021] When the customer balance is less than the consumption amount, a prompt signal is sent to the consumption machine by the cloud background, so that the consumption machine plays the card swiping failure prompt information through the voice unit in response to the prompt signal;

[0022] When the customer balance is greater than or equal to the consumption amount, the customer balance of the cloud background is updated by the difference between the customer balance and the consumption amount;

[0023] Based on the updated customer balance, an update signal is sent to the consumption machine by the cloud background, so that the consumption machine updates the account balance through the card writing unit in response to the update signal.

[0024] In some embodiments, the consumption machine is configured with a card writing unit, the account information includes an account identifier and an account balance, and the consumption machine is configured with a voice unit. When the consumption data processing terminal is the consumption machine, the consumption data processing terminal is used for consumption data processing based on the account information, including the following steps:

[0025] Based on the account identifier, the account list of the local end of the consumption machine is traversed to determine whether the local end has an account record of the target account;

[0026] When the local end does not have an account record, the consumption machine triggers the voice unit to play the card swiping failure prompt information;

[0027] When the local end has an account record, the account balance is imported into the local end;

[0028] When the account balance is less than the consumption amount, the voice unit is triggered by the consumption machine to play a prompt message of card swiping failure;

[0029] When the account balance is greater than or equal to the consumption amount, based on the difference between the account balance and the consumption amount, the consumption machine is used to update the account balance through the card writing unit, and the consumption amount is associated to the account record stored in the local end as a consumption record.

[0030] In some embodiments, the method further comprises at least one of the following steps:

[0031] When the connection state is restored from abnormal to normal, the consumption record stored in the local end of the consumption machine is uploaded to the cloud background;

[0032] The consumption record is obtained based on the consumption data processing by the consumption machine as a consumption data processing terminal during the period when the connection state is abnormal;

[0033] In response to a setting instruction of the management object, a setting operation is performed on the data information of the cloud background, and in response to a data setting result of the setting operation, a message is pushed to the target object based on a preset message platform.

[0034] To achieve the above-mentioned purpose, another aspect of the embodiment of the present application proposes a consumption machine data processing system, the system comprising:

[0035] The reading module is configured to read the consumption amount and the account information of the target account through the consumption machine in response to a reading operation on the target account;

[0036] The state acquisition module is configured to acquire the connection state of the consumption machine and the cloud background;

[0037] The state mapping module is configured to map and determine the consumption machine or the cloud background as a consumption data processing terminal according to the connection state;

[0038] The consumption processing module is configured to perform consumption data processing by using the consumption data processing terminal based on the account information.

[0039] In some embodiments, the consumption machine is configured with a voice unit, and the system further comprises an abnormality prompting module configured to perform the following operations:

[0040] When the account information cannot be read or the read account information is abnormal, the voice unit is used to play a prompt message of card swiping failure.

[0041] In some embodiments, the system further comprises a data management module configured to perform the following operations:

[0042] When the connection state is recovered from abnormal to normal, the consumption record stored on the local end of the consumption machine is uploaded to the cloud background after the consumption record stored on the local end of the consumption machine is uploaded to the cloud background;

[0043] The consumption record is obtained by using the consumption machine as a consumption data processing terminal for consumption data processing during the period when the connection state is abnormal.

[0044] In response to a setting instruction of the management object, a setting operation is performed on the data information of the cloud background, and in response to a data setting result of the setting operation, a message is pushed to the target object based on a preset message platform.

[0045] To achieve the above-mentioned purpose, another aspect of the embodiment of the present application provides an electronic device, which comprises a memory and a processor, the memory stores a computer program, and the processor implements the foregoing method when executing the computer program.

[0046] To achieve the above-mentioned purpose, another aspect of the embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the foregoing method.

[0047] To achieve the above-mentioned purpose, another aspect of the embodiment of the present application provides a computer program product, which comprises a computer program, and the computer program is executed by a processor to implement the foregoing method.

[0048] The embodiment of the present application at least has the following beneficial effects: the present application provides a consumption machine data processing method, system, electronic device, storage medium and program product, which reads the consumption amount and the account information of the target account through the consumption machine in response to the reading operation of the target account; obtains the connection state of the consumption machine and the cloud background; determines the consumption machine or the cloud background as the consumption data processing terminal according to the connection state; and performs consumption data processing based on the account information and using the consumption data processing terminal. The present application successfully solves the contradiction between network dependence and safety, reliability and efficiency of the existing consumption system by dynamically mapping and selecting the consumption data processing terminal (consumption machine local or cloud background) according to the real-time network connection state. It greatly improves the usability, reliability and safety of the system in various network environments, realizes intelligent and seamless switching of the processing mode, optimizes the resource utilization efficiency, and finally provides users with a smoother and more consistent consumption experience, significantly enhancing the overall performance and application range of the consumption system. BRIEF DESCRIPTION OF DRAWINGS

[0049] Figure 1 is an implementation environment schematic diagram of the consumption machine data processing method provided by the embodiment of the present application;

[0050] Figure 2 is a flowchart of the consumption machine data processing method provided by the embodiment of the present application;

[0051] Figure 3 is a schematic diagram of an example of an architecture of a consumption machine provided by an embodiment of the present application;

[0052] Figure 4 is a flowchart of a process of adaptive consumption machine data processing based on a connection state of a consumption machine and a cloud backend provided by an embodiment of the present application

[0053] Figure 5 is a flowchart of a process of uploading offline consumption data by a consumption machine provided by an embodiment of the present application;

[0054] Figure 6 is a schematic diagram of an example of an architecture of a cloud backend provided by an embodiment of the present application;

[0055] Figure 7 is a schematic diagram of an example of an architecture of a card reader module provided by an embodiment of the present application. DETAILED DESCRIPTION

[0056] In order to make the objects, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and not intended to limit the present application. When the following description refers to the accompanying drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following example embodiments do not represent all the implementations consistent with embodiments of the present application. They are only examples of systems and methods consistent with some aspects of the embodiments of the present application as detailed in the appended claims.

[0057] It can be understood that the terms "first", "second", and the like used in the present application can be used herein to describe various concepts, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of the present application, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as the first information. Depending on the context, the word "if" as used herein can be interpreted as "when" or "when" or "in response to determining".

[0058] The terms "at least one", "multiple", "each", "any", and the like used in the present application include one, two or more than two, multiple includes two or more than two, each refers to each of the corresponding multiple, and any refers to any one of the multiple.

[0059] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to be limiting of this application.

[0060] In the related art, most of the consumption machines are designed to have to connect to the cloud background in real time to complete consumption verification and deduction processing. When the network connection is unstable or completely interrupted (such as remote areas, network failures, signal shielding), the consumption machine cannot carry out any effective transaction, resulting in transaction stagnation, poor user experience, and low operational efficiency. Users may not be able to dine or shop, and merchants face losses.

[0061] Therefore, in the embodiments of the present application, a consumption machine data processing method, system, electronic device, storage medium and program product are provided. The scheme responds to a read operation on a target account, reads the consumption amount and account information of the target account through the consumption machine; obtains the connection state of the consumption machine and the cloud background; according to the connection state, determines the consumption machine or the cloud background as the consumption data processing terminal through mapping; and based on the account information, uses the consumption data processing terminal to process the consumption data. The present application successfully solves the contradiction between network dependence and safety, reliability and efficiency of the existing consumption system by dynamically mapping the selection of the consumption data processing terminal (consumption machine local or cloud background) according to the real-time network connection state. It greatly improves the availability, reliability and security of the system in various network environments, realizes intelligent and seamless switching of the processing mode, optimizes the resource utilization efficiency, and finally provides users with a smoother and more consistent consumption experience, significantly enhancing the overall performance and scope of the consumption system.

[0062] It can be understood that the consumption machine data processing method provided by the present application can be applied to any computer device with data processing and computing capability, and the computer device can be various terminals or servers. When the computer device in the embodiments is a server, the server is an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and basic cloud computing services such as big data and artificial intelligence platforms. Alternatively, the terminal is a smart phone, tablet computer, notebook computer, desktop computer, etc., but is not limited thereto.

[0063] As shown in Figure 1 , it is an implementation environment schematic diagram provided by the embodiments of the present application. Referring to Figure 1The implementation environment includes at least one terminal 102 and a server 101. The terminal 102 and the server 101 can be connected by wireless or wired means to complete data transmission and exchange.

[0064] The server 101 can be a stand-alone physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and basic cloud computing services such as big data and artificial intelligence platforms.

[0065] In addition, the server 101 can also be a node server in a blockchain network. The blockchain is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithm.

[0066] The terminal 102 can be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. The terminal 102 and the server 101 can be directly or indirectly connected by wired or wireless communication, and the embodiments of the present application are not limited thereto.

[0067] Exemplarily, based on the implementation environment shown in Figure 1 The embodiments of the present application provide a consumer machine data processing method. The following is an example of the consumer machine data processing method applied to the server 101. It should be understood that the consumer machine data processing method can also be applied to the terminal 102. Specifically, the terminal 102 or the server 101 can be used to execute the relevant data processing logic of the method to realize the corresponding method flow.

[0068] Referring to Figure 2 , Figure 2 The consumer machine data processing method provided by the embodiments of the present application is an optional flowchart. The execution subject of the consumer machine data processing method can be any one of the aforementioned computer devices (including servers or terminals). Figure 2 The method in the foregoing embodiment can include, but is not limited to, steps S100 to S400.

[0069] Step S100, in response to a read operation on a target account, reading a consumption amount and account information of the target account through a consumer machine;

[0070] It should be noted that the target account includes a target card and a target code, and the consumption machine is configured with a card reading unit, a scanning unit and an input unit. In some embodiments, step S100 can include the following steps: when the target account is a target card, the account information is read by the consumption machine in response to the card reading operation of the card reading unit on the target card; when the target account is a target code, the account information is read by the consumption machine in response to the scanning operation of the scanning unit on the target code; and the consumption amount is read by the consumption machine in response to the input operation received by the input unit. Specifically, the input unit can receive the consumption amount of the cash register system through the connection of the cash register system, and the input unit can also be set as a keyboard to receive the consumption amount through manual input of the target object.

[0071] Exemplarily, in some specific embodiments, the core of the embodiments of the present application is to define different triggering and reading mechanisms according to the type (card or code) of the target account and the source of the consumption amount. Specifically, the following can be implemented:

[0072] 1. Mapping of target account type and reading method:

[0073] 1.1 Target card (such as physical IC card, magnetic stripe card, RFID card):

[0074] Trigger operation: the user approaches or inserts the target card to the card reading unit on the consumption machine.

[0075] Reading action: the consumption machine automatically reads the account information (such as card number, cardholder ID, encryption key, etc.) stored in the card in response to the physical card reading operation (such as induction, card swiping, card insertion) of the card reading unit. (Example: an employee swipes a card to have a meal in the canteen, and the card reader senses the employee's ID card to obtain the employee's account information).

[0076] 1.2 Target code (such as two-dimensional code, bar code):

[0077] Trigger operation: the user presents the target code on the mobile phone or paper to the consumption machine operator or the user uses the scanning unit (such as camera, laser code scanner) on the consumption machine to aim at the code.

[0078] Reading action: the consumption machine analyzes the code and reads the account information (such as associated user ID, encryption token, etc.) contained therein in response to the scanning operation (such as camera capturing image, code scanner recognizing bar code) of the scanning unit. (Example: a customer presents a payment code in a supermarket, and a cashier scans the code with a code scanner to obtain the customer's account information).

[0079] 2. Consumption amount acquisition method:

[0080] 2.1 Source one, connection of cash register system:

[0081] Triggering operation: The input unit of the consumption machine (or its integrated cash register module) receives consumption amount data transmitted from an external cash register system. This usually occurs in scenarios where the consumption machine is part of a cash register terminal.

[0082] Reading action: The consumption machine reads the consumption amount represented by the electronic input signal received by the input unit (such as the amount data sent by the cash register system through a serial port / USB / network).

[0083] 2.2 Source two, manual input:

[0084] Triggering operation: The operator or user directly inputs the consumption amount on the input unit (such as a physical keyboard, touch screen virtual keyboard) configured on the consumption machine.

[0085] Reading action: The consumption machine reads the consumption amount value entered by the user in response to the key input operation received by the input unit (example: a cafeteria waiter manually enters the meal amount on the consumption machine keyboard according to the selected dishes).

[0086] In some embodiments, the consumption machine is configured with a voice unit, and the method can further include the following steps: when the account information cannot be read or the read account information is abnormal, playing a card swipe failure prompt message through the voice unit.

[0087] Exemplarily, in some specific embodiments, the present embodiment adds fault tolerance processing and user feedback mechanism for the account information reading link based on the original technical solution, which is implemented through the voice unit configured on the consumption machine. The core is: when the account information reading process is abnormal, provide immediate and explicit voice prompts, significantly improving user experience and operation efficiency. Specifically, the following can be implemented:

[0088] 1. Triggering condition - reading failure or abnormality:

[0089] 1.1 Unable to read account information: refers to the consumption machine attempting to obtain account information through the card reading unit (for cards) or scanning unit (for codes), but failing to obtain any valid data.

[0090] Example scenario: target card is damaged, demagnetized or not placed correctly, card reading unit cannot recognize; target code is dirty, reflective, out of scanning range or format error, scanning unit cannot parse; card reading / scanning unit itself hardware failure.

[0091] 1.2 Abnormal account information read: refers to although data is obtained, the data does not conform to the expected format, verification rule or logic, and cannot be used for subsequent consumption data processing.

[0092] Example scenario: The read card number / user ID bit number error, contains illegal characters; read encrypted information check failed (such as CRC error, signature verification fails); read account status identification exception (such as the card / code has been read out) has been lost, has been cancelled); data packet structure is damaged or incomplete.

[0093] 2. Response action - voice prompt:

[0094] Execution subject: The voice unit (such as speaker, voice synthesis module) configured on the consumption machine.

[0095] Execution content: Play the preset "card swiping failure" prompt information.

[0096] Specific form: It can be a simple prompt sound (such as "ding ding" error sound), or a clear voice broadcast (such as "card reading failure, please try again" "two-dimensional code is invalid, please show it again").

[0097] Example flow: The user tries to swipe the card / scan the code; the card reading / scanning unit of the consumption machine tries to read; the system determines that the reading fails (no data) or the data is abnormal (such as card number verification error); the consumption machine controls the voice unit to play the "card swiping failure" prompt sound / voice; the user hears the prompt and knows that the operation is not successful, and can take appropriate measures (such as repositioning the card, showing a new code, contacting the administrator).

[0098] Step S200, acquire the connection state of the consumption machine and the cloud background;

[0099] Exemplarily, in some specific embodiments, a network module is configured on the consumption machine, and the connection state of the consumption machine and the cloud background is determined according to the communication state of the network module and the cloud background.

[0100] In some specific application scenarios, the present application embodiment clearly defines the execution subject (network module of the consumption machine) and the judgment basis (actual communication state of the network module and the cloud background) of the connection state detection, which provides reliable and operable input basis for the subsequent "dynamic mapping determination processing terminal". Specifically, the following can be implemented:

[0101] 1. Detection execution subject: network module;

[0102] Hardware basis: The consumption machine needs to be configured with a network module. This is the physical hardware to realize communication with the cloud background.

[0103] Network module type (example): wired network module (such as Ethernet card); wireless local area network module (such as Wi-Fi adapter); cellular mobile communication module (such as 4G / 5G module); other special communication modules (such as LoRa, NB-IoT, etc.).

[0104] Action: The network module is responsible for establishing, maintaining and managing the physical layer and data link layer connection of the consumer machine to the Internet (and further to the cloud backend).

[0105] 2. Judgment basis: The communication status between the network module and the cloud backend.

[0106] Core idea: The connection status (normal / abnormal) is not simply based on whether the network module is physically connected (such as the network cable is plugged in, the Wi-Fi icon shows connected), but whether the network module and the cloud backend can effectively communicate at the business level.

[0107] Detection process (example logic):

[0108] 2.1 Initiate detection:

[0109] The consumer machine (through its network module) actively sends a specific detection signal or request to the cloud backend. This signal / request is designed to be very lightweight, with the purpose of quickly verifying the reachability and response capability of the end-to-end (consumer machine -> Internet -> cloud backend service).

[0110] Example detection method: Send a short heartbeat packet (HeartbeatPacket) to the specified port of the cloud backend; send a minimalist business request (such as an encrypted "status query" request).

[0111] 2.2 Evaluate response:

[0112] a, Status = normal:

[0113] Condition: The network module successfully receives a valid response (such as a heartbeat confirmation packet, a successful response to a status query) from the cloud backend within the preset timeout period (for example: within 2 seconds).

[0114] Technical meaning: This indicates that the entire communication link (physical connection + network routing + backend service) is smooth, usable and responsive in time, sufficient to support real-time business data processing interaction.

[0115] b, Status = abnormal:

[0116] Condition: Any of the following occurs: the network module does not receive any response within the preset timeout period (timeout); the response received by the network module is invalid (such as packet corruption, verification failure, unexpected format); the network module detects that the physical connection is completely disconnected (such as the network cable is unplugged, the Wi-Fi signal strength is 0, the mobile network has no signal).

[0117] Technical meaning: This indicates that there are serious problems with the communication link, which cannot guarantee reliable and timely interaction between the consumer machine and the cloud backend. At this time, relying on the cloud to process business is risky (high probability of transaction failure).

[0118] Step S300, according to the connection state, mapping determines the consumer machine or the cloud background as the consumption data processing terminal;

[0119] It should be noted that in some embodiments, step S300 can include the following steps: when the connection state is normal, the cloud background is determined as the consumption data processing terminal; when the connection state is abnormal, the consumer machine is determined as the consumption data processing terminal.

[0120] Exemplarily, in some specific embodiments, the embodiments of the application intelligently select the data processing terminal (consumer machine or cloud background) according to the real-time connection state. It defines clear and operable mapping rules, so that the scheme can be implemented from the conceptual level to the specific execution level. Specifically, the following can be implemented:

[0121] Mapping rule definition:

[0122] Condition one: the connection state is normal;

[0123] Mapping action: the cloud background is determined as the consumption data processing terminal.

[0124] Technical meaning: when it is detected that the network connection between the consumer machine and the cloud background is stable, available and meets the real-time interaction requirements (such as low delay, high bandwidth, background service online), the system gives the dominant right of data processing to the cloud background.

[0125] Example scenario: the consumer machine is located at the checkout counter of a supermarket with good network coverage, and can quickly access the cloud account database; at this time, the account information (such as user ID) and consumption amount read by the consumer machine will be sent to the cloud background; the cloud background uses its powerful computing power and the right to access the latest and most complete account database to perform core consumption data processing, for example: verifying the validity of the account (whether it is frozen or canceled); querying the real-time account balance; performing the deduction calculation: new balance = current balance - consumption amount; updating the balance in the cloud account database; generating a transaction record and storing it in the cloud; the processing result (success / failure, new balance) is returned by the cloud background to the consumer machine to display / play to the user.

[0126] Condition two: the connection state is abnormal;

[0127] Mapping action: the consumer machine itself is determined as the consumption data processing terminal.

[0128] Technical meaning: when it is detected that the network connection between the consumer machine and the cloud background is unstable, unavailable or poor in quality to the extent that real-time and reliable interaction cannot be performed (such as network disconnection, extremely weak signal, background service unreachable, connection timeout), the system transfers the dominant right of data processing to the local consumer machine.

[0129] Example scenario: the consumption machine is located in an underground garage, a remote construction site canteen or encounters a temporary network failure; at this time, the consumption machine cannot or is not suitable to send data to the cloud background processing; the consumption machine uses its locally stored account information (usually a subset or cache of important accounts, such as the balance of regular customers) and computing power to perform core consumption data processing locally, for example: verifying the validity of the locally cached account (based on the locally stored state identifier); querying the locally cached balance of the account; performing a deduction calculation: new cached balance = current cached balance - consumption amount; updating the cached balance of the account locally; generating an offline transaction record locally and storing it; the processing result (success / failure, new cached balance) is displayed / broadcast to the user by the consumption machine locally.

[0130] Important follow-up: once the network connection is restored to normal, the consumption machine will synchronize and upload the locally stored offline transaction records to the cloud background. The cloud background performs reconciliation, conflict processing (such as the account being consumed at multiple offline terminals) and finally updates the main account database in the background.

[0131] Step S400, based on the account information, using the consumption data processing terminal to perform consumption data processing;

[0132] It should be noted that the consumption machine is configured with a card writing unit, and the account information includes an account identifier and an account balance. In some embodiments, when the consumption data processing terminal is a cloud background, step S400 can include the following steps: based on the account identifier, the target account corresponding to the customer balance is called from the cloud background; when the customer balance is less than the consumption amount, a prompt signal is sent to the consumption machine through the cloud background to make the consumption machine play the prompt information of the card swiping failure through the voice unit in response to the prompt signal; when the customer balance is greater than or equal to the consumption amount, the customer balance of the cloud background is updated by the difference between the customer balance and the consumption amount; based on the updated customer balance, an update signal is sent to the consumption machine through the cloud background to make the consumption machine update the account balance through the card writing unit in response to the update signal.

[0133] Exemplarily, in some specific embodiments, the embodiments of the present application deeply refine the specific operation process of "when the consumption data processing terminal is determined as a cloud background" in the technical solution, focusing on two key links in the cloud processing mode: 1) balance sufficiency check based on real-time data in the cloud; 2) balance update of the physical card medium after transaction success. This reflects the guarantee of transaction security and data consistency in the online mode. The core process description (when the consumption data processing terminal is a cloud background) can be implemented as follows:

[0134] 1. Premise: the consumption machine has read the consumption amount and the account identifier (such as card number, user ID) and account balance (referring to the balance stored in the card itself) of the target account.

[0135] 2. Cloud data processing initiation: the consumer machine sends the read account identifier and the consumption amount to the cloud backend that has been determined as the processing terminal.

[0136] 3. Cloud fetching of the latest balance:

[0137] Action: Based on the received account identifier, the cloud backend queries and fetches the latest and most authoritative customer balance corresponding to the target account from its central account database.

[0138] Technical significance: This ensures that the decision is based on cloud global real-time data, rather than the possibly lagged card balance (account balance) read by the consumer machine.

[0139] 4. Balance sufficiency check and feedback:

[0140] 4.1 Case one: Insufficient balance (customer balance < consumption amount):

[0141] Action: The cloud backend generates a prompt signal (containing transaction failure information); the cloud backend sends this prompt signal to the consumer machine; the consumer machine responds to the received prompt signal; the consumer machine controls its voice unit to play the preset "card swiping failure" prompt information (such as "insufficient balance, please recharge").

[0142] Result: The transaction is terminated. The user receives explicit voice prompt to know the failure reason.

[0143] Technical significance: Real-time interception of overdraft transactions, protection of fund safety, and immediate user feedback through voice prompt.

[0144] 4.2 Case two: sufficient balance (customer balance >= consumption amount):

[0145] Deduction processing:

[0146] Cloud backend performs deduction calculation: new customer balance = customer balance - consumption amount; the cloud backend updates the account record in its central account database using the new customer balance;

[0147] Generation and sending of update signal: the cloud backend generates an update signal (containing success information, new customer balance value); the cloud backend sends this update signal to the consumer machine;

[0148] Consumer machine responds to update signal & updates physical card: the consumer machine responds to the received update signal; the consumer machine controls its writing card unit (such as contact / non-contact IC card reader / writer); the writing card unit writes the new customer balance value contained in the update signal into the physical card of the target account, overwriting the original account balance.

[0149] Result: Transaction success. Cloud database balance is updated, and the balance (account balance) in the physical card held by the user is also updated synchronously to the new customer balance. The user can see the updated in-card balance on the consumption machine screen or the next time the card is swiped.

[0150] Technical significance: Ensure the consistency of the in-card balance and the cloud master data: avoid the user's next offline terminal consumption, because the in-card balance is not updated, and the overdraft or cannot be used again. Improve user experience and trust: users can immediately and intuitively see the new balance on their card after the deduction (such as through the consumption machine display or viewing on other devices that support reading balance). Support subsequent offline transactions: the updated in-card balance (account balance) is the basis for the consumption machine to act as a local processing terminal for consumption verification and deduction when the network is abnormal.

[0151] It should be noted that the consumption machine is configured with a card writing unit, and the account information includes an account identifier and an account balance. In some embodiments, when the consumption data processing terminal is a consumption machine, step S400 can include the following steps: based on the account identifier, traversing the account list of the local end of the consumption machine, judging whether the local end exists the account record of the target account; when the local end does not exist the account record, triggering the voice unit of the consumption machine to play the prompt information of the card swiping failure; when the local end exists the account record, importing the account balance into the local end; when the account balance is less than the consumption amount, triggering the voice unit of the consumption machine to play the prompt information of the card swiping failure; when the account balance is greater than or equal to the consumption amount, based on the difference between the account balance and the consumption amount, using the consumption machine to update the account balance through the card writing unit, and storing the consumption amount associated to the account record to the local end as a consumption record.

[0152] Exemplarily, in some specific embodiments, the embodiments of the present application deeply refine the specific operation process of "when the consumption data processing terminal is determined to be the consumption machine itself" in the technical solution. It fully describes how the consumption machine independently completes a safe transaction using locally stored account information in offline (network abnormal) mode, including key risk control (account existence check, balance sufficiency check) and transaction closed loop (deduction, card writing, record storage). The core process description (when the consumption data processing terminal is the consumption machine) can be implemented as follows:

[0153] 1. Premise: The consumption machine has read the consumption amount and the account identifier (such as card number, user ID) and account balance (referring to the balance stored in the card itself) of the target account. The network status is determined to be abnormal, so local processing is selected.

[0154] 2. Local account existence verification:

[0155] Action: The consumer machine looks up (iterates through) the account list it maintains in its local storage (e.g. memory, flash memory) based on the read account identification.

[0156] Objective: Determine whether the target account is one that the consumer machine is allowed to conduct offline transactions for (typically a pre-synchronized / cached regular customer account).

[0157] a, Result 1: No account record exists at the local end (no matching account identification found in the account list);

[0158] Action: The consumer machine triggers its voice unit; the voice unit plays a preset "card swiping failure" prompt (e.g. "This card is not registered for offline payment" or "Account invalid").

[0159] Result: The transaction is terminated. The user receives a voice prompt.

[0160] Technical significance: Prevent unauthorized or non-pre-set accounts from conducting offline transactions, control risk range. Only accounts pre-cached locally can enjoy offline services.

[0161] b, Result 2: An account record exists at the local end (a matching account identification is found in the account list);

[0162] Action: The consumer machine imports / associates the current account balance read from the card into the local account record (as the initial value for processing). (Note: This account balance is the value stored in the card, which may not be the latest, but it is the starting point for offline processing)

[0163] Technical significance: Prepare the data required for local processing.

[0164] 3. Local balance sufficiency check:

[0165] Action: The consumer machine compares the current associated account balance in the local account record with the read consumption amount.

[0166] a, Result 1: Insufficient balance (account balance < consumption amount);

[0167] Action: The consumer machine triggers its voice unit; the voice unit plays a preset "card swiping failure" prompt (e.g. "Insufficient balance").

[0168] Result: The transaction is terminated. The user receives a voice prompt.

[0169] Technical significance: Offline overdraft interception based on card balance. Although the card balance may not be the latest value in the cloud, it is the only available balance basis in offline mode, preventing serious overconsumption.

[0170] b, Result 2: Sufficient balance (account balance >= consumption amount);

[0171] Debit processing:

[0172] Consumption machine performs debit calculation: new account balance = account balance - consumption amount; update physical card balance; consumption machine controls its card writing unit; card writing unit writes the calculated new account balance value into the physical card of the target account, overwriting the original account balance. (The user can immediately see the updated balance on the card or the next time the card is read.)

[0173] Generate and store local consumption records: the consumption machine creates a new consumption record (containing transaction time, account identifier, consumption amount, new account balance, etc. Key information); the consumption machine associates this consumption record to the corresponding local account record; the consumption record is securely stored in the local storage space of the consumption machine.

[0174] Result: The transaction is successfully completed. The card balance is updated and local records are generated.

[0175] Technical significance: Complete offline transaction closed loop: successfully deduct the amount and update the card medium. Guarantee the basis of subsequent transactions: the updated card balance (new account balance) as the starting point for the next transaction (whether online or offline) of this account. Key data retention: local storage of detailed consumption records provides the basis for data synchronization when the network is restored. This is the basis for ensuring that offline transactions can be recorded and reconciled by the cloud.

[0176] It should be noted that in some embodiments, the method can further include at least one of the following steps: when the connection state is restored from abnormal to normal, upload the consumption records stored on the local end of the consumption machine to the cloud background; wherein the consumption records are obtained based on the consumption data processing terminal using the consumption machine as the consumption data processing terminal during the abnormal connection state; in response to the setting instruction of the management object, performing a setting operation on the data information of the cloud background, and in response to the data setting result of the setting operation, pushing a message to the target object based on the preset message platform.

[0177] By way of example, in some specific embodiments, the embodiments of the present application add two important supplementary function modules based on the core technical scheme of dynamic terminal selection and data processing, further improving the data integrity, manageability and user experience of the system. Specifically, the following can be achieved:

[0178] 1. Function one: offline data synchronization (upload consumption records when the network is restored);

[0179] 1.1 Triggering condition: the consumption machine detects that its connection state with the cloud background is restored from abnormal to normal (i.e. the network becomes stable and available again from offline / unstable state).

[0180] 1.2 Execution action: the consumption machine automatically uploads all consumption records stored on its local end to the cloud background.

[0181] 1.3 Data source and significance:

[0182] Consumption records: Specifically, the transaction records processed by the consumption machine itself as a consumption data processing terminal during the abnormal connection state (i.e., transactions in local offline mode).

[0183] Content example: Each record may contain: transaction timestamp, target account identification, consumption amount, account balance used at the time of transaction, new account balance after deduction, consumption machine ID, etc.

[0184] 1.4 Purpose and value:

[0185] a. Ensure data integrity: Collect transaction data processed locally during network anomalies into the cloud central database, ensuring that all transactions (online or offline) are ultimately recorded and verifiable. This is a key step to achieve global data consistency.

[0186] b. Support reconciliation and conflict resolution: After receiving these offline records, the cloud backend can: reconcile with the main account database to ensure that the deduction amount is consistent with the account changes. Handle potential conflicts (such as the same account consuming on multiple offline consumption machines, resulting in local balance calculation may be overdrawn). Finally, update the balance and transaction history of the cloud main account.

[0187] c. Achieve eventual consistency: Although offline mode uses locally cached balance information, through this synchronization mechanism, the cloud can ultimately obtain complete transaction information and correct the main account state, achieving overall system eventual consistency.

[0188] d. Automation: The process is automatically triggered without human intervention, improving system reliability and operational efficiency.

[0189] Example scenario: The consumption machines in the canteen use offline mode to process multiple lunch transactions during the day due to network failure. In the evening, the network is restored, and the consumption machines automatically upload these transaction records to the cloud backend. The backend system performs reconciliation, updating the account balance and consumption details of the relevant workers.

[0190] 2. Function two: Background management and result push;

[0191] 2.1 Trigger condition: The management object (such as system administrator, merchant operator) sends a setting instruction to the cloud backend through the management interface (such as Web console, management APP).

[0192] 2.2 Execution action:

[0193] Setting operation: The cloud backend responds to the setting instruction and performs the corresponding setting operation on the data information in the cloud backend.

[0194] Results Push: After the setup is completed, the cloud backend pushes a message to the target audience based on a preset messaging platform (such as SMS gateway, email server, APP push service, enterprise internal communication tool robot) to inform them of the data setup results (success, failure and reason, change details, etc.).

[0195] 2.3 Example of settings (data information):

[0196] Account Management: Set account status (frozen / unfrozen), set credit limit, and modify basic account information.

[0197] Rate / Price Management: Set consumption rates and discount rules for different goods or services.

[0198] Access control: Set operator permissions and POS terminal access permissions.

[0199] System configuration: Set data synchronization strategy, connection status detection parameters, and message push template.

[0200] Offline whitelist management: Set the list of accounts allowed to conduct offline transactions (i.e., the source of the account list cached locally on the POS terminal).

[0201] 4. Target audience: It can be the administrator who initiated the settings (for operation confirmation), or the relevant parties affected by the settings (such as cardholders whose accounts are frozen receiving a freeze notification; merchants whose discounts are adjusted receiving a rate change notification).

[0202] 5. Objectives and Value: Enhanced System Manageability: Provides remote management capabilities for core cloud data and configurations, facilitating operations and maintenance and business adjustments. Improved Operational Transparency and Traceability: Proactively pushes the results of critical settings operations, ensuring administrators or relevant personnel are promptly informed of whether the operations have taken effect, enhancing the reliability and trustworthiness of system operations. Enhanced User Experience and Service: Proactively notifies relevant users (target groups) of critical changes affecting users (such as account status changes and rate adjustments), demonstrating proactive and user-friendly service. Closed-Loop Management Process: Forms a complete management closed loop of "instruction → execution → result feedback".

[0203] Example scenario:

[0204] The administrator set an employee's account status to "frozen" in the backend. After successful setup, the system automatically notified the employee via SMS and app push notification: "Your spending account has been frozen. Please contact the administrator if you have any questions."

[0205] The supermarket operator modified the discount rate of the fresh food area in the background. After the setting is successful, the system automatically sends an email to all cash register supervisors: "The discount rate of the fresh food area has been successfully updated to X, effective time: YYYY-MM-DD HH:MM:SS."

[0206] The "offline data synchronization" and "background management setting result pushing" functions newly added by the embodiments of the present application are important matching and enhancement of the core technical scheme in actual landing application. They respectively solve the key needs of offline data uploading to the cloud and cloud management interaction, and together constitute a consumption machine data processing system with complete data loop, convenient management and operation, and smooth user communication, which significantly improves the maturity, reliability and business value of the overall scheme.

[0207] It should be understood that the content related to "balance", "amount" and the like involved in the embodiments of the present application is numerical data, which does not have financial attributes, and the present application belongs to the technical scheme of the interaction processing logic of data information of the local end of the consumption machine and the cloud background under different network conditions.

[0208] To explain the principle of the technical scheme of the present application in detail, the overall process of the present application will be described below in combination with some specific embodiments. It is easy to understand that the following is an explanation of the technical principle of the present application and cannot be regarded as a limitation of the present application.

[0209] In view of the related defects of the prior art, the present application provides a consumption machine data processing method, and the technical scheme of the present application can be applied to a system architecture for interaction between a consumption machine and a cloud background. The entire system can include a consumption machine (including a card reader, a network module, a payment module, etc.), a cloud background and the like.

[0210] In some specific application scenarios, as shown in FIG. 1, a structure example of a consumption machine is provided. Specifically, the consumption machine can implement the following functions: Figure 3

[0211] MCU master control, responsible for calculation and processing, controlling the work of each unit;

[0212] The keyboard is composed of 16 function keys and is responsible for input. The 16 function keys are as follows: ① 9 number and special symbol and letter keys (similar to the standard format of 9 key input), responsible for inputting numbers, special symbols and letters. ② 2 up and special symbol point "·" keys, down and switch keys, responsible for switching menus and input methods and inputting special symbol point "·". ③ 1 number "0" key, responsible for inputting numbers. ④ 4 on-off and cancel keys, menu keys, clear keys and confirmation keys, responsible for corresponding functions.

[0213] The card reading unit is responsible for collecting the card swiped by the consumer and then transmitting it to the master control for realizing card swiping and fee deduction consumption by the master control.​

[0214] Bluetooth / Wi-Fi unit, communication switching:

[0215] There are two main modes: (1) WIFI connection to the cloud backend; (2) If WIFI cannot be connected, connect via Bluetooth + mobile phone relay module, or Bluetooth + PC relay module to connect to the cloud backend.

[0216] Bluetooth / WIFI units serve as communication channels between consumer terminals and PCs or cloud back-end systems.

[0217] The card reader is operated through a front-end webpage on the cloud backend.

[0218] The USB / UART unit is an interface for charging and PC communication.

[0219] Storage unit, storing configuration information and consumption records, etc.

[0220] The battery / charging unit enables portable use of the device without the need for a continuous connection to an external power source.

[0221] Customer display LED / main LCD unit, interactive display and push.

[0222] The voice unit announces payment and operation prompts and results.

[0223] One-dimensional / two-dimensional scanning units enable functions such as reading membership cards or scanning payment codes.

[0224] In some specific application scenarios, such as Figure 4 As shown, adaptive consumption data processing based on the connection status between the POS terminal and the cloud backend can be implemented as follows: First, in response to a card swipe operation, it is determined whether the card information is read normally. If the card information is not read normally, a card swipe failure message is displayed. If the card information is read normally, it is further determined whether the POS terminal is connected to the cloud backend normally. If the connection is normal, based on the data from the cloud backend, it is determined whether the customer's balance is sufficient to support the current consumption. If it is sufficient, the consumption data is directly deducted (corresponding to card and online consumption operations); otherwise, a card swipe failure message is displayed. If the connection is abnormal, it is first determined whether the card information exists on the local end of the POS terminal. If the card information exists locally, it is determined whether the customer's balance is sufficient to support the current consumption. If it is sufficient, the consumption data is directly deducted (corresponding to card and offline consumption operations); if the card information does not exist locally or the local end data determines that the customer's balance is insufficient to support the current consumption, a card swipe failure message is displayed.

[0225] In some specific application scenarios, such as Figure 5As shown, in the case of idle consumption machine, periodic polling is performed to determine whether the connection cloud background is normal, and if the consumption machine connection cloud background is restored to normal, the offline data of the consumption machine is updated to the cloud background.

[0226] In some specific application scenarios, such as Figure 6 As shown, the cloud service involved in the cloud background of the technical solution of the present application can integrate multiple functional modules, which are the main embodiment of terminal functions. For example, the module function examples can be implemented as follows (only some modules are exemplarily described) :

[0227] The payment module manages the addition, deletion, selection, etc. of the payment channel.

[0228] The read-write card module makes valid cards, writes cards, batch writes cards, and performs operations such as recharging. For example, as shown, Figure 7 As shown, the card reader module (including the read-write card unit, MCU main control, storage unit, USB / UART communication unit, and indication LED / buzzer unit) mainly connects to the PC, realizes the read-write operation of the card through the PC host software or binds the cloud, and realizes the read-write operation of the card.

[0229] The print module manages the printer (addition, deletion, selection, etc.).

[0230] The member module manages the members.

[0231] Through the above modules, the effective management of company architecture, personnel, and member consumption can be realized, and through the applet, the push and management of the mobile terminal can be realized. The applet and the cloud service front end are consistent, and the management and consumption report viewing of other modules in the block diagram are included.

[0232] In summary, the present application successfully solves the contradiction between network dependency and safety, reliability, and efficiency of the existing consumption system by dynamically mapping and selecting the consumption data processing terminal (consumption machine local or cloud background) according to the real-time network connection state. It greatly improves the usability, reliability, and safety of the system in various network environments, realizes intelligent and seamless switching of the processing mode, optimizes the resource utilization efficiency, and ultimately provides users with a smoother and more consistent consumption experience, significantly enhancing the overall performance and application range of the consumption system. In addition, the technical solution of the present application can also realize mobile and portable consumption. For the needs of non-fixed places or space-sensitive customers, it can realize the scene of handheld, portable, and ready-to-use. The background processing, multi-payment channel support, applet push and management are more convenient, efficient and reliable.

[0233] The embodiment of the present application also provides a consumption machine data processing system, which can realize the above-mentioned method, and the system comprises:

[0234] The reading module is configured to read the consumption amount and the account information of the target account in response to a read operation on the target account.

[0235] The state obtaining module is configured to obtain a connection state between the consumption machine and the cloud background.

[0236] The state mapping module is configured to map the consumption machine or the cloud background as a consumption data processing terminal according to the connection state.

[0237] The consumption processing module is configured to perform consumption data processing based on the account information and using the consumption data processing terminal.

[0238] In some embodiments, the consumption machine is configured with a voice unit, and the system further comprises an exception prompting module configured to perform the following operations:

[0239] When the account information cannot be read or the read account information is abnormal, the voice unit is used to play a prompt message indicating that the card swiping fails.

[0240] In some embodiments, the system further comprises a data management module configured to perform the following operations:

[0241] When the connection state is recovered from abnormal to normal, the consumption records stored on the local terminal of the consumption machine are uploaded to the cloud background.

[0242] The consumption records are obtained based on the consumption data processing terminal using the consumption machine during the abnormal connection state.

[0243] In response to a setting instruction of the management object, a setting operation is performed on the data information of the cloud background, and in response to a data setting result of the setting operation, a message is pushed to the target object based on a preset message platform.

[0244] It can be understood that the content in the above method embodiments is applicable to the system embodiments, the system embodiments specifically implement the same functions as the above method embodiments, and achieve the same beneficial effects as the above method embodiments.

[0245] The embodiments of the present application further provide an electronic device, which comprises a memory and a processor. The memory stores a computer program, and the processor implements the above method when executing the computer program. The electronic device can be any intelligent terminal, such as a tablet computer or a vehicle-mounted computer.

[0246] It can be understood that the content in the above method embodiments is applicable to the device embodiments, the device embodiments specifically implement the same functions as the above method embodiments, and achieve the same beneficial effects as the above method embodiments.

[0247] The electronic device embodiments described above are merely illustrative, wherein the units described as separate components can or can not be physically separated, i.e., can be located in one place, or can be distributed to multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the present embodiment scheme.

[0248] The embodiment of the present application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to realize the method.

[0249] It can be understood that the contents in the above method embodiments are all applicable to the present storage medium embodiment, the function realized by the present storage medium embodiment is the same as that of the above method embodiments, and the beneficial effects achieved by the present storage medium embodiment are also the same as those achieved by the above method embodiments.

[0250] The embodiment of the present application further provides a computer program product, which comprises a computer program, and the computer program is executed by a processor to realize the method.

[0251] It can be understood that the contents in the above method embodiments are all applicable to the present program product embodiment, the function realized by the present program product embodiment is the same as that of the above method embodiments, and the beneficial effects achieved by the present program product embodiment are also the same as those achieved by the above method embodiments.

[0252] The memory, as a non-transitory computer readable storage medium, can be used to store non-transitory software programs and non-transitory computer executable programs. In addition, the memory can include a high-speed random access memory, and can also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some embodiments, the memory can optionally include a memory disposed remotely relative to the processor, and these remote memories can be connected to the processor through a network. Examples of the above network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0253] The method and system for processing consumption machine data, electronic device, storage medium and program product provided by the embodiments of the present application, by responding to the read operation of the target account, the consumption amount and the account information of the target account are read by the consumption machine; the connection state of the consumption machine and the cloud background is obtained; according to the connection state, the consumption machine or the cloud background is determined as the consumption data processing terminal through mapping; and the consumption data processing terminal is used to process the consumption data based on the account information. The present application successfully solves the contradiction between network dependence and safety, reliability and efficiency of the existing consumption system by dynamically mapping and selecting the consumption data processing terminal (consumption machine local or cloud background) according to the real-time network connection state. It greatly improves the availability, reliability and safety of the system under various network environments, realizes intelligent and seamless switching of the processing mode, optimizes the resource utilization efficiency, and finally provides users with a smoother and more consistent consumption experience, significantly enhancing the overall performance and application range of the consumption system.

[0254] The embodiments described in the embodiments of the present application are used to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those skilled in the art can know that, with the evolution of technology and the appearance of new application scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.

[0255] Those skilled in the art can understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and can include more or fewer steps than the figures shown, or combine certain steps or different steps.

[0256] The system embodiments described above are only schematic, and the units described as separate components can or can not be physically separated, that is, they can be located in one place or distributed on multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the embodiments of the present application.

[0257] Those skilled in the art can understand that all or some of the steps in the above disclosed method, the function modules / units in the system and the device can be implemented as software, firmware, hardware and their appropriate combinations.

[0258] The terms "first", "second", "third", "fourth", and the like in the description and in the claims of this application, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the use of the terms so termed is interchangeable under appropriate circumstances such that the embodiments of the application described herein are, for example, capable of orderly or chronological mundane operation, reverse order operation, based on circuitry availability, based on stated preference or the like, and that "default" or other orderings are thus permissible. Further, the terms "comprise", "comprising", "include", "including", and the like, are specifically intended to be open-ended. That is, references to individual steps and the like do not suhstantially exclude the presence of two or more of a recited step or its integral sub-steps or additional steps whether or not readily ascertainable from the description or the like. Further, the words "a" or "an", as used herein in the disclosure and elsewhere, are used indiscriminately and are to be interpreted in the same way, i.e. as meaning "one or more".

[0259] It should be understood that, in this application, "at least one" means one or more, "multiple" means two or more. "And / or", used to describe the relationship between associated objects, means that there can be three relationships, for example, "A and / or B" can mean: only A, only B, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects. "At least one of the following" or the like means any combination of these items, including single or multiple combinations. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0260] In several embodiments provided in the present application, it should be understood that the disclosed system and method can be implemented in other ways. For example, the above-described system embodiments are only illustrative, for example, the division of the above-mentioned units is only a logical functional division, and actual implementation can have another division manner, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed each other can be through some interface, indirect coupling or communication connection between systems or units, which can be electrical, mechanical or other forms.

[0261] The units described above as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e. they can be located in one place or distributed on multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.

[0262] In addition, each function unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software function unit.

[0263] When the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application, essentially or in part, or all or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes multiple instructions used to cause a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods in the embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various other media that can store programs.

[0264] The preferred embodiments of the embodiments of the present application are described above with reference to the accompanying drawings, and are not limited to the scope of the embodiments of the present application. Any modifications, equivalent replacements and improvements made by those skilled in the art without departing from the scope and essence of the embodiments of the present application shall be within the scope of the embodiments of the present application.

Claims

1. A data processing method for a consumer terminal, characterized in that, The method comprises the following steps: reading the consumption amount and the account information of the target account by the consumption machine in response to a reading operation on the target account; obtaining the connection state of the consumption machine and the cloud background; determining the consumption machine or the cloud background as a consumption data processing terminal according to the connection state; processing consumption data based on the account information by using the consumption data processing terminal.

2. The method of claim 1, wherein, The consumption machine is provided with a voice unit, and the method further comprises the following steps: playing a card swiping failure prompt information through the voice unit when the account information cannot be read or the read account information is abnormal.

3. The method of claim 1, wherein, The target account comprises a target card and a target code, and the consumption machine is provided with a card reading unit, a scanning unit and an input unit, and the reading of the consumption amount and the account information of the target account by the consumption machine in response to a reading operation on the target account comprises the following steps: reading the account information by the consumption machine in response to a card reading operation on the target card by the card reading unit when the target account is the target card; reading the account information by the consumption machine in response to a scanning operation on the target code by the scanning unit when the target account is the target code; reading the consumption amount by the consumption machine in response to an input operation received by the input unit.

4. The method of claim 1, wherein, The determination of the consumption machine or the cloud background as a consumption data processing terminal according to the connection state comprises the following steps: taking the cloud background as the consumption data processing terminal when the connection state is normal; taking the consumption machine as the consumption data processing terminal when the connection state is abnormal.

5. The method of claim 1, wherein, The consumption machine is provided with a card writing unit, the account information comprises an account identifier and an account balance, the consumption machine is provided with a voice unit, and the processing of consumption data based on the account information by using the consumption data processing terminal when the consumption data processing terminal is the cloud background comprises the following steps: calling a customer balance corresponding to the target account from the cloud background based on the account identifier; sending a prompt signal to the consumption machine by the cloud background to make the consumption machine play a card swiping failure prompt information through the voice unit in response to the prompt signal when the customer balance is less than the consumption amount; updating the customer balance of the cloud background by a difference between the customer balance and the consumption amount when the customer balance is greater than or equal to the consumption amount; sending an update signal to the consumption machine by the cloud background based on the updated customer balance to make the consumption machine update the account balance by the card writing unit in response to the update signal.

6. The method of claim 1, wherein, The consumption machine is provided with a card writing unit, the account information comprises an account identifier and an account balance, the consumption machine is provided with a voice unit, and the processing of consumption data based on the account information by using the consumption data processing terminal when the consumption data processing terminal is the consumption machine comprises the following steps: Based on the account identifier, the account list of the local end of the consumption machine is traversed to determine whether the local end has an account record of the target account; When the local end does not have the account record, the consumption machine triggers the voice unit to play a card swiping failure prompt message; When the local end has the account record, the account balance is imported into the local end; When the account balance is less than the consumption amount, the consumption machine triggers the voice unit to play a card swiping failure prompt message; When the account balance is greater than or equal to the consumption amount, based on the difference between the account balance and the consumption amount, the consumption machine updates the account balance through the card writing unit, and associates the consumption amount to the account record stored in the local end as a consumption record.

7. The method of claim 1, wherein, The method further includes at least one of the following steps: When the connection state is restored from abnormal to normal, the consumption record stored in the local end of the consumption machine is uploaded to the cloud background; Wherein, the consumption record is obtained by using the consumption machine as the consumption data processing terminal during the period when the connection state is abnormal; In response to the setting instruction of the management object, the data information of the cloud background is set, and in response to the data setting result of the setting operation, a message is pushed to the target object based on a preset message platform.

8. A consumer machine data processing system, characterized by The system includes: A reading module for reading a consumption amount and account information of a target account through a consumption machine in response to a reading operation on the target account; A state acquisition module for acquiring a connection state of the consumption machine and a cloud background; A state mapping module for mapping and determining the consumption machine or the cloud background as a consumption data processing terminal according to the connection state; A consumption processing module for performing consumption data processing based on the account information using the consumption data processing terminal.

9. An electronic device, comprising: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the method of any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 9. The computer program is executed by the processor to implement the method of any one of claims 1 to 7.