Service determination method and device, electronic equipment and computer readable medium

By generating and correcting target text, the problem of high threshold for determining user demand service and difficult to meet personalized needs in the prior art is solved, and more efficient and simple service display is achieved.

CN119940301APending Publication Date: 2025-05-06GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311463052.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-03
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

The prior art uses electronic devices to determine the service corresponding to user needs and the problem of high thresholds and difficulty in meeting personalized needs.

Method used

A service determination method is proposed. By obtaining the user's target requirements, generating the target text corresponding to the target requirements based on the target model, performing executability detection. If the detection is not passed, the text will be corrected, and the revised service description will be displayed.

Benefits of technology

It lowers the threshold for determining and displaying services corresponding to user needs, automatically adjusting text that fails to pass the executability detection, simplifying user operations, and improving the efficiency of meeting personalized needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119940301A_ABST
    Figure CN119940301A_ABST
Patent Text Reader

Abstract

The invention discloses a service determination method and apparatus, an electronic device and a computer readable medium. The method comprises the steps of obtaining a target demand of a user; generating a first target text corresponding to the target demand based on a target model, wherein the first target text is used for describing a first target service corresponding to the target demand; performing executable detection on the first target text; if the first target text does not pass the executable detection, correcting the first target text through the target model to obtain a second target text; and displaying a first service description corresponding to the first target service described by the second target text. Therefore, the user can easily determine the service corresponding to the demand through the method provided by the invention, the personalized demand of the user is more easily met, and the efficiency of determining the service corresponding to the user demand is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of service technology, and more specifically, to a service determination method, device, electronic device, and computer-readable medium. Background Art

[0002] At present, with the development of electronic information technology, it is possible to determine the services corresponding to the needs of users through electronic devices. However, currently, determining the services corresponding to the needs of users through electronic devices, or subsequently executing the displayed services, has certain threshold requirements for users; in addition, in the process of determining the services corresponding to the needs of users through electronic devices, it is difficult to display services or for users to adjust services, making it difficult to meet the personalized needs of users. Summary of the invention

[0003] The present application proposes a service determination method, device, electronic device and computer-readable medium.

[0004] In a first aspect, an embodiment of the present application provides a service determination method, the method comprising: obtaining a user's target requirements; generating a first target text corresponding to the target requirements based on a target model, the first target text being used to describe a first target service corresponding to the target requirements; performing an executable test on the first target text; if the first target text fails the executable test, correcting the first target text through the target model to obtain a second target text; and displaying a first service description corresponding to the first target service described by the second target text.

[0005] In the second aspect, the embodiment of the present application also provides a service determination device, which includes: an acquisition unit, a generation unit, a detection unit, a repair unit and a display unit. Among them, the acquisition unit is used to acquire the user's target demand; the generation unit is used to generate a first target text corresponding to the target demand based on the target model, and the first target text is used to describe the first target service corresponding to the target demand; the detection unit is used to perform an executability test on the first target text; the repair unit is used to correct the first target text through the target model to obtain a second target text if the first target text fails the executability test; the display unit is used to display the first service description corresponding to the first target service described by the second target text.

[0006] In a third aspect, an embodiment of the present application also provides an electronic device, comprising: one or more processors; a memory; one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more applications are configured to execute the above method.

[0007] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a program code executable by a processor, and when the program code is executed by the processor, the processor executes the method described in the first aspect.

[0008] The service determination method, device, electronic device and computer-readable medium provided in the present application, the method first obtains the user's target demand; then generates a first target text corresponding to the target demand based on the target model, the first target text is used to describe the first target service corresponding to the target demand; then performs an executable test on the first target text; if the first target text fails the executable test, the first target text is corrected through the target model to obtain a second target text; finally, the first service description corresponding to the first target service described by the second target text is displayed. In the present application, the first target text can be generated based on the target demand, and the first target text can be further tested for executableness, so that when the first target text fails the executable test, the first target text is automatically corrected through the target model to obtain the second target text, and then the first service description corresponding to the first target service described by the second target text is displayed. Therefore, in the present application, the threshold required to determine and display the services corresponding to the user's needs is lowered, and in the process of determining and displaying the services corresponding to the user's needs, the text that has not passed the executable test can be automatically adjusted, so that more users can easily determine the services corresponding to their needs through the method provided by the present application, and then more easily meet the user's personalized needs by displaying or executing the services corresponding to the needs, thereby improving the efficiency of determining the services corresponding to the user's needs.

[0009] Other features and advantages of the embodiments of the present application will be described in the subsequent description, and partly become apparent from the description, or can be understood by practicing the embodiments of the present application. The purposes and other advantages of the embodiments of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0011] Figure 1 An application scenario diagram of the service determination method provided in an embodiment of the present application is shown;

[0012] Figure 2 A method flow chart of a service determination method provided by an embodiment of the present application is shown;

[0013] Figure 3 A schematic diagram showing the acquisition target requirements provided by an embodiment of the present application is shown;

[0014] Figure 4 A method flow chart of a service determination method provided by another embodiment of the present application is shown;

[0015] Figure 5 A schematic diagram of the feasibility detection provided by the embodiment of the present application is shown;

[0016] Figure 6 A method flow chart of a service determination method provided by another embodiment of the present application is shown;

[0017] Figure 7 A schematic diagram of obtaining a first target text provided in an embodiment of the present application is shown;

[0018] Figure 8 A method flow chart showing a method for determining a service provided by another embodiment of the present application is shown.

[0019] Fig. 9 A unit block diagram of a service determination device provided in an embodiment of the present application is shown;

[0020] Fig.10 A schematic diagram of an electronic device provided by an embodiment of the present application is shown;

[0021] Fig.11 A structural block diagram of a computer-readable storage medium provided in an embodiment of the present application is shown;

[0022] Fig.12 A structural block diagram of a computer program product provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0023] In order to make those skilled in the art better understand the present application scheme, the technical scheme in the present application embodiment will be clearly and completely described below in conjunction with the drawings in the present application embodiment. Obviously, the described embodiment is only a part of the present application embodiment, rather than all the embodiments. The components of the present application embodiment usually described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the present application for protection, but merely represents the selected embodiment of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0024] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0025] At present, with the development of electronic information technology, the services corresponding to the needs of users can be determined through electronic devices. However, at present, determining the services corresponding to the needs of users through electronic devices, or subsequently executing the displayed services, has certain threshold requirements for users; in addition, in the process of determining the services corresponding to the needs of users through electronic devices, it is difficult to display services or users to adjust services, which makes it difficult to meet the personalized needs of users. How to more simply determine the services corresponding to the needs of users through electronic devices and lower the user's usage threshold is an issue that needs to be solved urgently.

[0026] Currently, users can use electronic devices to obtain services corresponding to some needs, or display the services. For example, a scene arrangement tool running in an electronic device can be used to obtain services corresponding to needs, and the obtained services can be executed later. Executing the service can meet the needs corresponding to the service. Among them, the scene arrangement tool can help users build workflows or task flows to meet user needs.

[0027] However, the inventors discovered during their research that obtaining services that correspond to user needs through scene orchestration tools currently has certain threshold requirements for users to use the scene orchestration tools; in addition, in the current process of determining services that correspond to user needs through electronic devices, it is relatively difficult to display services or for users to adjust services, making it difficult to meet users' personalized needs.

[0028] Therefore, in order to overcome the above-mentioned defects, the embodiments of the present application provide a service determination method, device, electronic device and computer-readable medium to solve or partially solve the above-mentioned problems.

[0029] See also Figure 1 , Figure 1 An application scenario diagram of the service determination method provided in an embodiment of the present application is shown, namely, a service determination scenario 100, which may include an electronic device 110 and a server 120, wherein the electronic device 110 is connected to the server 120.

[0030] The electronic device 110 can access the Internet and thereby establish a connection with the server 120 which is also connected to the Internet. The electronic device 110 can access the Internet wirelessly, such as through wireless communication technologies such as Wi-Fi and Bluetooth, etc.; the electronic device 110 can also access the Internet through a wired method, such as through an Rj45 network cable or an optical fiber.

[0031] The user can control the electronic device 110 so that the electronic device executes the service determination method. For details, please refer to the subsequent embodiments. For example, the user can directly operate the electronic device 110 to control the electronic device to execute the service determination method; the user can also operate the server 120 that has established a communication connection with the electronic device 110, so as to control the electronic device to execute the service determination method through the server 120. The server 120 can be a cloud server or a local server.

[0032] See also Figure 2 , Figure 2 A service determination method provided in an embodiment of the present application is shown, and the method can be applied to an electronic device, and the execution subject of the method can be a processor in the electronic device. Specifically, the method includes steps S110 to S150.

[0033] Step S110: Obtain the user's target needs.

[0034] The user can input the target demand into the electronic device, so that the electronic device can obtain the service description corresponding to the target demand based on the subsequent steps according to the acquired target demand. Among them, the service description can be understood as a service scenario that the user can understand, and the service scenario can be represented in the form of natural language or in the form of a graphic interface. The service scenario can include services, so that the service scenario can be executed later, that is, the service description can be executed to execute the services included therein to meet the user's target demand.

[0035] For some embodiments, the user may input the target demand through an input module of the electronic device. For example, the input module may be a touch screen, so that the user may input text information through the touch screen, and then the user's target demand may be obtained through the text information. For another example, the input module may be a microphone or a microphone array, so that the user may input voice information through the microphone or the microphone array, and then the user's target demand may be obtained through the voice information. For example, the text information input by the user may be "When I say take a break, help me adjust the seat of the car computer to a position suitable for rest, turn on the seat massage air conditioner, and play soothing music on the car computer. When I say the break is over, adjust these back", then the above text information may be directly used as the target demand. For another example, the voice information corresponding to "When I say take a break, help me adjust the seat of the car computer to a position suitable for rest, turn on the seat massage air conditioner, and play soothing music on the car computer. When I say the break is over, adjust these back" may also be obtained, and then the voice information may be converted into text information through a voice recognition module, for example, the voice recognition module may be a voice-to-text model.

[0036] Among them, the target demand of the clear demand may include a service and a triggering event for triggering the service. For example, the target demand may be "When I shake my phone, I sense the page content of the current application. If it contains an address, I navigate in the car. If it contains video or music, I play in the car." The target demand includes a service and a triggering event for triggering the service. The service is "Navigate in the car, Play in the car", and the triggering events for triggering the service are "When I shake my phone, I sense the page content of the current application, if it contains an address; if it contains video or music."

[0037] In other implementations, the user's target demand may also be a more vague demand, wherein the target demand of the vague demand may only include services or triggering events. For example, the target demand may be "I want to rest in the car", in which case the target demand only includes services but no specific triggering events; for another example, the target demand may be "If I forget my phone in the car when I get off, remind me", in which case the target demand only includes triggering events but no specific services.

[0038] In some other implementations, the user's target demand may also be a segmented demand, wherein the target demand of the segmented demand may include multiple services corresponding to one trigger event. For example, the target demand may be "I want to play games in the car, help me adjust the seat position to a position suitable for playing games", "then help me turn on the ambient light", "finally help me adjust the music mode to dynamic". In this case, the target demand includes a trigger event and multiple services corresponding to the trigger event.

[0039] See also Figure 3 , Figure 3 A schematic diagram of collecting target requirements in an embodiment of the present application is shown. Figure 3 The input module 310 includes a clear demand 320, a fuzzy demand 330, and a segmented demand 340. In some embodiments, the user's target demand may include a clear demand. Thus, the user's clear demand 320, the fuzzy demand 330, and the segmented demand 340 can be obtained through the input module 310.

[0040] That is to say, in the embodiments of the present application, the user's target demand can be a clear demand, a vague demand, or a segmented demand, etc., so that the user does not need additional learning costs when entering the target demand, thereby lowering the user's usage threshold.

[0041] It should be noted that the above introduction to the target requirements is only some examples, which can be flexibly set as needed in actual applications, and the embodiments of the present application do not make specific limitations.

[0042] Step S120: Generate a first target text corresponding to the target requirement based on the target model, where the first target text is used to describe a first target service corresponding to the target requirement.

[0043] Furthermore, the first target text corresponding to the target requirement may be generated through the target model.

[0044] The first target text may be text information represented by a computer programming language, and the first target text may be used to describe the first target service corresponding to the target requirement. In other words, the substance determined by the target model may be regarded as the first target service corresponding to the target requirement, and the first target service is represented in the form of the first target text.

[0045] For some implementations, the computer programming language may be a Domain Specific Language (DSL). That is, the first target text may be represented by the domain specific language.

[0046] Since the target demand can be text information or text information converted from voice information, the target model can be an AIGC model, where AIGC refers to the ability to generate content using artificial intelligence technology. The AIGC model can provide text generation capabilities, with the input being a piece of text, and generate another piece of text content according to demand, and then combined with prompt engineering technology, the first target text corresponding to the target demand can be obtained.

[0047] Exemplarily, the prompt engineering technology can be combined to input the target demand as the input quantity of the target model into the target model, so as to generate the first target text corresponding to the target demand.

[0048] Optionally, in some embodiments, a grammar rule list, a retrieval information library, and an example text list can be obtained, so that the target model can generate a first target text based on the grammar rule list, the retrieval information library, and the example text list, combined with the target requirements. For a detailed introduction, please refer to the subsequent embodiments.

[0049] The search information base may include a service list, or a service list and a trigger event list. The service list may include services related to the target demand; similarly, the trigger event list may include trigger events related to the target demand; similarly, the grammar rule list may include grammar rules related to the target demand; and the sample text list may include sample texts related to the target demand.

[0050] In some implementations, the search information set and the capability set may be first obtained, and then the service corresponding to the target requirement, or the corresponding service and trigger event, may be determined from the search information set; and the grammar rule and sample text corresponding to the target requirement may be determined from the capability set. The search information set may include a large number of services, or a large number of services and trigger events; and the capability set may include a large number of grammar rules and a large number of sample texts.

[0051] Optionally, for some implementations, when obtaining the first target text through the target model, it is also possible to first analyze whether the target requirement lacks the first necessary execution parameter. Subsequently, if the first necessary execution parameter is missing, the target requirement can be supplemented, and then the first target text corresponding to the supplemented target requirement can be obtained. That is, the completeness of the target requirement information can be analyzed. Among them, the first necessary execution parameter can be used as an essential execution parameter in the target requirement. If the first necessary execution parameter is missing, the first target service that can be used for execution cannot be generated. In other words, even if the corresponding first target text is obtained through the target requirement that lacks the first necessary execution parameter, the first target service represented by the first target text is not available for execution. For a detailed introduction, please refer to the subsequent embodiments.

[0052] Step S130: performing an executability check on the first target text.

[0053] The first target text obtained through the target model may have the problem of being unexecutable. For example, the first target text may not comply with grammatical rules. For another example, the first target service represented by the first target text may not be mapped to the service list in the search information library, that is, the first target service does not exist in the service list. For another example, the first target service represented by the first target text may lack the second necessary execution parameter.

[0054] Therefore, in the service determination method provided in the embodiment of the present application, an executability detection operation can also be performed on the first target text. Furthermore, if there is a problem with the executability of the first target text, the first target text can be repaired and then displayed after the repair. By automatically repairing the first target text with executability problems, the user's usage threshold is lowered.

[0055] The first target text may be used to describe the first target service corresponding to the target requirement. Therefore, performing an executable test on the first target text may be performing an executable test on the first target text and the first target service described by the first target text.

[0056] Optionally, the first target text may also be used to describe a first triggering event for triggering a first target service. Therefore, in addition to performing an executable check on the first target text, an executable check may also be performed on the first target text, the first target service described by the first target text, and the first triggering event.

[0057] For the specific determination method, please refer to the introduction of the subsequent embodiments.

[0058] Step S140: If the first target text fails the executability test, the first target text is corrected by using the target model to obtain a second target text.

[0059] If it is detected that the first target text fails the executable test, the first target text can be repaired based on the target model to obtain the second target text, that is, the second target text can be regarded as the first target text repaired by the target model. Similar to the first target text, the second target text can also be text information represented by a computer programming language, for example, the computer programming language can be a restricted expressive language.

[0060] From the above introduction, it can be known that the first target text can be used to describe the first target service corresponding to the target requirement. Therefore, for some implementations, the first target text fails to pass the executable test. It may be that the first target text does not conform to the grammatical rules; it may also be that the first target service represented by the first target text may not be mapped to the service list in the retrieval information library, that is, the first target service does not exist in the service list; it may also be that the first target service represented by the first target text lacks the second necessary execution parameter. Therefore, the first target text can be corrected according to the influencing information that affects the failure of the first target text to pass the executable test to obtain the second target text. For a specific introduction, please refer to the subsequent embodiments.

[0061] Step S150: displaying a first service description corresponding to the first target service described by the second target text.

[0062] Since the second target text is a computer programming language, in order to lower the user's usage threshold, after obtaining the second target text, a first service description corresponding to the first target service described in the second target text can be generated. The first service description can be used to display to the user, so that the user can more intuitively understand the first target service described in the second target text generated based on the target demand, thereby lowering the user's usage threshold.

[0063] Exemplarily, the first service description may be represented in the form of natural language, that is, the first service description may be text information. Another exemplary embodiment, the first service description may also be represented in the form of a graphical interface, that is, the first service description may be interface information.

[0064] Optionally, after displaying the first service description corresponding to the first target service described by the second target text, it is also possible to determine whether the second target text needs to be further adjusted based on the user's approval of the first service description, so that the adjusted second target text is more in line with the user's personalized needs. For a detailed introduction, please refer to the subsequent embodiments.

[0065] Optionally, the first service description may be subsequently deployed to the electronic device or other device so that the first target service can be executed. For some implementations, executing the first target service may be understood as directly calling and executing the first target service included in the first service description if the aforementioned target requirement is detected again, thereby satisfying the user's target requirement.

[0066] The service determination method provided in the present application first obtains the user's target demand; then generates a first target text corresponding to the target demand based on the target model, and the first target text is used to describe the first target service corresponding to the target demand; then performs an executable test on the first target text; if the first target text fails the executable test, the first target text is corrected by the target model to obtain a second target text; finally, the first service description corresponding to the first target service described by the second target text is displayed. In the present application, the first target text can be generated based on the target demand, and the first target text can be further tested for executableness, so that when the first target text fails to pass the executable test, the first target text is automatically corrected by the target model to obtain the second target text, and then the first service description corresponding to the first target service described by the second target text is displayed. Therefore, in the present application, the threshold required for building or displaying the service corresponding to the user's demand is reduced, and in the process of building or displaying the service corresponding to the user's demand, it is relatively simple to adjust the service, so that more users can easily display the service corresponding to the demand through the method provided by the present application, and then it is easier to meet the demand by executing the displayed service, reducing the difficulty of meeting the personalized needs of users.

[0067] See also Figure 4 , Figure 4 A service determination method provided by an embodiment of the present application is shown, and the method can be applied to an electronic device, and the execution subject of the method can be a processor in the electronic device. Specifically, the method includes steps S210 to S290.

[0068] Step S210: Obtain the user's target needs.

[0069] Step S220: Generate a first target text corresponding to the target requirement based on the target model, where the first target text is used to describe a first target service corresponding to the target requirement.

[0070] Among them, step S210 and step S220 have been introduced in detail in the above embodiments and will not be repeated here.

[0071] As can be seen from the above introduction, the first target text obtained through the target model may be unexecutable. For some implementations, performing executable detection on the first target text may specifically include steps S230 to S260.

[0072] Step S230: If the target grammar of the first target text does not conform to the grammar rule list, a first detection result is generated.

[0073] Step S240: If it is detected that the first target service represented by the first target text cannot be mapped to the service list of the search information library, a second detection result is generated.

[0074] Step S250: If it is detected that the first target service represented by the first target text lacks the second necessary execution parameter, a third detection result is generated.

[0075] In some embodiments, the first target text can be used to describe the first target service corresponding to the target requirement. Therefore, the target grammar of the first target text can be detected, and if the target grammar of the first target text does not conform to the grammar rule list, a first detection result is generated. It can be understood that the target grammar does not conform to the grammar rule list, which may be that the grammar included in the target grammar cannot be found in the grammar rule list; or it may be that the target grammar contains grammar that conflicts with the grammar rule list. Among them, the grammar rule list may include grammar rules related to the target requirement.

[0076] Exemplarily, the grammar rule list may include variable-related grammar rules, which stipulate that variables appearing in the first text grammar need to come from the definition of the grammar, or be corresponding parameters output by other services. For example, if a variable x1 appears in the first target text, and x1 is not defined in the grammar, nor is it a corresponding parameter output by other services, it can be determined that the target grammar does not conform to the grammar rule list.

[0077] Furthermore, the first target service represented by the first target text can also be detected. Specifically, it can be detected whether the first target service represented by the first target text can be mapped to the service list of the retrieval information library, that is, whether the first target service can be found in the service list of the retrieval information library. If the first target service can be found by traversing the service list of the retrieval information library, it can be determined that the first target service represented by the first target text can be mapped to the service list of the retrieval information library; if the first target service cannot be found by traversing the service list of the retrieval information library, it can be determined that the first target service represented by the first target text cannot be mapped to the service list of the retrieval information library, so that a second detection result can be generated. Among them, the retrieval information library can include a service list, and the service list can include services related to the target needs.

[0078] Exemplarily, the service list may include service A1, service A2 and service A3, and the first target service is service A1, so it can be determined that the first target service can be mapped to the service list; if the first target service is service A4, it can be determined that the first target service cannot be mapped to the service list.

[0079] Furthermore, the second necessary execution parameter of the first target service represented by the first target text can also be detected. Specifically, it can be detected whether the first target service represented by the first target text lacks the second necessary execution parameter. It can be understood that the first target service can correspond to an execution parameter, and the execution parameter can include some non-essential parameters. The lack of non-essential parameters will not affect the executableness of the first target service; and the execution parameter can also include some necessary parameters, that is, the second necessary execution parameter. The executableness of the first target service will be affected if the second necessary execution parameter is missing. Therefore, if it is detected that the first target service represented by the first target text lacks the second necessary execution parameter, a third detection result can be generated.

[0080] Optionally, the constraint conditions of the execution parameters of the first target service represented by the first target text may also be detected. The constraint conditions may include whether the type and value of the parameter match, whether the value of the parameter is within the range corresponding to the value, etc. Thus, when it is detected that there is an abnormality in the constraint clause of the execution parameters of the first target service, a sixth detection result may be generated, and then when the first target detection result is generated later, the sixth detection result may also be considered.

[0081] For example, if the execution parameter of the first target service is y1, the execution parameter y1 may correspond to a numerical range, for example, the numerical range corresponding to y is a natural number from 1 to 10. If the value of y1 of the first target service is detected to be 1.5, it is determined that the type and value of the execution parameter do not match; if the value of y1 of the first target service is detected to be 11, it is determined that the value of the execution parameter is outside the corresponding range. At this time, it can be determined that there is an abnormality in the constraint of the execution parameter of the first target service.

[0082] It should be noted that Figure 4 The execution order of steps S230 to S250 shown in the figure does not constitute a limitation to the embodiments of the present application, and steps S230 to S250 may be executed in parallel.

[0083] Step S260: If a first target detection result is detected, it is determined that the first target text fails the executable test, and the first target detection result is that at least one of the first detection result, the second detection result and the third detection result is detected.

[0084] Furthermore, a first target detection result may be generated based on the first detection result, the second detection result, and the third detection result obtained above.

[0085] In some implementations, if the first target detection result is detected, it can be determined that the first target text has not passed the executable test. The first target detection result may be generated when at least one of the first detection result, the second detection result, and the third detection result is detected.

[0086] Optionally, the first target detection result may be generated only after at least two of the first detection result, the second detection result and the third detection result are detected; or the first target detection result may be generated only after the first detection result, the second detection result and the third detection result are detected.

[0087] It can be understood that the fewer detection results need to be detected, the more first target detection results are generated, which can improve the efficiency of passing the executable test; and the more detection results need to be detected, the more first target detection results are generated, which can improve the accuracy of the executable test.

[0088] For some implementations, the first target text may also be used to describe a first triggering event that triggers the first target service. Thus, when the first target text is tested for executability, the first triggering event may also be tested for executability.

[0089] Specifically, it can be detected whether the first trigger event represented by the first target text can be mapped to the trigger event list of the retrieval information library, that is, whether the first trigger event can be found in the trigger event list of the retrieval information library. If the first trigger event can be found by traversing the trigger event list of the retrieval information library, it can be determined that the first trigger event represented by the first target text can be mapped to the trigger event list of the retrieval information library; if the first trigger event cannot be found by traversing the trigger event list of the retrieval information library, it can be determined that the first trigger event represented by the first target text cannot be mapped to the trigger event list of the retrieval information library, so that a fourth detection result can be generated. Among them, the retrieval information library may include a service list and a trigger event list, and the trigger event list may include trigger events related to the target needs.

[0090] For example, the trigger event list may include trigger event B1, trigger event B2 and trigger event B3, and the first trigger event is trigger event B1, so it can be determined that the first trigger event can be mapped to the trigger event list; if the first trigger event is trigger event B4, it can be determined that the first trigger event cannot be mapped to the trigger event list.

[0091] Furthermore, the third necessary execution parameter of the first trigger event represented by the first target text can also be detected. Specifically, it can be detected whether the third necessary execution parameter of the first trigger event represented by the first target text is missing. It can be understood that the first trigger event can correspond to an execution parameter, and the execution parameter can include some non-essential parameters. The lack of non-essential parameters will not affect the executableness of the first trigger event; and the execution parameter can also include some necessary parameters, that is, the third necessary execution parameter. The lack of the third necessary execution parameter will affect the executableness of the first trigger event. Therefore, if it is detected that the first trigger event represented by the first target text lacks the third necessary execution parameter, a fifth detection result can be generated.

[0092] Furthermore, a second target detection result may be generated based on the first detection result, the second detection result, the third detection result, the fourth detection result, and the fifth detection result obtained above.

[0093] In some implementations, if the second target detection result is detected, it can be determined that the first target text has not passed the executable test. The second target detection result may be generated when at least one of the first detection result, the second detection result, the third detection result, the fourth detection result, and the fifth detection result is detected.

[0094] Optionally, the first target detection result may be generated only after at least two of the first detection result, the second detection result and the third detection result are detected; or the first target detection result may be generated only after the first detection result, the second detection result and the third detection result are detected, which is not specifically limited in the embodiments of the present application.

[0095] Optionally, the constraint conditions of the execution parameters of the first trigger event represented by the first target text may also be detected. The constraint conditions may include whether the type and value of the parameter match, whether the value of the parameter is within the range corresponding to the value, etc. Thus, when it is detected that there is an abnormality in the constraint clause of the execution parameter of the first trigger event, the seventh detection result may be generated, and then when generating the second target detection result, the seventh detection result may also be considered.

[0096] For example, if the execution parameter of the first trigger event is y2, the execution parameter y2 may correspond to a numerical range, for example, the numerical range corresponding to y is a natural number from 1 to 10. If the value of y1 detected in the first trigger event is 1.5, it is determined that the type and value of the execution parameter do not match; if the value of y1 detected in the first trigger event is 11, it is determined that the value of the execution parameter is outside the corresponding range. At this time, it can be determined that there is an abnormality in the constraint clause of the execution parameter of the first trigger event.

[0097] By performing an executability test on the first target text, the first target text that fails the executability test can be repaired later without user intervention, thereby lowering the user's usage threshold. In addition, the first target service described in the repaired first target text can be mapped to the service list as much as possible, thereby avoiding the appearance of fabricated services as much as possible and improving the executability of the repaired first target text.

[0098] Step S270: If the first target text fails the executable test, obtaining the influence information that influences the failure of the first target text to pass the executable test.

[0099] Step S280: Based on the target model, the first target text is modified by using the impact information to obtain a second target text.

[0100] In some implementations, when the first target text fails to pass the executable test, in order to repair the first target text, influence information that affects the failure of the first target text to pass the executable test may be first obtained.

[0101] The influencing information may be generated after the first target text is tested for executableness. Specifically, after the first target text is tested for executableness, information that affects the first target text failing the test for executableness may be obtained as the influencing information. For some implementations, the information that affects the first target text failing the test for executableness may be text information, and thus, the influencing information may also be text information.

[0102] For example, if, when detecting the first target text, it is detected that the target grammar of the first target text does not conform to the grammatical rule list, then the information of "not conforming to the grammatical rule list" can be generated as the impact information. The impact information can also include multiple pieces of information. For example, when detecting the first target text, it is detected that the target grammar of the first target text does not conform to the grammatical rule list, and it is detected that the first target service represented by the first target text cannot be mapped to the service list of the retrieval information library, then the information of "not conforming to the grammatical rule list; service list that cannot be mapped to the retrieval information library" can be generated as the impact information.

[0103] Furthermore, after obtaining the impact information, the first target text can be modified based on the target model through the impact information to obtain the second target text. The first target text can be modified by combining the target model with prompt engineering technology. Exemplarily, "Now you are an expert in dealing with restricted expressive language problems. I will input a problematic restricted expressive language to you. I have only detected some of the problems. Please help me check the set content to be detected one by one, and then process all the detected problems. The output content only contains the modified restricted expressive language. Output: {Modified restricted expressive language} The syntax of the restricted expressive language is as follows: {Syntax rule list} The callable services are limited to the following list: {Service list} The trigger event refers to the reason for triggering a series of operations, and the triggerable events are limited to the following list: {Trigger event} The inspection rules are as follows: XXXXX examples are as follows: {Example}" can be used as input and input into the target model to obtain the text output by the target model.

[0104] Furthermore, the executable test can be performed again on the text output by the model. If the text output by the target model still fails the executable test, the text is corrected again using the target model to obtain the text output by the target model again, until the text output by the target model that can pass the executable test is obtained. This text can then be used as the second target text.

[0105] Optionally, in some embodiments, a threshold number of repairs performed by the target model can be pre-set. Before the text output by the target model is corrected again by the target model, the number of times the output text has been repaired by the target model can be obtained. If the number is less than or equal to the threshold number, the repair can continue to be performed on the text output by the target model; if the number is greater than the threshold number, an error process can be entered at this time, for example, the process of the service determination method can be terminated, and a second prompt information can be generated to prompt the user that an error has occurred in the current repair of the first target service.

[0106] Among them, the second prompt information can be a prompt to the user by displaying it through a display module of the electronic device, for example, the display screen displays the text information corresponding to the failure to pass the executable test, or displays the text information corresponding to the failure to pass the executable test while the display screen flashes, etc.; it can also be a prompt to the user by playing it through the audio module of the electronic device, for example, it can be a voice information corresponding to the failure to pass the executable test played through a speaker.

[0107] The executable test is performed again on the text output by the model. If the text output by the target model passes the executable test, the text output by the target model can be used as the second target text.

[0108] For example, see Figure 5 , Figure 5 A schematic diagram of the feasibility detection provided by an embodiment of the present application is shown. Figure 5 The process includes steps S310 to S340.

[0109] Step S310: Target text to be tested for executableness.

[0110] The target text to be subjected to the executable detection may include the first target text or the third target text.

[0111] Step S320: Executability detection.

[0112] Perform an executable test on the target text to be tested for executableness. If the executable test fails and the number of repairs is less than or equal to the threshold number, the target model 5100 can be called for repair, and then the process jumps to step S310 as the target text to be tested for executableness; if the executable test fails and the number of repairs is greater than the threshold number, the process jumps to step S340 to generate the second prompt information; if the executable test passes, the process jumps to step S330.

[0113] Step S330: Target text that passes the executable test.

[0114] The target text that passes the executable test may be, for example, the first target text that has not been repaired, or the first target text that has been repaired, that is, the second target text.

[0115] Step S340: Generate second prompt information.

[0116] A second prompt message is generated to prompt the user that an error has occurred in the current repair of the first target service.

[0117] The detailed description of the above steps can be found in other embodiments and will not be repeated here.

[0118] Step S290: displaying a first service description corresponding to the first target service described by the second target text.

[0119] Among them, step S290 has been introduced in detail in the above embodiment and will not be repeated here.

[0120] The service determination method provided by the present application first obtains the user's target demand; then generates a first target text corresponding to the target demand based on the target model; then generates a first detection result if the target grammar of the first target text does not conform to the grammar rule list; generates a second detection result if it is detected that the first target service represented by the first target text cannot be mapped to the service list of the retrieval information library; generates a third detection result if it is detected that the first target service represented by the first target text lacks the second necessary execution parameter; if the first target detection result is detected, it is determined that the first target text has not passed the executable test, and the first target detection result is the detection of at least one of the first detection result, the second detection result and the third detection result; if the first target text has not passed the executable test, the influence information affecting the failure of the first target text to pass the executable test is obtained; based on the target model, the first target text is corrected by the influence information to obtain the second target text; and the first service description corresponding to the first target service described by the second target text is displayed. By performing an executable test on the first target text, the first target text that has not passed the executable test can be repaired later, and the repair can be completed without user intervention, which reduces the user's usage threshold. Furthermore, the first target service described in the repaired first target text can be mapped to the service list as much as possible, thereby avoiding the appearance of fabricated services and improving the executability of the repaired first target text.

[0121] See also Figure 6 , Figure 6 A service determination method provided in an embodiment of the present application is shown, which can be applied to an electronic device, and the execution subject of the method can be a processor in the electronic device. Specifically, the method includes steps S410 to S4100

[0122] Step S410: Obtain the user's target needs.

[0123] Among them, step S410 has been introduced in detail in the above embodiment and will not be repeated here.

[0124] Step S420: Generate the first target text based on the target requirement, the grammar rule list, the search information library and the sample text list, the search information library includes a service list, or the search information library includes a service list and a trigger event list.

[0125] For some implementations, after obtaining the target requirement, the target model can be called to generate the first target text corresponding to the target requirement. The target requirement, the grammar rule list, the search information library and the sample text list can be combined as input and input into the target model, so that the text output by the target model can be obtained as the first target text.

[0126] Among them, a prompt engineering template can be pre-set, so that after obtaining the target requirements, grammar rule list, retrieval information library and sample text list, the prompt engineering template can be filled based on the target requirements, grammar rule list, retrieval information library and sample text list to obtain the input quantity for inputting the target model. The retrieval information library includes a service list, or the retrieval information library includes a service list and a trigger event list. For example, in the case where the first target text is used to describe the first target service corresponding to the target requirement, the retrieval information library may only include a service list; and in the case where the first target text also includes a first trigger event for describing the first target service, the retrieval information library may include a service list and a trigger event list.

[0127] Exemplarily, a simplified prompt engineering template may include: "You are a program generation expert, please generate a piece of restricted expressive language according to my requirements. The grammar rules of restricted expressive language are as follows: {Restricted expressive language grammar rule list} The callable services are limited to the following list: {Service list} The trigger event refers to the reason for triggering a series of operations, and the triggerable events are limited to the following list: {Trigger event list} Notes: XXXXX examples are as follows: {Sample text list} Requirements are as follows: {Target requirements}".

[0128] The search information base may include a service list, or a service list and a trigger event list. The service list may include services related to the target demand; similarly, the trigger event list may include trigger events related to the target demand; similarly, the grammar rule list may include grammar rules related to the target demand; and the sample text list may include sample texts related to the target demand.

[0129] In some implementations, the search information set and the capability set may be first obtained, and then the service corresponding to the target requirement, or the corresponding service and trigger event, may be determined from the search information set; and the grammar rule and sample text corresponding to the target requirement may be determined from the capability set. The search information set may include a large number of services, or a large number of services and trigger events; and the capability set may include a large number of grammar rules and a large number of sample texts.

[0130] Specifically, when executing step S420, steps S421 to S425 may also be included.

[0131] Step S421: Recall services corresponding to the target demand from the search information set to obtain a service list in the search information library.

[0132] Step S422: Recall the triggering events corresponding to the target demand from the search information set to obtain a triggering event list in the search information library.

[0133] Step S423: Recalling grammatical rules corresponding to the target requirements from the capability set to obtain the grammatical rule list.

[0134] Step S424: recalling example texts corresponding to the target requirements from the capability set to obtain the example text list.

[0135] Step S425: Generate the first target text based on the target requirement, the grammar rule list, the search information library and the sample text list.

[0136] In some implementations, a search information set and a capability set may be obtained, so that a search information library may be determined based on the search information set, and a grammar rule list and an example text list may be determined through the capability set.

[0137] The search information set may include a larger number of services, or a larger number of services and trigger events; and the capability set may include a larger number of grammar rules and a larger number of sample texts.

[0138] It is understandable that if a large number of services and trigger events in the retrieval information set, a large number of grammar rules and a large number of sample texts in the set are directly used as input and input into the target model, the length limit of the input may be exceeded by the target model. Even if the length limit is not exceeded, the efficiency of generating the first target text may be reduced. Therefore, for some embodiments, after obtaining the retrieval information set and the capability set, the service list, event list, grammar rule list and sample text list can be recalled based on the target requirements, thereby reducing the length of the input and improving the efficiency of generating the first target text to a certain extent.

[0139] Exemplarily, if the detection information library includes a service list and a trigger event list, the service corresponding to the target demand can be recalled from the retrieval information set to obtain a service list in the retrieval information library. The trigger event corresponding to the target demand is recalled from the retrieval information set to obtain a trigger event list in the retrieval information library. For example, the retrieval information set may include service A1, service A2, and service A3; it may also include trigger event B1, trigger event B2, and trigger event B3, and the target demand corresponds to service A1 and service A3, trigger event B1, and trigger event B3. Thus, the service list can include service A1 and service A3; the trigger event list can include trigger event B1 and trigger event B3.

[0140] Furthermore, the grammatical rules corresponding to the target requirements can be recalled from the capability set to obtain the grammatical rule list; the example texts corresponding to the target requirements can be recalled from the capability set to obtain the example text list. For example, the capability set may include grammatical rule C1, grammatical rule C2, and grammatical rule C3; it may also include example text D1, example text D2, and example text D3, and the target requirements correspond to grammatical rule C1 and grammatical rule C3, example text D1, and example text D3. Thus, the grammatical rule list can include grammatical rule C1 and grammatical rule C3; the example text list can include example text D1 and example text D3.

[0141] Among them, the above-mentioned recall methods may include content recall, vector recall, etc., which are not specifically limited in the embodiments of the present application and can be flexibly selected as needed.

[0142] Furthermore, after obtaining the grammar rule list, the search information library and the sample text list, the first target text can be generated based on the target requirements, the grammar rule list, the search information library and the sample text list. For example, the target requirements, the grammar rule list, the search information library and the sample text list can be input into the target model to obtain the first target text. The above steps have been introduced in detail and will not be repeated here.

[0143] Step S426: analyzing whether the target requirement lacks the first necessary execution parameter based on the search information library;

[0144] Step S427: if the first necessary execution parameter is missing, generating first prompt information, wherein the first prompt information is information instructing the user to supplement the first necessary execution parameter of the target requirement;

[0145] Step S428: Generate the first target text based on the supplemented target requirements, grammar rule list, search information library and sample text list.

[0146] In some embodiments, the target requirement of the user obtained may be incomplete, wherein the incompleteness can be used to characterize that the target requirement may have missing parameters, such as the lack of the first necessary execution parameter. Exemplarily, the target requirement can be analyzed based on the retrieval information library to see whether it lacks the first necessary execution parameter, wherein the first necessary execution parameter can be used as an essential execution parameter in the target requirement, and if the first necessary execution parameter is missing, the first target service that can be used for execution cannot be generated. In other words, even if the corresponding first target text is obtained through the target requirement that lacks the first necessary execution parameter, the first target service represented by the first target text is not available for execution.

[0147] In some embodiments, in addition to the service list, or the service list and the trigger event list, the search information library may also include necessary execution parameters corresponding to each service, or necessary execution parameters corresponding to each service and necessary execution parameters corresponding to each trigger event. Thus, it is possible to analyze whether the target requirement lacks the first necessary execution parameter based on the search information library.

[0148] It should be noted that, for the case where the first target text is used to describe the first target service corresponding to the target demand, the first necessary execution parameter may include the first target service necessary execution parameter. For example, the target demand includes "help me play music automatically", and for this target demand, the first necessary execution parameter may include the music type, so that the target demand at this time lacks the first necessary execution parameter of the music type. For the case where the first target text also includes a description of the first triggering event that triggers the first target service, the first necessary execution parameter may include the first target service necessary execution parameter and the necessary execution parameter of the first triggering event. For example, "when I sit on the seat, help me play music automatically", the first necessary execution parameter may include the specific position of the seat and the music type, so that the target demand at this time lacks the first necessary execution parameter of the specific position of the seat and the music type.

[0149] Furthermore, if the first necessary execution parameter is missing, a first prompt message may be generated, wherein the first prompt message is information instructing the user to supplement the first necessary execution parameter of the target requirement. The first prompt message may be displayed to the user by a display module of the electronic device, such as displaying text information corresponding to failure to pass the executable test on the display screen, or displaying text information corresponding to failure to pass the executable test accompanied by flashing of the display screen, etc.; it may also be played to the user by an audio module of the electronic device, such as playing voice information corresponding to failure to pass the executable test through a speaker.

[0150] For some implementations, the target model can be used to analyze whether the target requirement lacks the first necessary execution parameter based on the retrieval information library, and in the absence of the first necessary execution parameter, a first prompt message can be generated. Exemplarily, the prompt input to the target model can be "The target requirements are as follows: {target requirement} The services that can be called are limited to the following list: {service list} The trigger event refers to the reason for triggering a series of operations, and the triggerable events are limited to the following list: {trigger event} Please analyze if you want to use the given service list and event list to generate the target requirement, what information is missing, such as the parameters of the service or the parameters of the trigger event. Please ask the user for additional requirements and list them separately." After the target model analysis, the first prompt message can be output.

[0151] Thus, the user can supplement the target requirement based on the first prompt information. Continuing with the aforementioned target requirement of "when I sit on the seat, help me automatically play music" as an example, the first prompt information generated at this time may include "Is it the driver's seat or the passenger seat? Do you want to play soothing music or dynamic music?".

[0152] The way in which the user supplements the target requirement based on the first prompt information may be similar to the aforementioned way in which the user inputs the target requirement, which will not be described in detail here.

[0153] Furthermore, the target model can be used to generate a first target text corresponding to the supplemented target requirement. Similar to the above description, the first target text can be generated based on the supplemented target requirement, the grammar rule list, the search information library and the sample text list, which will not be described in detail here.

[0154] In some embodiments, see Figure 7 , Figure 7 A schematic diagram of obtaining a first target text provided by an embodiment of the present application is shown. Figure 7 It includes a retrieval information set 710, a capability set 720, a data preparation module 730, a user 740, a prompt engineering technology module 750, a target model 760 and a first target text 770.

[0155] Specifically, the data preparation module 730 can be connected to the retrieval information set 710, the capability set 720, the user 730 and the prompt engineering technology module 750 respectively. The data preparation module 730 can be used to obtain the target requirements input by the user 730, and then regress to obtain the service list, trigger event list, grammar rule list and example text list based on the retrieval information set 710 and the capability set 720 respectively, and transmit them to the prompt engineering technology module 750.

[0156] The prompt engineering technology module 750 can also be connected to the user 730 and the target model 760 respectively. It is used to generate the first prompt information and obtain the target requirements supplemented by the user. The prompt engineering technology module 750 then assembles the supplemented target requirements, the grammar rule list, the search information library and the sample text list to obtain the input amount, which is input into the target model 760. The target model 760 generates the first target text 770 according to the input amount.

[0157] Among them, the above specific steps can be found in the above introduction and will not be repeated here.

[0158] Step S430: performing an executability check on the first target text.

[0159] Step S440: If the first target text fails the executable test, the first target text is corrected by using the target model to obtain a second target text.

[0160] Step S450: displaying a first service description corresponding to the first target service described by the second target text.

[0161] Among them, step S430 to step S450 have been introduced in detail in the above embodiments and will not be repeated here.

[0162] The first service description can be used to display to the user, so that the user can more intuitively understand the first target service described by the second target text generated based on the target demand. Since the first target service is described by the second target text, and the second target text is a computer programming language, in order to lower the user's usage threshold, in some embodiments, the first service description corresponding to the first target service described by the second target text can be generated by an interpreter.

[0163] For some implementations, the first service description may be represented in the form of natural language. Therefore, at this time, the interpreter may call the target model and obtain the first service description by using the prompt engineering technology, thereby generating natural language text information for the user.

[0164] Exemplarily, the prompts input to the target model may include: "I will give you a restricted expressive language, which is a computer language to describe how to call a service and how to set its parameters. You will use the information described in the service definition to tell the user what this code does. There is no need to describe the detailed calling process, just give a business description. The services that can be called include: {service list} The events that can be used include: {trigger event list} Notes: XXXXX Output format: Explanation: {explanation} Example: {example}".

[0165] For some other implementations, the first service description may also be represented in the form of a graphical interface. Similarly, at this time, the interpreter may call the target model and obtain the first service description by using prompt engineering technology, thereby generating visual interface information for the user.

[0166] Step S460: Obtain the user's approval of the first service description.

[0167] Step S461: Whether the user approves the first service description.

[0168] The user may provide feedback on the first service description, for example, the user may input feedback information. The feedback information may include the user's approval of the first service description, and specifically, the feedback information may include approval or disapproval. If the user approves the first service description, the process may jump to step S4100; if the user disapproves the first service description, the process may jump to step S470.

[0169] Step S470: When it is determined that the user does not approve the first service description, the second target text is adjusted based on the supplementary requirements provided by the user to obtain a third target text, wherein the third target text describes the second target service corresponding to the target requirements and the supplementary requirements.

[0170] If it is determined that the user does not approve the first service description, the second target text may be adjusted based on the supplementary requirements provided by the user to obtain a third target text, wherein the third target text describes the second target service corresponding to the target requirements and the supplementary requirements. The third target text, similar to the first target text and the second target text, may be text information represented by a computer programming language, such as a restricted expressive language.

[0171] As can be seen from the above introduction, the first service description can be represented in the form of natural language, so the user can input supplementary requirements according to the first service description represented in the form of natural language, and the supplementary requirements can include text information. Specifically, when executing step S470, step S471 can also be included.

[0172] Step S471: when it is determined that the user does not approve the first service description, a third target text is generated through the target model based on the target requirement, the second target text and the text information provided by the user.

[0173] In some implementations, when it is determined that the user does not approve the first service description, the second target text may be adjusted using the text information provided by the user. Exemplarily, the second target text may be adjusted using a target model combined with a prompt engineering technique to obtain a third target text output by the target model.

[0174] Exemplarily, the prompts input into the target model may include: "Your task is to modify the existing restricted expressive language into a new restricted expressive language to meet the user's supplementary needs. The grammar of the restricted expressive language is as follows: {grammar rule list} The services that can be called include: {service list} The events that can be used include: {trigger event list} The user's target need is: {target need} The last generated restricted expressive language is: {second target text} The user's supplementary need is: {supplementary need}".

[0175] For some implementations, the process may return to step S430 to perform an executability check on the third target text, and execute subsequent steps.

[0176] As can be seen from the above introduction, the first service description can also be represented in the form of a graphical interface, so the user can input supplementary requirements based on the first service description represented in the form of a graphical interface, and the supplementary requirements can include interface information. Specifically, when executing step S470, step S472 and step S473 can also be included.

[0177] Step S472: When it is determined that the user does not agree with the first service description, adjustment information corresponding to the interface information is obtained.

[0178] Step S473: adjusting the second target text based on the adjustment information to obtain a third target text.

[0179] In some embodiments, the first service description may be interface information. Exemplarily, the interface information may include introduction information corresponding to the second target service, and interface controls that can be used to adjust the introduction information. For example, the interface controls may include sliding adjustment controls, button controls corresponding to multiple options, etc., so that adjustment information corresponding to the input interface information can be implemented by operating the interface controls. For example, the adjustment information may include the user's adjustment of the air conditioning temperature, or the adjustment of the application that needs to be projected.

[0180] When it is determined that the user does not approve the first service description, adjustment information corresponding to the interface information input by the user may be obtained, so that the second target text may be adjusted based on the adjustment information to obtain a third target text.

[0181] In the embodiment of the present application, the user can directly adjust the second target text through natural language or visual interface controls, and the user can use it without too much learning cost. And by adjusting the second target text, the second service description generated subsequently can better meet the needs of the user.

[0182] Step S480: Displaying a second service description corresponding to the second target service described by the third target text.

[0183] It is understandable that after adjusting the second target text, the third target text obtained displays the second service description corresponding to the second target service described in the third target text, but the user may still not approve of the second service description. At this time, multiple adjustments may be required to obtain the second service description approved by the user. For example, the second target text is first adjusted through the target model to obtain the third target text output by the target model, and then the second service description corresponding to the second target service described in the third target text is obtained, and the user's approval of the second service description is obtained. If not approved, it can jump to step S481, and continue to adjust the third target text through the target model until the second service description approved by the user is obtained, and then it can jump to step S490.

[0184] Step S481: Whether the user approves the second service description.

[0185] For a detailed description, please refer to the aforementioned description of step S461, which will not be repeated here.

[0186] If not approved, the process may jump to step 470 ; if approved, the process may jump to step S490 .

[0187] For example, if the user still does not agree with the second service description, he or she may provide text information in natural language as a supplementary demand, such as "I don't want to turn on the ambient light", "Please add an alarm reminder on my mobile phone after the rest", or "Lower the intensity of the seat massage", etc. At this time, the third target text will continue to be adjusted based on the supplementary demand until the second service description of the second target service represented by the third target text approved by the user is obtained.

[0188] In the embodiment provided by the present application, the user is not limited to modifying the first service description that he / she does not approve of once, but can modify it multiple times until a satisfactory second service description is obtained. In other words, when the user does not approve of the first service description, it is not necessary to completely re-obtain new requirements and regenerate a new service description. Instead, adjustments can be made repeatedly based on the existing service description, so as to quickly obtain a second service description that the user approves of, thereby improving the overall efficiency of obtaining the second service description.

[0189] Step S490: When it is determined that the user approves the second service description, execute the second target service.

[0190] If it is determined that the user approves the second service description, the second target service can be executed. Among them, identification information corresponding to the second service description can be first generated. In some embodiments, the identification information can include the name or icon of the second service description. By associating the generated name or icon with the second service description, the second service description can be represented by the name or icon. Exemplarily, the name can be a text of 4 to 6 words, and the icon can be a logo mark.

[0191] The identification information may be generated by the target model. For example, the prompt input into the target model may include: "{Description of the second service description} This is the description of the second service description. Please give the second service description a name of 4 to 6 characters and generate a logo icon related to the theme of the second service description". Thus, the name and icon corresponding to the second service description generated by the target model may be obtained.

[0192] It should be noted that the second service description or the first service description can be understood as a service scenario. Therefore, after obtaining the second service description and the identification information corresponding to the second service description, the second service description and the identification information corresponding to the second service description can be uploaded to the scenario execution engine, so that the second service description and the identification information corresponding to the second service description can be deployed to other devices that have a connection relationship with the scenario execution engine through the scenario execution engine. Each device that obtains the second service description can execute the second service description, and then execute the second target service included in the second service description when a trigger event corresponding to the second service description is detected.

[0193] Among them, in the case where the second target text includes a second target service for describing the target demand and the supplementary demand, the second target service can be included in the second service description. Therefore, the execution of the second target service can be to directly call the second target service included in the second service description when the same demand as the target demand corresponding to the second target service is detected. And in the case where the second target text also includes a second trigger event for describing the triggering of the second target service, the second service description can include the second target service and the second trigger event for triggering the second target service. Therefore, the execution of the second target service can be to directly call and execute the second target service when the same trigger event as the second trigger event in the second service description is detected.

[0194] In some implementations, the second trigger event may include automatic triggering and conditional triggering, such as voice condition detection, detection of a shake, timing conditions, geographic fencing, and the like.

[0195] The scenario execution engine may be pre-linked with the electronic device and other devices to achieve distributed deployment of the second service description to other devices. Other devices may be various smart terminal devices such as smart phones, car systems, smart watches, etc., which are not specifically limited in this application.

[0196] The second service description provided in the embodiment of the present application can be distributedly deployed in electronic devices and other devices, so that the second service description can be directly called later to execute the second target service included in the second service description, thereby improving the user experience.

[0197] Step S4100: When it is determined that the user approves the first service description, execute the first target service.

[0198] When it is determined that the user approves the first service description, it is not necessary to adjust the second target text, and the first target service can be directly executed later.

[0199] The detailed introduction of executing the first target service is similar to that of executing the second target service in the aforementioned steps, and will not be repeated here.

[0200] The service determination method provided by the present application allows users to adjust the second target text directly through natural language or visual interface controls, and users can use it without excessive learning costs. And by adjusting the second target text, the subsequently generated second service description is more in line with the user's needs. In addition, the user is not limited to modifying the disapproved first service description once, but can make multiple modifications until a satisfactory second service description is obtained. In other words, there is no need to completely re-acquire new requirements and regenerate a new service description when the user does not approve of the first service description. Instead, adjustments can be made repeatedly on the basis of the existing service description, so as to quickly obtain the second service description approved by the user, thereby improving the overall efficiency of obtaining the second service description.

[0201] See also Figure 8 , Figure 8 The service determination method provided by the embodiment of the present application is shown. Specifically, the method may include steps S510 to S580.

[0202] Step S510: Obtain target requirements.

[0203] First, target requirements may be obtained based on user 890 .

[0204] Step S520: Supplement the first necessary execution parameter and recall.

[0205] Then it can be detected whether the first necessary execution parameter needs to be supplemented, and if it needs to be supplemented, it can be supplemented through user 890. Then the grammar rule list, sample text list, service list and trigger event list are obtained through recall, and then the target model is called to generate the first target text.

[0206] Step S530: Whether the executability test is passed.

[0207] Check whether the executable test is passed, where the object of the test can be the first target text or the third target text adjusted later. If the executable test is not passed, the target model 8100 can be used to repair the second target text; if the executable test is passed, the execution can jump to step S540.

[0208] Step S540: Display service description.

[0209] Display the service description. The object displayed here may be the first service description corresponding to the first target service described by the repaired second target text; or may be the second service description corresponding to the second target service described by the third target text adjusted by the user 890.

[0210] Step S550: Whether the user approves.

[0211] The user 890 can determine whether to approve the displayed service. If approved, the process can jump to step S570; if not approved, the process can jump to step S560.

[0212] Step S560: Adjustment.

[0213] If the user 890 does not agree, the target model 8100 can be called to make adjustments, and the third target text obtained after the adjustment can return to execute step S530 and subsequent steps.

[0214] Step S570: Generate identification information and distributed deployment.

[0215] If the user 890 approves, identification information can be generated and distributedly deployed. Specifically, the target model 8100 can be called to generate identification information, and then distributedly deployed to other devices.

[0216] Step S580: Execute.

[0217] The user 890 may directly execute the service corresponding to the service description, for example, the first target service corresponding to the first service description; or the second target service corresponding to the second service description.

[0218] It should be noted that for a detailed introduction to each of the above steps, please refer to the description of the aforementioned embodiment, which will not be repeated here.

[0219] See also Fig. 9 , which shows a structural block diagram of a service determination device provided in an embodiment of the present application, wherein the service determination device 900 includes: an acquisition unit 910, a generation unit 920, a detection unit 930, a repair unit 940 and a display unit 950.

[0220] The acquisition unit 910 is used to acquire the target demand of the user.

[0221] The generating unit 920 is configured to generate a first target text corresponding to the target requirement based on the target model, where the first target text is used to describe a first target service corresponding to the target requirement.

[0222] Optionally, the generating unit 920 can also be used to generate the first target text based on the target requirement, the grammar rule list, the retrieval information library and the sample text list, the retrieval information library includes a service list, or the retrieval information library includes a service list and a trigger event list.

[0223] Optionally, the generation unit 920 can also be used to analyze whether the target requirement lacks the first necessary execution parameter based on the retrieval information library; if the first necessary execution parameter is missing, generate a first prompt message, the first prompt message is information instructing the user to supplement the first necessary execution parameter of the target requirement; generate the first target text based on the supplemented target requirement, the grammar rule list, the retrieval information library and the example text list.

[0224] Optionally, the generation unit 920 can also be used to recall services corresponding to the target requirements from the retrieval information set to obtain a service list in the retrieval information library; recall trigger events corresponding to the target requirements from the retrieval information set to obtain a trigger event list in the retrieval information library; recall grammar rules corresponding to the target requirements from the capability set to obtain the grammar rule list; recall example texts corresponding to the target requirements from the capability set to obtain the example text list; and generate the first target text based on the target requirement, the grammar rule list, the retrieval information library and the example text list.

[0225] The detection unit 930 is used to perform an executability detection on the first target text.

[0226] Optionally, the detection unit 930 can also be used to generate a first detection result if the target grammar of the first target text does not conform to the grammar rule list; generate a second detection result if it is detected that the first target service represented by the first target text cannot be mapped to the service list of the retrieval information library; generate a third detection result if it is detected that the first target service represented by the first target text lacks a second necessary execution parameter; if the first target detection result is detected, it is determined that the first target text has failed the executable test, and the first target detection result is the detection of at least one of the first detection result, the second detection result and the third detection result.

[0227] Optionally, the detection unit 930 can also be used to generate a fourth detection result if it is detected that the first trigger event represented by the first target text cannot be mapped to the trigger event list of the retrieval information library; generate a fifth detection result if it is detected that the first trigger event represented by the first target text lacks a third necessary execution parameter; if the first target detection result is detected, it is determined that the first target text has not passed the executable test, including: if the second target detection result is detected, it is determined that the first target text has not passed the executable test, and the second target detection result is to detect at least one of the first detection result, the second detection result, the third detection result, the third detection result and the fifth detection result.

[0228] The repairing unit 940 is configured to correct the first target text by using the target model to obtain a second target text if the first target text fails the executable test.

[0229] Optionally, the repair unit 940 can also be used to obtain influencing information that affects the failure of the first target text to pass the executable test if the first target text fails the executable test; based on the target model, correct the first target text according to the influencing information to obtain the second target text.

[0230] The display unit 950 is used to display a first service description corresponding to the first target service described by the second target text.

[0231] Optionally, the service determination device 900 may further include an adjustment unit ( Fig. 9(not shown) for obtaining the user's approval of the first service description; if it is determined that the user does not approve of the first service description, adjusting the second target text based on the supplementary requirements provided by the user to obtain a third target text, wherein the third target text describes the second target service corresponding to the target requirements and the supplementary requirements; displaying the second service description corresponding to the second target service described by the third target text; and executing the second target service when it is determined that the user approves of the second service description.

[0232] Optionally, the adjustment unit may also be configured to generate a third target text through the target model based on the target requirement, the second target text and text information provided by the user when it is determined that the user does not approve the first service description.

[0233] Optionally, the adjustment unit may also be configured to, when it is determined that the user does not approve the first service description, obtain adjustment information corresponding to the interface information; and adjust the second target text based on the adjustment information to obtain a third target text.

[0234] Optionally, the adjustment unit may also be configured to execute the first target service if it is determined that the user approves the first service description.

[0235] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.

[0236] In several embodiments provided in the present application, the coupling between modules may be electrical, mechanical or other forms of coupling.

[0237] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules.

[0238] See also Fig.10, which shows a structural block diagram of an electronic device provided in an embodiment of the present application. The electronic device 110 may be a smart phone, a tablet computer, an e-book, a somatosensory game console, or other device. The electronic device 110 in the present application may include one or more of the following components: a processor 111, a memory 112, and one or more applications, wherein the processor 111 is connected to the memory 112. One or more applications may be stored in the memory 112 and configured to be executed by one or more processors 111, and one or more programs are configured to execute the method described in the aforementioned method embodiment. Among them, the electronic device 110 may run different operating systems, thereby calling the processor 111 through the operating system to execute the method described in the aforementioned method embodiment. For example, the operating system may include Android, Windows, Linux, iOS, or Web, etc.

[0239] The processor 111 may include one or more processing cores. The processor 111 uses various interfaces and lines to connect various parts of the entire electronic device 110, and executes various functions and processes data of the electronic device 110 by running or executing instructions, programs, code sets or instruction sets stored in the memory 112, and calling data stored in the memory 112. Optionally, the processor 111 can be implemented in at least one hardware form of digital signal processing (DSP), field programmable gate array (FPGA), and programmable logic array (PLA). The processor 111 can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 111, but may be implemented separately through a communication chip.

[0240] The memory 112 may include a random access memory (RAM) or a read-only memory (ROM). The memory 112 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 112 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function, instructions for implementing the following various method embodiments, etc. The data storage area may also store data created by the electronic device 110 during use, etc.

[0241] Please refer to Fig.11 , which shows a structural block diagram of a computer-readable storage medium provided in an embodiment of the present application. The computer-readable medium 1100 stores program codes, which can be called by a processor to execute the method described in the above method embodiment.

[0242] The computer readable storage medium 1100 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer readable storage medium 1100 includes a non-transitory computer-readable storage medium. The computer readable storage medium 1100 has storage space for program codes 1110 that perform any of the method steps in the above method. These program codes may be read from or written to one or more computer program products. The program code 1110 may be compressed, for example, in an appropriate form.

[0243] Please refer to Fig.12 , which shows a block diagram of a computer program product provided in an embodiment of the present application. The computer program product 1200 includes a computer program / instruction 1210, which implements the steps of the above method when executed by a processor.

[0244] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A service determination method, characterized in that: The method comprises: Obtain the user's target needs; Generate a first target text corresponding to the target requirement based on the target model, where the first target text is used to describe a first target service corresponding to the target requirement; Performing an executability test on the first target text; If the first target text fails the executability test, the first target text is modified by using the target model to obtain a second target text; A first service description corresponding to the first target service described by the second target text is displayed.

2. The method according to claim 1, characterized in that After displaying the first service description corresponding to the first target service described by the second target text, the method further includes: Obtaining the user's approval of the first service description; If it is determined that the user does not approve the first service description, the second target text is adjusted based on the supplementary requirements provided by the user to obtain a third target text, wherein the third target text describes the second target service corresponding to the target requirements and the supplementary requirements; Displaying a second service description corresponding to the second target service described by the third target text; If it is determined that the user approves the second service description, the second target service is executed.

3. The method according to claim 2, characterized in that The supplementary requirements include text information, and when it is determined that the user does not approve the first service description, the second target text is adjusted based on the supplementary requirements provided by the user to obtain a third target text, including: When it is determined that the user does not approve the first service description, a third target text is generated through the target model based on the target requirement, the second target text and the text information provided by the user.

4. The method according to claim 2, characterized in that: The supplementary requirements include interface information, and when it is determined that the user does not approve the first service description, the second target text is adjusted based on the supplementary requirements provided by the user to obtain a third target text, including: When it is determined that the user does not agree with the first service description, obtaining adjustment information corresponding to the interface information; The second target text is adjusted based on the adjustment information to obtain a third target text.

5. The method according to claim 1, characterized in that The method further comprises: When it is determined that the user approves the first service description, the first target service is executed.

6. The method according to claim 1, characterized in that The step of generating a first target text corresponding to the target requirement based on the target model includes: The first target text is generated based on the target requirement, the grammar rule list, the search information library and the sample text list, wherein the search information library includes a service list, or the search information library includes a service list and a trigger event list.

7. The method according to claim 6, characterized in that Generating the first target text based on the target requirement, the grammar rule list, the search information library and the sample text list includes: Analyzing whether the target requirement lacks a first necessary execution parameter based on the search information library; If the first necessary execution parameter is missing, generating first prompt information, wherein the first prompt information is information instructing the user to supplement the first necessary execution parameter of the target requirement; The first target text is generated based on the supplemented target requirements, the grammatical rule list, the search information library and the sample text list.

8. The method according to claim 6, characterized in that The search information base includes a service list and a trigger event list, and the generating the first target text based on the target requirement, the grammar rule list, the search information base and the sample text list includes: Recalling services corresponding to the target demand from the search information set to obtain a service list in the search information database; Recalling the triggering events corresponding to the target requirements from the retrieval information set to obtain a triggering event list in the retrieval information library; Recalling grammatical rules corresponding to the target requirements from the capability set to obtain the grammatical rule list; Recalling example texts corresponding to the target requirements from the capability set to obtain the example text list; The first target text is generated based on the target requirement, the grammar rule list, the search information library and the sample text list.

9. The method according to claim 1, characterized in that: The performing an executability check on the first target text includes: If the target grammar of the first target text does not conform to the grammar rule list, generating a first detection result; If it is detected that the first target service represented by the first target text cannot be mapped to the service list of the search information library, generating a second detection result; If it is detected that the first target service represented by the first target text lacks a second necessary execution parameter, generating a third detection result; If a first target detection result is detected, it is determined that the first target text fails the executable test, and the first target detection result is that at least one of the first detection result, the second detection result, and the third detection result is detected.

10. The method according to claim 9, characterized in that The first target text is also used to describe a first triggering event that triggers the first target service. The method further includes: If it is detected that the first trigger event represented by the first target text cannot be mapped to the trigger event list of the search information library, generating a fourth detection result; If it is detected that the first trigger event represented by the first target text lacks a third necessary execution parameter, generating a fifth detection result; If the first target detection result is detected, determining that the first target text fails the executable test includes: If a second target detection result is detected, it is determined that the first target text fails the executable test, and the second target detection result is at least one of the first detection result, the second detection result, the third detection result, the third detection result and the fifth detection result.

11. The method according to claim 1, characterized in that: If the first target text fails the executability test, the first target text is corrected by using the target model to obtain a second target text, including: If the first target text fails to pass the executable test, obtaining influence information that affects the failure of the first target text to pass the executable test; Based on the target model, the first target text is modified by using the impact information to obtain a second target text.

12. A service determination device, characterized in that: The device comprises: An acquisition unit, used to acquire the user's target needs; A generating unit, configured to generate a first target text corresponding to the target requirement based on a target model, wherein the first target text is used to describe a first target service corresponding to the target requirement; A detection unit, configured to perform an executability detection on the first target text; a repairing unit, configured to, if the first target text fails the executable test, correct the first target text by using the target model to obtain a second target text; A display unit is used to display a first service description corresponding to the first target service described by the second target text.

13. An electronic device, characterized in that: include: one or more processors; Memory; One or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the method according to any one of claims 1-11.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program code, which can be called by a processor to execute the method according to any one of claims 1 to 11.