Data monitoring method, system and non-transitory computer-readable storage medium
By obtaining order message queues and ordering scenario data, combined with websocket services, the problem of low monitoring efficiency in traditional monitoring methods is solved, and efficient real-time monitoring and flexible testing of online order systems are realized.
Patent Information
- Application Number
- CN202110055131.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-15
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2041-01-15
AI Technical Summary
Traditional data monitoring methods are poor in monitoring flexibility and efficiency, and it is difficult to effectively improve the real-time monitoring efficiency of online order systems.
By obtaining order message queues, storing order data and performing verification logic matching, generating real-time monitoring results, using order-placing scenario data for order testing, combining websocket services to realize remote monitoring and testing, supporting flexible monitoring of multiple order-placing scenarios.
It realizes efficient real-time monitoring of online order systems, improves testing and monitoring efficiency, and supports comprehensive coverage and rapid positioning of abnormal problems in a variety of ordering scenarios.
Smart Images

Figure CN113821398B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of information technology, and in particular to a data monitoring method, system, and non-transitory computer-readable storage medium. Background Art
[0002] When the online order system is running, it will generate a large amount of operation data, such as order status data, order amount data, etc.
[0003] Traditional data monitoring methods are generally poor in monitoring flexibility, so when monitoring the operating data of online order systems, the monitoring efficiency is usually low. Summary of the Invention
[0004] A technical problem solved by the present disclosure is how to improve the efficiency of real-time monitoring of online order systems.
[0005] According to one aspect of the present disclosure, a data monitoring method is provided, including: obtaining a documentary message queue, wherein a plurality of order identifiers are stored in the documentary message queue; separately storing items of order data corresponding to each order identifier in an online order system; separately verifying items of order data corresponding to each order identifier based on verification logic that matches the items of order data corresponding to each order identifier, and obtaining real-time monitoring results of the online order system, wherein the real-time monitoring results include the number of order identifiers that comply with the verification logic, the number of order identifiers that do not comply with the verification logic, and the number of order identifiers to be verified; determining a system health metric value of the online order system based on the real-time monitoring results; and displaying items of order data, the real-time monitoring results, and the system health metric value.
[0006] In some embodiments, separately storing each item of order data corresponding to each order identifier in the online order system includes: determining whether the order identifier corresponding to the current order data in the online order system belongs to multiple order identifiers; if the order identifier corresponding to the current order data belongs to multiple order identifiers, storing the current order data in the database; if the order identifier corresponding to the current order data does not belong to multiple order identifiers, discarding the current order data.
[0007] In some embodiments, the data monitoring method further includes: obtaining an order scenario parameter combination according to the order scenario configuration operation; generating order scenario data according to the order scenario parameter combination; and using the order scenario data to call the order interface to perform an order test.
[0008] In some embodiments, the ordering interface is called using the ordering scenario data to perform an ordering test, including: monitoring whether a test terminal is deployed in the online ordering system; if the test terminal is deployed in the online ordering system, obtaining and running the ordering script instance corresponding to the ordering scenario data, and outputting the ordering report, ordering log and ordering screenshots; if the test terminal is not deployed in the online ordering system, returning an ordering test exception.
[0009] In some embodiments, using order scenario data to call an order interface and perform an order test also includes: when a test terminal is deployed in the online order system, determining whether the test terminal is an Android test terminal or an Apple iOS test terminal; when the test terminal is an Android test terminal, the browser starts the Android canvas, calls the Android mirror display method, and triggers the web socket websocket service of the Android test terminal; the Android test terminal synchronizes the image stream based on the image cache pool imagepool to the browser through the websocket service of the Android test terminal; when the test terminal is an iOS test terminal, the browser starts the Apple canvas iOS canvas, calls the Apple mirror display method, and triggers the websocket service of the iOS test terminal; the iOS test terminal synchronizes the image stream based on the image cache pool imagepool to the browser through the websocket service of the iOS test terminal.
[0010] In some embodiments, the data monitoring method also includes: deploying a websocket service on a test terminal in a production environment; starting a local service and a browser page on a monitoring terminal in an office environment; establishing a websocket connection with the test terminal in the production environment through a browser page; and after the browser page receives a message sent by the test terminal, forwarding the message to the local service.
[0011] In some embodiments, deploying a websocket service on a test terminal in a production environment includes: creating a video stream position displayed on a browser page for each test terminal, and obtaining a video stream position identifier for each test terminal, wherein different video stream positions are bound to different video stream position identifiers; and creating a websocket service for each test terminal based on the video stream position identifier of each test terminal.
[0012] According to another aspect of the present disclosure, a data monitoring system is provided, including: a message queue acquisition module, configured to acquire a documentary message queue, wherein a plurality of order identifiers are stored in the documentary message queue; a data storage module, configured to respectively store items of order data corresponding to each order identifier in an online order system; a data verification module, configured to respectively verify items of order data corresponding to each order identifier according to verification logic matching the items of order data corresponding to each order identifier, and obtain real-time monitoring results of the online order system, wherein the real-time monitoring results include the number of order identifiers that comply with the verification logic, the number of order identifiers that do not comply with the verification logic, and the number of order identifiers to be verified; a metric value determination module, configured to determine a system health metric value of the online order system according to the real-time monitoring results; and a display module, configured to display items of order data, real-time monitoring results, and system health metric values.
[0013] In some embodiments, the data storage module is configured to: determine whether the order identifier corresponding to the current order data in the online order system belongs to multiple order identifiers; if the order identifier corresponding to the current order data belongs to multiple order identifiers, store the current order data in the database; if the order identifier corresponding to the current order data does not belong to multiple order identifiers, discard the current order data.
[0014] In some embodiments, the data monitoring system also includes: a parameter acquisition module, configured to configure operations according to the order scenario to obtain an order scenario parameter combination; a scenario data generation module, configured to generate order scenario data according to the order scenario parameter combination; and an order testing module, configured to use the order scenario data to call the order interface and perform an order test.
[0015] In some embodiments, the order test module is configured to: monitor whether a test terminal is deployed in the online order system; if the test terminal is deployed in the online order system, obtain and run the order script instance corresponding to the order scenario data one by one, and output the order report, order log and order screenshot; if the test terminal is not deployed in the online order system, return an order test exception.
[0016] In some embodiments, the order test module is further configured to: when a test terminal is deployed in the online order system, determine whether the test terminal is an Android test terminal or an Apple system iOS test terminal; when the test terminal is an Android test terminal, enable the browser to start the Android system canvas Android canvas, call the Android system mirror Android mirror display method, and trigger the web socket websocket service of the Android test terminal; enable the Android test terminal to synchronize the image stream based on the image cache pool imagepool to the browser through the websocket service of the Android test terminal; when the test terminal is an iOS test terminal, enable the browser to start the Apple system canvas iOS canvas, call the Apple system mirror iOS mirror display method, and trigger the websocket service of the iOS test terminal; enable the iOS test terminal to synchronize the image stream based on the image cache pool imagepool to the browser through the websocket service of the iOS test terminal.
[0017] In some embodiments, the data monitoring system also includes a communication service module, which is configured to: deploy a websocket service on a test terminal in a production environment; start a local service and a browser page on a monitoring terminal in an office environment; enable the monitoring terminal to establish a websocket connection with the test terminal through a browser page; and enable the browser page to forward a message sent by the test terminal to the local service after receiving the message.
[0018] In some embodiments, the communication service module is configured to: create a video stream position displayed on a browser page for each test terminal, and obtain a video stream position identifier for each test terminal, wherein different video stream positions are bound to different video stream position identifiers; and create a websocket service for each test terminal based on the video stream position identifier of each test terminal.
[0019] According to yet another aspect of the present disclosure, there is provided yet another data monitoring system, including: a memory; and a processor coupled to the memory, wherein the processor is configured to execute the aforementioned data monitoring method based on instructions stored in the memory.
[0020] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, wherein the non-transitory computer-readable storage medium stores computer instructions, and when the instructions are executed by a processor, the aforementioned data monitoring method is implemented.
[0021] The present disclosure can effectively monitor the operating data and operating status of the online order system in real time, thereby improving the efficiency of real-time monitoring of the online order system.
[0022] Other features and advantages of the present disclosure will become apparent from the following detailed description of exemplary embodiments of the present disclosure with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0024] Figure 1 A flow chart of a data monitoring method according to some embodiments of the present disclosure is shown.
[0025] Figure 2 A flow chart of a data monitoring method according to some other embodiments of the present disclosure is shown.
[0026] Figure 3 A flowchart illustrating some embodiments of placing an order for a test is shown.
[0027] Figure 4 A flow chart illustrating a data monitoring method according to some further embodiments of the present disclosure is shown.
[0028] Figure 5 A schematic structural diagram of a data monitoring system according to some embodiments of the present disclosure is shown.
[0029] Figure 6 A structural diagram of a specific application example of the data monitoring system disclosed in the present invention is shown.
[0030] Figure 7 A schematic structural diagram of a data monitoring system according to some other embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0031] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments. The following description of at least one exemplary embodiment is actually only illustrative and is in no way intended to limit the present disclosure and its application or use. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present disclosure.
[0032] First combine Figure 1 Some embodiments of the data monitoring method of the present disclosure are described.
[0033] Figure 1 FIG. 1 is a flow chart showing a data monitoring method according to some embodiments of the present disclosure. Figure 1 As shown, the data monitoring method in these embodiments includes steps S101 to S105.
[0034] In step S101, obtain the documentary message queue.
[0035] The documentary message queue can be obtained from the online ordering system. The documentary message queue stores multiple order IDs, each of which uniquely represents an order in the online ordering system.
[0036] In step S102, each item of order data corresponding to each order identifier in the online order system is stored separately.
[0037] Each item of order data may include, for example, the order status, the SKU (Stock Keeping Unit) of the goods in the order, the name of the goods, the order PIN (Personal Identification Number), and the order time. The specific process for storing each item of order data is as follows: determining whether the order ID corresponding to the current order data in the online order system belongs to multiple order IDs; if so, storing the current order data in the database; if not, discarding the current order data.
[0038] In step S103, each item of order data corresponding to each order identifier is verified according to the verification logic matched with each item of order data corresponding to each order identifier, so as to obtain the real-time monitoring result of the online order system.
[0039] The real-time monitoring results include the number of order identifiers that meet the verification logic, the number of order identifiers that do not meet the verification logic, and the number of order identifiers to be verified.
[0040] In step S104, the system health metric value of the online order system is determined according to the real-time monitoring result.
[0041] For example, the ratio of the number of order identifiers that meet the verification logic to the number of verified order identifiers can be used as a system health metric of the online order system.
[0042] In step S105, various order data, real-time monitoring results and system health metrics are displayed.
[0043] For example, the system health metrics can be displayed intuitively through dashboards, allowing users to more easily know whether there are any abnormalities in the online ordering system.
[0044] The above embodiment fully leverages the capabilities of automated testing. By verifying a large amount of operational data in the online order system, it not only ensures the accuracy of the operational data in the online order system but also provides real-time early warning for the online order system. Therefore, the above embodiment can effectively monitor the operational data and operating status of the online order system in real time, thereby improving the efficiency of real-time monitoring of the online order system.
[0045] The following combination Figure 2 Other embodiments of the data monitoring method disclosed herein are described.
[0046] Figure 2 Schematic diagram showing the flow of data monitoring methods of other embodiments of the present disclosure. Figure 2 As shown, the data monitoring method in these embodiments includes steps S201 to S203.
[0047] In step S201, an order scenario parameter combination is obtained according to the order scenario configuration operation.
[0048] Users can configure order scenarios. Based on the user's order scenario configuration operations, the order scenario parameters obtained may include, for example, a merchant type parameter (indicating merchant classification), a same-store or cross-store parameter (indicating same-store or cross-store), a member ID parameter (indicating whether the order was placed using a member identity), an order terminal type parameter (e.g., Android terminal, iOS terminal, personal computer), and a terminal bit number parameter (e.g., 32-bit, 64-bit). These order scenario parameters together constitute an order scenario parameter combination.
[0049] In step S202, order scenario data is generated according to the order scenario parameter combination.
[0050] The order scenario data is the data used to call the order interface to perform order testing. The order scenario data can be, for example, an order scenario identifier, which represents a specific order scenario uniquely corresponding to the order scenario parameters.
[0051] In step S203, the ordering interface is called using the ordering scenario data to perform an ordering test.
[0052] The above embodiments support data monitoring requirements in various ordering scenarios, ensuring comprehensive coverage of order testing across a wide range of scenarios. When an anomaly is detected in the online ordering system, order scenario configuration can be used to test that specific scenario, quickly reproducing the anomaly and locating its cause. Therefore, the above embodiments enable on-demand, flexible monitoring of the online ordering system, effectively improving both testing efficiency and real-time monitoring efficiency.
[0053] The following combination Figure 3 Some embodiments of ordering tests are described.
[0054] Figure 3 Schematic diagrams of some embodiments of order testing are shown. Figure 3 As shown, Figure 2 Step S203 may specifically include steps S3031 to S3034.
[0055] In step S3031, it is monitored whether a test terminal is deployed in the online order system.
[0056] If the test terminal is not deployed in the online order system, step S3032 is executed. In step S3032, an order test exception is returned.
[0057] If a test terminal is deployed in the online ordering system, steps S3033 and S3034 are executed. In step S3033, the order script instance corresponding to the order scenario data is obtained and executed. In step S3034, the order report, order log, and order screenshots are output.
[0058] In some embodiments, step S303 also includes steps S3035 to S3038.
[0059] If a test terminal is deployed in the online order system, step S3035 is executed. In step S3035, it is determined whether the test terminal is an Android test terminal or an iOS test terminal.
[0060] If the test terminal is an Android test terminal, steps S3036A to S3039A are executed. In step S3036A, the browser activates the Android canvas. In step S3037A, the browser invokes the Android mirror display method. In step S3038A, the browser triggers the websocket service of the Android test terminal. In step S3039A, the Android test terminal synchronizes the image stream from the image pool to the browser via the Android test terminal's websocket service.
[0061] If the test terminal is an iOS test terminal, execute steps S3036B to S3039B. In step S3036B, the browser launches the iOS canvas. In step S3037B, the browser calls the iOS mirror display method. In step S3038B, the browser triggers the iOS test terminal's websocket service. In step S3039B, the iOS test terminal synchronizes the image stream from the image cache pool (imagepool) to the browser via the iOS test terminal's websocket service.
[0062] The above embodiment not only realizes the use of different types of test terminals to perform order testing, but also realizes order testing for different ordering scenarios, and further improves the testing efficiency and real-time monitoring efficiency of the online ordering system.
[0063] The following combination Figure 4 Some further embodiments of the data monitoring method of the present disclosure are described.
[0064] Figure 4 Schematic diagram showing the flow of data monitoring methods according to some other embodiments of the present disclosure. Figure 4 As shown, the data monitoring method in these embodiments includes steps S401 to S403.
[0065] In step S401, a websocket service is deployed on a test terminal in a production environment.
[0066] In some embodiments, a video stream location is first created for each test terminal displayed on a browser page, and a video stream location identifier for each test terminal is obtained, where different video stream locations are associated with different video stream location identifiers. Then, a websocket service is created for each test terminal based on the video stream location identifier of each test terminal. This allows remote viewing of the order test execution of multiple test terminals in a browser, without interfering with each other.
[0067] In step S402, local services and browser pages are started on a monitoring terminal in an office environment.
[0068] In step S403, a websocket connection is established with the test terminal in the production environment through the browser page.
[0069] In step S404, after receiving the message sent by the test terminal, the browser page forwards the message to the local service.
[0070] The above embodiment establishes a communication connection between the office environment and the production environment, enabling the test user to remotely control the test terminal in the production environment from the office environment, further improving the testing efficiency and real-time monitoring efficiency of the online order system.
[0071] The following combination Figure 5 Some embodiments of the disclosed data monitoring system are described.
[0072] Figure 5 FIG. 1 shows a schematic diagram of the structure of a data monitoring system according to some embodiments of the present disclosure. Figure 5 As shown, the data monitoring system 50 includes: a message queue acquisition module 501, configured to obtain a documentary message queue, in which multiple order identifiers are stored; a data storage module 502, configured to respectively store the order data corresponding to each order identifier in the online order system; a data verification module 503, configured to respectively verify the order data corresponding to each order identifier according to the verification logic matching the order data corresponding to each order identifier, and obtain the real-time monitoring result of the online order system, the real-time monitoring result including the number of order identifiers that meet the verification logic, the number of order identifiers that do not meet the verification logic, and the number of order identifiers to be verified; a metric value determination module 504, configured to determine the system health metric value of the online order system according to the real-time monitoring result; a display module 505, configured to display the order data, real-time monitoring results and system health metric value.
[0073] The above embodiment fully leverages the capabilities of automated testing. By verifying a large amount of operational data in the online order system, it not only ensures the accuracy of the operational data in the online order system but also provides real-time early warning for the online order system. Therefore, the above embodiment can effectively monitor the operational data and operating status of the online order system in real time, thereby improving the efficiency of real-time monitoring of the online order system.
[0074] In some embodiments, the data storage module 502 is configured to: determine whether the order identifier corresponding to the current order data in the online order system belongs to multiple order identifiers; if the order identifier corresponding to the current order data belongs to multiple order identifiers, store the current order data in the database; if the order identifier corresponding to the current order data does not belong to multiple order identifiers, discard the current order data.
[0075] In some embodiments, the data monitoring system 50 also includes: a parameter acquisition module 506, which is configured to configure the operation according to the order scenario and obtain the order scenario parameter combination; a scenario data generation module 507, which is configured to generate the order scenario data according to the order scenario parameter combination; and an order testing module 508, which is configured to use the order scenario data to call the order interface and perform an order test.
[0076] The above embodiments support data monitoring requirements in various ordering scenarios, ensuring comprehensive coverage of order testing across a wide range of scenarios. When an anomaly is detected in the online ordering system, order scenario configuration can be used to test that specific scenario, quickly reproducing the anomaly and locating its cause. Therefore, the above embodiments enable on-demand, flexible monitoring of the online ordering system, effectively improving both testing efficiency and real-time monitoring efficiency.
[0077] In some embodiments, the order test module 508 is configured to: monitor whether a test terminal is deployed in the online order system; if a test terminal is deployed in the online order system, obtain and run the order script instance corresponding to the order scenario data one by one, and output the order report, order log and order screenshot; if no test terminal is deployed in the online order system, return an order test exception.
[0078] In some embodiments, the order test module 508 is further configured to: when a test terminal is deployed in the online order system, determine whether the test terminal is an Android test terminal or an Apple system iOS test terminal; when the test terminal is an Android test terminal, enable the browser to start the Android canvas, call the Android mirror display method, and trigger the web socket websocket service of the Android test terminal; enable the Android test terminal to synchronize the image stream based on the image cache pool imagepool to the browser through the websocket service of the Android test terminal; when the test terminal is an iOS test terminal, enable the browser to start the Apple system canvas iOS canvas, call the Apple system mirror iOS mirror display method, and trigger the websocket service of the iOS test terminal; enable the iOS test terminal to synchronize the image stream based on the image cache pool imagepool to the browser through the websocket service of the iOS test terminal.
[0079] The above embodiment not only realizes the use of different types of test terminals to perform order testing, but also realizes order testing for different ordering scenarios, and further improves the testing efficiency and real-time monitoring efficiency of the online ordering system.
[0080] In some embodiments, the data monitoring system 50 also includes a communication service module 509, which is configured to: deploy a websocket service on a test terminal in a production environment; start a local service and a browser page on a monitoring terminal in an office environment; enable the monitoring terminal to establish a websocket connection with the test terminal through a browser page; and enable the browser page to forward a message sent by the test terminal to the local service after receiving the message.
[0081] The above embodiment establishes a communication connection between the office environment and the production environment, enabling the test user to remotely control the test terminal in the production environment from the office environment, further improving the testing efficiency and real-time monitoring efficiency of the online order system.
[0082] In some embodiments, the communication service module 509 is configured to: create a video stream position for each test terminal displayed on the browser page, and obtain the video stream position identifier of each test terminal, wherein different video stream positions are bound to different video stream position identifiers; and create a websocket service for each test terminal based on the video stream position identifier of each test terminal.
[0083] The above embodiment can remotely view the execution of order testing by multiple test terminals in a browser, and the multiple test terminals do not interfere with each other, further improving the testing efficiency and real-time monitoring efficiency of the online order system.
[0084] The following combination Figure 6 A specific application example of the data monitoring system disclosed in the present invention is described.
[0085] Figure 6 FIG. 1 shows a structural diagram of a specific application example of the data monitoring system disclosed in the present invention. Figure 6 As shown, the data monitoring system in this application example has a separate front-end and back-end to facilitate code maintenance, framework upgrades, and future multi-functional expansion. The back-end is used to implement business logic processing, while the front-end is used for data display, scenario configuration, order testing, and more. The data monitoring system specifically includes a front-end presentation layer, an API (Application Programming Interface) layer, a service layer, and a storage layer.
[0086] (1) Front-end display layer
[0087] The front-end display layer mainly displays important data from the monitoring system to users based on the front-end system interface. The front-end display layer includes monitoring display functions, order tracking functions, customized scenario functions, and intelligent ordering functions.
[0088] (1) The monitoring display function is specifically a large screen for displaying data and dashboards. It can show the real-time monitoring results to users, including the number of order IDs that meet the verification logic, the number of order IDs that do not meet the verification logic, and the number of order IDs to be verified. At the same time, the system health quality analysis dashboard is displayed in combination with the real-time monitoring results, which intuitively displays the health status of the online ordering system and provides system health metrics.
[0089] (2) The order tracking function can display detailed fields of monitored orders, including order ID, product SKU, product name, order PIN, order time, online order system name, and monitoring comparison detailed fields, etc. These detailed fields can quickly track monitored orders and provide detailed information on abnormal orders.
[0090] (3) Customized scenario function, which is used to provide users with customized configuration function for ordering scenarios. The ordering scenarios include merchant type parameters, same-store and cross-store parameters, member identification parameters, ordering terminal type parameters, and terminal digit parameters.
[0091] (4) Intelligent ordering function, specifically an interface-based ordering system, which supports determining the corresponding ordering scenario based on the combination of ordering scenario parameters for ordering testing.
[0092] (2) API layer
[0093] The API layer includes a data display interface, a data monitoring interface, a custom scenario interface, and an ordering interface. The data display interface can call the service layer to assist in displaying the monitoring results and health metrics of the online ordering system to users in real time. The data monitoring interface can call the service layer, determine the order data that needs to be monitored based on the obtained order follow-up message queue, and store the order data that needs to be monitored in the Redis database; after obtaining each order data from the Redis database, call the verification logic to perform data verification, thereby assisting in tracking each order data. The custom scenario interface is used to obtain the assembly order scenario parameters from the customized scenario function and automatically generate the assembled order scenario data. The ordering interface is used to call the intelligent ordering function based on the order scenario data to implement the ordering process.
[0094] (3) Service Layer
[0095] The service layer includes message queue service, data comparison service, computing service, intelligent ordering service, device management service, communication service, log service, and email service.
[0096] (1) Message Queue Service
[0097] The message queue service is used to filter out orders from the designated site owner as needed and save them as source data.
[0098] (2) Computing Services
[0099] The calculation service is used to calculate data such as the amount of monitored orders based on verification logic, including data calculations in scenarios such as order placement, order cancellation, and returns.
[0100] (3)Data comparison service
[0101] Compares the calculated results with the online data in the online ordering system to determine whether they are consistent. If they are inconsistent, an alarm is displayed on the monitoring display function by calling the data display interface.
[0102] (4) Intelligent ordering service
[0103] The Smart Ordering service is used to test orders in different ordering scenarios. To implement this functionality, you need to pre-write an ordering script for each scenario. Each script should be named the same as the scenario. After extracting the scenario name, run the script with the same name to test orders in different scenarios.
[0104] To implement order testing for different order scenarios, a WebSocket service needs to be deployed in the system to enable communication between the office and production environments. This allows PCs in the office environment to operate and view test terminals in real time through the terminal management system. After selecting test terminals for execution based on order scenarios (with the ability to set up scheduled test tasks), these order scenarios are distributed to the various test terminals, allowing them to execute the test case scripts.
[0105] The following is a specific example of the order process. Jenkins schedules the corresponding interface order task, then the test framework executes the test based on the Maven test solution and outputs the test results. Maven test execution is scheduled using TestNG's multi-threaded approach. The order instance script is a suite consisting of multiple XML-based order scripts. Input parameters are provided during script execution, either through Parameters or DataProviders. Rest-Asserd then organizes HTTP interface requests, parses the request results, and asserts on the request results to determine whether the order was successful.
[0106] (5) Device management service, used for real-time management of test terminals deployed in the system, including: developing and implementing a test terminal list interface, returning information such as the test terminal's model, system, UDID, status, resolution, IP address, and battery level. Remote control is achieved through multi-node deployment of remote real devices, that is, one computer screen displays multiple test terminal screens, and remotely monitors the status of each mobile phone and the test execution site in real time. The WebSocket mechanism is used to achieve real-time monitoring of test terminals, and a video stream is formed by triggering screenshot requests in real time. At the same time, the number of Android test terminals and iOS test terminals currently in the connected state is monitored in real time. The front-end uses the Vue language to create the video stream position displayed on the browser for each test terminal, and uses the imagepool thread pool to trigger the image stream to ensure the smoothness of the test terminal screen display.
[0107] (6) Communication service. The communication service is built using Tornado, a lightweight Python-based web framework with excellent load-bearing capabilities. This communication service supports debugging of test terminals on the intranet, including APK installation, functional testing, log viewing, screenshots, etc., replacing manual operations with remote control.
[0108] To address the current problem of one-way communication between the office environment and the production environment, a WebSocket service is deployed in the production environment. Test terminals in the production environment send messages to browsers in the office environment through the WebSocket channel. A local service is started on the monitoring terminal in the office environment, and a browser page is launched. After the browser page loads, a WebSocket connection is established with the test terminal in the production environment. After receiving the message, the browser forwards the message content to the local service, thus achieving two-way communication between the production and office environments.
[0109] (7) Log service, used to manage the log records of test task execution, troubleshoot the causes of abnormal problems during test task execution, and review the execution process of each task.
[0110] (8) Email service, which automatically generates and sends monitoring reports to staff members in the form of emails. The monitoring report will record the logs and screenshots of the entire test task in detail. When an abnormal problem is detected, the rich monitoring report can quickly locate the cause of the abnormal problem and quickly resolve the abnormal problem.
[0111] (4) Storage layer
[0112] The storage layer is mainly used to store various order data of the online order system, including customized order scenario parameters, order scenario data, order detailed comparison fields, verification logic data, monitoring result data, system health metrics, etc.
[0113] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only exemplary. For example, the division of the units can be a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0114] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0115] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0116] The following combination Figure 7 Describe some other embodiments of the data monitoring system of the present disclosure.
[0117] Figure 7 FIG. 1 shows a schematic diagram of the structure of a data monitoring system according to another embodiment of the present disclosure. Figure 7 As shown, the data monitoring system 70 includes: a memory 710 and a processor 720 coupled to the memory 710 , and the processor 720 is configured to execute the data monitoring method in any of the aforementioned embodiments based on instructions stored in the memory 710 .
[0118] The memory 710 may include, for example, a system memory, a fixed non-volatile storage medium, etc. The system memory may store, for example, an operating system, application programs, a boot loader, and other programs.
[0119] The data monitoring system 70 may also include an input / output interface 730, a network interface 740, a storage interface 750, and the like. These interfaces 730, 740, 750, as well as the memory 710 and the processor 720, may be connected, for example, via a bus 760. The input / output interface 730 provides a connection interface for input / output devices such as a display, mouse, keyboard, and touch screen. The network interface 740 provides a connection interface for various networked devices. The storage interface 750 provides a connection interface for external storage devices such as SD cards and USB flash drives.
[0120] The present disclosure also includes a non-transitory computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the data monitoring method in any of the aforementioned embodiments.
[0121] If the aforementioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk, and other media that can store program code.
[0122] The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present disclosure. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0123] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0124] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0125] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations 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 clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0126] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0127] The above description is only a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present disclosure should be included in the scope of protection of the present disclosure.
Claims
1. A data monitoring method, comprising: Get the documentary message queue, which stores multiple order identifiers; Store each item of order data corresponding to each order ID in the online order system separately; Verify each item of order data corresponding to each order identifier based on verification logic that matches the item of order data corresponding to each order identifier, and obtain real-time monitoring results of the online order system, wherein the real-time monitoring results include the number of order identifiers that meet the verification logic, the number of order identifiers that do not meet the verification logic, and the number of order identifiers to be verified; Determine a system health metric value of the online order system based on the real-time monitoring results; Display the order data, the real-time monitoring results and the system health metric; Configure operations according to the order scenario and obtain the order scenario parameter combination; Generate order scenario data based on the order scenario parameter combination; Use the order scenario data to call the order interface and conduct order testing.
2. The data monitoring method according to claim 1, wherein: The steps of storing the order data corresponding to each order identifier in the online order system include: Determining whether the order identifier corresponding to the current order data in the online order system belongs to the multiple order identifiers; In a case where the order identifier corresponding to the current order data belongs to the multiple order identifiers, storing the current order data in a database; In a case where the order identifier corresponding to the current order data does not belong to the multiple order identifiers, the current order data is discarded.
3. The data monitoring method according to claim 1, wherein: The ordering test of calling the ordering interface using the ordering scenario data includes: Monitor whether a test terminal is deployed in the online order system; When a test terminal is deployed in the online order system, obtain and run the order script instance corresponding to the order scenario data, and output the order report, order log and order screenshot; If the test terminal is not deployed in the online order system, an order test exception is returned.
4. The data monitoring method according to claim 3, wherein: The ordering test of calling the ordering interface using the ordering scenario data also includes: In the case where a test terminal is deployed in the online order system, determining whether the test terminal is an Android test terminal or an iOS test terminal; When the test terminal is an Android test terminal, the browser starts the Android canvas, calls the Android mirror display method, and triggers the websocket service of the Android test terminal; the Android test terminal synchronizes the image stream based on the image cache pool imagepool to the browser through the websocket service of the Android test terminal; When the test terminal is an iOS test terminal, the browser starts the Apple system canvas iOS canvas, calls the Apple system mirror iOS mirror display method, and triggers the websocket service of the iOS test terminal; the iOS test terminal synchronizes the image stream based on the image cache pool imagepool to the browser through the websocket service of the iOS test terminal.
5. The data monitoring method according to claim 1, further comprising: Deploy the websocket service on the test terminal in the production environment; Launch local services and browser pages on monitoring terminals in office environments; Establish a websocket connection with the test terminal in the production environment through the browser page; After receiving the message sent by the test terminal, the browser page forwards the message to the local service.
6. The data monitoring method according to claim 5, wherein: Deploying the websocket service on a test terminal in a production environment includes: Creating a video stream position displayed on the browser page for each test terminal, and obtaining a video stream position identifier for each test terminal, wherein different video stream positions are bound to different video stream position identifiers; Create a websocket service for each test terminal based on the video stream location identifier of each test terminal.
7. A data monitoring system comprising: A message queue acquisition module is configured to acquire a documentary message queue, wherein the documentary message queue stores multiple order identifiers; A data storage module is configured to store each item of order data corresponding to each order identifier in the online order system; a data verification module configured to verify each item of order data corresponding to each order identifier based on verification logic matching the item of order data corresponding to each order identifier, and obtain real-time monitoring results of the online order system, wherein the real-time monitoring results include the number of order identifiers that meet the verification logic, the number of order identifiers that do not meet the verification logic, and the number of order identifiers to be verified; a metric value determination module configured to determine a system health metric value of the online order system based on the real-time monitoring result; A display module is configured to display the order data, the real-time monitoring results and the system health metric value; The parameter acquisition module is configured to configure the operation according to the order scenario and obtain the order scenario parameter combination; A scenario data generation module is configured to generate order scenario data according to a combination of order scenario parameters; The order test module is configured to use the order scenario data to call the order interface to perform order testing.
8. The data monitoring system according to claim 7, wherein: The data storage module is configured as follows: Determining whether the order identifier corresponding to the current order data in the online order system belongs to the multiple order identifiers; In a case where the order identifier corresponding to the current order data belongs to the multiple order identifiers, storing the current order data in a database; In a case where the order identifier corresponding to the current order data does not belong to the multiple order identifiers, the current order data is discarded.
9. The data monitoring system according to claim 7, wherein: The order test module is configured as follows: Monitor whether a test terminal is deployed in the online order system; When a test terminal is deployed in the online order system, obtain and run the order script instance corresponding to the order scenario data, and output the order report, order log and order screenshot; If the test terminal is not deployed in the online order system, an order test exception is returned.
10. The data monitoring system according to claim 9, wherein: The order testing module is further configured to: In the case where a test terminal is deployed in the online order system, determining whether the test terminal is an Android test terminal or an iOS test terminal; When the test terminal is an Android test terminal, the browser starts the Android canvas, calls the Android mirror display method, and triggers the websocket service of the Android test terminal; the image stream of the image cache pool imagepool of the Android test terminal is synchronized to the browser through the websocket service of the Android test terminal; When the test terminal is an iOS test terminal, the browser starts the Apple system canvas iOS canvas, calls the Apple system mirror iOS mirror display method, and triggers the websocket service of the iOS test terminal; the image stream of the iOS test terminal based on the image cache pool imagepool is synchronized to the browser through the websocket service of the iOS test terminal.
11. The data monitoring system according to claim 7, further comprising a communication service module configured to: Deploy the websocket service on the test terminal in the production environment; Launch local services and browser pages on monitoring terminals in office environments; Enable the monitoring terminal to establish a websocket connection with the test terminal through the browser page; After the browser page receives the message sent by the test terminal, the browser page forwards the message to the local service.
12. The data monitoring system according to claim 11, wherein: The communication service module is configured to: Creating a video stream position displayed on the browser page for each test terminal, and obtaining a video stream position identifier for each test terminal, wherein different video stream positions are bound to different video stream position identifiers; Create a websocket service for each test terminal based on the video stream location identifier of each test terminal.
13. A data monitoring system comprising: Memory; as well as A processor coupled to the memory, wherein the processor is configured to execute the data monitoring method according to any one of claims 1 to 6 based on instructions stored in the memory.
14. A non-transitory computer-readable storage medium, wherein: The non-transitory computer-readable storage medium stores computer instructions, and when the instructions are executed by a processor, the data monitoring method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Method and system for evaluating order quality
CN107067178A