Discount calculation service test method and device and electronic equipment

By obtaining historical settlement information from the POS side and performing traffic replay on the server side, comparing the test settlement results with historical settlement results, the problem of limited manual selection scenarios in the existing technology is solved, and the testing accuracy and efficiency of preferential computing services are improved. Reduced costs.

CN119105966APending Publication Date: 2024-12-10SHISHI TONGYUN TECH CHENGDU CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411216706.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2024-12-10

AI Technical Summary

Technical Problem

When testing the updated preferential computing service, the manual selection scenarios are limited, resulting in low test accuracy and high cost, and it is impossible to fully cover the test scenarios of each merchant.

Method used

By obtaining historical settlement information from the settlement record information uploaded by each POS, calling the updated version of the original discount calculation service to recalculate the historical entry information, comparing the consistency of the settlement results with the historical settlement results, and determining the updated discount Calculate the test results of the service.

Benefits of technology

It improves the accuracy and efficiency of testing, reduces labor costs, and can fully cover the test scenarios of each POS side, ensuring the calculation accuracy of preferential computing services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119105966A_ABST
    Figure CN119105966A_ABST
Patent Text Reader

Abstract

The invention discloses a preferential calculation service test method and device, electronic equipment and a computer readable storage medium, and the method is applied to a server side, and comprises the steps: obtaining historical settlement information from settlement record information uploaded to the server side by each pos side, the historical settlement information comprises historical input parameter information and a corresponding historical settlement result, the historical settlement result is a settlement result obtained by performing preferential calculation on the historical input parameter information by the pos end through an original preferential calculation service; calling a to-be-tested updated preferential calculation service to perform preferential calculation on the historical input parameter information again to obtain a test settlement result; and determining a test result of the updated preferential calculation service according to the consistency of the test settlement result and the corresponding historical settlement result. According to the scheme provided by the invention, the test process of the preferential computing service can cover more test scenes, so that the test accuracy is improved, the labor cost required in the test process can be reduced, and the test efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a preferential computing service testing method, device, electronic device and computer-readable storage medium. Background Art

[0002] With the rapid development of computer technology, point of sale (POS) terminals have been applied in many consumer fields, such as restaurants, shopping malls, supermarkets, etc. The popularity of POS terminals has provided great payment convenience for merchants and consumers. The settlement software installed on the POS terminal has a discount calculation service. The discount calculation service can automatically calculate the amount of payment after the discount according to the various discount policies set by the merchant, which greatly improves the settlement efficiency of the merchant in order to promote consumption. With the increasing number of preferential activities in the consumer field, the back-end staff will adjust and update the discount calculation service, such as adding new discount calculation logic, adjusting the existing discount calculation logic, etc. After the discount calculation service is adjusted and updated, the updated service needs to be tested to ensure that the updated discount calculation service does not affect the original discount calculation function, thereby ensuring the calculation accuracy of the updated discount calculation service.

[0003] When testing an updated computing service, the related technology usually manually selects some merchants' POS terminals, and calculates discount instances through the updated computing service on the selected POS terminals to obtain the calculation results required for the test, and verifies whether the updated computing service is feasible based on the accuracy of the calculation results required for the test.

[0004] However, since each merchant sets a variety of preferential policies on the POS side, and the manual verification method is limited due to manpower, it can only be verified by manually selecting a small part of the POS side scenarios, so that the testing process can only cover a relatively small number of test scenarios corresponding to a relatively small number of merchants, resulting in low test accuracy, low manual testing efficiency, and high labor costs. Summary of the invention

[0005] The present application provides a preferential computing service testing method, device, electronic device and computer-readable storage medium, which can enable the testing process of the preferential computing service to cover more testing scenarios, thereby improving the accuracy of the test, and can reduce the labor cost required in the testing process and improve the testing efficiency.

[0006] In a first aspect, the present application provides a preferential computing service testing method, which is applied to a server, and the method comprises:

[0007] Acquire historical settlement information from the settlement record information uploaded by each POS terminal to the server terminal, wherein the historical settlement information includes historical input parameter information and corresponding historical settlement results, and the historical settlement results are the settlement results obtained by the POS terminal performing preferential calculation on the historical input parameter information through the original preferential calculation service;

[0008] Calling the updated discount calculation service to be tested corresponding to the original discount calculation service to recalculate the discount on the historical input parameter information to obtain a test settlement result;

[0009] The test result of the updated preferential calculation service is determined according to the consistency between the test settlement result and the corresponding historical settlement result.

[0010] Optionally, the acquiring of historical settlement information from the settlement record information uploaded from each POS terminal to the server terminal includes:

[0011] Obtain the settlement log uploaded by each POS terminal to the server;

[0012] The historical settlement information is extracted from the settlement log.

[0013] Optionally, extracting historical settlement information from the settlement log includes:

[0014] Filter out invalid logs that are invalid for the test updated preferential calculation service from the settlement logs to obtain valid settlement logs;

[0015] The historical settlement information is extracted from the valid settlement log.

[0016] Optionally, the invalid log includes at least one of: a settlement log corresponding to an order without a discount, a settlement log whose version of the original discount calculation service for calculating the settlement result is older than a preset version, and a settlement log whose corresponding POS end is an abnormal POS end.

[0017] Optionally, the calling of the updated discount calculation service corresponding to the original discount calculation service to recalculate the discount on the historical input parameter information to obtain a test settlement result includes:

[0018] Obtaining preferential activity information of the POS terminal corresponding to the historical settlement information, wherein the service terminal stores preferential activity information set by each merchant;

[0019] According to the preferential activity information, the updated preferential calculation service corresponding to the original preferential calculation service is called to recalculate the preferential treatment for the historical input information to obtain a test settlement result.

[0020] Optionally, before obtaining the preferential activity information of the POS terminal corresponding to the historical settlement information, the method further includes:

[0021] Obtain and save the preferential activity information of each POS terminal set and uploaded by the merchant on the setting terminal;

[0022] The saved preferential activity information is sent to the corresponding POS terminal, so that the POS terminal performs preferential calculation based on the preferential activity information and through the installed preferential calculation service.

[0023] Optionally, the server includes a log processing server and a test server;

[0024] The steps of obtaining the settlement logs uploaded to the server by each POS terminal to extracting the historical settlement information from the valid settlement logs are performed by the log processing server;

[0025] The step of calling the updated discount calculation service corresponding to the original discount calculation service to recalculate the discount on the historical input information to obtain a test settlement result, and determining the test result of the updated discount calculation service based on the consistency between the historical settlement result and the test settlement result is executed by the test server.

[0026] Optionally, determining the test result of the updated preferential calculation service according to the consistency between the historical settlement result and the test settlement result includes:

[0027] Count the total weight calculation times;

[0028] Counting the number of consistent recalculations and / or inconsistent recalculations, wherein the consistent recalculations are the number of calculations in which the historical settlement results and the corresponding test settlement results are consistent, and the consistent recalculations are the number of calculations in which the historical settlement results and the corresponding test settlement results are inconsistent;

[0029] A test result of the updated discount calculation service is determined according to at least two of the total number of recalculation times, the number of recalculation consistency times, and the number of recalculation inconsistency times.

[0030] In a second aspect, an embodiment of the present application provides a preferential computing service testing method, which is applied to a POS terminal, and the method includes:

[0031] The settlement record information of the order calculated by the original preferential calculation service is uploaded to the server, and the historical settlement information is recorded in the settlement record information. The historical settlement information includes historical input parameter information and corresponding historical settlement results. The historical settlement result is the settlement result obtained by the POS end through the original preferential calculation service to perform preferential calculation on the historical input parameter information, wherein the settlement record information is used to enable the server to obtain the historical settlement information from the settlement record information, and call the updated preferential calculation service to be tested corresponding to the original preferential calculation service to re-calculate the historical input parameter information to obtain a test settlement result, and determine the test result of the updated preferential calculation service according to the consistency between the test settlement result and the corresponding historical settlement result.

[0032] Optionally, the settlement record information is a settlement log;

[0033] The uploading of the settlement record information of the order calculated by the original discount calculation service to the server includes:

[0034] Remove redundant logs from each settlement log of the orders calculated by the original discount calculation service to obtain a sample settlement log;

[0035] The sample log is uploaded to the server.

[0036] Optionally, uploading the sample log to a server includes:

[0037] A preset number of logs are randomly selected from the sampled logs and uploaded to the server.

[0038] In a third aspect, the present application further provides a preferential computing service testing device, which is applied to a server, and the device comprises:

[0039] An acquisition unit is used to acquire historical settlement information from the settlement record information uploaded by each POS terminal to the server terminal, wherein the historical settlement information includes historical input parameter information and corresponding historical settlement results, and the historical settlement result is the settlement result obtained by the POS terminal performing preferential calculation on the historical input parameter information through the original preferential calculation service;

[0040] A traffic playback unit, used for calling the updated discount calculation service to be tested corresponding to the original discount calculation service to recalculate the discount on the historical input parameter information to obtain a test settlement result;

[0041] The judgment unit is used to determine the test result of the updated preferential calculation service according to the consistency between the test settlement result and the corresponding historical settlement result.

[0042] In a fourth aspect, the present application also provides an electronic device, comprising: a processor, a memory, and computer program instructions stored in the memory and executable on the processor; when the processor executes the computer program instructions, it implements the method described in any one of the first or second aspects above.

[0043] In a fifth aspect, the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method as described in any one of the first aspect or the second aspect above.

[0044] Compared with the prior art, this application has the following advantages:

[0045] The present application provides a preferential calculation service testing method, in which a server obtains historical settlement information from the settlement record information uploaded to the server by each POS terminal, wherein the historical settlement information includes historical input parameter information and corresponding historical settlement results, and the historical settlement result is a settlement result obtained by the POS terminal performing preferential calculation on the historical input parameter information through the original preferential calculation service. Since there may be a conflict between the preferential calculation logic of the updated preferential calculation service and the preferential calculation logic of the original preferential calculation service, the server calls the updated preferential calculation service to be tested corresponding to the original preferential calculation service to re-calculate the preferential calculation on the historical input parameter information to obtain a test settlement result. If the calculated test settlement result is consistent with the original historical settlement result, it means that the preferential calculation logic in the updated preferential calculation service does not conflict with that in the original preferential calculation service, thereby indicating that the test result of the updated preferential calculation service is a passed test, that is, the test result of the updated preferential calculation service can be determined based on the consistency between the test settlement result and the corresponding historical settlement result.

[0046] It can be seen that in the scheme provided by the present application, the server can recalculate the historical input information in the historical settlement information obtained by the updated preferential calculation service through the historical settlement information obtained from the settlement record information uploaded to the server from each POS terminal, that is, the server replays the flow of the historical settlement information of each POS terminal through the updated preferential calculation service, so that the test process of the updated preferential calculation service can be efficiently realized according to the result of the flow replay (i.e., the test settlement result). Since the server can easily, quickly and comprehensively obtain the historical settlement information of each POS terminal, the server can perform a comprehensive flow replay on the historical settlement information of each POS terminal, so that the test of the preferential calculation service can cover each test scenario corresponding to each POS terminal, thereby improving the accuracy of the test. In addition, the test of the preferential calculation service is carried out by automatically obtaining the historical settlement information of each POS terminal through the server to replay the flow, without manual testing, which can reduce the labor cost required for the test and improve the test efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 It is a schematic diagram of the application scenario provided by this application;

[0048] Figure 2 It is a flowchart of an example of a preferential calculation service testing method provided in an embodiment of the present application;

[0049] Figure 3 It is a flowchart of another example of the preferential calculation service testing method provided in the embodiment of the present application;

[0050] Figure 4 It is a flowchart of another example of the preferential calculation service testing method provided in the embodiment of the present application;

[0051] Figure 5 It is a unit block diagram of the preferential computing service testing device provided in an embodiment of the present application.

[0052] Figure 6 It is a structural block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0053] In order to enable those skilled in the art to better understand the technical solution of the present application, the present application is described clearly and completely below in conjunction with the drawings in the embodiments of the present application. However, the present application can be implemented in many other ways different from the following description. Therefore, based on the embodiments provided by the present application, all other embodiments obtained by those of ordinary skill in the art without creative work should fall within the scope of protection of the present application.

[0054] It should be noted that the terms "first", "source domain", "third", etc. in the claims, description and drawings of the present application are used to distinguish similar objects and are not used to describe a specific order or sequence. The data used in this way are interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including", "having" and their variants are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0055] In order to facilitate understanding of the various embodiments of the present application, the application background of the embodiments is described.

[0056] With the rapid development of computer technology, Point Of Sale (POS) terminals have been applied in many consumer fields, such as restaurants, shopping malls, supermarkets, etc. The popularity of POS terminals has provided great payment convenience for merchants and consumers. The settlement software installed on the POS terminal has a discount calculation service. The discount calculation service can automatically calculate the post-discount payment amount according to the various discount policies set by the merchant, which greatly improves the settlement efficiency of merchants in order to promote consumption.

[0057] In the promotion business, the function completed by the discount calculation service is the process of realizing discount consultation. Discount consultation is the discount calculation service that automatically calculates the final payment amount of the customer according to the various discount policies set by the merchant, the items purchased by the customer, and the discount conditions met by the customer. Due to the variety of discount policies set by different merchants, the number of visits to discount consultation (i.e., discount calculation service) and the complexity of calculation logic are relatively high. Once there is an inaccurate calculation problem in discount consultation, it will have a very large impact under high traffic. Even a very small or difficult to trigger calculation will bring a large number of interface response errors or asset loss problems, which will have a great negative impact on merchants or customers. With the increasing number of discount activities in the consumer field, the back-end staff will adjust and update the discount calculation service, such as adding new discount calculation logic, adjusting the existing discount calculation logic, etc. After the discount calculation service is adjusted and updated, the updated service needs to be tested to ensure that the updated discount calculation service does not affect the original discount calculation function, thereby ensuring the calculation accuracy of the updated discount calculation service. Therefore, accuracy is very important for testing the calculation logic update of discount consultation.

[0058] When testing an updated computing service, the related technology usually manually selects some merchants' POS terminals, and calculates discount instances through the updated computing service on the selected POS terminals to obtain the calculation results required for the test, and verifies whether the updated computing service is feasible based on the accuracy of the calculation results required for the test.

[0059] However, since each merchant sets a variety of preferential policies on the POS side, and the manual verification method is limited by manpower, it can only be verified by manually selecting a small part of the POS side scenarios. It is difficult to meet the full coverage of various business logic combination verifications of preferential consultation, so that the testing process can only cover a relatively small number of test scenarios corresponding to relatively few merchants. The preferential consultation calculation is a series of combination calculations of multiple activities (coupons), multiple products, multiple rules, etc. In these complete combination calculations, there is a multi-dimensional factorial result set. If you want to test accurately, every possible test scenario needs to be accurately covered, which leads to a very high cost of manual testing. Since it is impossible to achieve complete scenario coverage, the test accuracy is relatively low, and the efficiency of manual testing is low.

[0060] In order to solve the above problems, the embodiments of the present application provide a preferential computing service testing method, device, electronic device and computer-readable storage medium, which can make the testing process of the preferential computing service cover more test scenarios, thereby improving the accuracy of the test, and can reduce the labor cost required in the testing process and improve the test efficiency.

[0061] The preferential calculation service test solution provided in this application can be used to test the preferential calculation service, and can be used to test the updated preferential calculation service. The preferential calculation service is a service in the settlement software installed on the POS terminal, which can calculate the customer's settlement information according to the preferential policy set by the merchant.

[0062] In order to facilitate understanding of the method embodiments of the present application, the application scenarios are introduced. Figure 1 , Figure 1 Schematic diagram of the application scenario of the method embodiment of the present application. The application scenario is a schematic illustration and is not intended to be a specific description of the application scenario. Figure 1 As shown, in this application scenario, a POS terminal 101 for settlement for customers and a service terminal 102 for service testing are provided, and a setting terminal 103 for merchants to set preferential activity information or preferential policies may also be included. In this embodiment, a connection is established between the POS terminal 101 and the service terminal 102 via network communication.

[0063] The POS terminal 101 can be an electronic device with data processing function, such as a POS machine, a mobile phone, a tablet computer (pad), a smart watch, a desktop computer, a smart TV, a VR device, a vehicle-mounted device, a wearable device, etc. The POS terminal 101 is installed with settlement software, and the settlement software includes a discount calculation service. The POS terminal 101 also stores the discount policies set by the merchant. The POS terminal 101 can calculate the customer's settlement information through the discount policies stored in the discount calculation service and the customer's consumption information, for example, calculate the payment amount, payment coupons, consumption points and other settlement information.

[0064] A specific communication connection needs to be established between the POS terminal 101 and the server terminal 102 to transmit settlement logs, historical settlement information, preferential policy information, etc. For example, the POS terminal 101 uploads the settlement log to the server terminal 102, the POS terminal 101 uploads the historical settlement information to the server terminal 102, the server terminal 102 sends the preferential policy information uploaded by the merchant to the server terminal 102 to the POS terminal 101, and so on.

[0065] A specific communication connection needs to be established between the setting end 103 and the service end 102 to transmit the preferential policies.

[0066] The setting terminal 103 can be a desktop computer, laptop computer, tablet computer (pad), smart watch, smart phone, smart TV, wearable device, POS machine or other electronic device with data processing function used by the merchant. The setting terminal 103 and the POS terminal 101 can be the same device, that is, the merchant sets the preferential policy on the POS terminal 101 and uploads it to the service terminal 102. The merchant also calculates the preferential policy through the POS terminal 101 to obtain the settlement result.

[0067] The server 102 has high computing power. The server 102 can be a server or a cloud server 102. The server 102 has high-speed processor (central processing unit, CPU) computing power, long-term reliable operation, powerful input / output (input / output, I / O) external data throughput capacity and better scalability. The server 102 can be a single server or a server cluster. The server 102 is used to obtain settlement logs from each POS terminal 101, extract historical settlement information from the settlement log and test the preferential calculation service. The server 102 can also provide other specific services, such as issuing preferential policies set by merchants, registering POS terminal 101 information, etc., which are not specifically limited in this application.

[0068] The POS terminal 101 can communicate with the server 102. The POS terminal 101 and the server 102 can communicate using various communication systems, such as a wired communication system or a wireless communication system. The wireless communication system can be, for example, a global system for mobile communications (GSM) system, a code division multiple access (CDMA) system, a wideband code division multiple access (WCDMA) system, a general packet radio service (GPRS), a long term evolution (LTE) system, a LTE frequency division duplex (FDD) system, a LTE time division duplex (TDD) system, a universal mobile telecommunication system (UMTS), a worldwide interoperability for microwave access (WiMAX) communication system, a future fifth generation (5G) system or a new radio (NR), a satellite communication system, etc.

[0069] In this embodiment, the server 102 is mainly used to obtain historical settlement information from each POS terminal 101 to test the preferential calculation service.

[0070] Embodiment 1

[0071] The first embodiment of the present application provides a preferential computing service testing method, wherein the execution subject of the method is a server, which may be a cloud service or a server.

[0072] like Figure 2 As shown, the preferential calculation service testing method provided in the first embodiment of the present application includes the following steps S110 to S130.

[0073] Step S110: Obtain historical settlement information from the settlement record information uploaded to the server by each POS terminal.

[0074] The above-mentioned historical settlement information includes historical input parameter information and corresponding historical settlement results. The historical settlement results are the settlement results obtained by the POS terminal through the original preferential calculation service to perform preferential calculation on the historical input parameter information.

[0075] The historical input parameter information is the customer payment related information used for discount calculation. The historical input parameter information is the parameter input into the original discount calculation service when the POS terminal performs discount calculation through the original discount calculation service. The historical input parameter information may include customer item purchase information, customer points information, customer recharge information, customer consumption item information, etc., and may also include other customer information related to discount calculation, which is not specifically limited in this application.

[0076] The historical settlement results may include historical settlement amounts, historical coupon usage, historical voucher usage, historical points offset, etc., but are not limited thereto.

[0077] In the embodiment of the present application, the original preferential calculation service is installed in the POS terminal, and the original preferential calculation service is a service that has passed the test, and the original preferential calculation service can perform accurate preferential calculation to obtain the settlement result. The preferential calculation service may include multiple calculation logic functions, for example, the preferential calculation service may include a classification discount calculation function, an overall order discount calculation function, a dish discount calculation function, a full quantity purchase calculation function, a full amount purchase calculation function, an Nth portion preferential calculation function, a full quantity increase calculation function, a full quantity reduction calculation function, a fixed price calculation function, etc., but not limited to this, each calculation logic function of the preferential calculation service can calculate each corresponding preferential policy set by the merchant, and obtain the final settlement result by combining the results of the calculations of each function. The specific calculation logic of the preferential calculation service will not be described in detail in this application.

[0078] In step S110, the POS end can upload the generated settlement record information to the server end, and the server end can directly obtain the historical settlement information from the settlement record information. The POS end can obtain and store the settlement record information of the calculated order after completing the order calculation and upload it to the server end. The settlement record information records the historical settlement information. The POS end can upload the obtained settlement record information to the server end in real time, or upload the obtained settlement record information to the server end when a preset time is reached. The preset time may be the arrival of a preset time interval, the receipt of a sending instruction from the server end, etc., which is not specifically limited in this application.

[0079] The above settlement record information may be a settlement log, or directly the above historical settlement information, or other record information containing historical settlement information.

[0080] In one implementation, step S110 may also obtain historical settlement information according to the following steps S111 to S112.

[0081] Step S111: Obtain the settlement log uploaded to the server by each POS terminal.

[0082] Among them, the settlement log in step S111 is the above-mentioned settlement record information, and the settlement log records the historical settlement information of the POS end, that is, the settlement log records the historical input parameter information of each historical settlement order of the POS end and the corresponding historical settlement results. The POS end can generate a settlement log after completing the order calculation, and the generated settlement log includes the input parameter information of the generated historical settlement order and the corresponding settlement result. After generating the settlement log, the POS end can upload the settlement log to the server end in real time, or upload the obtained settlement log to the server end when a preset time is reached. The preset time can be reaching a preset time interval, receiving a sending instruction from the server end, detecting that the POS end is successfully connected to the network, etc., which is not specifically limited in this application. For example, the POS end can upload the generated settlement log to the server end when receiving the log acquisition instruction from the server end, or upload the settlement log generated during this period to the server end once every period of time, or upload the generated settlement log to the server end in real time, which is not specifically limited in this application.

[0083] The settlement log may also include other information, such as customer information, POS device information, POS discount calculation service version information, and other information about settlement. Customer information may include customer account, customer membership duration, etc., but is not limited to this. Other information included in the settlement log may be used for auxiliary discount calculation during traffic playback.

[0084] Step S112: extracting historical settlement information from each settlement log uploaded to the server.

[0085] Since the settlement log includes the historical settlement information of the POS terminal, the server can easily extract the historical settlement information from each settlement log. Specifically, the server can use command line tools such as grep and awk to perform text search and screening from the settlement log to extract the historical settlement information; or, it can also use regular expressions to extract the historical settlement information from the settlement log; or, it can also extract the fields corresponding to the settlement information from the settlement log, and extract the historical settlement information from the extracted fields. Those skilled in the art can choose the specific method of extracting settlement information from the settlement log according to actual needs, and this application does not specifically limit it.

[0086] In this implementation, the POS end uploads the settlement log to the server end, and the server end extracts the historical settlement information from the settlement log. Since the POS end usually has the function of generating logs, the POS end does not need to make major improvements. The POS end only needs to upload the generated settlement log to the server end, and the server end can extract the historical settlement information. As a result, the POS end does not need to improve the execution process, so that the improvement of the POS end during the preferential calculation service test is very small, and the overall process is simpler and easier to implement.

[0087] In a specific embodiment, in step S112, historical settlement information can be extracted from the settlement log according to the following steps S112a to S112b.

[0088] Step S112a: Filter out invalid logs that are invalid for the test updated preferential calculation service from the settlement logs uploaded to the server to obtain valid settlement logs.

[0089] The invalid logs include at least one of the following: settlement logs corresponding to orders without discounts, settlement logs whose version of the original discount calculation service for calculating the settlement results is older than the preset version, and settlement logs whose corresponding POS end is an abnormal POS end. Invalid logs may also include other logs that are invalid for the discount calculation service after the test update, which are not specifically limited in this application.

[0090] The above-mentioned orders without discounts refer to orders that do not use any discounts. For example, if a customer spends a total of 100 yuan, the final calculated settlement information is also 100 yuan. Since this application tests the updated discount calculation service, which is mainly used to calculate discounts for customers' orders based on various discount policies, the discount calculation service is updated and adjusted, which usually has no effect on the calculation of orders that do not use any discounts. Therefore, filtering out the settlement logs corresponding to orders without discounts can better avoid invalid tests, thereby improving the efficiency of service testing through traffic playback.

[0091] The version of the original preferential calculation service for calculating the settlement result is older than the preset version of the settlement log, for example, the version interval between the preferential calculation service version and the updated preferential calculation version may be greater than 3 to 5 versions, or the interval may be greater than other versions, which is not specifically limited in this application. When the version of the original preferential calculation service installed on the POS terminal is too old, the original preferential calculation service installed on the POS terminal and the updated preferential calculation service to be tested have undergone relatively large updates and adjustments, such as the abolition of the original preferential calculation logic, the modification of a large number of original preferential calculation logics, etc. In this case, the historical settlement results in the settlement log of the POS terminal and the test settlement results calculated by the updated preferential calculation service to be tested are prone to inconsistency. This inconsistency does not necessarily mean that the updated preferential calculation service has made an error in calculation, but may be because the preferential calculation logic of the two calculation services has been updated and modified a lot, resulting in inconsistency between the two. Therefore, the preferential calculation results calculated by the preferential calculation service with a too old version have little guiding significance for the test of the updated preferential calculation service, and will generate large traffic playback noise. Filtering out the settlement results with too old versions can reduce traffic playback noise, thereby reducing invalid test data and improving test efficiency and test accuracy.

[0092] When there are illegal operations on the POS side, such as frequent payment failures or suspicious transactions, fraud or violation of payment rules, system misjudgment or operation errors, failure to comply with relevant laws and regulations or merchant agreements, etc., the POS side is an abnormal POS side. Since the abnormal POS side does not use the preferential calculation service to calculate the settlement results normally, the historical settlement information in the generated settlement log has no guiding significance for the test of the updated preferential calculation service. Filtering out the settlement logs of abnormal POS sides can reduce traffic playback noise, thereby reducing invalid test data and improving test efficiency and accuracy.

[0093] Step S112b: extracting historical settlement information from the above-mentioned valid settlement log.

[0094] This embodiment can reduce traffic playback noise and improve test efficiency and test accuracy by filtering out invalid logs that are invalid for testing the updated preferential calculation service from each settlement log.

[0095] In other implementations, invalid settlement logs may not be filtered, but subsequent traffic playback and testing may be performed directly based on historical settlement information in each settlement. This method can also achieve the final service test, which is not specifically limited in this application.

[0096] Step S120: calling the updated discount calculation service to be tested corresponding to the original discount calculation service to recalculate the discount for the above historical input information to obtain a test settlement result.

[0097] The above updated preferential calculation service is the latest updated preferential calculation service that is under testing and has not yet been officially launched.

[0098] In step S120, the updated preferential calculation service is called to recalculate the preferential treatment for the historical input parameter information, that is, the historical input parameter information is input into the updated preferential calculation service, so that the updated preferential calculation service replays the traffic of the historical input parameter information to obtain the test settlement result.

[0099] In a specific embodiment, step S120 can be implemented according to the following steps S121 to S122.

[0100] Step S121: Obtain the preferential activity information of the POS terminal corresponding to the above historical settlement information.

[0101] The promotional information on the POS terminal refers to the promotional policies set by the merchants using the POS terminal. Since the promotional policies set by different merchants are usually different, the promotional information on each POS terminal is usually different.

[0102] In the embodiment of the present application, the preferential policies set by each merchant can be stored in the service end, and each merchant can set his own preferential policies at the setting end. The setting end uploads the preferential policies of the merchant to the service end, so that the service end obtains and saves the preferential activity information of each POS end set and uploaded by the merchant at the setting end, and the service end synchronizes the saved preferential policies to the corresponding POS end, so that the POS end performs preferential calculation based on the preferential policies and through the installed preferential calculation service. The setting end can be an electronic device with data processing function such as a desktop computer, a laptop computer, a tablet computer (pad), a smart watch, a smart phone, a smart TV, a wearable device, a POS machine, etc. used by the merchant, and the setting end and the POS end can be the same device, that is, the merchant sets the preferential policy on the POS end and uploads it to the service end, and the merchant performs preferential calculation through the POS end to obtain the settlement result. In this way, the preferential activity information set by the merchant is sent to the POS end by the service end, which can better ensure the security of the activity data.

[0103] The preferential activity information on the POS side corresponding to the above historical settlement information is the preferential activity information set by the merchant on the POS side corresponding to the historical settlement information.

[0104] Step S122: Based on the preferential activity information of the POS terminal corresponding to the historical settlement information, the updated preferential calculation service corresponding to the original preferential calculation service is called to recalculate the preferential information for the historical input information to obtain the test settlement result.

[0105] Specifically, the preferential activity information of the POS terminal and the above-mentioned historical input information can be input into the updated preferential calculation service, so that the preferential calculation service recalculates the preferential information for the historical input information to obtain the test settlement result.

[0106] In this embodiment, since the server stores the preferential activity information set by each merchant, the server can easily and quickly obtain the preferential activity information of each merchant to perform accurate traffic playback, thereby improving the efficiency of service testing.

[0107] In another specific embodiment, the above-mentioned settlement log may record the preferential activity information of the POS end. In this way, the server end may extract the preferential activity information of the POS end corresponding to the historical settlement information from the settlement log, and call the updated preferential calculation service based on the preferential activity information of the POS end to recalculate the preferential activity for the historical input information and obtain the test settlement result.

[0108] Step S130: Determine the test result of the updated preferential calculation service according to the consistency between the test settlement result and the corresponding historical settlement result.

[0109] When the test settlement result is consistent with the corresponding historical settlement result, it means that the result calculated by the updated discount calculation service will not affect the original discount calculation logic, that is, the calculation logic in the updated discount calculation service is not inconsistent with the calculation logic of the original discount calculation service. In this case, the test result for the historical settlement information is a passed test.

[0110] Specifically, step S130 can be implemented according to the following steps S131 to S133.

[0111] Step S131: Count the number of total weight calculations.

[0112] Step S132: Count the number of consistent recalculations and / or inconsistent recalculations, wherein the consistent recalculation number refers to the number of calculations in which the historical settlement result is consistent with the corresponding test settlement result, and the consistent recalculation number refers to the number of calculations in which the historical settlement result is inconsistent with the corresponding test settlement result.

[0113] The total number of recalculations refers to the total number of times the discount calculation service recalculates discounts after the update in this test. The number of consistent recalculations refers to the number of times the discount calculation service recalculates discounts in this test when the test settlement results are consistent with the corresponding historical settlement results. The number of inconsistent recalculations refers to the number of times the discount calculation service recalculates discounts in this test when the test settlement results are inconsistent with the corresponding historical settlement results.

[0114] In the embodiment of the present application, the total number of tests can be preset, specifically by the test operator. The number of copies of historical settlement information obtained by the server from the POS terminal can be the same as the total number of tests, or can be more than the total number of tests, for the convenience of testing.

[0115] In step S132, either the number of recalculation consistency or the number of recalculation inconsistency may be counted for subsequent determination of the test result, or both the number of recalculation consistency and the number of recalculation inconsistency may be counted for subsequent determination of the test result.

[0116] Step S133: Determine the test result of the updated discount calculation service according to at least two of the total number of recalculation times, the number of recalculation consistency times, and the number of recalculation inconsistency times.

[0117] Specifically, in step S133, the test result of the updated preferential calculation service can be determined as a test pass when the ratio of the number of consistent recalculation times to the total number of recalculation times is greater than a first preset ratio. The first preset ratio can be any ratio between 85% and 95%, or other larger ratios, which are not specifically limited in this application. Alternatively, the test result of the updated preferential calculation service can be determined as a test pass when the ratio of the number of inconsistent recalculations to the total number of recalculation times is less than a second preset ratio. The second preset ratio can be any ratio between 10% and 15%, or other relatively small ratios, which are not specifically limited in this application. Alternatively, the test result of the updated preferential calculation service can be determined as a test pass when the ratio of the number of inconsistent recalculations to the number of consistent recalculations is less than a third preset ratio. The third preset ratio can be any ratio between 0.1 and 0.15. The test results can also be judged according to each number of times in other ways, which are not specifically limited in this application.

[0118] In this embodiment, the test result is determined by recalculating the number of consistent times, the number of inconsistent times and the total number of recalculations, so that the accuracy of the determined test result can be higher.

[0119] In a specific embodiment, the server may include a log processing server and a test server, and the steps S111, S112a to S112b may be executed by the log processing server, and steps S120 to S130 may be executed by the test server. In this embodiment, a log processing server and a test server are set up, and different servers are set up to process different tasks in the test process, thereby improving the test efficiency.

[0120] The present application provides a preferential calculation service testing method, in which a server obtains historical settlement information from the settlement record information uploaded to the server by each POS terminal, wherein the historical settlement information includes historical input parameter information and corresponding historical settlement results, and the historical settlement result is a settlement result obtained by the POS terminal performing preferential calculation on the historical input parameter information through the original preferential calculation service. Since there may be a conflict between the preferential calculation logic of the updated preferential calculation service and the preferential calculation logic of the original preferential calculation service, the server calls the updated preferential calculation service to be tested corresponding to the original preferential calculation service to re-calculate the preferential calculation on the historical input parameter information to obtain a test settlement result. If the calculated test settlement result is consistent with the original historical settlement result, it means that the preferential calculation logic in the updated preferential calculation service does not conflict with that in the original preferential calculation service, thereby indicating that the test result of the updated preferential calculation service is a test pass, that is, the test result of the updated preferential calculation service can be determined based on the consistency between the test settlement result and the corresponding historical settlement result.

[0121] It can be seen that in the scheme provided by the present application, the server can recalculate the historical input information in the historical settlement information obtained from each POS terminal through the updated preferential calculation service, that is, the server replays the flow of the historical settlement information of each POS terminal through the updated preferential calculation service, so that the test process of the updated preferential calculation service can be efficiently realized according to the result of the flow replay (i.e., the test settlement result). Since the server can easily, quickly and comprehensively obtain the historical settlement information of each POS terminal, the server can replay the flow of the historical settlement information of each POS terminal, so that the test of the preferential calculation service can cover each test scenario corresponding to each POS terminal, thereby improving the accuracy of the test. In addition, the test of the preferential calculation service is carried out by automatically obtaining the historical settlement information of each POS terminal through the server to replay the flow, without manual testing, which can reduce the labor cost required for the test and improve the test efficiency.

[0122] In addition, since the preferential calculation service can be deployed in the consumption management application of the POS terminal, it can also be deployed in the consumption management application of other terminals (such as mini programs), the consumption management applications of different terminals can adapt to the usage requirements of different devices. Since the calculation logic of the preferential calculation service of different terminals is the same, the solution provided by this application can complete the multi-terminal logic verification problem after replaying the log traffic of the POS terminal once, and the test efficiency is higher, which further reduces the manpower cost required for the test.

[0123] Embodiment 2

[0124] The preferential computing service testing method provided by the present application is described below through specific examples. The preferential computing service testing method provided in this embodiment is applied to a preferential computing service testing system, which includes a POS terminal, a log processing server terminal and a testing server terminal.

[0125] like Figure 3 As shown, the preferential calculation service testing method provided in this embodiment includes the following steps S1 to S6.

[0126] Step S1: The POS terminal uploads the settlement log to the log processing server.

[0127] Specifically, the POS terminal can sample the locally generated logs and then upload them to the log processing server. When the POS terminal samples the settlement logs, it can remove redundant logs such as similar logs, error logs, and invalid logs from the locally stored settlement logs, thereby sampling the sampled settlement logs and uploading the sampled logs to the log processing server. Similar logs can be, for example, different settlement logs of the same order. This situation may be caused by the settlement personnel's operational errors. Error logs can be, for example, logs of calculation errors marked by merchants or settlement logs of errors in the settlement process. Invalid logs can be, for example, logs that are too long, etc. Those skilled in the art can sample logs according to actual conditions, so that the obtained sampled logs are more effective and improve the efficiency of the test. Since the possible order volume of the POS terminal is very large, uploading all logs to the server may occupy a large amount of computing resources. Therefore, when the POS terminal uploads the sampled logs to the log processing server, a preset number of logs can be randomly selected from the sampled logs and uploaded to the server to reduce the impact of log upload on the POS terminal, and at the same time, it can better avoid multiple invalid tests on similar logs in the future, thereby improving the test efficiency.

[0128] Step S2: The log processing server filters out invalid logs that are invalid for the test updated preferential calculation service from the settlement logs uploaded by each POS terminal, obtains valid settlement logs, and extracts historical settlement information from the valid settlement logs.

[0129] The specific execution process of step S2 is similar to step S112a to step S112b in the first embodiment. The relevant concepts in step S2 can refer to the first embodiment and will not be described in detail here.

[0130] Step S3: The operator triggers a test start instruction.

[0131] Step S4: After receiving the test start instruction triggered by the test operator, the log processing server sends the historical settlement information to the test server.

[0132] Step S5: The test server calls the updated discount calculation service to be tested corresponding to the original discount calculation service to recalculate the discount on the historical input parameter information in the historical settlement information to obtain the test settlement result.

[0133] Specifically, the test server can call the discount calculation service interface, and call the updated discount calculation service through the discount calculation service interface to recalculate the discount.

[0134] Step S6: The test server determines the test result of the updated discount calculation service according to the consistency between the test settlement result and the corresponding historical settlement result.

[0135] The execution process of step S3 to step S6 can refer to the relevant process in the first embodiment, and will not be described in detail in this embodiment.

[0136] In an optional embodiment, step S7 may also be included.

[0137] Step S7: When the test server detects that the test is completed, it ends the test task, closes the historical settlement information transmission channel between the test server and the log server, and deletes the test process usage data.

[0138] Step S7 can save communication resources and data storage resources after the test is completed, thereby providing more computing resources for other tests.

[0139] The above introduces the preferential computing service testing method provided by the present application from the perspective of the interaction between the various ends of the test system. The specific execution process of each step can refer to the relevant description of the first embodiment and will not be described in detail here.

[0140] Embodiment 3

[0141] The third embodiment of the present application provides a preferential calculation service testing method, the execution subject of the method is a POS terminal, and the POS terminal can be a POS machine, a mobile phone, a tablet computer, a laptop computer, etc., or other terminal devices with POS calculation functions.

[0142] like Figure 4 As shown, the preferential computing service testing method provided in the third embodiment of the present application includes the following steps S210.

[0143] Step S210: Upload the settlement record information of the order calculated by the original discount calculation service to the server, wherein the settlement record information records historical settlement information, wherein the historical settlement information includes historical input parameter information and corresponding historical settlement results, wherein the historical settlement result is the settlement result obtained by the POS end through the original discount calculation service performing discount calculation on the historical input parameter information, wherein the settlement record information is used to enable the server to obtain the historical settlement information from the settlement record information, and call the updated discount calculation service to be tested corresponding to the original discount calculation service to recalculate the discount on the historical input parameter information to obtain a test settlement result, and determine the test result of the updated discount calculation service according to the consistency between the test settlement result and the corresponding historical settlement result.

[0144] In one implementation, the above settlement record information may be a settlement log.

[0145] like Figure 4 As shown, step S210 can be implemented according to the following steps S211 to S212.

[0146] Step S211: removing redundant logs from each settlement log of the order calculated by the original discount calculation service to obtain a sample settlement log.

[0147] Step S212: Upload the sample log to the server.

[0148] In a specific embodiment, step S212 can be implemented by following the steps S212a:

[0149] Step S212a: randomly selecting a preset number of logs from the sampled logs and uploading them to the server.

[0150] This embodiment introduces a preferential calculation service testing method from the POS end. The specific execution process and related beneficial effects of this embodiment have been introduced in the first embodiment and the second embodiment, and will not be described in detail here.

[0151] Embodiment 4

[0152] The fourth embodiment of the present application also provides a preferential computing service testing device corresponding to the preferential computing service testing method embodiment provided in the first embodiment above, and the preferential computing service testing device is applied to the server. Since the device embodiment is basically similar to the method embodiment, the description is relatively simple. For the details of the relevant technical features and the effects achieved, please refer to the corresponding description of the preferential computing service testing method embodiment provided in the first embodiment above. Figure 5 As shown, the preferential computing service test device provided by this application includes:

[0153] The acquisition unit 410 is used to acquire historical settlement information from the settlement record information uploaded by each POS terminal to the server terminal, wherein the historical settlement information includes historical input parameter information and corresponding historical settlement results, and the historical settlement results are the settlement results obtained by the POS terminal performing preferential calculation on the historical input parameter information through the original preferential calculation service;

[0154] The traffic playback unit 420 is used to call the updated preferential calculation service to be tested corresponding to the original preferential calculation service to recalculate the preferential information of the historical input parameter to obtain the test settlement result;

[0155] The judgment unit 430 is used to determine the test result of the updated preferential calculation service according to the consistency between the test settlement result and the corresponding historical settlement result.

[0156] Optionally, the acquisition unit is specifically used to: acquire the settlement log uploaded by each POS terminal to the server; and extract historical settlement information from the settlement log.

[0157] Optionally, the acquisition unit is specifically used to: filter out invalid logs that are invalid for the test updated preferential calculation service from the settlement logs to obtain valid settlement logs; and extract historical settlement information from the valid settlement logs.

[0158] Optionally, the invalid log includes at least one of: a settlement log corresponding to an order without a discount, a settlement log whose version of the original discount calculation service for calculating the settlement result is older than a preset version, and a settlement log whose corresponding POS terminal is an abnormal POS terminal.

[0159] Optionally, the traffic playback unit is specifically used to: obtain the promotional activity information of the POS end corresponding to the historical settlement information, wherein the server end stores the promotional activity information set by each merchant; based on the promotional activity information, and calling the updated promotional calculation service corresponding to the original promotional calculation service, re-calculate the promotional information for the historical input information to obtain a test settlement result.

[0160] Optionally, the device also includes: an information synchronization unit, used to obtain and save the promotional activity information of each POS terminal set and uploaded by the merchant on the setting end, and send the saved promotional activity information to the corresponding POS terminal, so that the POS terminal performs promotional calculations based on the promotional activity information and through the installed promotional calculation service.

[0161] Optionally, the server includes a log processing server and a test server;

[0162] The acquisition unit is deployed on the log processing server; the traffic playback unit and the judgment unit are deployed on the test server.

[0163] Optionally, the judgment unit is specifically used to: count the total number of recalculation times; count the number of consistent recalculations and / or the number of inconsistent recalculations, wherein the consistent recalculation times are the number of calculations in which the historical settlement result and the corresponding test settlement result are consistent, and the consistent recalculation times are the number of calculations in which the historical settlement result and the corresponding test settlement result are inconsistent; determine the test result of the updated preferential calculation service based on at least two of the total number of recalculation times, the consistent recalculation times, and the inconsistent recalculation times.

[0164] Embodiment 5

[0165] The fifth embodiment of the present application also provides a preferential computing service test device corresponding to the preferential computing service test method embodiment provided in the third embodiment above, and the preferential computing service test device is applied to the POS terminal. Since the device embodiment is basically similar to the method embodiment, the description is relatively simple. For the details of the relevant technical features and the effects achieved, please refer to the corresponding description of the preferential computing service test method embodiment provided in the third embodiment above. The preferential computing service test device provided by the present application includes:

[0166] An uploading unit is used to upload the settlement record information of the order calculated by the original preferential calculation service to the server, wherein the settlement record information records historical settlement information, and the historical settlement information includes historical input parameter information and corresponding historical settlement results, and the historical settlement result is the settlement result obtained by the POS end through the original preferential calculation service to perform preferential calculation on the historical input parameter information, wherein the settlement record information is used to enable the server to obtain the historical settlement information from the settlement record information, and call the updated preferential calculation service to be tested corresponding to the original preferential calculation service to re-calculate the historical input parameter information to obtain a test settlement result, and determine the test result of the updated preferential calculation service according to the consistency between the test settlement result and the corresponding historical settlement result.

[0167] Optionally, the settlement record information is a settlement log;

[0168] The uploading unit is specifically used for: removing redundant logs in each settlement log of the order calculated by the original discount calculation service to obtain a sample settlement log; and uploading the sample log to the server.

[0169] Optionally, the uploading unit is specifically configured to randomly select a preset number of logs from the sampled logs and upload them to the server.

[0170] Embodiment 6

[0171] The sixth embodiment of the present application also provides an electronic device embodiment corresponding to the above-mentioned preferential computing service test method embodiment and preferential computing service test device embodiment. The following description of the electronic device embodiment is only illustrative. The electronic device embodiment is as follows:

[0172] Please refer to Figure 6 Understand the above electronic device, which is the server, Figure 6 The electronic device provided in this embodiment includes: a processor 1001, a memory 1002, a communication bus 1003, and a communication interface 1004;

[0173] The memory 1002 is used to store computer instructions for data processing. When the computer instructions are read and executed by the processor 1001, the following steps are performed:

[0174] Acquire historical settlement information from the settlement record information uploaded by each POS terminal to the server terminal, wherein the historical settlement information includes historical input parameter information and corresponding historical settlement results, and the historical settlement results are the settlement results obtained by the POS terminal performing preferential calculation on the historical input parameter information through the original preferential calculation service;

[0175] Calling the updated discount calculation service to be tested corresponding to the original discount calculation service to recalculate the discount on the historical input parameter information to obtain a test settlement result;

[0176] The test result of the updated preferential calculation service is determined according to the consistency between the test settlement result and the corresponding historical settlement result.

[0177] Embodiment 7

[0178] The seventh embodiment of the present application also provides an electronic device embodiment corresponding to the above-mentioned preferential computing service test method embodiment and preferential computing service test device embodiment. The following description of the electronic device embodiment is only illustrative. The electronic device embodiment is as follows:

[0179] The electronic device is a POS terminal. The electronic device provided in this embodiment includes: a processor, a memory, a communication bus, and a communication interface;

[0180] The memory is used to store computer instructions for data processing, and when the computer instructions are read and executed by the processor, the following steps are performed:

[0181] The settlement record information of the order calculated by the original preferential calculation service is uploaded to the server, and the historical settlement information is recorded in the settlement record information. The historical settlement information includes historical input parameter information and corresponding historical settlement results. The historical settlement result is the settlement result obtained by the POS end through the original preferential calculation service to perform preferential calculation on the historical input parameter information, wherein the settlement record information is used to enable the server to obtain the historical settlement information from the settlement record information, and call the updated preferential calculation service to be tested corresponding to the original preferential calculation service to re-calculate the historical input parameter information to obtain a test settlement result, and determine the test result of the updated preferential calculation service according to the consistency between the test settlement result and the corresponding historical settlement result.

[0182] Embodiment 8

[0183] The eighth embodiment of the present application also provides a computer-readable storage medium for implementing the above-mentioned preferential computing service testing method. The computer-readable storage medium embodiment provided in this application is described relatively simply, and the relevant parts can refer to the corresponding description of the above-mentioned method embodiment. The embodiment described below is only exemplary.

[0184] The computer readable storage medium provided in this embodiment stores computer instructions, and when the instructions are executed by a processor, the following steps are implemented:

[0185] Acquire historical settlement information from the settlement record information uploaded by each POS terminal to the server terminal, wherein the historical settlement information includes historical input parameter information and corresponding historical settlement results, and the historical settlement results are the settlement results obtained by the POS terminal performing preferential calculation on the historical input parameter information through the original preferential calculation service;

[0186] Calling the updated discount calculation service to be tested corresponding to the original discount calculation service to recalculate the discount on the historical input parameter information to obtain a test settlement result;

[0187] The test result of the updated preferential calculation service is determined according to the consistency between the test settlement result and the corresponding historical settlement result.

[0188] Embodiment 9

[0189] The ninth embodiment of the present application also provides a computer-readable storage medium for implementing the above-mentioned preferential computing service testing method. The computer-readable storage medium embodiment provided in this application is described relatively simply, and the relevant parts can refer to the corresponding description of the above-mentioned method embodiment. The following described embodiment is only illustrative.

[0190] The computer readable storage medium provided in this embodiment stores computer instructions, and when the instructions are executed by a processor, the following steps are implemented:

[0191] The settlement record information of the order calculated by the original preferential calculation service is uploaded to the server, and the historical settlement information is recorded in the settlement record information. The historical settlement information includes historical input parameter information and corresponding historical settlement results. The historical settlement result is the settlement result obtained by the POS end through the original preferential calculation service to perform preferential calculation on the historical input parameter information, wherein the settlement record information is used to enable the server to obtain the historical settlement information from the settlement record information, and call the updated preferential calculation service to be tested corresponding to the original preferential calculation service to re-calculate the historical input parameter information to obtain a test settlement result, and determine the test result of the updated preferential calculation service according to the consistency between the test settlement result and the corresponding historical settlement result.

[0192] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0193] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0194] 1. Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include non-transitory media such as modulated data signals and carrier waves.

[0195] 2. Those skilled in the art should understand that the embodiments of the present application can be provided as methods, systems or computer program products. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0196] Although the present application is disclosed as above in the form of a preferred embodiment, it is not intended to limit the present application. Any technical personnel in this field may make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims of the present application.

Claims

1. A method for testing a preferential computing service, characterized in that: Applied to the server, the method includes: Acquire historical settlement information from the settlement record information uploaded by each POS terminal to the server terminal, wherein the historical settlement information includes historical input parameter information and corresponding historical settlement results, and the historical settlement results are the settlement results obtained by the POS terminal performing preferential calculation on the historical input parameter information through the original preferential calculation service; Calling the updated discount calculation service to be tested corresponding to the original discount calculation service to recalculate the discount on the historical input parameter information to obtain a test settlement result; The test result of the updated preferential calculation service is determined according to the consistency between the test settlement result and the corresponding historical settlement result.

2. The preferential computing service testing method according to claim 1, characterized in that: The step of obtaining historical settlement information from the settlement record information uploaded to the server by each POS terminal includes: Obtain the settlement log uploaded by each POS terminal to the server; The historical settlement information is extracted from the settlement log.

3. The preferential computing service testing method according to claim 2, characterized in that: The extracting historical settlement information from the settlement log includes: Filter out invalid logs that are invalid for the test updated preferential calculation service from the settlement logs to obtain valid settlement logs; The historical settlement information is extracted from the valid settlement log.

4. The preferential computing service testing method according to claim 3, characterized in that: The invalid logs include at least one of: settlement logs corresponding to orders without discounts, settlement logs whose version of the original discount calculation service for calculating the settlement results is older than the preset version, and settlement logs whose corresponding POS end is generated by an abnormal POS end.

5. The preferential calculation service testing method according to any one of claims 1 to 4, characterized in that: The calling of the updated discount calculation service corresponding to the original discount calculation service to recalculate the discount on the historical input parameter information to obtain a test settlement result includes: Obtaining preferential activity information of the POS terminal corresponding to the historical settlement information, wherein the service terminal stores preferential activity information set by each merchant; According to the preferential activity information, the updated preferential calculation service corresponding to the original preferential calculation service is called to recalculate the preferential treatment for the historical input information to obtain a test settlement result.

6. The preferential computing service testing method according to claim 5, characterized in that: Before obtaining the preferential activity information of the POS terminal corresponding to the historical settlement information, the method further includes: Obtain and save the preferential activity information of each POS terminal set and uploaded by the merchant on the setting terminal; The saved preferential activity information is sent to the corresponding POS terminal, so that the POS terminal performs preferential calculation based on the preferential activity information and through the installed preferential calculation service.

7. A method for testing a preferential computing service, characterized in that: Applied to the POS terminal, the method includes: The settlement record information of the order calculated by the original preferential calculation service is uploaded to the server, and the historical settlement information is recorded in the settlement record information. The historical settlement information includes historical input parameter information and corresponding historical settlement results. The historical settlement result is the settlement result obtained by the POS end through the original preferential calculation service to perform preferential calculation on the historical input parameter information, wherein the settlement record information is used to enable the server to obtain the historical settlement information from the settlement record information, and call the updated preferential calculation service to be tested corresponding to the original preferential calculation service to re-calculate the historical input parameter information to obtain a test settlement result, and determine the test result of the updated preferential calculation service according to the consistency between the test settlement result and the corresponding historical settlement result.

8. A preferential computing service testing device, characterized in that: Applied to the server, the device comprises: An acquisition unit is used to acquire historical settlement information from the settlement record information uploaded by each POS terminal to the server terminal, wherein the historical settlement information includes historical input parameter information and corresponding historical settlement results, and the historical settlement result is the settlement result obtained by the POS terminal performing preferential calculation on the historical input parameter information through the original preferential calculation service; A traffic playback unit, used for calling the updated discount calculation service to be tested corresponding to the original discount calculation service to recalculate the discount on the historical input parameter information to obtain a test settlement result; The judgment unit is used to determine the test result of the updated preferential calculation service according to the consistency between the test settlement result and the corresponding historical settlement result.

9. An electronic device, characterized in that: include: A processor, a memory, and computer program instructions stored on the memory and executable on the processor; When the processor executes the computer program instructions, the method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.