Method and apparatus for scenario arrangement based on capability competition relationship

By constructing an array of capability competition and cooperation objects before scene orchestration, the problem of undetermined competition and cooperation relationships in scene orchestration is solved, enabling timely reminders of potential risks to users when adding capabilities, thus improving orchestration efficiency and user experience.

CN117312381BActive Publication Date: 2026-02-13CHONGQING JINKANG NEW ENERGY VEHICLE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311257494.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-26
Publication Date
2026-02-13
Estimated Expiration
2043-09-26

AI Technical Summary

Technical Problem

In existing technologies, the competitive and cooperative relationships of capabilities are not determined in advance during scene orchestration, which leads to the discovery that capabilities cannot be added or the orchestrated scene cannot function properly after orchestration.

Method used

By pre-constructing an array of competing and cooperating relationships for all capabilities in the scene to be orchestrated, when each capability is about to be added to the scene, the array is traversed to search for other capabilities with competing and cooperating relationships. If such capabilities exist, the capability is not added to the scene to be orchestrated, and a competing and cooperating relationship prompt is displayed.

Benefits of technology

It improves layout efficiency, enhances user experience, and helps users avoid potential problems and risks in advance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117312381B_ABST
    Figure CN117312381B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of intelligent automobiles, and provides a method and device for scene arrangement based on a capability competition relationship. The method comprises the following steps: acquiring all capabilities in a to-be-arranged scene; creating a competition relationship object for each capability; saving the competition relationship objects of all capabilities of the to-be-arranged scene in a competition relationship object array; determining a first capability that is about to be added to the to-be-arranged scene; creating a traversal method, performing an operation of traversing the competition relationship object array in the traversal method, if a second capability that has a competition relationship with the first capability exists in the competition relationship object array, performing an operation of determining whether the second capability has been added to the to-be-arranged scene in the traversal method, if yes, returning a competition relationship prompt information; based on the competition relationship prompt information, not performing an operation of adding the first capability to the to-be-arranged scene, and displaying the competition relationship prompt information. The method can improve the scene arrangement efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of intelligent vehicles, and in particular to a method and device for scene arrangement based on capability competition relationship. BACKGROUND

[0002] When a vehicle scene is arranged, various capabilities of the vehicle can be added to a specific scene. When a capability of the vehicle is added to a scene as a trigger condition, due to the influence of vehicle hardware configuration or safety factors, some capabilities cannot be added at the same time. Therefore, it is necessary to define the competition relationship between each capability and other capabilities in advance before arranging the scene. There is no related solution in the prior art. SUMMARY

[0003] Therefore, the embodiments of the present application provide a method and device for scene arrangement based on capability competition relationship to solve the problem that the competition relationship of capabilities is not determined in advance in the prior art scene arrangement, resulting in the problem that the capabilities cannot be added after arrangement or the scene cannot normally run after arrangement.

[0004] In a first aspect, the embodiments of the present application provide a method for scene arrangement based on capability competition relationship, comprising:

[0005] obtaining all capabilities in a to-be-arranged scene;

[0006] creating a competition relationship object for each capability, the competition relationship object comprising a first attribute and a second attribute, the first attribute being used to represent the identifier of the capability, and the second attribute being used to represent the identifier of other capabilities having a competition relationship with the capability;

[0007] saving the competition relationship objects of all capabilities of the to-be-arranged scene in a competition relationship object array;

[0008] determining a first capability to be added to the to-be-arranged scene;

[0009] creating a traversal method, and performing an operation of traversing the competition relationship object array in the traversal method to determine whether there is a second capability having a competition relationship with the first capability in the competition relationship object array;

[0010] in response to the second capability having a competition relationship with the first capability existing in the competition relationship object array, performing an operation of determining whether the second capability has been added to the to-be-arranged scene in the traversal method;

[0011] in response to determining that the second capability has been added to the to-be-arranged scene, returning a competition relationship prompt information;

[0012] based on the competition relationship prompt information, not performing an operation of adding the first capability to the to-be-arranged scene, and displaying the competition relationship prompt information.

[0013] In a second aspect, the embodiment of the present application provides a device for scene arrangement based on capability competition relationship, which comprises:

[0014] The acquisition module is configured to acquire all capabilities in a scene to be arranged.

[0015] The creation module is configured to create a competition relationship object for each capability, wherein the competition relationship object comprises a first attribute and a second attribute, the first attribute is used to represent the identification of the capability, and the second attribute is used to represent the identification of other capabilities having the competition relationship with the capability.

[0016] The saving module is configured to save the competition relationship objects of all capabilities of the scene to be arranged in a competition relationship object array.

[0017] The determination module is configured to determine a first capability to be added to the scene to be arranged.

[0018] The traversal module is configured to create a traversal method, and perform an operation of traversing the competition relationship object array in the traversal method to determine whether there is a second capability having the competition relationship with the first capability in the competition relationship object array.

[0019] The traversal module is further configured to perform an operation of determining whether the second capability has been added to the scene to be arranged in the traversal method in response to the second capability having the competition relationship with the first capability existing in the competition relationship object array.

[0020] The traversal module is further configured to return a competition relationship prompt information in response to the second capability having been added to the scene to be arranged.

[0021] The arrangement module is configured to not perform an operation of adding the first capability to the scene to be arranged based on the competition relationship prompt information, and display the competition relationship prompt information.

[0022] In a third aspect, the embodiment of the present application provides an electronic device, which comprises a memory, a processor, and a computer program stored in the memory and capable of running on the processor, and the processor implements the steps of the above method when executing the computer program.

[0023] In a fourth aspect, the embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the computer program implements the steps of the above method when executed by a processor.

[0024] The beneficial effects of the embodiments of the present application compared with the prior art are: the embodiments of the present application pre-construct an array of conflict relationship objects including all capabilities in the to-be-arranged scene, when each capability is about to be added to the to-be-arranged scene, the array is traversed to find whether there is another capability in conflict relationship with the capability, if there is, it is further determined whether the capability has been added to the to-be-arranged scene, if yes, the capability is not added to the to-be-arranged scene, and a prompt is given to the user, which can determine whether the capability is in conflict relationship with other capabilities when the capability is added, so that the user can be reminded of possible problems and risks in time when there is a conflict relationship, helping the user to avoid the risks in advance, improving the arrangement efficiency and improving the user experience. BRIEF DESCRIPTION OF DRAWINGS

[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or prior art description will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0026] Figure 1 is a scene schematic diagram of an application scenario of the embodiments of the present application.

[0027] Figure 2 is a flowchart of a method for scene arrangement based on capability conflict relationship provided by the embodiments of the present application.

[0028] Figure 3 is a flowchart of a method for performing the operation of traversing the conflict relationship object array in the traversal method provided by the embodiments of the present application.

[0029] Figure 4 is a flowchart of a method for determining whether the second capability has been added to the to-be-arranged scene provided by the embodiments of the present application.

[0030] Figure 5 is a flowchart of a method for returning the conflict relationship prompt information in response to determining that the second capability has been added to the to-be-arranged scene provided by the embodiments of the present application.

[0031] Figure 6 is a flowchart of a method for scene arrangement based on capability conflict relationship provided by the embodiments of the present application.

[0032] Figure 7 is a flowchart of a method for scene arrangement based on capability conflict relationship provided by the embodiments of the present application.

[0033] Figure 8is a schematic diagram of an apparatus for scene arrangement based on capability competition relationship provided by an embodiment of the present application.

[0034] Figure 9 is a schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0035] In the following description, specific details are set forth in order to provide a thorough understanding of embodiments of the application. However, persons having ordinary skill in the art will readily recognize that embodiments of the application can be practiced without these specific details. In other instances, well-known structures, devices, circuits, and processes have not been described in detail so as not to unnecessarily obscure aspects of the application.

[0036] Glossary:

[0037] Competition relationship: whether multiple capabilities can be selected at the same time.

[0038] skillId: represents the identity (Identity document, id) of each capability.

[0039] excludeList: array type, which contains all the capability ids that have a competition relationship with the capability represented by skillId.

[0040] competitions: an array containing all competition relationship objects of a certain capability.

[0041] A method and apparatus for scene arrangement based on capability competition relationship according to an embodiment of the present application will be described in detail below with reference to the accompanying drawings.

[0042] Figure 1 is a schematic diagram of an application scenario of an embodiment of the present application. The application scenario can include a vehicle 1, a server 2, and a network 4.

[0043] The vehicle 1 can be hardware or software. The vehicle 1 can include hardware, which can be various vehicle-mounted electronic devices supporting communication with the roadside device 2 and the server 3, including but not limited to a Telematics-BOX (TBOX), an On board Unit (OBU), a vehicle-mounted entertainment system, etc.; the vehicle 1 can also include software, which can be installed in the vehicle-mounted electronic devices as described above. The vehicle 1 can be implemented as a combination of multiple hardware or hardware modules and multiple software or software modules, and the present application does not limit this. Further, various applications can be installed on the vehicle 1, such as data processing applications, instant messaging tools, social platform software, search applications, shopping applications, etc.

[0044] The server 2 can be a server providing various services, for example, a background server receiving a request sent by the vehicle 1 establishing a communication connection therewith, which can process and store the received vehicle data, and further implement vehicle scene arrangement based on various data. The server 2 can be a server, a server cluster composed of several servers, or a cloud computing service center, and the embodiments of the present application do not limit this.

[0045] It should be noted that the server 2 can be hardware or software. When the server 2 is hardware, it can be various electronic devices providing various services for the vehicle 1. When the server is software, it can be multiple software or software modules providing various services for the vehicle 1, or a single software or software module providing various services for the vehicle 1, and the embodiments of the present application do not limit this.

[0046] The network 3 can be a wired network connected by coaxial cables, twisted pairs and optical fibers, or a wireless network that can realize interconnection of various communication devices without wiring, for example, Bluetooth, Near Field Communication (NFC), Infrared, etc., and the embodiments of the present application do not limit this.

[0047] The vehicle 1 can establish a communication connection with the server 2 through the network 3 to receive or send information, etc.

[0048] It should be noted that the specific types, quantities and combinations of the vehicle 1, the server 2 and the network 3 can be adjusted according to the actual needs of the application scenario, and the embodiments of the present application do not limit this.

[0049] As mentioned above, when the automobile scene is arranged, various capabilities of the automobile can be added to a specific scene. When a certain capability of the automobile is added to a certain scene as a trigger condition, due to the influence of automobile hardware configuration or safety factors, some capabilities cannot be added at the same time. Therefore, it is necessary to define the competition relationship between each capability and other capabilities in advance before the scene is arranged. There is no related solution in the prior art, and therefore, it is necessary to provide a solution for defining the competition relationship between each capability and other capabilities in advance before the scene is arranged, so as to remind the user of possible problems and risks and help the user to avoid the risk in advance.

[0050] In view of this, this application provides a method for scene orchestration based on capability competition and cooperation relationships. By pre-constructing an array of competition and cooperation relationship objects for all capabilities in the scene to be orchestrated, when each capability is about to be added to the scene, the array is traversed to search for other capabilities that have a competition and cooperation relationship with that capability. If they exist, it is further determined whether the capability has already been added to the scene to be orchestrated. If not, the capability is not added to the scene to be orchestrated, and a prompt is given to the user. This method can determine whether a capability has a competition and cooperation relationship with other capabilities when it is being added, so that when a competition and cooperation relationship exists, the user can be promptly reminded of potential problems and risks, helping the user to avoid such risks in advance, improving orchestration efficiency and enhancing user experience.

[0051] Figure 2 This is a flowchart illustrating a method for scene orchestration based on capability competition and cooperation provided in an embodiment of this application. Figure 2 The method of scene orchestration based on capability competition and cooperation can be derived from Figure 1 The server executes this. For example... Figure 2 As shown, the method for scene orchestration based on capability competition and cooperation includes the following steps:

[0052] In step S201, all capabilities in the scene to be orchestrated are obtained.

[0053] In step S202, a competition / cooperation relationship object is created for each capability.

[0054] The objects representing competitive and cooperative relationships include a first attribute and a second attribute. The first attribute represents the identifier of the capability, and the second attribute represents the identifier of other capabilities that have a competitive or cooperative relationship with the capability.

[0055] In step S203, the competition and cooperation relationship objects of all capabilities of the scene to be arranged are stored in the competition and cooperation relationship object array.

[0056] In step S204, the first capability to be added to the scene to be orchestrated is determined.

[0057] In step S205, a traversal method is created, and the operation of traversing the array of competing and cooperating relationship objects is performed inside the traversal method to determine whether there is a second ability in the array of competing and cooperating relationship objects that has a competing and cooperating relationship with the first ability.

[0058] In step S206, in response to a second capability existing in the array of competing and cooperating relationship objects that has a competing and cooperating relationship with the first capability, an operation to determine whether the second capability has been added to the scene to be orchestrated is performed inside the traversal method.

[0059] In step S207, in response to determining that the second capability has been added to the scene to be orchestrated, a competition / cooperation relationship prompt message is returned.

[0060] In step S208, based on the competition relationship prompt information, the operation of adding the first capability to the to-be-orchestrated scene is not performed, and the competition relationship prompt information is displayed.

[0061] In the embodiments of the present application, all capabilities in the to-be-orchestrated scene can be acquired first. The to-be-orchestrated scene can be a to-be-orchestrated automobile scene.

[0062] In the embodiments of the present application, a competition relationship object can be created for each capability. The competition relationship object refers to an object composed of each capability and all capabilities having a competition relationship with the capability. The object includes two attributes, the first attribute is used to represent the identifier of the capability, and the second attribute is used to identify the identifiers of all other capabilities having a competition relationship with the capability. The identifier of each capability can be, for example, the id of the capability.

[0063] In the embodiments of the present application, the competition relationship objects of all capabilities in the to-be-orchestrated scene can be saved in a competition relationship object array. In an example, assuming that the current to-be-orchestrated scene includes n capabilities, n is a positive integer, each capability has kj capabilities having a competition relationship with it, j is an integer greater than or equal to 1 and less than or equal to n, and kj is an integer greater than or equal to 0 and less than n, the obtained competition relationship array can be, for example:

[0064]

[0065]

[0066] That is, among the n capabilities in the current to-be-orchestrated scene, the first capability can include k1 capabilities having a competition relationship with it, the second capability can include k2 capabilities having a competition relationship with it, and so on, the jth capability can include kj capabilities having a competition relationship with it, and the nth capability can include kn capabilities having a competition relationship with it.

[0067] In the embodiments of the present application, the first capability to be added to the to-be-orchestrated scene can be determined. Subsequently, a traversal method can be created, and the operation of traversing the competition relationship object array is performed inside the traversal method to determine whether the second capability having a competition relationship with the first capability exists in the competition relationship object array. It should be noted that the second capability can be one capability or multiple capabilities.

[0068] In the embodiment of the present application, when it is determined that the second capability in the first capability exists in the competitive relationship object array, the operation of determining whether the second capability has been added to the to-be-arranged scene can be further performed inside the traversal method. When it is determined that the second capability has been added to the to-be-arranged scene, the competitive relationship prompt information is returned. The competitive relationship prompt information can include information about the second capability that has been added to the to-be-arranged scene, and further can include id information of the second capability.

[0069] In the embodiment of the present application, after receiving the competitive relationship prompt information, since it is confirmed that the second capability that has been added to the to-be-arranged scene exists, the operation of adding the first capability to the to-be-arranged scene is not performed. Meanwhile, the competitive relationship prompt information can be displayed to the user to facilitate the user to timely master the information and adjust the arrangement strategy.

[0070] According to the technical scheme provided in the embodiment of the present application, by pre-constructing the array of competitive relationship objects including all capabilities in the to-be-arranged scene, when each capability is about to be added to the to-be-arranged scene, it is found in the array whether there is another capability in a competitive relationship with the capability, if there is, it is further determined whether the capability has been added to the to-be-arranged scene, if yes, the capability is not added to the to-be-arranged scene, and the user is prompted, which can determine whether the capability is in a competitive relationship with another capability when the capability is added, so that the user can be timely reminded of possible problems and risks when there is a competitive relationship, helping the user to avoid the risks in advance, improving the arrangement efficiency and enhancing the user experience.

[0071] In the embodiment of the present application, the traversal method can include a first parameter and a second parameter. The first parameter is used to describe the identifier of the first capability, and the second parameter is a callback function. Further, the second parameter can further include a third parameter and a fourth parameter. The third parameter is used to indicate whether the first capability can be added to the to-be-arranged scene, and the fourth parameter is used to describe the identifier of the second capability in a competitive relationship with the first capability when the first capability cannot be added to the to-be-arranged scene.

[0072] Figure 3 FIG. 1 is a flowchart of a method for performing the operation of traversing the array of competitive relationship objects inside the traversal method according to the embodiment of the present application. As shown in FIG. 1, the method includes the following steps: Figure 3

[0073] In step S301, it is determined whether the array of competitive relationship objects is empty.

[0074] In step S302, in response to the array of competitive relationship objects being empty, the second parameter is called.

[0075] ​wherein the third parameter is assigned a value of true, and the fourth parameter is assigned an empty string, to determine that there is no second capability in the conflict relationship object array that has a conflict relationship with the first capability.

[0076] In step S303, a first variable is created in response to the conflict relationship object array not being empty.

[0077] In step S304, the identifier of the first capability is compared with the first attribute of each conflict relationship object in the conflict relationship object array, and when it is determined that the first attribute in a particular conflict relationship object is identical to the identifier of the first capability, the particular conflict relationship object is assigned to the first variable.

[0078] In step S305, the second parameter is invoked when all conflict relationship objects in the conflict relationship object array have been traversed, or when the number of loop determinations is greater than or equal to a first preset threshold.

[0079] wherein the third parameter is assigned a value of true, and the fourth parameter is assigned an empty string, to determine that there is no second capability in the conflict relationship object array that has a conflict relationship with the first capability.

[0080] In the embodiments of the present application, it can be first determined whether the conflict relationship object array is empty. When it is determined to be empty, it indicates that all capabilities in the to-be-scheduled scene do not have a conflict relationship, and therefore all capabilities can be added to any scene at will. At this time, the second parameter of the traversal method, i.e., the callback function, can be directly invoked, the third parameter in the second parameter is assigned a value of true, and the fourth parameter is assigned an empty string, to determine that there is no second capability in the conflict relationship object array that has a conflict relationship with the first capability.

[0081] In the embodiments of the present application, if it is determined that the conflict relationship object array is not empty, a first variable can be created. Then, the identifier of the first capability is compared with the first attribute of each conflict relationship object in the conflict relationship object array. When it is determined that the first attribute in a particular conflict relationship object is identical to the identifier of the first capability, the particular conflict relationship object is assigned to the first variable. That is, the id of the first capability is compared with each skillId in the conflict relationship array, and the conflict relationship object excludeList corresponding to the skillId equal to the id of the first capability is the set of all other capabilities that have a conflict relationship with the first capability.

[0082] In the embodiments of the present application, when all conflict relationship objects in the conflict relationship object array have been traversed, or when the number of loop determinations is greater than or equal to a first preset threshold, the second parameter is invoked, wherein the third parameter is assigned a value of true, and the fourth parameter is assigned an empty string, to determine that there is no second capability in the conflict relationship object array that has a conflict relationship with the first capability.

[0083] That is, if the same skillId as the id of the first capability is not found in the competition relationship object array by traversing, or the number of traversal loops is greater than the first preset threshold, the traversal can be stopped at this time, and it is considered that there is no other capability that has a competition relationship with the first capability. Further, the second parameter of the traversal method, that is, the callback function, can also be called, the third parameter in the second parameter is assigned a value of true, and the fourth parameter is assigned an empty string, to determine that there is no second capability in the competition relationship object array that has a competition relationship with the first capability.

[0084] Figure 4 is a flowchart of a method for determining whether the second capability has been added to the to-be-orchestrated scene provided by an embodiment of the present application. As shown in Figure 4 , the method comprises the following steps:

[0085] In step S401, a third variable is created.

[0086] In step S402, the second attribute of a specific competition relationship is extracted from the first variable, and the second attribute of the specific competition relationship is saved in the second variable.

[0087] The second variable is an array type variable.

[0088] In step S403, an added capability set is created.

[0089] The added capability set includes the identifiers of all capabilities that have been added to the to-be-orchestrated scene.

[0090] In step S404, the second variable is traversed with the identifier of the i-th capability in the added capability set as the index, and in response to determining that the identifier of the i-th capability is equal to the identifier of the third capability in the second variable, the traversal is stopped and the identifier of the third capability is assigned to the third variable.

[0091] Wherein, i is an integer greater than or equal to 0 and less than N, and N is the total number of capabilities in the added capability set.

[0092] In step S405, when i is less than N-1 and the current loop judgment number is less than the second preset threshold, the operation of traversing the second variable with the identifier of the i+1-th capability as the index is continued.

[0093] In step S406, when i is equal to N-1 or the current loop judgment number is greater than or equal to the second preset threshold, the traversal operation is stopped.

[0094] In step S407, in response to determining that the third variable is empty, it is determined that the second capability has not been added to the to-be-orchestrated scene.

[0095] In step S408, in response to determining that the third variable is not empty, it is determined that the second capability has been added to the to-be-orchestrated scenario.

[0096] In the embodiments of the present application, after determining that the second capability exists in the competitive relationship with the first capability, it is further needed to determine whether the second capability has been added to the to-be-orchestrated scenario, and then determine whether the first capability can be added to the to-be-orchestrated scenario.

[0097] In the embodiments of the present application, the third variable can be created first. On the other hand, the second attribute of the specific competitive relationship can be extracted from the first variable, and the second attribute of the specific competitive relationship is saved in the second variable, which is an array type variable.

[0098] In the embodiments of the present application, the added capability set can also be created, which includes the identifiers of all the capabilities that have been added to the to-be-orchestrated scenario. By performing the variable operation on each capability in the added capability set in the second variable, it is determined whether the capability in the added capability set is included in the second variable, and when it exists, the id of the added second capability is determined.

[0099] Specifically, the identifier of the i th capability in the added capability set can be used as an index to traverse the second variable, in response to determining that the identifier of the i th capability is equal to the identifier of the third capability in the second variable, the traversal is stopped and the identifier of the third capability is assigned to the third variable. When i is less than N-1 and the current loop judgment times is less than the second preset threshold, the operation of traversing the second variable with the identifier of the i+1 th capability as an index is continued. When i is equal to N-1 or the current loop judgment times is greater than or equal to the second preset threshold, the traversal operation is stopped.

[0100] Further, after the traversal is completed, it is determined whether the third variable is empty. If the third variable is empty, it can be determined that all the second capabilities have not been added to the to-be-orchestrated scenario, at this time the first capability can be added; otherwise, if the third variable is not empty, it indicates that there is a second capability that has been added to the to-be-orchestrated scenario, at this time the first capability cannot be added.

[0101] Figure 5 is a flowchart of the method provided by the embodiments of the present application for returning the competitive relationship prompt information in response to determining that the second capability has been added to the to-be-orchestrated scenario. As shown in Figure 5 , the method comprises the following steps:

[0102] In step S501, in response to determining that the second capability has been added to the to-be-orchestrated scenario, the second parameter is called in the traversal method.

[0103] Wherein, the third parameter is assigned to be false, and the fourth parameter is assigned to the third variable.

[0104] In step S502, the competitive relationship prompt information is generated based on the third parameter and / or the fourth parameter.

[0105] In step S503, the competitive relationship prompt information is returned.

[0106] In the embodiment, when it is determined that the second capability has been added to the to-be-orchestrated scenario, the second parameter, i.e., the callback function, can be called in the traversal method, where the third parameter is assigned a value of false, and the fourth parameter is assigned the third variable.

[0107] Further, the competitive relationship prompt information can be generated based on the third parameter and / or the fourth parameter. That is, the competitive relationship prompt information can be generated based on the third parameter, and in this case, the competitive relationship prompt information only contains the other capability that has been added to the to-be-orchestrated scenario and that has a competitive relationship with the first capability. Alternatively, the competitive relationship prompt information can be generated based on the third parameter and the fourth parameter, and in this case, the competitive relationship prompt information contains the other capability that has been added to the to-be-orchestrated scenario and that has a competitive relationship with the first capability, and the id of the other capability.

[0108] Further, the competitive relationship prompt information can be returned for reference by a user.

[0109] In the embodiment, the competitive relationship prompt information includes: a message prompting that the first capability cannot be added; and / or a message prompting that the first capability cannot be added, and an identifier of the second capability.

[0110] Figure 6 FIG. 1 is a flowchart of a method for scenario orchestration based on a capability competitive relationship according to an embodiment of the present application. Figure 6 Steps S601 to S608 in the illustrated embodiment are basically the same as steps S101 to S108 in the embodiment shown in FIG. 1, and thus will not be described again here. Figure 2 Steps S201 to S208 in the illustrated embodiment are basically the same as steps S101 to S108 in the embodiment shown in FIG. 1, and thus will not be described again here. As shown in the figure, the method further includes the following steps: Figure 6

[0111] In step S609, in response to the fact that there is no second capability in the competitive relationship object array that has a competitive relationship with the first capability, or in response to the determination that the second capability has not been added to the to-be-orchestrated scenario, the first capability is added to the to-be-orchestrated scenario.

[0112] In the embodiment, when it is determined that there is no second capability in the competitive relationship object array that has a competitive relationship with the first capability, or when it is determined that the second capability has not been added to the to-be-orchestrated scenario, the first capability can be added to the to-be-orchestrated scenario.

[0113] Figure 7 FIG. 1 is a flowchart of a method for scenario orchestration based on a capability competitive relationship according to an embodiment of the present application. Figure 7 ​As shown, the method can include step one, step two and step three. In step one, all the competition relationship objects can be added to the array competitions, and then an array competitions loaded with all the competition relationship objects is created, and then step two is executed.

[0114] Specifically, the data structure of the competition relationship object can refer to Figure 2 As described in the embodiment shown, no further description is given here. Each capability and all the capabilities having a competition relationship with the capability jointly constitute a competition relationship object, which includes two attributes, the first attribute is skillId, representing the id of each capability, and the second attribute is excludeList, which is an array containing all the capability ids having a competition relationship with the capability represented by skillId. All the competition relationship objects are loaded in the competitions array.

[0115] In step two, method 1 is first created, which is a traversal method having targetSkillId and completion parameters. Further, the internal specific implementation of method 1 includes: judging whether the competitions array is empty, if yes, directly calling the callback function completion and ending the running of method 1 in advance. If not, creating a variable temSkillsCompeModel and starting to traverse competitions, and the traversal steps are as follows: comparing the targetSkillId passed in method 1 with the skillId attribute of the competition object being traversed, if equal, assigning the competition information object to temSkillsCompeModel and jumping out of the loop to complete the traversal; if not equal, continuing to traverse until a competition information object whose skillId attribute is equal to the value of the targetSkillId parameter in method 1 is found, or the number of loop times is used up, at which time it is also determined that the traversal is completed.

[0116] Further, after the traversal is completed, it is judged whether temSkillsCompeModel is empty, if yes, directly calling the callback function completion and ending the running of method 1 in advance. If not, step three is continued to be executed.

[0117] Specifically, when a certain capability is about to be added to a scene, the competitions array needs to be traversed first to find other capabilities that have a competitive relationship with the capability and give the correct prompt. A method named Method 1 can be created first, which has two parameters, targetSkillId and completion. targetSkillId represents the id of the capability about to be added to the scene; completion represents the callback function, which contains two parameters, isShouldBeAdd and comName. isShouldBeAdd represents whether the current capability can be added to the scene; comName represents the name of the capability that conflicts with the current capability when the current capability cannot be added to the scene.

[0118] The internal specific implementation of Method 1 is as follows:

[0119] (1) First, judge whether the competitions array is empty.

[0120] (2) If it is empty, it means that all capabilities do not have a competitive relationship, which means that all capabilities can be added to any scene at will. At this time, the callback function completion is called directly, and true is assigned to the isShouldBeAdd parameter of the function, indicating that it can be added to the scene. Then an empty string is assigned to the comName parameter of the function, indicating that there is no capability with a competitive relationship. Then the running of Method 1 can be ended in advance.

[0121] (3) If it is not empty, start traversing the array to find out whether there is a competitive capability. Before traversing, a variable temSkillsCompeModel is created to record the competitive information object of the capability that may exist during the traversal process.

[0122] (4) Now start traversing. In each traversal, compare the targetSkillId passed into Method 1 with the skillId attribute of the competitive object being traversed. If they are equal, assign the competitive information object to the temSkillsCompeModel variable, and then jump out of the loop; if they are not equal, continue traversing until a competitive information object is found such that the skillId attribute value of the object is equal to the value of the targetSkillId parameter of Method 1. Or until the number of loop times is used up.

[0123] (5) At this time, the traversal has been completed, but it does not mean that the competing information object of the capability is found. Because it is possible that the capability does not exist the competing capability. Therefore, it is still necessary to determine whether the temSkillsCompeModel is empty. If the temSkillsCompeModel is empty, it means that the competing information of the capability is not found, that is, the capability does not exist the competing capability, and can be added to the scene. Therefore, the callback according to the process of step (2) can be performed. If the temSkillsCompeModel is not empty, it means that the capability exists the competing capability. The excludeList of the temSkillsCompeModel is recorded and named as conflictSkillIds. The variable is an array type. At this time, the conflictSkillIds represents the set of all capability ids that exist the competing relationship with the capability to be added to the scene.

[0124] (6) At this time, although all the capability ids that exist the competing relationship with the capability are found, it is still unknown which capability exists the competing relationship with the capability. Because some capabilities exist the competing relationship with the current capability, but the capability is not added to the scene. Therefore, the specific capability that causes the competing conflict is not the capability. Therefore, it is still necessary to continue to screen the specific capability that causes the competing conflict.

[0125] In step three, the variable conflictSkillName can be created, and the set of all capabilities that have been added to the scene is traversed. The traversal steps are as follows: first, it is determined whether the id of the capability being traversed is contained in the array conflictSkillIds. If it is contained, the name of the capability is assigned to the variable conflictSkillName, and the loop is exited to complete the traversal. If it is not contained, the traversal is continued until the capability that exists the competing relationship with the capability to be selected is found, or the number of times of the loop is used up. At this time, it is also considered that the traversal is completed. After the traversal is completed, it is determined whether the conflictSkillName is empty. If it is empty, the callback function completion is directly called, and the running of the method 1 is ended in advance. If it is not empty, false is assigned to the isShouldBeAdd parameter of the callback function completion, and the conflictSkillName is assigned to the comName parameter of the callback function completion. Then, the callback function completion is called, and the method calling party processes it according to the needs. Thus, the algorithm of the capability competing relationship is completed.

[0126] Specifically, the execution of step three is still implemented in the method 1, and further includes the following steps.

[0127] (7) Next, a variable is created and named as conflictSkillName, which represents the name of the conflicting skill that will be filtered out. Then, the set of all the skills that have been added to the scene is iterated. In each iteration, it is determined whether the id of the iterated skill is included in the array conflictSkillIds obtained from step (5). If it is included, it means that the skill is the one that has a conflict with the skill to be selected, and thus the name of the skill is assigned to the variable conflictSkillName, and then the loop is exited. If it is not included, the iteration continues until the skill that has a conflict with the skill to be selected is found, or until the iteration times are used up.

[0128] (8) At this time, the iteration is completed, and a judgment is still made on conflictSkillName. If conflictSkillName is empty, it means that no skill that has a conflict with the skill is found, and thus the callback is performed according to the procedure of step (2). If conflictSkillName is not empty, it means that the skill that has a conflict with the skill is found, and thus the callback function completion is called, false is assigned to the isShouldBeAdd parameter of the function, and conflictSkillName is assigned to the comName parameter of the function. After the callback value is returned, the method invoker can perform processing according to the needs.

[0129] (9) Thus far, the algorithm of the skill conflict is completed.

[0130] All the optional technical solutions can be combined to form optional embodiments of the present application, which will not be described one by one.

[0131] The following is an apparatus embodiment of the present application, which can be used to execute the method embodiments of the present application. For details not disclosed in the apparatus embodiments of the present application, please refer to the method embodiments of the present application.

[0132] Figure 8 is a schematic diagram of a device for scene arrangement based on skill conflict relationship provided by an embodiment of the present application. As shown in Figure 8 the device for scene arrangement based on skill conflict relationship includes:

[0133] The obtaining module 801 is configured to obtain all the skills in the scene to be arranged.

[0134] The creating module 802 is configured to create a competition relationship object for each capability, the competition relationship object including a first attribute and a second attribute, the first attribute being used to represent an identifier of the capability, and the second attribute being used to represent an identifier of another capability having a competition relationship with the capability.

[0135] The saving module 803 is configured to save the competition relationship objects of all the capabilities of the to-be-orchestrated scene in a competition relationship object array.

[0136] The determining module 804 is configured to determine a first capability that is about to be added to the to-be-orchestrated scene.

[0137] The traversing module 805 is configured to create a traversal method, and perform an operation of traversing the competition relationship object array in the traversal method to determine whether there is a second capability having a competition relationship with the first capability in the competition relationship object array.

[0138] The traversing module 805 is further configured to perform, in response to the second capability having a competition relationship with the first capability existing in the competition relationship object array, an operation of determining, in the traversal method, whether the second capability has been added to the to-be-orchestrated scene.

[0139] The traversing module 805 is further configured to return a competition relationship prompt information in response to determining that the second capability has been added to the to-be-orchestrated scene.

[0140] The orchestrating module 806 is configured to, based on the competition relationship prompt information, not perform an operation of adding the first capability to the to-be-orchestrated scene, and display the competition relationship prompt information.

[0141] According to the technical scheme provided in the embodiments of the present application, by pre-constructing an array including competition relationship objects of all the capabilities in a to-be-orchestrated scene, when each capability is about to be added to the to-be-orchestrated scene, it is found in the array whether there is another capability having a competition relationship with the capability, if there is, it is further determined whether the capability has been added to the to-be-orchestrated scene, if yes, the capability is not added to the to-be-orchestrated scene, and a user is prompted, which can determine whether the capability has a competition relationship with another capability when the capability is added, so as to timely remind the user of possible problems and risks when there is a competition relationship, help the user to avoid the risks in advance, improve the orchestration efficiency, and improve the user experience.

[0142] In the embodiments of the present application, the traversal method includes a first parameter and a second parameter, the first parameter being used to describe an identifier of the first capability, and the second parameter being a callback function; the second parameter includes a third parameter and a fourth parameter, the third parameter being used to indicate whether the first capability can be added to the to-be-orchestrated scene, and the fourth parameter being used to describe an identifier of a second capability having a competition relationship with the first capability when the first capability cannot be added to the to-be-orchestrated scene.

[0143] In the embodiments of the present application, the operation of traversing the array of competitive relationship objects is performed inside the traversal method, including: determining whether the array of competitive relationship objects is empty; in response to the array of competitive relationship objects being empty, calling the second parameter, wherein the third parameter is assigned a value of true, and the fourth parameter is assigned an empty string, to determine that there is no second capability in the array of competitive relationship objects that has a competitive relationship with the first capability; in response to the array of competitive relationship objects not being empty, creating a first variable; comparing the identifier of the first capability with the first attribute of each competitive relationship object in the array of competitive relationship objects, and assigning a specific competitive relationship object to the first variable when it is determined that the first attribute in the specific competitive relationship object is the same as the identifier of the first capability; when all competitive relationship objects in the array of competitive relationship objects have been traversed, or the number of loop determinations is greater than or equal to the first preset threshold, calling the second parameter, wherein the third parameter is assigned a value of true, and the fourth parameter is assigned an empty string, to determine that there is no second capability in the array of competitive relationship objects that has a competitive relationship with the first capability.

[0144] In the embodiments of the present application, determining whether the second capability has been added to the scene to be arranged includes: creating a third variable; extracting the second attribute of the specific competitive relationship from the first variable and saving the second attribute of the specific competitive relationship in a second variable, which is an array type variable; creating an added capability set, which includes the identifiers of all capabilities that have been added to the scene to be arranged; traversing the second variable with the identifier of the i th capability in the added capability set as an index, and stopping the traversal and assigning the identifier of the third capability to the third variable in response to determining that the identifier of the i th capability is equal to the identifier of the third capability, where i is an integer greater than or equal to 0 and less than N, and N is the total number of capabilities in the added capability set; continuing to perform the operation of traversing the second variable with the identifier of the i+1 th capability as an index when i is less than N-1 and the current number of loop determinations is less than the second preset threshold; stopping the traversal operation when i is equal to N-1 or the current number of loop determinations is greater than or equal to the second preset threshold; determining that the second capability has not been added to the scene to be arranged in response to determining that the third variable is empty; and determining that the second capability has been added to the scene to be arranged in response to determining that the third variable is not empty.

[0145] In the embodiments of the present application, in response to determining that the second capability has been added to the scene to be arranged, the competitive relationship prompt information is returned, including: in response to determining that the second capability has been added to the scene to be arranged, calling the second parameter in the traversal method, wherein the third parameter is assigned a value of false, and the fourth parameter is assigned the third variable; generating the competitive relationship prompt information based on the third parameter and / or the fourth parameter; and returning the competitive relationship prompt information.

[0146] In the embodiments of the present application, the conflict relationship prompt information comprises: a message prompting that the first capability cannot be added; and / or a message prompting that the first capability cannot be added, and an identifier of the second capability.

[0147] In the embodiments of the present application, the scheduling module is further configured to, in response to the fact that there is no second capability in the conflict relationship object array that has a conflict relationship with the first capability, or in response to the determination that the second capability is not added to the scene to be scheduled, add the first capability to the scene to be scheduled.

[0148] It should be understood that the size of the serial number of each step in the above embodiments does not mean the order of execution, and the execution order of each process should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0149] Figure 9 is a schematic diagram of an electronic device provided by the embodiments of the present application. As shown in Figure 9 The electronic device 9 of this embodiment includes a processor 901, a memory 902, and a computer program 903 stored in the memory 902 and executable on the processor 901. The processor 901 implements the steps in each of the above method embodiments when executing the computer program 903. Alternatively, the processor 901 implements the functions of each module / unit in each of the above device embodiments when executing the computer program 903.

[0150] The electronic device 9 can be a desktop computer, a notebook computer, a palm computer, a cloud server, and the like. The electronic device 9 can include but is not limited to the processor 901 and the memory 902. Those skilled in the art can understand that Figure 9 The electronic device 9 is merely an example and does not constitute a limitation on the electronic device 9, and can include more or fewer components or different components than those shown.

[0151] The processor 901 can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.

[0152] The memory 902 can be an internal storage unit of the electronic device 9, such as a hard disk or RAM of the electronic device 9. The memory 902 can also be an external storage device of the electronic device 9, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, etc., equipped on the electronic device 9. The memory 902 can also include both internal and external storage units of the electronic device 9. The memory 902 is used to store computer programs and other programs and data required by the electronic device.

[0153] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0154] If integrated modules / units are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program may include computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. Computer-readable media may include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.

[0155] The above examples are only used to illustrate the technical solutions of the present application, but not limit the same; although the present application has been described in detail with reference to the foregoing examples, those skilled in the art should understand that the technical solutions recorded in the foregoing examples can be modified, or some technical features can be replaced by equivalent ones; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.

Claims

1. A method for scene orchestration based on capability competition relationship, for orchestrating a car scene, characterized in that, The method comprises the following steps: acquiring all capabilities in a to-be-scheduled scene; creating a competition relationship object for each capability, the competition relationship object comprising a first attribute and a second attribute, the first attribute being used to represent an identifier of the capability, and the second attribute being used to represent an identifier of another capability having a competition relationship with the capability; saving the competition relationship objects of all capabilities in the to-be-scheduled scene in a competition relationship object array; determining a first capability to be added to the to-be-scheduled scene; creating a traversal method, and performing an operation of traversing the competition relationship object array in the traversal method to determine whether a second capability having a competition relationship with the first capability exists in the competition relationship object array; in response to the second capability having a competition relationship with the first capability existing in the competition relationship object array, performing an operation of determining whether the second capability has been added to the to-be-scheduled scene in the traversal method; in response to determining that the second capability has been added to the to-be-scheduled scene, returning a competition relationship prompt information; based on the competition relationship prompt information, not performing an operation of adding the first capability to the to-be-scheduled scene, and displaying the competition relationship prompt information.

2. The method of claim 1, wherein, The traversal method comprises a first parameter and a second parameter, the first parameter being used to describe an identifier of the first capability, and the second parameter being a callback function; the second parameter comprises a third parameter and a fourth parameter, the third parameter being used to indicate whether the first capability can be added to the to-be-scheduled scene, and the fourth parameter being used to describe an identifier of a second capability having a competition relationship with the first capability when the first capability cannot be added to the to-be-scheduled scene.

3. The method of claim 2, wherein, The operation of traversing the competition relationship object array in the traversal method comprises the following steps: judging whether the competition relationship object array is empty; in response to the competition relationship object array being empty, calling the second parameter, wherein the third parameter is assigned a value of true, and the fourth parameter is assigned an empty string, to determine that no second capability having a competition relationship with the first capability exists in the competition relationship object array; in response to the competition relationship object array not being empty, creating a first variable; comparing the identifier of the first capability with the first attribute of each competition relationship object in the competition relationship object array, and assigning a specific competition relationship object to the first variable when the first attribute in the specific competition relationship object is identical to the identifier of the first capability; after traversing all competition relationship objects in the competition relationship object array or when the number of loop judgments is greater than or equal to a first preset threshold, calling the second parameter, wherein the third parameter is assigned a value of true, and the fourth parameter is assigned an empty string, to determine that no second capability having a competition relationship with the first capability exists in the competition relationship object array.

4. The method of claim 3, wherein, The operation of determining whether the second capability has been added to the to-be-scheduled scene comprises the following steps: creating a third variable; extracting the second attribute of the specific competition relationship from the first variable, and saving the second attribute of the specific competition relationship in a second variable, the second variable being an array type variable; create an added capability set, the added capability set comprising identities of all capabilities that have been added to the to-be-orchestrated scenario; traverse the second variable with the identity of an i-th capability in the added capability set as an index, stop the traversal and assign the identity of a third capability to the third variable in response to determining that the identity of the i-th capability is equal to the identity of the third capability in the second variable, where i is an integer greater than or equal to 0 and less than N, and N is a total number of capabilities in the added capability set; continue the operation of traversing the second variable with the identity of an i+1-th capability as an index when i is less than N-1 and the current number of loop determinations is less than a second preset threshold; stop the traversal operation when i is equal to N-1 or the current number of loop determinations is greater than or equal to the second preset threshold; determine that the second capability has not been added to the to-be-orchestrated scenario in response to determining that the third variable is empty; determine that the second capability has been added to the to-be-orchestrated scenario in response to determining that the third variable is not empty.

5. The method of claim 4, wherein, the response to determining that the second capability has been added to the to-be-orchestrated scenario, returning a competitive relationship prompt information, comprises: calling a second parameter in the traversal method in response to determining that the second capability has been added to the to-be-orchestrated scenario, where a third parameter is assigned a value of false, and a fourth parameter is assigned the third variable; generating the competitive relationship prompt information based on the third parameter and / or the fourth parameter; returning the competitive relationship prompt information.

6. The method of claim 5, wherein, the competitive relationship prompt information comprises: prompting a message that the first capability cannot be added; and / or prompting a message that the first capability cannot be added, and the identity of the second capability.

7. The method according to any one of claims 1 to 6, characterized in that, the method further comprises: adding the first capability to the to-be-orchestrated scenario in response to the second capability that has a competitive relationship with the first capability not existing in the competitive relationship object array, or in response to determining that the second capability has not been added to the to-be-orchestrated scenario.

8. An apparatus for scene orchestration based on capability competition relationship, for orchestrating a car scene, characterized in that, comprises: an acquisition module configured to acquire all capabilities in a to-be-orchestrated scenario; a creation module configured to create a competitive relationship object for each capability, the competitive relationship object comprising a first attribute and a second attribute, the first attribute being used to represent the identity of the capability, and the second attribute being used to represent the identity of another capability that has a competitive relationship with the capability; a saving module configured to save the competitive relationship objects of all capabilities in the to-be-orchestrated scenario in a competitive relationship object array; a determination module configured to determine a first capability that is about to be added to the to-be-orchestrated scenario; a traversal module configured to create a traversal method, and perform an operation of traversing the competitive relationship object array in the traversal method to determine whether a second capability that has a competitive relationship with the first capability exists in the competitive relationship object array; the traversal module is further configured to perform an operation of determining whether the second capability has been added to the to-be-orchestrated scenario in the traversal method in response to the second capability that has a competitive relationship with the first capability existing in the competitive relationship object array; The traversal module is further configured to return a conflict relationship prompt information in response to determining that the second capability has been added to the to-be-orchestrated scenario. The orchestration module is configured to, based on the conflict relationship prompt information, not perform an operation of adding the first capability to the to-be-orchestrated scenario, and display the conflict relationship prompt information.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor implements the steps of the method of any one of claims 1-7 when executing the computer program.

10. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 9. The computer program, when executed by the processor, implements the steps of the method of any one of claims 1-7.

Citation Information

Patent Citations

  • Method and equipment for performing man-machine interaction on touch control terminal

    CN104881230A

  • Capability arrangement method, device and system, electronic equipment and storage medium

    CN115617605A