WO2018149112A1 - Information computation method, terminal, and non-volatile readable storage medium - Google Patents

Information computation method, terminal, and non-volatile readable storage medium Download PDF

Info

Publication number
WO2018149112A1
WO2018149112A1 PCT/CN2017/099744 CN2017099744W WO2018149112A1 WO 2018149112 A1 WO2018149112 A1 WO 2018149112A1 CN 2017099744 W CN2017099744 W CN 2017099744W WO 2018149112 A1 WO2018149112 A1 WO 2018149112A1
Authority
WO
WIPO (PCT)
Prior art keywords
statistical
interface
intermediate layer
file
hardware module
Prior art date
Application number
PCT/CN2017/099744
Other languages
French (fr)
Chinese (zh)
Inventor
周爱平
王日英
任家乐
Original Assignee
百富计算机技术(深圳)有限公司
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 百富计算机技术(深圳)有限公司 filed Critical 百富计算机技术(深圳)有限公司
Publication of WO2018149112A1 publication Critical patent/WO2018149112A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • G06F8/22Procedural
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2462Approximate or statistical queries

Definitions

  • the present application relates to the field of information processing technologies, and in particular, to an information statistics method, a terminal, and a non-volatile readable storage medium.
  • the payment terminal can complete operations such as card reading, PIN (personal identification number) input, data encryption and decryption, and prompt information display, thereby implementing the application of the payment function.
  • PIN personal identification number
  • an information statistical method a terminal, and a non-volatile readable storage medium are provided.
  • An information statistical method including:
  • the processing information of each hardware module is calculated by the intermediate layer according to a preset configuration file, and a statistical file is generated.
  • a terminal comprising a memory and a processor, the memory storing computer executable instructions, the computer executable instructions being executed by the processor, causing the processor to perform the following steps:
  • the processing information of each hardware module is calculated by the intermediate layer according to a preset configuration file, and a statistical file is generated.
  • One or more non-volatile readable storage media storing computer-executable instructions, when executed by one or more processors, cause the one or more processors to perform the following steps:
  • the processing information of each hardware module is calculated by the intermediate layer according to a preset configuration file, and a statistical file is generated.
  • Figure 1 is a block diagram of a terminal in an embodiment
  • FIG. 2 is a schematic diagram of an internal system architecture of a terminal for an information statistical method in an embodiment.
  • 3 is a flow chart of an information statistics method in an embodiment
  • FIG. 5 is a flowchart of processing information of each hardware module by an intermediate layer in an embodiment
  • FIG. 6 is a flowchart of processing information of each hardware module by an intermediate layer in another embodiment
  • Figure 8 is a block diagram of an information statistical device in an embodiment
  • Figure 9 is a block diagram of an information statistical device in another embodiment.
  • Figure 10 is a block diagram of a statistical module in one embodiment
  • Figure 11 is a block diagram of a statistical module in another embodiment
  • Figure 12 is a block diagram of an information statistical device in still another embodiment.
  • Figure 1 is a block diagram of a terminal in one embodiment.
  • the terminal includes a processor connected through a system bus, a non-volatile storage medium, an internal memory, a data transmission interface, a display screen, and an input device.
  • the memory of the terminal includes a non-volatile storage medium and an internal memory, wherein the non-volatile storage medium of the terminal stores an operating system and computer-executable instructions, which are executed by the processor to implement the embodiment of the present application.
  • the processor is used to provide computing and control capabilities to support the operation of the entire terminal.
  • the internal memory in the terminal provides an environment for the operation of computer executable instructions in a non-volatile storage medium.
  • the data transmission interface is used for communication with other computer devices, and may be a USB (Universal Serial Bus) interface, a network interface, etc., such as connecting to a PC (personal computer) through a USB interface, and transmitting payment data, etc. .
  • the display screen of the terminal may be a liquid crystal display or an electronic ink display screen, and the input device may be a touch layer covered on the display screen, or may be a button provided on the terminal housing.
  • the terminal may be a payment terminal or the like.
  • FIG. 1 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the terminal to which the solution of the present application is applied.
  • the terminal may include a ratio. More or fewer components are shown in the figures, or some components are combined, or have different component arrangements.
  • FIG. 2 is a schematic diagram of an internal system architecture of a terminal for an information statistical method in an embodiment.
  • an application layer 110 invokes the intermediate interface provided by the intermediate layer 120 through each application in the application layer 110.
  • the terminal invokes the corresponding hardware module interface in the system layer 130 through the intermediate interface of the intermediate layer 120, and processes the matching hardware module according to the hardware module interface through the system layer 130.
  • the terminal acquires processing information of the matched hardware module returned by the system layer through the intermediate interface of the intermediate layer 120, and sends the processing information to the message team.
  • the terminal reads the processing information of each hardware module from the message queue through the statistics module of the intermediate layer 120, and then collects the processing information of each hardware module according to the preset configuration file through the statistics module of the intermediate layer 120, and generates a statistical file.
  • an information statistics method is provided, which is applicable to the terminal shown in FIG. 1, and includes the following steps:
  • Step S310 the intermediate interface provided by the middle layer is called by the application layer.
  • the terminal may be a payment terminal, and the payment terminal may include a POS machine, a MPOS (simple POS) machine, a wireless POS machine, etc., and the payment terminal may pass through the USB.
  • the interface, the RS232 serial port, and the wireless network interface are connected with other intelligent terminals to implement the payment function.
  • the payment terminal opens an application in the application layer for use, the application invokes a hardware module interface provided by the system layer of the payment terminal, so that the system layer calls the corresponding hardware module for processing, for example, the user.
  • the payment terminal needs to print the relevant payment voucher, and the payment application in the payment terminal can call the printing module interface of the system layer, and then print the printing module of the payment terminal through the system layer.
  • an intermediate layer may be established between an application layer and a system layer of the payment terminal, and the middle layer provides an intermediate interface corresponding to each hardware module interface to the application layer, and preprocesses the intermediate interface to make the payment terminal
  • the hardware module interface is called by the application of the application layer
  • the intermediate interface provided by the corresponding intermediate layer is called.
  • step S310 the following steps are further included:
  • Step S402 respectively defining an intermediate interface corresponding to each hardware module interface.
  • the intermediate interface corresponding to each hardware module interface may be separately defined according to a preset manner, including defining a function name of the intermediate interface, a function content of the intermediate interface, and the like.
  • the function name of the intermediate interface can be similar to the function name of the corresponding hardware module interface. For example, if the function name of the hardware module interface is FUN_A, the function name of the corresponding intermediate interface is defined as _FUN_A, but is not limited thereto.
  • the function content of the intermediate interface can be defined at the same time, including calling the corresponding hardware module interface, and obtaining the system layer return. Processing information of the hardware module, etc.
  • Step S404 performing macro definition on each hardware module interface and the corresponding intermediate interface in the header file.
  • the program usually consists of header files and definition files.
  • the header file is used as a carrier file containing function functions and data interface declarations. It is mainly used to save the declaration of the program, and the definition file is used to save the program.
  • the intermediate interface defined with each hardware module can be written into the corresponding definition file. Macro definitions can be made in the header file for each hardware module interface and the corresponding intermediate interface.
  • the macro is defined as one of the preprocessing methods, and can also be called macro replacement.
  • the format is generally: #define identifier string, for example , #define Pi 3.1415926, which means that all Pis appearing in the program are replaced by 3.1415926.
  • a macro definition is performed on each hardware module interface and a corresponding intermediate interface, and the format may be: an intermediate interface corresponding to the #define hardware module interface, for example, #define FUN_A_FUN_A, that is, replacing the FUN_A in the system. Is _FUN_A.
  • the function name of the intermediate interface of the middle layer can be defined as the function name of the corresponding hardware module interface, so that the function name of the intermediate interface is consistent with the function name of the corresponding hardware module interface.
  • the middle layer is constructed for each hardware.
  • the usage statistics of the module do not need to be changed at all, and there is no need to re-consume resources for application development.
  • Step S320 calling the corresponding hardware module interface in the system layer through the intermediate interface, so that the system layer calls the matched hardware module to process according to the hardware module interface.
  • the payment terminal can call the intermediate interface provided by the middle layer through the application layer, and can execute the function content of the intermediate interface, and invoke the hardware module interface corresponding to the intermediate interface in the system layer through the intermediate interface.
  • the system layer can call the corresponding hardware module according to the hardware module interface called by the intermediate interface, wherein the hardware module can include a card reading and writing module, a PIN input module, a printing module, a MODEM module, and a WIFI (Wireless-Fidelity, wireless fidelity). Module, Ethernet module, etc., but not limited to this.
  • Step S330 obtaining processing information of the matched hardware module returned by the system layer through the intermediate interface, and sending the processing information to the message queue.
  • the payment terminal can obtain the processing information of the hardware module returned by the system layer through the intermediate interface, and the processing information can include the interface number and the processing return value, and each hardware module interface has its unique corresponding The interface number, the interface number can be composed of one or more of letters, numbers, and symbols.
  • the processing return value is used to indicate the processing result of the system layer calling the corresponding hardware module for processing.
  • Different hardware modules may include different processing results.
  • the processing result of the MODEM module may include MODEM receiving success, MODEM receiving failure, and MODEM receiving timeout, etc., but is not limited thereto, and different processing results may correspond to different processing return values.
  • the application A of the application layer of the payment terminal needs to call the card reading and writing module to read the card information, and the application A directly calls the card reading and writing module interface FUN_A, thereby calling the intermediate interface provided by the middle layer corresponding to the card reading and writing module interface FUN_A.
  • _FUN_A in the intermediate interface _FUN_A, call the card read/write module interface FUN_A of the system layer.
  • the system layer calls the corresponding card reading and writing module to read and write the card according to the called card reading and writing module interface FUN_A, and the intermediate interface _FUN_A can obtain the processing information of the card reading and writing module returned by the system layer, and the processing information can include card reading and writing.
  • the interface number corresponding to the module interface is 0x0101, and the processing returns a value of 0.
  • the processing return value of 0 indicates that the card is successfully read and written.
  • Step S340 the processing information of each hardware module is read from the message queue through the intermediate layer.
  • the processing information can be sent to the message queue through the intermediate interface, that is, when the application layer of the application layer calls the intermediate interface, the intermediate interface
  • the processing information of the corresponding hardware module is sent to the message queue.
  • the processing information of the plurality of hardware modules is stored in the message queue, and the payment terminal can read the processing information of one or more hardware modules from the message queue through the statistics module of the middle layer, and perform statistics.
  • Step S350 the processing information of each hardware module is calculated according to the preset configuration file by the intermediate layer, and a statistical file is generated.
  • the configuration file can be pre-configured according to the actual statistical requirements.
  • the configuration file can contain information such as the statistical name, interface number, and judgment conditions.
  • the statistics name is used to indicate the statistics items. For example, the number of MODEM reception successes, MODEM reception failure times, etc.
  • the interface number is used to indicate the hardware module interface of the hardware module for which statistics are required.
  • the hardware module required for statistics is the MODEM module, and the interface number of the corresponding MODEM module interface is 0x0201; the judgment condition refers to the statistics corresponding to the statistical items. Conditions are counted only when the judgment condition is met. After the payment module reads the processing information of each hardware module from the message queue through the statistics module of the middle layer, the processing information of each hardware module can be counted one by one according to the preset configuration file, and the statistical result is written into the statistical file.
  • the payment terminal collects the processing information of each hardware module of the payment terminal through the intermediate layer, and separates each application program in the application layer from the statistical information, and the application program does not need to have a statistical function, and does not need to consume a large amount of resources in the early stage. Conduct application development.
  • the above information statistics method calls the intermediate interface provided by the middle layer through the application layer, and calls the corresponding hardware module interface in the system layer through the intermediate interface, so that the system layer processes the matched hardware module according to the hardware module interface, and returns to the intermediate interface.
  • the processing information of the matched hardware module is sent to the message queue through the intermediate interface, and the processing information of each hardware module is read from the message queue through the intermediate layer, and the processing information of each hardware module is calculated according to the preset configuration file. And generate a statistical file, which can flexibly count the usage of each hardware module of the payment terminal, and the statistical method is simple, and does not need to consume a large amount of resources for application development.
  • step S350 collects processing information of each hardware module according to a preset configuration file by using an intermediate layer, and generates a statistical file, including the following steps:
  • Step S502 obtaining, by using an intermediate layer, a configuration item in a preset configuration file.
  • the configuration file may include one or more configuration items, and each configuration item includes information such as a statistical name, an interface number, and a judgment condition. You can set the content of each configuration item in the configuration file according to the actual statistical requirements.
  • the file format of the configuration file can be as shown in Table 1:
  • the file format of the configuration file is not limited thereto, and may be other file formats, for example, storing configuration items in the form of configuration parameters, or the configuration item includes a statistical item number, a function name, a judgment condition, and the like. information.
  • Step S504 comparing the processed processing information of each hardware module with the configuration item through the intermediate layer.
  • the processing module compares each processing information with each configuration item in the configuration file.
  • the payment terminal can compare the interface number included in the processing information with the interface number in each configuration item through the statistics module of the middle layer to determine whether there is a configuration item matching the interface number included in the processing information.
  • the number of the interface included in a piece of processing information is 0x0101. According to Table 1, it can be determined that there are two configuration items matching the interface number 0x0101.
  • the statistical names are the number of card read/write successes and the number of card read/write failures.
  • Step S506 it is determined by the intermediate layer whether there is a configuration item matching the interface number included in the read processing information, and if yes, step S508 is performed, and if no, step S504 is performed.
  • the payment terminal can compare the processing information of the next hardware module with each configuration item in the configuration file through the statistics module of the middle layer.
  • Step S508 the intermediate layer determines whether the processing return value included in the processed processing information meets the matching condition of the matching configuration item. If yes, step S510 is performed, and if no, step S504 is performed.
  • the terminal may determine, by the statistic module of the middle layer, whether the processing return value included in the processing information meets the matching condition of the matching configuration item, and if yes, update the statistical number corresponding to the statistical name of the configuration item that meets the determining condition.
  • the processing information includes an interface number of 0x0101 and a processing return value of 0.
  • the payment terminal can update the number of statistics corresponding to the number of successful card reading and writing through the statistics module of the middle layer.
  • Step S510 the statistics of the statistical names of the configuration items that meet the judgment condition are updated by the intermediate layer.
  • the processing information of each hardware module is calculated by the intermediate layer according to the preset configuration file, and the usage of each hardware module of the payment terminal can be flexibly counted according to the actual needs of the user, and the statistical manner is simple.
  • step S350 collects processing information of each hardware module according to a preset configuration file by using an intermediate layer, and generates a statistical file, and further includes steps (a) and (b):
  • the payment terminal can generate a statistical file every preset time through the statistics module of the middle layer, and the preset time can be set according to the actual needs of the user, for example, one month, one week, one day, and the like.
  • you can name the generated statistical file according to the preset time and the time when the statistical file is generated. For example, if a statistical file is generated every month, the statistical file can be named according to the generated year and month.
  • the payment terminal can initialize the statistic times corresponding to the statistic names included in the configuration file to the statistic file.
  • the user can specify the statistic time period according to the actual requirements. For example, the number of successful MODEM receptions per day is counted, and the number of successful MODEM receptions per week is counted.
  • the statistics of the statistics are initialized into the statistics file.
  • all the statistics are 0 according to the preset format.
  • the hardware is used.
  • the processing information of the module is counted, it is automatically updated.
  • step S510 updates the statistical number of the statistical names of the configuration items that meet the determination condition by the intermediate layer, including the following steps:
  • Step S602 obtaining, by the intermediate layer, a statistical name of the configuration item that meets the determination condition and a time for performing the comparison.
  • the payment terminal determines whether the processing return value included in the processing information of the hardware module meets the judgment condition in the configuration item matching the interface number included in the processing information through the statistics module of the middle layer, and if yes, obtains the matching through the statistics module of the middle layer.
  • the statistical name of the configuration item that determines the condition and the time at which the processing information is compared.
  • step S604 the intermediate layer obtains the matching statistics number from the statistical file according to the statistical name of the configuration item that meets the determination condition and the time for performing the comparison.
  • the payment terminal can obtain the corresponding statistical file through the statistics module of the middle layer, and then according to the statistical name of the configuration item that meets the judgment condition and the time when the processing information is compared, the corresponding statistical file is used. Get the number of statistics for the match.
  • the payment terminal generates a statistical file every one month through the statistics module of the middle layer, and the user specifies the processing information of the hardware module of the daily, and the statistical name of the configuration item that meets the judgment condition is the number of successful receptions of the MODEM, and the comparison time is performed.
  • step S606 the number of matched statistics is incremented by one and then rewritten into the statistical file.
  • the statistic module of the middle layer After the statistic module of the middle layer obtains the statistic name of the configuration item that meets the judgment condition and the statistic number of the matching time, the statistic module can add the statistic number to the corresponding statistic file.
  • the statistical file can be used to store the statistical result of the processing information of each hardware module, and the statistical time period can be flexibly set, and the statistical data query can be conveniently performed.
  • the foregoing information statistics method further includes the following steps:
  • Step S702 sending a statistical information query request to the middle layer through the application layer.
  • the payment terminal may send a statistical information query request to the statistics module of the middle layer by calling the statistical data query interface provided by the middle layer through each application in the application layer.
  • Step S704 obtaining, by the intermediate layer, the statistical name and the query time of the query according to the statistical information query request.
  • the payment terminal receives the statistical information query request sent by the application of the application layer through the statistics module of the middle layer, and can obtain the statistical name of the required query and the query time of the required query.
  • Step S706 Obtain a statistical number corresponding to the statistical name of the query and the query time from the statistical file through the intermediate layer, and return to the application layer.
  • the payment module can obtain the corresponding statistical file according to the query time through the statistics module of the middle layer, and obtain the statistical number matching the queryed statistical name and the query time from the statistical file, and return the obtained statistics count to the application layer.
  • the payment terminal may send a statistical information query request to the middle layer through the application A of the application layer to query the number of successful card reading and writing on December 3, 2016, and the statistics module of the middle layer may be based on the query time on December 3, 2016.
  • the user shows the number of statistics.
  • the statistical information of the required hardware modules can be easily obtained, which is convenient and quick.
  • the above information statistics module can be applied to the payment terminal in addition to the payment terminal.
  • Its terminal such as a smart phone, a tablet, etc., is not limited to the payment terminal described above.
  • an information statistics apparatus including: an intermediate interface calling module 810 , a system interface calling module 820 , a processing information acquiring module 830 , a reading module 840 , and a statistics module 850 .
  • the intermediate interface invoking module 810 is configured to invoke an intermediate interface provided by the intermediate layer through the application layer.
  • the system interface invoking module 820 is configured to invoke a corresponding hardware module interface in the system layer through the intermediate interface, so that the system layer processes the matched hardware module according to the hardware module interface for processing.
  • the processing information obtaining module 830 is configured to acquire processing information of the matched hardware module returned by the system layer through the intermediate interface, and send the processing information to the message queue.
  • the reading module 840 is configured to read processing information of each hardware module from the message queue through the intermediate layer.
  • the statistics module 850 is configured to collect, by using an intermediate layer, processing information of each hardware module according to a preset configuration file, and generate a statistical file.
  • the information statistics device calls the intermediate interface provided by the middle layer through the application layer, and calls the corresponding hardware module interface in the system layer through the intermediate interface, so that the system layer processes the matched hardware module according to the hardware module interface, and returns to the intermediate interface.
  • the processing information of the matched hardware module is sent to the message queue through the intermediate interface, and the processing information of each hardware module is read from the message queue through the intermediate layer, and the processing information of each hardware module is calculated according to the preset configuration file. And generate a statistical file, which can flexibly count the usage of each hardware module of the payment terminal, and the statistical method is simple, and does not need to consume a large amount of resources for application development.
  • the information statistics device includes a middle interface call module 810, a system interface call module 820, a process information acquisition module 830, a read module 840, and a statistics module 850, and includes a definition module. 860 and macro definition module 870.
  • the definition module 860 is configured to respectively define an intermediate interface corresponding to each hardware module interface.
  • the macro definition module 870 is configured to perform macro definition on each hardware module interface and the corresponding intermediate interface in the header file.
  • the intermediate interface provided by the middle layer when invoked through the application layer, the interface mode of the hardware module directly calling the system layer in the traditional manner is consistent, and the application is installed for each application installed by the payment terminal.
  • the intermediate layer does not need to make any changes to the usage statistics of each hardware module, and does not need to re-consume resources for application development.
  • the processing information includes an interface number and a processing return value.
  • the statistics module 850 includes a configuration item acquisition unit 1002, a comparison unit 1004, a determination unit 1006, and an update unit 1008.
  • the configuration item obtaining unit 1002 is configured to obtain, by using an intermediate layer, a configuration item in a preset configuration file, where the configuration item includes a statistical name, an interface number, and a determination condition.
  • the comparison unit 1004 is configured to compare the processing information of each read hardware module with the configuration item through the intermediate layer.
  • the determining unit 1006 is configured to determine, by the intermediate layer, whether the processing return value included in the read processing information meets the matching configuration item if there is a configuration item that matches the interface number included in the read processing information. condition.
  • the updating unit 1008 is configured to update, by the intermediate layer, the number of statistics corresponding to the statistical name of the configuration item that meets the determination condition, if the processing return value included in the processed processing information meets the determination condition of the matching configuration item.
  • the processing information of each hardware module is calculated by the intermediate layer according to the preset configuration file, and the usage of each hardware module of the payment terminal can be flexibly counted according to the actual needs of the user, and the statistical manner is simple.
  • the foregoing statistics module includes a configuration unit acquisition unit 1002, a comparison unit 1004, a determination unit 1006, and an update unit 1008, and a generation unit 1010 and an initialization unit 1012.
  • the generating unit 1010 is configured to generate a statistical file by the intermediate layer every preset time.
  • the initializing unit 1012 is configured to initialize, by the intermediate layer, a statistical number corresponding to each statistical name included in the configuration file to the statistical file according to a preset format.
  • the update unit 1008 includes an acquisition subunit 1102 and a write subunit 1104.
  • the obtaining sub-unit 1102 is configured to obtain, by the intermediate layer, a statistical name of the configuration item that meets the determining condition and a time for performing the comparison.
  • the obtaining sub-unit 1102 is further configured to obtain, by the intermediate layer, the number of matching statistics from the statistical file according to the statistical name of the configuration item that meets the judgment condition and the time for performing the comparison.
  • the writing subunit 1104 is configured to add one of the matching statistics to the statistical file and rewrite it into the statistical file.
  • the statistical file can be used to store the statistical result of the processing information of each hardware module, and the statistical time period can be flexibly set, and the statistical data query can be conveniently performed.
  • the information statistics device includes an intermediate interface calling module 810, a system interface calling module 820, a processing information acquiring module 830, a reading module 840, a statistics module 850, a definition module 860, and
  • the macro definition module 870 further includes a sending module 880, a query information acquiring module 890, and a returning module 900.
  • the sending module 880 is configured to send a statistical information query request to the middle layer through the application layer.
  • the query information obtaining module 890 is configured to obtain the statistical name and the query time of the query according to the statistical information query request by the intermediate layer.
  • the returning module 900 is configured to obtain, by using an intermediate layer, a statistical number corresponding to the statistical name of the query and the query time from the statistical file, and return to the application layer.
  • the statistical information of the required hardware modules can be easily obtained, which is convenient and quick.
  • Each of the above-described information statistical devices may be implemented in whole or in part by software, hardware, or a combination thereof.
  • the updating unit 1008 may update the statistical number corresponding to the statistical name of the configuration item that meets the determination condition by using the processor of the terminal, where the processor may be a central processing unit (CPU), a microprocessor, or the like.
  • the above modules may be embedded in the hardware of the terminal or may be stored in the memory of the terminal in the form of software, so that the processor can call the corresponding operations of the above modules.
  • a terminal in one embodiment, includes a memory and a processor having stored therein computer executable instructions that, when executed by the processor, cause the processor to perform the statistical methods described above.
  • one or more non-volatile readable storage media storing computer-executable instructions are provided that, when executed by one or more processors, implement the statistical methods described above.
  • the storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Probability & Statistics with Applications (AREA)
  • General Physics & Mathematics (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Telephonic Communication Services (AREA)
  • Debugging And Monitoring (AREA)

Abstract

An information computation method comprises: calling, by means of an application tier, a middle interface provided by a middle tier; calling, by means of the middle interface, a corresponding hardware module interface in a system tier, such that the system tier calls, according to the hardware module interface, a corresponding hardware module to perform processing; acquiring, by means of the middle interface, processing information of the corresponding hardware module returned by the system tier, and transmitting the processing information to a message queue; reading, from the message queue, and by means of the middle tier, processing information of respective hardware modules; and performing, by means of the middle tier, and according to a preset configuration file, computation on the processing information of the respective hardware modules, and generating a resulting computation file.

Description

信息统计方法、终端及非易失性可读存储介质Information statistics method, terminal and non-volatile readable storage medium
相关申请的交叉引用Cross-reference to related applications
本申请要求于2017年2月14日提交中国专利局、申请号为201710079132.1、发明名称为“信息统计方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims the priority of the Chinese Patent Application, filed on Feb. 14, 2017, the entire disclosure of which is hereby incorporated by reference.
技术领域Technical field
本申请涉及信息处理技术领域,特别是涉及一种信息统计方法、终端及非易失性可读存储介质。The present application relates to the field of information processing technologies, and in particular, to an information statistics method, a terminal, and a non-volatile readable storage medium.
背景技术Background technique
随着互联网技术的快速发展,市面上出现了越来越多便于使用的支付终端(POS,Point Of Sale),可将支付终端与手机、平板电脑等智能设备连接进行数据传输。支付终端可完成卡片读取、PIN(personal identification number,个人标识号)输入、数据加解密、提示信息显示等操作,从而实现支付功能的应用。With the rapid development of Internet technology, more and more convenient payment terminals (POS, Point Of Sale) appear on the market, and the payment terminals can be connected with smart devices such as mobile phones and tablet computers for data transmission. The payment terminal can complete operations such as card reading, PIN (personal identification number) input, data encryption and decryption, and prompt information display, thereby implementing the application of the payment function.
现今越来越多使用支付终端的商家需要获知支付终端上各硬件模块的使用情况,例如MODEM(调制解调器)通讯成功的次数、非接触式卡片检测成功的次数等,从而准确了解到支付终端当前所处的各种状态。在传统的方式中,是由支付终端上运行的各个应用对各硬件模块的使用情况进行统计,各应用调用硬件模块进行使用后,由支付终端系统向应用返回处理结果,再由应用对处理结果进行统计,支付终端上的每个应用都需具备统计各硬件模块使用情况的功能,前期开发消耗资源大,且统计方式复杂。Nowadays, more and more merchants using payment terminals need to know the usage of each hardware module on the payment terminal, such as the number of successful MODEM (modem) communication and the number of successful contactless card detection, so as to accurately know the current payment terminal. Various states. In the conventional manner, the usage of each hardware module is counted by each application running on the payment terminal. After each application invokes the hardware module for use, the payment terminal system returns the processing result to the application, and then the application processes the result. For statistics, each application on the payment terminal needs to have the function of counting the usage of each hardware module. The early development consumes a large amount of resources and the statistical method is complicated.
发明内容 Summary of the invention
根据本申请的各种实施例,提供一种信息统计方法、终端及非易失性可读存储介质。According to various embodiments of the present application, an information statistical method, a terminal, and a non-volatile readable storage medium are provided.
一种信息统计方法,包括:An information statistical method, including:
通过应用层调用中间层提供的中间接口;Calling the intermediate interface provided by the middle layer through the application layer;
通过所述中间接口调用系统层中对应的硬件模块接口,以使所述系统层根据所述硬件模块接口调用匹配的硬件模块进行处理;Calling, by the intermediate interface, a corresponding hardware module interface in the system layer, so that the system layer processes the matched hardware module according to the hardware module interface;
通过所述中间接口获取所述系统层返回的所述匹配的硬件模块的处理信息,并将所述处理信息发送至消息队列;Acquiring processing information of the matched hardware module returned by the system layer by using the intermediate interface, and sending the processing information to a message queue;
通过所述中间层从所述消息队列中读取各个硬件模块的处理信息;及Reading, by the intermediate layer, processing information of each hardware module from the message queue; and
通过所述中间层根据预设的配置文件统计所述各个硬件模块的处理信息,并生成统计文件。The processing information of each hardware module is calculated by the intermediate layer according to a preset configuration file, and a statistical file is generated.
一种终端,包括存储器和处理器,所述存储器中储存有计算机可执行指令,所述计算机可执行指令被所述处理器执行时,使得所述处理器执行以下步骤:A terminal comprising a memory and a processor, the memory storing computer executable instructions, the computer executable instructions being executed by the processor, causing the processor to perform the following steps:
通过应用层调用中间层提供的中间接口;Calling the intermediate interface provided by the middle layer through the application layer;
通过所述中间接口调用系统层中对应的硬件模块接口,以使所述系统层根据所述硬件模块接口调用匹配的硬件模块进行处理;Calling, by the intermediate interface, a corresponding hardware module interface in the system layer, so that the system layer processes the matched hardware module according to the hardware module interface;
通过所述中间接口获取所述系统层返回的所述匹配的硬件模块的处理信息,并将所述处理信息发送至消息队列;Acquiring processing information of the matched hardware module returned by the system layer by using the intermediate interface, and sending the processing information to a message queue;
通过所述中间层从所述消息队列中读取各个硬件模块的处理信息;及Reading, by the intermediate layer, processing information of each hardware module from the message queue; and
通过所述中间层根据预设的配置文件统计所述各个硬件模块的处理信息,并生成统计文件。The processing information of each hardware module is calculated by the intermediate layer according to a preset configuration file, and a statistical file is generated.
一个或多个存储有计算机可执行指令的非易失性可读存储介质,所述计算机可执行指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:One or more non-volatile readable storage media storing computer-executable instructions, when executed by one or more processors, cause the one or more processors to perform the following steps:
通过应用层调用中间层提供的中间接口;Calling the intermediate interface provided by the middle layer through the application layer;
通过所述中间接口调用系统层中对应的硬件模块接口,以使所述系统层 根据所述硬件模块接口调用匹配的硬件模块进行处理;Calling a corresponding hardware module interface in the system layer through the intermediate interface, so that the system layer Processing the matched hardware module according to the hardware module interface;
通过所述中间接口获取所述系统层返回的所述匹配的硬件模块的处理信息,并将所述处理信息发送至消息队列;Acquiring processing information of the matched hardware module returned by the system layer by using the intermediate interface, and sending the processing information to a message queue;
通过所述中间层从所述消息队列中读取各个硬件模块的处理信息;及Reading, by the intermediate layer, processing information of each hardware module from the message queue; and
通过所述中间层根据预设的配置文件统计所述各个硬件模块的处理信息,并生成统计文件。The processing information of each hardware module is calculated by the intermediate layer according to a preset configuration file, and a statistical file is generated.
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征、目的和优点将从说明书、附图以及权利要求书变得明显。Details of one or more embodiments of the present application are set forth in the accompanying drawings and description below. Other features, objects, and advantages of the invention will be apparent from the description and appended claims.
附图说明DRAWINGS
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings to be used in the embodiments or the prior art description will be briefly described below. Obviously, the drawings in the following description are only It is a certain embodiment of the present application, and other drawings can be obtained according to the drawings without any creative work for those skilled in the art.
图1为一个实施例中终端的框图;Figure 1 is a block diagram of a terminal in an embodiment;
图2为一个实施例中信息统计方法的终端内部系统架构图。FIG. 2 is a schematic diagram of an internal system architecture of a terminal for an information statistical method in an embodiment.
图3为一个实施例中信息统计方法的流程图;3 is a flow chart of an information statistics method in an embodiment;
图4为一个实施例中定义中间接口的流程图;4 is a flow chart showing an intermediate interface in an embodiment;
图5为一个实施例中通过中间层统计各个硬件模块的处理信息的流程图;FIG. 5 is a flowchart of processing information of each hardware module by an intermediate layer in an embodiment; FIG.
图6为另一个实施例中通过中间层统计各个硬件模块的处理信息的流程图;6 is a flowchart of processing information of each hardware module by an intermediate layer in another embodiment;
图7为一个实施例中查询统计信息的流程图;7 is a flow chart of querying statistical information in an embodiment;
图8为一个实施例中信息统计装置的框图;Figure 8 is a block diagram of an information statistical device in an embodiment;
图9为另一个实施例中信息统计装置的框图;Figure 9 is a block diagram of an information statistical device in another embodiment;
图10为一个实施例中统计模块的框图;Figure 10 is a block diagram of a statistical module in one embodiment;
图11为另一个实施例中统计模块的框图; Figure 11 is a block diagram of a statistical module in another embodiment;
图12为又一个实施例中信息统计装置的框图。Figure 12 is a block diagram of an information statistical device in still another embodiment.
具体实施方式detailed description
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。In order to make the objects, technical solutions, and advantages of the present application more comprehensible, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the application and are not intended to be limiting.
图1为一个实施例中终端的框图。如图1所示,该终端包括通过系统总线连接的处理器、非易失性存储介质、内存储器、数据传输接口、显示屏和输入装置。终端的存储器包括非易失性存储介质及内存储器,其中,终端的非易失性存储介质存储有操作系统及计算机可执行指令,该计算机可执行指令被处理器执行时以实现本申请实施例中提供的一种信息统计方法。该处理器用于提供计算和控制能力,支撑整个终端的运行。终端中的内存储器为非易失性存储介质中的计算机可执行指令的运行提供环境。数据传输接口用于与其它计算机设备进行通信,可以是USB(Universal Serial Bus,通用串行总线)接口、网络接口等,如通过USB接口与PC(personal computer,个人计算机)连接,传输支付数据等。终端的显示屏可以是液晶显示屏或者电子墨水显示屏等,输入装置可以是显示屏上覆盖的触摸层,也可以是终端外壳上设置的按键等。在本实施例中,该终端可以是支付终端等。本领域技术人员可以理解,图1中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的终端的限定,具体地终端可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Figure 1 is a block diagram of a terminal in one embodiment. As shown in FIG. 1, the terminal includes a processor connected through a system bus, a non-volatile storage medium, an internal memory, a data transmission interface, a display screen, and an input device. The memory of the terminal includes a non-volatile storage medium and an internal memory, wherein the non-volatile storage medium of the terminal stores an operating system and computer-executable instructions, which are executed by the processor to implement the embodiment of the present application. An information statistical method provided in the article. The processor is used to provide computing and control capabilities to support the operation of the entire terminal. The internal memory in the terminal provides an environment for the operation of computer executable instructions in a non-volatile storage medium. The data transmission interface is used for communication with other computer devices, and may be a USB (Universal Serial Bus) interface, a network interface, etc., such as connecting to a PC (personal computer) through a USB interface, and transmitting payment data, etc. . The display screen of the terminal may be a liquid crystal display or an electronic ink display screen, and the input device may be a touch layer covered on the display screen, or may be a button provided on the terminal housing. In this embodiment, the terminal may be a payment terminal or the like. A person skilled in the art can understand that the structure shown in FIG. 1 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the terminal to which the solution of the present application is applied. Specifically, the terminal may include a ratio. More or fewer components are shown in the figures, or some components are combined, or have different component arrangements.
图2为一个实施例中信息统计方法的终端内部系统架构图。在终端的操作系统中,包含应用层110、中间层120及系统层130。终端通过应用层110中的各个应用调用中间层120提供的中间接口。终端通过中间层120的中间接口调用系统层130中对应的硬件模块接口,并通过系统层130根据该硬件模块接口调用匹配的硬件模块进行处理。终端通过中间层120的中间接口获取系统层返回的该匹配的硬件模块的处理信息,并将处理信息发送至消息队 列。终端通过中间层120的统计模块从消息队列中读取各个硬件模块的处理信息,再通过中间层120的统计模块根据预设的配置文件统计各个硬件模块的处理信息,并生成统计文件。FIG. 2 is a schematic diagram of an internal system architecture of a terminal for an information statistical method in an embodiment. In the operating system of the terminal, an application layer 110, an intermediate layer 120, and a system layer 130 are included. The terminal invokes the intermediate interface provided by the intermediate layer 120 through each application in the application layer 110. The terminal invokes the corresponding hardware module interface in the system layer 130 through the intermediate interface of the intermediate layer 120, and processes the matching hardware module according to the hardware module interface through the system layer 130. The terminal acquires processing information of the matched hardware module returned by the system layer through the intermediate interface of the intermediate layer 120, and sends the processing information to the message team. Column. The terminal reads the processing information of each hardware module from the message queue through the statistics module of the intermediate layer 120, and then collects the processing information of each hardware module according to the preset configuration file through the statistics module of the intermediate layer 120, and generates a statistical file.
如图3所示,在一个实施例中,提供一种信息统计方法,可适用于如图1所示的终端,包括以下步骤:As shown in FIG. 3, in an embodiment, an information statistics method is provided, which is applicable to the terminal shown in FIG. 1, and includes the following steps:
步骤S310,通过应用层调用中间层提供的中间接口。Step S310, the intermediate interface provided by the middle layer is called by the application layer.
终端的应用层中安装有各种应用程序,其中,在本实施例中,终端可以是支付终端,支付终端可包括POS机、MPOS(简易POS)机、无线POS机等,支付终端可通过USB接口、RS232串口、无线网络接口等与其它的智能终端进行连接,从而实现支付功能。在传统的方式中,当支付终端打开应用层中的应用程序进行使用时,应用程序会调用支付终端的系统层提供的硬件模块接口,从而使系统层调用相应的硬件模块进行处理,例如,用户使用支付终端进行支付后,支付终端需要打印相关的支付凭证,则支付终端中的支付应用可调用系统层的打印模块接口,再通过系统层调用支付终端的打印模块进行打印。Various applications are installed in the application layer of the terminal. In this embodiment, the terminal may be a payment terminal, and the payment terminal may include a POS machine, a MPOS (simple POS) machine, a wireless POS machine, etc., and the payment terminal may pass through the USB. The interface, the RS232 serial port, and the wireless network interface are connected with other intelligent terminals to implement the payment function. In the conventional manner, when the payment terminal opens an application in the application layer for use, the application invokes a hardware module interface provided by the system layer of the payment terminal, so that the system layer calls the corresponding hardware module for processing, for example, the user. After the payment is made by the payment terminal, the payment terminal needs to print the relevant payment voucher, and the payment application in the payment terminal can call the printing module interface of the system layer, and then print the printing module of the payment terminal through the system layer.
在一个实施例中,可在支付终端的应用层及系统层之间构建中间层,中间层向应用层提供分别与各硬件模块接口对应的中间接口,并对中间接口进行预处理,使得支付终端通过应用层的应用程序调用各硬件模块接口时,会调用到对应的中间层提供的中间接口。In an embodiment, an intermediate layer may be established between an application layer and a system layer of the payment terminal, and the middle layer provides an intermediate interface corresponding to each hardware module interface to the application layer, and preprocesses the intermediate interface to make the payment terminal When the hardware module interface is called by the application of the application layer, the intermediate interface provided by the corresponding intermediate layer is called.
如图4所示,在一个实施例中,在步骤S310之前,还包括以下步骤:As shown in FIG. 4, in an embodiment, before step S310, the following steps are further included:
步骤S402,分别定义与各个硬件模块接口对应的中间接口。Step S402, respectively defining an intermediate interface corresponding to each hardware module interface.
可按照预设方式分别定义与各个硬件模块接口对应的中间接口,包括,定义中间接口的函数名称、中间接口的函数内容等。中间接口的函数名称可与对应的硬件模块接口的函数名称类似,例如,硬件模块接口的函数名称为FUN_A,则定义对应的中间接口的函数名称为_FUN_A,但不限于此。可同时定义中间接口的函数内容包括调用对应的硬件模块接口、获取系统层返回 的硬件模块的处理信息等。The intermediate interface corresponding to each hardware module interface may be separately defined according to a preset manner, including defining a function name of the intermediate interface, a function content of the intermediate interface, and the like. The function name of the intermediate interface can be similar to the function name of the corresponding hardware module interface. For example, if the function name of the hardware module interface is FUN_A, the function name of the corresponding intermediate interface is defined as _FUN_A, but is not limited thereto. The function content of the intermediate interface can be defined at the same time, including calling the corresponding hardware module interface, and obtaining the system layer return. Processing information of the hardware module, etc.
步骤S404,在头文件中对各个硬件模块接口与对应的中间接口进行宏定义。Step S404, performing macro definition on each hardware module interface and the corresponding intermediate interface in the header file.
程序通常可由头文件(header files)及定义文件(definition files)组成,头文件作为一种包含功能函数、数据接口声明的载体文件,主要用于保存程序的声明,而定义文件用于保存程序的实现,在本实施例中,定义的与各个硬件模块接口的中间接口即可写入对应的定义文件中。可在头文件中对各个硬件模块接口与对应的中间接口进行宏定义,宏定义为预处理方式中的一种,也可称为宏替换,其格式一般为:#define标识符字符串,例如,#define Pi 3.1415926,即表示将程序中出现的Pi全部替换成3.1415926。The program usually consists of header files and definition files. The header file is used as a carrier file containing function functions and data interface declarations. It is mainly used to save the declaration of the program, and the definition file is used to save the program. In this embodiment, the intermediate interface defined with each hardware module can be written into the corresponding definition file. Macro definitions can be made in the header file for each hardware module interface and the corresponding intermediate interface. The macro is defined as one of the preprocessing methods, and can also be called macro replacement. The format is generally: #define identifier string, for example , #define Pi 3.1415926, which means that all Pis appearing in the program are replaced by 3.1415926.
在一个实施例中,对各个硬件模块接口与对应的中间接口进行宏定义,其格式可为:#define硬件模块接口对应的中间接口,例如,#define FUN_A _FUN_A,即表示将系统中的FUN_A替换为_FUN_A。通过宏定义的方式,可将中间层的中间接口的函数名称定义为对应的硬件模块接口的函数名称,使中间接口的函数名称与对应的硬件模块接口的函数名称一致。当支付终端应用层中的应用程序调用中间层提供的中间接口时,与传统方式中直接调用系统层的硬件模块接口方式一致,对支付终端安装的各应用程序而言,构建中间层进行各硬件模块的使用情况统计完全不需要做出任何改动,无需重新消耗资源进行应用程序开发。In an embodiment, a macro definition is performed on each hardware module interface and a corresponding intermediate interface, and the format may be: an intermediate interface corresponding to the #define hardware module interface, for example, #define FUN_A_FUN_A, that is, replacing the FUN_A in the system. Is _FUN_A. By means of macro definition, the function name of the intermediate interface of the middle layer can be defined as the function name of the corresponding hardware module interface, so that the function name of the intermediate interface is consistent with the function name of the corresponding hardware module interface. When the application in the application layer of the payment terminal calls the intermediate interface provided by the middle layer, it is consistent with the way of directly calling the hardware module of the system layer in the traditional manner, and for each application installed by the payment terminal, the middle layer is constructed for each hardware. The usage statistics of the module do not need to be changed at all, and there is no need to re-consume resources for application development.
步骤S320,通过中间接口调用系统层中对应的硬件模块接口,以使系统层根据硬件模块接口调用匹配的硬件模块进行处理。Step S320, calling the corresponding hardware module interface in the system layer through the intermediate interface, so that the system layer calls the matched hardware module to process according to the hardware module interface.
支付终端通过应用层调用中间层提供的中间接口,可执行中间接口的函数内容,通过中间接口调用系统层中与该中间接口对应的硬件模块接口。系统层可根据中间接口调用的硬件模块接口,调用相应的硬件模块进行处理,其中,硬件模块可包括卡片读写模块、PIN输入模块、打印模块、MODEM模块、WIFI(Wireless-Fidelity,无线保真)模块、以太网模块等,但不限于此。 The payment terminal can call the intermediate interface provided by the middle layer through the application layer, and can execute the function content of the intermediate interface, and invoke the hardware module interface corresponding to the intermediate interface in the system layer through the intermediate interface. The system layer can call the corresponding hardware module according to the hardware module interface called by the intermediate interface, wherein the hardware module can include a card reading and writing module, a PIN input module, a printing module, a MODEM module, and a WIFI (Wireless-Fidelity, wireless fidelity). Module, Ethernet module, etc., but not limited to this.
步骤S330,通过中间接口获取系统层返回的匹配的硬件模块的处理信息,并将处理信息发送至消息队列。Step S330, obtaining processing information of the matched hardware module returned by the system layer through the intermediate interface, and sending the processing information to the message queue.
系统层调用相应的硬件模块进行处理后,支付终端可通过中间接口获取系统层返回的硬件模块的处理信息,处理信息可包括接口编号及处理返回值,每个硬件模块接口均有其唯一对应的接口编号,接口编号可由字母、数字及符号等中的一种或多种组成,处理返回值则用于表示系统层调用相应的硬件模块进行处理的处理结果。不同的硬件模块可能包含不同的处理结果,例如,MODEM模块的处理结果可包括MODEM接收成功、MODEM接收失败及MODEM接收超时等,但不限于此,不同的处理结果可对应不同的处理返回值。After the system layer calls the corresponding hardware module for processing, the payment terminal can obtain the processing information of the hardware module returned by the system layer through the intermediate interface, and the processing information can include the interface number and the processing return value, and each hardware module interface has its unique corresponding The interface number, the interface number can be composed of one or more of letters, numbers, and symbols. The processing return value is used to indicate the processing result of the system layer calling the corresponding hardware module for processing. Different hardware modules may include different processing results. For example, the processing result of the MODEM module may include MODEM receiving success, MODEM receiving failure, and MODEM receiving timeout, etc., but is not limited thereto, and different processing results may correspond to different processing return values.
例如,支付终端的应用层的应用A需调用卡片读写模块读取卡片信息,则应用A直接调用卡片读写模块接口FUN_A,从而调用中间层提供的与卡片读写模块接口FUN_A对应的中间接口_FUN_A,在该中间接口_FUN_A中再调用系统层的卡片读写模块接口FUN_A。系统层根据调用的卡片读写模块接口FUN_A调用相应的卡片读写模块进行卡片读写,中间接口_FUN_A可获取系统层返回的卡片读写模块的处理信息,该处理信息中可包括卡片读写模块接口对应的接口编号0x0101,及处理返回值0,其中,处理返回值0表示卡片读写成功。For example, the application A of the application layer of the payment terminal needs to call the card reading and writing module to read the card information, and the application A directly calls the card reading and writing module interface FUN_A, thereby calling the intermediate interface provided by the middle layer corresponding to the card reading and writing module interface FUN_A. _FUN_A, in the intermediate interface _FUN_A, call the card read/write module interface FUN_A of the system layer. The system layer calls the corresponding card reading and writing module to read and write the card according to the called card reading and writing module interface FUN_A, and the intermediate interface _FUN_A can obtain the processing information of the card reading and writing module returned by the system layer, and the processing information can include card reading and writing. The interface number corresponding to the module interface is 0x0101, and the processing returns a value of 0. The processing return value of 0 indicates that the card is successfully read and written.
步骤S340,通过中间层从消息队列中读取各个硬件模块的处理信息。Step S340, the processing information of each hardware module is read from the message queue through the intermediate layer.
支付终端通过中间层的中间接口获取系统层返回的硬件模块的处理信息后,可通过中间接口将处理信息发送至消息队列中,也即,当应用层的应用程序每调用一次中间接口,中间接口均会将相应的硬件模块的处理信息发送至消息队列中。消息队列中存储有多条硬件模块的处理信息,支付终端可通过中间层的统计模块从消息队列中一次性读取一条或多条硬件模块的处理信息,并进行统计。After the payment terminal obtains the processing information of the hardware module returned by the system layer through the intermediate interface of the middle layer, the processing information can be sent to the message queue through the intermediate interface, that is, when the application layer of the application layer calls the intermediate interface, the intermediate interface The processing information of the corresponding hardware module is sent to the message queue. The processing information of the plurality of hardware modules is stored in the message queue, and the payment terminal can read the processing information of one or more hardware modules from the message queue through the statistics module of the middle layer, and perform statistics.
步骤S350,通过中间层根据预设的配置文件统计各个硬件模块的处理信息,并生成统计文件。 Step S350, the processing information of each hardware module is calculated according to the preset configuration file by the intermediate layer, and a statistical file is generated.
用户可根据实际的统计需求预先设置配置文件,配置文件中可包含统计名称、接口编号及判断条件等信息,其中,统计名称用于表示统计项目,例如,MODEM接收成功次数、MODEM接收失败次数等;接口编号用于表示所需统计的硬件模块的硬件模块接口,例如,所需统计的硬件模块为MODEM模块,对应的MODEM模块接口的接口编号为0x0201;判断条件指的是统计项目对应的统计条件,只有当满足判断条件时才会被统计。支付终端通过中间层的统计模块从消息队列中读取各硬件模块的处理信息后,可根据预设的配置文件逐一统计各硬件模块的处理信息,并将统计结果写入统计文件中。The configuration file can be pre-configured according to the actual statistical requirements. The configuration file can contain information such as the statistical name, interface number, and judgment conditions. The statistics name is used to indicate the statistics items. For example, the number of MODEM reception successes, MODEM reception failure times, etc. The interface number is used to indicate the hardware module interface of the hardware module for which statistics are required. For example, the hardware module required for statistics is the MODEM module, and the interface number of the corresponding MODEM module interface is 0x0201; the judgment condition refers to the statistics corresponding to the statistical items. Conditions are counted only when the judgment condition is met. After the payment module reads the processing information of each hardware module from the message queue through the statistics module of the middle layer, the processing information of each hardware module can be counted one by one according to the preset configuration file, and the statistical result is written into the statistical file.
在本实施例中,支付终端通过中间层对支付终端的各个硬件模块的处理信息进行统计,将应用层中的各应用程序与统计信息进行分离,应用程序无需具备统计功能,前期无需消耗大量资源进行应用开发。In this embodiment, the payment terminal collects the processing information of each hardware module of the payment terminal through the intermediate layer, and separates each application program in the application layer from the statistical information, and the application program does not need to have a statistical function, and does not need to consume a large amount of resources in the early stage. Conduct application development.
上述信息统计方法,通过应用层调用中间层提供的中间接口,通过中间接口调用系统层中对应的硬件模块接口,以使系统层根据硬件模块接口调用匹配的硬件模块进行处理,并向中间接口返回该匹配的硬件模块的处理信息,通过中间接口将处理信息发送至消息队列,通过中间层从消息队列中读取各个硬件模块的处理信息,再根据预设的配置文件统计各个硬件模块的处理信息,并生成统计文件,能够灵活统计支付终端各硬件模块的使用情况,统计方式简单,且无需消耗大量资源进行应用开发。The above information statistics method calls the intermediate interface provided by the middle layer through the application layer, and calls the corresponding hardware module interface in the system layer through the intermediate interface, so that the system layer processes the matched hardware module according to the hardware module interface, and returns to the intermediate interface. The processing information of the matched hardware module is sent to the message queue through the intermediate interface, and the processing information of each hardware module is read from the message queue through the intermediate layer, and the processing information of each hardware module is calculated according to the preset configuration file. And generate a statistical file, which can flexibly count the usage of each hardware module of the payment terminal, and the statistical method is simple, and does not need to consume a large amount of resources for application development.
如图5所示,在一个实施例中,步骤S350通过中间层根据预设的配置文件统计各个硬件模块的处理信息,并生成统计文件,包括以下步骤:As shown in FIG. 5, in an embodiment, step S350 collects processing information of each hardware module according to a preset configuration file by using an intermediate layer, and generates a statistical file, including the following steps:
步骤S502,通过中间层获取预设的配置文件中的配置项。Step S502, obtaining, by using an intermediate layer, a configuration item in a preset configuration file.
在一个实施例中,配置文件中可包含一条或多条配置项,每条配置项均包括统计名称、接口编号及判断条件等信息。用户可根据实际的统计需求设置配置文件中各条配置项的内容。配置文件的文件格式可如表1所示:In one embodiment, the configuration file may include one or more configuration items, and each configuration item includes information such as a statistical name, an interface number, and a judgment condition. You can set the content of each configuration item in the configuration file according to the actual statistical requirements. The file format of the configuration file can be as shown in Table 1:
表1Table 1
统计名称Statistical name 接口编号Interface number 判断条件Analyzing conditions
卡片读写成功次数Card read and write success times 0x01010x0101 ==0==0
卡片读写失败次数Card read and write failures 0x01010x0101 !=[0,-2903]! =[0,-2903]
MODEM接收成功次数MODEM reception success times 0x02010x0201 >0>0
MODEM接收失败次数MODEM reception failure times 0x02010x0201 <0<0
MODEM接收超时次数MODEM reception timeout 0x02010x0201 ==0==0
……...... ……...... ……......
其中,判断条件指的是处理信息中的处理返回值所需满足的条件,例如,==0表示只有当处理返回值需等于0才代表卡片读写成功。可以理解地,配置文件的文件格式并不限于此,还可为其它文件格式,例如,以配置参数的形式存储配置项,或是配置项中包含的是统计项目编号、函数名称、判断条件等信息。The judgment condition refers to a condition that needs to be satisfied in processing the return value in the information. For example, ==0 means that the card read and write success is successful only when the processing return value needs to be equal to 0. It can be understood that the file format of the configuration file is not limited thereto, and may be other file formats, for example, storing configuration items in the form of configuration parameters, or the configuration item includes a statistical item number, a function name, a judgment condition, and the like. information.
步骤S504,通过中间层将读取的各个硬件模块的处理信息与配置项进行比对。Step S504, comparing the processed processing information of each hardware module with the configuration item through the intermediate layer.
支付终端通过中间层的统计模块从消息队列中读取各个硬件模块的处理信息后,可通过统计模块将每条处理信息与配置文件中的各条配置项进行比对。支付终端可通过中间层的统计模块将处理信息中包含的接口编号与各条配置项中的接口编号进行比较,判断是否有与处理信息中包含的接口编号匹配的配置项。例如,某条处理信息包含的接口编号为0x0101,根据表1,可判断存在两条与该接口编号0x0101匹配的配置项,统计名称分别为卡片读写成功次数及卡片读写失败次数。After the payment module reads the processing information of each hardware module from the message queue through the statistics module of the middle layer, the processing module compares each processing information with each configuration item in the configuration file. The payment terminal can compare the interface number included in the processing information with the interface number in each configuration item through the statistics module of the middle layer to determine whether there is a configuration item matching the interface number included in the processing information. For example, the number of the interface included in a piece of processing information is 0x0101. According to Table 1, it can be determined that there are two configuration items matching the interface number 0x0101. The statistical names are the number of card read/write successes and the number of card read/write failures.
步骤S506,通过中间层判断是否存在读取的处理信息中包含的接口编号匹配的配置项,若是,则执行步骤S508,若否,则执行步骤S504。Step S506, it is determined by the intermediate layer whether there is a configuration item matching the interface number included in the read processing information, and if yes, step S508 is performed, and if no, step S504 is performed.
若配置文件中不存在与处理信息中包含的接口编号匹配的配置项,则支付终端可通过中间层的统计模块将下一条硬件模块的处理信息与配置文件中的各条配置项进行比对。If there is no configuration item matching the interface number included in the processing information, the payment terminal can compare the processing information of the next hardware module with each configuration item in the configuration file through the statistics module of the middle layer.
步骤S508,通过中间层判断读取的处理信息中包含的处理返回值是否符合匹配的配置项的判断条件,若是,则执行步骤S510,若否,则执行步骤S504。Step S508, the intermediate layer determines whether the processing return value included in the processed processing information meets the matching condition of the matching configuration item. If yes, step S510 is performed, and if no, step S504 is performed.
若配置文件中存在与处理信息中包含的接口编号匹配的配置项,则支付 终端可通过中间层的统计模块判断处理信息中包含的处理返回值是否符合匹配的配置项的判断条件,若符合,则更新该符合判断条件的配置项的统计名称对应的统计次数。例如,某条处理信息包含的接口编号为0x0101,处理返回值为0,根据表1,可判断存在两条与该接口编号0x0101匹配的配置项,其中,处理返回值符合第一条配置项的判断条件==0,不符合第二条配置项的判断条件!=[0,-2903],则支付终端可通过中间层的统计模块更新与卡片读写成功次数对应的统计次数。If there is a configuration item in the configuration file that matches the interface number included in the processing information, payment is made. The terminal may determine, by the statistic module of the middle layer, whether the processing return value included in the processing information meets the matching condition of the matching configuration item, and if yes, update the statistical number corresponding to the statistical name of the configuration item that meets the determining condition. For example, the processing information includes an interface number of 0x0101 and a processing return value of 0. According to Table 1, it can be determined that there are two configuration items matching the interface number 0x0101, where the processing return value conforms to the first configuration item. Judgment condition = =0, does not meet the judgment condition of the second configuration item! =[0, -2903], the payment terminal can update the number of statistics corresponding to the number of successful card reading and writing through the statistics module of the middle layer.
步骤S510,通过中间层更新符合判断条件的配置项的统计名称的统计次数。Step S510, the statistics of the statistical names of the configuration items that meet the judgment condition are updated by the intermediate layer.
在本实施例中,可通过中间层根据预设的配置文件统计各个硬件模块的处理信息,能够根据用户的实际需求灵活统计支付终端各硬件模块的使用情况,且统计方式简单。In this embodiment, the processing information of each hardware module is calculated by the intermediate layer according to the preset configuration file, and the usage of each hardware module of the payment terminal can be flexibly counted according to the actual needs of the user, and the statistical manner is simple.
在一个实施例中,步骤S350通过中间层根据预设的配置文件统计各个硬件模块的处理信息,并生成统计文件,还包括步骤(a)和步骤(b):In an embodiment, step S350 collects processing information of each hardware module according to a preset configuration file by using an intermediate layer, and generates a statistical file, and further includes steps (a) and (b):
步骤(a):通过中间层每隔预设时间生成统计文件。Step (a): Generate a statistical file every predetermined time through the intermediate layer.
支付终端可通过中间层的统计模块每隔预设时间生成统计文件,预设时间可根据用户的实际需求进行设定,例如可以是1个月、1星期、1天等。生成统计文件时,可根据预设时间及生成统计文件的时间对生成的统计文件进行命名,例如,每个月生成统计文件,则统计文件可按照生成的年份、月份进行命名。The payment terminal can generate a statistical file every preset time through the statistics module of the middle layer, and the preset time can be set according to the actual needs of the user, for example, one month, one week, one day, and the like. When generating a statistical file, you can name the generated statistical file according to the preset time and the time when the statistical file is generated. For example, if a statistical file is generated every month, the statistical file can be named according to the generated year and month.
步骤(b):通过中间层按照预设格式将与配置文件中包含的各个统计名称对应的统计次数初始化写入统计文件。Step (b): Initializing, by the intermediate layer, the number of statistics corresponding to each statistical name included in the configuration file into the statistical file according to a preset format.
支付终端通过中间层的统计模块生成统计文件后,可按照预设格式将与配置文件中包含的各个统计名称对应的统计次数初始化写入统计文件中,用户可根据实际需求指定统计的时间段,例如,指定统计每天的MODEM接收成功次数、统计每星期的MODEM接收成功次数等。预设格式可为“[统计名称]:统计的时间段序号=统计次数”,但并不限于此。在一个实施例中,统计 的时间段与生成统计文件的预设时间可以相同,也可以不同。例如,支付终端通过中间层的统计模块每个月生成一个统计文件,而用户需要统计该月内每天的MODEM接收成功次数,则统计文件中的格式可为[MODEM接收成功次数]:天数序号=统计次数,或是用户需要统计该月内每星期的MODEM接收成功次数,则统计文件中的格式可为[MODEM接收成功次数]:星期序号=统计次数。After the statistic file is generated by the statistic module of the middle layer, the payment terminal can initialize the statistic times corresponding to the statistic names included in the configuration file to the statistic file. The user can specify the statistic time period according to the actual requirements. For example, the number of successful MODEM receptions per day is counted, and the number of successful MODEM receptions per week is counted. The preset format may be "[statistic name]: statistical time period number = number of statistics", but is not limited thereto. In one embodiment, statistics The time period may be the same as or different from the preset time for generating the statistical file. For example, the payment terminal generates a statistical file every month through the statistics module of the middle layer, and the user needs to count the number of successful MODEM receptions in the month, and the format in the statistical file may be [MODEM reception success number]: the number of days = The number of statistics, or the user needs to count the number of successful MODEM receptions per week during the month, the format in the statistics file can be [MODEM Receive Success Times]: Week Number = Statistics Number.
将各个统计名称对应的统计次数初始化写入统计文件中,指的是生成统计文件时,按照预设格式,令所有的统计次数均为0,当支付终端开始通过中间层的统计模块对各硬件模块的处理信息进行统计时,则会自动进行更新。The statistics of the statistics are initialized into the statistics file. When the statistics file is generated, all the statistics are 0 according to the preset format. When the payment terminal starts to pass the statistics module of the middle layer, the hardware is used. When the processing information of the module is counted, it is automatically updated.
如图6所示,在一个实施例中,步骤S510通过中间层更新符合判断条件的配置项的统计名称的统计次数,包括以下步骤:As shown in FIG. 6, in an embodiment, step S510 updates the statistical number of the statistical names of the configuration items that meet the determination condition by the intermediate layer, including the following steps:
步骤S602,通过中间层获取符合判断条件的配置项的统计名称及进行比对的时间。Step S602, obtaining, by the intermediate layer, a statistical name of the configuration item that meets the determination condition and a time for performing the comparison.
支付终端通过中间层的统计模块,判断硬件模块的处理信息包含的处理返回值是否符合与处理信息包含的接口编号匹配的配置项中的判断条件,若符合,则通过中间层的统计模块获取符合判断条件的配置项的统计名称及进行处理信息比对的时间。The payment terminal determines whether the processing return value included in the processing information of the hardware module meets the judgment condition in the configuration item matching the interface number included in the processing information through the statistics module of the middle layer, and if yes, obtains the matching through the statistics module of the middle layer. The statistical name of the configuration item that determines the condition and the time at which the processing information is compared.
步骤S604,通过中间层根据符合判断条件的配置项的统计名称及进行比对的时间从统计文件中获取匹配的统计次数。In step S604, the intermediate layer obtains the matching statistics number from the statistical file according to the statistical name of the configuration item that meets the determination condition and the time for performing the comparison.
根据进行处理信息比对的时间,支付终端通过中间层的统计模块可获取对应的统计文件,再根据符合判断条件的配置项的统计名称及该进行处理信息比对的时间从对应的统计文件中获取匹配的统计次数。According to the time when the processing information is compared, the payment terminal can obtain the corresponding statistical file through the statistics module of the middle layer, and then according to the statistical name of the configuration item that meets the judgment condition and the time when the processing information is compared, the corresponding statistical file is used. Get the number of statistics for the match.
例如,支付终端通过中间层的统计模块每隔1个月生成统计文件,用户指定统计每天的硬件模块的处理信息,符合判断条件的配置项的统计名称为MODEM接收成功次数,进行比对的时间为2017年1月5日下午15时,则根据该进行比对的时间,可先获取2017年1月的统计文件,再根据统计文件中的预设格式[统计名称]:天数序号=统计次数,获取到MODEM接收成功次 数中天数序号为5的统计次数。For example, the payment terminal generates a statistical file every one month through the statistics module of the middle layer, and the user specifies the processing information of the hardware module of the daily, and the statistical name of the configuration item that meets the judgment condition is the number of successful receptions of the MODEM, and the comparison time is performed. For January 15th, 2017 at 15:00 pm, according to the time of comparison, the statistical file of January 2017 can be obtained first, and then according to the preset format in the statistical file [statistical name]: number of days = number of statistics , get the MODEM received successfully The number of days in which the number of days is 5.
步骤S606,将匹配的统计次数加一后重新写入统计文件中。In step S606, the number of matched statistics is incremented by one and then rewritten into the statistical file.
支付终端通过中间层的统计模块获取与符合判断条件的配置项的统计名称及进行比对的时间匹配的统计次数后,可将该统计次数加一后重新写入对应的统计文件中。After the statistic module of the middle layer obtains the statistic name of the configuration item that meets the judgment condition and the statistic number of the matching time, the statistic module can add the statistic number to the corresponding statistic file.
在本实施例中,可利用统计文件存储各硬件模块的处理信息的统计结果,可灵活设置统计时间段,且方便进行统计数据查询。In this embodiment, the statistical file can be used to store the statistical result of the processing information of each hardware module, and the statistical time period can be flexibly set, and the statistical data query can be conveniently performed.
如图7所示,在一个实施例中,上述信息统计方法,还包括以下步骤:As shown in FIG. 7, in an embodiment, the foregoing information statistics method further includes the following steps:
步骤S702,通过应用层向中间层发送统计信息查询请求。Step S702, sending a statistical information query request to the middle layer through the application layer.
支付终端可通过应用层中的各个应用程序调用中间层的提供的统计数据查询接口,向中间层的统计模块发送统计信息查询请求。The payment terminal may send a statistical information query request to the statistics module of the middle layer by calling the statistical data query interface provided by the middle layer through each application in the application layer.
步骤S704,通过中间层根据统计信息查询请求获取查询的统计名称及查询时间。Step S704, obtaining, by the intermediate layer, the statistical name and the query time of the query according to the statistical information query request.
支付终端通过中间层的统计模块接收应用层的应用程序发送的统计信息查询请求,可获取所需查询的统计名称,以及所需查询的查询时间。The payment terminal receives the statistical information query request sent by the application of the application layer through the statistics module of the middle layer, and can obtain the statistical name of the required query and the query time of the required query.
步骤S706,通过中间层从统计文件中获取与查询的统计名称及查询时间对应的统计次数并返回给应用层。Step S706: Obtain a statistical number corresponding to the statistical name of the query and the query time from the statistical file through the intermediate layer, and return to the application layer.
支付终端可通过中间层的统计模块根据查询时间获取对应的统计文件,并从统计文件中获取与查询的统计名称及查询时间匹配的统计次数,并将该获取的统计次数返回给应用层。例如,支付终端可通过应用层的应用A向中间层发送统计信息查询请求,查询2016年12月3日的卡片读写成功次数,则中间层的统计模块可根据查询时间2016年12月3日获取2016年3月的统计文件,并从2016年3月的统计文件中获取卡片读写成功次数中天数序号为3的统计次数,并将该统计次数返回给应用层的应用A,应用A向用户展示该统计次数。The payment module can obtain the corresponding statistical file according to the query time through the statistics module of the middle layer, and obtain the statistical number matching the queryed statistical name and the query time from the statistical file, and return the obtained statistics count to the application layer. For example, the payment terminal may send a statistical information query request to the middle layer through the application A of the application layer to query the number of successful card reading and writing on December 3, 2016, and the statistics module of the middle layer may be based on the query time on December 3, 2016. Obtain the statistics file of March 2016, and obtain the statistics number of the card number of the number of days of card reading and writing success from the data file of March 2016, and return the number of statistics to the application A of the application layer, applying A direction. The user shows the number of statistics.
在本实施例中,能够简便地获取所需的硬件模块的统计信息,方便快捷。In this embodiment, the statistical information of the required hardware modules can be easily obtained, which is convenient and quick.
可以理解地,上述信息统计模块除了适用于支付终端外,还可适用于其 它终端,比如智能手机、平板电脑等,并不限于以上所述的支付终端。It can be understood that the above information statistics module can be applied to the payment terminal in addition to the payment terminal. Its terminal, such as a smart phone, a tablet, etc., is not limited to the payment terminal described above.
如图8所述,在一个实施例中,提供一种信息统计装置,包括:中间接口调用模块810、系统接口调用模块820、处理信息获取模块830、读取模块840及统计模块850。As shown in FIG. 8 , in an embodiment, an information statistics apparatus is provided, including: an intermediate interface calling module 810 , a system interface calling module 820 , a processing information acquiring module 830 , a reading module 840 , and a statistics module 850 .
中间接口调用模块810,用于通过应用层调用中间层提供的中间接口。The intermediate interface invoking module 810 is configured to invoke an intermediate interface provided by the intermediate layer through the application layer.
系统接口调用模块820,用于通过中间接口调用系统层中对应的硬件模块接口,以使系统层根据硬件模块接口调用匹配的硬件模块进行处理。The system interface invoking module 820 is configured to invoke a corresponding hardware module interface in the system layer through the intermediate interface, so that the system layer processes the matched hardware module according to the hardware module interface for processing.
处理信息获取模块830,用于通过中间接口获取系统层返回的匹配的硬件模块的处理信息,并将处理信息发送至消息队列。The processing information obtaining module 830 is configured to acquire processing information of the matched hardware module returned by the system layer through the intermediate interface, and send the processing information to the message queue.
读取模块840,用于通过中间层从消息队列中读取各个硬件模块的处理信息。The reading module 840 is configured to read processing information of each hardware module from the message queue through the intermediate layer.
统计模块850,用于通过中间层根据预设的配置文件统计各个硬件模块的处理信息,并生成统计文件。The statistics module 850 is configured to collect, by using an intermediate layer, processing information of each hardware module according to a preset configuration file, and generate a statistical file.
上述信息统计装置,通过应用层调用中间层提供的中间接口,通过中间接口调用系统层中对应的硬件模块接口,以使系统层根据硬件模块接口调用匹配的硬件模块进行处理,并向中间接口返回该匹配的硬件模块的处理信息,通过中间接口将处理信息发送至消息队列,通过中间层从消息队列中读取各个硬件模块的处理信息,再根据预设的配置文件统计各个硬件模块的处理信息,并生成统计文件,能够灵活统计支付终端各硬件模块的使用情况,统计方式简单,且无需消耗大量资源进行应用开发。The information statistics device calls the intermediate interface provided by the middle layer through the application layer, and calls the corresponding hardware module interface in the system layer through the intermediate interface, so that the system layer processes the matched hardware module according to the hardware module interface, and returns to the intermediate interface. The processing information of the matched hardware module is sent to the message queue through the intermediate interface, and the processing information of each hardware module is read from the message queue through the intermediate layer, and the processing information of each hardware module is calculated according to the preset configuration file. And generate a statistical file, which can flexibly count the usage of each hardware module of the payment terminal, and the statistical method is simple, and does not need to consume a large amount of resources for application development.
如图9所示,在一个实施例中,上述信息统计装置,除了包括中间接口调用模块810、系统接口调用模块820、处理信息获取模块830、读取模块840及统计模块850,还包括定义模块860及宏定义模块870。As shown in FIG. 9, in an embodiment, the information statistics device includes a middle interface call module 810, a system interface call module 820, a process information acquisition module 830, a read module 840, and a statistics module 850, and includes a definition module. 860 and macro definition module 870.
定义模块860,用于分别定义与各个硬件模块接口对应的中间接口。The definition module 860 is configured to respectively define an intermediate interface corresponding to each hardware module interface.
宏定义模块870,用于在头文件中对各个硬件模块接口与对应的中间接口进行宏定义。 The macro definition module 870 is configured to perform macro definition on each hardware module interface and the corresponding intermediate interface in the header file.
在本实施例中,通过宏定义,使得通过应用层调用中间层提供的中间接口时,与传统方式中直接调用系统层的硬件模块接口方式一致,对支付终端安装的各应用程序而言,构建中间层进行各硬件模块的使用情况统计完全不需要做出任何改动,无需重新消耗资源进行应用程序开发。In this embodiment, by using the macro definition, when the intermediate interface provided by the middle layer is invoked through the application layer, the interface mode of the hardware module directly calling the system layer in the traditional manner is consistent, and the application is installed for each application installed by the payment terminal. The intermediate layer does not need to make any changes to the usage statistics of each hardware module, and does not need to re-consume resources for application development.
在一个实施例中,处理信息包括接口编号及处理返回值。如图10所示,统计模块850包括配置项获取单元1002、比对单元1004、判断单元1006及更新单元1008。In one embodiment, the processing information includes an interface number and a processing return value. As shown in FIG. 10, the statistics module 850 includes a configuration item acquisition unit 1002, a comparison unit 1004, a determination unit 1006, and an update unit 1008.
配置项获取单元1002,用于通过中间层获取预设的配置文件中的配置项,配置项包括统计名称、接口编号及判断条件。The configuration item obtaining unit 1002 is configured to obtain, by using an intermediate layer, a configuration item in a preset configuration file, where the configuration item includes a statistical name, an interface number, and a determination condition.
比对单元1004,用于通过中间层将读取的各个硬件模块的处理信息与配置项进行比对。The comparison unit 1004 is configured to compare the processing information of each read hardware module with the configuration item through the intermediate layer.
判断单元1006,用于若存在与读取的处理信息中包含的接口编号匹配的配置项,则通过中间层判断所述读取的处理信息中包含的处理返回值是否符合匹配的配置项的判断条件。The determining unit 1006 is configured to determine, by the intermediate layer, whether the processing return value included in the read processing information meets the matching configuration item if there is a configuration item that matches the interface number included in the read processing information. condition.
更新单元1008,用于若读取的处理信息中包含的处理返回值符合匹配的配置项的判断条件,则通过中间层更新符合判断条件的配置项的统计名称对应的统计次数。The updating unit 1008 is configured to update, by the intermediate layer, the number of statistics corresponding to the statistical name of the configuration item that meets the determination condition, if the processing return value included in the processed processing information meets the determination condition of the matching configuration item.
在本实施例中,可通过中间层根据预设的配置文件统计各个硬件模块的处理信息,能够根据用户的实际需求灵活统计支付终端各硬件模块的使用情况,且统计方式简单。In this embodiment, the processing information of each hardware module is calculated by the intermediate layer according to the preset configuration file, and the usage of each hardware module of the payment terminal can be flexibly counted according to the actual needs of the user, and the statistical manner is simple.
如图11所示,在一个实施例中,上述统计模块,除了包括配置项获取单元1002、比对单元1004、判断单元1006及更新单元1008,还包括生成单元1010及初始化单元1012。As shown in FIG. 11 , in one embodiment, the foregoing statistics module includes a configuration unit acquisition unit 1002, a comparison unit 1004, a determination unit 1006, and an update unit 1008, and a generation unit 1010 and an initialization unit 1012.
生成单元1010,用于通过中间层每隔预设时间生成统计文件。The generating unit 1010 is configured to generate a statistical file by the intermediate layer every preset time.
初始化单元1012,用于通过中间层按照预设格式将与配置文件中包含的各个统计名称对应的统计次数初始化写入统计文件。The initializing unit 1012 is configured to initialize, by the intermediate layer, a statistical number corresponding to each statistical name included in the configuration file to the statistical file according to a preset format.
更新单元1008包括获取子单元1102及写入子单元1104。 The update unit 1008 includes an acquisition subunit 1102 and a write subunit 1104.
获取子单元1102,用于通过中间层获取符合判断条件的配置项的统计名称及进行比对的时间。The obtaining sub-unit 1102 is configured to obtain, by the intermediate layer, a statistical name of the configuration item that meets the determining condition and a time for performing the comparison.
获取子单元1102,还用于通过中间层根据符合判断条件的配置项的统计名称及进行比对的时间从统计文件中获取匹配的统计次数。The obtaining sub-unit 1102 is further configured to obtain, by the intermediate layer, the number of matching statistics from the statistical file according to the statistical name of the configuration item that meets the judgment condition and the time for performing the comparison.
写入子单元1104,用于将匹配的统计次数加一后重新写入统计文件中。The writing subunit 1104 is configured to add one of the matching statistics to the statistical file and rewrite it into the statistical file.
在本实施例中,可利用统计文件存储各硬件模块的处理信息的统计结果,可灵活设置统计时间段,且方便进行统计数据查询。In this embodiment, the statistical file can be used to store the statistical result of the processing information of each hardware module, and the statistical time period can be flexibly set, and the statistical data query can be conveniently performed.
如图12所示,在一个实施例中,上述信息统计装置,除了包括中间接口调用模块810、系统接口调用模块820、处理信息获取模块830、读取模块840、统计模块850、定义模块860及宏定义模块870,还包括发送模块880、查询信息获取模块890及返回模块900。As shown in FIG. 12, in one embodiment, the information statistics device includes an intermediate interface calling module 810, a system interface calling module 820, a processing information acquiring module 830, a reading module 840, a statistics module 850, a definition module 860, and The macro definition module 870 further includes a sending module 880, a query information acquiring module 890, and a returning module 900.
发送模块880,用于通过应用层向中间层发送统计信息查询请求。The sending module 880 is configured to send a statistical information query request to the middle layer through the application layer.
查询信息获取模块890,用于通过中间层根据统计信息查询请求获取查询的统计名称及查询时间。The query information obtaining module 890 is configured to obtain the statistical name and the query time of the query according to the statistical information query request by the intermediate layer.
返回模块900,用于通过中间层从统计文件中获取与查询的统计名称及查询时间对应的统计次数并返回给所述应用层。The returning module 900 is configured to obtain, by using an intermediate layer, a statistical number corresponding to the statistical name of the query and the query time from the statistical file, and return to the application layer.
在本实施例中,能够简便地获取所需的硬件模块的统计信息,方便快捷。In this embodiment, the statistical information of the required hardware modules can be easily obtained, which is convenient and quick.
上述信息统计装置中的各个模块可全部或部分通过软件、硬件或其组合来实现。例如,在硬件实现上,上述更新单元1008可通过终端的处理器更新符合判断条件的配置项的统计名称对应的统计次数,其中,该处理器可以为中央处理单元(CPU)、微处理器等。上述各模块可以硬件形式内嵌于或独立于终端的处理器中,也可以以软件形式存储于终端的存储器中,以便于处理器调用执行以上各个模块对应的操作。Each of the above-described information statistical devices may be implemented in whole or in part by software, hardware, or a combination thereof. For example, in the hardware implementation, the updating unit 1008 may update the statistical number corresponding to the statistical name of the configuration item that meets the determination condition by using the processor of the terminal, where the processor may be a central processing unit (CPU), a microprocessor, or the like. . The above modules may be embedded in the hardware of the terminal or may be stored in the memory of the terminal in the form of software, so that the processor can call the corresponding operations of the above modules.
在一个实施例中,提供一种终端,包括存储器和处理器,存储器中储存有计算机可执行指令,计算机可执行指令被处理器执行时,使得该处理器执行时可实现上述的信息统计方法。 In one embodiment, a terminal is provided that includes a memory and a processor having stored therein computer executable instructions that, when executed by the processor, cause the processor to perform the statistical methods described above.
在一个实施例中,提供一个或多个存储有计算机可执行指令的非易失性可读存储介质,计算机可执行指令被一个或多个处理器执行时可实现上述的信息统计方法。In one embodiment, one or more non-volatile readable storage media storing computer-executable instructions are provided that, when executed by one or more processors, implement the statistical methods described above.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等非易失性存储介质,或随机存储记忆体(Random Access Memory,RAM)等。One of ordinary skill in the art can understand that all or part of the process of implementing the foregoing embodiments can be completed by a computer program to instruct related hardware, and the program can be stored in a computer readable storage medium. When executed, the flow of an embodiment of the methods as described above may be included. The storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above-described embodiments may be arbitrarily combined. For the sake of brevity of description, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction between the combinations of these technical features, All should be considered as the scope of this manual.
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。 The above-mentioned embodiments are merely illustrative of several embodiments of the present application, and the description thereof is more specific and detailed, but is not to be construed as limiting the scope of the invention. It should be noted that a number of variations and modifications may be made by those skilled in the art without departing from the spirit and scope of the present application. Therefore, the scope of the invention should be determined by the appended claims.

Claims (18)

  1. 一种信息统计方法,包括:An information statistical method, including:
    通过应用层调用中间层提供的中间接口;Calling the intermediate interface provided by the middle layer through the application layer;
    通过所述中间接口调用系统层中对应的硬件模块接口,以使所述系统层根据所述硬件模块接口调用匹配的硬件模块进行处理;Calling, by the intermediate interface, a corresponding hardware module interface in the system layer, so that the system layer processes the matched hardware module according to the hardware module interface;
    通过所述中间接口获取所述系统层返回的所述匹配的硬件模块的处理信息,并将所述处理信息发送至消息队列;Acquiring processing information of the matched hardware module returned by the system layer by using the intermediate interface, and sending the processing information to a message queue;
    通过所述中间层从所述消息队列中读取各个硬件模块的处理信息;及Reading, by the intermediate layer, processing information of each hardware module from the message queue; and
    通过所述中间层根据预设的配置文件统计所述各个硬件模块的处理信息,并生成统计文件。The processing information of each hardware module is calculated by the intermediate layer according to a preset configuration file, and a statistical file is generated.
  2. 根据权利要求1所述的方法,其特征在于,在所述通过应用层调用中间层提供的中间接口之前,所述方法还包括:The method according to claim 1, wherein before the invoking an intermediate interface provided by the intermediate layer by the application layer, the method further comprises:
    分别定义与各个硬件模块接口对应的中间接口;及Defining an intermediate interface corresponding to each hardware module interface; and
    在头文件中对各个硬件模块接口与对应的中间接口进行宏定义。Macro definitions are made in the header file for each hardware module interface and the corresponding intermediate interface.
  3. 根据权利要求1所述的方法,其特征在于,所述处理信息包括接口编号及处理返回值;The method according to claim 1, wherein the processing information comprises an interface number and a processing return value;
    所述通过所述中间层根据预设的配置文件统计所述各个硬件模块的处理信息,并生成统计文件,包括:The calculating, by the intermediate layer, the processing information of each hardware module according to a preset configuration file, and generating a statistical file, including:
    通过所述中间层获取预设的配置文件中的配置项,所述配置项包括统计名称、接口编号及判断条件;Acquiring, by the intermediate layer, a configuration item in a preset configuration file, where the configuration item includes a statistical name, an interface number, and a determination condition;
    通过所述中间层将读取的各个硬件模块的处理信息与所述配置项进行比对;及Comparing, by the intermediate layer, processing information of each read hardware module with the configuration item; and
    若存在与读取的处理信息中包含的接口编号匹配的配置项,则通过所述中间层判断所述读取的处理信息中包含的处理返回值是否符合所述匹配的配置项的判断条件,若符合,则通过所述中间层更新符合判断条件的配置项的统计名称对应的统计次数。If there is a configuration item matching the interface number included in the read processing information, determining, by the intermediate layer, whether the processing return value included in the read processing information meets the judgment condition of the matched configuration item, If yes, the statistical number corresponding to the statistical name of the configuration item that meets the judgment condition is updated by the intermediate layer.
  4. 根据权利要求3所述的方法,其特征在于,所述通过所述中间层根据 预设的配置文件统计所述各个硬件模块的处理信息,并生成统计文件,还包括:The method according to claim 3, wherein said passing said intermediate layer is based The preset configuration file collects processing information of each hardware module and generates a statistical file, and further includes:
    通过所述中间层每隔预设时间生成统计文件;及Generating a statistical file by the intermediate layer every preset time; and
    通过所述中间层按照预设格式将与所述配置文件中包含的各个统计名称对应的统计次数初始化写入所述统计文件。The statistical number corresponding to each statistical name included in the configuration file is initialized and written into the statistical file by the intermediate layer according to a preset format.
  5. 根据权利要求4所述的方法,其特征在于,所述通过所述中间层更新符合判断条件的配置项的统计名称对应的统计次数,包括:The method according to claim 4, wherein the updating the statistical number corresponding to the statistical name of the configuration item that meets the determination condition by the intermediate layer comprises:
    通过所述中间层获取符合判断条件的配置项的统计名称及进行比对的时间;Obtaining, by the intermediate layer, a statistical name of the configuration item that meets the judgment condition and a time for performing the comparison;
    通过所述中间层根据所述符合判断条件的配置项的统计名称及进行比对的时间从所述统计文件中获取匹配的统计次数;及Obtaining, by the intermediate layer, the number of matching statistics from the statistical file according to the statistical name of the configuration item that meets the judgment condition and the time for performing the comparison; and
    将所述匹配的统计次数加一后重新写入所述统计文件中。The number of statistics of the matching is increased by one and then rewritten into the statistical file.
  6. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1 further comprising:
    通过所述应用层向所述中间层发送统计信息查询请求;Sending a statistical information query request to the intermediate layer by using the application layer;
    通过所述中间层根据所述统计信息查询请求获取查询的统计名称及查询时间;及Obtaining, by the intermediate layer, the statistical name and the query time of the query according to the statistical information query request; and
    通过所述中间层从所述统计文件中获取与所述查询的统计名称及查询时间对应的统计次数并返回给所述应用层。And obtaining, by the intermediate layer, a statistical number corresponding to the statistical name and the query time of the query from the statistical file, and returning to the application layer.
  7. 一种终端,包括存储器和处理器,所述存储器中储存有计算机可执行指令,所述计算机可执行指令被所述处理器执行时,使得所述处理器执行以下步骤:A terminal comprising a memory and a processor, the memory storing computer executable instructions, the computer executable instructions being executed by the processor, causing the processor to perform the following steps:
    通过应用层调用中间层提供的中间接口;Calling the intermediate interface provided by the middle layer through the application layer;
    通过所述中间接口调用系统层中对应的硬件模块接口,以使所述系统层根据所述硬件模块接口调用匹配的硬件模块进行处理;Calling, by the intermediate interface, a corresponding hardware module interface in the system layer, so that the system layer processes the matched hardware module according to the hardware module interface;
    通过所述中间接口获取所述系统层返回的所述匹配的硬件模块的处理信息,并将所述处理信息发送至消息队列; Acquiring processing information of the matched hardware module returned by the system layer by using the intermediate interface, and sending the processing information to a message queue;
    通过所述中间层从所述消息队列中读取各个硬件模块的处理信息;及Reading, by the intermediate layer, processing information of each hardware module from the message queue; and
    通过所述中间层根据预设的配置文件统计所述各个硬件模块的处理信息,并生成统计文件。The processing information of each hardware module is calculated by the intermediate layer according to a preset configuration file, and a statistical file is generated.
  8. 根据权利要求7所述的终端,其特征在于,所述计算机可执行指令被所述处理器执行时,还使得所述处理器在执行所述通过应用层调用中间层提供的中间接口的步骤之前,还执行:The terminal according to claim 7, wherein said computer executable instructions are executed by said processor, further causing said processor to perform said step of calling said intermediate layer provided by said intermediate layer through said application layer Also executed:
    分别定义与各个硬件模块接口对应的中间接口;及Defining an intermediate interface corresponding to each hardware module interface; and
    在头文件中对各个硬件模块接口与对应的中间接口进行宏定义的步骤。The macro definition step is performed in the header file for each hardware module interface and the corresponding intermediate interface.
  9. 根据权利要求7所述的终端,其特征在于,所述处理信息包括接口编号及处理返回值;The terminal according to claim 7, wherein the processing information comprises an interface number and a processing return value;
    所述通过所述中间层根据预设的配置文件统计所述各个硬件模块的处理信息,并生成统计文件,包括:The calculating, by the intermediate layer, the processing information of each hardware module according to a preset configuration file, and generating a statistical file, including:
    通过所述中间层获取预设的配置文件中的配置项,所述配置项包括统计名称、接口编号及判断条件;Acquiring, by the intermediate layer, a configuration item in a preset configuration file, where the configuration item includes a statistical name, an interface number, and a determination condition;
    通过所述中间层将读取的各个硬件模块的处理信息与所述配置项进行比对;及Comparing, by the intermediate layer, processing information of each read hardware module with the configuration item; and
    若存在与读取的处理信息中包含的接口编号匹配的配置项,则通过所述中间层判断所述读取的处理信息中包含的处理返回值是否符合所述匹配的配置项的判断条件,若符合,则通过所述中间层更新符合判断条件的配置项的统计名称对应的统计次数。If there is a configuration item matching the interface number included in the read processing information, determining, by the intermediate layer, whether the processing return value included in the read processing information meets the judgment condition of the matched configuration item, If yes, the statistical number corresponding to the statistical name of the configuration item that meets the judgment condition is updated by the intermediate layer.
  10. 根据权利要求9所述的终端,其特征在于,所述通过所述中间层根据预设的配置文件统计所述各个硬件模块的处理信息,并生成统计文件,还包括:The terminal according to claim 9, wherein the calculating, by the intermediate layer, the processing information of each hardware module according to a preset configuration file, and generating a statistical file, further comprising:
    通过所述中间层每隔预设时间生成统计文件;及Generating a statistical file by the intermediate layer every preset time; and
    通过所述中间层按照预设格式将与所述配置文件中包含的各个统计名称对应的统计次数初始化写入所述统计文件。The statistical number corresponding to each statistical name included in the configuration file is initialized and written into the statistical file by the intermediate layer according to a preset format.
  11. 根据权利要求10所述的终端,其特征在于,所述通过所述中间层更 新符合判断条件的配置项的统计名称对应的统计次数,包括:The terminal according to claim 10, wherein said passing said intermediate layer is further The number of statistics corresponding to the new statistical name of the configuration item that meets the judgment criteria, including:
    通过所述中间层获取符合判断条件的配置项的统计名称及进行比对的时间;Obtaining, by the intermediate layer, a statistical name of the configuration item that meets the judgment condition and a time for performing the comparison;
    通过所述中间层根据所述符合判断条件的配置项的统计名称及进行比对的时间从所述统计文件中获取匹配的统计次数;及Obtaining, by the intermediate layer, the number of matching statistics from the statistical file according to the statistical name of the configuration item that meets the judgment condition and the time for performing the comparison; and
    将所述匹配的统计次数加一后重新写入所述统计文件中。The number of statistics of the matching is increased by one and then rewritten into the statistical file.
  12. 根据权利要求7所述的终端,其特征在于,所述计算机可执行指令被所述处理器执行时,还使得所述处理器执行:The terminal of claim 7 wherein said computer executable instructions, when executed by said processor, further cause said processor to:
    通过所述应用层向所述中间层发送统计信息查询请求;Sending a statistical information query request to the intermediate layer by using the application layer;
    通过所述中间层根据所述统计信息查询请求获取查询的统计名称及查询时间;及Obtaining, by the intermediate layer, the statistical name and the query time of the query according to the statistical information query request; and
    通过所述中间层从所述统计文件中获取与所述查询的统计名称及查询时间对应的统计次数并返回给所述应用层的步骤。Obtaining, by the intermediate layer, a statistical number corresponding to the statistical name of the query and the query time from the statistical file, and returning to the application layer.
  13. 一个或多个存储有计算机可执行指令的非易失性可读存储介质,所述计算机可执行指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:One or more non-volatile readable storage media storing computer-executable instructions, when executed by one or more processors, cause the one or more processors to perform the following steps:
    通过应用层调用中间层提供的中间接口;Calling the intermediate interface provided by the middle layer through the application layer;
    通过所述中间接口调用系统层中对应的硬件模块接口,以使所述系统层根据所述硬件模块接口调用匹配的硬件模块进行处理;Calling, by the intermediate interface, a corresponding hardware module interface in the system layer, so that the system layer processes the matched hardware module according to the hardware module interface;
    通过所述中间接口获取所述系统层返回的所述匹配的硬件模块的处理信息,并将所述处理信息发送至消息队列;Acquiring processing information of the matched hardware module returned by the system layer by using the intermediate interface, and sending the processing information to a message queue;
    通过所述中间层从所述消息队列中读取各个硬件模块的处理信息;及Reading, by the intermediate layer, processing information of each hardware module from the message queue; and
    通过所述中间层根据预设的配置文件统计所述各个硬件模块的处理信息,并生成统计文件。The processing information of each hardware module is calculated by the intermediate layer according to a preset configuration file, and a statistical file is generated.
  14. 根据权利要求13所述的非易失性可读存储介质,其特征在于,所述计算机可执行指令被一个或多个处理器执行时,还使得所述一个或多个处理 器在执行所述通过应用层调用中间层提供的中间接口的步骤之前,还执行:A non-volatile readable storage medium according to claim 13 wherein said one or more processes are also performed when said computer executable instructions are executed by one or more processors Before executing the step of calling the intermediate interface provided by the middle layer through the application layer, the device further performs:
    分别定义与各个硬件模块接口对应的中间接口;及Defining an intermediate interface corresponding to each hardware module interface; and
    在头文件中对各个硬件模块接口与对应的中间接口进行宏定义。Macro definitions are made in the header file for each hardware module interface and the corresponding intermediate interface.
  15. 根据权利要求13所述的非易失性可读存储介质,其特征在于,所述处理信息包括接口编号及处理返回值;The non-volatile readable storage medium according to claim 13, wherein the processing information comprises an interface number and a processing return value;
    所述通过所述中间层根据预设的配置文件统计所述各个硬件模块的处理信息,并生成统计文件,包括:The calculating, by the intermediate layer, the processing information of each hardware module according to a preset configuration file, and generating a statistical file, including:
    通过所述中间层获取预设的配置文件中的配置项,所述配置项包括统计名称、接口编号及判断条件;Acquiring, by the intermediate layer, a configuration item in a preset configuration file, where the configuration item includes a statistical name, an interface number, and a determination condition;
    通过所述中间层将读取的各个硬件模块的处理信息与所述配置项进行比对;及Comparing, by the intermediate layer, processing information of each read hardware module with the configuration item; and
    若存在与读取的处理信息中包含的接口编号匹配的配置项,则通过所述中间层判断所述读取的处理信息中包含的处理返回值是否符合所述匹配的配置项的判断条件,若符合,则通过所述中间层更新符合判断条件的配置项的统计名称对应的统计次数。If there is a configuration item matching the interface number included in the read processing information, determining, by the intermediate layer, whether the processing return value included in the read processing information meets the judgment condition of the matched configuration item, If yes, the statistical number corresponding to the statistical name of the configuration item that meets the judgment condition is updated by the intermediate layer.
  16. 根据权利要求15所述的非易失性可读存储介质,其特征在于,所述通过所述中间层根据预设的配置文件统计所述各个硬件模块的处理信息,并生成统计文件,还包括:The non-volatile readable storage medium according to claim 15, wherein the intermediate layer collects processing information of the respective hardware modules according to a preset configuration file, and generates a statistical file, further including :
    通过所述中间层每隔预设时间生成统计文件;及Generating a statistical file by the intermediate layer every preset time; and
    通过所述中间层按照预设格式将与所述配置文件中包含的各个统计名称对应的统计次数初始化写入所述统计文件。The statistical number corresponding to each statistical name included in the configuration file is initialized and written into the statistical file by the intermediate layer according to a preset format.
  17. 根据权利要求16所述的非易失性可读存储介质,其特征在于,所述通过所述中间层更新符合判断条件的配置项的统计名称对应的统计次数,包括:The non-volatile readable storage medium according to claim 16, wherein the statistical number corresponding to the statistical name of the configuration item that meets the determination condition by the intermediate layer is updated, including:
    通过所述中间层获取符合判断条件的配置项的统计名称及进行比对的时间;Obtaining, by the intermediate layer, a statistical name of the configuration item that meets the judgment condition and a time for performing the comparison;
    通过所述中间层根据所述符合判断条件的配置项的统计名称及进行比对 的时间从所述统计文件中获取匹配的统计次数;及Performing comparison by the intermediate layer according to the statistical name of the configuration item that meets the judgment condition Time to obtain matching statistics from the statistical file; and
    将所述匹配的统计次数加一后重新写入所述统计文件中。The number of statistics of the matching is increased by one and then rewritten into the statistical file.
  18. 根据权利要求13所述的非易失性可读存储介质,其特征在于,所述计算机可执行指令被一个或多个处理器执行时,还使得所述一个或多个处理器执行:The non-volatile readable storage medium of claim 13, wherein when the computer executable instructions are executed by one or more processors, the one or more processors are further caused to:
    通过所述应用层向所述中间层发送统计信息查询请求;Sending a statistical information query request to the intermediate layer by using the application layer;
    通过所述中间层根据所述统计信息查询请求获取查询的统计名称及查询时间;及Obtaining, by the intermediate layer, the statistical name and the query time of the query according to the statistical information query request; and
    通过所述中间层从所述统计文件中获取与所述查询的统计名称及查询时间对应的统计次数并返回给所述应用层的步骤。 Obtaining, by the intermediate layer, a statistical number corresponding to the statistical name of the query and the query time from the statistical file, and returning to the application layer.
PCT/CN2017/099744 2017-02-14 2017-08-30 Information computation method, terminal, and non-volatile readable storage medium WO2018149112A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710079132.1 2017-02-14
CN201710079132.1A CN106919385B (en) 2017-02-14 2017-02-14 Information statistical method and device

Publications (1)

Publication Number Publication Date
WO2018149112A1 true WO2018149112A1 (en) 2018-08-23

Family

ID=59453679

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/099744 WO2018149112A1 (en) 2017-02-14 2017-08-30 Information computation method, terminal, and non-volatile readable storage medium

Country Status (2)

Country Link
CN (1) CN106919385B (en)
WO (1) WO2018149112A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106919385B (en) * 2017-02-14 2019-06-21 百富计算机技术(深圳)有限公司 Information statistical method and device
CN112328180B (en) * 2020-11-16 2024-05-10 深圳市永联科技股份有限公司 File management method based on single chip microcomputer

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101344931A (en) * 2007-07-10 2009-01-14 上海科识通信息科技有限公司 RFID integration machine
CN102201955A (en) * 2011-05-19 2011-09-28 江苏亿通高科技股份有限公司 Family intelligent terminal system
US20120011521A1 (en) * 2010-06-25 2012-01-12 Daniel Knoodle Novel developer platform
CN105159756A (en) * 2014-05-26 2015-12-16 联想(北京)有限公司 Information processing method and information processing equipment
CN106919385A (en) * 2017-02-14 2017-07-04 百富计算机技术(深圳)有限公司 Information statistical method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7561877B2 (en) * 2005-03-18 2009-07-14 Qualcomm Incorporated Apparatus and methods for managing malfunctions on a wireless device
CN104765617B (en) * 2015-05-04 2019-02-19 北京奇虎科技有限公司 Based on the HTML5 stream application functional interface distribution method realized and system
CN105843946B (en) * 2016-04-08 2019-03-29 北京银贝壳科技有限公司 A kind of mobile Internet payment statistical analysis system and its statistical analysis technique

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101344931A (en) * 2007-07-10 2009-01-14 上海科识通信息科技有限公司 RFID integration machine
US20120011521A1 (en) * 2010-06-25 2012-01-12 Daniel Knoodle Novel developer platform
CN102201955A (en) * 2011-05-19 2011-09-28 江苏亿通高科技股份有限公司 Family intelligent terminal system
CN105159756A (en) * 2014-05-26 2015-12-16 联想(北京)有限公司 Information processing method and information processing equipment
CN106919385A (en) * 2017-02-14 2017-07-04 百富计算机技术(深圳)有限公司 Information statistical method and device

Also Published As

Publication number Publication date
CN106919385B (en) 2019-06-21
CN106919385A (en) 2017-07-04

Similar Documents

Publication Publication Date Title
TWI622933B (en) Client update method and device
CN105357204B (en) Method and device for generating terminal identification information
US10521834B2 (en) Mobile solution for purchase orders
CN109495492B (en) Communication system for intelligent water business industry
CN110737706A (en) Data management method, device, equipment and computer readable storage medium
CN106126256A (en) A kind of driven management method, Apparatus and system
WO2018149112A1 (en) Information computation method, terminal, and non-volatile readable storage medium
CN115151931A (en) Electronic device for providing transaction information and operation method thereof
WO2022267769A1 (en) Method and apparatus for generating graph data
WO2019114158A1 (en) Real-time animation display method and device, electronic terminal, and readable storage medium
CN105302556A (en) Calculation realization method and system and server apparatus
CN111142863A (en) Page generation method and device
CN114218156A (en) Data export method, data export device, computer equipment and storage medium
US20220391263A1 (en) Deployment of Services with Dependencies
WO2020151331A1 (en) Method and apparatus for dynamically configuring official documents, electronic device and storage medium
CN108196921B (en) Document development method and device, computer equipment and storage medium
US8645969B2 (en) Method for dynamic discovery of processors and processor capabilities
CN108053255A (en) The method and device of a kind of information processing
US11631052B2 (en) Ad hoc supply chain community node
CN111427849A (en) Data processing method, electronic device and storage medium
WO2020006930A1 (en) Data forgery method and apparatus, and computer storage medium
CN109561146A (en) Document down loading method, device, terminal device
CN109828908A (en) Interface testing parameter encryption method, device, electronic equipment and storage medium
CN117453548B (en) Code module information determining method, apparatus, computer device and storage medium
EP4105782A1 (en) Hardware accelerator service discovery

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17896511

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17896511

Country of ref document: EP

Kind code of ref document: A1