WO2023216620A1 - Service calling method and system, calling device, target device, and readable storage medium - Google Patents

Service calling method and system, calling device, target device, and readable storage medium Download PDF

Info

Publication number
WO2023216620A1
WO2023216620A1 PCT/CN2022/143210 CN2022143210W WO2023216620A1 WO 2023216620 A1 WO2023216620 A1 WO 2023216620A1 CN 2022143210 W CN2022143210 W CN 2022143210W WO 2023216620 A1 WO2023216620 A1 WO 2023216620A1
Authority
WO
WIPO (PCT)
Prior art keywords
service
target
target device
installation package
calling
Prior art date
Application number
PCT/CN2022/143210
Other languages
French (fr)
Chinese (zh)
Inventor
杨俊拯
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2023216620A1 publication Critical patent/WO2023216620A1/en

Links

Images

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/26Speech to text systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/28Constructional details of speech recognition systems
    • G10L15/30Distributed recognition, e.g. in client-server systems, for mobile phones or network applications

Definitions

  • the present application relates to the field of communication technology, and in particular to a service calling method, a service calling system, a calling device, a target device and a non-volatile computer-readable storage medium.
  • Some devices can be conveniently controlled through voice control.
  • control is mainly performed through the voice module of the target device itself. Voice control is difficult to perform when the user is far away from the target device.
  • the embodiment of the present application provides a service calling method, a service calling system, a calling device, a target device and a non-volatile computer-readable storage medium.
  • the service calling method in the embodiment of the present application includes: obtaining the label and target service of the target device according to the first input to the calling device; obtaining the address of the target device from the server according to the label; and obtaining the address of the target device from at least one device according to the address. Confirm the target device in the device to be adjusted; and execute the target service on the target device.
  • the service calling system in the embodiment of this application includes: calling device, target device and server.
  • the calling device is configured to: obtain the label and target service of the target device according to the first input, obtain the address of the target device from the server according to the label, and obtain the address of the target device from at least one device to be called according to the address.
  • the target device is confirmed in the device; the target device is used to execute the target service.
  • Embodiments of the present application also provide a service calling method, which includes: obtaining the label and target service of the target device according to the first input to the calling device; obtaining the address of the target device from the server according to the label; and according to the The address confirms the target device from at least one device to be adjusted, so that the target device performs the target service.
  • the calling device in the embodiment of the present application includes: a parsing module, used to obtain the tag and target service of the target device according to the first input; a first acquisition module, used to obtain the target device from the server according to the tag the address; and a confirmation module for confirming the target device from at least one device to be adjusted according to the address; and a calling module for calling the target device to perform the target service.
  • the embodiment of the present application also provides a service calling method, which includes: obtaining service definition information according to the target service input by the calling device; obtaining the identification of the installation package corresponding to the target service from the server according to the service definition information; The identifier searches whether the target device has an installation package corresponding to the target service; and when the installation package exists in the target device, installs the installation package and executes the target service.
  • the target device in the embodiment of the present application includes: a second acquisition module, used to acquire service definition information according to the target service input by the calling device; a third acquisition module, used to acquire the target service from the server according to the service definition information.
  • the identification of the corresponding installation package includes a determination module for searching whether the installation package corresponding to the target service exists in the target device according to the identification; and an execution module for finding the installation package in the target device.
  • An embodiment of the present application is a non-volatile computer-readable storage medium containing a computer program.
  • the processor realizes the quality of the service invocation method of the embodiment of the present application.
  • the service calling method includes: obtaining the label and target service of the target device according to the first input to the calling device; obtaining the address of the target device from the server according to the label; and confirming from at least one device to be called according to the address. the target device; and executing the target service on the target device.
  • Figure 1 is a schematic flow chart of a service invoking method in some embodiments of the present application.
  • Figure 2 is a schematic structural diagram of a service invocation system in some embodiments of the present application.
  • Figure 3 is a schematic diagram of the application scenario of the service invocation system in some embodiments of the present application.
  • Figure 4 is a schematic flowchart of a service invoking method in some embodiments of the present application.
  • Figure 5 is a schematic diagram of the application scenario of the service invocation system of some embodiments of the present application.
  • Figure 6 is a schematic diagram of the application scenario of the service invocation system in some embodiments of the present application.
  • Figure 7 is a schematic flowchart of a service invoking method in some embodiments of the present application.
  • Figure 8 is a schematic flowchart of a service invoking method in some embodiments of the present application.
  • Figure 9 is a schematic diagram of the application scenario of the service invocation system in some embodiments of the present application.
  • Figure 10 is a schematic flowchart of a service invoking method in some embodiments of the present application.
  • Figure 11 is a schematic flowchart of a service invoking method in some embodiments of the present application.
  • Figure 12 is a schematic flowchart of a service invoking method in some embodiments of the present application.
  • Figure 13 is a schematic flowchart of a service invoking method in some embodiments of the present application.
  • Figure 14 is a schematic flowchart of a service invoking method in some embodiments of the present application.
  • Figure 15 is a schematic diagram of the application scenario of the service invocation system in some embodiments of the present application.
  • Figure 16 is a schematic flowchart of a service invoking method in some embodiments of the present application.
  • Figure 17 is a schematic flowchart of a service invoking method in some embodiments of the present application.
  • Figure 18 is a schematic diagram of the application scenario of the service invocation system in some embodiments of the present application.
  • Figure 19 is a schematic flowchart of a service invoking method in some embodiments of the present application.
  • Figure 20 is a schematic flowchart of a service invoking method in some embodiments of the present application.
  • Figure 21 is a schematic structural diagram of a calling device according to certain embodiments of the present application.
  • Figure 22 is a schematic flowchart of a service invoking method in some embodiments of the present application.
  • Figure 23 is a schematic structural diagram of a target device according to certain embodiments of the present application.
  • Figure 24 is a schematic diagram of the connection relationship between a computer-readable storage medium and a processor in some embodiments of the present application.
  • the embodiment of the present application provides a service calling method, a service calling system, a calling device, a target device and a non-volatile computer-readable storage medium.
  • a service calling method in an embodiment of the present application includes: obtaining the label and target service of the target device according to the first input to the calling device; obtaining the address of the target device from the server according to the label; and obtaining the address of the target device from at least one device to be called according to the address. Identify the target device; and execute the target service on the target device.
  • executing the target service on the target device includes: obtaining service definition information according to the target service; obtaining the identification of the installation package corresponding to the target service from the server according to the service definition information; and searching whether the target device has an installation package corresponding to the target service according to the identification. Installation package; and when the installation package exists in the target device, install the installation package and execute the target service.
  • Executing the target service on the target device also includes: obtaining the installation package corresponding to the target service from the server when the installation package does not exist in the target device; and installing the installation package and executing the target service.
  • executing the target service on the target device also includes: subscribing to the target service in the server; obtaining the installation package corresponding to the target service from the server, including: after the installation package in the server is updated, obtaining the updated installation package from the server.
  • executing the target service on the target device also includes: retaining subscriptions and/or installation packages according to the preset retention policy.
  • the target services include uninstall service and search service.
  • the service calling method also includes: uninstalling the target service from the target device according to a preset uninstallation policy.
  • the first input includes voice input; obtaining the label and target service of the target device according to the first input to the calling device includes: converting the voice input into text information; obtaining a preset semantic configuration; and converting the text information according to the semantic configuration. Parse and obtain the tags and target services of the target device.
  • the semantic configuration includes an intent slot, an intent dictionary, an intent corpus, and an intent reply.
  • the intent slot includes a first variable and a second variable.
  • the first variable represents the label of the target device
  • the second variable represents the target service
  • the intent dictionary includes the third variable.
  • the intention corpus includes preset sentence patterns; parsing the text information according to the semantic configuration, obtaining the label and target service of the target device, including: matching the text information with the intention corpus; and after the matching is successful , obtain the variable value of the intent slot to obtain the tag of the target device and the target service.
  • the service calling method also includes: registering the target service in the server.
  • registering the target service in the server includes: saving the installation package and outputting the identification of the installation package according to the installation package upload request; receiving a registration service definition request, which includes the service definition information associated with the identification; and saving Service definition information.
  • the service calling method also includes: updating the target service in the server.
  • updating the target service in the server includes: saving the updated installation package and outputting the identification of the updated installation package according to the new installation package upload request; receiving an update service definition request, and the update service definition request includes and updates service definition information associated with the identity of the updated installation package; and save service definition information associated with the identity of the updated installation package.
  • obtaining the address of the target device from the server according to the tag includes: confirming on the server whether the target device is associated with the account of the calling device; and obtaining the address of the target device if the target device is associated with the account of the calling device.
  • a service calling system in an embodiment of the present application includes a calling device, a target device and a server; the calling device is used to: obtain the label and target service of the target device according to the first input, obtain the address of the target device from the server according to the label, and obtain the address of the target device from the server according to the label, and obtain the target device's address according to the first input.
  • the address identifies the target device from at least one device to be deployed; the target device is used to perform the target service.
  • a service calling method in an embodiment of the present application includes: obtaining the label and target service of the target device according to the first input to the calling device; obtaining the address of the target device from the server according to the label; and obtaining the address of the target device from at least one device to be called according to the address. Confirm the target device in so that the target device performs the target service.
  • a calling device including: a parsing module, used to obtain the label and target service of the target device according to the first input; a first acquisition module, used to obtain the address of the target device from the server according to the label; a confirmation module , used to confirm the target device from at least one device to be adjusted according to the address; and a calling module, used to call the target device to perform the target service.
  • a service calling method in an embodiment of the present application includes: obtaining service definition information according to the target service input by the calling device; obtaining the identification of the installation package corresponding to the target service from the server according to the service definition information;
  • a target device includes: a second acquisition module, used to acquire service definition information according to the target service input by the calling device; and a third acquisition module, used to acquire the corresponding target service from the server according to the service definition information.
  • the identification of the installation package; the determination module is used to find whether the installation package corresponding to the target service exists on the target device according to the identification; and the execution module is used to install the installation package and execute the target service when the installation package exists in the target device.
  • An embodiment of the present application is a non-volatile computer-readable storage medium containing a computer program.
  • the computer program When the computer program is executed by one or more processors, it causes the processor to implement any of the above service invocation methods.
  • the embodiment of the present application provides a service invocation system 100.
  • the service invocation method can be applied to the service invocation system 100.
  • the service calling system 100 includes a calling device 10, a target device 30 and a server.
  • the calling device 10 is configured to: obtain the label and target service of the target device 30 according to the first input, obtain the address of the target device 30 from the server according to the label, and confirm the target device 30 from at least one device to be adjusted according to the address.
  • the target device 30 is used to execute target services.
  • the tag 30 of the target device may include at least one of the name, device type, identification information and other information of the target device 30 .
  • the target device 30 is a smart watch, and the smart watch is associated with the same account as the calling device 10.
  • the name of the smart watch is "My Watch” and the device type is "XX Model Smart Watch.”
  • the identification information is "No. XXXX”. That is, in the device list saved by the associated account, the smart watch can be uniquely determined based on at least one piece of information in the name "my watch", device type "XX model smart watch” and identification information "number XXXX".
  • the information used to identify the smart watch is the tag of the smart watch.
  • the tag 30 of the target device may include at least one of the name, device type, identification information and other information of the target device 30 , for uniquely determining the corresponding target device 30 .
  • the first input includes voice input, text input, key input, etc., which are not limited here.
  • the calling device 10 is an electronic device having an interface capable of receiving the first input.
  • the calling device 10 is an electronic device such as a mobile phone, a tablet computer, a laptop computer, a desktop computer, a smart watch, a smart robot, etc., and is not limited here.
  • the first input is voice input
  • the calling device 10 is a mobile phone equipped with the voice recognition module 11 .
  • the first input is text input
  • the calling device 10 is a tablet computer equipped with a handwriting input module. No examples are given here.
  • the first input is used to control the target device 30 to execute the target service.
  • the target device 30 may include electronic devices such as mobile phones, tablet computers, laptops, desktop computers, smart watches, smart robots, etc., which are not limited here.
  • the target service may include opening or closing a designated application on the target device 30, opening or closing a designated function on the target device 30, etc., which are not limited here.
  • the tag of the target device 30 is used to obtain the address of the target device 30 from the server. Please refer to Figure 3.
  • the calling device 10 and at least one device to be adjusted are connected to the Internet.
  • the cloud server 20 stores the account information registered by the calling device 10.
  • the account information includes the name of the device to be adjusted associated with the calling device 10. Label.
  • the address information of the device to be adjusted is stored in the cloud server 20, and the address information corresponds to the label of the device to be adjusted.
  • the calling device 10 uploads the tag of the target device 30 to the cloud server 20.
  • the cloud server 20 determines the target device 30 from a plurality of devices to be adjusted associated with the calling device 10 based on the tag of the target device 30. , and returns the address corresponding to the tag of the target device 30 to the calling device 10 .
  • the calling device 10 sends a request to call the target device 30 according to the address information corresponding to the tag of the target device 30 .
  • the calling device 10 and the device to be called are associated by subscribing to the same service. For example, both the calling device 10 and the device to be adjusted subscribe to the "Find Device Location” service, and the device to be adjusted that subscribes to the "Find Device Location” service appears in the device list corresponding to the "Find Device Location” service.
  • the calling device 10 can selectively Associate with the device to be adjusted in the device list.
  • the calling device 10 is a mobile phone.
  • the devices to be called include watch 1, watch 2 and a robot.
  • the target device 30 is a watch.
  • the mobile phone, watch 1, watch 2 and robot are all connected to the Internet.
  • One input is voice input.
  • the user inputs the voice "Help me find the location of watch 1" into the mobile phone.
  • the mobile phone determines that the label of the target device 30 is "Watch 1" and the target service is "Find Device Location".
  • the mobile phone obtains the address of watch 1 through the cloud server 20 and sends a call request corresponding to the "find device location” service to watch 1, causing the watch to perform the "find location” service.
  • Watch 1 starts the “Find Device Location” application according to the call request, and the “Find Device Location” application plays the sound “I am here” through the speaker of Watch 1 to perform the "Find Device Location” service.
  • the watch 1 when the watch 1 is far away from the user and it is difficult to recognize the user's input voice, the user can remotely control the watch 1 to perform the target service by making voice input to the mobile phone.
  • the watch 1 when the watch 1 does not have a voice recognition function, the watch 1 can perform the target service through voice input to the mobile phone, so that the user can control the device without a voice input interface through voice.
  • the target device 30 when the target device 30 does not support receiving the first input or is difficult to receive the first input, the first input can be made to the calling device 10, and the calling device 10 can identify the target device 30 that the first input wants to control and the corresponding target service. , calling the target device 30 to execute the target service.
  • the service invoking method and service invoking system 100 of the embodiment of the present application can make a first input to the invoking device 10 and call the target device 30 to execute the target service, so that when the target device 30 is difficult or unable to receive the first input, The target device 30 can still be controlled through the first input, which is convenient for the user to control.
  • the first input includes voice input. 01: Obtain the tag and target service of the target device 30 according to the first input to the calling device 10, including:
  • 013 Parse the text information according to the semantic configuration and obtain the label and target service of the target device 30 .
  • the calling device 10 includes a speech recognition module 11 and a text parsing module 12 .
  • the speech recognition module 11 is used to perform the method in 011
  • the text analysis module 12 is used to perform the methods in 012 and 013. That is, the speech recognition module 11 is used to convert speech input into text information.
  • the text analysis module 12 is used to obtain the preset semantic configuration; and analyze the text information according to the semantic configuration to obtain the label and target service of the target device 30 .
  • the user may just mention the label of the device and the target service by voice, but the user's semantics does not intend to request the target device 30 to perform the target service.
  • the calling device 10 can recognize the user's voice and analyze whether the user's voice input is a service request, that is, analyze whether the content of the user's voice input is a request for the target device 30 to perform the target service. If it is a service request, obtain the tag and target service of the target device 30 corresponding to the service request.
  • the calling device 10 further includes a device management module 13 .
  • the text parsing module 12 calls the device management module 13 to obtain the address of the target device 30 from the cloud server 20 according to the tag of the target device 30 .
  • the device management module 13 assembles the address of the target device 30 returned by the cloud server 20 and the target service obtained by the text parsing module 12 into a service invocation URL (Uniform Resource Locator, URL).
  • the device management module 13 uses the The service call URL connects to the service gateway 31 of the target device 30 to call the target device 30 .
  • the semantic configuration includes an intent slot, an intent dictionary, an intent corpus, and an intent reply.
  • the intent slot includes a first variable and a second variable.
  • the first variable represents the label of the target device 30.
  • the second variable represents the target service
  • the intent dictionary includes synonyms of the first variable and the second variable
  • the intent corpus includes preset sentence patterns.
  • Intent replies include operations performed when text information and intended corpus are successfully matched.
  • 013 parse the text information according to the semantic configuration and obtain the label and target service of the target device 30, including:
  • the text parsing module 12 is also used to execute the methods in 0131 and 0132. That is, the text parsing module 12 is also used to match the text information with the intention corpus; and after successful matching, obtain the variable value of the intention slot to obtain the label and target service of the target device 30 .
  • the intent dictionary includes a subject and synonyms of the subject.
  • a variable in the intent slot corresponds to an intent dictionary.
  • the intent corpus is a sentence composed of a modal prefix, a subject in the intent dictionary or a synonym of the subject, and a modal suffix.
  • the modal prefix is before the subject or the synonym of the subject in the intention dictionary
  • the modal suffix is before the subject or the synonym of the subject in the intention dictionary.
  • the text information can be successfully matched with the mood prefix, the subject in the intention dictionary or a synonym of the subject, and the mood suffix to determine whether the text information and the intention corpus are successfully matched; it can also be text
  • the information matches a component in the intent dictionary or a synonym of the subject, and the text information matches one of the modal prefixes and modal suffixes, it can be determined that the text information matches the intended corpus successfully. It can be set according to the application scenario and is not limited here.
  • the intent slot includes a first variable and a second variable, the first variable represents the label of the target device 30 , and the second variable represents the target service.
  • the intent dictionary includes a first dictionary and a second dictionary.
  • the first dictionary includes device tags and synonyms of device tags.
  • the second dictionary includes service tags and synonyms of service tags.
  • the first variable corresponds to the first dictionary, and the second variable corresponds to the second dictionary.
  • the subject of the first dictionary includes “watch”, and the synonyms corresponding to the subject "watch” in the first dictionary include “wrist watch”, “electronic watch”, and “mechanical watch”.
  • the main word of the second dictionary includes “search”, and the synonyms corresponding to the main word “find” in the second dictionary include “search", “find”, and “search”.
  • the default tone prefixes include “please”, “help me”, and “help”.
  • the default mood suffixes include “ok”, "can you", and "ok”.
  • the text message is "Please help me find the location of watch 1". Match the text message with the intended corpus.
  • the subjects of the first dictionary also include "television” and "audio".
  • the synonyms corresponding to the subject "television” in the first dictionary include “color TV” and “TV”, and the synonyms corresponding to the subject “audio” include “loudspeaker”. ",”music player”.
  • the main word of the second dictionary also includes “start”, and the synonyms corresponding to the main word “start” in the second dictionary include “turn on”, “turn on” and “open”.
  • the text information is "Will you turn on the TV and stereo?". Match the text information with the intended corpus. In the text information, "turn on” can be matched with the second dictionary, and "TV” and “stereo” can be matched with the first dictionary.
  • the tags of the target device 30 are obtained: “TV” and “Audio” according to the first variables “TV” and “Audio” corresponding to the main words of the first dictionary, and according to the second variables "TV” and “Audio” corresponding to the main words of the second dictionary.
  • Variable “start” gets the target service: “start” service.
  • the target device 30 includes both a television and a stereo, and the "start” service will eventually be executed on both the television and the stereo.
  • Intent replies include operations performed when text information and intended corpus are successfully matched.
  • the preset intention reply is: when the text information and the intention corpus are successfully matched, the target device 30 is called from at least one device to be adjusted according to the address of the target device 30 .
  • the text parsing module 12 calls the device 10 management module to send a calling request to the target device 30 .
  • 02 Obtain the address of the target device 30 from the server according to the tag, including:
  • the calling device 10 is also used to execute the methods in 021 and 022. That is, the calling device 10 is also used to confirm on the server whether the target device is associated with the account of the calling device; and if the target device is associated with the account of the calling device, obtain the address of the target device.
  • the account can be a mobile phone number, the ID of the calling device, the registered account corresponding to the service, etc. There are no restrictions here.
  • obtaining the address of the target device can ensure that the target device is called by the calling device under the same associated account, and ensure that the calling device is a trusted device to avoid security risks.
  • the device illegally makes calls to the target device.
  • 04 executing the target service on the target device 30, including:
  • the target device 30 includes a service management module 32 and a service life cycle management module 33 .
  • the service management module 32 is used to execute the methods in 041, 042 and 043, and the service life cycle management module 33 is used to execute the method in 044. That is, the service management module 32 is used to obtain service definition information according to the target service; obtain the identification of the installation package corresponding to the target service from the server according to the service definition information; and search whether the installation package corresponding to the target service exists in the target device 30 according to the identification. .
  • the service management module 32 is used to install the installation package when there is an installation package in the target device 30 and execute the target service.
  • the target service in order to reduce the storage space occupied by the target device 30, the target service is stored locally on the target device 30 in the form of an installation package.
  • the target device 30 obtains the target service according to the calling request, installs the installation package corresponding to the target service, executes the target service, and uninstalls the target service after completing the execution of the target service.
  • the target service is a "find" service.
  • the target device 30 executes the "find” service
  • the "find” program calls the speaker of the target device 30 to emit the sound "I am here".
  • the "find" service is used less frequently.
  • the target device 30 In order to prevent the "find” program from occupying the space of the target device 30, the target device 30 does not save the “find” program and only responds through the “find” service when it is necessary to execute the “find” service.
  • the installation package installs the "find” program.
  • the service definition information includes at least one of service tag, service ID, service invocation protocol, service input parameters, and service output parameters.
  • the installation package corresponding to the service can be determined. For example, for a service, the service ID of the service has a unique corresponding installation package identifier, and the installation package corresponding to the installation package identifier is the installation package corresponding to the service.
  • the installation package is the installation package of the program that executes the service.
  • the cloud server 20 stores service definition information corresponding to multiple registered services.
  • the calling request sent by the calling device 10 to the target device 30 includes the target service that needs to be executed on the target device 30 .
  • the target device 30 requests to call the cloud server 20 to search for service definition information corresponding to the target service from multiple service definition information.
  • the calling request sent by the calling device 10 to the target device 30 includes service definition information.
  • the device management module 13 of the calling device 10 can execute the method in step 041: obtain service definition information according to the target service.
  • the device management module 13 of the calling device 10 requests the calling cloud server 20 to search for the service definition information corresponding to the target service from a plurality of service definition information.
  • the target device 30 obtains the service definition information according to the call request, and after performing basic verification on the service definition information, executes the method in 042: obtain the identification of the installation package corresponding to the target service from the server according to the service definition information.
  • basic verification includes verifying the integrity and legality of service ID, service invocation protocol, service input parameters, or service output parameters, etc., which are not listed here.
  • the cloud server 20 includes a service gateway 21 , a service package management module 22 and a service definition management module 23 .
  • the service gateway 21 of the cloud server 20 can forward the request for obtaining service definition information to the service definition management module 23 .
  • the service definition management module 23 queries the service definition information corresponding to the request stored in the service definition management module 23, and returns the service definition information to the service gateway 21.
  • the service gateway 21 returns the service definition information to the device that sent the request to obtain the service definition information. For example, when the target device 30 sends the request to the service gateway 21, the service gateway 21 returns the service definition information to the target device 30; When the gateway 21 sends the request, the service gateway 21 returns the service definition information to the calling device 10 .
  • the service package management module 22 stores installation packages corresponding to one or more services, and each installation package has a unique corresponding installation package identification.
  • the service package management module 22 can determine the installation package corresponding to the target service according to the service definition information, for example, determine the installation package corresponding to the target service according to the service ID corresponding to the target service.
  • the service gateway 21 forwards the request to obtain the service definition information to the service definition management module 23 to obtain the service definition information; in the service gateway 21 After obtaining the service definition information, a request for obtaining the identification is sent to the service package management module 22 according to the service definition information, so as to obtain the identification of the installation package corresponding to the target service from the service package management module 22; finally, the service gateway 21 combines the service definition information with The identification of the installation package corresponding to the target service is also returned to the target device 30 .
  • the target device 30 sends a request to obtain the identity to the service gateway 21 according to the service definition information.
  • the service gateway 21 forwards the request to obtain the identity to the service package management module 22 and queries the request to obtain the identity through the service package example module.
  • the installation package corresponding to the service definition information contained in the service gateway 21 returns the identification of the installation package corresponding to the service definition information, and then the service gateway 21 returns the identification to the target device 30 .
  • the target device 30 searches whether the installation package corresponding to the target service exists locally on the target device 30 according to the identification of the installation package corresponding to the target service. If the installation package exists in the target device 30, installs the installation package and executes the target service.
  • 046 Install the installation package and execute the target service.
  • the service management module 32 is also used to execute the method in 045, and the service life cycle management module 33 is also used to execute the method in 046. That is, the service management module 32 is used to obtain the installation package corresponding to the target service from the server when the installation package does not exist in the target device 30 .
  • the service management module 32 sends an installation package acquisition request to the cloud server 20 , and the installation package acquisition request includes the identification of the installation package corresponding to the target service.
  • the service gateway 21 forwards the installation package acquisition request to the service package management module 22.
  • the service package management module 22 queries the corresponding installation package file according to the identification of the installation package, returns the installation package file to the service gateway 21, and sends the installation package file through the service gateway 21. transmitted to target device 30.
  • the service package management module 22 queries the identification of the installation package and returns the address of the corresponding installation package file to the service gateway 21.
  • the service gateway 21 returns the address of the installation package file to the target device 30.
  • the target device 30 downloads the installation package according to the address of the installation package file. , to install the installation package and execute the target service.
  • executing the target service on the target device 30 also includes:
  • 0461 Install the updated installation package and execute the target service.
  • the service management module 32 is also used to execute the methods in 047 and 0451, and the service life cycle management module 33 is also used to execute the method in 0461. That is, the service management module 32 is used to subscribe to the target service in the server; and after the installation package in the server is updated, obtain the updated installation package from the server. The service life cycle management module 33 is also used to install the updated installation package and execute the target service.
  • the target device 30 subscribes to the target service in the cloud server 20 to ensure that the latest installation package of the target service can be obtained from the cloud server 20 when the target service needs to be executed.
  • the cloud server 20 also includes a service subscription management module 24.
  • the service gateway 21 forwards the installation package acquisition request to the service package management module 22 to obtain the latest installation package, and launches the service.
  • the subscription management module 24 adds a subscription relationship with the target device 30 so that the target device 30 subscribes to the target service.
  • the service package management module 22 pulls up the service subscription management module 24 to perform installation package synchronization processing.
  • the service subscription The management module 24 sends an installation package synchronization request to the target device 30 that has subscribed to the target service.
  • the installation package synchronization request includes updated installation package information, such as the address information of the updated installation package file.
  • the target device 30 performs the installation package synchronization request according to the updated installation package.
  • Package information Download the updated installation package from the server.
  • the service invocation method also includes:
  • the service life cycle management module 33 is also used to execute the method in 06. That is, the service life cycle management module 33 is also used to retain subscriptions and/or installation packages according to a preset retention policy.
  • the preset retention policy is set to: detect the frequency of use of the target service; when the frequency of use of the target service is high, retain the installation package so that the target device 30 can install the installation package in time and execute the target service; when the target service is used When the frequency of use is low, the installation package is deleted, and the next time the target device 30 is called, the target device 30 re-obtains the installation package of the target service from the cloud server 20 .
  • the subscription relationship between the target device 30 and the target service is retained to reduce Subsequent calls to the link of the target device 30 improve the response speed; when the target device 30 is called less frequently, cancel the subscription relationship between the target device 30 and the target service to avoid the target device 30 being called less frequently. In this case, the installation package is still frequently updated.
  • the service invocation method also includes:
  • the service life cycle management module 33 is also used to execute the method in 07. That is, the service life cycle management module 33 is also used to uninstall the target service from the target device 30 according to the preset uninstall policy.
  • the preset uninstallation policy is set to: uninstall the target service from the target device 30 after the target service completes execution for a preset period of time. For example, if the default duration is immediate uninstallation, the target service will be uninstalled immediately after the execution of the target service is completed. For another example, if the default duration is 2 hours, if the target service is not called for execution again within 2 hours after completion, the target service will be uninstalled. In this way, the storage space occupied by the target device 30 can be saved.
  • the target service includes an uninstall service. Executing the uninstall service on the target device 30 can uninstall other local services on the target device 30 , such as uninstalling other target services that have been completed.
  • target services include uninstall service and lookup service.
  • the target device 30 is watch 1, watch 1 has completed the execution of the search service, and the user inputs a voice message to the calling device 10: "Help me uninstall the search program of watch 1.”
  • the calling device 10 executes the service calling methods in 01, 02, and 03 according to the user's voice input, that is, the calling device 10 obtains the label and target service of the target device 30 according to the first input, and obtains it from the server according to the label.
  • the target device 30 executes the service invoking method in 04, that is, the target device 30 executes the target service.
  • the label of the target device 30 obtained by the calling device 10 is "watch 1"
  • the target service is the "uninstall” service, specifically "uninstall the search program of watch 1".
  • the calling device 10 encapsulates the address of the watch 1 and the parameters of the "uninstall” service into a calling URL, and sends a calling request to the watch 1 to uninstall the service.
  • Watch 1 executes the "uninstall” service according to the call request of the uninstall service and uninstalls the local "find” program.
  • the service invocation method also includes:
  • the cloud server 20 is used to execute the method in 08. That is, the cloud server 20 is used to register the target service.
  • the service is registered in the cloud server 20, so that when the calling device 10 calls the target device 30 to execute the service, the target device 30 can obtain the service from the cloud server 20
  • the installation package to install and execute the service locally on the target device 30.
  • developers add the labels of registered services to the intent dictionary, so that the calling device 10 can parse text information according to the intent dictionary, and compare the service labels in the text information with the registered services in the intent dictionary. Tags are matched to obtain the target service.
  • the developer registers the target service, including uploading the installation package of the target service to the cloud server 20, and uploading the service definition information of the target service to the cloud server 20.
  • the cloud server 20 includes a service package management module 22 , a service gateway 21 , and a service definition management module 23 .
  • the service package management module 22 is used to execute the method in 081
  • the service gateway 21 is used to execute the method in 082
  • the service definition management module 23 is used to execute the method in 083. That is, the service package management module 22 is configured to save the installation package and output the identification of the installation package according to the installation package upload request.
  • the service gateway module is used to receive registration service definition requests.
  • the service definition management module 23 is used to save service definition information.
  • the developer sends an installation package upload request corresponding to the target service to the service gateway, and the installation package upload request includes the installation package file.
  • the service gateway forwards the installation package upload request to the service package management module 22.
  • the service package management module 22 saves the installation package file to the file warehouse of the cloud server 20 according to the installation package upload request, and outputs the information of the installation package in the cloud server 20.
  • Installation The package information includes the address of the installation package file, the identification of the installation package, etc.
  • the service package management module 22 returns the identification of the installation package to the service gateway, and returns the identification of the installation package to the developer through the service gateway.
  • the developer associates the service definition information of the target service with the identification of the installation package of the target service, and sends a registration service definition request to the service gateway.
  • the registration service definition request includes the associated service definition information.
  • the service gateway forwards the registration service definition request to the service definition management module 23 , and the service definition management module 23 saves the service definition information to the cloud server 20 .
  • the service package management module 22 saves the installation package information
  • the service definition management module 23 saves the service definition information.
  • the service gateway can forward the request to the service definition management module 23, so that the service definition management module 23 responds to the request and sends the service to the target device 30 through the service gateway.
  • Define information When the target device 30 initiates a request to obtain the installation package from the cloud server 20, the service gateway can forward the request to the service package management module 22, so that the service package management module 22 responds to the request and sends the installation package to the target device 30 through the service gateway. address information, so that the target device 30 downloads the installation package according to the address information of the installation package.
  • the service invocation method also includes:
  • the cloud server 20 is used to execute the method in 09. That is, the cloud server 20 is also used to update the target service.
  • the installation package and service definition information corresponding to the target service in the cloud server 20 need to be updated synchronously, so that when the calling device 10 calls the target device 30 to execute the service, the target device 30 can obtain the information from the cloud server 20 Get the latest installation package of the service.
  • 09 Update the target service in the server, including:
  • the service package management module 22 is also used to execute the method in 091
  • the service gateway module is also used to execute the method in 092
  • the service definition management module 23 is also used to execute method in 093. That is, the service package management module 22 is also configured to save the updated installation package and output the identification of the updated installation package according to the new installation package upload request.
  • the service gateway module is also used to receive update service definition requests.
  • the service definition management module 23 is also configured to save service definition information associated with the updated installation package identification.
  • the developer sends a new installation package upload request corresponding to the updated target service to the service gateway, and the new installation package upload request includes a new installation package file.
  • the service gateway forwards the new installation package upload request to the service package management module 22.
  • the service package management module 22 saves the new installation package file to the file warehouse of the cloud server 20 according to the new installation package upload request, and outputs it to the cloud server 20.
  • the information of the new installation package includes the address of the new installation package file, the identification of the new installation package, etc.
  • the service package management module 22 returns the identification of the new installation package to the service gateway, and sends the information to the service gateway through the service gateway.
  • the identity of the new installation package is returned to the developer.
  • the service package management module 22 also calls the service package synchronization processing request through the service subscription management module 24 according to the information of the new installation package, and the service package synchronization processing request includes the information of the new installation package.
  • the service subscription management module 24 initiates a service package synchronization processing request to the service gateway of the target device 30 that has subscribed to the target service.
  • the service gateway of the target device 30 forwards the request to the service management module 32 of the target device 30.
  • the service management of the target device 30 The module 32 updates the information of the installation package of the target service. After the update is successful, the target device 30 returns a response to the cloud server 20 . In this way, when the calling device 10 calls the target device 30 to execute the updated target service, the target device 30 can download and install the new installation package according to the information of the new installation package to execute the updated target service.
  • the developer associates the new service definition information of the new target service with the identity of the new installation package of the new target service, and sends an update service definition request to the service gateway.
  • the update service definition request includes association with the identity of the updated installation package. service definition information.
  • the service gateway forwards the update service definition request to the service definition management module 23 , and the service definition management module 23 saves the service definition information associated with the updated installation package identification to the cloud server 20 .
  • the service invoking method and service invoking system 100 of the embodiment of the present application can make a first input to the invoking device 10 and call the target device 30 to execute the target service, so that when the target device 30 is difficult or unable to receive the first input, The target device 30 can still be controlled through the first input, which is convenient for the user to control.
  • Service calling methods include:
  • 0101 Obtain the tag and target service of the target device according to the first input to the calling device 200;
  • 0102 Obtain the address of the target device from the server based on the tag.
  • 0103 Confirm the target device from at least one device to be adjusted according to the address, so that the target device can perform the target service.
  • the calling device 200 includes a parsing module 201, a first acquisition module 202, a confirmation module 203 and a calling module 204.
  • the parsing module 201 is used to execute the method in 0101
  • the first acquisition module 202 is used to execute the method in 0102
  • the confirmation module 203 and the calling module are used to execute the method in 0103. That is, the parsing module 201 is used to obtain the tag and target service of the target device according to the first input to the calling device 200 .
  • the first obtaining module 202 is used to obtain the address of the target device from the server according to the label.
  • the confirmation module 203 is used to confirm the target device from at least one device to be adjusted according to the address.
  • the calling module 204 is used to call the target device to execute the target service.
  • the calling device 200 can participate in forming the service calling system 100 as the calling device 10 in the service calling system 100 .
  • the calling device 200 may be used to execute the service calling method executed by the calling device 10 in the above embodiment, which will not be described again here.
  • Service calling methods include:
  • the target device 300 includes a second acquisition module 301, a third acquisition module 302, a determination module 303 and an execution module 304.
  • the second acquisition module 301 is used to execute the method in 0201
  • the third acquisition module 302 is used to execute the method in 0202
  • the determination module 303 module is used to execute the method in 0203
  • the execution module 304 is used to execute the method in 0204. That is, the second obtaining module 301 is used to obtain service definition information according to the target service input by the calling device.
  • the third obtaining module 302 is used to obtain the identification of the installation package corresponding to the target service from the server according to the service definition information.
  • the determining module 303 is used to search whether the target device 30 has an installation package corresponding to the target service according to the identification.
  • the execution module 304 is used to install the installation package and execute the target service when the installation package exists in the target device 30 .
  • the target device 300 can participate in forming the service invocation system 100 as a device to be deployed in the service invocation system 100.
  • the target device 300 When the target device 300 is called, it becomes Figure 2 Target device 30 in .
  • the target device 300 In the calling system, the target device 300 may be used to execute the service calling method executed by the target device 30 in the above embodiment, which will not be described again here.
  • an embodiment of the present application also provides a non-volatile computer-readable storage medium 400 containing a computer program 401.
  • the processor 402 can execute any of the above implementations.
  • the service calling method in the way, for example, implement steps 01, 02, 03, 04, 05, 07, 08, 09, 011, 012, 013, 0131, 0132, 021, 022, 041, 042, 043, 044, 045, 046 , 047, 0451, 0461, 081, 082, 083, 091, 092, 093, 0101, 0102, 0103, 0201, 0202 and 0203.
  • processors 402 when the computer program 401 is executed by one or more processors 402, the processors 402 are caused to perform the following steps:

Abstract

A service calling method and system (100), a calling device (10), a target device (30), and a non-volatile computer-readable storage medium (400). The service calling method comprises: acquiring a label of a target device (30) and a target service according to a first input for a calling device (10); acquiring the address of the target device (30) from a server according to the label; according to the address, confirming the target device (30) from at least one device which is about to perform calling; and executing the target service on the target device (30).

Description

服务调用方法与系统、调用设备、目标设备及可读存储介质Service calling method and system, calling device, target device and readable storage medium
优先权信息priority information
本申请请求2022年5月13日向中国国家知识产权局提交的、专利申请号为202210523067.8的专利申请的优先权和权益,并且通过参照将其全文并入此处。This application requests the priority and rights of the patent application with patent application number 202210523067.8, which was submitted to the State Intellectual Property Office of China on May 13, 2022, and the full text of which is incorporated herein by reference.
技术领域Technical field
本申请涉及通信技术领域,特别涉及一种服务调用方法、服务调用系统、调用设备、目标设备及非易失性计算机可读存储介质。The present application relates to the field of communication technology, and in particular to a service calling method, a service calling system, a calling device, a target device and a non-volatile computer-readable storage medium.
背景技术Background technique
一些设备可通过语音控制实现便捷的操控。相关技术中,主要是通过目标设备自身的语音模块来进行控制的。当用户距离目标设备较远时,语音控制难以进行。Some devices can be conveniently controlled through voice control. In related technologies, control is mainly performed through the voice module of the target device itself. Voice control is difficult to perform when the user is far away from the target device.
发明内容Contents of the invention
本申请实施方式提供了一种服务调用方法、服务调用系统、调用设备、目标设备及非易失性计算机可读存储介质。The embodiment of the present application provides a service calling method, a service calling system, a calling device, a target device and a non-volatile computer-readable storage medium.
本申请实施方式的服务调用方法包括:根据对调用设备的第一输入获取目标设备的标签及目标服务;根据所述标签从服务器中获取所述目标设备的地址;根据所述地址从至少一台待调设备中确认所述目标设备;及在所述目标设备上执行所述目标服务。The service calling method in the embodiment of the present application includes: obtaining the label and target service of the target device according to the first input to the calling device; obtaining the address of the target device from the server according to the label; and obtaining the address of the target device from at least one device according to the address. Confirm the target device in the device to be adjusted; and execute the target service on the target device.
本申请实施方式的服务调用系统包括:调用设备、目标设备及服务器。所述调用设备用于:根据第一输入获取所述目标设备的标签及目标服务,根据所述标签从所述服务器中获取所述目标设备的地址,及根据所述地址从至少一台待调设备中确认所述目标设备;所述目标设备用于执行所述目标服务。The service calling system in the embodiment of this application includes: calling device, target device and server. The calling device is configured to: obtain the label and target service of the target device according to the first input, obtain the address of the target device from the server according to the label, and obtain the address of the target device from at least one device to be called according to the address. The target device is confirmed in the device; the target device is used to execute the target service.
本申请实施方式还提供一种服务调用方法,包括:根据对调用设备的第一输入获取目标设备的标签及目标服务;根据所述标签从服务器中获取所述目标设备的地址;及根据所述地址从至少一台待调设备中确认所述目标设备,以使所述目标设备执行所述目标服务。Embodiments of the present application also provide a service calling method, which includes: obtaining the label and target service of the target device according to the first input to the calling device; obtaining the address of the target device from the server according to the label; and according to the The address confirms the target device from at least one device to be adjusted, so that the target device performs the target service.
本申请实施方式的调用设备包括:解析模块,用于根据第一输入获取所述目标设备的标签及目标服务;第一获取模块,用于根据所述标签从所述服务器中获取所述目标设备的地址;及确认模块,用于根据所述地址从至少一台待调设备中确认所述目标设备;及调用模块,用于调用所述目标设备执行所述目标服务。The calling device in the embodiment of the present application includes: a parsing module, used to obtain the tag and target service of the target device according to the first input; a first acquisition module, used to obtain the target device from the server according to the tag the address; and a confirmation module for confirming the target device from at least one device to be adjusted according to the address; and a calling module for calling the target device to perform the target service.
本申请实施方式还提供一种服务调用方法,包括:根据调用设备输入的目标服务获取服务定义信息;根据所述服务定义信息从服务器中获取与所述目标服务对应的安装包的标识;根据所述标识查找所述目标设备是否存在与所述目标服务对应的安装包;及在所述目标设备中存在所述安装包时,安装所述安装包,并执行所述目标服务。The embodiment of the present application also provides a service calling method, which includes: obtaining service definition information according to the target service input by the calling device; obtaining the identification of the installation package corresponding to the target service from the server according to the service definition information; The identifier searches whether the target device has an installation package corresponding to the target service; and when the installation package exists in the target device, installs the installation package and executes the target service.
本申请实施方式的目标设备包括:第二获取模块,用于根据调用设备输入的目标服务获取服务定义信息;第三获取模块,用于根据所述服务定义信息从服务器中获取与所述目标服务对应的安装包的标识;确定模块,用于根据所述标识查找所述目标设备是否存在与所述目标服务对应的安装包;及执行模块,用于在所述目标设备中存在所述安装包时,安装所述安装包,并执行所述目标服务。The target device in the embodiment of the present application includes: a second acquisition module, used to acquire service definition information according to the target service input by the calling device; a third acquisition module, used to acquire the target service from the server according to the service definition information. The identification of the corresponding installation package; a determination module for searching whether the installation package corresponding to the target service exists in the target device according to the identification; and an execution module for finding the installation package in the target device. When, install the installation package and execute the target service.
本申请实施方式的一种包含计算机程序的非易失性计算机可读存储介质,当计算机程序被一个或多个处理器执行时,使得处理器实现本申请实施方式的服务调用方法的质量。服务调用方法包括:根据对调用设备的第一输入获取目标设备的标签及目标服务;根据所述标签从服务器中获取所述目标设备的地址;根据所述地址从至少一台待调设备中确认所述目标设备;及在所述目标设备上执行所述目标服务。An embodiment of the present application is a non-volatile computer-readable storage medium containing a computer program. When the computer program is executed by one or more processors, the processor realizes the quality of the service invocation method of the embodiment of the present application. The service calling method includes: obtaining the label and target service of the target device according to the first input to the calling device; obtaining the address of the target device from the server according to the label; and confirming from at least one device to be called according to the address. the target device; and executing the target service on the target device.
本申请实施方式的附加方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本申请的实践了解到。Additional aspects and advantages of embodiments of the application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the application.
附图说明Description of the drawings
本申请的上述和/或附加的方面和优点可以从结合下面附图对实施方式的描述中将变得明显和容易理解,其中:The above and/or additional aspects and advantages of the present application will become apparent and readily understood from the description of the embodiments in conjunction with the following drawings, in which:
图1是本申请某些实施方式的服务调用方法的流程示意图;Figure 1 is a schematic flow chart of a service invoking method in some embodiments of the present application;
图2是本申请某些实施方式的服务调用系统的结构示意图;Figure 2 is a schematic structural diagram of a service invocation system in some embodiments of the present application;
图3是本申请某些实施方式的服务调用系统的应用场景示意图;Figure 3 is a schematic diagram of the application scenario of the service invocation system in some embodiments of the present application;
图4是本申请某些实施方式的服务调用方法的流程示意图;Figure 4 is a schematic flowchart of a service invoking method in some embodiments of the present application;
图5是本申请某些实施方式的服务调用系统的应用场景示意图;;Figure 5 is a schematic diagram of the application scenario of the service invocation system of some embodiments of the present application;;
图6是本申请某些实施方式的服务调用系统的应用场景示意图;Figure 6 is a schematic diagram of the application scenario of the service invocation system in some embodiments of the present application;
图7是本申请某些实施方式的服务调用方法的流程示意图;Figure 7 is a schematic flowchart of a service invoking method in some embodiments of the present application;
图8是本申请某些实施方式的服务调用方法的流程示意图;Figure 8 is a schematic flowchart of a service invoking method in some embodiments of the present application;
图9是本申请某些实施方式的服务调用系统的应用场景示意图;Figure 9 is a schematic diagram of the application scenario of the service invocation system in some embodiments of the present application;
图10是本申请某些实施方式的服务调用方法的流程示意图;Figure 10 is a schematic flowchart of a service invoking method in some embodiments of the present application;
图11是本申请某些实施方式的服务调用方法的流程示意图;Figure 11 is a schematic flowchart of a service invoking method in some embodiments of the present application;
图12是本申请某些实施方式的服务调用方法的流程示意图;Figure 12 is a schematic flowchart of a service invoking method in some embodiments of the present application;
图13是本申请某些实施方式的服务调用方法的流程示意图;Figure 13 is a schematic flowchart of a service invoking method in some embodiments of the present application;
图14是本申请某些实施方式的服务调用方法的流程示意图;Figure 14 is a schematic flowchart of a service invoking method in some embodiments of the present application;
图15是本申请某些实施方式的服务调用系统的应用场景示意图;Figure 15 is a schematic diagram of the application scenario of the service invocation system in some embodiments of the present application;
图16是本申请某些实施方式的服务调用方法的流程示意图;Figure 16 is a schematic flowchart of a service invoking method in some embodiments of the present application;
图17是本申请某些实施方式的服务调用方法的流程示意图;Figure 17 is a schematic flowchart of a service invoking method in some embodiments of the present application;
图18是本申请某些实施方式的服务调用系统的应用场景示意图;Figure 18 is a schematic diagram of the application scenario of the service invocation system in some embodiments of the present application;
图19是本申请某些实施方式的服务调用方法的流程示意图;Figure 19 is a schematic flowchart of a service invoking method in some embodiments of the present application;
图20是本申请某些实施方式的服务调用方法的流程示意图;Figure 20 is a schematic flowchart of a service invoking method in some embodiments of the present application;
图21是本申请某些实施方式的调用设备的结构示意图;Figure 21 is a schematic structural diagram of a calling device according to certain embodiments of the present application;
图22是本申请某些实施方式的服务调用方法的流程示意图;Figure 22 is a schematic flowchart of a service invoking method in some embodiments of the present application;
图23是本申请某些实施方式的目标设备的结构示意图;Figure 23 is a schematic structural diagram of a target device according to certain embodiments of the present application;
图24是本申请某些实施方式的计算机可读存储介质与处理器的连接关系示意图。Figure 24 is a schematic diagram of the connection relationship between a computer-readable storage medium and a processor in some embodiments of the present application.
具体实施方式Detailed ways
下面详细描述本申请的实施方式,实施方式的示例在附图中示出,其中,相同或类似的标号自始至终表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施方式是示例性的,仅用于解释本申请的实施方式,而不能理解为对本申请的实施方式的限制。The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements with the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the embodiments of the present application and cannot be understood as limiting the embodiments of the present application.
本申请实施方式提供了一种服务调用方法、服务调用系统、调用设备、目标设备及非易失性计算机可读存储介质。The embodiment of the present application provides a service calling method, a service calling system, a calling device, a target device and a non-volatile computer-readable storage medium.
本申请实施方式的一种服务调用方法包括:根据对调用设备的第一输入获取目标设备的标签及目标服务;根据标签从服务器中获取目标设备的地址;根据地址从至少一台待调设备中确认目标设备;及在目标设备上执行目标服务。A service calling method in an embodiment of the present application includes: obtaining the label and target service of the target device according to the first input to the calling device; obtaining the address of the target device from the server according to the label; and obtaining the address of the target device from at least one device to be called according to the address. Identify the target device; and execute the target service on the target device.
其中,在目标设备上执行目标服务,包括:根据目标服务获取服务定义信息;根据服务定义信息从服务器中获取与目标服务对应的安装包的标识;根据标识查找目标设备是否存在与目标服务对应的安装包;及在目标设备中存在安装包时,安装安装包,并执行目标服务。Among them, executing the target service on the target device includes: obtaining service definition information according to the target service; obtaining the identification of the installation package corresponding to the target service from the server according to the service definition information; and searching whether the target device has an installation package corresponding to the target service according to the identification. Installation package; and when the installation package exists in the target device, install the installation package and execute the target service.
在目标设备上执行目标服务,还包括:在目标设备中不存在安装包时,从服务器中获取与目标服务对应的安装包;及安装安装包,并执行目标服务。Executing the target service on the target device also includes: obtaining the installation package corresponding to the target service from the server when the installation package does not exist in the target device; and installing the installation package and executing the target service.
其中,在目标设备上执行目标服务,还包括:在服务器中订阅目标服务;从服务器中获取与目标服务对应的安装包,包括:在服务器中的安装包更新后,从服务器中获取更新后的安装包;安装安装包,并执行目标服务,包括:安装更新后的安装包,并执行目标服务。Among them, executing the target service on the target device also includes: subscribing to the target service in the server; obtaining the installation package corresponding to the target service from the server, including: after the installation package in the server is updated, obtaining the updated installation package from the server. Installation package; install the installation package and execute the target service, including: install the updated installation package and execute the target service.
其中,在目标设备上执行目标服务,还包括:根据预设的保留策略,保留订阅和/或安装包。Among them, executing the target service on the target device also includes: retaining subscriptions and/or installation packages according to the preset retention policy.
其中,目标服务包括卸载服务和查找服务。Among them, the target services include uninstall service and search service.
其中,服务调用方法还包括:根据预设的卸载策略,从目标设备上卸载目标服务。The service calling method also includes: uninstalling the target service from the target device according to a preset uninstallation policy.
其中,第一输入包括语音输入;根据对调用设备的第一输入获取目标设备的标签及目标服务,包括:将语音输入转化为文字信息;获取预设的语义配置;及根据语义配置对文字信息解析,获取目标设备的标签和目标服务。Among them, the first input includes voice input; obtaining the label and target service of the target device according to the first input to the calling device includes: converting the voice input into text information; obtaining a preset semantic configuration; and converting the text information according to the semantic configuration. Parse and obtain the tags and target services of the target device.
其中,语义配置包括意图槽位、意图词典、意图语料及意图回复,意图槽位包括第一变量和第二变量,第一变量表征目标设备的标签,第二变量表征目标服务,意图词典包括第一变量和第二变量的同义词,意图语料包括预设句型;根据语义配置对文字信息解析,获取目标设备的标签和目标服务,包括:将文字信息与意图语料进行匹配;及在匹配成功后,获取意图槽位的变量值,以获取目标设备的标签和目标服务。Among them, the semantic configuration includes an intent slot, an intent dictionary, an intent corpus, and an intent reply. The intent slot includes a first variable and a second variable. The first variable represents the label of the target device, the second variable represents the target service, and the intent dictionary includes the third variable. Synonyms of the first variable and the second variable, the intention corpus includes preset sentence patterns; parsing the text information according to the semantic configuration, obtaining the label and target service of the target device, including: matching the text information with the intention corpus; and after the matching is successful , obtain the variable value of the intent slot to obtain the tag of the target device and the target service.
其中,服务调用方法还包括:在服务器中对目标服务进行注册。Among them, the service calling method also includes: registering the target service in the server.
其中,在服务器中对目标服务进行注册,包括:根据安装包上传请求,保存安装包并输出安装包的标识;接收注册服务定义请求,注册服务定义请求包含与标识关联的服务定义信息;及保存服务定义信息。Among them, registering the target service in the server includes: saving the installation package and outputting the identification of the installation package according to the installation package upload request; receiving a registration service definition request, which includes the service definition information associated with the identification; and saving Service definition information.
其中,服务调用方法还包括:对服务器中的目标服务进行更新。Among them, the service calling method also includes: updating the target service in the server.
其中,对服务器中的目标服务进行更新,包括:根据新的安装包上传请求,保存更新后的安装包并输出更新后的安装包的标识;接收更新服务定义请求,更新服务定义请求包含与更新后的安装包的标识关联的服务定义信息;及保存与更新后的安装包的标识关联的服务定义信息。Among them, updating the target service in the server includes: saving the updated installation package and outputting the identification of the updated installation package according to the new installation package upload request; receiving an update service definition request, and the update service definition request includes and updates service definition information associated with the identity of the updated installation package; and save service definition information associated with the identity of the updated installation package.
其中,根据标签从服务器中获取目标设备的地址,包括:在服务器确认目标设备与调用设备的账号是否关联;及在目标设备与调用设备的账号关联的情况下,获取目标设备的地址。Among them, obtaining the address of the target device from the server according to the tag includes: confirming on the server whether the target device is associated with the account of the calling device; and obtaining the address of the target device if the target device is associated with the account of the calling device.
本申请实施方式的一种服务调用系统包括调用设备、目标设备及服务器;调用设备用于:根据第一输入获取目标设备的标签及目标服务,根据标签从服务器中获取目标设备的地址,及根据地址从至少一台待调设备中确认目标设备;目标设备用于执行目标服务。A service calling system in an embodiment of the present application includes a calling device, a target device and a server; the calling device is used to: obtain the label and target service of the target device according to the first input, obtain the address of the target device from the server according to the label, and obtain the address of the target device from the server according to the label, and obtain the target device's address according to the first input. The address identifies the target device from at least one device to be deployed; the target device is used to perform the target service.
本申请实施方式的一种服务调用方法包括:根据对调用设备的第一输入获取目标设备的标签及目标服务;根据标签从服务器中获取目标设备的地址;及根据地址从至少一台待调设备中确认目标设备,以使目标设备执行目标服务。A service calling method in an embodiment of the present application includes: obtaining the label and target service of the target device according to the first input to the calling device; obtaining the address of the target device from the server according to the label; and obtaining the address of the target device from at least one device to be called according to the address. Confirm the target device in so that the target device performs the target service.
本申请实施方式的一种调用设备,包括:解析模块,用于根据第一输入获取目标设备的标签及目标服务;第一获取模块,用于根据标签从服务器中获取目标设备的地址;确认模块,用于根据地址从至少一台待调设备中确认目标设备;及调用模块,用于调用目标设备执行目标服务。A calling device according to the embodiment of the present application, including: a parsing module, used to obtain the label and target service of the target device according to the first input; a first acquisition module, used to obtain the address of the target device from the server according to the label; a confirmation module , used to confirm the target device from at least one device to be adjusted according to the address; and a calling module, used to call the target device to perform the target service.
本申请实施方式的一种服务调用方法,包括:根据调用设备输入的目标服务获取服务定义信息;根据服务定义信息从服务器中获取与目标服务对应的安装包的标识;A service calling method in an embodiment of the present application includes: obtaining service definition information according to the target service input by the calling device; obtaining the identification of the installation package corresponding to the target service from the server according to the service definition information;
根据标识查找目标设备是否存在与目标服务对应的安装包;及在目标设备中存在安装包时,安装安装包,并执行目标服务。Find whether the installation package corresponding to the target service exists in the target device according to the identification; and if the installation package exists in the target device, install the installation package and execute the target service.
本申请实施方式的一种目标设备,包括:第二获取模块,用于根据调用设备输入的目标服务获取服务定义信息;第三获取模块,用于根据服务定义信息从服务器中获取与目标服务对应的安装包的标识;确定模块,用于根据标识查找目标设备是否存在与目标服务对应的安装包;及执行模块,用于在目标设备中存在安装包时,安装安装包,并执行目标服务。A target device according to an embodiment of the present application includes: a second acquisition module, used to acquire service definition information according to the target service input by the calling device; and a third acquisition module, used to acquire the corresponding target service from the server according to the service definition information. The identification of the installation package; the determination module is used to find whether the installation package corresponding to the target service exists on the target device according to the identification; and the execution module is used to install the installation package and execute the target service when the installation package exists in the target device.
本申请实施方式的一种包含计算机程序的非易失性计算机可读存储介质,当计算机程序被一个或多个处理器执行时,使得处理器实现上述任意一项的服务调用方法。An embodiment of the present application is a non-volatile computer-readable storage medium containing a computer program. When the computer program is executed by one or more processors, it causes the processor to implement any of the above service invocation methods.
下面详细描述本申请的实施方式,实施方式的示例在附图中示出,其中,相同或类似的标号自始至终表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施方式是示例性的,仅用于解释本申请的实施方式,而不能理解为对本申请的实施方式的限制。The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements with the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the embodiments of the present application and cannot be understood as limiting the embodiments of the present application.
请参阅图1,本申请实施方式的服务调用方法包括以下步骤:Please refer to Figure 1. The service invoking method in the implementation of this application includes the following steps:
01:根据对调用设备10的第一输入获取目标设备30的标签及目标服务;01: Obtain the tag and target service of the target device 30 according to the first input to the calling device 10;
02:根据该标签从服务器中获取目标设备30的地址;02: Obtain the address of the target device 30 from the server according to the tag;
03:根据地址从至少一台待调设备中确认目标设备30;及03: Confirm the target device 30 from at least one device to be adjusted according to the address; and
04:在目标设备30上执行目标服务。04: Execute the target service on the target device 30.
请结合图2及图3,本申请实施方式提供一种服务调用系统100,服务调用方法可应用于服务调用系统100。服务调用系统100包括调用设备10、目标设备30及服务器。调用设备10用于:根据第一输入获取目标设备30的标签及目标服务,根据该标签从服务器中获取目标设备30的地址,及根据地址从至少一台待调设备中确认目标设备30。目标设备30用于执行目标服务。Please refer to Figure 2 and Figure 3. The embodiment of the present application provides a service invocation system 100. The service invocation method can be applied to the service invocation system 100. The service calling system 100 includes a calling device 10, a target device 30 and a server. The calling device 10 is configured to: obtain the label and target service of the target device 30 according to the first input, obtain the address of the target device 30 from the server according to the label, and confirm the target device 30 from at least one device to be adjusted according to the address. The target device 30 is used to execute target services.
其中,目标设备的30标签可包括目标设备30的名称、设备类型、识别信息等信息中的至少一项。例如目标设备30是智能手表,智能手表与调用设备10处于同一账号关联,在该关联的账号保存的设备列表中,该智能手表的名称为“我的手表”,设备类型为“XX型号智能手表”,识别信息为“编号XXXX”。即,在该关联的账号保存的设备列表中,可以根据名称“我的手表”、设备类型“XX型号智能手表”及识别信息“编号XXXX”中的至少一项信息唯一对应确定该智能手表,用于确定该智能手表的信息即为该智能手表的标签。相应地,目标设备的30标签可包括目标设备30的名称、设备类型、识别信息等信息中的至少一项,用于唯一确定对应的目标设备30。The tag 30 of the target device may include at least one of the name, device type, identification information and other information of the target device 30 . For example, the target device 30 is a smart watch, and the smart watch is associated with the same account as the calling device 10. In the device list saved in the associated account, the name of the smart watch is "My Watch" and the device type is "XX Model Smart Watch." ", the identification information is "No. XXXX". That is, in the device list saved by the associated account, the smart watch can be uniquely determined based on at least one piece of information in the name "my watch", device type "XX model smart watch" and identification information "number XXXX". The information used to identify the smart watch is the tag of the smart watch. Correspondingly, the tag 30 of the target device may include at least one of the name, device type, identification information and other information of the target device 30 , for uniquely determining the corresponding target device 30 .
在某些实施方式中,第一输入包括语音输入、文字输入、按键输入等,在此不作限制。对应地,调用设备10是具有能够接收第一输入的接口的电子设备。调用设备10为手机、平板电脑、笔记本电脑、台式电脑、智能手表、智能机器人等电子设备,在此不作限制。例如,第一输入为语音输入,调用设备10为设有语音识别模块11的手机。再例如,第一输入为文字输入,调用设备10为设有手写输入模块的平板电脑。在此不一一例举。In some embodiments, the first input includes voice input, text input, key input, etc., which are not limited here. Correspondingly, the calling device 10 is an electronic device having an interface capable of receiving the first input. The calling device 10 is an electronic device such as a mobile phone, a tablet computer, a laptop computer, a desktop computer, a smart watch, a smart robot, etc., and is not limited here. For example, the first input is voice input, and the calling device 10 is a mobile phone equipped with the voice recognition module 11 . For another example, the first input is text input, and the calling device 10 is a tablet computer equipped with a handwriting input module. No examples are given here.
第一输入用于控制目标设备30执行目标服务。目标设备30可包括手机、平板电脑、笔记本电脑、台式电脑、智能手表、智能机器人等电子设备,在此不作限制。目标服务可包括打开或关闭目标设备30上的指定应用、打开或关闭目标设备30上的指定功能等,在此不作限制。The first input is used to control the target device 30 to execute the target service. The target device 30 may include electronic devices such as mobile phones, tablet computers, laptops, desktop computers, smart watches, smart robots, etc., which are not limited here. The target service may include opening or closing a designated application on the target device 30, opening or closing a designated function on the target device 30, etc., which are not limited here.
目标设备30的标签用于从服务器获取目标设备30的地址。请参阅图3,在某些实施方式中,调用设备10和至少一个待调设备接入互联网,云端服务器20存储有调用设备10注册的账号信息,账号信息包括调用设备10关联的待调设备的标签。待调设备接入互联网后,待调设备的地址信息保存在云端服务器20,地址信息与待调设备的标签对应。在获取目标设备30的标签后,调用设备10将目标设备30的标签上传至云端服务器20,云端服务器20根据目标设备30的标签从多个与调用设备10关联的待调设备中确定目标设备30,并将目标设备30的标签对应的地址返回调用设备10。在需要调用目标设备30执行目标服务的情况下,调用设备10根据目标设备30的标签对应的地址信息发送调用目标设备30的请求。The tag of the target device 30 is used to obtain the address of the target device 30 from the server. Please refer to Figure 3. In some embodiments, the calling device 10 and at least one device to be adjusted are connected to the Internet. The cloud server 20 stores the account information registered by the calling device 10. The account information includes the name of the device to be adjusted associated with the calling device 10. Label. After the device to be adjusted is connected to the Internet, the address information of the device to be adjusted is stored in the cloud server 20, and the address information corresponds to the label of the device to be adjusted. After obtaining the tag of the target device 30, the calling device 10 uploads the tag of the target device 30 to the cloud server 20. The cloud server 20 determines the target device 30 from a plurality of devices to be adjusted associated with the calling device 10 based on the tag of the target device 30. , and returns the address corresponding to the tag of the target device 30 to the calling device 10 . When it is necessary to call the target device 30 to execute the target service, the calling device 10 sends a request to call the target device 30 according to the address information corresponding to the tag of the target device 30 .
在一个实施例中,调用设备10与待调设备通过订阅相同的服务进行关联。例如,调用设备10与待调设备均订阅“查找设备位置”服务,订阅“查找设备位置”服务的待调设备出现在“查找设备位置”服务对应的设备列表中,调用设备10可选择性地与设备列表中的待调设备进行关联。In one embodiment, the calling device 10 and the device to be called are associated by subscribing to the same service. For example, both the calling device 10 and the device to be adjusted subscribe to the "Find Device Location" service, and the device to be adjusted that subscribes to the "Find Device Location" service appears in the device list corresponding to the "Find Device Location" service. The calling device 10 can selectively Associate with the device to be adjusted in the device list.
请参阅图3,在一个实施例中,调用设备10为手机,待调设备包括手表1、手表2及机器人,目标设备30为手表,手机、手表1、手表2及机器人均接入互联网,第一输入为语音输入。用户对手机输入语音“帮我找到手表1位置”。手机根据该语音输入,确定目标设备30的标签为“手表1”,以及目标服务为“查找设备位置”。手机通过云端服务器20获取手表1的地址,将对手表1发送“查找设备位置”服务对应的调用请求,使手表执行“查找位置”服务。例如,手表1根据调用请求启动“查找设备位置”应用程序,“查找设备位置”应用程序通过手表1的扬声器播放声音“我在这里”,以执行“查找设备位置”服务。如此,在手表1距离用户较远而难以识别用户的输入语音的情况下,用户可通过对手机进行语音输入使手表1执行目标服务,以远程控制手表1执行目标服务。或者,在手表1不具有语音识别功能的情况下,可通过对手机进行语音输入使手表1执行目标服务,使用户能够通过语音控制没有语音输入接口的设备。Please refer to Figure 3. In one embodiment, the calling device 10 is a mobile phone. The devices to be called include watch 1, watch 2 and a robot. The target device 30 is a watch. The mobile phone, watch 1, watch 2 and robot are all connected to the Internet. One input is voice input. The user inputs the voice "Help me find the location of watch 1" into the mobile phone. Based on the voice input, the mobile phone determines that the label of the target device 30 is "Watch 1" and the target service is "Find Device Location". The mobile phone obtains the address of watch 1 through the cloud server 20 and sends a call request corresponding to the "find device location" service to watch 1, causing the watch to perform the "find location" service. For example, Watch 1 starts the "Find Device Location" application according to the call request, and the "Find Device Location" application plays the sound "I am here" through the speaker of Watch 1 to perform the "Find Device Location" service. In this way, when the watch 1 is far away from the user and it is difficult to recognize the user's input voice, the user can remotely control the watch 1 to perform the target service by making voice input to the mobile phone. Alternatively, when the watch 1 does not have a voice recognition function, the watch 1 can perform the target service through voice input to the mobile phone, so that the user can control the device without a voice input interface through voice.
类似地,在目标设备30不支持接收或难以接收第一输入的情况下,可以对调用设备10进行第一输入,通过调用设备10识别第一输入想要控制的目标设备30及对应的目标服务,调用目标设备30执行目标服务。Similarly, when the target device 30 does not support receiving the first input or is difficult to receive the first input, the first input can be made to the calling device 10, and the calling device 10 can identify the target device 30 that the first input wants to control and the corresponding target service. , calling the target device 30 to execute the target service.
综上,本申请实施方式的服务调用方法和服务调用系统100,能够对调用设备10进行第一输入,调用目标设备30执行目标服务,以在目标设备30难以接收或无法接收第一输入的情况下仍能够通过第一输入控制目标设备30,便于用户进行控制。In summary, the service invoking method and service invoking system 100 of the embodiment of the present application can make a first input to the invoking device 10 and call the target device 30 to execute the target service, so that when the target device 30 is difficult or unable to receive the first input, The target device 30 can still be controlled through the first input, which is convenient for the user to control.
请参阅图4,在某些实施方式中,第一输入包括语音输入。01:根据对调用设备10的第一输入获取目标设备30的标签及目标服务,包括:Referring to Figure 4, in some embodiments, the first input includes voice input. 01: Obtain the tag and target service of the target device 30 according to the first input to the calling device 10, including:
011:将语音输入转化为文字信息;011: Convert voice input into text information;
012:获取预设的语义配置;及012: Get the default semantic configuration; and
013:根据语义配置对文字信息解析,获取目标设备30的标签和目标服务。013: Parse the text information according to the semantic configuration and obtain the label and target service of the target device 30 .
请结合图2及图5,在某些实施方式中,调用设备10包括语音识别模块11及文字解析模块12。语音识别模块11用于执行011中的方法,文字解析模块12用于执行012及013中的方法。即,语音识别模块11用于将语音输入转化为文字信息。文字解析模块12用于获取预设的语义配置;及根据语义配置对文字信息解析,获取目标设备30的标签和目标服务。Please refer to FIG. 2 and FIG. 5 . In some embodiments, the calling device 10 includes a speech recognition module 11 and a text parsing module 12 . The speech recognition module 11 is used to perform the method in 011, and the text analysis module 12 is used to perform the methods in 012 and 013. That is, the speech recognition module 11 is used to convert speech input into text information. The text analysis module 12 is used to obtain the preset semantic configuration; and analyze the text information according to the semantic configuration to obtain the label and target service of the target device 30 .
在一些场景中,用户可能只是恰好语音提及了设备的标签和目标服务,但用户的语义并非想要请求目标设备30执行目标服务。调用设备10能够识别用户的语音,解析用户的语音输入是否为服务请求,即解析用户的语音输入的内容是否为请求目标设备30执行目标服务。若为服务请求,则获取服务请求对应的目标设备30的标签和目标服务。In some scenarios, the user may just mention the label of the device and the target service by voice, but the user's semantics does not intend to request the target device 30 to perform the target service. The calling device 10 can recognize the user's voice and analyze whether the user's voice input is a service request, that is, analyze whether the content of the user's voice input is a request for the target device 30 to perform the target service. If it is a service request, obtain the tag and target service of the target device 30 corresponding to the service request.
请参阅图2及图5,在某些实施方式中,调用设备10还包括设备管理模块13。文字解析模块12获取目标设备30的标签后,调用设备管理模块13根据目标设备30的标签从云端服务器20获取目标设备30的地址。在一个实施例中,设备管理模块13将云端服务器20返回的目标设备30的地址,和文字解析模块12获取的目标服务组装为服务调用URL(Uniform Resource Locator,URL),设备管理模块13通过该服务调用URL连接目标设备30的服务网关31,以调用目标设备30。Referring to FIG. 2 and FIG. 5 , in some embodiments, the calling device 10 further includes a device management module 13 . After obtaining the tag of the target device 30 , the text parsing module 12 calls the device management module 13 to obtain the address of the target device 30 from the cloud server 20 according to the tag of the target device 30 . In one embodiment, the device management module 13 assembles the address of the target device 30 returned by the cloud server 20 and the target service obtained by the text parsing module 12 into a service invocation URL (Uniform Resource Locator, URL). The device management module 13 uses the The service call URL connects to the service gateway 31 of the target device 30 to call the target device 30 .
请结合图6,在某些实施方式中,语义配置包括意图槽位、意图词典、意图语料及意图回复,意图槽位包括第一变量和第二变量,第一变量表征目标设备30的标签,第二变量表征目标服务,意图词典包括第一变量和第二变量的同义词,意图语料包括预设句型。意图回复包括文字信息与意图语料匹配成功时执行的操作。Please refer to Figure 6. In some embodiments, the semantic configuration includes an intent slot, an intent dictionary, an intent corpus, and an intent reply. The intent slot includes a first variable and a second variable. The first variable represents the label of the target device 30. The second variable represents the target service, the intent dictionary includes synonyms of the first variable and the second variable, and the intent corpus includes preset sentence patterns. Intent replies include operations performed when text information and intended corpus are successfully matched.
请结合图7,在某些实施方式中,013:根据语义配置对文字信息解析,获取目标设备30的标签和目标服务,包括:Please refer to Figure 7. In some implementations, 013: parse the text information according to the semantic configuration and obtain the label and target service of the target device 30, including:
0131:将文字信息与意图语料进行匹配;及0131: Match textual information with intended corpus; and
0132:在匹配成功后,获取意图槽位的变量值,以获取目标设备30的标签和目标服务。0132: After successful matching, obtain the variable value of the intent slot to obtain the tag and target service of the target device 30 .
请结合图2及图5,在某些实施方式中,文字解析模块12还用于执行0131及0132中的方法。即,文字解析模块12还用于将文字信息与意图语料进行匹配;及在匹配成功后,获取意图槽位的变量值,以获取目标设备30的标签和目标服务。Please refer to Figure 2 and Figure 5. In some embodiments, the text parsing module 12 is also used to execute the methods in 0131 and 0132. That is, the text parsing module 12 is also used to match the text information with the intention corpus; and after successful matching, obtain the variable value of the intention slot to obtain the label and target service of the target device 30 .
请参阅图6,在某些实施方式中,意图词典包含主词及该主词的同义词。意图槽位的一个变量对应一个意图词典。意图语料预设为由语气前缀、意图词典中的主词或该主词的同义词、及语气后缀组成的语句。其中,语气前缀在意图词典中的主词或该主词的同义词之前,语气后缀在意图词典中的主词或该主词的同义词之前。在将文字信息与意图语料进行匹配匹配时,可以是文字信息与语气前缀、意图词典中的主词或该主词的同义词、及语气后缀均匹配才确定文字信息与意图语料匹配成功;也可以是文字信息与意图词典中的组成或该主词的同义词匹配,且文字信息与语气前缀语气后缀中的一个匹配时,即可确定文字信息与意图语料匹配成功。可根据应用场景设置,在此不作限制。Referring to Figure 6, in some embodiments, the intent dictionary includes a subject and synonyms of the subject. A variable in the intent slot corresponds to an intent dictionary. By default, the intent corpus is a sentence composed of a modal prefix, a subject in the intent dictionary or a synonym of the subject, and a modal suffix. Among them, the modal prefix is before the subject or the synonym of the subject in the intention dictionary, and the modal suffix is before the subject or the synonym of the subject in the intention dictionary. When matching the text information with the intended corpus, the text information can be successfully matched with the mood prefix, the subject in the intention dictionary or a synonym of the subject, and the mood suffix to determine whether the text information and the intention corpus are successfully matched; it can also be text When the information matches a component in the intent dictionary or a synonym of the subject, and the text information matches one of the modal prefixes and modal suffixes, it can be determined that the text information matches the intended corpus successfully. It can be set according to the application scenario and is not limited here.
在一个实施例中,意图槽位包括第一变量和第二变量,第一变量表征目标设备30的标签,第二变量表征目标服务。意图词典包括第一词典和第二词典,第一词典包括设备标签及设备标签的同义词,第二词典包括服务标签及服务标签的同义词。第一变量对应第一词典,第二变量对应第二词典。In one embodiment, the intent slot includes a first variable and a second variable, the first variable represents the label of the target device 30 , and the second variable represents the target service. The intent dictionary includes a first dictionary and a second dictionary. The first dictionary includes device tags and synonyms of device tags. The second dictionary includes service tags and synonyms of service tags. The first variable corresponds to the first dictionary, and the second variable corresponds to the second dictionary.
例如,第一词典的主词包括“手表”,第一词典中主词“手表”对应的同义词包括“腕表”、“电子表”、“机械表”。第二词典的主词包括“寻找”,第二词典中主词“查找”对应的同义词包括“寻找”、“找到”、“搜寻”。预设的语气前缀包括“请”、“帮我”、“帮忙”。预设的语气后缀包括“好吗”、“可以吗”、“行吗”。文字信息为“请帮我找到手表1的位置”,将该文字信息与意图语料进行匹配,该文字信息中,“请”、“帮我”能够与预设的语气前缀匹配,“找到”能够与第二词典匹配,“手表”能够与第一词典匹配,则能够确定该文字信息与意图语料匹配成功。在匹配成功后,根据与第一词典的主词对应的第一变量“手表”获取目标设备30的标签:“手表1”,根据与第二词典的主词对应的第二变量“查找”获取目标服务:“查找”服务。For example, the subject of the first dictionary includes "watch", and the synonyms corresponding to the subject "watch" in the first dictionary include "wrist watch", "electronic watch", and "mechanical watch". The main word of the second dictionary includes "search", and the synonyms corresponding to the main word "find" in the second dictionary include "search", "find", and "search". The default tone prefixes include "please", "help me", and "help". The default mood suffixes include "ok", "can you", and "ok". The text message is "Please help me find the location of watch 1". Match the text message with the intended corpus. In the text message, "please" and "help me" can match the preset tone prefixes, and "find" can If it matches the second dictionary and "watch" can match the first dictionary, it can be determined that the text information and the intended corpus are successfully matched. After the matching is successful, the label of the target device 30: "Watch 1" is obtained according to the first variable "watch" corresponding to the main word of the first dictionary, and the target service is obtained according to the second variable "search" corresponding to the main word of the second dictionary. : "Find" service.
再例如,第一词典的主词还包括“电视”及“音响”,第一词典中主词“电视”对应的同义词包括“彩电”、“TV”,主词“音响”对应的同义词包括“扩音器”、“音乐播放器”。第二词典的主词还包括“启动”,第二词典中主词“启动”对应的同义词包括“开机”、“开启”、“打开”。文字信息为“打开电视和音响好吗?”,将该文字信息与意图语料进行匹配,该文字信息中,“打开”能够与第二词典匹配,“电视”和“音响”能够与第一词典匹配,“好吗”能够与语气后缀匹配,则能够确定该文字信息与意图语料匹配成功。在匹配成功后,根据与第一词典的主词对应的第一变量“电视”和“音响”获取目标设备30的标签:“电视”和“音响”,根据与第二词典的主词对应的第二变量“启动”获取目标服务:“启动”服务。在此情况下,目标设备30包括电视和音响两者,最终在电视和音响上均会执行“启动”服务。For another example, the subjects of the first dictionary also include "television" and "audio". The synonyms corresponding to the subject "television" in the first dictionary include "color TV" and "TV", and the synonyms corresponding to the subject "audio" include "loudspeaker". ","music player". The main word of the second dictionary also includes "start", and the synonyms corresponding to the main word "start" in the second dictionary include "turn on", "turn on" and "open". The text information is "Will you turn on the TV and stereo?". Match the text information with the intended corpus. In the text information, "turn on" can be matched with the second dictionary, and "TV" and "stereo" can be matched with the first dictionary. Matching, "How about" can match the mood suffix, then it can be determined that the text information and the intended corpus are successfully matched. After the matching is successful, the tags of the target device 30 are obtained: "TV" and "Audio" according to the first variables "TV" and "Audio" corresponding to the main words of the first dictionary, and according to the second variables "TV" and "Audio" corresponding to the main words of the second dictionary. Variable "start" gets the target service: "start" service. In this case, the target device 30 includes both a television and a stereo, and the "start" service will eventually be executed on both the television and the stereo.
意图回复包括文字信息与意图语料匹配成功时执行的操作。请结合图5,在一个实施例中,预设的意图回复为:在文字信息与意图语料匹配成功时,根据目标设备30的地址从至少一台待调设备中调用目标设备30。例如,在文字信息与意图语料匹配成功时,文字解析模块12调用设备10管理模块向目标设备30发送调用请求。Intent replies include operations performed when text information and intended corpus are successfully matched. Referring to FIG. 5 , in one embodiment, the preset intention reply is: when the text information and the intention corpus are successfully matched, the target device 30 is called from at least one device to be adjusted according to the address of the target device 30 . For example, when the text information successfully matches the intended corpus, the text parsing module 12 calls the device 10 management module to send a calling request to the target device 30 .
在某些实施方式中,02:根据标签从服务器中获取目标设备30的地址,包括:In some implementations, 02: Obtain the address of the target device 30 from the server according to the tag, including:
021:在服务器确认目标设备与调用设备的账号是否关联;及021: Confirm on the server whether the target device is associated with the account of the calling device; and
022:在目标设备与调用设备的账号关联的情况下,获取目标设备的地址。022: Obtain the address of the target device when the target device is associated with the account of the calling device.
请结合图2,在某些实施方式中,调用设备10还用于执行021及022中的方法。即,调用设备10还用于在服务器确认目标设备与调用设备的账号是否关联;及在目标设备与调用设备的账号关联的情况下,获取目标设备的地址。Please refer to Figure 2. In some embodiments, the calling device 10 is also used to execute the methods in 021 and 022. That is, the calling device 10 is also used to confirm on the server whether the target device is associated with the account of the calling device; and if the target device is associated with the account of the calling device, obtain the address of the target device.
账号可以手机号、调用设备的ID、服务对应的注册账号等,在此不作限制。在目标设备与调用设备的账号关联的情况下,获取目标设备的地址,能够确保目标设备被同一关联账号下的调用设备调用,确保进行调用的调用设备是受信任的设备,以避免存在安全隐患的设备非法对目标设备进行调用。The account can be a mobile phone number, the ID of the calling device, the registered account corresponding to the service, etc. There are no restrictions here. When the target device is associated with the account of the calling device, obtaining the address of the target device can ensure that the target device is called by the calling device under the same associated account, and ensure that the calling device is a trusted device to avoid security risks. The device illegally makes calls to the target device.
请参阅图8,在某些实施方式中,04:在目标设备30上执行目标服务,包括:Referring to Figure 8, in some embodiments, 04: executing the target service on the target device 30, including:
041:根据目标服务获取服务定义信息;041: Obtain service definition information based on the target service;
042:根据服务定义信息从服务器中获取与目标服务对应的安装包的标识;042: Obtain the identification of the installation package corresponding to the target service from the server based on the service definition information;
043:根据标识查找目标设备30是否存在与目标服务对应的安装包;及043: Find whether the target device 30 has an installation package corresponding to the target service according to the identification; and
044:在目标设备30中存在安装包时,安装该安装包,并执行目标服务。044: When the installation package exists in the target device 30, install the installation package and execute the target service.
请结合图2及图9,在某些实施方式中,目标设备30包括服务管理模块32及服务生命周期管理模块33。服务管理模块32用于执行041、042及043中的方法,服务生命周期管理模块33用于执行044中的方法。即,服务管理模块32用于根据目标服务获取服务定义信息;根据服务定义信息从服务器中获取与目标服务对应的安装包的标识;及根据标识查找目标设备30是否存在与目标服务对应的安装包。服务管理模块32用于在目标设备30中存在安装包时,安装该安装包,并执行目标服务。Please refer to FIG. 2 and FIG. 9 . In some embodiments, the target device 30 includes a service management module 32 and a service life cycle management module 33 . The service management module 32 is used to execute the methods in 041, 042 and 043, and the service life cycle management module 33 is used to execute the method in 044. That is, the service management module 32 is used to obtain service definition information according to the target service; obtain the identification of the installation package corresponding to the target service from the server according to the service definition information; and search whether the installation package corresponding to the target service exists in the target device 30 according to the identification. . The service management module 32 is used to install the installation package when there is an installation package in the target device 30 and execute the target service.
在某些实施方式中,为了减少目标设备30的存储空间占用,目标服务以安装包的形式存储于目标设备30本地。在调用设备10向目标设备30发送调用请求后,目标设备30根据调用请求获取目标服务,安装目标服务对应的安装包,并执行目标服务,在完成执行目标服务后卸载目标服务。例如目标服务为“查找”服务,目标设备30执行“查找”服务会启动“查找”程序,由“查找”程序调用目标设备30的扬声器发出“我在这里”的声音。通常,“查找”服务的使用频率较低,为了避免“查找”程序占用目标设备30的空间,目标设备30不保存“查找”程序,仅在需要执行“查找”服务时通过“查找”服务对应的安装包安装“查找”程序。In some embodiments, in order to reduce the storage space occupied by the target device 30, the target service is stored locally on the target device 30 in the form of an installation package. After the calling device 10 sends a calling request to the target device 30, the target device 30 obtains the target service according to the calling request, installs the installation package corresponding to the target service, executes the target service, and uninstalls the target service after completing the execution of the target service. For example, the target service is a "find" service. When the target device 30 executes the "find" service, the "find" program will be started. The "find" program calls the speaker of the target device 30 to emit the sound "I am here". Generally, the "find" service is used less frequently. In order to prevent the "find" program from occupying the space of the target device 30, the target device 30 does not save the "find" program and only responds through the "find" service when it is necessary to execute the "find" service. The installation package installs the "find" program.
在某些实施方式中,服务定义信息包括服务标签、服务ID、服务调用协议、服务入参、及服务出参中的至少一项。根据服务定义信息,能够确定与服务对应的安装包。例如,对于一项服务,该服务的服务ID存在唯一对应的安装包标识,该安装包标识对应的安装包是该服务对应的安装包,例如安装包为执行该服务的程序的安装包。In some implementations, the service definition information includes at least one of service tag, service ID, service invocation protocol, service input parameters, and service output parameters. According to the service definition information, the installation package corresponding to the service can be determined. For example, for a service, the service ID of the service has a unique corresponding installation package identifier, and the installation package corresponding to the installation package identifier is the installation package corresponding to the service. For example, the installation package is the installation package of the program that executes the service.
请参阅图9,在一个实施例中,云端服务器20存储有已经注册的多个服务对应的服务定义信息。调用设备10向目标设备30发送的调用请求包括需要在目标设备30执行的目标服务。目标设备30请求调用云端服务器20从多个服务定义信息中查找目标服务对应的服务定义信息。Referring to FIG. 9 , in one embodiment, the cloud server 20 stores service definition information corresponding to multiple registered services. The calling request sent by the calling device 10 to the target device 30 includes the target service that needs to be executed on the target device 30 . The target device 30 requests to call the cloud server 20 to search for service definition information corresponding to the target service from multiple service definition information.
在又一个实施例中,调用设备10向目标设备30发送的调用请求包括服务定义信息。例如,调用设备10的设备管理模块13能够执行041中的方法:根据目标服务获取服务定义信息。具体地,调用设备10的设备管理模块13请求调用云端服务器20从多个服务定义信息中查找目标服务对应的服务定义信息。目标设备30根据调用请求获取服务定义信息,在对服务定义信息做基础性校验后执行042中的方法:根据服务定义信息从服务器中获取与目标服务对应的安装包的标识。其中,基础性校验包括校验服务ID、服务调用协议、服务入参、或服务出参的完整性、合法性等,在此不一一列举。In yet another embodiment, the calling request sent by the calling device 10 to the target device 30 includes service definition information. For example, the device management module 13 of the calling device 10 can execute the method in step 041: obtain service definition information according to the target service. Specifically, the device management module 13 of the calling device 10 requests the calling cloud server 20 to search for the service definition information corresponding to the target service from a plurality of service definition information. The target device 30 obtains the service definition information according to the call request, and after performing basic verification on the service definition information, executes the method in 042: obtain the identification of the installation package corresponding to the target service from the server according to the service definition information. Among them, basic verification includes verifying the integrity and legality of service ID, service invocation protocol, service input parameters, or service output parameters, etc., which are not listed here.
请参阅图2及图9,在某些实施方式中,云端服务器20包括服务网关21、服务包管理模块22及服务定义管理模块23。云端服务器20的服务网关21能够将获取服务定义信息的请求转发至服务定义管理模块23。服务定义管理模块23根据该获取服务定义信息的请求,查询保存在服务定义管理模块23中的该请求对应的服务定义信息,并将服务定义信息返回服务网关21。服务网关21将服务定义信息返回发送获取服务定义信息的请求的设备,例如在目标设备30向服务网关21发送该请求时,服务网关21将服务定义信息返回目标设备30;在调用设备10向服务网关21发送该请求时,服务网关21将服务定义信息返回调用设备10。Referring to FIG. 2 and FIG. 9 , in some embodiments, the cloud server 20 includes a service gateway 21 , a service package management module 22 and a service definition management module 23 . The service gateway 21 of the cloud server 20 can forward the request for obtaining service definition information to the service definition management module 23 . According to the request to obtain service definition information, the service definition management module 23 queries the service definition information corresponding to the request stored in the service definition management module 23, and returns the service definition information to the service gateway 21. The service gateway 21 returns the service definition information to the device that sent the request to obtain the service definition information. For example, when the target device 30 sends the request to the service gateway 21, the service gateway 21 returns the service definition information to the target device 30; When the gateway 21 sends the request, the service gateway 21 returns the service definition information to the calling device 10 .
服务包管理模块22存储有一项或多项服务对应的安装包,每个安装包具有唯一对应的安装包标识。服务包管理模块22能够根据服务定义信息确定目标服务对应的安装包,例如根据目标服务对应的服务ID确定目标服务对应的安装包。The service package management module 22 stores installation packages corresponding to one or more services, and each installation package has a unique corresponding installation package identification. The service package management module 22 can determine the installation package corresponding to the target service according to the service definition information, for example, determine the installation package corresponding to the target service according to the service ID corresponding to the target service.
在一个实施例中,目标设备30向服务网关21发送获取服务定义信息的请求时,服务网关21将获取服务定义信息的请求转发至服务定义管理模块23,以获取服务定义信息;在服务网关21获取服务定义信息后,根据服务定义信息向服务包管理模块22发送获取标识的请求,以从服务包管理模块22获取与目标服务对应的安装包的标识;最后服务网关21将服务定义信息及与目标服务对应的安装包的标识一并返回至目标设备30。In one embodiment, when the target device 30 sends a request to obtain service definition information to the service gateway 21, the service gateway 21 forwards the request to obtain the service definition information to the service definition management module 23 to obtain the service definition information; in the service gateway 21 After obtaining the service definition information, a request for obtaining the identification is sent to the service package management module 22 according to the service definition information, so as to obtain the identification of the installation package corresponding to the target service from the service package management module 22; finally, the service gateway 21 combines the service definition information with The identification of the installation package corresponding to the target service is also returned to the target device 30 .
在又一个实施例中,目标设备30根据服务定义信息向服务网关21发送获取标识的请求,服务网关21将获取标识的请求转发至服务包管理模块22,通过服务包范例模块查询获取标识的请求中包含的服务定义信息对应的安装包,将服务定义信息对应的安装包的标识返回服务网关21,再由服务网关21将该标识返回目标设备30。In another embodiment, the target device 30 sends a request to obtain the identity to the service gateway 21 according to the service definition information. The service gateway 21 forwards the request to obtain the identity to the service package management module 22 and queries the request to obtain the identity through the service package example module. The installation package corresponding to the service definition information contained in the service gateway 21 returns the identification of the installation package corresponding to the service definition information, and then the service gateway 21 returns the identification to the target device 30 .
目标设备30根据与目标服务对应的安装包的标识查找目标设备30本地是否存在与目标服务对应的安装包,在在目标设备30中存在安装包时,安装该安装包,并执行目标服务。The target device 30 searches whether the installation package corresponding to the target service exists locally on the target device 30 according to the identification of the installation package corresponding to the target service. If the installation package exists in the target device 30, installs the installation package and executes the target service.
请结合图10,在某些实施方式中,04:在目标设备30上执行目标服务,包括:Please refer to Figure 10, in some implementations, 04: Execute the target service on the target device 30, including:
045:在目标设备30中不存在安装包时,从服务器中获取与目标服务对应的安装包;及045: When the installation package does not exist in the target device 30, obtain the installation package corresponding to the target service from the server; and
046:安装安装包,并执行目标服务。046: Install the installation package and execute the target service.
请结合图2及图9,在某些实施方式中,服务管理模块32还用于执行045中的方法,服务生命周期管理模块33还用于执行046中的方法。即,服务管理模块32用于在目标设备30中不存在安装包时,从服务器中获取与目标服务对应的安装包。Please combine Figure 2 and Figure 9. In some embodiments, the service management module 32 is also used to execute the method in 045, and the service life cycle management module 33 is also used to execute the method in 046. That is, the service management module 32 is used to obtain the installation package corresponding to the target service from the server when the installation package does not exist in the target device 30 .
在目标设备30中不存在安装包时,服务管理模块32向云端服务器20发送安装包获取请求,安装包获取请求包括目标服务对应的安装包的标识。服务网关21将安装包获取请求转发至服务包管理模块22,服务包管理模块22根据安装包的标识查询对应的安装包文件,将安装包文件返回服务网关21,通过服务网关21将安装包文件传输至目标设备30。或者服务包管理模块22将安装包的标识查询对应的安装包文件的地址返回服务网关21,服务网关21将安装包文件的地址返回目标设备30,目标设备30根据安装包文件的地址下载安装包,以安装该安装包并执行目标服务。When there is no installation package in the target device 30 , the service management module 32 sends an installation package acquisition request to the cloud server 20 , and the installation package acquisition request includes the identification of the installation package corresponding to the target service. The service gateway 21 forwards the installation package acquisition request to the service package management module 22. The service package management module 22 queries the corresponding installation package file according to the identification of the installation package, returns the installation package file to the service gateway 21, and sends the installation package file through the service gateway 21. transmitted to target device 30. Or the service package management module 22 queries the identification of the installation package and returns the address of the corresponding installation package file to the service gateway 21. The service gateway 21 returns the address of the installation package file to the target device 30. The target device 30 downloads the installation package according to the address of the installation package file. , to install the installation package and execute the target service.
请结合图11,在某些实施方式中,04:在目标设备30上执行目标服务,还包括:Please refer to Figure 11. In some implementations, 04: executing the target service on the target device 30 also includes:
047:在服务器中订阅目标服务;047: Subscribe to the target service in the server;
045:从服务器中获取与目标服务对应的安装包,包括:045: Obtain the installation package corresponding to the target service from the server, including:
0451:在服务器中的安装包更新后,从服务器中获取更新后的安装包;0451: After the installation package in the server is updated, obtain the updated installation package from the server;
046:安装该安装包,并执行目标服务,包括:046: Install the installation package and execute the target services, including:
0461:安装更新后的安装包,并执行目标服务。0461: Install the updated installation package and execute the target service.
请结合图2及图9,在某些实施方式中,服务管理模块32还用于执行047及0451中的方法,服务生命周期管理模块33还用于执行0461中的方法。即,服务管理模块32用于在服务器中订阅目标服务;及在服务器中的安装包更新后,从服务器中获取更新后的安装包。服务生命周期管理模块33还用于安装更新后的安装包,并执行目标服务。Please combine Figure 2 and Figure 9. In some embodiments, the service management module 32 is also used to execute the methods in 047 and 0451, and the service life cycle management module 33 is also used to execute the method in 0461. That is, the service management module 32 is used to subscribe to the target service in the server; and after the installation package in the server is updated, obtain the updated installation package from the server. The service life cycle management module 33 is also used to install the updated installation package and execute the target service.
在某些实施方式中,目标设备30订阅在云端服务器20中订阅目标服务,以确保在需要执行目标服务时,能够从云端服务器20获取目标服务最新的安装包。在某些实施方式中,云端服务器20还包括服务订阅管理模块24。在目标设备30未订阅目标服务的情况下,服务网关21收到目标设备30的安装包获取请求后,将安装包获取请求转发至服务包管理模块22以获取最新的安装包,并且拉起服务订阅管理模块24增加与目标设备30的订阅关系,使目标设备30订阅目标服务。In some embodiments, the target device 30 subscribes to the target service in the cloud server 20 to ensure that the latest installation package of the target service can be obtained from the cloud server 20 when the target service needs to be executed. In some embodiments, the cloud server 20 also includes a service subscription management module 24. When the target device 30 does not subscribe to the target service, after receiving the installation package acquisition request from the target device 30 , the service gateway 21 forwards the installation package acquisition request to the service package management module 22 to obtain the latest installation package, and launches the service. The subscription management module 24 adds a subscription relationship with the target device 30 so that the target device 30 subscribes to the target service.
在某些实施方式中,在目标设备30已订阅目标服务的情况下,在服务器中目标服务的安装包更新后,服务包管理模块22拉起服务订阅管理模块24进行安装包同步处理,服务订阅管理模块24向已订阅目标服务的目标设备30发送安装包同步请求,安装包同步请求包括更新后的安装包的信息,例如更新后的安装包文件的地址信息,目标设备30根据更新后的安装包的信息从服务器中下载更新后的安装包。In some embodiments, when the target device 30 has subscribed to the target service, after the installation package of the target service in the server is updated, the service package management module 22 pulls up the service subscription management module 24 to perform installation package synchronization processing. The service subscription The management module 24 sends an installation package synchronization request to the target device 30 that has subscribed to the target service. The installation package synchronization request includes updated installation package information, such as the address information of the updated installation package file. The target device 30 performs the installation package synchronization request according to the updated installation package. Package information Download the updated installation package from the server.
请结合图12,在某些实施方式中,服务调用方法还包括:Please refer to Figure 12. In some implementations, the service invocation method also includes:
06:根据预设的保留策略,保留订阅和/或安装包。06: Retain subscriptions and/or installation packages according to the preset retention policy.
请结合图2及图9,在某些实施方式中,服务生命周期管理模块33还用于执行06中的方法。即,服务生命周期管理模块33还用于根据预设的保留策略,保留订阅和/或安装包。Please combine Figure 2 and Figure 9. In some embodiments, the service life cycle management module 33 is also used to execute the method in 06. That is, the service life cycle management module 33 is also used to retain subscriptions and/or installation packages according to a preset retention policy.
在某些实施方式中,为了减少目标设备30的存储空间占用,根据预设保留策略选择是否保留安装包。例如,预设的保留策略设置为:检测目标服务的使用频率;在目标服务使用频率较高的情况下,保留安装包,使目标设备30能够及时安装安装包,并执行目标服务;在目标服务使用频率较低的情况下,删除安装包,在下次目标设备30被调用时,目标设备30重新从云端服务器20获取目标服务的安装包。In some embodiments, in order to reduce the storage space occupied by the target device 30, whether to retain the installation package is selected according to a preset retention policy. For example, the preset retention policy is set to: detect the frequency of use of the target service; when the frequency of use of the target service is high, retain the installation package so that the target device 30 can install the installation package in time and execute the target service; when the target service is used When the frequency of use is low, the installation package is deleted, and the next time the target device 30 is called, the target device 30 re-obtains the installation package of the target service from the cloud server 20 .
类似地,在某些实施方式中,在目标设备30受调用的频率较高的情况下,或者在目标服务的更新频率较高的情况下,保留目标设备30与目标服务的订阅关系,以减少后续调用目标设备30的链路,提高响应速度;在目标设备30受调用的频率较低的情况下,取消目标设备30与目标服务的订阅关系,避免目标设备30在受调用的频率较低的情况下仍然频繁更新安装包。Similarly, in some embodiments, when the target device 30 is called more frequently, or when the target service is updated more frequently, the subscription relationship between the target device 30 and the target service is retained to reduce Subsequent calls to the link of the target device 30 improve the response speed; when the target device 30 is called less frequently, cancel the subscription relationship between the target device 30 and the target service to avoid the target device 30 being called less frequently. In this case, the installation package is still frequently updated.
请参阅图13,在某些实施方式中,服务调用方法还包括:Please refer to Figure 13. In some implementations, the service invocation method also includes:
07:根据预设的卸载策略,从目标设备30上卸载目标服务。07: Uninstall the target service from the target device 30 according to the preset uninstallation policy.
请结合图2及图9,在某些实施方式中,服务生命周期管理模块33还用于执行07中的方法。即,服务生命周期管理模块33还用于根据预设的卸载策略,从目标设备30上卸载目标服务。Please combine Figure 2 and Figure 9. In some embodiments, the service life cycle management module 33 is also used to execute the method in 07. That is, the service life cycle management module 33 is also used to uninstall the target service from the target device 30 according to the preset uninstall policy.
在某些实施方式中,预设的卸载策略设置为:在目标服务执行完预设时长后,从目标设备30上卸载目标服务。例如,预设时长为即时卸载,则在目标服务执行完成后立即卸载目标服务。再例如,预设时长为2小时,则在目标服务执行完成后2小时内没有再次被调用执行,则卸载目标服务。如此,能够节省目标设备30的存储空间占用。In some implementations, the preset uninstallation policy is set to: uninstall the target service from the target device 30 after the target service completes execution for a preset period of time. For example, if the default duration is immediate uninstallation, the target service will be uninstalled immediately after the execution of the target service is completed. For another example, if the default duration is 2 hours, if the target service is not called for execution again within 2 hours after completion, the target service will be uninstalled. In this way, the storage space occupied by the target device 30 can be saved.
请参阅图2及图3,在某些实施方式中,目标服务包括卸载服务,在目标设备30执行卸载服务能够将目标设备30本地的其他服务卸载,例如将执行完成的其他目标服务卸载。Referring to FIG. 2 and FIG. 3 , in some embodiments, the target service includes an uninstall service. Executing the uninstall service on the target device 30 can uninstall other local services on the target device 30 , such as uninstalling other target services that have been completed.
例如,目标服务包括卸载服务和查找服务。在一个应用场景中,目标设备30为手表1,手表1已经完成查找服务的执行,用户对调用设备10输入语音:“帮我卸载手表1的查找程序”。请结合图1,调用设备10根据用户的语音输入执行01、02、03中的服务调用方法,即,调用设备10根据第一输入 获取目标设备30的标签及目标服务、根据标签从服务器中获取目标设备30的地址、及根据地址从至少一台待调设备中确认目标设备30。目标设备30执行04中的服务调用方法,即,目标设备30执行目标服务。其中,调用设备10根据获取的目标设备30的标签为“手表1”,目标服务为“卸载”服务,具体为“卸载手表1的查找程序”。调用设备10将手表1的地址及“卸载”服务的参数封装为调用URL,对手表1发送卸载服务的调用请求。手表1根据卸载服务的调用请求执行“卸载”服务,将本地的“查找”程序卸载。For example, target services include uninstall service and lookup service. In one application scenario, the target device 30 is watch 1, watch 1 has completed the execution of the search service, and the user inputs a voice message to the calling device 10: "Help me uninstall the search program of watch 1." Please refer to Figure 1, the calling device 10 executes the service calling methods in 01, 02, and 03 according to the user's voice input, that is, the calling device 10 obtains the label and target service of the target device 30 according to the first input, and obtains it from the server according to the label. The address of the target device 30, and confirming the target device 30 from at least one device to be adjusted according to the address. The target device 30 executes the service invoking method in 04, that is, the target device 30 executes the target service. Among them, the label of the target device 30 obtained by the calling device 10 is "watch 1", and the target service is the "uninstall" service, specifically "uninstall the search program of watch 1". The calling device 10 encapsulates the address of the watch 1 and the parameters of the "uninstall" service into a calling URL, and sends a calling request to the watch 1 to uninstall the service. Watch 1 executes the "uninstall" service according to the call request of the uninstall service and uninstalls the local "find" program.
请参阅图14,在某些实施方式中,服务调用方法还包括:Please refer to Figure 14. In some implementations, the service invocation method also includes:
08:在服务器中对目标服务进行注册。08: Register the target service in the server.
请结合图2及图15,在某些实施方式中,云端服务器20用于执行08中的方法。即,云端服务器20用于对目标服务进行注册。Please combine Figure 2 and Figure 15. In some implementations, the cloud server 20 is used to execute the method in 08. That is, the cloud server 20 is used to register the target service.
请参阅图15,在开发人员完成某项服务的开放后,在云端服务器20中注册该服务,以在调用设备10调用目标设备30执行该服务时,目标设备30能够从云端服务器20获取该服务的安装包,以在目标设备30本地安装并执行该服务。在某些实施方式中,开发人员将已注册的服务的标签加入意图词典,使调用设备10能够根据意图词典进行文字信息解析,将文字信息中的服务标签与意图词典中的已注册的服务的标签进行匹配,以获取目标服务。Referring to Figure 15, after the developer completes the opening of a certain service, the service is registered in the cloud server 20, so that when the calling device 10 calls the target device 30 to execute the service, the target device 30 can obtain the service from the cloud server 20 The installation package to install and execute the service locally on the target device 30. In some embodiments, developers add the labels of registered services to the intent dictionary, so that the calling device 10 can parse text information according to the intent dictionary, and compare the service labels in the text information with the registered services in the intent dictionary. Tags are matched to obtain the target service.
请参阅图15,在某些实施方式中,开发人员对目标服务进行注册,包括将目标服务的安装包上传至云端服务器20,及将目标服务的服务定义信息上传至云端服务器20。请结合图16,在某些实施方式中,08:在服务器中对目标服务进行注册,包括:Referring to Figure 15, in some implementations, the developer registers the target service, including uploading the installation package of the target service to the cloud server 20, and uploading the service definition information of the target service to the cloud server 20. Please refer to Figure 16. In some implementations, 08: Register the target service in the server, including:
081:根据安装包上传请求,保存安装包并输出安装包的标识;081: According to the installation package upload request, save the installation package and output the identification of the installation package;
082:接收注册服务定义请求,注册服务定义请求包含与标识关联的服务定义信息;及082: Receive a registration service definition request, which contains service definition information associated with the identifier; and
083:保存服务定义信息。083: Save service definition information.
请结合图2及图15,在某些实施方式中,云端服务器20包括服务包管理模块22、服务网关21、及服务定义管理模块23。服务包管理模块22用于执行081中的方法,服务网关21用于执行082中的方法,服务定义管理模块23用于执行083中的方法。即,服务包管理模块22用于根据安装包上传请求,保存安装包并输出安装包的标识。服务网关模块用于接收注册服务定义请求。服务定义管理模块23用于保存服务定义信息。Please refer to FIG. 2 and FIG. 15 . In some embodiments, the cloud server 20 includes a service package management module 22 , a service gateway 21 , and a service definition management module 23 . The service package management module 22 is used to execute the method in 081, the service gateway 21 is used to execute the method in 082, and the service definition management module 23 is used to execute the method in 083. That is, the service package management module 22 is configured to save the installation package and output the identification of the installation package according to the installation package upload request. The service gateway module is used to receive registration service definition requests. The service definition management module 23 is used to save service definition information.
请参阅图15,在某些实施方式中,开发人员向服务网关发送目标服务对应的安装包上传请求,安装包上传请求包括安装包文件。服务网关将安装包上传请求转发至服务包管理模块22,服务包管理模块22根据安装包上传请求将安装包文件保存到云端服务器20的文件仓库,并输出云端服务器20中安装包的信息,安装包的信息包括安装包文件的地址、安装包的标识等,服务包管理模块22将安装包的标识返回服务网关,通过服务网关将安装包的标识返回开发人员。Please refer to Figure 15. In some implementations, the developer sends an installation package upload request corresponding to the target service to the service gateway, and the installation package upload request includes the installation package file. The service gateway forwards the installation package upload request to the service package management module 22. The service package management module 22 saves the installation package file to the file warehouse of the cloud server 20 according to the installation package upload request, and outputs the information of the installation package in the cloud server 20. Installation The package information includes the address of the installation package file, the identification of the installation package, etc. The service package management module 22 returns the identification of the installation package to the service gateway, and returns the identification of the installation package to the developer through the service gateway.
开发人员将目标服务的服务定义信息与目标服务的安装包的标识关联,向服务网关发送注册服务定义请求,注册服务定义请求包括关联后的服务定义信息。服务网关将注册服务定义请求转发至服务定义管理模块23,服务定义管理模块23将服务定义信息保存到云端服务器20。The developer associates the service definition information of the target service with the identification of the installation package of the target service, and sends a registration service definition request to the service gateway. The registration service definition request includes the associated service definition information. The service gateway forwards the registration service definition request to the service definition management module 23 , and the service definition management module 23 saves the service definition information to the cloud server 20 .
请结合图9,完成目标服务的注册后,服务包管理模块22保存有安装包信息,服务定义管理模块23保存有服务定义信息。在目标设备30向云端服务器20发起获取服务定义信息的请求时,服务网关能将该请求转发至服务定义管理模块23,使服务定义管理模块23响应该请求,通过服务网关向目标设备30发送服务定义信息。在目标设备30向云端服务器20发起获取安装包的请求时,服务网关能将该请求转发至服务包管理模块22,使服务包管理模块22响应该请求,通过服务网关向目标设备30发送安装包的地址信息,以使目标设备30根据安装包的地址信息下载安装包。Please refer to Figure 9. After completing the registration of the target service, the service package management module 22 saves the installation package information, and the service definition management module 23 saves the service definition information. When the target device 30 initiates a request to obtain service definition information from the cloud server 20, the service gateway can forward the request to the service definition management module 23, so that the service definition management module 23 responds to the request and sends the service to the target device 30 through the service gateway. Define information. When the target device 30 initiates a request to obtain the installation package from the cloud server 20, the service gateway can forward the request to the service package management module 22, so that the service package management module 22 responds to the request and sends the installation package to the target device 30 through the service gateway. address information, so that the target device 30 downloads the installation package according to the address information of the installation package.
请参阅图17,在某些实施方式中,服务调用方法还包括:Please refer to Figure 17. In some implementations, the service invocation method also includes:
09:对服务器中的目标服务进行更新。09: Update the target service in the server.
请结合图2及图18,在某些实施方式中,云端服务器20用于执行09中的方法。即,云端服务器20还用于对目标服务进行更新。Please combine Figure 2 and Figure 18. In some embodiments, the cloud server 20 is used to execute the method in 09. That is, the cloud server 20 is also used to update the target service.
在开发人员更新目标程序后,需要对云端服务器20中目标服务对应的安装包及服务定义信息同步进行更新,以在调用设备10调用目标设备30执行该服务时,目标设备30能够从云端服务器20获取该服务最新的安装包。After the developer updates the target program, the installation package and service definition information corresponding to the target service in the cloud server 20 need to be updated synchronously, so that when the calling device 10 calls the target device 30 to execute the service, the target device 30 can obtain the information from the cloud server 20 Get the latest installation package of the service.
请结合图19,在某些实施方式中,09:对服务器中的目标服务进行更新,包括:Please refer to Figure 19. In some implementations, 09: Update the target service in the server, including:
091:根据新的安装包上传请求,保存更新后的安装包并输出更新后的安装包的标识;091: According to the new installation package upload request, save the updated installation package and output the identification of the updated installation package;
092:接收更新服务定义请求,更新服务定义请求包含与更新后的安装包的标识关联的服务定义信息;及092: Receive an update service definition request, the update service definition request includes service definition information associated with the identity of the updated installation package; and
093:保存与更新后的安装包的标识关联的服务定义信息。093: Save the service definition information associated with the identity of the updated installation package.
请结合图2及图18,在某些实施方式中,服务包管理模块22还用于执行091中的方法,服务网关模块还用于执行092中的方法,服务定义管理模块23还用于执行093中的方法。即,服务包管理模块22还用于根据新的安装包上传请求,保存更新后的安装包并输出更新后的安装包的标识。服务网关模块还用于接收更新服务定义请求。服务定义管理模块23还用于保存与更新后的安装包的标识关联的服务定义信息。Please combine Figure 2 and Figure 18. In some embodiments, the service package management module 22 is also used to execute the method in 091, the service gateway module is also used to execute the method in 092, and the service definition management module 23 is also used to execute method in 093. That is, the service package management module 22 is also configured to save the updated installation package and output the identification of the updated installation package according to the new installation package upload request. The service gateway module is also used to receive update service definition requests. The service definition management module 23 is also configured to save service definition information associated with the updated installation package identification.
请参阅图18,在某些实施方式中,开发人员向服务网关发送更新后的目标服务对应的新的安装包上传请求,新的安装包上传请求包括新的安装包文件。服务网关将新的安装包上传请求转发至服务包管理模块22,服务包管理模块22根据新的安装包上传请求将新的安装包文件保存到云端服务器20的文件仓库,并输出云端服务器20中新的安装包的信息,新的安装包的信息包括新的安装包文件的地址、新的安装包的标识等,服务包管理模块22将新的安装包的标识返回服务网关,通过服务网关将新的安装包的标识返回开发人员。Referring to Figure 18, in some implementations, the developer sends a new installation package upload request corresponding to the updated target service to the service gateway, and the new installation package upload request includes a new installation package file. The service gateway forwards the new installation package upload request to the service package management module 22. The service package management module 22 saves the new installation package file to the file warehouse of the cloud server 20 according to the new installation package upload request, and outputs it to the cloud server 20. The information of the new installation package includes the address of the new installation package file, the identification of the new installation package, etc. The service package management module 22 returns the identification of the new installation package to the service gateway, and sends the information to the service gateway through the service gateway. The identity of the new installation package is returned to the developer.
服务包管理模块22还根据新的安装包的信息通过服务订阅管理模块24调用服务包同步处理请求,服务包同步处理请求包括新的安装包的信息。服务订阅管理模块24向已订阅该目标服务的目标设备30的服务网关发起服务包同步处理请求,目标设备30的服务网关转发该请求至目标设备30的服务管理模块32,目标设备30的服务管理模块32更新目标服务的安装包的信息,在更新成功后目标设备30向云端服务器20返回响应。如此,在调用设备10调用目标设备30执行更新后的目标服务时,目标设备30能够根据新的安装包的信息下载并安装新的安装包,以执行更新后的目标服务。The service package management module 22 also calls the service package synchronization processing request through the service subscription management module 24 according to the information of the new installation package, and the service package synchronization processing request includes the information of the new installation package. The service subscription management module 24 initiates a service package synchronization processing request to the service gateway of the target device 30 that has subscribed to the target service. The service gateway of the target device 30 forwards the request to the service management module 32 of the target device 30. The service management of the target device 30 The module 32 updates the information of the installation package of the target service. After the update is successful, the target device 30 returns a response to the cloud server 20 . In this way, when the calling device 10 calls the target device 30 to execute the updated target service, the target device 30 can download and install the new installation package according to the information of the new installation package to execute the updated target service.
开发人员将新的目标服务的新的服务定义信息与新的目标服务的新的安装包的标识关联,向服务网关发送更新服务定义请求,更新服务定义请求包括与更新后的安装包的标识关联的服务定义信息。服务网关将更新服务定义请求转发至服务定义管理模块23,服务定义管理模块23将与更新后的安装包的标识关联的服务定义信息保存到云端服务器20。The developer associates the new service definition information of the new target service with the identity of the new installation package of the new target service, and sends an update service definition request to the service gateway. The update service definition request includes association with the identity of the updated installation package. service definition information. The service gateway forwards the update service definition request to the service definition management module 23 , and the service definition management module 23 saves the service definition information associated with the updated installation package identification to the cloud server 20 .
综上,本申请实施方式的服务调用方法和服务调用系统100,能够对调用设备10进行第一输入,调用目标设备30执行目标服务,以在目标设备30难以接收或无法接收第一输入的情况下仍能够通过第一输入控制目标设备30,便于用户进行控制。In summary, the service invoking method and service invoking system 100 of the embodiment of the present application can make a first input to the invoking device 10 and call the target device 30 to execute the target service, so that when the target device 30 is difficult or unable to receive the first input, The target device 30 can still be controlled through the first input, which is convenient for the user to control.
请参阅图20及图21,本申请实施方式还提供一种服务调用方法及调用设备200。服务调用方法包括:Referring to Figure 20 and Figure 21, the embodiment of the present application also provides a service invoking method and invoking device 200. Service calling methods include:
0101:根据对调用设备200的第一输入获取目标设备的标签及目标服务;0101: Obtain the tag and target service of the target device according to the first input to the calling device 200;
0102:根据该标签从服务器中获取目标设备的地址;及0102: Obtain the address of the target device from the server based on the tag; and
0103:根据地址从至少一台待调设备中确认目标设备,以使目标设备执行目标服务。0103: Confirm the target device from at least one device to be adjusted according to the address, so that the target device can perform the target service.
调用设备200包括解析模块201、第一获取模块202、确认模块203及调用模块204。解析模块201用于执行0101中的方法,第一获取模块202用于执行0102中的方法,确认模块203及调用模块用于执行0103中的方法。即,解析模块201用于根据对调用设备200的第一输入获取目标设备的标签及目标服务。第一获取模块202用于根据标签从服务器中获取目标设备的地址。确认模块203用于根据地址从至少一台待调设备中确认目标设备。调用模块204用于调用目标设备执行目标服务。The calling device 200 includes a parsing module 201, a first acquisition module 202, a confirmation module 203 and a calling module 204. The parsing module 201 is used to execute the method in 0101, the first acquisition module 202 is used to execute the method in 0102, and the confirmation module 203 and the calling module are used to execute the method in 0103. That is, the parsing module 201 is used to obtain the tag and target service of the target device according to the first input to the calling device 200 . The first obtaining module 202 is used to obtain the address of the target device from the server according to the label. The confirmation module 203 is used to confirm the target device from at least one device to be adjusted according to the address. The calling module 204 is used to call the target device to execute the target service.
请结合图2及图21,在某些实施方式中,调用设备200可以参与组成服务调用系统100,作为服务调用系统100中的调用设备10。在调用系统中,调用设备200可用于执行上述实施方式中的调用设备10执行的服务调用方法,在此不再赘述。Please refer to FIG. 2 and FIG. 21 . In some embodiments, the calling device 200 can participate in forming the service calling system 100 as the calling device 10 in the service calling system 100 . In the calling system, the calling device 200 may be used to execute the service calling method executed by the calling device 10 in the above embodiment, which will not be described again here.
请参阅图22及图23,本申请实施方式还提供一种服务调用方法及目标设备300。服务调用方法包括:Please refer to Figure 22 and Figure 23. The embodiment of the present application also provides a service invocation method and a target device 300. Service calling methods include:
0201:根据调用设备输入的目标服务获取服务定义信息;0201: Obtain service definition information based on the target service input by the calling device;
0202:根据服务定义信息从服务器中获取与目标服务对应的安装包的标识;0202: Obtain the identification of the installation package corresponding to the target service from the server based on the service definition information;
0203:根据标识查找目标设备300是否存在与目标服务对应的安装包;及0203: Find whether the target device 300 has an installation package corresponding to the target service according to the identification; and
0204:在目标设备300中存在安装包时,安装安装包,并执行目标服务。0204: When the installation package exists in the target device 300, install the installation package and execute the target service.
目标设备300包括第二获取模块301、第三获取模块302、确定模块303及执行模块304。第二获取模块301用于执行0201中的方法,第三获取模块302用于执行0202中的方法,确定模块303模块用于执行0203中的方法,执行模块304用于执行0204中的方法。即,第二获取模块301用于根据调用设备输入的目标服务获取服务定义信息。第三获取模块302用于根据服务定义信息从服务器中获取与目标服务对应的安装包的标识。确定模块303模块用于根据标识查找目标设备30是否存在与目标服务对应的安装包。执行模块304用于在目标设备30中存在安装包时,安装安装包,并执行目标服务。The target device 300 includes a second acquisition module 301, a third acquisition module 302, a determination module 303 and an execution module 304. The second acquisition module 301 is used to execute the method in 0201, the third acquisition module 302 is used to execute the method in 0202, the determination module 303 module is used to execute the method in 0203, and the execution module 304 is used to execute the method in 0204. That is, the second obtaining module 301 is used to obtain service definition information according to the target service input by the calling device. The third obtaining module 302 is used to obtain the identification of the installation package corresponding to the target service from the server according to the service definition information. The determining module 303 is used to search whether the target device 30 has an installation package corresponding to the target service according to the identification. The execution module 304 is used to install the installation package and execute the target service when the installation package exists in the target device 30 .
请结合图2、图3及图23,在某些实施方式中,目标设备300可以参与组成服务调用系统100,作为服务调用系统100中的待调设备,在目标设备300被调用时成为图2中的目标设备30。在调用系统中,目标设备300可用于执行上述实施方式中的目标设备30执行的服务调用方法,在此不再赘述。Please combine Figure 2, Figure 3 and Figure 23. In some embodiments, the target device 300 can participate in forming the service invocation system 100 as a device to be deployed in the service invocation system 100. When the target device 300 is called, it becomes Figure 2 Target device 30 in . In the calling system, the target device 300 may be used to execute the service calling method executed by the target device 30 in the above embodiment, which will not be described again here.
请参阅图24,本申请实施方式还提供一种包含计算机程序401的非易失性计算机可读存储介质400。本申请实施方式的一个或多个包含计算机程序401的非易失性计算机可读存储介质400,当计算机程序401被一个或多个处理器402执行时,使得处理器402可执行上述任一实施方式的服务调用方法,例如实现步骤01、02、03、04、05、07、08、09、011、012、013、0131、0132、021、022、041、042、043、044、045、046、047、0451、0461、081、082、083、091、092、093、0101、0102、0103、0201、0202及0203中的一项或多项步骤。Referring to Figure 24, an embodiment of the present application also provides a non-volatile computer-readable storage medium 400 containing a computer program 401. One or more non-volatile computer-readable storage media 400 containing a computer program 401 in an embodiment of the present application. When the computer program 401 is executed by one or more processors 402, the processor 402 can execute any of the above implementations. The service calling method in the way, for example, implement steps 01, 02, 03, 04, 05, 07, 08, 09, 011, 012, 013, 0131, 0132, 021, 022, 041, 042, 043, 044, 045, 046 , 047, 0451, 0461, 081, 082, 083, 091, 092, 093, 0101, 0102, 0103, 0201, 0202 and 0203.
例如,当计算机程序401被一个或多个处理器402执行时,使得处理器402执行以下步骤:For example, when the computer program 401 is executed by one or more processors 402, the processors 402 are caused to perform the following steps:
01:根据对调用设备10的第一输入获取目标设备30的标签及目标服务;01: Obtain the tag and target service of the target device 30 according to the first input to the calling device 10;
02:根据标签从服务器中获取目标设备30的地址;02: Obtain the address of the target device 30 from the server according to the label;
03:根据地址从至少一台待调设备中确认目标设备30;及03: Confirm the target device 30 from at least one device to be adjusted according to the address; and
04:在目标设备30上执行目标服务。04: Execute the target service on the target device 30.
在本说明书的描述中,参考术语“一个实施方式”、“一些实施方式”、“示意性实施方式”、“示例”、“具体示例”或“一些示例”等的描述意指结合实施方式或示例描述的具体特征、结构、材料或者特点包含于本申请的至少一个实施方式或示例中。在本说明书中,对上述术语的示意性表述不一定指的是相同的实施方式或示例。而且,描述的具体特征、结构、材料或者特点可以在任何的一个或多个实施方式或示例中以合适的方式结合。此外,在不相互矛盾的情况下,本邻域的技术人员可以将本说明书中描述的不同实施例或示例以及不同实施例或示例的特征进行结合和组合。In the description of this specification, reference to the description of the terms "one embodiment," "some embodiments," "illustrative embodiments," "examples," "specific examples," or "some examples" or the like is meant to be in conjunction with the description of the embodiment or Examples describe specific features, structures, materials, or characteristics that are included in at least one embodiment or example of the present application. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples unless they are inconsistent with each other.
流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为,表示包括一个或更多个用于实现特定逻辑功能或过程的步骤的可执行指令的代码的模块、片段或部分,并且本申请的优选实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能,这应被本申请的实施例所属技术邻域的技术人员所理解。Any process or method descriptions in flowcharts or otherwise described herein may be understood to represent modules, segments, or portions of code that include one or more executable instructions for implementing the specified logical functions or steps of the process. , and the scope of the preferred embodiments of the present application includes additional implementations in which functions may be performed out of the order shown or discussed, including in a substantially simultaneous manner or in the reverse order, depending on the functionality involved, which shall It should be understood by those skilled in the technical field to which the embodiments of the present application belong.
尽管上面已经示出和描述了本申请的实施方式,可以理解的是,上述实施方式是示例性的,不能理解为对本申请的限制,本邻域的普通技术人员在本申请的范围内可以对上述实施方式进行变化、修改、替换和变型。Although the embodiments of the present application have been shown and described above, it can be understood that the above-mentioned embodiments are exemplary and cannot be construed as limitations of the present application. Those of ordinary skill in the art can make various modifications within the scope of the present application. The above-described embodiments are subject to changes, modifications, substitutions and variations.

Claims (20)

  1. 一种服务调用方法,其中,包括:A service calling method, which includes:
    根据对调用设备的第一输入获取目标设备的标签及目标服务;Obtain the label and target service of the target device according to the first input to the calling device;
    根据所述标签从服务器中获取所述目标设备的地址;Obtain the address of the target device from the server according to the tag;
    根据所述地址从至少一台待调设备中确认所述目标设备;及Confirm the target device from at least one device to be adjusted based on the address; and
    在所述目标设备上执行所述目标服务。Execute the target service on the target device.
  2. 根据权利要求1所述的服务调用方法,其中,所述在所述目标设备上执行所述目标服务,包括:The service invoking method according to claim 1, wherein executing the target service on the target device includes:
    根据所述目标服务获取服务定义信息;Obtain service definition information according to the target service;
    根据所述服务定义信息从所述服务器中获取与所述目标服务对应的安装包的标识;Obtain the identification of the installation package corresponding to the target service from the server according to the service definition information;
    根据所述标识查找所述目标设备是否存在与所述目标服务对应的安装包;及Find whether the target device has an installation package corresponding to the target service according to the identification; and
    在所述目标设备中存在所述安装包时,安装所述安装包,并执行所述目标服务。When the installation package exists in the target device, the installation package is installed and the target service is executed.
  3. 根据权利要求2所述的服务调用方法,其中,所述在所述目标设备上执行所述目标服务,还包括:The service invoking method according to claim 2, wherein executing the target service on the target device further includes:
    在所述目标设备中不存在所述安装包时,从所述服务器中获取与所述目标服务对应的安装包;及When the installation package does not exist in the target device, obtain the installation package corresponding to the target service from the server; and
    安装所述安装包,并执行所述目标服务。Install the installation package and execute the target service.
  4. 根据权利要求3所述的服务调用方法,其中,所述在所述目标设备上执行所述目标服务,还包括:The service invoking method according to claim 3, wherein executing the target service on the target device further includes:
    在所述服务器中订阅所述目标服务;Subscribe to the target service in the server;
    所述从所述服务器中获取与所述目标服务对应的安装包,包括:Obtaining the installation package corresponding to the target service from the server includes:
    在所述服务器中的安装包更新后,从所述服务器中获取更新后的所述安装包;After the installation package in the server is updated, obtain the updated installation package from the server;
    所述安装所述安装包,并执行所述目标服务,包括:Installing the installation package and executing the target service includes:
    安装更新后的所述安装包,并执行所述目标服务。Install the updated installation package and execute the target service.
  5. 根据权利要求4所述的服务调用方法,其中,还包括:The service invoking method according to claim 4, further comprising:
    根据预设的保留策略,保留所述订阅和/或所述安装包。The subscription and/or the installation package are retained according to the preset retention policy.
  6. 根据权利要求1所述的服务调用方法,其中,所述目标服务包括卸载服务和查找服务。The service invoking method according to claim 1, wherein the target service includes an unloading service and a search service.
  7. 根据权利要求1所述的服务调用方法,其中,还包括:The service invoking method according to claim 1, further comprising:
    根据预设的卸载策略,从所述目标设备上卸载所述目标服务。Uninstall the target service from the target device according to a preset uninstallation policy.
  8. 根据权利要求1所述的服务调用方法,其中,所述第一输入包括语音输入;所述根据对调用设备的第一输入获取目标设备的标签及目标服务,包括:The service calling method according to claim 1, wherein the first input includes voice input; and obtaining the tag of the target device and the target service according to the first input to the calling device includes:
    将所述语音输入转化为文字信息;Convert the voice input into text information;
    获取预设的语义配置;及Get the default semantic configuration; and
    根据所述语义配置对所述文字信息解析,获取所述目标设备的标签和所述目标服务。The text information is parsed according to the semantic configuration to obtain the label of the target device and the target service.
  9. 根据权利要求8所述的服务调用方法,其中,所述语义配置包括意图槽位、意图词典、意图语料及意图回复,所述意图槽位包括第一变量和第二变量,所述第一变量表征所述目标设备的标签,所述第二变量表征所述目标服务,所述意图词典包括所述第一变量和所述第二变量的同义词,所述意图语料包括预设句型;所述根据所述语义配置对所述文字信息解析,获取所述目标设备的标签和所述目标服务,包括:The service invoking method according to claim 8, wherein the semantic configuration includes an intention slot, an intention dictionary, an intention corpus and an intention reply, the intention slot includes a first variable and a second variable, the first variable A label characterizing the target device, the second variable characterizing the target service, the intent dictionary including synonyms of the first variable and the second variable, the intent corpus including a preset sentence pattern; Parse the text information according to the semantic configuration and obtain the label of the target device and the target service, including:
    将所述文字信息与所述意图语料进行匹配;及Match the text information with the intended corpus; and
    在匹配成功后,获取所述意图槽位的变量值,以获取所述目标设备的标签和所述目标服务。After successful matching, obtain the variable value of the intent slot to obtain the label of the target device and the target service.
  10. 根据权利要求1所述的服务调用方法,其中,还包括:The service invoking method according to claim 1, further comprising:
    在所述服务器中对所述目标服务进行注册。Register the target service in the server.
  11. 根据权利要求10所述的服务调用方法,其中,所述在所述服务器中对所述目标服务进行注册,包括:The service invoking method according to claim 10, wherein registering the target service in the server includes:
    根据安装包上传请求,保存所述安装包并输出所述安装包的标识;According to the installation package upload request, save the installation package and output the identification of the installation package;
    接收注册服务定义请求,所述注册服务定义请求包含与所述标识关联的服务定义信息;及receiving a registration service definition request, the registration service definition request including service definition information associated with the identification; and
    保存所述服务定义信息。Save the service definition information.
  12. 根据权利要求10所述的服务调用方法,其中,还包括:The service invoking method according to claim 10, further comprising:
    对所述服务器中的所述目标服务进行更新。Update the target service in the server.
  13. 根据权利要求12所述的服务调用方法,其中,所述对所述服务器中的所述目标服务进行更新,包括:The service invoking method according to claim 12, wherein the updating the target service in the server includes:
    根据新的安装包上传请求,保存更新后的所述安装包并输出更新后的所述安装包的标识;According to the new installation package upload request, save the updated installation package and output the identification of the updated installation package;
    接收更新服务定义请求,所述更新服务定义请求包含与更新后的所述安装包的标识关联的服务定义信息;及Receive an update service definition request, the update service definition request including service definition information associated with the updated identification of the installation package; and
    保存与更新后的所述安装包的标识关联的所述服务定义信息。Save the service definition information associated with the updated identification of the installation package.
  14. 根据权利要求1所述的服务调用方法,其中,所述根据所述标签从服务器中获取所述目标设备的地址,包括:The service invoking method according to claim 1, wherein said obtaining the address of the target device from the server according to the tag includes:
    在所述服务器确认所述目标设备与所述调用设备的账号是否关联;及Confirm on the server whether the accounts of the target device and the calling device are associated; and
    在所述目标设备与所述调用设备的账号关联的情况下,获取所述目标设备的地址。When the target device is associated with the account of the calling device, the address of the target device is obtained.
  15. 一种服务调用系统,其中,包括调用设备、目标设备及服务器;A service calling system, which includes a calling device, a target device and a server;
    所述调用设备用于:根据第一输入获取所述目标设备的标签及目标服务,根据所述标签从所述服务器中获取所述目标设备的地址,及根据所述地址从至少一台待调设备中确认所述目标设备;The calling device is configured to: obtain the label and target service of the target device according to the first input, obtain the address of the target device from the server according to the label, and obtain the address of the target device from at least one device to be called according to the address. Confirm the target device in the device;
    所述目标设备用于执行所述目标服务。The target device is used to execute the target service.
  16. 一种服务调用方法,其中,包括:A service calling method, which includes:
    根据对调用设备的第一输入获取目标设备的标签及目标服务;Obtain the label and target service of the target device according to the first input to the calling device;
    根据所述标签从服务器中获取所述目标设备的地址;及Obtain the address of the target device from the server according to the tag; and
    根据所述地址从至少一台待调设备中确认所述目标设备,以使所述目标设备执行所述目标服务。Confirm the target device from at least one device to be adjusted according to the address, so that the target device executes the target service.
  17. 一种调用设备,其中,包括:A calling device, which includes:
    解析模块,用于根据第一输入获取目标设备的标签及目标服务;A parsing module, used to obtain the tag of the target device and the target service according to the first input;
    第一获取模块,用于根据所述标签从所述服务器中获取所述目标设备的地址;A first acquisition module, configured to acquire the address of the target device from the server according to the tag;
    确认模块,用于根据所述地址从至少一台待调设备中确认所述目标设备;及a confirmation module, configured to confirm the target device from at least one device to be adjusted according to the address; and
    调用模块,用于调用所述目标设备执行所述目标服务。A calling module, configured to call the target device to execute the target service.
  18. 一种服务调用方法,其中,包括:A service calling method, which includes:
    根据调用设备输入的目标服务获取服务定义信息;Obtain service definition information based on the target service input by the calling device;
    根据所述服务定义信息从服务器中获取与所述目标服务对应的安装包的标识;Obtain the identification of the installation package corresponding to the target service from the server according to the service definition information;
    根据所述标识查找所述目标设备是否存在与所述目标服务对应的安装包;及Find whether the target device has an installation package corresponding to the target service according to the identification; and
    在所述目标设备中存在所述安装包时,安装所述安装包,并执行所述目标服务。When the installation package exists in the target device, the installation package is installed and the target service is executed.
  19. 一种目标设备,其中,包括:A target device that includes:
    第二获取模块,用于根据调用设备输入的目标服务获取服务定义信息;The second acquisition module is used to acquire service definition information according to the target service input by the calling device;
    第三获取模块,用于根据所述服务定义信息从服务器中获取与所述目标服务对应的安装包的标识;A third acquisition module, configured to acquire the identification of the installation package corresponding to the target service from the server according to the service definition information;
    确定模块,用于根据所述标识查找所述目标设备是否存在与所述目标服务对应的安装包;及a determination module, configured to search whether the target device has an installation package corresponding to the target service according to the identification; and
    执行模块,用于在所述目标设备中存在所述安装包时,安装所述安装包,并执行所述目标服务。An execution module, configured to install the installation package and execute the target service when the installation package exists in the target device.
  20. 一种包含计算机程序的非易失性计算机可读存储介质,当所述计算机程序被一个或多个处理器执行时,使得所述处理器实现权利要求1至14任意一项所述的服务调用方法。A non-volatile computer-readable storage medium containing a computer program. When the computer program is executed by one or more processors, the processor implements the service call described in any one of claims 1 to 14. method.
PCT/CN2022/143210 2022-05-13 2022-12-29 Service calling method and system, calling device, target device, and readable storage medium WO2023216620A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210523067.8 2022-05-13
CN202210523067.8A CN114937452A (en) 2022-05-13 2022-05-13 Service calling method and system, calling device, target device and readable storage medium

Publications (1)

Publication Number Publication Date
WO2023216620A1 true WO2023216620A1 (en) 2023-11-16

Family

ID=82863874

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/143210 WO2023216620A1 (en) 2022-05-13 2022-12-29 Service calling method and system, calling device, target device, and readable storage medium

Country Status (2)

Country Link
CN (1) CN114937452A (en)
WO (1) WO2023216620A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114756306A (en) * 2022-03-30 2022-07-15 Oppo广东移动通信有限公司 Service calling method, device, equipment and storage medium
CN114937452A (en) * 2022-05-13 2022-08-23 Oppo广东移动通信有限公司 Service calling method and system, calling device, target device and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103188204A (en) * 2011-12-27 2013-07-03 腾讯科技(深圳)有限公司 Service control method and system in open platform
CN105843069A (en) * 2016-06-07 2016-08-10 深圳市中安伟讯科技有限公司 Speech recognition-based smart home control method and system
AU2016244329A1 (en) * 2009-06-05 2016-11-03 Apple Inc. Contextual voice commands
CN112965765A (en) * 2021-02-02 2021-06-15 深圳市优必选科技股份有限公司 Service calling method and device, electronic equipment and storage medium
CN114937452A (en) * 2022-05-13 2022-08-23 Oppo广东移动通信有限公司 Service calling method and system, calling device, target device and readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2016244329A1 (en) * 2009-06-05 2016-11-03 Apple Inc. Contextual voice commands
CN103188204A (en) * 2011-12-27 2013-07-03 腾讯科技(深圳)有限公司 Service control method and system in open platform
CN105843069A (en) * 2016-06-07 2016-08-10 深圳市中安伟讯科技有限公司 Speech recognition-based smart home control method and system
CN112965765A (en) * 2021-02-02 2021-06-15 深圳市优必选科技股份有限公司 Service calling method and device, electronic equipment and storage medium
CN114937452A (en) * 2022-05-13 2022-08-23 Oppo广东移动通信有限公司 Service calling method and system, calling device, target device and readable storage medium

Also Published As

Publication number Publication date
CN114937452A (en) 2022-08-23

Similar Documents

Publication Publication Date Title
WO2023216620A1 (en) Service calling method and system, calling device, target device, and readable storage medium
US7242929B2 (en) Method and apparatus for dynamic extension of device management tree data model on a mobile
US7716661B2 (en) Embedded device update service
US7831734B2 (en) Method and system for remote configuration of network devices
US20050260979A1 (en) System and method for managing resources and applications of a wireless communication device
US9323587B2 (en) Method and system for automatic detecting and resolving APIs
WO2021051747A1 (en) Data update method, system and device, electronic device, and computer storage medium
JP5248657B2 (en) System for registry-based automated installation and component handling on devices
CN108874426B (en) Application program updating method and device and readable storage medium
WO2017071358A1 (en) Software upgrade method and apparatus
WO2023185166A1 (en) Service call method and apparatus, device and storage medium
WO2022000869A1 (en) Batch processing method and apparatus for mini programs, and electronic device and readable storage medium
CN108874427B (en) Updating progress obtaining method and device and readable storage medium
CN110221877B (en) Application program running method and device, electronic equipment and storage medium
US20090183149A1 (en) Data imaging system and methods
US9600802B2 (en) Method and apparatus for intelligence-oriented service using context information estimation in mobile terminal
US8601171B2 (en) Method for configuring an electronic device
CN115309431A (en) Parameter updating method, readable medium and electronic equipment
CN114172925B (en) Network distribution method and equipment
CN113761588A (en) Data verification method and device, terminal equipment and storage medium
JP2021184235A5 (en)
EP1714508B1 (en) A method for configuring an electronic device
US11966656B2 (en) Server, electronic device, server communication method, device communication method, and communication system
CN107704614B (en) Notification information change method and system
RU2380857C2 (en) Method for electronic device configuration

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22941552

Country of ref document: EP

Kind code of ref document: A1