CN114219471A - POS settlement method, device, computer equipment and medium based on AOP - Google Patents

POS settlement method, device, computer equipment and medium based on AOP Download PDF

Info

Publication number
CN114219471A
CN114219471A CN202111487003.9A CN202111487003A CN114219471A CN 114219471 A CN114219471 A CN 114219471A CN 202111487003 A CN202111487003 A CN 202111487003A CN 114219471 A CN114219471 A CN 114219471A
Authority
CN
China
Prior art keywords
settlement
exercise mode
data
mode switch
switch state
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111487003.9A
Other languages
Chinese (zh)
Inventor
陈宏亮
李�杰
施宪富
韩洋
刘秋月
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Kemai Technology Co ltd
Original Assignee
Shenzhen Kemai Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Kemai Technology Co ltd filed Critical Shenzhen Kemai Technology Co ltd
Priority to CN202111487003.9A priority Critical patent/CN114219471A/en
Publication of CN114219471A publication Critical patent/CN114219471A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/08Payment architectures
    • G06Q20/20Point-of-sale [POS] network systems
    • G06Q20/206Point-of-sale [POS] network systems comprising security or operator identification provisions, e.g. password entry
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • G06F8/24Object-oriented
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/08Payment architectures
    • G06Q20/20Point-of-sale [POS] network systems
    • G06Q20/208Input by product or record sensing, e.g. weighing or scanner processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/22Payment schemes or models

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Finance (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Cash Registers Or Receiving Machines (AREA)

Abstract

The present application relates to an AOP based POS settlement method, apparatus, computer device, computer readable storage medium and computer program product. The POS settlement method based on the AOP comprises the following steps: acquiring settlement information required by bill receiving settlement; the settlement information comprises settlement data and exercise mode switch state data; extracting exercise mode switch state data in the settlement information, and judging whether the current exercise mode is in the exercise mode or not according to the exercise mode switch state data; if the user is not in the exercise mode, the steps of saving and uploading settlement data are executed, and a payment instruction is generated according to the settlement data; and if the current state is in the exercise mode, skipping the steps of saving and uploading settlement data, and generating a virtual payment instruction according to the settlement data. By adopting the method, the training requirement on new cashiers can be met on the premise of not influencing system data, and the application scene of the POS settlement method is favorably expanded.

Description

POS settlement method, device, computer equipment and medium based on AOP
Technical Field
The present application relates to the field of computer application technologies, and in particular, to a POS settlement method and apparatus based on AOP, a computer device, a computer-readable storage medium, and a computer program product.
Background
The POS, also called Point of sale information system, is a system that directly reads merchandise sales information (such as trade name, unit price, sales quantity, sales time, sales shop, purchasing customer, etc.) through an automatic reading device (such as cash register) when selling merchandise, and transmits the information to related departments through a communication network and a computer system for analysis and processing to improve the operation efficiency.
In the traditional POS settlement method, in the settlement process, each settlement data is correspondingly registered, settled and uploaded, so that on one hand, the consistence of the commodity inventory in the system and the actual inventory can be ensured, and on the other hand, the statistics and analysis of the sale condition of a user can be facilitated. Based on this, the traditional POS settlement method cannot be used for training new cashiers, and has a disadvantage that the application scenario is limited.
Disclosure of Invention
Based on this, it is necessary to provide a POS settlement method, an apparatus, a computer device, a computer-readable storage medium, and a computer program product based on AOP, which expand the application scenario of the POS settlement method, in view of the problem that the application scenario of the conventional POS settlement method is limited.
In a first aspect, the present application provides a POS settlement method based on AOP. The method comprises the following steps:
acquiring settlement information required by bill receiving settlement; the settlement information comprises settlement data and exercise mode switch state data;
extracting exercise mode switch state data in the settlement information, and judging whether the current exercise mode is in the exercise mode or not according to the exercise mode switch state data;
if the user is not in the exercise mode, the steps of saving and uploading the settlement data are executed, and a payment instruction is generated according to the settlement data;
and if the current state is in the exercise mode, skipping the steps of saving and uploading the settlement data, and generating a virtual payment instruction according to the settlement data.
In one embodiment, the acquiring settlement information required for settlement of the receipt includes:
acquiring a key value pair used for identifying the state of an exercise mode switch in an xml file, and determining exercise mode switch state data according to the key value pair;
and acquiring settlement data, and generating settlement information required by receipt calculation based on the settlement data and the exercise mode switch state data.
In one embodiment, before obtaining a key-value pair for identifying a state of an exercise mode switch in an xml file and determining exercise mode switch state data according to the key-value pair, the method includes:
and acquiring an exercise mode starting instruction, and correspondingly updating a key value pair used for identifying the exercise mode switch state in the xml file according to the exercise mode starting instruction.
In one embodiment, the extracting exercise mode switch state data in the settlement information includes:
and extracting a base class used for storing the exercise mode switch state data in the settlement information, and determining the exercise mode switch state data according to the base class.
In one embodiment, if the user is currently in the practice mode, after the step of saving and uploading the settlement data is skipped and a virtual payment instruction is generated according to the settlement data, the method further includes:
and receiving the virtual payment feedback information, and outputting prompt information according to the virtual payment feedback information.
In one embodiment, the prompt message includes payment completion information; after receiving the virtual payment feedback information and outputting the prompt information according to the virtual payment feedback information, the method further includes:
and generating a business document printing instruction according to the prompt information, and indicating a printer to print the business document.
In a second aspect, the present application provides an AOP-based POS settlement device. The device comprises:
the acquisition module is used for acquiring settlement information required by bill receiving settlement; the settlement information comprises settlement data and exercise mode switch state data;
the judging module is used for extracting exercise mode switch state data in the settlement information and judging whether the current exercise mode is in the exercise mode or not according to the exercise mode switch state data;
the settlement module is used for executing the steps of storing and uploading the settlement data and generating a payment instruction according to the settlement data if the judgment result of the judgment module is that the settlement module is not currently positioned in the practice module;
and the exercise module is used for skipping the steps of saving and uploading the settlement data if the judgment result of the judgment module is that the payment module is currently positioned, and generating a virtual payment instruction according to the settlement data.
In one embodiment, the obtaining module includes:
the device comprises an acquisition unit, a display unit and a display unit, wherein the acquisition unit is used for acquiring a key value pair used for identifying the state of an exercise mode switch in an xml file and determining exercise mode switch state data according to the key value pair; also used for obtaining settlement data;
and a generation unit for generating settlement information required for settlement calculation based on the settlement data and the exercise mode switch state data.
In one embodiment, the obtaining module further includes:
and the updating unit is used for acquiring the exercise mode starting instruction and correspondingly updating the key value pair used for identifying the exercise mode switch state in the xml file according to the exercise mode starting instruction.
In one embodiment, the determining module is specifically configured to: and extracting a base class used for storing the exercise mode switch state data in the settlement information, and determining the exercise mode switch state data according to the base class.
In one embodiment, the AOP-based POS settlement apparatus further includes:
and the prompt information receiving module is used for receiving the virtual payment feedback information and outputting prompt information according to the virtual payment feedback information.
In one embodiment, the prompt message includes payment completion information; the AOP-based POS settlement apparatus further comprises:
and the printing module is used for generating a business document printing instruction according to the prompt information and indicating a printer to print the business document.
In a third aspect, the present application also provides a computer device. The computer equipment comprises a memory and a processor, wherein the memory stores a computer program, and the computer program is obtained by programming based on the design idea of the AOP; the processor, when executing the computer program, implements the steps of:
acquiring settlement information required by bill receiving settlement; the settlement information comprises settlement data and exercise mode switch state data;
extracting exercise mode switch state data in the settlement information, and judging whether the current exercise mode is in the exercise mode or not according to the exercise mode switch state data;
if the user is not in the exercise mode, the steps of saving and uploading the settlement data are executed, and a payment instruction is generated according to the settlement data;
and if the current state is in the exercise mode, skipping the steps of saving and uploading the settlement data, and generating a virtual payment instruction according to the settlement data.
In a fourth aspect, the present application further provides a computer-readable storage medium. The computer readable storage medium, on which a computer program is stored, the computer program being programmed based on the design concept of the AOP; the computer program when executed by a processor implementing the steps of:
acquiring settlement information required by bill receiving settlement; the settlement information comprises settlement data and exercise mode switch state data;
extracting exercise mode switch state data in the settlement information, and judging whether the current exercise mode is in the exercise mode or not according to the exercise mode switch state data;
if the user is not in the exercise mode, the steps of saving and uploading the settlement data are executed, and a payment instruction is generated according to the settlement data;
and if the current state is in the exercise mode, skipping the steps of saving and uploading the settlement data, and generating a virtual payment instruction according to the settlement data.
In a fifth aspect, the present application further provides a computer program product. The computer program product comprises a computer program which is obtained by programming based on the design idea of the AOP; the computer program when executed by a processor implementing the steps of:
acquiring settlement information required by bill receiving settlement; the settlement information comprises settlement data and exercise mode switch state data;
extracting exercise mode switch state data in the settlement information, and judging whether the current exercise mode is in the exercise mode or not according to the exercise mode switch state data;
if the user is not in the exercise mode, the steps of saving and uploading the settlement data are executed, and a payment instruction is generated according to the settlement data;
and if the current state is in the exercise mode, skipping the steps of saving and uploading the settlement data, and generating a virtual payment instruction according to the settlement data.
The POS settlement method, the POS settlement device, the computer equipment, the computer readable storage medium and the computer program product based on the AOP adopt the design idea of section-oriented programming to isolate all parts of business logic, so that the coupling degree between all parts of the business logic is reduced. Specifically, by extracting the exercise mode switch state data in the settlement information and judging whether the current exercise mode is according to the exercise mode switch state data, if the current exercise mode is, skipping the step of storing and uploading the settlement data to generate a virtual payment instruction and complete virtual settlement, the training requirement on a new cashier can be met on the premise of not influencing system data, and the expansion of the application scene of the POS settlement method is facilitated.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments or the conventional technologies of the present application, the drawings used in the descriptions of the embodiments or the conventional technologies will be briefly introduced below, it is obvious that the drawings in the following descriptions are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a diagram illustrating an application scenario of the AOP-based POS settlement method according to an embodiment;
FIG. 2 is a flow chart of an AOP-based POS settlement method in one embodiment;
FIG. 3 is a schematic diagram of a user interface of an AOP-based POS settlement method in an embodiment;
FIG. 4 is a flow diagram of the generation of settlement information required for receipt calculations, in one embodiment;
FIG. 5 is a diagram illustrating a function menu interface of an AOP-based POS settlement method according to an embodiment;
FIG. 6 is a flowchart of an AOP-based POS settlement method in another embodiment;
FIG. 7 is a schematic diagram of a user interface of an AOP-based POS settlement method in another embodiment;
FIG. 8 is a schematic diagram illustrating the concept of section-oriented programming in one embodiment;
FIG. 9 is a flowchart of an AOP-based POS settlement method in still another embodiment;
FIG. 10 is a block diagram of an AOP-based POS settlement device in one embodiment;
FIG. 11 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
To facilitate an understanding of the present application, the present application will now be described more fully with reference to the accompanying drawings. Embodiments of the present application are set forth in the accompanying drawings. This application may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
Unless defined otherwise, 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 in the description of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application.
The POS settlement method based on AOP (Aspect organized Programming) provided in the embodiment of the present application may be applied to an application environment as shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The data storage system may store commodity inventory information and settlement information. The data storage system may be integrated on the server 104, or may be located on the cloud or other network server. The AOP is a section-oriented programming, and the coupling degree between service modules is reduced by introducing a public behavior to dispersed objects or services, so that each part of service logic can be isolated, the coupling degree between each part of the service logic is reduced, the reusability of a program is improved, and the efficiency of secondary development is improved. Specifically, in the present application, based on the idea of AOP, the exercise mode switch state data is introduced into the settlement information, and in the process of executing the POS settlement method by the terminal 102: acquiring settlement information required by bill receiving settlement; the settlement information comprises settlement data and exercise mode switch state data; extracting exercise mode switch state data in the settlement information, and judging whether the current exercise mode is in the exercise mode or not according to the exercise mode switch state data; if the user is not in the exercise mode, the steps of saving and uploading settlement data are executed, and a payment instruction is generated according to the settlement data; and if the current state is in the exercise mode, skipping the steps of saving and uploading settlement data, and generating a virtual payment instruction according to the settlement data. The terminal 102 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, internet of things devices, and portable wearable devices. The server 104 may be implemented as a stand-alone server or as a server cluster comprised of multiple servers.
In one embodiment, as shown in fig. 2, an AOP-based POS settlement method is provided, which is exemplified by the application of the method to the terminal 102. In this embodiment, the POS settlement method based on AOP includes steps S201 to S207.
In step S201, settlement information required for receipt settlement is acquired.
The settlement information includes settlement data and exercise mode switch state data. The settlement data specifically includes commodity sales information and customer information. The merchandise sales information includes, but is not limited to, a trade name, unit price, number of sales, time of sale, sales shop and cashier identification, etc. The customer information includes, but is not limited to, customer member account number and balance, etc. The exercise mode switch state data is state data for identifying whether the exercise mode is on.
It should be noted that, the client information (including but not limited to client device information, client personal information, etc.) and data (including but not limited to data for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party.
Specifically, the terminal may directly acquire settlement information required for receipt settlement from the code scanning terminal or the server, or may acquire settlement data, and generate settlement information required for receipt settlement based on the settlement data and the exercise mode switch state data. Further, the specific manner of acquiring the settlement data by the terminal is not unique, for example, the settlement data can be acquired from a code scanning terminal in a code scanning manner; as shown in fig. 3, the product information may be displayed on the user interface, and the cashier may click on the corresponding product on the user interface to transmit the settlement data to the terminal. The commodity information may be displayed in a classified manner, for example, in fig. 3, the commodity is classified into categories such as food, daily commodities, fresh food, and the like, and then displayed in different categories. Further, a commodity search service can be provided so as to quickly acquire commodity information.
Step S203, extracting the exercise mode switch state data in the settlement information, and judging whether the current exercise mode is in the exercise mode according to the exercise mode switch state data.
As described above, the exercise mode switch state data is state data for identifying whether the exercise mode is on. Based on the above, the terminal can extract the exercise mode switch state data in the settlement information and judge whether the terminal is in the exercise mode at present according to the exercise mode switch state data. For example, when the value of the exercise mode switch state data is a preset value, it is determined that the exercise mode is currently in the practice mode, or when the data format of the exercise mode switch state data is a preset format, it is determined that the exercise mode is currently in the practice mode.
Further, after judging whether the current mode is the practice mode or not, a judgment result can be output, so that a cashier can conveniently confirm the current mode in real time. As in FIG. 3, the left window of the user interface displays the "exercise mode" script when currently in the exercise mode. Wherein, the word of the 'practice mode' can be set as the watermark to avoid influencing other display contents in the window.
In addition, the specific way of extracting the exercise mode switch state data in the settlement information by the terminal is not unique, and for example, the exercise mode switch state data can be obtained by extracting the storage information in the corresponding field according to the field of the exercise mode switch state data in the settlement information.
In one embodiment, extracting exercise mode switch state data in settlement information comprises: and extracting a base class used for storing the exercise mode switch state data in the settlement information, and determining the exercise mode switch state data according to the base class.
Wherein, the base class refers to a class type defined to contain all entity commonalities in object-oriented design. Specifically, each data entity of the settlement information inherits a base class for storing exercise mode switch state data, and during settlement, the exercise mode switch state data stored in the base class of the data entity is extracted, and whether the data entity is in the exercise mode at present is judged according to the exercise mode switch state data.
And S205, if the user is not in the exercise mode at present, executing the steps of saving and uploading settlement data, and generating a payment instruction according to the settlement data.
It can be understood that if the current state is not in the practice mode, the current state is in the ordinary settlement state, the normal settlement step can be performed, the step of saving and uploading the settlement data is executed, and the payment instruction is generated according to the settlement data. The payment instruction is used for instructing a user to pay, and fund transfer occurs in the payment process. Further, the payment method includes mobile payment, cash payment or member deduction, and correspondingly, as shown in fig. 3, different areas on the user interface may be clicked according to different payment methods to perform settlement.
And step S207, if the user is in the exercise mode, skipping the step of saving and uploading settlement data, and generating a virtual payment instruction according to the settlement data.
If the payment terminal is in the exercise mode, the payment terminal is in the cash register exercise state, the settlement data does not need to be stored and uploaded, at the moment, the terminal skips the step of storing and uploading the settlement data, and a virtual payment instruction is directly generated according to the settlement data. Wherein the virtual payment instruction is used for instructing the user to make a virtual payment. In the virtual payment process, only payment actions are performed without actually transferring funds. In the practice mode, the cashier can simulate the user to make virtual payment in various ways, such as clicking a virtual payment completion option or scanning a two-dimensional code for virtual payment.
The POS settlement method based on the AOP adopts the design idea of section-oriented programming to isolate all parts of the business logic, so that the coupling degree between all parts of the business logic is reduced. On one hand, on the premise of not influencing system data, the training requirement on a new cashier can be met, and the expansion of the application scene of the POS settlement method is facilitated; on the other hand, due to the low coupling degree among all the parts of the business logic, the reusability of the program is improved, the efficiency of secondary development is further improved, and the development cost is reduced.
In one embodiment, as shown in fig. 4, acquiring settlement information required for settlement of a receipt includes step S402 and step S404.
Step S402, obtaining a key value pair used for identifying the state of the exercise mode switch in the xml file, and determining exercise mode switch state data according to the key value pair.
The xml is an EXtensible Markup Language (xml) used for marking electronic documents to have structure. An xml file is an xml-based data storage file. The xml file can be stored in a data storage module of the terminal or an external data storage system. In short, the present embodiment does not limit the specific storage location of the xml file. The key is located at the end of the chain of registry structures and, like the files of the file system, contains the actual configuration information and data used when the computer and application programs are currently executing.
Specifically, the exercise mode switch state data is stored in an xml file in a key value pair mode through the SharePreference, and the terminal determines the exercise mode switch state data by obtaining the key value pair used for identifying the exercise mode switch state in the xml file.
Step S404, acquiring settlement data, and generating settlement information required by the receipt settlement calculation based on the settlement data and the exercise mode switch state data.
For the manner of acquiring the settlement data, reference is made above, and details are not repeated here. Specifically, the terminal acquires settlement data and generates settlement information required for receipt calculation based on the settlement data and exercise mode switch state data according to a preset data arrangement mode and a preset data format.
In the embodiment, the exercise mode switch state data is stored in the xml file in a key-value pair mode through the SharePreference, on one hand, depending on the data persistence characteristic of the SharePreference, the exercise mode switch state cannot fail due to the restart of the app, and the use convenience is improved; on the other hand, the settlement system can be more light-weight, and data can be cleared at the same time during uninstallation without causing data residue.
In an embodiment, with continuing reference to fig. 4, before step S402, step S401 is further included: and acquiring an exercise mode starting instruction, and correspondingly updating the key value pair used for identifying the exercise mode switch state in the xml file according to the exercise mode starting instruction.
The method for the terminal to obtain the exercise mode starting instruction is not unique. As shown in fig. 5, the cashier may click on the "exercise mode" in the function menu interface and send an exercise mode start instruction to the terminal; the terminal can also automatically start the exercise mode to obtain an exercise mode starting instruction when the exercise duration is lower than the preset duration according to the exercise duration of the cashier corresponding to the cashier identification in the settlement information.
Specifically, the terminal acquires an exercise mode starting instruction, checks a key value pair used for identifying the exercise mode switch state in the xml file according to the exercise mode starting instruction, keeps the key value pair unchanged if the key value pair is consistent, and correspondingly updates the key value pair used for identifying the exercise mode switch state in the xml file if the key value pair is inconsistent.
Further, as shown in fig. 5, the POS system also supports various functions such as goods management, member management, statistics management, and sales management. The goods management comprises goods returning, goods changing, goods taking, goods delivery, stock inquiry, goods delivery bin switching and the like; member management includes newly added members, etc.; the statistical management comprises store collection and payment condition statistics, order management, shift knots, day knots and the like; sales management includes sales documents, business documents, and the like. And a message center is arranged to support various operations such as manual data synchronization, off-line work and the like.
In the above embodiment, before the terminal extracts the exercise mode switch state data, the exercise mode start instruction is acquired, and the key value pair for identifying the exercise mode switch state in the xml file is updated according to the exercise mode start instruction, so that the extracted exercise mode switch state data can be ensured to be the latest data, and the accuracy of the exercise mode switch state data can be improved.
In one embodiment, as shown in fig. 6, after step S207, step S208 is further included: and receiving the virtual payment feedback information, and outputting prompt information according to the virtual payment feedback information.
The virtual payment feedback information refers to feedback information received by the terminal after the user performs virtual payment. The virtual payment feedback information may specifically include a payment amount, a payment channel, and the like. Specifically, the terminal may output corresponding prompt information according to the virtual payment feedback information: as shown in fig. 7, when the payment amount is larger than the settlement amount, the change giving prompt information is output; when the code scanning payment is successful or the change is completed, payment completion information is output; and when the code scanning payment fails, outputting payment failure information. Further, when the prompt message is the payment completion message, the sales page can be automatically returned to perform the next settlement.
In one embodiment, the prompt message includes payment completion information, please continue to refer to fig. 6, in this embodiment, after step S208, step S209 is further included: and generating a business document printing instruction according to the prompt information, and indicating a printer to print the business document.
The specific content of the business document includes, but is not limited to, commodity sales information and customer information.
Further, when the mobile terminal is not in the practice mode at present, after the payment instruction is generated, the payment feedback information can be received, the corresponding prompt information is output according to the payment feedback information, and when the prompt information is payment completion information, a business document printing instruction is generated to instruct the printer to print the business document.
In the above embodiment, in practice mode, the settlement process simulation of the whole process is provided, so that a new cashier can be helped to quickly learn the whole settlement process, and the learning effect is improved.
For the sake of understanding, the AOP-based POS settlement method in the present application will be described in detail below with reference to fig. 8 and 9.
In the embodiment, under the software architecture of the android system, exercise mode switch state data is stored in an xml file in a key-value pair form through the SharePreference, wherein a default value of the exercise mode switch state data is a non-exercise mode. By virtue of the data persistence feature of SharePresence, exercise mode switch state data is not invalidated by a restart of a settlement system application (app). When the cashier starts the exercise mode at the app function menu page, the program will update the key-value pairs stored in the xml file to the exercise mode state.
Furthermore, the practice mode is not required to generate any data, which is mainly based on the idea of AOP, and common behaviors are introduced for dispersed objects or services, so that the coupling degree between service modules is reduced, and the later maintenance is easier. Specifically, according to the application, since the uploading data relates to interface calling, and the data entities transmitted by each interface are different, each settlement information data entity inherits a base class base request for storing the state of the exercise mode switch. Before uploading the data, taking out the exercise mode switch state data in the settlement information, and judging whether the current exercise mode is in the exercise mode according to the exercise mode switch state data. If the User is in the practice mode, the steps of storing and uploading data are skipped, the Interface calling successful logic in the common settlement mode is directly executed to interact with a User Interface (UI), for example, the sale completion prompt indicates that payment is successful, the page automatically returns to the sale page, and the printing of the business document is carried out.
It can be understood that if the current state is in a common settlement state, normal settlement steps are performed, the steps of saving and uploading settlement data are executed, the local database is updated, and a payment instruction is generated according to the settlement data to instruct the user to pay. And receiving payment feedback information, outputting corresponding prompt information according to the payment feedback information, and generating a business document printing instruction to instruct a printer to print the business document when the prompt information is payment completion information.
According to the POS settlement method based on the AOP, data is not stored and uploaded in the practice mode, and a new cashier can use various functions of the system at will under the condition that the new cashier is not familiar with software, so that on one hand, the training requirement on the new cashier can be met on the premise that system data is not influenced, and the application scene of the POS settlement method can be expanded; on the other hand, due to the low coupling degree among all the parts of the business logic, the reusability of the program is improved, the efficiency of secondary development is further improved, and the development cost is reduced.
It should be understood that, although the steps in the flowcharts related to the embodiments as described above are sequentially displayed as indicated by arrows, the steps are not necessarily performed sequentially as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a part of the steps in the flowcharts related to the embodiments described above may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the execution order of the steps or stages is not necessarily sequential, but may be rotated or alternated with other steps or at least a part of the steps or stages in other steps.
Based on the same inventive concept, the embodiment of the present application further provides an AOP-based POS settlement device for implementing the AOP-based POS settlement method mentioned above. The solution of the problem provided by the device is similar to the solution described in the above method, so the following specific limitations in one or more embodiments of the AOP-based POS settlement device may refer to the above limitations on the AOP-based POS settlement method, and will not be described herein again.
In one embodiment, as shown in fig. 10, there is provided an AOP-based POS settlement apparatus 1000 including an acquisition module 1001, a judgment module 1003, a settlement module 1005, and an exercise module 1007. Wherein:
an obtaining module 1001 configured to obtain settlement information required for bill receiving settlement; the settlement information comprises settlement data and exercise mode switch state data;
the judging module 1003 is configured to extract the exercise mode switch state data in the settlement information, and judge whether the current exercise mode is in the exercise mode according to the exercise mode switch state data;
a settlement module 1005, configured to, if the determination result of the determination module is that the training module is not currently located, execute the steps of saving and uploading settlement data, and generate a payment instruction according to the settlement data;
the practice module 1007 is configured to skip the step of saving and uploading the settlement data if the judgment result of the judgment module is that the module is currently located in the practice module, and generate a virtual payment instruction according to the settlement data.
In one embodiment, the obtaining module 1001 includes:
the acquisition unit is used for acquiring a key value pair used for identifying the state of the exercise mode switch in the xml file and determining exercise mode switch state data according to the key value pair; also used for obtaining settlement data;
and a generation unit for generating settlement information required for the receipt calculation based on the settlement data and the exercise mode switch state data.
In one embodiment, the obtaining module 1001 further includes:
and the updating unit is used for acquiring the exercise mode starting instruction and correspondingly updating the key value pair used for identifying the exercise mode switch state in the xml file according to the exercise mode starting instruction.
In an embodiment, the determining module 1003 is specifically configured to: and extracting a base class used for storing the exercise mode switch state data in the settlement information, and determining the exercise mode switch state data according to the base class.
In one embodiment, the AOP-based POS settlement apparatus further includes: and the prompt information receiving module is used for receiving the virtual payment feedback information and outputting prompt information according to the virtual payment feedback information.
In one embodiment, the prompt includes payment completion information; the AOP-based POS settlement apparatus further includes: and the printing module is used for generating a business document printing instruction according to the prompt information and indicating the printer to print the business document.
The respective modules in the above-described AOP-based POS settlement apparatus may be wholly or partially implemented by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 11. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement an AOP-based POS settlement method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 11 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having stored therein a computer program, the computer program being programmed based on design considerations of AOP; the processor, when executing the computer program, performs the steps of the above-described method embodiments.
In one embodiment, a computer-readable storage medium is provided that stores a computer program that is programmed based on design considerations of AOP; which when executed by a processor performs the steps in the above-described embodiments of the method.
In one embodiment, a computer program product is provided, comprising a computer program programmed based on design considerations of AOP; which when executed by a processor performs the steps in the above-described embodiments of the method.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high-density embedded nonvolatile Memory, resistive Random Access Memory (ReRAM), Magnetic Random Access Memory (MRAM), Ferroelectric Random Access Memory (FRAM), Phase Change Memory (PCM), graphene Memory, and the like. Volatile Memory can include Random Access Memory (RAM), external cache Memory, and the like. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others. The databases referred to in various embodiments provided herein may include at least one of relational and non-relational databases. The non-relational database may include, but is not limited to, a block chain based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, quantum computing based data processing logic devices, etc., without limitation.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A POS settlement method based on AOP is characterized by comprising the following steps:
acquiring settlement information required by bill receiving settlement; the settlement information comprises settlement data and exercise mode switch state data;
extracting exercise mode switch state data in the settlement information, and judging whether the current exercise mode is in the exercise mode or not according to the exercise mode switch state data;
if the user is not in the exercise mode, the steps of saving and uploading the settlement data are executed, and a payment instruction is generated according to the settlement data;
and if the current state is in the exercise mode, skipping the steps of saving and uploading the settlement data, and generating a virtual payment instruction according to the settlement data.
2. The method of claim 1, wherein the obtaining settlement information required for settlement of the receipt comprises:
acquiring a key value pair used for identifying the state of an exercise mode switch in an xml file, and determining exercise mode switch state data according to the key value pair;
and acquiring settlement data, and generating settlement information required by receipt calculation based on the settlement data and the exercise mode switch state data.
3. The method of claim 2, wherein prior to obtaining key-value pairs in the xml file identifying exercise mode switch states and determining exercise mode switch state data from the key-value pairs, comprising:
and acquiring an exercise mode starting instruction, and correspondingly updating a key value pair used for identifying the exercise mode switch state in the xml file according to the exercise mode starting instruction.
4. The method according to any one of claims 1 to 3, wherein the extracting of the exercise mode switch state data in the settlement information comprises:
and extracting a base class used for storing the exercise mode switch state data in the settlement information, and determining the exercise mode switch state data according to the base class.
5. The method according to any one of claims 1 to 3, wherein the step of saving and uploading the settlement data is skipped if the current practice mode is in, and after generating the virtual payment instruction according to the settlement data, the method further comprises:
and receiving the virtual payment feedback information, and outputting prompt information according to the virtual payment feedback information.
6. The method of claim 5, wherein the prompt message comprises a payment completion message; after receiving the virtual payment feedback information and outputting the prompt information according to the virtual payment feedback information, the method further includes:
and generating a business document printing instruction according to the prompt information, and indicating a printer to print the business document.
7. An AOP-based POS settlement apparatus, comprising:
the acquisition module is used for acquiring settlement information required by bill receiving settlement; the settlement information comprises settlement data and exercise mode switch state data;
the judging module is used for extracting exercise mode switch state data in the settlement information and judging whether the current exercise mode is in the exercise mode or not according to the exercise mode switch state data;
the settlement module is used for executing the steps of storing and uploading the settlement data and generating a payment instruction according to the settlement data if the judgment result of the judgment module is that the settlement module is not currently positioned in the practice module;
and the exercise module is used for skipping the steps of saving and uploading the settlement data if the judgment result of the judgment module is that the payment module is currently positioned, and generating a virtual payment instruction according to the settlement data.
8. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the computer program is programmed based on design philosophy of AOP; the processor realizes the steps of the contactless IC card data processing method according to any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium having stored thereon a computer program, wherein the computer program is programmed based on design philosophy of AOP; the computer program, when executed by a processor, implements the steps of the contactless IC card data processing method of any one of claims 1 to 6.
10. A computer program product comprising a computer program, wherein the computer program is programmed based on design philosophy of AOP; the computer program, when executed by a processor, implementing the steps of the method of any one of claims 1 to 6.
CN202111487003.9A 2021-12-07 2021-12-07 POS settlement method, device, computer equipment and medium based on AOP Pending CN114219471A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111487003.9A CN114219471A (en) 2021-12-07 2021-12-07 POS settlement method, device, computer equipment and medium based on AOP

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111487003.9A CN114219471A (en) 2021-12-07 2021-12-07 POS settlement method, device, computer equipment and medium based on AOP

Publications (1)

Publication Number Publication Date
CN114219471A true CN114219471A (en) 2022-03-22

Family

ID=80700087

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111487003.9A Pending CN114219471A (en) 2021-12-07 2021-12-07 POS settlement method, device, computer equipment and medium based on AOP

Country Status (1)

Country Link
CN (1) CN114219471A (en)

Similar Documents

Publication Publication Date Title
US8676653B2 (en) Use of optical images to authenticate and enable a return with an electronic receipt
CN104412225A (en) Identification of host-compatible downloadable applications
CN101324946A (en) Method and system for managing receipts
CN107632869B (en) Method and equipment for loading user interface of POS application
US10540634B1 (en) Version recall for computerized database management
US10607204B2 (en) Support messages based on merchant account context
JP2021180043A (en) Electronic receipt system, settlement device, sales promotion receipt server, and information processing program
JP5728630B1 (en) Information processing apparatus, information processing method, program, and storage medium
CN109255581A (en) For providing the method and device thereof of personalized ventilation system based on Email
JP2023064840A (en) Application program, settlement system, and information processing method
US10832307B1 (en) Systems for analyzing and updating data structures
CN108346095B (en) Management and control method, device and equipment of combined system and computer readable storage medium
JP7500841B2 (en) Information management system, information management method, and computer program
CN109711918A (en) Shop on net opens up method, apparatus, equipment and readable storage medium storing program for executing
JP6725923B2 (en) Information processing method, information processing apparatus, and program
CN114219471A (en) POS settlement method, device, computer equipment and medium based on AOP
US11126985B1 (en) Integrating functionality across multiple applications
CN114676359A (en) Form display method and device, computer equipment and storage medium
CN113609423A (en) Task configuration method and device, storage medium and computer equipment
US20180308156A1 (en) Server device and service method
JP7136836B2 (en) Information processing method, information processing device and program
CN114168033B (en) Information display method, information processing method and equipment
US20220180387A1 (en) Information processing apparatus, information processing system, and information processing method
KR102538248B1 (en) Apparatus and method for managing special exhibitions provided through a plurality of open markets
JP6921267B2 (en) Sales data processing equipment, programs and electronic receipt systems

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination