Business execution detection method and apparatus

CN117332022BActive Publication Date: 2026-08-18SICHUAN LVYUANJI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311471643.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-06
Publication Date
2026-08-18
Estimated Expiration
2043-11-06

AI Technical Summary

Technical Problem

[0004]本申请实施例提供了一种业务执行检测方法及装置,以至少解决相关技术中业务执行流程检测较为困难的技术问题

Benefits of technology

[0015] In this embodiment, multiple business models are created to display the execution status of business processes on a visual interface. Each business model is used to execute different business processes. The executable actions and post-execution business states of the multiple business models are extracted from a pre-determined relation table. A directed graph is then determined based on these actions and post-execution business states, representing the action paths of the multiple business models. One or more target business processes are executed according to target instructions, forming one or more execution paths for these target business processes. The execution paths of the target business processes are compared with the paths in the directed graph, and the comparison results determine whether the execution paths of the target business processes conflict with the paths in the directed graph. By displaying the business execution process through a directed graph, the purpose of intuitively displaying the business execution process is achieved, thereby reducing the difficulty of detecting business processes and solving the technical problem of difficult business execution process detection in related technologies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117332022B_ABST
    Figure CN117332022B_ABST
Patent Text Reader

Abstract

The application discloses a business execution detection method and device. The method comprises the following steps: creating a plurality of business models, the business model is used for displaying the state of business execution on a visual interface, and the plurality of business models are respectively used for executing different businesses; extracting the actions executable by the plurality of business models and the business states after the actions are executed from a predetermined relationship table, and determining the directed graph among the plurality of business models based on the actions executable by the plurality of business models and the business states after the actions are executed, wherein the directed graph is used for representing the action path of the plurality of business models for executing the business; executing one or more target businesses according to a target instruction, forming the execution path of the one or more target businesses, and comparing the execution path of the target business with the path in the directed graph, and determining whether the execution path of the target business conflicts with the path in the directed graph according to the comparison result. The application solves the technical problem that the business execution process detection is difficult in the related art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of Internet technology, and more specifically, to a business execution detection method and apparatus. Background Technology

[0002] In a business system, when we click the register or place an order button on the interface, the front end requests an interface, and the back end processes the data accordingly to fulfill the functional requirements by executing tasks. However, this process has the following problems: In the project team, only the developers are clear about the execution order of the tasks. But as the system becomes more complex and the time goes by, in most cases, we have to look at the source code comments and product prototypes to understand it again, which takes a lot of time. At the same time, when designing product prototypes, for some complex business, we may not know which business processes are executed at the bottom layer of a certain function. When designing new functions, conflicts may arise with the original business processes. When testers test the product, the function can be executed normally after clicking a button, but sometimes the data stored in the database may be incorrect. For example, when editing data, some fields are not updated, and when adding data, the values ​​in the data are incorrect, but the presentation on the interface is correct.

[0003] There is currently no effective solution to the above problems. Summary of the Invention

[0004] This application provides a business execution detection method and apparatus to at least solve the technical problem that business execution process detection is difficult in related technologies.

[0005] According to one aspect of the embodiments of this application, a business execution detection method is provided, comprising: creating multiple business models, wherein the business models are used to display the state of business execution on a visual interface, and the multiple business models are respectively used to execute different businesses; extracting the executable actions and the business state after the actions of the multiple business models from a predetermined relation table, and determining a directed graph between the multiple business models based on the executable actions and the business state after the actions of the multiple business models, wherein the directed graph is used to represent the action path of the multiple business models executing businesses; executing one or more target businesses according to target instructions to form one or more execution paths of the target businesses, and comparing the execution paths of the target businesses with the paths in the directed graph, and determining whether the execution paths of the target businesses conflict with the paths in the directed graph based on the comparison result.

[0006] Optionally, determining a directed graph among the multiple business models based on a pre-determined relation table includes: extracting multiple types of fields from the relation table that correspond one-to-one with the index, business model, execution action, state before the action is executed, and state after the action is executed, wherein the index represents the business state of the business model after executing the execution action; and determining the directed graph based on the multiple types of fields.

[0007] Optionally, determining the directed graph based on the multiple types of fields includes: determining the first type of fields corresponding to the index and the business model as vertices of the directed graph; determining the second type of fields corresponding to the execution action as arcs of the directed graph; determining the third type of fields corresponding to the state before the action is executed as the arc head of the directed graph; and determining the fourth type of fields corresponding to the state after the action is executed as the arc tail of the directed graph. The directed graph is determined based on the vertices, arcs, arc heads, and arc tails of the directed graph.

[0008] Optionally, determining the directed graph based on the vertices, arcs, heads, and tails of the directed graph includes: connecting the vertices of the directed graph sequentially through the arcs of the directed graph, wherein vertices with the same first type of field and the same third type of field are determined as the tails of the directed graph, and vertices with the same first type of field and the same fourth type of field are determined as the heads of the directed graph.

[0009] Optionally, executing one or more target services according to target instructions to form one or more execution paths for the target services includes: extracting fields corresponding to the target service model, fields corresponding to the target actions to be performed by the target service, and fields corresponding to the business states before and after the execution of the target service from the pre-determined relational table; determining a target directed graph for executing the target service based on the fields corresponding to the target service model, the fields corresponding to the target actions to be performed by the target service, and the fields corresponding to the business states before and after the execution of the target service; determining the vertices in the target directed graph used to represent the target service model as the starting point of the execution path of the target service; determining the vertices in the target directed graph used to represent the index as multiple nodes in the execution path of the target service; and sequentially connecting the starting point of the execution path of the target service with the multiple nodes according to the order of business state changes to obtain the execution path of the target service.

[0010] Optionally, determining whether the execution path of the target service conflicts with the path in the directed graph based on the comparison result includes: determining the direction of the path displayed in the directed graph, comparing the direction of the path displayed in the directed graph with the direction of the execution path of the target service; if the comparison result shows that the direction of the execution path of the target service is opposite to the direction of the path displayed in the directed graph, it is determined that the execution path of the target service conflicts with the existing service; otherwise, it is determined that the execution path corresponding to the target service is normal.

[0011] Optionally, determining whether the execution path of the target service conflicts with the path in the directed graph based on the comparison results includes: if there are multiple execution paths corresponding to the target service and the multiple execution paths corresponding to the multiple target services contain the same path, determining that there is the same service among the multiple target services; if the execution paths of the multiple target services contain a reverse path, determining that there is a service conflict among the multiple target services.

[0012] According to another aspect of the embodiments of this application, a business execution detection device is also provided, comprising: a creation module, configured to create multiple business models, wherein the business models are used to display the state of business execution on a visual interface, and the multiple business models are respectively used to execute different businesses; a determination module, configured to extract the executable actions of the multiple business models and the business state after the actions are executed from a pre-determined relation table, and determine a directed graph between the multiple business models based on the executable actions of the multiple business models and the business state after the actions are executed, wherein the directed graph is used to represent the action path of the multiple business models executing businesses; and a detection module, configured to execute one or more target businesses according to a target instruction, forming one or more execution paths of the target businesses, and comparing the execution paths of the target businesses with the paths in the directed graph, and determining whether the execution paths of the target businesses conflict with the paths in the directed graph based on the comparison result.

[0013] According to another aspect of the embodiments of this application, an electronic device is also provided, including: a memory for storing program instructions; and a processor connected to the memory for executing the program instructions for the following functions: creating multiple business models, wherein the business models are used to display the state of business execution on a visual interface, and the multiple business models are used to execute different businesses respectively; extracting the executable actions of the multiple business models and the business state after the actions are executed from a predetermined relation table, and determining a directed graph between the multiple business models based on the executable actions of the multiple business models and the business state after the actions are executed, wherein the directed graph is used to represent the action path of the multiple business models executing businesses; executing one or more target businesses according to target instructions, forming one or more execution paths of the target businesses, and comparing the execution paths of the target businesses with the paths in the directed graph, and determining whether the execution paths of the target businesses conflict with the paths in the directed graph based on the comparison result.

[0014] According to another aspect of the embodiments of this application, a non-volatile storage medium is also provided, the non-volatile storage medium including a stored computer program, wherein the device where the non-volatile storage medium is located executes the above-mentioned business execution detection method by running the computer program.

[0015] In this embodiment, multiple business models are created to display the execution status of business processes on a visual interface. Each business model is used to execute different business processes. The executable actions and post-execution business states of the multiple business models are extracted from a pre-determined relation table. A directed graph is then determined based on these actions and post-execution business states, representing the action paths of the multiple business models. One or more target business processes are executed according to target instructions, forming one or more execution paths for these target business processes. The execution paths of the target business processes are compared with the paths in the directed graph, and the comparison results determine whether the execution paths of the target business processes conflict with the paths in the directed graph. By displaying the business execution process through a directed graph, the purpose of intuitively displaying the business execution process is achieved, thereby reducing the difficulty of detecting business processes and solving the technical problem of difficult business execution process detection in related technologies. Attached Figure Description

[0016] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments of this application and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0017] Figure 1This is a hardware structure block diagram of a computer terminal for implementing a business execution detection method according to an embodiment of this application;

[0018] Figure 2 This is a flowchart of a service execution detection method according to an embodiment of this application;

[0019] Figure 3 This is a schematic diagram of a directed graph of a business execution process according to an embodiment of this application;

[0020] Figure 4 This is a schematic diagram of an undirected graph of a business execution process according to an embodiment of this application;

[0021] Figure 5 This is a structural diagram of a service execution detection device according to an embodiment of this application. Detailed Implementation

[0022] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0023] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0024] In related technologies, within a business system, when a user clicks the "Register" or "Place Order" button on the interface, the front-end requests an interface, and the back-end processes the data accordingly, fulfilling functional requirements through task execution. However, this process presents several problems: In a project team, only developers are generally aware of the task execution order. However, as the system becomes increasingly complex and time passes, understanding often requires reviewing source code comments and product prototypes, which is time-consuming. Furthermore, when designing product prototypes, for complex business scenarios, the underlying business processes executed by a particular function may not be clear. New functions may conflict with existing business processes. When testing the product, a button click might execute correctly, but sometimes the data stored in the database might be incorrect. For example, some fields might not be updated when editing data, or the values ​​in the data might be incorrect when adding data, even though the interface displays correctly. To address the difficulty of detecting business execution processes in the aforementioned related technologies and improve detection efficiency, this application provides a business execution detection method. This method can run on... Figure 1 The computer terminal shown is described in detail below.

[0025] The service execution detection method embodiments provided in this application can be executed on mobile terminals, computer terminals or similar computing devices. Figure 1 A hardware block diagram of a computer terminal for implementing a business execution detection method is shown. Figure 1 As shown, the computer terminal 10 may include one or more processors (shown as 102a, 102b, ..., 102n in the figure) (the processor may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 104 for storing data, and a transmission module 106 for communication functions. In addition, it may also include: a display, a keyboard, a cursor control device, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, and a BUS bus. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, computer terminal 10 may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0026] It should be noted that the aforementioned one or more processors and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be implemented wholly or partially as software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be wholly or partially integrated into any other element in the computer terminal 10. As involved in the embodiments of this application, the data processing circuits serve as processor control (e.g., selection of a variable resistor termination path connected to an interface).

[0027] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the service execution detection method in this embodiment. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby realizing the aforementioned service execution detection method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor, and these remote memories can be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0028] The transmission module 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission module 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission module 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.

[0029] The display may be, for example, a touchscreen liquid crystal display (LCD) that allows the user to interact with the user interface of the computer terminal 10.

[0030] It should be noted here that, in some optional embodiments, the above... Figure 1 The computer device shown may include hardware elements (including circuitry), software elements (including computer code stored on a computer-readable medium), or a combination of both hardware and software elements. It should be noted that... Figure 1 This is only one instance of a specific particular instance, and is intended to illustrate the types of components that may exist in the aforementioned computer devices.

[0031] In the above operating environment, this application provides an embodiment of a business execution detection method. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0032] Figure 2 This is a flowchart of a service execution detection method according to an embodiment of this application, such as... Figure 2 As shown, the method includes the following steps:

[0033] Step S202: Create multiple business models. The business models are used to display the status of business execution on the visualization interface. The multiple business models are used to execute different businesses.

[0034] In step S202 above, multiple business models can be created using the three.js (a three-dimensional model database) engine. The model type of the business model can be an ER (Entity-Relationship) model. Multiple business models include, but are not limited to, order ER models, user ER models, and merchant ER models. The corresponding model data is stored in a MongoDB database.

[0035] In another alternative approach, Neo4j (a graph database) can be used to build a knowledge graph of relationships between various business functions.

[0036] It's important to note that the ER model consists of three main elements: entities, attributes, and relations. Entities are objects in the real world that possess independent existence and characteristics, such as people, things, and events. Each entity has a set of attributes that describe its characteristics. Attributes can be the entity's name, gender, age, etc. Relationships describe the connections and interactions between different entities. Relationships can be one-to-one, one-to-many, or many-to-many. For example, a student can have multiple courses, and a course can have multiple students; this is a one-to-many relationship. The ER model uses these three elements—entities, attributes, and relations—to graphically represent real-world concepts and the relationships between entities. It provides a simple and intuitive way to describe and design database structures and is one of the commonly used tools in database design and development.

[0037] Specifically, in this embodiment, an ER model entity can be constructed, including at least: a user model entity, an order model entity, and a merchant model entity. It is understood that the constructed ER model attributes include: the name and status of the model entity. For example, a user model might have statuses such as "order placed," "payment," or "refund request." A user model entity can be associated with multiple order models, and a merchant model can also be associated with multiple order models. Moving a user model to an order model allows for operations such as order placement, payment, refund request, and cancellation. Related data changes include, for example, setting the status value for order placement to status=0, payment to status=1, refund request to status=2, and cancellation to status=3. Alternatively, a merchant model can be moved to an order model for refund processing. Related data changes include, for example, setting the status value for merchant refund processing to status=4.

[0038] like Figure 3 As shown, after the user model places an order, the order model's status changes to "Order Pending Payment." If the user model cancels the order, the order model's status changes to "Order Cancelled for Payment." If the user model pays the order, the order model's status changes to "Order Paid." After the order model's status changes to "Order Paid," if the user model requests a refund, the order model's status changes to "Order Requested for Refund." After the order model's status changes to "Order Requested for Refund," if the merchant model refunds the order, the order model's status changes to "Order Refunded."

[0039] In real-world applications, changes in field values ​​corresponding to changes in the business model's state are stored in the MongoDB database and reflected in the business model. Hovering the mouse over the business model displays relevant data descriptions. During business execution, the order's state changes depending on the combination of the order's current state and the currently executed operation.

[0040] Step S204: Extract the executable actions and the business state after the actions are executed from the predetermined relation table, and determine the directed graph between the multiple business models based on the executable actions and the business state after the actions are executed. The directed graph is used to represent the action path of the multiple business models to execute the business.

[0041] In step S204 above, the relationship table contains all the actions that all business models can perform, as well as the process of performing those actions.

[0042] Step S206: Execute one or more target services according to the target instructions to form one or more execution paths of the target services, and compare the execution paths of the target services with the paths in the directed graph. Based on the comparison results, determine whether the execution paths of the target services conflict with the paths in the directed graph.

[0043] The business execution detection method in steps S202 to S206 above employs the following approach: Multiple business models are created, each used to display the execution status of a business process on a visual interface. These models execute different business processes. The executable actions and post-execution business states of each business model are extracted from a pre-defined relational table. A directed graph is then determined based on these actions and post-execution business states, representing the action paths for each business model to execute its business. One or more target businesses are executed according to target instructions, forming execution paths for one or more target businesses. These execution paths are then compared with paths in the directed graph. The comparison results determine whether the execution paths of the target businesses conflict with paths in the directed graph. By displaying the business execution flow through a directed graph, the method achieves a more intuitive presentation of the business execution flow, thereby reducing the difficulty of detecting business processes and solving the technical problem of difficult business execution flow detection in related technologies. The following provides a detailed explanation.

[0044] In step S204 of the above business execution detection method, a directed graph between multiple business models is determined based on a pre-determined relation table. Specifically, this includes the following steps: determining multiple types of fields that correspond one-to-one with the index, business model, execution action, state before action execution, and state after action execution in the relation table, where the index represents the business state after the business model executes the action; and determining the directed graph based on the multiple types of fields.

[0045] In one alternative approach, the relational table is shown in Table 1, which describes multiple types of fields that correspond one-to-one with the index, business model, execution action, state before action execution, and state after action execution.

[0046]

[0047] Table 1

[0048] It should be noted that in Table 1

[0049] “tbl_order_status_0” indicates that the order model status is that the order is pending payment;

[0050] “tbl_order_status_1” indicates that the order model status is that the order has been paid;

[0051] “tbl_order_status_2” indicates that the order status is that the order has been requested for a refund;

[0052] “tbl_order_status_3” indicates that the order status is that the order has been canceled.

[0053] “tbl_order_status_4” indicates that the order model status is that the order has been refunded.

[0054] “User” represents the user model, and “Merchant” represents the merchant model.

[0055] "User_Place_Order" indicates that the user model performs the action of placing an order; "User_Pay_Order" indicates that the user model performs the action of paying for an order; "User_Refund_Order" indicates that the user model performs the action of requesting a refund; "User_Cancel_Order" indicates that the user model performs the action of canceling an order; and "Merchant_Refund_Order" indicates that the merchant model performs the action of refunding.

[0056] In this embodiment of the application, the specific steps for determining a directed graph based on multiple types of fields are as follows: determining the first type of fields corresponding to the index and business model as vertices of the directed graph; determining the second type of fields corresponding to the execution action as arcs of the directed graph; determining the third type of fields corresponding to the state before the action is executed as the arc head of the directed graph; determining the fourth type of fields corresponding to the state after the action is executed as the arc tail of the directed graph; and determining the directed graph based on the vertices of the directed graph, the arcs of the directed graph, the arc heads of the directed graph, and the arc tails of the directed graph.

[0057] Taking Table 1 as an example, the first type of fields includes: fields corresponding to the index and business model; the second type of fields includes: fields corresponding to the execution action; the third type of fields includes: fields corresponding to the state of the business model when the transformation starts; and the fourth type of fields includes: the state of the business model after the transformation ends.

[0058] In practical application scenarios, the specific method for determining the directed graph based on the vertices, arcs, heads, and tails of the directed graph is as follows: the vertices of the directed graph are connected sequentially through the arcs of the directed graph, wherein the vertices with the same first type of field and the same third type of field are determined as the tails of the directed graph, and the vertices with the same first type of field and the same fourth type of field are determined as the heads of the directed graph.

[0059] A schematic diagram of a directed graph was constructed based on the fields in Table 1, as follows: Figure 3 As shown, User is a business model field (first type of field) as a vertex in the directed graph. When the User model executes the "User_Place_Order" action, the state of the order model changes from "tbl_order_status_0" (third type of field, arc tail) to "tbl_order_status_1" (fourth type of field, arc head). During the process of the order model's state changing from "tbl_order_status_1" to "tbl_order_status_2" through the arc "User_Refund_Order", "tbl_order_status_1" serves as the arc tail and "tbl_order_status_2" serves as the arc head.

[0060] It is understandable that the tail of an arc is the vertex at the starting point of the arrow in a directed graph, and the head of an arc is the vertex at the ending point of the arrow in a directed graph, indicating the direction of state change, such as... Figure 3 As shown, the tail of the arc represents the state of the business model before the action is executed, the head of the arc represents the state of the business model after the action is executed, and the arc between the tail and the head represents the action required to change the state of the business model before the action is executed to the state of the business model after the action is executed.

[0061] In one optional approach, when executing a target service according to a target instruction, the execution path of the target service can be determined as follows: Extracting fields corresponding to the target service model, the target action to be performed by the target service, and the business state before and after execution of the target service from the pre-determined relational table; determining a target directed graph for executing the target service based on the fields corresponding to the target service model, the target action to be performed by the target service, and the business state before and after execution of the target service; determining the vertices in the target directed graph used to represent the target service model as the starting point of the execution path of the target service; and determining the vertices in the target directed graph used to represent the target service model as the starting point of the execution path of the target service. The vertices of the index are determined as multiple nodes in the execution path of the target business; the starting point of the execution path of the target business is connected to the multiple nodes in the order of business state changes to obtain the execution path of the target business. For example: Path 1: User→tbl_order_status_0→tbl_order_status_1→tbl_order_status_2, which means that the user model performs an action that causes the order model's state to change sequentially; Path 2: Mechant→tbl_order_status_2→tbl_order_status_4, which means that the merchant model performs an action that causes the order model's state to change sequentially.

[0062] In practical application scenarios, it is also necessary to determine the root nodes corresponding to multiple indexes and business models in the directed graph; when the root nodes are the same, the multiple indexes and business models are related to each other, as shown in Table 2.

[0063] tbl_order_status_0 User tbl_order_status_1 User tbl_order_status_2 User tbl_order_status_3 User tbl_order_status_4 User User User Merchant User

[0064] Table 2

[0065] As shown in Table 2, the root nodes of the user model and the merchant model are the same, which indicates that the user model and the merchant model are related.

[0066] The user model and the merchant model are related; this can be understood as being connected in a directed graph through at least one vertex. Therefore, the directed graph can be transformed into an undirected graph, such as... Figure 4 As shown, Figure 3 After removing the arrows in the image, we get... Figure 4 The undirected graph shown connects (is related to) the user model and the merchant model.

[0067] In some embodiments of this application, the specific steps for determining whether the execution path of the target service conflicts with the path in the directed graph based on the comparison results are as follows: determine the direction of the path shown in the directed graph, compare the direction of the path shown in the directed graph with the direction of the execution path of the target service to obtain the comparison result; if the comparison result indicates that the direction of the execution path of the target service is opposite to the direction of the path shown in the directed graph, determine that the business flow corresponding to the target service scenario conflicts with the existing business.

[0068] by Figure 3 Taking the directed graph shown as an example, the execution path of the current business can be derived as follows: User model → Order model status is order pending payment → Order model status is order paid → Order model status is order refund requested.

[0069] In one alternative approach, if the execution path of the target business is: user model → order model status is order pending payment → order model status is order paid → order model status is order pending payment, then after the order model status is order paid, the order model status reverts to order pending payment, returning to the starting node, it is considered that the direction of the execution path of the target business is reversed from the direction of the path shown in the directed graph, thereby determining that the business flow corresponding to the target business scenario conflicts with the existing business.

[0070] The above methods can be used to determine whether the business model vertex is connected to the business model state vertex (index), and also to determine whether the two models are related.

[0071] In another alternative approach, when the target instruction indicates the completion of multiple target services, the execution paths of the multiple target services are determined; if the execution paths of the multiple target services contain the same path, it is determined that the multiple target services contain the same service; if the execution paths of the multiple target services contain reverse paths, it is determined that there is a service conflict among the multiple target services.

[0072] Figure 5 This is a structural diagram of a service execution detection device according to an embodiment of this application, such as... Figure 5 As shown, the device includes:

[0073] Module 50 is used to create multiple business models. These business models are used to display the execution status of the business on a visual interface. Each of the multiple business models is used to execute different business processes.

[0074] The determination module 52 is used to extract the executable actions and the business state after the actions are executed from the predetermined relationship table, and to determine the directed graph between the multiple business models based on the executable actions and the business state after the actions are executed, wherein the directed graph is used to represent the action path of the multiple business models to execute the business.

[0075] The detection module 54 is used to execute one or more target services according to the target instructions, form one or more execution paths of the target services, compare the execution paths of the target services with the paths in the directed graph, and determine whether the execution paths of the target services conflict with the paths in the directed graph based on the comparison results.

[0076] The determination module 52 of the above-mentioned business execution detection device includes: a directed graph submodule, used to extract multiple types of fields in the relation table that correspond one-to-one with the index, business model, execution action, state before the action is executed and state after the action is executed, wherein the index represents the business state of the business model after the execution action is executed; and to determine the directed graph based on the multiple types of fields.

[0077] The directed graph submodule includes: a directed graph unit, used to determine the first type of fields corresponding to the index and the business model as vertices of the directed graph; determine the second type of fields corresponding to the execution action as arcs of the directed graph; determine the third type of fields corresponding to the state before the action is executed as the arc head of the directed graph; and determine the fourth type of fields corresponding to the state after the action is executed as the arc tail of the directed graph, thereby determining the directed graph based on the vertices, arcs, arc heads, and arc tails of the directed graph.

[0078] A directed graph unit contains directed graph subunits, which are used to connect the vertices of the directed graph sequentially through the arcs of the directed graph. Vertices with the same first type of field and the same third type of field are defined as the arc tails of the directed graph, and vertices with the same first type of field and the same fourth type of field are defined as the arc heads of the directed graph.

[0079] The determination module 52 further includes a path submodule, which is used to extract fields corresponding to the target business model, fields corresponding to the target action to be performed by the target business, and fields corresponding to the business state before and after the execution of the target business from the pre-determined relation table; based on the fields corresponding to the target business model, fields corresponding to the target action to be performed by the target business, and fields corresponding to the business state before and after the execution of the target business, determine the target directed graph for executing the target business; determine the vertices in the target directed graph that represent the target business model as the starting point of the execution path of the target business; determine the vertices in the target directed graph that represent the index as multiple nodes in the execution path of the target business; and connect the starting point of the execution path of the target business with the multiple nodes in the order of business state changes to obtain the execution path of the target business.

[0080] The detection module 54 includes: a detection submodule, used to determine the direction of the path displayed in the directed graph, and compare the direction of the path displayed in the directed graph with the direction of the execution path of the target service; if the comparison result is that the direction of the execution path of the target service is opposite to the direction of the path displayed in the directed graph, it is determined that the execution path of the target service conflicts with the existing service; otherwise, it is determined that the execution path corresponding to the target service is normal.

[0081] The detection submodule includes a detection unit, configured to determine that there is a common service among the multiple target services when there are multiple execution paths corresponding to the target service and the multiple execution paths corresponding to the multiple target services contain the same path; and to determine that there is a service conflict among the multiple target services when the execution paths of the multiple target services contain a reverse path.

[0082] It should be noted that, Figure 5 The business execution detection device shown is used to execute Figure 2 The business execution detection method shown above is also applicable to this type of business execution detection device, and will not be repeated here.

[0083] This application also provides an electronic device, including: a memory for storing program instructions; and a processor connected to the memory for executing the program instructions for the following functions: creating multiple business models, wherein the business models are used to display the execution status of business on a visual interface, and the multiple business models are used to execute different businesses respectively; extracting the executable actions of the multiple business models and the business status after the actions are executed from a predetermined relation table, and determining a directed graph between the multiple business models based on the executable actions of the multiple business models and the business status after the actions are executed, wherein the directed graph is used to represent the action paths of the multiple business models in executing business; executing one or more target businesses according to target instructions, forming one or more execution paths of the target businesses, and comparing the execution paths of the target businesses with the paths in the directed graph, and determining whether the execution paths of the target businesses conflict with the paths in the directed graph based on the comparison results.

[0084] It should be noted that the aforementioned electronic equipment is used to perform Figure 2 The business execution detection method shown above is also applicable to this electronic device, and will not be repeated here.

[0085] This application embodiment also provides a non-volatile storage medium, which includes a stored computer program. The device containing the non-volatile storage medium executes the following service execution detection method by running the computer program: creating multiple service models, each used to display the status of service execution on a visual interface, and each service model being used to execute different services; extracting executable actions and the service status after action execution from a predetermined relation table, and determining a directed graph between the multiple service models based on the executable actions and the service status after action execution, wherein the directed graph represents the action paths for the multiple service models to execute services; executing one or more target services according to target instructions, forming one or more execution paths for the target services, and comparing the execution paths of the target services with the paths in the directed graph, determining whether the execution paths of the target services conflict with the paths in the directed graph based on the comparison results.

[0086] It should be noted that the aforementioned non-volatile storage media is used for execution. Figure 2 The business execution detection method shown above is also applicable to this non-volatile storage medium, and will not be repeated here.

[0087] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0088] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0089] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some interfaces; indirect couplings or communication connections between units or modules may be electrical or other forms.

[0090] The units described as separate components may or may not be physically separate. 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 can be selected to achieve the purpose of this embodiment according to actual needs.

[0091] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0092] If the integrated unit is implemented as 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 this application, in essence, 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. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.

[0093] The above are merely preferred embodiments of this application. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A business execution detection method, characterized in that, include: Multiple business models are created. These business models are used to display the status of business execution on a visual interface. Each of the multiple business models is used to execute different businesses. The model type of each business model is an entity-relationship model, which includes entities, attributes, and relationships. Extract the executable actions and the business states after the actions are executed from the multiple business models from the predetermined relation table, and determine the directed graph between the multiple business models based on the executable actions and the business states after the actions are executed. The directed graph is used to represent the action paths of the multiple business models in executing their business. Execute one or more target services according to target instructions, forming one or more execution paths for the target services, and compare the execution paths of the target services with the paths in the directed graph. Based on the comparison results, determine whether the execution paths of the target services conflict with the paths in the directed graph. Determine the directed graph between the multiple business models based on a pre-determined relation table, including: extracting multiple types of fields from the relation table that correspond one-to-one with indexes, business models, execution actions, states before and after action execution, where the index represents the business function after the business model executes the execution action. The directed graph is determined based on the multiple fields, including: determining the first type of field corresponding to the index and the business model as the vertex of the directed graph; determining the second type of field corresponding to the execution action as the arc of the directed graph; determining the third type of field corresponding to the state before the action is executed as the arc head of the directed graph; and determining the fourth type of field corresponding to the state after the action is executed as the arc tail of the directed graph. The directed graph is determined based on the vertices, arcs, arc heads, and arc tails of the directed graph.

2. The method according to claim 1, characterized in that, Determining the directed graph based on its vertices, arcs, arc heads, and arc tails includes: The vertices of the directed graph are connected sequentially through the arcs of the directed graph, wherein the vertices with the same first type of field and the same third type of field are determined as the arc tails of the directed graph, and the vertices with the same first type of field and the same fourth type of field are determined as the arc heads of the directed graph.

3. The method according to claim 1, characterized in that, Execute one or more target services according to target instructions, forming an execution path for one or more of the target services, including: Extract the fields corresponding to the target business model, the fields corresponding to the target actions to be performed by the target business, and the fields corresponding to the business states before and after the execution of the target business from the predetermined relation table; Based on the fields corresponding to the target business model, the fields corresponding to the target actions to be performed by the target business, and the fields corresponding to the business states before and after the execution of the target business, a target directed graph for executing the target business is determined; The vertices in the target directed graph that represent the target business model are determined as the starting points of the execution path of the target business. The vertices used to represent the index in the target directed graph are determined as multiple nodes in the execution path of the target service; The execution path of the target service is obtained by sequentially connecting the starting point of the execution path of the target service with the multiple nodes in the order of service state changes.

4. The method according to claim 3, characterized in that, Based on the comparison results, determine whether the execution path of the target service conflicts with the path in the directed graph, including: Determine the direction of the path shown in the directed graph, and compare the direction of the path shown in the directed graph with the direction of the execution path of the target business. If the comparison result shows that the direction of the execution path of the target service is opposite to the direction of the path shown in the directed graph, it is determined that the execution path of the target service conflicts with the existing service; otherwise, it is determined that the execution path corresponding to the target service is normal.

5. The method according to claim 4, characterized in that, Based on the comparison results, determine whether the execution path of the target service conflicts with the path in the directed graph, including: If there are multiple execution paths corresponding to the target service and the multiple execution paths corresponding to the multiple target services contain the same path, it is determined that there is the same service among the multiple target services. If the execution paths of the multiple target services contain reverse paths, it is determined that there is a business conflict among the multiple target services.

6. A business execution detection device, characterized in that, include: A creation module is used to create multiple business models. These business models are used to display the execution status of the business on a visual interface. Each of the multiple business models is used to execute different businesses. The model type of each business model is an entity-relationship model, which includes entities, attributes, and relationships. The determination module is used to extract the executable actions and the business states after the actions are executed from the pre-determined relation table, and to determine the directed graph between the multiple business models based on the executable actions and the business states after the actions are executed, wherein the directed graph is used to represent the action paths of the multiple business models in executing their business. The detection module is used to execute one or more target services according to target instructions, forming one or more execution paths for the target services, and comparing the execution paths of the target services with the paths in the directed graph. Based on the comparison results, it determines whether the execution paths of the target services conflict with the paths in the directed graph. It also determines the directed graph between the multiple business models based on a pre-determined relation table, including: extracting multiple types of fields from the relation table that correspond one-to-one with indexes, business models, execution actions, states before and after action execution, where the index indicates that the business model is executing the execution action. The process involves determining the directed graph based on the following parameters: the business state after execution; determining the directed graph based on the multiple fields, including: determining the first type of field corresponding to the index and the business model as the vertex of the directed graph; determining the second type of field corresponding to the execution action as the arc of the directed graph; determining the third type of field corresponding to the state before the action is executed as the arc head of the directed graph; and determining the fourth type of field corresponding to the state after the action is executed as the arc tail of the directed graph. The directed graph is determined based on the vertices, arcs, arc heads, and arc tails of the directed graph.

7. An electronic device, characterized in that, include: Memory, used to store program instructions; A processor, connected to the memory, is configured to execute program instructions for the following functions: creating multiple business models, which are used to display the execution status of business processes on a visual interface. Each business model is used to execute different business processes. The model type of each business model is an entity-relationship model, which includes entities, attributes, and relationships. The processor extracts executable actions and the business states after action execution from a pre-determined relation table, and determines a directed graph between the multiple business models based on these actions and the resulting business states. The directed graph represents the action paths for the multiple business models to execute business processes. The processor executes one or more target business processes according to target instructions, forming one or more execution paths for the target business processes. It then compares the execution paths of the target business processes with the paths in the directed graph, and determines whether the execution paths of the target business processes are valid based on the comparison results. The path in the directed graph conflicts with the path in the directed graph. Based on a pre-determined relation table, the directed graph between the multiple business models is determined, including: extracting multiple types of fields from the relation table that correspond one-to-one with the index, business model, execution action, state before action execution, and state after action execution, where the index represents the business state of the business model after executing the execution action; determining the directed graph based on the multiple types of fields; determining the directed graph based on the multiple types of fields includes: determining the first type of field corresponding to the index and the business model as the vertex of the directed graph; determining the second type of field corresponding to the execution action as the arc of the directed graph; determining the third type of field corresponding to the state before action execution as the arc head of the directed graph; determining the fourth type of field corresponding to the state after action execution as the arc tail of the directed graph; and determining the directed graph based on the vertices, arcs, arc heads, and arc tails of the directed graph.

8. A non-volatile storage medium, characterized in that, The non-volatile storage medium includes a stored computer program, wherein the device containing the non-volatile storage medium executes the service execution detection method according to any one of claims 1 to 5 by running the computer program.

Citation Information

Patent Citations

  • Transaction conflict detection method and device

    CN109885485A

  • Execution method and device of business model, server and storage medium

    CN115794393A