Information pushing method based on knowledge graph, electronic equipment and storage medium
By using a knowledge graph-based information push method, the impact of changes in task attribute information on dependencies is automatically identified, solving the problem of low efficiency in existing task management systems, achieving efficient and accurate task replacement prompts, and improving user experience.
Patent Information
- Application Number
- CN202510973079.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-15
- Publication Date
- 2025-10-28
Smart Images

Figure CN120851491A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of information push technology, and in particular to an information push method, electronic device and storage medium based on knowledge graph. Background Technology
[0002] In many current task management systems, multiple tasks often have temporal dependencies. When the task attributes of a task change, such as adjusting its start or end time, it may affect the normal execution of other dependent tasks. However, existing task management systems typically lack automatic identification and notification mechanisms. They cannot automatically determine whether changes to a task's attributes will affect the normal execution of its dependent tasks, and therefore cannot automatically send notifications. They must rely on manual investigation and analysis to determine whether changes to a task's attributes will affect the normal execution of its dependent tasks, which is inefficient, inaccurate, and negatively impacts user experience. Summary of the Invention
[0003] To address the aforementioned technical problems, the technical solution adopted by this invention is as follows:
[0004] According to a first aspect of the present invention, a knowledge graph-based information push method is provided, the method comprising the following steps:
[0005] S100. When the task attribute information of the target node in the target knowledge graph corresponding to the target user is modified, the breaking condition corresponding to each directed edge of the target node is taken as a candidate breaking condition; wherein, the target knowledge graph includes several nodes and directed edges used to connect the nodes, each directed edge has at least one corresponding breaking condition, and the target node is any node in the target knowledge graph.
[0006] S200, at least use the modified task attribute information of the target node to match each candidate fracture condition.
[0007] S300. If any candidate break condition is successfully matched, the other node connected by the directed edge corresponding to the candidate break condition is determined as the node to be processed; if the candidate break condition is successfully matched, it means that the task corresponding to at least one of the two nodes corresponding to the candidate break condition cannot be executed normally.
[0008] S400. Based on the task attribute information of the node to be processed and the break conditions corresponding to all directed edges connected to it, determine several replacement tasks for the task corresponding to the node to be processed.
[0009] S500, Send confirmation information XD corresponding to the node to be processed to the target user; XD contains task attribute information of each replacement task corresponding to the node to be processed, and XD is used to prompt the user to determine the target task attribute information corresponding to the node to be processed from all the task attribute information contained in XD.
[0010] According to a second aspect of the present invention, a non-transitory computer-readable storage medium is provided, wherein a computer program is stored in the storage medium, and the computer program is loaded and executed by a processor to implement the aforementioned method.
[0011] According to a third aspect of the present invention, an electronic device is provided, comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the aforementioned method.
[0012] The present invention has at least the following beneficial effects:
[0013] This invention provides a knowledge graph-based information push method, electronic device, and storage medium. The method, after modifying the task attribute information of a target node in a target knowledge graph corresponding to a target user, uses the break conditions corresponding to each directed edge of the target node as candidate break conditions. The target node can be any node in the target knowledge graph. It matches at least the modified task attribute information of the target node with each candidate break condition. If any candidate break condition matches successfully, the other node connected to the directed edge corresponding to that candidate break condition is determined as the node to be processed. Based on the task attribute information of the node to be processed and the break conditions corresponding to all its connected directed edges, several replacement tasks for the task corresponding to the node to be processed are determined. Confirmation information for the node to be processed is sent to the target user. The confirmation information contains the task attribute information of each replacement task corresponding to the node to be processed, and the confirmation information is used to prompt the user to determine the target task attribute information corresponding to the node to be processed from all the task attribute information contained in the confirmation information. As can be seen, this invention realizes information push based on the target knowledge graph corresponding to the target user. The target knowledge graph includes nodes corresponding to multiple tasks. The nodes store the task attribute information of their corresponding tasks. When the task attribute information of a certain node is modified, it can automatically determine the affected node and its corresponding task based on the modified task attribute information of the node and the break conditions on the directed edges connected to the affected node. Furthermore, based on the task attribute information of the affected node and the break conditions of all directed edges connected to the affected node, it can quickly determine the replacement task corresponding to the affected node and its corresponding task and send a confirmation message containing the task attribute information of all replacement tasks to the target user. This method is highly efficient and accurate, and also helps to improve the user experience. Attached Figure Description
[0014] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0015] Figure 1 A flowchart of an information push method based on knowledge graphs provided in an embodiment of the present invention. Detailed Implementation
[0016] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making any creative efforts shall fall within the scope of protection of the present invention.
[0017] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar tasks 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 embodiments of the invention 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 server that comprises a series of steps or units is not necessarily limited to those explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.
[0018] Embodiments of the present invention provide an information push method based on knowledge graphs, such as... Figure 1 As shown, the method includes the following steps:
[0019] S100. When the task attribute information of the target node in the target knowledge graph corresponding to the target user is modified, the breaking condition corresponding to each directed edge of the target node is taken as a candidate breaking condition; wherein, the target knowledge graph includes a number of nodes and directed edges for connecting the nodes, each of the directed edges has at least one corresponding breaking condition, and the target node is any node in the target knowledge graph.
[0020] Specifically, the target knowledge graph includes several nodes, which are divided into main task nodes, first-type auxiliary task nodes, and second-type auxiliary task nodes. The main task node stores the task attribute information of its corresponding main task, the first-type auxiliary task node stores the task attribute information of its corresponding first-type auxiliary task, and the second-type auxiliary task node stores the task attribute information of its corresponding second-type auxiliary task. The task attribute information includes at least one of the following: task identifier, task start time, task end time, and task-related location.
[0021] Furthermore, the mission-related locations include at least one location and at most two locations. When the mission-related locations include two locations, the two locations are the mission start location and the mission end location, respectively.
[0022] Specifically, the modification priority of the main task's task attribute information is lower than that of the first and second categories of auxiliary tasks. The first category of auxiliary tasks are those that cannot affect the execution of the main task, while the second category of auxiliary tasks are those that may affect the execution of the main task. The modification priority of task attribute information is a pre-set priority, for example: the modification priority of the first and second categories of auxiliary tasks is 2, and the modification priority of the main task's task attribute information is 1; or the modification priority of the second category of auxiliary tasks is 3, the modification priority of the first category of auxiliary tasks is 2, and the modification priority of the main task's task attribute information is 1. This will not be elaborated further here.
[0023] In one specific embodiment, when it is necessary to modify task attribute information, the task attribute information with the higher modification priority is modified first.
[0024] In a specific embodiment, the main task can be an intercity transportation task, the first type of ancillary task can be an accommodation task, and the second type of ancillary task can be an intra-city transportation task.
[0025] In one specific embodiment, the task identifier is a unique identifier for the task. This unique identifier will not change based on changes in the user or the date. For example, if the main task is to take flight A from departure point C to destination point D, the task identifier for the main task is "Flight Number 1 - Departure Point 1 - Destination 1". Then, if any user executes the main task on any date, the task identifier for the main task will always be "Flight Number 1 - Departure Point 1 - Destination 1", and will not change due to different users or different dates.
[0026] Specifically, when all directed edges connected to the second-type subordinate task node point to the second-type subordinate task node, or when none of the directed edges connected to the second-type subordinate task node point to the main task node, the second-type subordinate task will not affect the execution of the main task; when there is a directed edge among all the directed edges connected to the second-type subordinate task node pointing to the main task node, the second-type subordinate task will affect the execution of the main task.
[0027] Specifically, the task attribute information of a node can be understood as the task attribute information stored in the node.
[0028] S200, at least use the modified task attribute information of the target node to match each candidate fracture condition.
[0029] S300. If any candidate break condition is successfully matched, the other node connected by the directed edge corresponding to the candidate break condition is determined as the node to be processed; if the candidate break condition is successfully matched, it means that the task corresponding to at least one of the two nodes corresponding to the candidate break condition cannot be executed normally.
[0030] Specifically, step S300 also includes: if all candidate break conditions fail to match, no processing is performed; if a candidate break condition fails to match, it means that the tasks corresponding to the two nodes corresponding to the candidate break condition can be executed normally, and the node corresponding to the candidate break condition is the node connected by the directed edge corresponding to the candidate break condition.
[0031] S400. Based on the task attribute information of the node to be processed and the breakage conditions corresponding to all directed edges connected to it, determine several replacement tasks for the task corresponding to the node to be processed.
[0032] S500: Send confirmation information XD corresponding to the node to be processed to the target user; XD contains task attribute information of each replacement task corresponding to the node to be processed, and XD is used to prompt the user to determine the target task attribute information corresponding to the node to be processed from all the task attribute information contained in XD.
[0033] Through the above steps, information push is achieved based on the target knowledge graph corresponding to the target user. The target knowledge graph includes nodes corresponding to multiple tasks. The nodes store the task attribute information of their corresponding tasks. When the task attribute information of a node is modified, the system can automatically determine the affected node and its corresponding task based on the modified task attribute information of the node and the break conditions on its corresponding directed edges. Furthermore, based on the task attribute information of the affected node and the break conditions of all directed edges connected to the affected node, the system can quickly determine the replacement task corresponding to the affected node and its corresponding task, and send a confirmation message containing the task attribute information of all replacement tasks to the target user. This method is highly efficient and accurate, and also helps to improve the user experience.
[0034] In one specific embodiment, XD also includes a task cancellation option for the node to be processed.
[0035] Specifically, step S400 also includes the following steps:
[0036] S401. If the task attribute information of the node to be processed is the task attribute information of a first type of auxiliary task or a second type of auxiliary task, then according to the task attribute information of the node to be processed and the break conditions corresponding to all directed edges connected to it, obtain the replacement task retrieval information corresponding to the node to be processed; for example: if the task attribute information of the node to be processed includes: the task start location is location 1, the task end location is location 2, the task start time is time 1 and the task end time is time 2, and the break conditions corresponding to all directed edges connected to it are respectively: time 1 is earlier than 9:00:00; time 2 is later than 14:00:00; time 2 is later than 13:00:00, then the replacement task retrieval information corresponding to the node to be processed is to retrieve tasks whose task start time is later than 9:00:00, whose task end time is earlier than 13:00:00, whose task start location is location 1 and whose task end location is location 2.
[0037] S402. The task retrieved based on the replacement task retrieval information is used as the replacement task for the task corresponding to the node to be processed.
[0038] Through the above steps, since the modification priority of the task attribute information of the main task is lower than that of the task attribute information of the first type of auxiliary tasks and the second type of auxiliary tasks, if the task attribute information of the node to be processed is the task attribute information of the first type of auxiliary task or the second type of auxiliary task, then based on the task attribute information of the node to be processed and the break conditions corresponding to all directed edges connected to it, the replacement task retrieval information corresponding to the node to be processed can be obtained. This helps to improve the accuracy of the obtained replacement task retrieval information, thereby improving the adaptability of the obtained replacement task. At the same time, it can avoid easily modifying the task attribute information of the main task. Using the task retrieved based on the replacement task retrieval information as the replacement task of the task corresponding to the node to be processed can quickly determine the replacement task, which is highly efficient.
[0039] Specifically, the following steps are included after step S500:
[0040] When the target task attribute information corresponding to the node to be processed is received, a reconfirmation message corresponding to the node to be processed is sent to the target user. The reconfirmation message corresponding to the node to be processed is used to prompt the user to confirm whether to replace the task attribute information of the node to be processed with the target task attribute information corresponding to the node to be processed.
[0041] Specifically, the reconfirmation information corresponding to the node to be processed includes a confirm option and a cancel option. The confirm option indicates that the task attribute information of the node to be processed is to be replaced with the target task attribute information corresponding to the node to be processed. The cancel option indicates that the replacement of the task attribute information of the node to be processed with the target task attribute information corresponding to the node to be processed is canceled.
[0042] When it is confirmed that the task attribute information of the node to be processed will be replaced with the target task attribute information corresponding to the node to be processed, the task attribute information of the node to be processed will be replaced with the target task attribute information corresponding to the node to be processed, so as to update the target knowledge graph.
[0043] Specifically, when the task attribute information of the node to be processed is replaced with the target task attribute information corresponding to the node to be processed, the task corresponding to the node to be processed and the tasks corresponding to all nodes connected to the node to be processed through directed edges can be executed normally.
[0044] In a specific embodiment, after replacing the task attribute information of the node to be processed with the target task attribute information corresponding to the node to be processed, the break conditions corresponding to all directed edges connected to the node to be processed will also be adaptively updated. For example, if the node to be processed is node 1, the task end time corresponding to node 1 is 9:00:00, node 2 is connected to node 1 through a directed edge and the task start time corresponding to node 2 is time 3, and the break condition on the directed edge is: time 3 is earlier than 9:00:00; then, when the task end time corresponding to node 1 is modified to 10:00:00, the break condition will also be updated to: time 3 is earlier than 10:00:00.
[0045] Through the above steps, when the target task attribute information corresponding to the node to be processed is received, a reconfirmation message corresponding to the node to be processed is sent to the target user. When it is confirmed that the task attribute information of the node to be processed will be replaced with the target task attribute information corresponding to the node to be processed, the task attribute information of the node to be processed will be replaced with the target task attribute information corresponding to the node to be processed, so as to update the target knowledge graph, avoid data asynchrony, and facilitate subsequent analysis and processing of the target knowledge graph.
[0046] In one specific embodiment, the following steps are included after step S500:
[0047] When the target user selects the task cancellation option corresponding to the pending node included in XD, the task attribute information of the pending node is deleted so as to update the target knowledge graph.
[0048] By following the steps above, data asynchrony can be avoided, facilitating subsequent analysis and processing of the target knowledge graph.
[0049] In one specific embodiment, the method further includes the following steps:
[0050] S01. When the task attribute information of the target node is deleted, the deleted task attribute information is used as the original task attribute information.
[0051] Specifically, when the task attribute information of the target node is deleted, the target node becomes an empty node.
[0052] S02. Based on the original task attribute information and the break conditions corresponding to all directed edges connected to the target node, determine several replacement tasks for the task corresponding to the target node.
[0053] S03. Send confirmation information XM corresponding to the target node to the target user; XM contains task attribute information of each replacement task corresponding to the target node, and XM is used to prompt the user to determine the target task attribute information corresponding to the target node from all the task attribute information contained in XM.
[0054] Through the above steps, after the task attribute information of the target node is deleted, several replacement tasks corresponding to the target node are determined based on the deleted task attribute information and the break conditions corresponding to all directed edges connected to the target node. Confirmation information containing each replacement task is then sent to the target user. The deletion of the target node's task attribute information can be understood as the cancellation of the task corresponding to the target node. Through the above steps, after the task corresponding to the target node is cancelled, the task attribute information of the replacement task corresponding to the target node is sent to the target user, and the user is prompted to confirm the target task attribute information corresponding to the target node. This avoids causing significant impact on the tasks corresponding to other nodes associated with the target node and is beneficial to improving the user experience.
[0055] Specifically, step S02 also includes the following steps:
[0056] Based on the original task attribute information and the break conditions corresponding to all directed edges connected to the target node, obtain the replacement task retrieval information corresponding to the target node.
[0057] The task retrieved based on the replacement task retrieval information is used as the replacement task for the task corresponding to the target node.
[0058] By following the above steps, based on the original task attribute information and the break conditions corresponding to all directed edges connected to the target node, the replacement task retrieval information corresponding to the target node is obtained. This helps to improve the accuracy of the obtained replacement task retrieval information, thereby improving the adaptability of the obtained replacement task. Using the task retrieved based on the replacement task retrieval information as the replacement task of the task corresponding to the target node can quickly determine the replacement task with high efficiency.
[0059] Specifically, the following steps are included after step S03:
[0060] S04. When the target task attribute information corresponding to the target node is received, a reconfirmation message corresponding to the target node is sent to the target user. The reconfirmation message corresponding to the target node is used to prompt the user to confirm whether to store the target task attribute information corresponding to the target node in the target node.
[0061] Specifically, the reconfirmation information corresponding to the target node includes a confirm option and a cancel option. The confirm option indicates that the target task attribute information corresponding to the target node is confirmed to be stored in the target node, and the cancel option indicates that the target task attribute information corresponding to the target node is canceled to be stored in the target node.
[0062] S05. When it is confirmed that the target task attribute information corresponding to the target node is stored in the target node, the target task attribute information corresponding to the target node is stored in the target node so as to update the target knowledge graph.
[0063] Through the above steps, when the target task attribute information corresponding to the target node is received, a reconfirmation message corresponding to the target node is sent to the target user. When it is confirmed that the target task attribute information corresponding to the target node is stored in the target node, the target task attribute information corresponding to the target node is stored in the target node so as to update the target knowledge graph, avoid data asynchrony, and facilitate subsequent analysis and processing of the target knowledge graph.
[0064] In one specific embodiment, the method further includes:
[0065] If the node to be processed is the main task node and the target node is a first type of auxiliary task node or a second type of auxiliary task node, then a first warning message is sent to the target user; the first warning message is used to remind the user that the task attribute information of the main task cannot be modified according to the task attribute information of the first type of auxiliary task or the second type of auxiliary task, and that there is a conflict between the task corresponding to the target node and the task corresponding to the node to be processed.
[0066] Through the above steps, since the priority of modifying the task attribute information of the main task is lower than that of modifying the task attribute information of the first type of auxiliary task and the second type of auxiliary task, if the node to be processed is the main task node and the target node is the first type of auxiliary task node or the second type of auxiliary task node, a first warning message is sent to the target user, which helps to improve the user experience and avoids easy modification of the task attribute information of the main task.
[0067] In one specific embodiment, the method further includes:
[0068] If the node to be processed is the main task node and the target node is the main task node, then based on the task attribute information of the node to be processed, the modified task attribute information of the target node, and the break condition corresponding to the directed edge connecting the node to be processed and the target node, the retrieval information for adding tasks is obtained.
[0069] The tasks retrieved based on the addable task retrieval information are used as addable tasks between the target node and the node to be processed to obtain a number of addable tasks between the target node and the node to be processed.
[0070] Send a second warning message and addable task information to the target user; the second warning message is used to prompt the user that the task corresponding to the target node and the task corresponding to the pending node are both main tasks and there is a conflict between the two main tasks; the addable task information contains the task attribute information of each addable task between the target node and the pending node, and the addable task information is used to prompt the user to determine the task attribute information of the target addable task from all the task attribute information contained in the addable task information.
[0071] When the task attribute information of the target addable task is received, a reconfirmation message corresponding to the target addable task is sent to the target user. The reconfirmation message corresponding to the target addable task is used to prompt the user to confirm whether to add the target addable task as a second type of auxiliary task and add the node corresponding to the second type of auxiliary task to the target knowledge graph.
[0072] Specifically, the reconfirmation information corresponding to the target addable task includes a confirm option and a cancel option. The confirm option indicates that the target addable task is confirmed as a second type of auxiliary task and the node corresponding to the second type of auxiliary task is added to the target knowledge graph. The cancel option indicates that the target addable task is canceled as a second type of auxiliary task and the node corresponding to the second type of auxiliary task is canceled from being added to the target knowledge graph.
[0073] When it is confirmed that the target addable task is a second type of auxiliary task and the node corresponding to the second type of auxiliary task is added to the target knowledge graph, the node corresponding to the second type of auxiliary task is added to the target knowledge graph, and the directed edge connecting the target node and the node to be processed is deleted. At the same time, a directed edge is established between the target node pointing to the node corresponding to the second type of auxiliary task and the directed edge between the node corresponding to the second type of auxiliary task pointing to the node to be processed, so as to update the target knowledge graph.
[0074] Through the above steps, if both the node to be processed and the target node are main task nodes, then based on the task attribute information of the node to be processed, the modified task attribute information of the target node, and the breakage conditions corresponding to the directed edges connecting the node to be processed and the target node, retrieval information for addable tasks is obtained. This helps improve the accuracy of the obtained retrieval information for addable tasks, thereby improving the adaptability of the obtained addable tasks. A second warning message and addable task information are sent to the target user. When both the node to be processed and the target node are main task nodes, a solution for adding tasks is recommended to the target user, rather than a solution for modifying the task attribute information of the node to be processed. This avoids easily modifying the main task information and reduces the impact of the task corresponding to the target node on other tasks. Regarding the impact of the task corresponding to the node, upon receiving the task attribute information of the target addable task, a reconfirmation message corresponding to the target addable task is sent to the target user. When it is confirmed that the target addable task is designated as a second type of auxiliary task and the node corresponding to the second type of auxiliary task is added to the target knowledge graph, the node corresponding to the second type of auxiliary task is added to the target knowledge graph, and the directed edge connecting the target node and the node to be processed is deleted. At the same time, a directed edge is established between the target node pointing to the node corresponding to the second type of auxiliary task and between the node corresponding to the second type of auxiliary task pointing to the node to be processed, so as to update the target knowledge graph, avoid data asynchrony, and facilitate subsequent analysis and processing of the target knowledge graph.
[0075] In one specific embodiment, the method further includes the step of obtaining the target knowledge graph corresponding to the target user:
[0076] Obtain the main task identifier list A, the first type of auxiliary task identifier list B, and the second type of auxiliary task identifier list C corresponding to the target user, where A = {A1, A2, ..., A...} i , ..., A m}, A i Let B be the i-th main task identifier corresponding to the target user, 1≤i≤m, where m is the number of main task identifiers corresponding to the target user, and B={B1,B2,……,B e , ..., B f}, B e Let f be the e-th first-class auxiliary task identifier corresponding to the target user, 1≤e≤f, where f is the number of first-class auxiliary task identifiers corresponding to the target user, and C={C1,C2,……,C k , ..., C t}, C k Let t be the kth second-type auxiliary task identifier corresponding to the target user, where 1≤k≤t, and t is the number of second-type auxiliary task identifiers corresponding to the target user.
[0077] Specifically, the main task identifier is the task identifier of the main task; the first type of auxiliary task identifier is the task identifier of the first type of auxiliary task; and the second type of auxiliary task identifier is the task identifier of the second type of auxiliary task.
[0078] Specifically, A i The corresponding main task is executed earlier than A. i+1 The execution order of the corresponding main tasks can be understood as: A i The corresponding task completion time is earlier than A. i+1 The corresponding task start time point, A i+1 This is the identifier of the (i+1)th main task corresponding to the target user.
[0079] According to A i Construct A with the corresponding main task's task attribute information i Corresponding node A 0 i According to B e Constructing the task attribute information of the corresponding first type of auxiliary task B e Corresponding node B 0 e According to C k Constructing the task attribute information of the corresponding second type of auxiliary task C k Corresponding node C 0 k Among them, A 0 i As the main task node, B 0 e C is a first-class auxiliary task node. 0 k This is a second-category auxiliary task node.
[0080] Based on A 0 i 、B 0 e and C 0 k Constructing the target knowledge graph involves the following steps:
[0081] Establish A 0 i Pointing to A 0 i+1 The directed edge.
[0082] When B e The corresponding task start time is later than A. i The corresponding task end time and B e The corresponding task completion time is earlier than A. i+1 At the corresponding task start time, A is established. 0i Pointing to B 0 e The directed edge.
[0083] When C k The corresponding task start time is later than A. i The corresponding task end time and C k The corresponding task completion time is earlier than A. i+1 At the corresponding task start time, obtain C. k The corresponding task completion time is earlier than A. i+1 The time difference D between the corresponding task start times k i+1 .
[0084] When D k i+1 ≥D 0 i+1 At that time, establish A 0 i Pointing to C 0 k Directed edges; when D k i+1 <D 0 i+1 At that time, A 0 i Pointing to A 0 i+1 Delete directed edges and create A 0 i Pointing to C 0 k The directed edges and C 0 k Pointing to A 0 i+1 The directed edge, D 0 i+1 A i+1 The sum is obtained by adding the corresponding task reserved time to the preset basic interval time.
[0085] Specifically, A i+1 The corresponding task reservation time is based on A i+1 The execution method of the corresponding task has a pre-set duration, for example: if A i+1 The corresponding task is executed by flight, then A i+1 The corresponding task has a reserved time of 60 minutes. If A i+1 The corresponding task is executed via high-speed rail, then A i+1 The corresponding task has a time limit of 30 minutes, which will not be elaborated here.
[0086] Specifically, the preset basic interval duration is the interval duration pre-set according to actual needs, such as 5 minutes, 10 minutes, 20 minutes, which will not be elaborated here.
[0087] Specifically, after establishing a directed edge, several break conditions corresponding to the directed edge are generated based on the task attribute information of the two nodes connected by the directed edge.
[0088] Specifically, the breakage condition corresponding to a directed edge is a condition indicating that at least one of the tasks corresponding to the two nodes connected by the directed edge cannot be executed normally. For example: the time point obtained by adding the task end time point of the preceding node corresponding to the directed edge and the reserved time of the task corresponding to the preceding node is later than the task start time point of the following node corresponding to the directed edge, the following node corresponding to the directed edge is the node pointed to by the directed edge, and the preceding node corresponding to the directed edge is the other node among the two nodes connected by the directed edge besides the following node; the time difference between the task end time point of the preceding node corresponding to the directed edge and the task start time point of the following node corresponding to the directed edge is less than the sum of the reserved time of the task corresponding to the preceding node, the reserved time of the task corresponding to the following node, and the preset basic interval time; the straight-line distance between the task end point of the preceding node corresponding to the directed edge and the task start point of the following node corresponding to the directed edge is greater than a preset distance.
[0089] In a specific embodiment, when both nodes connected by a directed edge are master task nodes, the breakage condition corresponding to the directed edge includes at least the following: the time difference between the task end time of the preceding node corresponding to the directed edge and the task start time of the following node corresponding to the directed edge is less than the sum of the task reserved time of the preceding node, the task reserved time of the following node, and the reserved passage time between the preceding node and the following node.
[0090] Specifically, the reserved passage time between the preceding node and the following node is obtained through the following steps:
[0091] If the task-related location corresponding to the preceding node includes only one location, the task-related location is taken as the first target location; otherwise, the task end location corresponding to the preceding node is taken as the first target location.
[0092] If the task-related location corresponding to the subsequent node includes only one location, the task-related location is taken as the second target location; otherwise, the task starting location corresponding to the subsequent node is taken as the second target location.
[0093] Obtain a list of estimated travel times, which includes the estimated travel time for each key mode of transportation. The estimated travel time for each key mode of transportation is the time required to travel from the first target location to the second target location using the key mode of transportation. Key modes of transportation are any mode of transportation other than walking and cycling, such as buses, subways, driving, and taxis.
[0094] The largest estimated travel time in the estimated travel time list will be used as the reserved travel time.
[0095] Through the above steps, when both nodes connected by a directed edge are main task nodes, the condition that "the time difference between the task end time of the preceding node and the task start time of the following node is less than the sum of the reserved time of the preceding node, the reserved time of the following node, and the reserved travel time between the preceding and following nodes" is used as one of the break conditions for the directed edge. Specifically, an estimated travel time list is obtained, which includes the estimated travel time for each key transportation mode. The estimated travel time for a key transportation mode is the time required to travel from the first target location to the second target location using that mode. The largest estimated travel time in the estimated travel time list is used as the reserved travel time. This lays the foundation for obtaining the addable task information for the two nodes. For example, tasks requiring reserved travel times other than the largest reserved travel time in the reserved travel time list to travel from the first target location to the second target location using key transportation modes can be used as addable tasks for the two nodes.
[0096] Specifically, the reserved time for the task corresponding to the node is the time preset according to the execution method of the task corresponding to the node.
[0097] Specifically, if the execution methods of the tasks corresponding to the two nodes are different, then the reserved time for the tasks corresponding to the two nodes will also be different.
[0098] Through the above steps, based on the task attribute information of the main task corresponding to the target user, the task attribute information of the first type of auxiliary tasks, and the task attribute information of the second type of auxiliary tasks, a main task node, a first type of auxiliary task node, a second type of auxiliary task node, and directed edges connecting these nodes are constructed. After establishing the directed edges, several break conditions corresponding to the directed edges are generated according to the task attribute information of the two nodes connected by the directed edges. Finally, a target knowledge graph corresponding to the target user is formed, so that the target knowledge graph can clearly and intuitively display the dependency relationship between each main task, the first type of auxiliary task, and the second type of auxiliary task. This enables information push based on the target knowledge graph corresponding to the target user. When the task attribute information of a node is modified, the affected node and its corresponding task can be determined automatically according to the modified task attribute information of the node and the break conditions on its corresponding directed edges. Furthermore, based on the task attribute information of the affected node and the break conditions corresponding to all directed edges connected to the affected node, the replacement task corresponding to the affected node and its corresponding task can be quickly determined, and a confirmation message containing the task attribute information of all replacement tasks can be sent to the target user. This method is highly efficient and accurate, and also helps to improve the user experience.
[0099] The present invention also provides a specific embodiment, which differs from the above embodiment in that, after step 300, it further includes the following steps:
[0100] S10. If the task attribute information of the node to be processed is the task attribute information of a first type of auxiliary task or a second type of auxiliary task, then according to the task attribute information of the node to be processed and the break conditions corresponding to all directed edges connected to it, obtain the replacement task retrieval information corresponding to the node to be processed.
[0101] S20. If the task cannot be found using the replacement task retrieval information, the target node is the main task node, and there is a directed edge pointing to the main task node among all the directed edges connected to the node to be processed, then the target node is taken as the starting point of the target path LJ, and the node corresponding to the last executed main task is taken as the ending point of LJ to obtain LJ. Here, the a-th node in LJ is connected to the (a+1)-th node in LJ by a directed edge and the directed edge points to the (a+1)-th node in LJ, 1≤a≤n, and n is the number of nodes in LJ.
[0102] S30. Fill the first slot of the preset text template M with the unmodified task attribute information of the target node, fill the first slot of the j-th node in LJ with the j-th node in M, fill the second slot of the target node with the modified task attribute information, and delete the (n+1)-z-th first slots in M to obtain the target text; where 2≤j≤n, z is the number of first slots in M, and z>n.
[0103] Specifically, M includes only one second slot.
[0104] Specifically, M also includes preset original task prompt text, preset task sequence description text for each first slot, preset task modification prompt text for the second slot, and preset problem guidance text.
[0105] In a specific embodiment, the preset original task prompt text is "My original task chain includes:"; the preset task sequence description text corresponding to the γth first slot is "The information of the γth task is:", 1≤γ≤z; the preset task modification prompt text is "However, the information of my first task has been modified, and the modified task information is:"; and the preset problem guidance text is "Please redesign one or more task chains according to the above content".
[0106] Specifically, the number of the first slot in M is a number that is preset by those skilled in the art according to actual needs, such as 100 or 150, which will not be elaborated here.
[0107] Specifically, in M, the preset original task prompt text is set before the preset task sequence description text corresponding to the first first slot, the preset task sequence description text corresponding to the (γ-1)th first slot is set before the preset task sequence description text corresponding to the γth first slot, the preset task sequence description text corresponding to the γth first slot is set before the γth first slot, the preset task sequence description text corresponding to the (γ+1)th first slot is set after the γth first slot, the preset task modification prompt text is set after the zth first slot, the second slot is set after the preset task modification prompt text, and the preset problem guidance text is set after the second slot.
[0108] Specifically, while deleting the (n+1)th to (z)th first slots in M, the preset task order description text corresponding to the (n+1)th to (z)th first slots in M is also deleted.
[0109] S40. Input the candidate task information set corresponding to each node in the target text and LJ into the large language model to obtain several feasible task information sets. The candidate task information set includes the task attribute information of several candidate tasks corresponding to its corresponding node, and the feasible task information set includes the task attribute information of feasible tasks corresponding to each node in LJ.
[0110] Specifically, the candidate task corresponding to a node is the task obtained by retrieving the candidate task retrieval information corresponding to the node.
[0111] In a specific embodiment, the candidate task retrieval information corresponding to a node is the retrieval information obtained based on the task attribute information corresponding to the node and the breakage conditions corresponding to the directed edges connected to the node.
[0112] In one specific embodiment, the candidate task retrieval information corresponding to a node is the retrieval information obtained based on the task attribute information corresponding to the node, the preset task start time range and the preset task end time range corresponding to the task. The preset task start time range and the preset task end time range are set by those skilled in the art according to actual needs.
[0113] Specifically, the feasible task information set can be understood as the task information set extracted from the output of the large language model.
[0114] S50. Send feasible task confirmation information KX to the target user. KX includes each of the feasible task information sets. KX is used to prompt the user to determine the target task information set corresponding to LJ from all feasible task information sets.
[0115] Specifically, the target task information set includes the task attribute information of the target task corresponding to each node in LJ.
[0116] If, through the above steps, the task cannot be found using the replacement task retrieval information, the target node is the main task node, and all directed edges connecting the node to be processed contain directed edges pointing to the main task node, it indicates that the task attribute information corresponding to the target node has been modified, and the task corresponding to the node to be processed cannot be executed normally. When no replacement task for the task corresponding to the node to be processed can be found, and the node to be processed is also connected to other main task nodes through directed edges, it will affect the normal execution of the main tasks corresponding to other main task nodes, thus causing other main tasks executed after the main task corresponding to the target node to be unable to be executed normally. At this time, the target path is obtained based on the target node, and the target text is obtained based on the unmodified task attribute information of the target node, the modified task attribute information, the task attribute information of the nodes in the target path, and the preset text template. The target text and the candidate task information set corresponding to each node in the target path are input into the large language model to obtain several feasible task information sets. The feasible task confirmation information including each feasible task information set is sent to the target user. This can automatically and quickly determine the task attribute information of the feasible tasks corresponding to the affected tasks and provide prompts to the user, which is highly efficient and conducive to improving the user experience.
[0117] Specifically, the following steps are included after step S50:
[0118] When the target task information set is received, a target task information set confirmation message is sent to the target user. The target task information set confirmation message is used to prompt the user to confirm whether to replace the task attribute information of the node corresponding to the a-th node in LJ in the target knowledge graph with the task attribute information of the target task corresponding to the a-th node in LJ in the target task information set.
[0119] Specifically, the target task information set confirmation information includes a confirm option and a cancel option. The confirm option indicates confirmation to replace the task attribute information of the node corresponding to the a-th node in LJ in the target knowledge graph with the task attribute information of the target task corresponding to the a-th node in LJ in the target task information set. The cancel option indicates cancellation to replace the task attribute information of the node corresponding to the a-th node in LJ in the target knowledge graph with the task attribute information of the target task corresponding to the a-th node in LJ in the target task information set.
[0120] When it is confirmed that the task attribute information of the node corresponding to the a-th node in LJ in the target knowledge graph is replaced with the task attribute information of the target task corresponding to the a-th node in LJ in the target task information set, the task attribute information of the node corresponding to the a-th node in LJ in the target knowledge graph is replaced with the task attribute information of the target task corresponding to the a-th node in LJ in the target task information set, so as to update the target knowledge graph.
[0121] Through the above steps, when the target task information set is received, a target task information set confirmation message is sent to the target user. When it is confirmed that the task attribute information of the node corresponding to the a-th node in LJ in the target knowledge graph will be replaced with the task attribute information of the target task corresponding to the a-th node in LJ in the target task information set, the task attribute information of the node corresponding to the a-th node in LJ in the target knowledge graph will be replaced with the task attribute information of the target task corresponding to the a-th node in LJ in the target task information set, so as to update the target knowledge graph, avoid data asynchrony, and facilitate subsequent analysis and processing of the target knowledge graph.
[0122] Specifically, the correlation between the b-th feasible task information set included in KX and LJ is no less than the correlation between the (b+1)-th feasible task information set included in KX and LJ, where 1≤b≤d, and d is the number of feasible task information sets included in KX.
[0123] Specifically, after step S40 and before step S50, the following steps are also included to obtain the correlation between the feasible task information set and LJ:
[0124] Obtain the list of intermediate nodes E = {E1, E2, ..., E...} corresponding to the feasible task information set. a , ..., E n}, E a E is the a-th intermediate node corresponding to the feasible task information set. a The system stores the task attribute information of the feasible task corresponding to the a-th node in the LJ included in the feasible task information set.
[0125] Establish E a Pointing to E a+1 Directed edges are used to obtain the intermediate knowledge graph corresponding to the feasible task information set, E a+1 This refers to the (a+1)th intermediate node corresponding to the feasible task information set; it can be understood that the intermediate knowledge graph includes E1, E2, ..., E a , ..., E n and E a Pointing to E a+1 The directed edge.
[0126] The intermediate knowledge graph is input into the GNN model to obtain the feature vector T1 corresponding to the intermediate knowledge graph, and the key knowledge graph corresponding to LJ is input into the GNN model to obtain the feature vector T2 corresponding to the key knowledge graph; wherein, the key knowledge graph corresponding to LJ includes each node in LJ and the directed edges connecting these nodes.
[0127] Specifically, GNN stands for Graph Neural Network.
[0128] The vector similarity between T1 and T2 is used as the relevance between the feasible task information set and LJ.
[0129] Specifically, the higher the vector similarity between T1 and T2, the more similar T1 and T2 are.
[0130] Through the above steps, an intermediate knowledge graph corresponding to the feasible task information set is constructed based on the task attribute information in the feasible task information set. The similarity between the feature vector of the intermediate knowledge graph and the feature vector of the key knowledge graph corresponding to the target path is used as the relevance between the feasible task information set and the target path. The higher the vector similarity, the higher the relevance. The stronger the correlation between the task attribute information in the feasible task information set and the task attribute information of the nodes in the target path, which can also be understood as the more similar they are, the more feasible task information sets are sorted in the feasible task confirmation information according to the relevance from large to small. Feasible task information sets with high relevance are displayed first, which is beneficial to improving the user experience.
[0131] In one specific embodiment, the step of establishing E a Pointing to E a+1 After obtaining the intermediate knowledge graph corresponding to the feasible task information set by constructing directed edges, the following steps are included to obtain the correlation between the feasible task information set and LJ:
[0132] The nodes in the target knowledge graph that correspond to the a-th node in LJ are connected by directed edges, and the nodes that do not correspond to the (a+1)-th node in LJ are selected as the candidate nodes corresponding to the a-th node in LJ.
[0133] If E a If the task corresponding to the corresponding node and the task corresponding to the candidate node corresponding to the a-th node in LJ can both be executed normally, then connection E is established. a The directed edges between the candidate nodes are used to update the intermediate knowledge graph corresponding to the feasible information set.
[0134] Specifically, connecting E a The directed edge connecting the candidate node to the node corresponding to the a-th node in the target knowledge graph LJ has the same direction as the directed edge connecting the candidate node to the node. This can be understood as: if the directed edge connecting the node corresponding to the a-th node in the target knowledge graph LJ to the candidate node points to the candidate node, then the connection to E... a The directed edges of the candidate node also point to the candidate node.
[0135] The intermediate knowledge graph after all updates is input into the GNN model to obtain the feature vector T3 corresponding to the intermediate knowledge graph after all updates are completed. The final key knowledge graph corresponding to LJ is input into the GNN model to obtain the feature vector T4 corresponding to the final key knowledge graph. The final key knowledge graph corresponding to LJ includes each node in LJ, each candidate node corresponding to each node, and the directed edges connecting these nodes.
[0136] The vector similarity between T3 and T4 is used as the relevance between the feasible task information set and LJ.
[0137] Through the above steps, based on the nodes corresponding to the nodes in the target knowledge graph and the nodes in the target path connected by directed edges, candidate nodes corresponding to each node in the target path are obtained. The intermediate knowledge graph is then updated based on the candidate nodes. The relevance between the feasible information set corresponding to the intermediate knowledge graph and the target path is obtained based on the feature vector of the intermediate knowledge graph after all updates are completed and the feature vector of the final key knowledge graph including each node in the target path, each candidate node corresponding to each node, and the directed edges connecting these nodes. Compared with the above embodiment, the influence of other nodes connected by directed edges to the nodes corresponding to the nodes in the target knowledge graph and the target path is also considered in the process of obtaining the relevance, which can improve the accuracy of the obtained relevance.
[0138] The present invention also provides a specific embodiment, which includes the following steps:
[0139] Once the target knowledge graph corresponding to any user is obtained, the target knowledge graph is stored in the database as a historical knowledge graph; for example, after obtaining the target knowledge graph 1 corresponding to a certain user, the target knowledge graph 1 is used as a historical knowledge graph.
[0140] When the target knowledge graph is updated, the updated version is stored in the database as a new historical knowledge graph. For example, when target knowledge graph 1 is updated to target knowledge graph 11, target knowledge graph 11 is used as the new historical knowledge graph. When target knowledge graph 11 is updated to target knowledge graph 111, target knowledge graph 111 is used as the new historical knowledge graph.
[0141] Specifically, if the updated version of the target knowledge graph does not delete or modify the task attribute information of any node in the target knowledge graph, but only adds several nodes to the target knowledge graph, then the historical knowledge graph corresponding to the target knowledge graph is deleted. For example, if target knowledge graph 1 is updated to target knowledge graph 11, and compared to target knowledge graph 1, target knowledge graph 11 only has several more nodes and does not change the task attribute information of each node in target knowledge graph 1, then the historical knowledge graph corresponding to target knowledge graph 1 is deleted.
[0142] Specifically, the task completion identifiers corresponding to the historical knowledge graph include a first identifier and a second identifier. The first identifier indicates that the tasks corresponding to some nodes in the historical knowledge graph cannot be executed normally, that is, the historical knowledge graph has a break. The second identifier indicates that the tasks corresponding to each node in the historical knowledge graph can be executed normally, that is, the historical knowledge graph does not have a break.
[0143] Specifically, if there is no updated version of the historical knowledge graph and the tasks corresponding to each node in the historical knowledge graph have been executed normally, then the task completion identifier corresponding to the historical knowledge graph is determined to be the second identifier; otherwise, the task completion identifier corresponding to the historical knowledge graph is determined to be the first identifier. For example, the task completion identifier corresponding to the historical knowledge graphs of target knowledge graph 1 and target knowledge graph 11 is the first identifier. If target knowledge graph 111 has not been updated and the tasks corresponding to each node in target knowledge graph 111 have been executed normally, then the task completion identifier corresponding to the historical knowledge graph of target knowledge graph 111 is the second identifier.
[0144] Through the above steps, once the target knowledge graph is obtained, both the target knowledge graph and its updated version are stored in the database as historical knowledge graphs, and the task completion identifiers corresponding to the historical knowledge graphs are obtained. This allows for direct retrieval of data from the database when historical data needs to be analyzed and processed, which is convenient, fast, and helps improve efficiency.
[0145] Specifically, the embodiments further include the following steps:
[0146] S1. Cluster the feature vectors of all historical knowledge graphs to obtain several first vector clusters.
[0147] Specifically, the first vector cluster includes several first vectors. The first vector can be understood as the feature vector after clustering. Those skilled in the art know that any clustering processing method in the prior art is within the protection scope of this invention, and will not be elaborated here.
[0148] In one specific embodiment, the historical knowledge graph is input into the GNN model to obtain the feature vector of the historical knowledge graph.
[0149] S2. For each first vector cluster, cluster the feature vectors of the external influence feature dataset corresponding to the historical knowledge graph of all first vectors in the first vector cluster to obtain several second vector clusters corresponding to the first vector cluster.
[0150] Specifically, the second vector cluster includes several second vectors, which can be understood as feature vectors of the externally influenced feature dataset.
[0151] Specifically, the external influence feature dataset includes feature data corresponding to each external influence feature. The external influence features are external environmental features that can affect the execution of the main task, the first type of auxiliary task, and the second type of auxiliary task; for example, weather and road conditions.
[0152] Specifically, the external influence feature dataset corresponding to the historical knowledge graph can be understood as the collection of feature data corresponding to each external influence feature collected during the task execution process corresponding to each node in the historical knowledge graph.
[0153] S3. Obtain the first vector sub-cluster corresponding to each second vector cluster; the first vector sub-cluster includes the first vector corresponding to each second vector in its corresponding second vector cluster.
[0154] S4. For each first vector sub-cluster, if the ratio of the number of first vectors with the task completion identifier as the first identifier in the corresponding historical knowledge graph in the first vector sub-cluster to the number of all first vectors in the first vector sub-cluster is not less than a preset ratio, then the vector group composed of the cluster center vector of the first vector sub-cluster and the cluster center vector of the second vector cluster corresponding to the first vector sub-cluster is used as a comparison vector group to obtain several comparison vector groups.
[0155] Specifically, the cluster center vector is the vector corresponding to the cluster center.
[0156] In one specific embodiment, the mean of all vectors within a cluster is used as the vector corresponding to the cluster center.
[0157] S5. Based on the feature vector of the target knowledge graph corresponding to the target user, the feature vector of the external influence feature dataset corresponding to the target knowledge graph, and each comparison vector group, obtain the vector correlation between each comparison vector group and the target knowledge graph; those skilled in the art know that any method for obtaining the feature vector of a dataset in the prior art is within the protection scope of this invention, and will not be described in detail here.
[0158] Specifically, the external influence feature dataset has only one feature vector.
[0159] Furthermore, the feature vectors of different external influence feature datasets have the same dimension.
[0160] In one specific embodiment, the target knowledge graph is input into a GNN model to obtain the feature vector of the target knowledge graph.
[0161] Specifically, the feature data corresponding to each external influence feature in the external influence feature dataset corresponding to the target knowledge graph can be obtained through prediction.
[0162] S6. If there is a vector relevance of not less than a preset relevance, then a task prompt message is sent to the target user. The task prompt message is used to inform the user that some tasks corresponding to certain nodes in the target knowledge graph cannot be executed normally.
[0163] In a specific embodiment, step S6 further includes: if the vector correlation between each comparison vector group and the target knowledge graph is less than the vector correlation, then no processing is performed.
[0164] Through the above steps, feature vectors of all historical knowledge graphs are clustered to obtain a first vector cluster. Feature vectors of similar historical knowledge graphs are clustered into one class. Feature vectors of the external influence feature datasets corresponding to all first vectors in the first vector clusters are clustered to obtain several second vector clusters corresponding to the first vector clusters. Feature vectors of similar external influence feature datasets are then clustered into one class to obtain first vector subclusters corresponding to the second vector clusters. Each first vector subcluster includes the first vector corresponding to each second vector in its corresponding second vector cluster, so that the historical knowledge graphs corresponding to the first vectors in each first vector subcluster are relatively similar, and the external influence feature datasets corresponding to these historical knowledge graphs are also relatively similar. If the ratio of the number of first vectors with the task completion identifier as the first identifier in the historical knowledge graph corresponding to the first vector subcluster to the total number of first vectors in the first vector subcluster is not less than a preset ratio, it indicates that a large portion of the historical knowledge graphs corresponding to all first vectors in the first vector subcluster have broken segments. Broken segments in historical knowledge graphs can be understood as tasks corresponding to some nodes in the historical knowledge graph not executing normally. At this time, the cluster center vector corresponding to the first vector subcluster and the first vector in the first vector subcluster are... The vector group formed by the cluster centers of the two vector clusters is used as the comparison vector group. Based on the comparison vector group, the feature vector of the target knowledge graph currently corresponding to the target user, and the feature vector of the external influence feature dataset corresponding to the target knowledge graph, the vector correlation between the comparison vector group and the target knowledge graph is obtained. The higher the vector correlation, the stronger the correlation between the comparison vector group and the feature vectors of the target knowledge graph and the external influence feature dataset corresponding to the target knowledge graph; it can also be understood as more similar. This indicates that the target knowledge graph is more likely to have gaps, meaning that tasks corresponding to some nodes in the target knowledge graph are more likely to fail to execute normally. Therefore, if there is a vector correlation of not less than a preset correlation, a task prompt message is sent to the target user. This task prompt message is used to inform the user that tasks corresponding to some nodes in the target knowledge graph may fail to execute normally. Regardless of whether the tasks corresponding to the nodes in the current target knowledge graph can execute normally, the system can automatically determine whether there are tasks corresponding to some nodes in the current target knowledge graph that cannot execute normally based on relevant data from historical knowledge graphs and relevant data from the current target knowledge graph, and provide the user with a prompt, which helps improve the user experience.
[0165] Specifically, in step S5, the vector correlation between each comparison vector group and the target knowledge graph is obtained through the following steps:
[0166] S51. Obtain the set of contrast vectors L = {L1, L2, ..., L...}y , ..., L q}, L y =(L y1 L y2 ); where L y Let L be the y-th comparison vector group, 1≤y≤q, where q is the number of comparison vector groups. y1 For L y The first contrast vector in L y2 For L y The second contrast vector in the first contrast vector is the cluster center vector of the first vector sub-cluster, and the second contrast vector is the cluster center vector of the second vector cluster.
[0167] S52, according to L y1 , L y2 The feature vector t1 of the target knowledge graph and the feature vector t2 of the external influence feature dataset corresponding to the target knowledge graph are used to obtain L. y Vector correlation U between the target knowledge graph and the target knowledge graph y U y The following conditions must be met:
[0168] U y =(1-β) y )×V y1 +β y ×V y2 ,β y For L y2 The corresponding preset weight, V y1 For L y1 The vector similarity between V and t1 y2 For L y2 Vector similarity between t2 and t2, 0 < β y <1.
[0169] Specifically, V y1 The larger L is y1 The more similar to t1; V y2 The larger L is y2 It is more similar to t2.
[0170] Through the above steps, the vector correlation between the comparison vector group and the target knowledge graph is obtained based on the first comparison vector, the second comparison vector, the preset weight corresponding to the second comparison vector, the feature vector of the target knowledge graph, and the feature vector of the external influence feature dataset corresponding to the target knowledge graph. At the same time, the similarity between knowledge graphs and the similarity between external environmental factors (i.e., external influence features) are considered, which helps to improve the accuracy of obtaining the vector correlation.
[0171] Specifically, step S5 also includes the following steps to obtain β.y :
[0172] S501. Obtain the set H = {H1, H2, ..., H} of the second vector cluster set. r H s}, H r ={H r1 H r2 H rα H rθ(r)}, H r Let H be the set of second vector clusters corresponding to the r-th first vector cluster, 1≤r≤s, where s is the number of first vector clusters. rα Let θ(r) be the α-th second vector cluster corresponding to the r-th first vector cluster, 1≤α≤θ(r), where θ(r) is the number of second vector clusters corresponding to the r-th first vector cluster.
[0173] S502, if H rα If the ratio of the number of first vectors with the task completion identifier as the first identifier in the corresponding first vector subcluster to the total number of first vectors in the first vector subcluster is not less than a preset ratio, then H will be... rα As H r The corresponding third vector cluster.
[0174] S503, when H 0 r When ≥1, obtain H r The incremental weight ZL corresponding to the third vector cluster r H 0 r For H r The number of corresponding third vector clusters, ZL r The following conditions must be met:
[0175] ZL r =W max ×(1-H 0 r / θ(r)), W max For the maximum incremental weight, W max The following conditions must be met:
[0176] W max =1-2×W 0 W 0 As a preset base weight, 0.3 < W 0 ≤0.4.
[0177] S504, L y2 The sum of the incremental weights corresponding to the second vector cluster and the third vector cluster, and the preset basic weights, is used as β. y .
[0178] In this embodiment, the historical knowledge graphs corresponding to all second vectors in all second vector clusters corresponding to the same first vector cluster are similar. However, since clustering is performed on the feature vectors of the external influence feature dataset corresponding to the historical knowledge graphs of all first vectors in the first vector cluster yields several second vector clusters corresponding to the first vector cluster, and a first vector sub-cluster corresponding to each second vector cluster is obtained, where each first vector sub-cluster includes the first vector corresponding to each second vector in its corresponding second vector cluster; therefore, the historical knowledge graphs corresponding to all first vector sub-clusters corresponding to all second vector clusters corresponding to the same first vector cluster are similar. However, the differences between the external environmental factors corresponding to different first vector sub-clusters corresponding to different second vector clusters corresponding to the same first vector cluster are significant. It can be seen that the more third vector clusters corresponding to the first vector cluster... A higher number of third vector clusters indicates that the historical knowledge graph corresponding to the first vector cluster is less affected by external environmental factors. This is because the historical knowledge graph corresponding to the first vector cluster is prone to breakage under different external environmental factors, meaning that some nodes in the historical knowledge graph may fail to execute their tasks correctly under different external environmental factors. Conversely, a lower number of third vector clusters corresponding to the first vector cluster indicates that the historical knowledge graph corresponding to the first vector cluster is more affected by external environmental factors. This is because the historical knowledge graph corresponding to the first vector cluster is prone to breakage only under one or more external environmental factors, meaning that some nodes in the historical knowledge graph may fail to execute their tasks correctly only under one or more external environmental factors. Therefore, the preset weight (i.e., ZL) corresponding to the second comparison vector is obtained based on the number of third vector clusters corresponding to the first vector cluster. r =W max ×(1-H 0 r / θ(r)), L y2 The sum of the incremental weights corresponding to the second vector cluster and the third vector cluster, and the preset basic weights, is used as β. y When the number of third vector clusters corresponding to the first vector cluster is large, the influence of the second comparison vector obtained from the second vector cluster corresponding to the first vector cluster should be reduced relatively, that is, the preset weight corresponding to the second comparison vector should be set relatively small; conversely, the preset weight corresponding to the second comparison vector should be set relatively large, so that the final obtained vector correlation is more accurate.
[0179] Specifically, in step S6, while sending task prompt information to the target user, similar knowledge graph information is also sent to the target user. The similar knowledge graph information includes the node identifier corresponding to each node in the similar knowledge graph, the task attribute information of each node, and the connection relationship between each node. The similar knowledge graph information is used to prompt the user to modify the task attribute information of the nodes in the target knowledge graph according to the similar knowledge graph information.
[0180] Specifically, step S6 also includes the following steps to obtain similar knowledge graphs:
[0181] S61. Change max(U1, U2,…,U y , ..., U q The corresponding L y Medium L y2 The second vector in the corresponding second vector cluster is used as the fourth vector corresponding to the target knowledge graph to obtain the fourth vector list DS = {DS1, DS2, ..., DS}. (aj) , ..., DS (an)}, where max() is the function to get the maximum value, DS (aj) Let a be the aj-th fourth vector, 1≤aj≤an, where an is the number of fourth vectors.
[0182] S62, based on DS (aj) DS (aj) The corresponding first vector DS 0 (aj) t1 and t2 acquire DS 0 (aj) The vector correlation U between the corresponding historical knowledge graph and the target knowledge graph 0 (aj) U 0 (aj) The following conditions must be met:
[0183] U 0 (aj) =(1-β) 0 )×V 0 (aj)1 +β 0 ×V 0 (aj)2 ,β 0 For max(U1, U2, ..., U y , ..., U q The corresponding L y L in y2 The corresponding preset weight, V 0 (aj)1 For DS 0 (aj)The vector similarity between V and t1 0 (aj)2 For DS (aj) Vector similarity between t2 and t2.
[0184] Specifically, V 0 (aj)1 The larger the DS 0 (aj) The more similar to t1; V 0 (aj)2 The larger the DS (aj) It is more similar to t2.
[0185] S63, max(U) 0 1, U 0 2, ..., U 0 (aj) , ..., U 0 (an) The latest version of the historical knowledge graph corresponding to the given historical knowledge graph is used as a similar knowledge graph; for example: if max(U) 0 1, U 0 2, ..., U 0 (aj) , ..., U 0 (an) If the corresponding historical knowledge graph is the target knowledge graph 111 and the target knowledge graph 111 is the latest version and has not been updated to other versions, then the target knowledge graph 111 is considered as a similar knowledge graph.
[0186] Through the above steps, the second vector in the second vector cluster corresponding to the second comparison vector in the comparison vector group with the highest vector relevance is taken as the fourth vector corresponding to the target knowledge graph. Based on the fourth vector, the first vector corresponding to the fourth vector, the feature vector of the target knowledge graph, and the feature vector of the external influence feature dataset corresponding to the target knowledge graph, the vector relevance between the historical knowledge graph corresponding to the first vector of the fourth vector and the target knowledge graph is obtained. The larger the vector relevance, the more similar the historical knowledge graph is to the target knowledge graph. The latest version of the historical knowledge graph corresponding to the historical knowledge graph with the highest vector relevance is taken as the most recent knowledge graph. At the same time as sending task prompt information to the target user, similar knowledge graph information is also sent to the target user so that the user can modify the task attribute information of the nodes in the target knowledge graph based on the similar knowledge graph information, thereby improving the user experience.
[0187] The present invention also provides a specific embodiment, which includes the following steps:
[0188] S001. Obtain the list of main task nodes F = {F1, F2, ..., F...} corresponding to the target user's current target knowledge graph. g , ..., F h}, F g Let h be the g-th main task node corresponding to the target knowledge graph, where 1 ≤ g ≤ h, and h is the number of main task nodes corresponding to the target knowledge graph.
[0189] S002, If the historical knowledge graph includes F g If the corresponding task identifier corresponds to the main task node, and the vector similarity between the feature vector of the historical knowledge graph and the feature vector of the target knowledge graph is not less than a preset similarity, then the historical knowledge graph is used as F. g The corresponding knowledge graph is used to obtain F g The corresponding knowledge graph set R g R g It includes several related knowledge graphs.
[0190] S003, If R exists g Conforms to R g The number of knowledge graphs with the task completion identifier as the first identifier and R g If the ratio of the number of all relevant knowledge graphs in the target database is not less than a preset ratio, then a task prompt message will be sent to the target user.
[0191] Through the above steps, the main task node corresponding to the target knowledge graph is obtained. If the historical knowledge graph includes the main task node corresponding to the task identifier of the main task node, and the similarity between the feature vector of the historical knowledge graph and the feature vector of the target knowledge graph is not less than a preset similarity, then the historical knowledge graph is used as the relevant knowledge graph set corresponding to the main task node. It can be seen that the relevant knowledge graphs in the relevant knowledge graph set are quite similar to the target knowledge graph and have the same main task corresponding to the target knowledge graph. When the ratio of the number of relevant knowledge graphs with the task completion identifier as the first identifier in the relevant knowledge graph set to the total number of all relevant knowledge graphs in the relevant knowledge graph set is not less than a preset ratio, it indicates that most of the relevant knowledge graphs in the relevant knowledge graph set are fragmented, that is, most of the relevant knowledge graphs in the relevant knowledge graph set have some nodes whose tasks cannot be executed normally. The relevant knowledge graph in the current knowledge graph is quite similar to the target knowledge graph and shares the same main task nodes corresponding to the target knowledge graph. Therefore, if most of the relevant knowledge graphs in the relevant knowledge graph set are broken, the target knowledge graph is also likely to be broken as well. That is, the target knowledge graph is also likely to have some nodes whose tasks cannot be executed normally. Therefore, when the ratio of the number of relevant knowledge graphs with the task completion identifier as the first identifier in any relevant knowledge graph set to the total number of all relevant knowledge graphs in the relevant knowledge graph set is not less than a preset ratio, a task prompt message is sent to the target user. Regardless of whether the task corresponding to the node in the current target knowledge graph can be executed normally, the system can automatically determine whether there is a situation where some nodes in the current target knowledge graph cannot be executed normally based on the relevant data of the historical knowledge graph and the relevant data of the current target knowledge graph, and provide a prompt to the user, which helps to improve the user experience.
[0192] Specifically, in step S003, while sending task prompt information to the target user, referenceable knowledge graph information is also sent to the target user. The referenceable knowledge graph information includes the node identifier corresponding to each node of the referenceable knowledge graph, the task attribute information of each node, and the connection relationship between each node. The referenceable knowledge graph information is used to prompt the user to modify the task attribute information of the nodes in the target knowledge graph according to the referenceable knowledge graph information.
[0193] Specifically, step S003 also includes the following step: obtaining a referable knowledge graph:
[0194] S0031, If R g The number of knowledge graphs with the task completion identifier as the first identifier and Rg If the ratio of the number of all relevant knowledge graphs in R is not less than a preset ratio, then R will be... g Each relevant knowledge graph in the dataset is used as the first designated knowledge graph corresponding to the target knowledge graph to obtain the first designated knowledge graph set ZD = {ZD1, ZD2, ..., ZD...} (ai) ..., ZD (am) ZD (ai) Let a be the ai-th first specified knowledge graph, 1≤ai≤am, where am is the number of first specified knowledge graphs.
[0195] S0032, set max(XS1, XS2, ..., XS) to... (ai) ..., XS (am) The first specified knowledge graph corresponding to XS is used as the second specified knowledge graph. (ai) For ZD (ai) The vector similarity between the feature vectors of the target knowledge graph and the feature vectors of the target knowledge graph.
[0196] Specifically, XS (ai) The larger, ZD (ai) The more similar the feature vector is to the feature vector of the target knowledge graph, the better.
[0197] S0033. Use the latest version of the historical knowledge graph corresponding to the second specified knowledge graph as the reference knowledge graph; for example: if the historical knowledge graph corresponding to the second specified knowledge graph is the target knowledge graph 1 and the target knowledge graph 111 is the latest version and has not been updated to other versions, then use the target knowledge graph 111 as the reference knowledge graph.
[0198] Through the above steps, if the ratio of the number of relevant knowledge graphs with the task completion identifier as the first identifier in the relevant knowledge graph set to the total number of all relevant knowledge graphs in the relevant knowledge graph set is not less than a preset ratio, the relevant knowledge graphs in the relevant knowledge graph set are used as the first designated knowledge graph corresponding to the target knowledge graph. The vector similarity between the feature vector of the first designated knowledge graph and the feature vector of the target knowledge graph is obtained, and the first designated knowledge graph corresponding to the largest vector similarity is used as the second designated knowledge graph. The latest version of the historical knowledge graph corresponding to the historical knowledge graph corresponding to the second designated knowledge graph is used as a reference knowledge graph. At the same time as sending task prompt information to the target user, reference knowledge graph information is also sent to the target user, so that the user can modify the task attribute information of the nodes in the target knowledge graph according to the reference knowledge graph information, which is beneficial to improving the user experience.
[0199] In one specific embodiment, the following steps are included after step S002:
[0200] Iterate through R, when R g The number of knowledge graphs with the task completion identifier as the first identifier and R g When the ratio of the number of all relevant knowledge graphs in the dataset is not less than a preset ratio, F is sent to the target user. g The corresponding task prompt message, F g The corresponding task prompt information is used to inform the user that the tasks corresponding to some nodes in the target knowledge graph are affected by F. g The corresponding task may cause it to fail to execute properly.
[0201] Through the above steps, when the ratio of the number of relevant knowledge graphs with the first identifier corresponding to the task completion identifier in the relevant knowledge graph set to the total number of all relevant knowledge graphs in the relevant knowledge graph set is not less than a preset ratio, a task prompt message corresponding to the main task node of the relevant knowledge graph set is sent to the target user. This not only prompts the user that some tasks corresponding to certain nodes in the target knowledge graph cannot be executed normally, but also indicates which task caused this situation, which helps to improve the user experience.
[0202] Embodiments of the present invention also provide a non-transitory computer-readable storage medium that can be disposed in an electronic device to store a computer program related to implementing a method in the method embodiments, the computer program being loaded and executed by the processor to implement the method provided in the above embodiments.
[0203] Embodiments of the present invention also provide an electronic device, including: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method provided in the above embodiments.
[0204] Embodiments of the present invention also provide a computer program product including program code, which, when the program product is run on an electronic device, causes the electronic device to perform the steps of the methods described above in various exemplary embodiments of the present invention.
[0205] This invention provides a knowledge graph-based information push method, electronic device, and storage medium. The method, after modifying the task attribute information of a target node in a target knowledge graph corresponding to a target user, uses the break conditions corresponding to each directed edge of the target node as candidate break conditions. The target node can be any node in the target knowledge graph. It matches at least the modified task attribute information of the target node with each candidate break condition. If any candidate break condition matches successfully, the other node connected to the directed edge corresponding to that candidate break condition is determined as the node to be processed. Based on the task attribute information of the node to be processed and the break conditions corresponding to all its connected directed edges, several replacement tasks for the task corresponding to the node to be processed are determined. Confirmation information for the node to be processed is sent to the target user. The confirmation information contains the task attribute information of each replacement task corresponding to the node to be processed, and the confirmation information is used to prompt the user to determine the target task attribute information corresponding to the node to be processed from all the task attribute information contained in the confirmation information. As can be seen, this invention realizes information push based on the target knowledge graph corresponding to the target user. The target knowledge graph includes nodes corresponding to multiple tasks. The nodes store the task attribute information of their corresponding tasks. When the task attribute information of a certain node is modified, it can automatically determine the affected node and its corresponding task based on the modified task attribute information of the node and the break conditions on the directed edges connected to the affected node. Furthermore, based on the task attribute information of the affected node and the break conditions of all directed edges connected to the affected node, it can quickly determine the replacement task corresponding to the affected node and its corresponding task and send a confirmation message containing the task attribute information of all replacement tasks to the target user. This method is highly efficient and accurate, and also helps to improve the user experience.
[0206] While specific embodiments of the invention have been described in detail by way of examples, those skilled in the art should understand that the examples are for illustrative purposes only and are not intended to limit the scope of the invention. Those skilled in the art should also understand that various modifications can be made to the embodiments without departing from the scope and spirit of the invention.
Claims
1. A knowledge graph-based information push method, characterized in that, The method includes the following steps: S100. When the task attribute information of the target node in the target knowledge graph corresponding to the target user is modified, the breaking condition corresponding to each directed edge of the target node is taken as a candidate breaking condition; wherein, the target knowledge graph includes several nodes and directed edges for connecting the nodes, each of the directed edges has at least one breaking condition, and the target node is any node in the target knowledge graph. S200, at least use the modified task attribute information of the target node to match each candidate fracture condition; S300. If any candidate break condition is successfully matched, the other node connected by the directed edge corresponding to the candidate break condition is determined as the node to be processed; if the candidate break condition is successfully matched, it means that the task corresponding to at least one of the two nodes corresponding to the candidate break condition cannot be executed normally. S400. Based on the task attribute information of the node to be processed and the breakage conditions corresponding to all directed edges connected to it, determine several replacement tasks for the task corresponding to the node to be processed. S500: Send confirmation information XD corresponding to the node to be processed to the target user; XD contains task attribute information of each replacement task corresponding to the node to be processed, and XD is used to prompt the user to determine the target task attribute information corresponding to the node to be processed from all the task attribute information contained in XD.
2. The information push method based on knowledge graphs according to claim 1, characterized in that, The target knowledge graph includes several nodes, which are divided into main task nodes, first-type auxiliary task nodes, and second-type auxiliary task nodes. The main task node stores the task attribute information of its corresponding main task, the first-type auxiliary task node stores the task attribute information of its corresponding first-type auxiliary task, and the second-type auxiliary task node stores the task attribute information of its corresponding second-type auxiliary task. The task attribute information includes at least one of the following: task identifier, task start time, task end time, and task-related location.
3. The information push method based on knowledge graphs according to claim 2, characterized in that, Modifying the task attribute information of the main task has a lower priority than modifying the task attribute information of the first and second categories of auxiliary tasks. The first category of auxiliary tasks are those that cannot affect the execution of the main task, while the second category of auxiliary tasks are those that may affect the execution of the main task.
4. The information push method based on knowledge graphs according to claim 1, characterized in that, The method further includes the following steps: S01. When the task attribute information of the target node is deleted, the deleted task attribute information is used as the original task attribute information. S02. Based on the original task attribute information and the break conditions corresponding to all directed edges connected to the target node, determine several replacement tasks for the task corresponding to the target node. S03. Send confirmation information XM corresponding to the target node to the target user; XM contains task attribute information of each replacement task corresponding to the target node, and XM is used to prompt the user to determine the target task attribute information corresponding to the target node from all the task attribute information contained in XM.
5. The information push method based on knowledge graphs according to claim 2, characterized in that, Step S400 also includes the following steps: S401. If the task attribute information of the node to be processed is the task attribute information of a first type of auxiliary task or a second type of auxiliary task, then according to the task attribute information of the node to be processed and the break conditions corresponding to all the directed edges connected to it, obtain the replacement task retrieval information corresponding to the node to be processed. S402. The task retrieved based on the replacement task retrieval information is used as the replacement task for the task corresponding to the node to be processed.
6. The information push method based on knowledge graphs according to claim 2, characterized in that, The method further includes: If the node to be processed is the main task node and the target node is a first type of auxiliary task node or a second type of auxiliary task node, then a first warning message is sent to the target user; the first warning message is used to remind the user that the task attribute information of the main task cannot be modified according to the task attribute information of the first type of auxiliary task or the second type of auxiliary task, and that there is a conflict between the task corresponding to the target node and the task corresponding to the node to be processed.
7. The information push method based on knowledge graphs according to claim 2, characterized in that, The method further includes: If the node to be processed is the main task node and the target node is the main task node, then based on the task attribute information of the node to be processed, the modified task attribute information of the target node, and the break condition corresponding to the directed edge connecting the node to be processed and the target node, the retrieval information of the task to be added is obtained. The tasks retrieved based on the addable task retrieval information are used as addable tasks between the target node and the node to be processed to obtain a number of addable tasks between the target node and the node to be processed; Send a second warning message and addable task information to the target user; the second warning message is used to prompt the user that the task corresponding to the target node and the task corresponding to the pending node are both main tasks and there is a conflict between the two main tasks; the addable task information contains the task attribute information of each addable task between the target node and the pending node, and the addable task information is used to prompt the user to determine the task attribute information of the target addable task from all the task attribute information contained in the addable task information.
8. The information push method based on knowledge graphs according to claim 1, characterized in that, The following steps are included after step S500: When the target task attribute information corresponding to the node to be processed is received, a reconfirmation message corresponding to the node to be processed is sent to the target user. The reconfirmation message corresponding to the node to be processed is used to prompt the user to confirm whether to replace the task attribute information of the node to be processed with the target task attribute information corresponding to the node to be processed.
9. A non-transitory computer-readable storage medium, characterized in that, The storage medium stores a computer program, which is loaded and executed by a processor to implement the knowledge graph-based information push method as described in any one of claims 1-8.
10. An electronic device, comprising: A processor, a memory, and a computer program stored in the memory and executable on the processor, characterized in that, when the processor executes the computer program, it implements the knowledge graph-based information push method as described in any one of claims 1-8.