CN108052440B - Method, device, equipment and storage medium for correcting operation logic of business system - Google Patents

Method, device, equipment and storage medium for correcting operation logic of business system Download PDF

Info

Publication number
CN108052440B
CN108052440B CN201711407947.4A CN201711407947A CN108052440B CN 108052440 B CN108052440 B CN 108052440B CN 201711407947 A CN201711407947 A CN 201711407947A CN 108052440 B CN108052440 B CN 108052440B
Authority
CN
China
Prior art keywords
test
abnormal
function
behavior data
module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711407947.4A
Other languages
Chinese (zh)
Other versions
CN108052440A (en
Inventor
王威
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Pension Insurance Corp
Original Assignee
Ping An Pension Insurance Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Pension Insurance Corp filed Critical Ping An Pension Insurance Corp
Priority to CN201711407947.4A priority Critical patent/CN108052440B/en
Publication of CN108052440A publication Critical patent/CN108052440A/en
Application granted granted Critical
Publication of CN108052440B publication Critical patent/CN108052440B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • G06F11/3476Data logging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention relates to a method and a device for correcting operation logic of a business system, computer equipment and a computer readable storage medium. The method for correcting the operation logic of the service system comprises the following steps: receiving an operation request of a terminal to a service system; writing behavior data corresponding to the operation request into a system log; when monitoring that the service system generates abnormity, acquiring abnormal information; selecting corresponding behavior data from the system log according to the abnormal information; simulating operation according to the selected behavior data to perform testing to obtain a testing result; determining a corresponding abnormal operation request according to the test result; and feeding back indication information to the terminal, wherein the indication information is used for indicating the terminal to correct the operation logic corresponding to the abnormal operation request. By implementing the method for correcting the operation logic of the service system, the terminal can be indicated to correct the operation logic corresponding to the abnormal operation request, the problem occurring when the terminal operates the service system is solved, and the reliability of the service system is improved.

Description

Method, device, equipment and storage medium for correcting operation logic of business system
Technical Field
The present invention relates to the field of system testing, and in particular, to a method and an apparatus for modifying service system operating logic, a computer device, and a computer-readable storage medium.
Background
At present, a business system can be used by a plurality of users, some problems can be generated in the using process, but because only the interface of the business system is displayed on the page of the business system, the code cannot be directly displayed, and the problem of the business system is difficult to directly see according to the code. Therefore, the system log is created, data generated during the operation of the business system is written into the system log, and the data in the system log is analyzed to analyze where the business system has problems.
However, when the user uses the service system, the problem may also occur due to the incorrect operation logic for operating the service system, but since this is not a problem generated by the service system itself, it is difficult to analyze the system log by the conventional method to analyze which step of the operation logic is a problem, so that the problem cannot be repaired, and the reliability of the service system is also reduced.
Disclosure of Invention
Therefore, it is necessary to provide a method, an apparatus, a computer device, and a computer-readable storage medium for correcting the operation logic of the business system, in order to solve the problems that the business system cannot be repaired and the reliability of the business system is reduced.
A method of modifying business system operating logic, the method comprising:
receiving an operation request of a terminal to a service system;
writing behavior data corresponding to the operation request into a system log;
when monitoring that the service system generates abnormity, acquiring abnormal information;
selecting corresponding behavior data from the system log according to the abnormal information;
simulating operation according to the selected behavior data to perform testing to obtain a testing result;
determining a corresponding abnormal operation request according to the test result;
and feeding back indication information to the terminal, wherein the indication information is used for indicating the terminal to correct the operation logic corresponding to the abnormal operation request.
In one embodiment, the method further comprises:
analyzing the abnormal information to obtain an abnormal time point;
the simulating operation according to the selected behavior data to perform the test to obtain a test result comprises:
selecting a test node closest to the abnormal time point;
calling a function code according to the function point identification in the selected test node;
and driving the function code according to the function parameters in the selected test node to obtain a test result.
In one embodiment, the selecting corresponding behavior data from the system log according to the abnormal information includes:
generating a test time period according to the abnormal time point and the system log;
and selecting the behavior data matched with the test time period from the system log.
In one embodiment, the behavior data includes a function point identification and a corresponding function parameter; before the operation is simulated according to the selected behavior data to perform the test and the test result is obtained, the method further comprises the following steps:
analyzing the selected behavior data to obtain a plurality of function point identifications;
and packaging the plurality of function point identifications and corresponding function parameters to a plurality of test nodes according to the time sequence of the plurality of function point identifications in the test time period, wherein the plurality of test nodes correspond to the plurality of function point identifications one to one.
In one embodiment, the method further comprises:
when the obtained test result is not matched with the abnormal information, then
Reselecting the test nodes according to the sequence; the sequence is the sequence that the intervals between the time points corresponding to the reselected test nodes and the abnormal time points are gradually increased;
and driving the function codes according to the function parameters in the reselected test nodes according to the sequence until the obtained test result is matched with the abnormal information.
In one embodiment, the method further comprises:
analyzing the system log to count the data volume transmitted when each function code is called;
and dynamically allocating system resources for each function code according to the counted data volume.
An apparatus for modifying business system operating logic, the apparatus comprising:
the receiving module is used for receiving an operation request of a terminal to a service system;
the writing module is used for writing the behavior data corresponding to the operation request into a system log;
the acquisition module is used for acquiring abnormal information when monitoring that the service system generates abnormality;
the selecting module is used for selecting corresponding behavior data from the system log according to the abnormal information;
the test module is used for simulating operation according to the selected behavior data to perform testing to obtain a test result;
the determining module is used for determining a corresponding abnormal operation request according to the test result;
and the feedback module is used for feeding back indication information to the terminal, wherein the indication information is used for indicating the terminal to correct the operation logic corresponding to the abnormal operation request.
In one embodiment, the apparatus further comprises:
the analysis module is used for analyzing the abnormal information to obtain an abnormal time point;
the selection module is also used for selecting the test node closest to the abnormal time point;
the calling module is used for calling the function codes according to the function point identifiers in the selected test nodes;
and the test module is also used for driving the function code according to the function parameters in the selected test node to obtain a test result.
A computer-readable storage medium, storing a computer program which, when executed by a processor, causes the processor to perform the steps of the method as claimed in any one of the above.
A computer device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method of any one of the above.
According to the method, the device, the computer equipment and the computer readable storage medium for correcting the operation logic of the service system, after the operation request of the service system is received, behavior data corresponding to the operation request is written into the system log. And when monitoring that the service system is abnormal, acquiring abnormal information, selecting behavior data from the system log according to the abnormal information, and testing according to the selected behavior data. After the test result is obtained, the corresponding abnormal operation request is determined according to the test result, so that which step in the operation logic has a problem can be analyzed according to the abnormal operation request, and the operation logic of the service system is judged to be required to be corrected. And then, the indication information is fed back to the terminal, so that the terminal can be indicated to correct the operation logic corresponding to the abnormal operation request, the problem occurring when the terminal operates the service system is solved, and the reliability of the service system is improved.
Drawings
FIG. 1 is a diagram of an application environment for a method for modifying business system operating logic in one embodiment;
FIG. 2 is a flow diagram illustrating a method for modifying business system operating logic in one embodiment;
FIG. 3 is a flow diagram illustrating testing according to test nodes and exception information in one embodiment;
FIG. 4 is a flow chart illustrating a method for modifying the operating logic of a business system in another embodiment;
FIG. 5 is a block diagram of an apparatus for modifying business system operating logic in one embodiment;
FIG. 6 is a schematic structural diagram of an apparatus for modifying business system operating logic in another embodiment;
FIG. 7 is a block diagram of an apparatus for modifying business system operating logic in one embodiment;
FIG. 8 is a schematic structural diagram of an apparatus for modifying the operating logic of a business system in another embodiment;
FIG. 9 is a block diagram of an apparatus for modifying business system operating logic in one embodiment;
FIG. 10 is a diagram showing an internal configuration of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
FIG. 1 is a diagram of an application environment of a method for modifying business system operating logic in one embodiment. Referring to fig. 1, the method for modifying the service system operating logic is applied to a system for modifying the service system operating logic. The system for modifying the operation logic of the business system includes the terminal 110 and the server 120. The terminal 110 and the server 120 are connected through a network. The terminal 110 may specifically be a desktop terminal or a mobile terminal, and the mobile terminal may specifically be at least one of a mobile phone, a tablet computer, a notebook computer, and the like. The server 120 may be implemented as a stand-alone server or a server cluster composed of a plurality of servers.
In one embodiment, as shown in FIG. 2, a method of modifying business system operating logic is provided. The embodiment is mainly illustrated by applying the method to the server 120 in fig. 1. Referring to fig. 2, the method for modifying the service system operation logic specifically includes the following steps:
s202, receiving an operation request of the terminal to the service system.
The business system is a system for handling business online. The operation request is a request for information to operate the business system. The operation request may specifically be a request for triggering a function code of the service system using the input device, or may be a request for data transmission with the service system.
In one embodiment, a terminal receives driving information sent by a mouse, and triggers a click request on an interface of a service system according to a corresponding coordinate of the driving information; and if the page element at the position specified by the click request corresponds to the function code, sending an operation request for triggering the function code to the server.
In one embodiment, after receiving an operation request of a terminal to a service system, a server operates the service system according to the operation request, generates a new page element after operating the service system, and feeds the new page element back to the terminal to instruct the terminal to adjust an interface of the service system according to the new page element.
And S204, writing behavior data corresponding to the operation request into a system log.
Wherein the behavior data is data reflecting user behavior. The behavior data may specifically be at least one of a function code triggered by the operation request, a function parameter when the function code is triggered, a page element triggered by the operation request, and a coordinate when the page element is triggered by the operation request. The system log is a log for recording daily events in the system and dynamic change information of corresponding software and hardware of the system. The system log may specifically record behavior data corresponding to the operation request, and may also record abnormal information generated when the service system is operated or operated.
In an embodiment, the operation request sent by the terminal may be an HTTP (HyperText Transfer Protocol) request, and the server analyzes the HTTP request sent by the terminal to obtain a header of the HTTP request, where the header includes a Cookie (account information), a referrer (reference), a User-agent (User agent), an IP address of the User, a login name of the User, and the like, and writes the header of the HTTP request into the system log through the filter.
And S206, when monitoring that the service system is abnormal, acquiring abnormal information.
The exception is specifically that the operation of the service system is different from usual, for example, the data volume transmitted by the service system is far larger or far smaller than usual, the service system cannot handle the service, and the time-space pointer or the array of the operation service system is out of bounds. The abnormal information is information when the business system generates an abnormality. The abnormality information may specifically be at least one of a time point at which an abnormality occurs, a time period during which the abnormality continues, data generated when the service system occurs an abnormality, and the like. The method comprises the steps of collecting abnormal information, and specifically obtaining the abnormal information from a presentation layer, a business logic layer and a data access layer of a business system by using a script engine.
In one embodiment, when the server calls the function code according to the received operation request, the calling result is null, the script engine is used for acquiring the time point when the function code is called and the called function code from the business logic layer, and the acquired time point and the called function code are written into the system log as exception information.
And S208, selecting corresponding behavior data from the system log according to the abnormal information.
The time for recording the abnormal information and the time for recording the system log are also recorded, and corresponding behavior data is selected from the system log according to the abnormal information, specifically, the behavior data at the corresponding time point is selected from the system log according to the time point for recording the abnormal information.
In one embodiment, the server analyzes the abnormal information, obtains the time period of the abnormal duration, and selects the behavior data recorded in the corresponding time period from the system log according to the obtained time period.
And S210, simulating operation according to the selected behavior data to perform testing to obtain a testing result.
Wherein the simulation operation is an operation of a simulation user. Specifically, the operation of the user can trigger the service system to call and run the function code and the function parameter, and the simulation operation specifically calls and runs the function code and the function parameter and the like through behavior data to simulate the operation of the user.
In one embodiment, the server obtains the corresponding function code and the function parameter according to the selected behavior data, and drives the function code by using the function parameter to obtain the test result. If the test result is matched with the abnormal information, determining the selected behavior data as the behavior data causing the abnormal operation of the service system, and analyzing the behavior data to repair the abnormal operation of the service system; and if the test result is not matched with the abnormal information, reselecting the behavior data.
S212, determining a corresponding abnormal operation request according to the test result.
Wherein the abnormal operation request is an operation request causing an abnormality. The corresponding abnormal operation request is determined according to the test result, specifically, the corresponding behavior data is determined according to the test result, the abnormal operation request is determined according to the determined behavior data, and when the server operates the service system according to the determined abnormal operation request, the determined behavior data is recorded to a system log.
And S214, feeding back indication information to the terminal, wherein the indication information is used for indicating the terminal to correct the operation logic corresponding to the abnormal operation request.
Wherein the operating logic is logic that operates a business system. The operating logic may specifically comprise an operating step. The indication information specifically includes an abnormal step in the operation logic corresponding to the abnormal operation request, and may further include a correct step corresponding to the abnormal step.
In one embodiment, after the server sends the indication information to the terminal, the terminal returns an abnormal step corresponding to the indication information according to the indication information. And after the terminal sends the information for withdrawing the abnormal operation request, the terminal resends the operation request for the service system according to the correct step in the indication information.
In one embodiment, the server sends the indication information to the terminal. The terminal initiates a request for restarting the service, and after the server returns a response agreeing to the service restart, the operation request to the service system when the service is restarted is checked according to the indication information.
In this embodiment, after receiving an operation request for a service system, behavior data corresponding to the operation request is written into a system log. And when monitoring that the service system is abnormal, acquiring abnormal information, selecting behavior data from the system log according to the abnormal information, and testing according to the selected behavior data. After the test result is obtained, the corresponding abnormal operation request is determined according to the test result, so that which step in the operation logic has a problem can be analyzed according to the abnormal operation request, and the operation logic of the service system is judged to be required to be corrected. And then, the indication information is fed back to the terminal, so that the terminal can be indicated to correct the operation logic corresponding to the abnormal operation request, the problem occurring when the terminal operates the service system is solved, and the reliability of the service system is improved.
In one embodiment, after the server performs testing according to the behavior data, an obtained testing result indicates that the functional parameters and/or the functional codes corresponding to the behavior data have bugs, and the functional parameters and/or the functional codes with bugs are repaired according to the testing result.
In one embodiment, the server monitors the click position of the terminal on the webpage, and generates a webpage thermodynamic diagram according to the coordinates of the click position and the corresponding click time. And when the server simulates operation according to the selected behavior data to test, extracting the coordinates of the corresponding click position from the webpage thermodynamic diagram according to the time point corresponding to the behavior data, and acquiring the function code according to the page element corresponding to the coordinates of the click position. And acquiring functional parameters from the behavior data, and sequentially using the functional parameters to drive the functional codes acquired according to the webpage thermodynamic diagrams according to the time when the clicking position is clicked so as to simulate the operation of the business system.
In one embodiment, the method for modifying the service system operation logic further includes: analyzing the abnormal information to obtain an abnormal time point; step S210 includes: selecting a test node closest to the abnormal time point; calling a function code according to the function point identification in the selected test node; and driving the function code according to the function parameter in the selected test node to obtain a test result.
Wherein the abnormal time point is a time point in the abnormal information. The abnormal time point is specifically a time point at which the abnormal information is generated. A test node is a node that stores behavioral data of a test. The function point identification is an identification of the function code. The function point identifier may specifically be a function key, for example, a function for implementing access control, and the key may be private, protected, or public, and a corresponding function code may be called according to the function key. The function code is code that implements a function. The function code may specifically be a computer function. The function parameter is a parameter that the function parameter is a driver function code.
And selecting the test node closest to the abnormal time point, wherein the time point and/or the time period recorded by the selected test node is/are closest to the abnormal time point. The function code is called, and specifically, the function code corresponding to the function point identifier may be called from a database. The function code is driven according to the selected function parameter in the test node, specifically, the function parameter is written into the function code, and the function code written with the function parameter is run to obtain a running result.
Referring to fig. 3, in an embodiment, the server obtains an abnormal time point 312 from the abnormal information 310, reads time points in the test nodes, and selects the test node 302 with the recorded time point closest to the abnormal time point. After the test node 302 is selected, the function code is called according to the function point identification in the test node 302, and the called function code is driven by the function parameter in the test node 302 to realize the simulation operation and obtain the test result.
In this embodiment, the abnormal time point is obtained by analyzing the abnormal information, the test node is selected according to the abnormal time point, and the test is performed by using the function point identifier and the function parameter in the test node, so that the situation when the abnormality occurs can be simulated as much as possible to determine where the problem specifically appears.
In one embodiment, step S208 includes: generating a test time period according to the abnormal time point and the system log; and selecting the behavior data matched with the test time period in the system log.
Wherein the test time period is a time period in which behavior data requiring a test is recorded. The test time period may be generated according to the abnormal time point and the system log, specifically, the test time period may be generated according to the frequency of the system log for recording the behavior data at the abnormal time point, for example, if the frequency of the system log for recording the behavior data at the abnormal time point is high, the generated test time period is short, whereas if the frequency of the system log for recording the behavior data at the abnormal time point is low, the generated test time period is long. The behavior data matched with the test time period is selected from the system log, and specifically, the behavior data recorded in the test time period is selected according to the time recorded in the system log.
In one embodiment, the server determines a corresponding time point in the system log according to the abnormal time point, and analyzes behavior data recorded in the system log within five minutes before and after the determined time point to obtain the frequency of recording the behavior data by the system log. If the frequency is higher than the maximum value of the preset interval, selecting three minutes before and after the abnormal time point as a test time period; if the frequency is within a preset interval, selecting five minutes before and after an abnormal time point as a test time period; and if the frequency is lower than the minimum value of the preset interval, selecting eight minutes before and after the abnormal time point as a test time period. And after the test time period is selected, selecting the behavior data matched with the test time period in the system log.
In this embodiment, the test time period is generated according to the abnormal time point and the system log, and the behavior data matched with the test time period is selected from the system log, so that the behavior data recorded when the abnormality occurs can be more reasonably selected, and the behavior data causing the abnormality occurrence is prevented from being omitted.
In one embodiment, the behavioral data includes a functional point identification and corresponding functional parameters; before step S208, the method further includes: analyzing the selected behavior data to obtain a plurality of function point identifications; and packaging the plurality of function point identifications and corresponding function parameters to a plurality of test nodes according to the time sequence of the plurality of function point identifications in the test time period, wherein the plurality of test nodes correspond to the plurality of function point identifications one to one.
Referring to fig. 3, in an embodiment, the server parses the selected behavior data to obtain a plurality of function point identifiers, and packages the plurality of function point identifiers and corresponding function parameters into the test nodes 300, 302, 304, 306, and 308 one by one according to a time sequence of the plurality of function point identifiers in the test time period.
In this embodiment, the function point identifiers are packaged to the test nodes one by one according to the time sequence in the test time period, so that the behavior data in the test nodes can be subdivided, and the behavior data causing the occurrence of the anomaly can be found out more easily.
In one embodiment, the method further comprises: when the obtained test result is not matched with the abnormal information, reselecting the test node according to the sequence; the sequence is the sequence that the intervals between the time points corresponding to the reselected test nodes and the abnormal time points are gradually increased; and driving the function codes according to the function parameters in the reselected test nodes according to the sequence until the obtained test result is matched with the abnormal information.
The test result is matched with the abnormal information, and specifically, the test result may be consistent with the abnormal information.
Referring to fig. 3, in an embodiment, when the server simulates operation according to the function point identifier and the function parameter recorded by the test node 302, and an obtained test result is not matched with the abnormal information, and an interval between the time point of the test node 300 and the abnormal time point is smaller than an interval between the time point of the test node 300 and the abnormal time point, the test node 300 is reselected, and a test is performed according to the reselected test node 300. If the test obtained by the test according to the test node 300 is matched with the abnormal information, determining a corresponding abnormal operation request according to the test result; if the test result from the test of the test node 300 does not match the exception information, the test node 304 is reselected. The combination of the function codes and the function parameters corresponding to the test node 304 and the test nodes 306 and 308 can simulate a complete operation, and the test nodes 304, 306 and 308 are simultaneously selected to perform the simulation operation, so as to obtain the test result.
In this embodiment, when the obtained test result is not matched with the exception information, the test nodes are reselected according to the sequence that the interval of the time points is gradually increased, so that the exception caused by the delay can be tested.
In one embodiment, the method further comprises: analyzing the system log to count the data volume transmitted when each function code is called; and dynamically allocating system resources for each function code according to the statistical data volume.
Wherein the System Resource (System Resource) is a System Resource Heap (System Resource Heap). The system resources are dynamically allocated to each function code, and specifically, at least one of a Central Processing Unit (CPU) resource, a Memory (Memory) resource, and a Graphics Processing Unit (GPU) may be allocated.
In one embodiment, the server performs concurrent testing of the service system, and monitors the called times of each function code during data transmission when performing multi-thread data transmission with the testing server. And the server dynamically allocates the system resources of each function code according to the monitored times.
In this embodiment, the used rate of each function code when the service system is used in a large scale is determined by counting the data volume transmitted when each function code is called, so as to adjust the system resources allocated by each function code, thereby avoiding the problem of the service system caused by uneven allocation of the system resources of the service system.
In one embodiment, the server extracts an IP (internet protocol) address corresponding to the terminal from the system log, analyzes the IP address to obtain an identifier of an area where the terminal is located, and counts the number of times that all terminals trigger function codes in the system log and the identifier of the area where the terminal is located to obtain an association relationship between the identifier of the area where the terminal is located and the number of times that the terminal triggers the function codes.
Fig. 4 is a flowchart illustrating a method for modifying the operating logic of the business system in one embodiment. The method specifically comprises the following steps:
s402, receiving an operation request of the terminal to the service system.
S404, monitoring the clicked position on the page of the business system.
S406, a coordinate point corresponding to the clicked position is obtained.
S408, counting the time point of each clicked page element according to the corresponding coordinate of the page element on the page of the service system and the corresponding coordinate point of the clicked position.
And S410, writing the behavior data corresponding to the operation request and the clicked time point of the page element into a system log.
And S412, when the abnormal condition of the service system is monitored, acquiring abnormal information.
And S414, analyzing the abnormal information to obtain an abnormal time point.
And S416, generating a test time period according to the abnormal time point and the system log.
S418, selecting behavior data matched with the test time period and the clicked page element from the system log, wherein the behavior data comprises a function point identifier and corresponding function parameters.
And S420, analyzing the selected behavior data to obtain a plurality of function point identifications.
S422, according to the time point of each clicked page element, counting the number of times that the function codes corresponding to the plurality of function point identifiers are triggered.
S424, according to the time sequence of the functional point identifications in the testing time period, packaging the functional point identifications, the number of times that the corresponding functional codes are triggered and the corresponding functional parameters to a plurality of testing nodes.
And S426, selecting the test node closest to the abnormal time point.
S428, according to the function point identification in the selected test node and the number of triggered times of the corresponding function code, calling the function code with the same number of times according to the triggered times.
And S430, driving the function code according to the selected function parameter in the test node to obtain a test result.
S432, when the obtained test result is not matched with the abnormal information, the test node is reselected according to the sequence.
And S434, driving the function codes according to the function parameters in the reselected test node according to the sequence until the obtained test result is matched with the abnormal information.
And S436, determining a corresponding abnormal operation request according to the test result.
And S438, feeding back indication information to the terminal, wherein the indication information is used for indicating the terminal to correct the operation logic corresponding to the abnormal operation request.
According to the method for correcting the operation logic of the service system, after the operation request of the service system is received, behavior data corresponding to the operation request is written into a system log. And when monitoring that the service system is abnormal, acquiring abnormal information, selecting behavior data from the system log according to the abnormal information, and testing according to the selected behavior data. After the test result is obtained, the corresponding abnormal operation request is determined according to the test result, so that which step in the operation logic has a problem can be analyzed according to the abnormal operation request, and the operation logic of the service system is judged to be required to be corrected. And then, the indication information is fed back to the terminal, so that the terminal can be indicated to correct the operation logic corresponding to the abnormal operation request, the problem occurring when the terminal operates the service system is solved, and the reliability of the service system is improved.
It should be understood that, although the steps in the flowchart of fig. 4 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in fig. 4 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
Fig. 5 is a schematic structural diagram of an apparatus 500 for modifying the operating logic of a business system, the apparatus comprising: a receiving module 502, a writing module 504, an acquisition module 506, a selection module 508, a testing module 510, a determination module 512, and a feedback module 514.
A receiving module 502, configured to receive an operation request from a terminal to a service system.
And a writing module 504, configured to write behavior data corresponding to the operation request into the system log.
And the acquisition module 506 is configured to acquire abnormal information when the abnormal condition of the service system is monitored.
And a selecting module 508, configured to select corresponding behavior data from the system log according to the abnormal information.
The test module 510 is configured to simulate an operation according to the selected behavior data to perform a test, so as to obtain a test result.
The determining module 512 is configured to determine a corresponding abnormal operation request according to the test result.
And a feedback module 514, configured to feed back indication information to the terminal, where the indication information is used to indicate the terminal to modify an operation logic corresponding to the abnormal operation request.
After receiving the operation request to the service system, the correcting device for the service system operation logic writes the behavior data corresponding to the operation request into the system log. And when monitoring that the service system is abnormal, acquiring abnormal information, selecting behavior data from the system log according to the abnormal information, and testing according to the selected behavior data. After the test result is obtained, the corresponding abnormal operation request is determined according to the test result, so that which step in the operation logic has a problem can be analyzed according to the abnormal operation request, and the operation logic of the service system is judged to be required to be corrected. And then, the indication information is fed back to the terminal, so that the terminal can be indicated to correct the operation logic corresponding to the abnormal operation request, the problem occurring when the terminal operates the service system is solved, and the reliability of the service system is improved.
As shown in fig. 6, in one embodiment, the apparatus further comprises: the analysis module 516 is configured to analyze the abnormal information to obtain an abnormal time point; the selecting module 508 is further configured to select a test node closest to the abnormal time point; a calling module 518, configured to call a function code according to the function point identifier in the selected test node; the test module 510 is further configured to drive the function code according to the selected function parameter in the test node, so as to obtain a test result.
As shown in fig. 7, in one embodiment, the apparatus further comprises: a time period generating module 520, configured to generate a test time period according to the abnormal time point and the system log; the selecting module 518 is further configured to select behavior data matching the test time period from the system log.
In one embodiment, the behavioral data includes a functional point identification and corresponding functional parameters; as shown in fig. 8, the apparatus further includes: the analysis module 522 is configured to analyze the selected behavior data to obtain a plurality of function point identifiers; the encapsulating module 524 is configured to encapsulate the plurality of function point identifiers and the corresponding function parameters into a plurality of test nodes according to a time sequence of the plurality of function point identifiers in the test time period, where the plurality of test nodes correspond to the plurality of function point identifiers one to one.
In an embodiment, the selecting module 508 is further configured to reselect the test node according to the sequence when the obtained test result does not match the abnormal information; the sequence is the sequence that the intervals between the time points corresponding to the reselected test nodes and the abnormal time points are gradually increased; the test module 510 is further configured to drive the function code according to the function parameters in the reselected test node in sequence until the obtained test result matches the exception information.
In an embodiment, the analyzing module 516 is further configured to analyze the system log to count the amount of data transmitted when each function code is called; as shown in fig. 9, the apparatus further includes: and the allocating module 526 is configured to dynamically allocate system resources for each function code according to the counted data amount.
In one embodiment, a computer device is provided, which may be a server or a mobile terminal. When the computer device is a server, its internal structure diagram may be as shown in fig. 10. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method of modifying business system operating logic. Those skilled in the art will appreciate that the architecture shown in fig. 10 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, the modification apparatus for the service system operating logic provided in the present application may be implemented in the form of a computer program, and the computer program may be run on a computer device as shown in fig. 10. The memory of the computer device may store various program modules constituting the modification apparatus of the pair of business system operation logics, such as the receiving module 502, the writing module 504, the collecting module 506, the selecting module 508, the testing module 510, the determining module 512, and the feedback module 514 shown in fig. 5. The computer program formed by the program modules enables the processor to execute the steps of the method for modifying the operation logic of the business system of the embodiments of the application described in the specification.
A computer device comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to perform the steps of the method of: receiving an operation request of a terminal to a service system; writing behavior data corresponding to the operation request into a system log; when monitoring that the service system generates abnormity, acquiring abnormal information; selecting corresponding behavior data from the system log according to the abnormal information; simulating operation according to the selected behavior data to perform testing to obtain a testing result; determining a corresponding abnormal operation request according to the test result; and feeding back indication information to the terminal, wherein the indication information is used for indicating the terminal to correct the operation logic corresponding to the abnormal operation request.
After receiving an operation request for the service system, the computer device writes behavior data corresponding to the operation request into a system log. And when monitoring that the service system is abnormal, acquiring abnormal information, selecting behavior data from the system log according to the abnormal information, and testing according to the selected behavior data. After the test result is obtained, the corresponding abnormal operation request is determined according to the test result, so that which step in the operation logic has a problem can be analyzed according to the abnormal operation request, and the operation logic of the service system is judged to be required to be corrected. And then, the indication information is fed back to the terminal, so that the terminal can be indicated to correct the operation logic corresponding to the abnormal operation request, the problem occurring when the terminal operates the service system is solved, and the reliability of the service system is improved.
In one embodiment, the computer program, when executed by the processor, further causes the processor to perform the steps of the method of: analyzing the abnormal information to obtain an abnormal time point; the processor executes simulation operation according to the selected behavior data to perform testing, and the step of obtaining a testing result comprises the following steps: selecting a test node closest to the abnormal time point; calling a function code according to the function point identification in the selected test node; and driving the function code according to the function parameter in the selected test node to obtain a test result.
In one embodiment, the processor performs the step of selecting corresponding behavior data from the system log according to the exception information, including: generating a test time period according to the abnormal time point and the system log; and selecting the behavior data matched with the test time period in the system log.
In one embodiment, the behavioral data includes a functional point identification and corresponding functional parameters; before the step of the processor executing the simulation operation according to the selected behavior data to perform the test and obtaining the test result, the processor further executes the following steps of: analyzing the selected behavior data to obtain a plurality of function point identifications; and packaging the plurality of function point identifications and corresponding function parameters to a plurality of test nodes according to the time sequence of the plurality of function point identifications in the test time period, wherein the plurality of test nodes correspond to the plurality of function point identifications one to one.
In one embodiment, the computer program, when executed by the processor, further causes the processor to perform the steps of the method of: when the obtained test result is not matched with the abnormal information, reselecting the test node according to the sequence; the sequence is the sequence that the intervals between the time points corresponding to the reselected test nodes and the abnormal time points are gradually increased; and driving the function codes according to the function parameters in the reselected test nodes according to the sequence until the obtained test result is matched with the abnormal information.
In one embodiment, the computer program, when executed by the processor, further causes the processor to perform the steps of the method of: analyzing the system log to count the data volume transmitted when each function code is called; and dynamically allocating system resources for each function code according to the statistical data volume.
A computer-readable storage medium, storing a computer program which, when executed by a processor, causes the processor to perform the steps of the method of: receiving an operation request of a terminal to a service system; writing behavior data corresponding to the operation request into a system log; when monitoring that the service system generates abnormity, acquiring abnormal information; selecting corresponding behavior data from the system log according to the abnormal information; simulating operation according to the selected behavior data to perform testing to obtain a testing result; determining a corresponding abnormal operation request according to the test result; and feeding back indication information to the terminal, wherein the indication information is used for indicating the terminal to correct the operation logic corresponding to the abnormal operation request.
The storage medium writes behavior data corresponding to the operation request into a system log after receiving the operation request to the service system. And when monitoring that the service system is abnormal, acquiring abnormal information, selecting behavior data from the system log according to the abnormal information, and testing according to the selected behavior data. After the test result is obtained, the corresponding abnormal operation request is determined according to the test result, so that which step in the operation logic has a problem can be analyzed according to the abnormal operation request, and the operation logic of the service system is judged to be required to be corrected. And then, the indication information is fed back to the terminal, so that the terminal can be indicated to correct the operation logic corresponding to the abnormal operation request, the problem occurring when the terminal operates the service system is solved, and the reliability of the service system is improved.
In one embodiment, the computer program, when executed by the processor, further causes the processor to perform the steps of the method of: analyzing the abnormal information to obtain an abnormal time point; the processor executes simulation operation according to the selected behavior data to perform testing, and the step of obtaining a testing result comprises the following steps: selecting a test node closest to the abnormal time point; calling a function code according to the function point identification in the selected test node; and driving the function code according to the function parameter in the selected test node to obtain a test result.
In one embodiment, the processor performs the step of selecting corresponding behavior data from the system log according to the exception information, including: generating a test time period according to the abnormal time point and the system log; and selecting the behavior data matched with the test time period in the system log.
In one embodiment, the behavioral data includes a functional point identification and corresponding functional parameters; before the step of the processor executing the simulation operation according to the selected behavior data to perform the test and obtaining the test result, the processor further executes the following steps of: analyzing the selected behavior data to obtain a plurality of function point identifications; and packaging the plurality of function point identifications and corresponding function parameters to a plurality of test nodes according to the time sequence of the plurality of function point identifications in the test time period, wherein the plurality of test nodes correspond to the plurality of function point identifications one to one.
In one embodiment, the computer program, when executed by the processor, further causes the processor to perform the steps of the method of: when the obtained test result is not matched with the abnormal information, reselecting the test node according to the sequence; the sequence is the sequence that the intervals between the time points corresponding to the reselected test nodes and the abnormal time points are gradually increased; and driving the function codes according to the function parameters in the reselected test nodes according to the sequence until the obtained test result is matched with the abnormal information.
In one embodiment, the computer program, when executed by the processor, further causes the processor to perform the steps of the method of: analyzing the system log to count the data volume transmitted when each function code is called; and dynamically allocating system resources for each function code according to the statistical data volume.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. Any reference to memory, databases, or other media used in the embodiments provided herein may include non-volatile memory.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (12)

1. A method of modifying business system operating logic, the method comprising:
receiving an operation request of a terminal to a service system;
writing behavior data corresponding to the operation request into a system log;
when monitoring that the service system generates abnormity, acquiring abnormal information; the abnormal information comprises at least one of a time point when the abnormality occurs, a time period when the abnormality lasts and data generated when the service system generates the abnormality;
analyzing the abnormal information to obtain an abnormal time point;
selecting corresponding behavior data from the system log according to the abnormal information, and selecting a test node closest to the abnormal time point;
calling a function code according to the function point identification in the selected test node;
driving the function code according to the function parameters in the selected test node to obtain a test result;
determining a corresponding abnormal operation request according to the test result;
and feeding back indication information to the terminal, wherein the indication information is used for indicating the terminal to correct the operation logic corresponding to the abnormal operation request.
2. The method of claim 1, wherein selecting corresponding behavior data from the system log according to the anomaly information comprises:
generating a test time period according to the abnormal time point and the system log;
and selecting the behavior data matched with the test time period from the system log.
3. The method of claim 2, wherein the behavior data comprises a function point identification and corresponding function parameters; after selecting corresponding behavior data from the system log according to the abnormal information, the method further comprises:
analyzing the selected behavior data to obtain a plurality of function point identifications;
and packaging the plurality of function point identifications and corresponding function parameters to a plurality of test nodes according to the time sequence of the plurality of function point identifications in the test time period, wherein the plurality of test nodes correspond to the plurality of function point identifications one to one.
4. The method of claim 1, further comprising:
when the obtained test result is not matched with the abnormal information, reselecting the test node according to the sequence; the sequence is the sequence that the intervals between the time points corresponding to the reselected test nodes and the abnormal time points are gradually increased;
and driving the function codes according to the function parameters in the reselected test nodes according to the sequence until the obtained test result is matched with the abnormal information.
5. The method according to any one of claims 1 to 4, further comprising:
analyzing the system log to count the data volume transmitted when each function code is called;
and dynamically allocating system resources for each function code according to the counted data volume.
6. An apparatus for modifying business system operating logic, the apparatus comprising:
the receiving module is used for receiving an operation request of a terminal to a service system;
the writing module is used for writing the behavior data corresponding to the operation request into a system log;
the acquisition module is used for acquiring abnormal information when monitoring that the service system generates abnormality; the abnormal information comprises at least one of a time point when the abnormality occurs, a time period when the abnormality lasts and data generated when the service system generates the abnormality;
the analysis module is used for analyzing the abnormal information to obtain an abnormal time point;
the selecting module is used for selecting corresponding behavior data from the system log according to the abnormal information and selecting a test node closest to the abnormal time point;
the calling module is used for calling the function codes according to the function point identifiers in the selected test nodes;
the test module is used for driving the function code according to the function parameters in the selected test node to obtain a test result;
the determining module is used for determining a corresponding abnormal operation request according to the test result;
and the feedback module is used for feeding back indication information to the terminal, wherein the indication information is used for indicating the terminal to correct the operation logic corresponding to the abnormal operation request.
7. The apparatus of claim 6, further comprising:
the time period generating module is used for generating a test time period according to the abnormal time point and the system log;
the selecting module is further configured to select the behavior data matched with the test time period from the system log.
8. The apparatus of claim 7, wherein the behavior data comprises a function point identification and corresponding function parameters; the device further comprises:
the analysis module is used for analyzing the selected behavior data to obtain a plurality of function point identifications;
and the packaging module is used for packaging the plurality of functional point identifications and the corresponding functional parameters to a plurality of test nodes according to the time sequence of the plurality of functional point identifications in the test time period, wherein the plurality of test nodes correspond to the plurality of functional point identifications one to one.
9. The apparatus of claim 6,
the selecting module is further used for re-selecting the test nodes according to the sequence when the obtained test result is not matched with the abnormal information; the sequence is the sequence that the intervals between the time points corresponding to the reselected test nodes and the abnormal time points are gradually increased;
and the test module is also used for driving the function codes according to the function parameters in the reselected test nodes in sequence until the obtained test result is matched with the abnormal information.
10. The apparatus according to any one of claims 6 to 9, wherein the analysis module is further configured to analyze the system log to count an amount of data transmitted when each function code is called;
the device further comprises:
and the distribution module is used for dynamically distributing system resources for each functional code according to the counted data volume.
11. A computer-readable storage medium, storing a computer program which, when executed by a processor, causes the processor to carry out the steps of the method according to any one of claims 1 to 5.
12. A computer device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method according to any one of claims 1 to 5.
CN201711407947.4A 2017-12-22 2017-12-22 Method, device, equipment and storage medium for correcting operation logic of business system Active CN108052440B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711407947.4A CN108052440B (en) 2017-12-22 2017-12-22 Method, device, equipment and storage medium for correcting operation logic of business system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711407947.4A CN108052440B (en) 2017-12-22 2017-12-22 Method, device, equipment and storage medium for correcting operation logic of business system

Publications (2)

Publication Number Publication Date
CN108052440A CN108052440A (en) 2018-05-18
CN108052440B true CN108052440B (en) 2021-03-23

Family

ID=62131465

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711407947.4A Active CN108052440B (en) 2017-12-22 2017-12-22 Method, device, equipment and storage medium for correcting operation logic of business system

Country Status (1)

Country Link
CN (1) CN108052440B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108762966A (en) * 2018-06-05 2018-11-06 中国平安人寿保险股份有限公司 System exception hold-up interception method, device, computer equipment and storage medium
CN109697456B (en) * 2018-11-21 2021-02-09 华为技术有限公司 Service analysis method, device, equipment and storage medium
CN110716817B (en) * 2019-09-10 2024-06-25 中国平安财产保险股份有限公司 System operation fault processing method and device, storage medium and electronic equipment
CN111625815B (en) * 2020-05-26 2023-09-26 牛津(海南)区块链研究院有限公司 Data transaction method and device based on trusted execution environment
CN112631934A (en) * 2020-12-30 2021-04-09 上海高顿教育科技有限公司 Method and device for testing software online problems

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104517206A (en) * 2013-09-27 2015-04-15 ***通信集团黑龙江有限公司 Business processing method and device
CN105447057A (en) * 2014-09-28 2016-03-30 克拉玛依红有软件有限责任公司 Model transforming method and system based on business logic model
CN105678434A (en) * 2014-11-18 2016-06-15 金蝶软件(中国)有限公司 Verification information publishing method and system in ERP system

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7043400B2 (en) * 2003-11-10 2006-05-09 Microsoft Corporation Testing using policy-based processing of test results
CN102043682B (en) * 2011-01-27 2013-04-10 中国农业银行股份有限公司 Workflow exception handing method and system
CN105320572B (en) * 2014-06-27 2019-02-22 腾讯科技(深圳)有限公司 Browser abnormality eliminating method, apparatus and system
CN104090839B (en) * 2014-07-02 2017-03-15 中国银行股份有限公司 Abnormal scene analog detection method and device
CN104182683B (en) * 2014-07-30 2017-10-13 中国工商银行股份有限公司 A kind of monitoring method of online transaction, apparatus and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104517206A (en) * 2013-09-27 2015-04-15 ***通信集团黑龙江有限公司 Business processing method and device
CN105447057A (en) * 2014-09-28 2016-03-30 克拉玛依红有软件有限责任公司 Model transforming method and system based on business logic model
CN105678434A (en) * 2014-11-18 2016-06-15 金蝶软件(中国)有限公司 Verification information publishing method and system in ERP system

Also Published As

Publication number Publication date
CN108052440A (en) 2018-05-18

Similar Documents

Publication Publication Date Title
CN108052440B (en) Method, device, equipment and storage medium for correcting operation logic of business system
CN109302522B (en) Test method, test device, computer system, and computer medium
CN109766256B (en) Method and device for testing H5 page performance in application program and computer equipment
CN111045952B (en) Software testing method, flow playback device, terminal equipment and readable storage medium
CN107733708B (en) Equipment parameter configuration method and device, computer equipment and storage medium
CN111026645B (en) User interface automatic test method and device, storage medium and electronic equipment
US20160224400A1 (en) Automatic root cause analysis for distributed business transaction
US10084637B2 (en) Automatic task tracking
CN111475376A (en) Method and device for processing test data, computer equipment and storage medium
CN110737639A (en) Audit log method, device, computer equipment and storage medium
CN111045879A (en) Pressure test report generation method and device and storage medium
US10942832B2 (en) Real time telemetry monitoring tool
US11169910B2 (en) Probabilistic software testing via dynamic graphs
WO2015122872A1 (en) Client application profiling
US10191844B2 (en) Automatic garbage collection thrashing monitoring
US10432490B2 (en) Monitoring single content page application transitions
CN114185763A (en) Dynamic allocation method, device, storage medium and electronic equipment
CN114185920A (en) Log data processing method and device, computer equipment and storage medium
CN114238091A (en) Resident interactive service cluster testing method and system
CN114385457A (en) Application program data acquisition method, device, equipment and storage medium
CN109240906B (en) Database configuration information adaptation method and device, computer equipment and storage medium
CN110515834B (en) Interface testing method and device, mobile terminal and storage medium
CN112671615A (en) Method, system and storage medium for collecting operation behavior data of front-end user
CN108108369B (en) Method and device for processing calling error of common interface library
CN112199229A (en) Data processing method, device, equipment and storage medium

Legal Events

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