Search process processing method, device, equipment, medium and product
By determining the location of nodes to be added in the search process and transmitting data in a differentiated manner, the problem of low efficiency in adding business functions in complex search scenarios is solved, and efficient process processing and business iteration are achieved.
Patent Information
- Application Number
- CN202211165767.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-23
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2042-09-23
AI Technical Summary
In complex search scenarios, existing technologies suffer from low efficiency and development difficulties when adding new business functions.
By acquiring the execution flow of the target search scenario, determining the nodes to be added, and generating a new flow based on the matching relationship between the nodes and existing nodes, the node positions are determined using parameter types and semantic information, thereby enabling flexible configuration and differentiated data transmission between nodes.
It improves the processing efficiency of the search process, supports rapid iteration and flexible modification of business functions, and avoids logical coupling and concurrency security issues between nodes.
Smart Images

Figure CN115510103B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the field of data processing, in particular to the field of cloud technology, and more particularly to a search flow processing method and device, equipment, medium and product. BACKGROUND
[0002] In a complex online scenario such as search, the logic and functions involved in processing a real-time request are numerous and complex, so in the face of the increasing business functions in the search scenario, adding new logic and function modules to the existing complex logic and function modules has the problems of low efficiency and difficult development. SUMMARY
[0003] The present disclosure provides a search flow processing method, device, equipment, medium and product.
[0004] According to an aspect of the present disclosure, a search flow processing method is provided, comprising:
[0005] obtaining a first to-be-executed flow of a target search scenario, and determining a to-be-added node from candidate nodes according to the target search scenario;
[0006] determining a position of the to-be-added node in the first to-be-executed flow according to a matching relationship between the to-be-added node and existing nodes in the first to-be-executed flow, and generating a second to-be-executed flow according to the position.
[0007] According to another aspect of the present disclosure, a search flow processing device is provided, comprising:
[0008] a node determination module configured to obtain a first to-be-executed flow of a target search scenario, and determine a to-be-added node from candidate nodes according to the target search scenario;
[0009] a position determination module configured to determine a position of the to-be-added node in the first to-be-executed flow according to a matching relationship between the to-be-added node and existing nodes in the first to-be-executed flow, and generate a second to-be-executed flow according to the position.
[0010] According to another aspect of the present disclosure, an electronic device is provided, comprising:
[0011] at least one processor; and
[0012] a memory connected to the at least one processor in communication; wherein
[0013] the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the search flow processing method described in any embodiment of the present disclosure.
[0014] According to another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to perform the processing method of the search procedure according to any of the embodiments of the present disclosure.
[0015] According to another aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the processing method of the search procedure according to any of the embodiments of the present disclosure.
[0016] It should be understood that the contents described in this part are not intended to identify key or important features of the embodiments of the present disclosure, nor to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0017] The accompanying drawings are used to better understand the present scheme, and do not constitute a limitation on the present disclosure. Among them:
[0018] Figure 1 is a schematic diagram of a processing method of a search procedure according to an embodiment of the present disclosure;
[0019] Figure 2 is a schematic diagram of another processing method of a search procedure according to an embodiment of the present disclosure;
[0020] Figure 3 is a schematic diagram of still another processing method of a search procedure according to an embodiment of the present disclosure;
[0021] Figure 4 is a structural schematic diagram of a procedure to be executed according to an embodiment of the present disclosure;
[0022] Figure 5 is a structural schematic diagram of a processing device of a search procedure according to an embodiment of the present disclosure;
[0023] Figure 6 is a block diagram of an electronic device for implementing the processing method of the search procedure according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0024] Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, which include various details of the embodiments of the present disclosure to help understanding, and should be considered as merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Also, in order to make the description clear and concise, the description of well-known functions and structures is omitted in the following description.
[0025] Figure 1is a schematic diagram of a processing method of a search flow according to an embodiment of the disclosure. The embodiment can be applicable to the case of optimizing the processing manner of a complex search flow. The method can be executed by a search flow processing apparatus. The apparatus can be implemented in software and / or hardware, and integrated in an electronic device. The electronic device involved in the embodiment can be a local server or other device with communication and computing capabilities. Specifically, refer to Figure 1 The method specifically includes the following.
[0026] S110, acquire a first to-be-executed flow of a target search scene, and determine a to-be-added node from candidate nodes according to the target search scene.
[0027] The target search scene includes search requirements in a current online processing scene, for example, the target search scene displays nearby catering locations when searching for a target location in a map scene. The first to-be-executed flow refers to part of the complete flow corresponding to the target search scene, for example, in the above example, the first to-be-executed flow is the corresponding flow of searching for a target location in a map scene, but displaying nearby catering locations is a new business function in the target search scene, so there is no part of the flow in the first to-be-executed flow. The candidate node refers to a function module designed in a modular manner in advance according to each candidate business function. Each candidate business function can be determined in advance according to the actual requirements of the search scene.
[0028] Specifically, all business functions included in the target search scene are determined, and the current to-be-executed flow corresponding to the target search scene is determined. The current business function included in the current to-be-executed flow is determined, and the to-be-added business function in the target search scene that is not included in the current business function is determined. The to-be-added node corresponding to the to-be-added business function is determined from the candidate nodes according to the to-be-added business function. Optionally, part of the interface parameters of the candidate node is fixed to improve the clarity of the dependency relationship between the candidate node and the connected node, so as to avoid the problem of difficult logic judgment of the to-be-executed flow caused by the loss of the dependency relationship between the nodes. Part of the interface parameters of the candidate node is abstracted to improve the reusability of the candidate node. When the candidate node and the to-be-added business function are not completely the same, the candidate node can be reused by simple modification to form the to-be-added node.
[0029] Exemplarily, in the present disclosure, the development of the search process is supported, that is, when the target search scene of displaying the position of a nearby catering place when searching for a target position in a map scene is developed, it is determined that a business function not involved in the current corresponding first to-be-executed process, a to-be-added node is determined from the candidate nodes according to the business function, and a complete process is formed by adding the to-be-added node to the current first to-be-executed process. If there is no node in the candidate nodes that is completely the same as the to-be-added business function, the most similar candidate node can be selected according to the to-be-added business function, and the candidate node is modified according to the to-be-added business function to form the final to-be-added node. In this process, the logical order between the to-be-added business function and the existing first to-be-executed process is not limited, and only the missing business function needs to be supplemented, thereby improving the processing efficiency of the search process of the target search scene.
[0030] S120, determining a position of the to-be-added node in the first to-be-executed process according to a matching relationship between the to-be-added node and the existing node in the first to-be-executed process, and generating a second to-be-executed process according to the position.
[0031] The matching relationship is used to determine the logical relationship between the business function of the to-be-added node and the business function of the existing node in the first to-be-executed process. Exemplarily, the logical relationship is reflected in the logical relationship of input and output reference and the semantic logical relationship. Specifically, after the missing node in the current first to-be-executed process under the target search scene is determined, the logical relationship between the business functions of the missing node and the existing node is analyzed to determine the positional relationship between the to-be-added node and the existing node, including the upstream and downstream relationship and the execution condition relationship.
[0032] Exemplarily, according to the execution order between the to-be-added business function corresponding to the to-be-added node and the existing business function corresponding to the existing node, or the input and output parameter matching relationship, the upstream and downstream relationship of the to-be-added node to the existing node in the first to-be-executed process is determined, and the execution condition relationship of the to-be-added node is determined according to the logical relationship between the business functions. The final second to-be-executed process is determined according to the final upstream and downstream relationship and the execution condition relationship, and all business functions under the target search scene are included in the second to-be-executed process. For example, in the subsequent use process, a new business function requirement appears in the target search scene, and the logical relationship between the new business function requirement and the existing business function requirement is not limited. Through self-defined logic addition, the processing efficiency of the subsequent search process is improved, so that each business function module meets the subsequent demand iteration, and when there is a new business function requirement, the current main process does not need to be frequently modified, but only needs to be modified based on the current main process.
[0033] In another optional implementation of the embodiment, the node to be added is an execution flow corresponding to another search scenario.
[0034] When the business function to be added in the target search scenario corresponds to a business function of another search scenario, the execution flow corresponding to the other search scenario can be directly added to the first to-be-executed flow as the node to be added. Similarly, the first to-be-executed flow and the second to-be-executed flow of the target search scenario can also be used as any node in another search scenario. For example, based on the above example, the target search scenario is to display the location of nearby restaurants when searching for a target location in a map scenario. In fact, displaying the location of nearby restaurants is a business function to be added, and the execution flow corresponding to another search scenario includes the business function to be added. Therefore, the execution flow can be directly reused. As can be seen, the execution flow corresponding to the business function in different search scenarios can be used as a candidate node for reuse by other search scenarios.
[0035] Reuse of the flow as a node improves the efficiency of search scenario flow determination and avoids repeated development.
[0036] Optionally, the disclosure also supports local modification and deletion of the nodes in the first to-be-executed flow to improve the reuse degree of the first to-be-executed flow and the flexibility of the flow.
[0037] The scheme of the embodiment adds the missing business function in the target search scenario by customization. When there is a new business function requirement in the target search scenario, the current main flow does not need to be frequently modified. Instead, the current main flow can be modified based on the current main flow, which improves the processing efficiency of the search flow, facilitates and quickly adds and modifies nodes at any position of the to-be-executed flow, and realizes efficient iteration of business requirements.
[0038] Figure 2 is a schematic diagram of another search flow processing method according to an embodiment of the disclosure. The embodiment is a further refinement of the above technical solution. The matching relationship includes a parameter type matching relationship. The technical solution in the embodiment can be combined with each optional scheme in one or more of the above embodiments. As shown in Figure 2 The search flow processing method includes the following steps:
[0039] S210, obtaining a first to-be-executed flow of a target search scenario, and determining a node to be added from candidate nodes according to the target search scenario.
[0040] S220, determining a target input parameter type and a target output parameter type of the node to be added, and determining an existing input parameter type and an existing output parameter type of an existing node in the first to-be-executed flow.
[0041] The parameter type refers to a data type transmitted by a node interface, for example, the parameter type includes an array, a pointer, an interface, and the like. The target input parameter type refers to an input data type supported by an input interface of the node to be added for transmission. The target output parameter type refers to an input data type supported by an output interface of the node to be added for transmission. Similarly, the existing input parameter type and the existing output parameter type refer to data types supported by an input interface and an output interface of an existing node for transmission.
[0042] Specifically, when each node is developed and designed, the input parameter type and the output parameter type of each node parameter interface are defined in advance, so as to determine the connection relationship between nodes according to the parameter type of the interface, and realize the directional transmission of parameters between nodes. Optionally, each node can include at least two parameter interfaces to realize the transmission of at least two input parameter types and output parameter types, thereby improving the multiplexing degree of the node.
[0043] S230, determining the positional relationship between the node to be added and the existing node according to the matching relationship between the target input parameter type and the existing output parameter type, and the matching relationship between the target output parameter type and the existing input parameter type.
[0044] When the positional relationship between the node to be added and the existing node is determined, the matching relationship of the interface parameter type of the node is determined. Specifically, the first existing node and the second existing node are connected in sequence, the first existing output parameter type of the first existing node is consistent with the target input parameter type, and the second existing input parameter type of the second existing node is consistent with the target output parameter type, and the positional relationship between the node to be added and the existing node is determined to be between the first existing node and the second existing node.
[0045] The positional relationship of the node to be added is determined by the parameter type matching relationship, which can realize the differential transmission of parameters between nodes in the to-be-executed process, and avoid the reduction of process processing efficiency caused by the transmission of irrelevant parameters. In the prior art, each node in the process interacts data by sharing a Context, that is, all nodes write data to be transmitted in the shared Context, and each node acquires data by sharing the file. However, this method causes the dependency relationship between nodes to become implicit, and causes the mutual relationship between nodes to be unable to be acquired when the process is added and spliced. In a complex online scenario, designing the interaction between all nodes as a shared Context easily causes logical coupling and concurrency security problems between nodes.
[0046] In the present disclosure, the position relationship between nodes is determined according to the parameter type, so that the dependency relationship between nodes can be determined through the parameter type of the interaction data, which is beneficial to improve the logical coupling and concurrent security between nodes; and the data is transmitted between nodes according to the parameter type, so that the node only needs to receive the data required by itself, avoiding the acquisition of irrelevant data, which is beneficial to improve the efficiency of node processing data, and further improve the process processing efficiency.
[0047] S240, generating a second to-be-executed process according to the position relationship.
[0048] In another optional implementation of the present embodiment, after S240, the method further comprises:
[0049] determining an output parameter of an upstream node in the second to-be-executed process according to a search request in a target search scenario;
[0050] determining a target downstream node from candidate downstream nodes of the upstream node according to the data type of the output parameter;
[0051] transmitting the output parameter to the target downstream node.
[0052] In response to a search request initiated by a user in a target search scenario, the second to-be-executed process is processed based on the search request, the upstream node in the second to-be-executed process processes according to the search request and determines an output parameter. According to the data type of the output parameter, a downstream node with a matching type is determined from the candidate downstream nodes as a target downstream node, and the output parameter is transmitted to the target downstream node, so that the target downstream node processes according to the output parameter, and the process of differentiated transmission of this parameter is continued.
[0053] The differentiated transmission according to the data type of the output parameter is beneficial to improve the efficiency of node processing data, and can improve the logical coupling between nodes.
[0054] In another optional implementation of the present embodiment, the target downstream node includes at least two;
[0055] Before transmitting the output parameter to the target downstream node, the method further comprises:
[0056] determining the number of copies of the output parameter according to the number of target downstream nodes.
[0057] When the upstream node needs to transmit the output parameter to at least two target downstream nodes, that is, the input parameter types of the at least two target downstream nodes are consistent with the data type of the output parameter of the upstream node, in order to improve the concurrent security of the downstream nodes in processing data, the output parameter of the upstream node is copied, and the copied output data is transmitted to each target downstream node respectively, so as to ensure the concurrent security of the downstream nodes in processing the output data of the upstream node. For example, when there are three target downstream nodes, the number of copied output parameters is determined to be 2, and the two copied output parameters and the original output parameter are transmitted to the three target downstream nodes one by one for processing by the target downstream nodes. Alternatively, a copy prohibition instruction of a receiving user is received, and the output parameter of the upstream node is processed in turn when the target downstream nodes include at least two, so as to avoid the concurrent security problem. For example, the user determines that there is a concurrent security problem between the target upstream node and the target downstream node matched therewith, and sends a copy prohibition instruction to the target upstream node to cancel the operation of copying the output parameter of the target upstream node.
[0058] The copying of the output parameter is beneficial to improve the concurrent security of the downstream nodes in processing data.
[0059] In another optional implementation of the embodiment, after S240, the method further includes:
[0060] The shared data is determined according to the search request in the target search scenario, and the shared data is used for a node in the second to-be-executed process to acquire and process.
[0061] The shared data refers to general data, that is, data that needs to be acquired by all or most nodes. For example, the shared data includes user information, such as the IP address of the user initiating the search request. Any node in the to-be-executed process corresponding to the target search scenario can acquire the shared data according to its processing demand, so as to promote the processing progress of the process.
[0062] The setting of the shared data is beneficial to improve the efficiency of data transmission between nodes and avoid repeated transmission of a large amount of data, and the acquisition of the shared data is also beneficial to ensure the implementation of differential transmission of data between nodes.
[0063] The scheme of the embodiment determines the dependency relationship between nodes through the parameter type of the interaction data, which is beneficial to improve the logical coupling and concurrent security between nodes, and the transmission of data between nodes according to the parameter type enables the nodes to only receive the data required by themselves, avoiding the acquisition of irrelevant data, which is beneficial to improve the efficiency of the nodes in processing data and the efficiency of the process.
[0064] Figure 3is a schematic diagram of another processing method of a search process according to an embodiment of the present disclosure, which is a further refinement of the above technical solution, the matching relationship includes a semantic matching relationship, and the technical solution in this embodiment can be combined with each optional solution in one or more of the above embodiments. As shown in Figure 3 The processing method of the search process includes the following steps.
[0065] S310, a first to-be-executed process of a target search scenario is acquired, and a to-be-added node is determined from candidate nodes according to the target search scenario.
[0066] S320, target semantic information of the to-be-added node and existing semantic information of an existing node in the first to-be-executed process are determined.
[0067] The semantic information is used to represent a business function performed by the node. For example, the semantic information can be determined by a pre-defined label of the node or according to an execution code in the node. The manner of acquiring the semantic information of the node is not limited in the present disclosure.
[0068] S330, a positional relationship between the to-be-added node and the existing node is determined according to a matching relationship between the target semantic information and the existing semantic information.
[0069] Since the execution order and execution conditions of the business function in the target search scenario are subject to certain restrictions, the position of the to-be-added node needs to be determined according to the matching of the semantic information between the nodes. Specifically, the correlation degree of the target semantic information and the existing semantic information is determined, the associated existing node is determined according to the correlation degree, and then the position of the to-be-added node is determined according to the associated existing node.
[0070] For example, based on the above example, the existing semantic information in the existing node includes a target location search node and a location display node, the target semantic information of the to-be-added node is a catering location search node, the correlation degree of the location display node and the to-be-added node is determined to be the largest according to the semantic information, the location display node can be performed only after the location search according to the semantic information, and then the to-be-added node is determined as an upstream node of the location display node. The position of the to-be-added node determined according to the matching relationship of the semantic information can be located at any position in the first to-be-executed process, so as to realize flexible configuration of the search process.
[0071] In another optional implementation manner of the present embodiment, after S330, the method further includes:
[0072] A matching downstream node of the to-be-added node is determined according to the positional relationship, and an adapter is added between the to-be-added node and the matching downstream node, so as to perform type conversion on an output parameter of the to-be-added node according to an input parameter interface type of the matching downstream node through the adapter.
[0073] Since the position of the to-be-added node is determined according to the target semantic information, the output parameter type of the to-be-added node may be different from the input parameter type of the matched downstream node, and type conversion of the output parameter needs to be performed through an adapter. Similarly, the input parameter type of the to-be-added node may be different from the output parameter type of the matched upstream node, and type conversion of the output parameter needs to be performed through an adapter between the nodes to ensure smooth transmission of the output parameter of the upstream node. The matched upstream node of the to-be-added node is determined according to the positional relationship, and an adapter is added between the to-be-added node and the matched upstream node, so that the output parameter of the matched upstream node is type-converted according to the input parameter interface type of the to-be-added node through the adapter.
[0074] The type conversion of the output parameter is implemented through the adapter, the smooth transmission of the output parameter of the upstream node is ensured, the flexibility of node reuse is maximized, and the process splicing is facilitated. Meanwhile, the differential transmission effect of parameters between nodes is ensured.
[0075] S340, generating a second to-be-executed process according to the positional relationship.
[0076] In another optional implementation of the embodiment, after S340, the method further includes:
[0077] In response to a search request in a target search scenario, determining an execution feedback result of a node in the second to-be-executed process; wherein the node includes a conditional node or an optional node;
[0078] According to the execution feedback result, determining an actual running DAG graph of the second to-be-executed process.
[0079] The execution feedback result includes execution state information of the node, for example, whether the node is executed or not. The conditional node refers to a node carrying an execution condition, and the optional node refers to a node that is not necessarily executed in the process, for example, there are three optional nodes in an optional branch, and when feedback information of two optional nodes is obtained, the subsequent downstream node can be executed. The conditional node and the optional node both belong to nodes that may be skipped in the second to-be-executed process. The existence of these nodes will affect the normal running and ending of the entire process.
[0080] Specifically, the second to-be-executed flow acquires an execution feedback result fed back by each node in execution when responding to a search request in a target search scenario, and determines an actual running DAG graph of the second to-be-executed flow according to the execution feedback result. For example, because the second to-be-executed flow contains dynamic nodes such as conditional edges and optional edges, the DAG graph in the compilation period of the second to-be-executed flow is not exactly the same as the DAG graph in the actual running period. Therefore, the running period state of all nodes in the second to-be-executed flow is saved, and the actual running DAG graph is determined according to the saved node state information.
[0081] By determining the actual running DAG graph, the dynamic node relationship in the second to-be-executed flow is determined, the accuracy of the execution flow control is improved, and complex branches such as conditional branches or optional branches are supported in the search flow.
[0082] In another optional implementation of the embodiment, the execution feedback result includes an execution failure feedback result.
[0083] Before determining the actual running DAG graph of the second to-be-executed flow according to the execution feedback result, the method further includes:
[0084] generating an execution instruction for the last node, wherein the last node is configured to feed back an execution result.
[0085] executing the last node in the second to-be-executed flow according to the execution instruction for the last node.
[0086] The execution failure feedback result includes state information of the node in the execution failure and feedback information of a failure cause. The last node refers to the last to-be-executed node in the second to-be-executed flow.
[0087] Specifically, when any node in the second to-be-executed flow fails in execution, the execution jumps directly to the last node in the second to-be-executed flow for execution, so as to ensure the execution integrity of the second to-be-executed flow and avoid the situation that the second to-be-executed flow stops execution due to an error of a node in the second to-be-executed flow, and information is lost. For example, the last node can perform bottom handling, such as feeding back an execution result or passing an error packet to an upstream.
[0088] By setting that any node in the second to-be-executed flow needs to jump to the last node for execution when an error occurs, a user can perform abnormal control processing operation in the last node, and the integrity of the flow execution is improved.
[0089] In another optional implementation of the embodiment, after S340, the method further includes:
[0090] determine a flow timeout time of the second to-be-executed flow and a node timeout time of a node in the second to-be-executed flow;
[0091] In response to a search request in a target search scenario, a flow timeout feedback result is determined according to the flow timeout time and the node timeout time during execution of the second to-be-executed flow.
[0092] Specifically, the user can customize the flow timeout time of the second to-be-executed flow and the node timeout time of each node, or only set the flow timeout time, and control the timeout of the nodes according to the flow timeout time.
[0093] For example, the flow timeout time of the second to-be-executed flow is determined to be 10s, there are two nodes in the second to-be-executed flow, and the node timeout time of each node is 5s. During actual execution, the first node consumes 7s, and the actual node timeout time of the last node is determined to be 3s according to the comparison result of the remaining time and the node timeout time according to the flow timeout time, so as to realize overall control of the flow. Similarly, during actual execution, the first node consumes 3s, and the actual node timeout time of the last node is determined to be 5s according to the comparison result of the remaining time and the node timeout time according to the flow timeout time.
[0094] The timeout control supports flow granularity and operator granularity, and determines the execution timeout feedback result of the node from the two granularities, improves the accuracy of the node timeout control, and further improves the efficiency of the flow execution.
[0095] Figure 4 FIG. 1 is a structural schematic diagram of a to-be-executed flow according to an embodiment of the present disclosure. Referring to FIG. 1, Figure 4 flow corresponds to a second to-be-executed flow in a target search scenario, Op(n) is the nth node in the second to-be-executed flow, flow corresponds to a complete flow, and a plurality of Ops are connected to each other to form a DAG inside, Op corresponds to a node in the flow and completes a specific business function. The flow can also be used as an Op in another flow. When the flow is executed, a user interface for triggering execution is provided, that is, by binding the Op to the start node of the flow, the flow can be controlled to start execution from the Op. The timeout time set on the flow takes effect on all Ops inside the flow. A Context of a life cycle can also be obtained by the flow as public data sharing, and the execution state of each Op can be saved.
[0096] The scheme of the embodiment determines the position of the to-be-added node through the matching relationship of semantic information, realizes flexible configuration of the to-be-added node, maximally guarantees flexibility of search process determination, facilitates process splicing, and is suitable for process processing in complex scenarios such as search services.
[0097] Figure 5 FIG. 1 is a structural schematic diagram of a search process processing apparatus according to an embodiment of the present disclosure. The apparatus can execute the search process processing method involved in any embodiment of the present disclosure. Figure 5 The search process processing apparatus 500 includes a node determination module 510 and a position determination module 520.
[0098] The node determination module 510 is configured to acquire a first to-be-executed process of a target search scenario, and determine a to-be-added node from candidate nodes according to the target search scenario.
[0099] The position determination module 520 is configured to determine a position of the to-be-added node in the first to-be-executed process according to a matching relationship between the to-be-added node and an existing node in the first to-be-executed process, and generate a second to-be-executed process according to the position.
[0100] The scheme of the embodiment adds a missing business function in a target search scenario on a self-defined basis. When there is a new business function demand in the target search scenario, the current main process does not need to be frequently modified, but only needs to be modified on the basis of the current main process, thereby improving the processing efficiency of the search process, facilitating and quickly adding and modifying a node at any position of a to-be-executed process, and realizing efficient iteration of a business demand.
[0101] In an optional implementation manner of the embodiment, the matching relationship includes a parameter type matching relationship.
[0102] The position determination module includes:
[0103] The parameter type determination unit is configured to determine a target input parameter type and a target output parameter type of the to-be-added node, and an existing input parameter type and an existing output parameter type of an existing node in the first to-be-executed process.
[0104] The first position relationship determination unit is configured to determine a position relationship between the to-be-added node and the existing node according to a matching relationship between the target input parameter type and the existing output parameter type, and between the target output parameter type and the existing input parameter type.
[0105] In an optional implementation manner of the embodiment, the apparatus further includes a parameter transmission module configured to, after the second to-be-executed process is generated according to the position:
[0106] An output parameter determination unit is configured to determine an output parameter of an upstream node in the second to-be-executed flow according to a search request in a target search scenario.
[0107] A downstream node determination unit is configured to determine a target downstream node from candidate downstream nodes of the upstream node according to a data type of the output parameter.
[0108] An output parameter delivery unit is configured to deliver the output parameter to the target downstream node.
[0109] In an optional implementation of the embodiment, the matching relationship includes a semantic matching relationship.
[0110] The position determination module includes:
[0111] A semantic information determination unit is configured to determine target semantic information of the to-be-added node and existing semantic information of an existing node in the first to-be-executed flow.
[0112] A second position relationship determination unit is configured to determine a position relationship between the to-be-added node and the existing node according to a matching relationship between the target semantic information and the existing semantic information.
[0113] In an optional implementation of the embodiment, the apparatus further includes a parameter type conversion module configured to, after determining the position relationship between the to-be-added node and the existing node according to the matching relationship between the target semantic information and the existing semantic information,
[0114] determine a matching downstream node of the to-be-added node according to the position relationship, and add an adapter between the to-be-added node and the matching downstream node, so as to perform type conversion on an output parameter of the to-be-added node according to an input parameter interface type of the matching downstream node through the adapter.
[0115] In an optional implementation of the embodiment, the apparatus further includes an execution feedback module configured to, after generating the second to-be-executed flow according to the position,
[0116] A feedback result determination unit is configured to determine an execution feedback result of a node in the second to-be-executed flow in response to a search request in a target search scenario, wherein the node includes a conditional node or an optional node.
[0117] A DAG graph determination unit is configured to determine an actual running DAG graph of the second to-be-executed flow according to the execution feedback result.
[0118] In an optional implementation of the embodiment, the execution feedback result comprises an execution failure feedback result; the apparatus further comprises an execution failure module configured to generate a last-node execution instruction before the actual running DAG graph of the second to-be-executed process is determined according to the execution feedback result; wherein the last node is configured to perform execution result feedback; and the last node in the second to-be-executed process is executed according to the last-node execution instruction.
[0119] In an optional implementation of the embodiment, the apparatus further comprises a timeout feedback module configured to, after the second to-be-executed process is generated according to the position,
[0120] determine a process timeout time of the second to-be-executed process and a node timeout time of a node in the second to-be-executed process;
[0121] In response to a search request in a target search scenario, an execution timeout feedback result is determined according to the process timeout time and the node timeout time during execution of the second to-be-executed process.
[0122] In an optional implementation of the embodiment, the apparatus further comprises a shared data determination module configured to, after the second to-be-executed process is generated according to the position,
[0123] determine shared data according to a search request in a target search scenario, wherein the shared data is used for being acquired and processed by a node in the second to-be-executed process.
[0124] In an optional implementation of the embodiment, the target downstream node comprises at least two; the apparatus further comprises an output parameter replication module configured to determine a replication number of the output parameter according to a number of the target downstream nodes before the output parameter is transmitted to the target downstream node.
[0125] In an optional implementation of the embodiment, the to-be-added node is an execution process corresponding to another search scenario.
[0126] The processing apparatus of the search process can execute the search process processing method provided by any embodiment of the present disclosure, and has the corresponding function modules and beneficial effects of the execution method. Technical details not described in detail in the embodiment can be referred to the search process processing method provided by any embodiment of the present disclosure.
[0127] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved in the technical solution comply with relevant laws and regulations and do not violate public order and good customs.
[0128] According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0129] Figure 6 A schematic block diagram of an example electronic device 500 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present disclosure described and / or claimed in this document.
[0130] As shown in Figure 6 The device 500 includes a computing unit 501 that can perform various appropriate actions and processes in accordance with a computer program stored in a read-only memory (ROM) 502 or a computer program loaded into a random access memory (RAM) 503 from a storage unit 508. Various programs and data required for the operation of the device 500 can also be stored in the RAM 503. The computing unit 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0131] Various components in the device 500 are connected to the I / O interface 505, including an input unit 506, such as a keyboard, a mouse, etc.; an output unit 507, such as various types of displays, speakers, etc.; the storage unit 508, such as a magnetic disk, an optical disk, etc.; and a communication unit 509, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 509 allows the device 500 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.
[0132] The computing unit 501 can be various general and / or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 501 performs various methods and processes described above, such as the processing method of the search procedure. For example, in some embodiments, the processing method of the search procedure can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 508. In some embodiments, part or all of the computer program can be loaded and / or installed onto the device 500 via the ROM 502 and / or the communication unit 509. When the computer program is loaded onto the RAM 503 and executed by the computing unit 501, one or more steps of the processing method of the search procedure described above can be performed. Alternatively, in other embodiments, the computing unit 501 can be configured to perform the method search procedure by any other appropriate means, such as by means of firmware.
[0133] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a programmable logic device (PLD), a computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0134] Program code for carrying out methods of the present disclosure can be written in any combination of one or more programming languages. The program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the program code, when executed by the processor or controller, produces the functions / operations specified in the flowcharts and / or the block diagrams. The program code can be entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine or server, or entirely on a remote machine or server.
[0135] In the context of this disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium will include one or more lines of electrical connections, portable computer disks, hard disk drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fibers, portable compact disc read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0136] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0137] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), blockchain networks, and the Internet.
[0138] The computer system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0139] It should be understood that the various forms of flow shown above can be re-ordered, added to, or have steps deleted, using the flow. For example, the steps described in the present disclosure can be performed in parallel, in series, or in a different order, as long as the desired results of the technical solutions of the present disclosure can be achieved, which are not limited herein.
[0140] The above detailed description does not constitute a limitation on the protection scope of the present disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements, and improvements made within the spirit and principles of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A processing method of a search flow, comprising: acquiring a first to-be-executed flow of a target search scene in a search flow development process, and determining a to-be-added node corresponding to a to-be-added business function according to modification of a candidate node corresponding to a candidate business function according to the target search scene; wherein the to-be-added business function is different from the candidate business function; determining a positional relationship of the to-be-added node and an existing node in the first to-be-executed flow according to a matching relationship of the to-be-added node and the existing node in the first to-be-executed flow, and generating a second to-be-executed flow according to the position; wherein the positional relationship includes an upstream-downstream relationship and an execution condition relationship, and the first to-be-executed flow and the second to-be-executed flow of the target search scene are as any one node in other search scenes.
2. The method of claim 1, wherein, The matching relationship includes a parameter type matching relationship. Determining the position of the to-be-added node in the first to-be-executed flow according to the matching relationship of the to-be-added node and the existing node in the first to-be-executed flow comprises: determining a target input parameter type and a target output parameter type of the to-be-added node, and an existing input parameter type and an existing output parameter type of the existing node in the first to-be-executed flow; determining the positional relationship of the to-be-added node and the existing node according to the matching relationship of the target input parameter type and the existing output parameter type, and the target output parameter type and the existing input parameter type.
3. The method of claim 2, after generating the second to-be-executed flow according to the position, further comprising: determining an output parameter of an upstream node in the second to-be-executed flow according to a search request under a target search scene; determining a target downstream node from candidate downstream nodes of the upstream node according to a data type of the output parameter; passing the output parameter to the target downstream node.
4. The method of claim 1, wherein, The matching relationship includes a semantic matching relationship. Determining the position of the to-be-added node in the first to-be-executed flow according to the matching relationship of the to-be-added node and the existing node in the first to-be-executed flow comprises: determining target semantic information of the to-be-added node, and existing semantic information of the existing node in the first to-be-executed flow; determining the positional relationship of the to-be-added node and the existing node according to the matching relationship of the target semantic information and the existing semantic information.
5. The method of claim 4, wherein, After determining the positional relationship of the to-be-added node and the existing node according to the matching relationship of the target semantic information and the existing semantic information, further comprising: determining a matching downstream node of the to-be-added node according to the positional relationship, and adding an adapter between the to-be-added node and the matching downstream node, so as to perform type conversion on an output parameter of the to-be-added node according to an input parameter interface type of the matching downstream node through the adapter.
6. The method of claim 1, wherein, After generating the second to-be-executed flow according to the position, further comprising: determining an execution feedback result of a node in the second to-be-executed flow in response to a search request under a target search scene; wherein the node includes a conditional node or an optional node. According to the execution feedback result, an actual running DAG graph of the second to-be-executed flow is determined.
7. The method of claim 6, wherein, The execution feedback result includes an execution failure feedback result. Before the execution feedback result is used to determine the actual running DAG graph of the second to-be-executed flow, the method further includes: An end node execution instruction is generated, and the end node is used to perform execution result feedback. According to the end node execution instruction, an end node in the second to-be-executed flow is executed.
8. The method of claim 1, wherein, After the second to-be-executed flow is generated according to the position, the method further includes: A flow timeout time of the second to-be-executed flow and a node timeout time of a node in the second to-be-executed flow are determined. In response to a search request in a target search scenario, an execution timeout feedback result is determined according to the flow timeout time and the node timeout time during execution of the second to-be-executed flow.
9. The method of claim 1, wherein, After the second to-be-executed flow is generated according to the position, the method further includes: Shared data used for a node in the second to-be-executed flow to acquire and process is determined according to a search request in a target search scenario.
10. The method of claim 3, wherein, The target downstream node includes at least two. Before the output parameter is transmitted to the target downstream node, the method further includes: A replication number of the output parameter is determined according to the number of the target downstream nodes.
11. The method of claim 1, wherein, The to-be-added node is an execution flow corresponding to another search scenario.
12. A processing apparatus of a search flow, comprising: a node determination module configured to, in a search flow development process, acquire a first to-be-executed flow of a target search scenario, and determine a to-be-added node corresponding to a to-be-added business function according to modification of a candidate node corresponding to a candidate business function according to the target search scenario; wherein the to-be-added business function is different from the candidate business function; a position determination module configured to determine a position relationship of the to-be-added node and an existing node in the first to-be-executed flow according to a matching relationship of the to-be-added node and the existing node in the first to-be-executed flow, and generate a second to-be-executed flow according to the position; wherein the position relationship includes an upstream-downstream relationship and an execution condition relationship, and the first to-be-executed flow and the second to-be-executed flow of the target search scenario are used as any node in another search scenario.
13. The apparatus of claim 12, wherein, The matching relationship includes a parameter type matching relationship. The position determination module includes: a parameter type determination unit configured to determine a target input parameter type and a target output parameter type of the to-be-added node, and an existing input parameter type and an existing output parameter type of the existing node in the first to-be-executed flow; a first position relationship determination unit configured to determine the position relationship of the to-be-added node and the existing node according to a matching relationship of the target input parameter type and the existing output parameter type, and the target output parameter type and the existing input parameter type.
14. The apparatus of claim 13, wherein, The apparatus further includes a parameter transmission module configured to, after the second to-be-executed flow is generated according to the position, include: an output parameter determination unit configured to determine an output parameter of an upstream node in the second to-be-executed flow according to a search request in a target search scenario. The downstream node determination unit is configured to determine a target downstream node from the candidate downstream nodes of the upstream node according to a data type of the output parameter; The output parameter transmission unit is configured to transmit the output parameter to the target downstream node.
15. The apparatus of claim 12, wherein, The matching relationship includes a semantic matching relationship. The position determination module includes: The semantic information determination unit is configured to determine target semantic information of the to-be-added node and existing semantic information of an existing node in the first to-be-executed process. The second position relationship determination unit is configured to determine a position relationship between the to-be-added node and the existing node according to a matching relationship between the target semantic information and the existing semantic information.
16. The apparatus of claim 15, wherein, The device further includes a parameter type conversion module configured to, after determining the position relationship between the to-be-added node and the existing node according to the matching relationship between the target semantic information and the existing semantic information, determine a matching downstream node of the to-be-added node according to the position relationship, and add an adapter between the to-be-added node and the matching downstream node, so as to perform type conversion on the output parameter of the to-be-added node according to an input parameter interface type of the matching downstream node through the adapter.
17. The apparatus of claim 12, wherein, The device further includes an execution feedback module configured to, after generating the second to-be-executed process according to the position, include a feedback result determination unit configured to determine an execution feedback result of a node in the second to-be-executed process in response to a search request in a target search scenario; wherein the node includes a conditional node or an optional node; The device further includes a DAG graph determination unit configured to determine an actual running DAG graph of the second to-be-executed process according to the execution feedback result.
18. The apparatus of claim 17, wherein, The execution feedback result includes an execution failure feedback result; the device further includes an execution failure module configured to, before determining the actual running DAG graph of the second to-be-executed process according to the execution feedback result, generate an end node execution instruction; wherein the end node is used for performing an execution result feedback; and perform execution on an end node in the second to-be-executed process according to the end node execution instruction.
19. The apparatus of claim 12, wherein, The device further includes a timeout feedback module configured to, after generating the second to-be-executed process according to the position, determine a process timeout time of the second to-be-executed process and a node timeout time of a node in the second to-be-executed process; and in response to a search request in a target search scenario, determine an execution timeout feedback result according to the process timeout time and the node timeout time during execution of the second to-be-executed process.
20. The apparatus of claim 12, wherein, The device further includes a shared data determination module configured to, after generating the second to-be-executed process according to the position, determine shared data according to a search request in a target search scenario; the shared data is used for being acquired and processed by a node in the second to-be-executed process.
21. The apparatus of claim 14, wherein, The target downstream node includes at least two; the device further includes an output parameter replication module configured to, before transmitting the output parameter to the target downstream node, determine a replication number of the output parameter according to a number of the target downstream nodes.
22. The apparatus of claim 12, wherein, The to-be-added node is an execution process corresponding to other search scenarios.
23. An electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-11.
24. A non-transitory computer readable storage medium having stored thereon computer instructions, wherein, the computer instructions are for causing the computer to perform the method of any one of claims 1-11.
25. A computer program product comprising computer programs / instructions, characterized in that, the computer program / instructions, when executed by a processor, implement the steps of the method of any one of claims 1-11.
Citation Information
Patent Citations
Process configuration method, device and equipment and computer readable storage medium
CN113077139A
Node adding method and device based on directory tree, equipment and storage medium
CN114281919A